$(document).ready(function() {
		
		$.scrollTo( 0 );//reset the screen to (0,0)

	
$('.on, #about a, #contact a').click(function(){	$.scrollTo( this.hash, 800);	});

$('#top').click(function(){ $.scrollTo(this.hash, 800); return false;});

$("#projects a, #simple").fancybox();


$('#projects').serialScroll({
		items:'li',
		prev:'#btnPrev',
		next:'#btnNext',
		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:1000,
		force:false,
		stop:false,
		lock:false,
		cycle:true, //don't pull back once you reach the end
		easing:'easeOutQuart', //use this easing equation for a funny effect
		interval:0, // yeah! I now added auto-scrolling
		jump: false //click on the images to scroll to them
	});						   
				
	/*for (var i = 0; i < $("#ListProjects li").get().length; i++) {
		  if((i+1)%3 == 0) $("#ListProjects li").eq(i).addClass("item3");
    }*/
	for (var i = 0; i < $(".cols1 .c").get().length; i++) {
		  if((i+1)%3 == 0) $(".cols1 .c").eq(i).addClass("item3");
    }
	
	$("#ListProjects li").hover(
     function () {
      	$(this).animate({ backgroundColor:"#000000" }, 1500 );
     },
     function () {
		$(this).animate({ backgroundColor:"#18130D" }, 1500 );
    });


	   
	

});

