$(document).ready(function(){

   $("#openForm").click(function(){							   
	 $("#contactForm").slideDown(900);
     return false; 
   })
   setTimeout(function(){ $(".success").fadeOut(500);}, 3000);
   //setTimeout(function(){ }, 3000);

   
   
   
	$('#scrollWindow').serialScroll({
		items:'li',
		prev:'#scroller a.prev',
		next:'#scroller a.next',
		step:5,
		offset:-0, //when scrolling to photo, stop 230 before reaching it (from the left)
		start:0, //as we are centering it, start at the 2nd
		duration:800,
		force:true,
		stop:false,
		lock:false,
		cycle:false, //don't pull back once you reach the end
		//easing:'easeOutBounce', //use this easing equation for a funny effect
		jump: false //click on the images to scroll to them
	});
	
	


   /*********end scroller***********/
   $("#featureButtons li a").click(function(){
	num = 10;					  
})
   
}); //end of jquery

function change_feature(id){
		var id = id;
		
		$('.featureItem').fadeOut(300);
		setTimeout(function(){ $('#f'+id).fadeIn(600); }, 300);
		
		$('#featureButtons li a').removeClass('currentFeatBtn'); 
		setTimeout(function(){ $('#fBtn'+id).addClass('currentFeatBtn'); }, 500);
		return false;
		
}


//automatic transition
var num = 1;

function start_show() {
// Time is in seconds X 1000
var abc = setInterval("slideshow()", 5000);
}


function slideshow() {
num++;

	if (num==1) {
		change_feature(1)	
	}else if (num==2){
		change_feature(2)
	}else if (num==3){
		change_feature(3)	
	}else if(num==4){
		change_feature(4)
		num=0;		
	}	
}
//end automatic transition
