window.addEvent('domready', function() {

	//---------------------- CAROUSEL START -----------------------------------
	 /*var mgfxCarousel = new iCarousel("featured_work", {  
         idPrevious: "feature_previous",  
         idNext: "feature_next",  
         idToggle: "undefined",  
         item: {  
            klass: "feature",  
            size: 325  
         },  
         animation: {  
             type: "scroll",  
             duration: 1000,  
             amount: 1,
             rotate: {
             	type: "auto"
             }
         }  
     });  
     
    $("thumb0").addEvent("click", function(event){
		new Event(event).stop();
		mgfxCarousel.goTo(0);
	});
	$("thumb1").addEvent("click", function(event){
		new Event(event).stop();
		mgfxCarousel.goTo(1);
	});
	$("thumb2").addEvent("click", function(event){
		new Event(event).stop();
		mgfxCarousel.goTo(2);
	});*/
	//---------------------- CAROUSEL  END  -----------------------------------
	
	//---------------------- PORTFOLIO START -----------------------------------
	new SmoothScroll();
	//---------------------- PORTFOLIO  END  -----------------------------------
		
	//---------------------- TIPS START ---------------------------------------
	new Tips($$('.tips'));
	//---------------------- TIPS  END  ---------------------------------------
	
	//---------------------- NEWSLETTER START ---------------------------------
	$('newsletter_form').addEvent('submit',function(e){
		/* Prevents normal submission action. */
		new Event(e).stop();
		/* Feedback acknowledging user input. */
		$('newsletter').setProperty('value','Submitting...');
		
		/* Send for through AJAX, and respond with Thank you when done. TODO: Respond intelligently. */
		this.send({
			onComplete: function() {
				$('newsletter').setProperty('value','Thank you!');
			}
		});
	});
	//---------------------- NEWSLETTER  END  ---------------------------------				
});

