$(document).ready(function() {

	$('.cycle').cycle({ 
		fx:    'fade',
		timeout: 8000
	});
	//$('.cycle').cycle('pause');
	
	
	$('.cycle2').cycle({ 
		fx:    'fade',
		timeout: 4000,
		cleartype: false
 
	});
	$("#brand_box .next").click(function () { 
		$('.cycle2').cycle('next');
		return false;
	});
	
	$("#brand_box .prev").click(function () { 
		$('.cycle2').cycle('prev');
		return false;
	});
	
	//$('.cycle2').cycle('pause');
	
	$('.cycle3').cycle({ 
		fx:    'fade',
		timeout: 4500,
		cleartype: false
 
	});
	
	$("#home_splash_inner").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 7000, true);
	
	$("#home_splash_inner > ul a").click(function(){ 
												  
		$("#home_splash_inner").tabs("rotate", 0, false); 
		
	}); 
	
	
	$('.banners').cycle({ 
		fx:     'fade', 
		speed:  'slow', 
		timeout: 8000, 
		pager:  '.banner-nav-inner',
		next:   '#next2', 
		prev:   '#prev2' 
	});
	
	
	// signup form home
	$("#signup_submit_home").click(function() {

		$.ajax({
		   type: "GET",
		   url: sitedir + "process/signup.php",
		   data: "signup_email="+$("input#signup_email_home").val(),
		   success: function(msg){
			   
				if(jQuery.trim(msg) == "Thanks for signing-up"){
					
					  $("#signup_email_home").animate({ 
						backgroundColor: "#fff58b"
					  }, 1500 );
					
				}else{
					
					  $("#signup_email_home").animate({ 
						backgroundColor: "#FFB2B2"
					  }, 1500 );
				  
				}
			   
			   
				$("input#signup_email_home").val(jQuery.trim(msg));
				
		   }
		 });
		
		return false;

	});
	
	
});

