
 $(document).ready(function(){
	$('.fzoom').fancybox({
		'zoomOpacity' : true,
		 'overlayShow' : true,
		 'zoomSpeedIn' : 300,
		 'zoomSpeedOut' : 300,
		 'overlayOpacity': .3
		 		 });

	switchTo('web');	
	$("#scroller-web-window").scrollable({
		easing: 'swing',
		size: '1',
		items: '#scroller-web-wrap',
		loop: 'true',
		next: '#button-next-project-web' ,
		navi: '#project-dots-web',
		naviItem: 'a',
		keyboard: true,
		speed: '800'
	});	

			
 	//set up events to handle browsing project categories
    $("#projects .web a ").bind("click", function(){ switchTo("web"); });
    		
  });
 		
var curSect = "";

function switchTo(which){
	jQuery.easing.def = "easeInOutSine";
	
	h = $(".project").height();  //so we don't have to hardcode the row height;
	if (which == curSect) { return; }  //don't switch if we are on the selected tab
	
	if (which == "web"){
		$(".button-next-project").hide();
		$("#button-next-project-web").show();		
		$(".project-dots").hide();
		$("#project-dots-web").show(300);		
		$("#project-type-nav span").animate({opacity: '.65'}, { "duration": 300 } );	
		$("#project-type-nav a").css("cursor", "pointer");		
		$("#project-type-nav .web a").css("cursor", "default");			
		$("#project-type-nav .current").animate({top: "-1px"  }, { "duration": 300 } );
		$("#project-type-nav .web span").animate({opacity: '1.0'}, { "duration": 300 } );
		$("#scroller-vertical").animate({top: '0'}, { "duration": 300 } );
	}
		
	
	curSect = which;

}
