

if ($('body').hasClass('ns')){

} else {	

//return false;
var maxHeight=0,
	pixels,
	slide = 1,
	slider_width = $("#FS_slider").width(),
	num_slides = $("#FS_slider section").length;
	
	
	
   $(document).ready(function(){   		
		
		if ($('#FS_controls a').length <=1){ $('#FS_controls').css('display', 'none') }			
		
		$("#FS_slider #FS_holder").width(slider_width * num_slides);
		$("#FS_controls a").click(function(){
			var target = $(this).attr("href");				
			var height = $("#id_"+target.replace("#", "")+" .content").height()+6;
			window.location.hash = target;
			
			var audio = $("audio")[slide-1];
			if (audio){ audio.pause(); audio.currentTime = 0;}
			
			var iframe = $('iframe#player_'+slide).get(0);
			if (iframe){ iframe.api( 'api_pause', null ); iframe.api('api_seekTo', 0);};
			
			slide = $(this).attr("rel");
			slideTo(slide,slider_width, height, target);
			return false;
		});
	
	});
	
	$(window).load(function(){   		
			
		$("#FS_slider").css({"display": "block"});
		
		if(window.location.hash){
			var target = window.location.hash;
			$("#FS_controls a[href="+target+"]").addClass("active");	
						
			slide = $("#FS_controls a[href="+target+"]").attr("rel");
			var height = $("#id_"+target.replace("#", "")+" .content").height()+6;
			slideTo(slide,slider_width, height, target)				
		} else {
			$("#FS_controls a:eq(0)").addClass("active");		
			$("#FS_holder, #FS_slider").css({"height": $("#FS_holder section:eq(0) .content").height()})
		} 
	
	});
	
	
	
	function slideTo(slide, width, height, target) {
		
		pixels = (width * (slide - 1))*-1;
		$("#FS_controls a").removeClass("active");
		$("#FS_controls a[href="+target+"]").addClass("active");
		$("#FS_slider").css({"height": height})
		//$('#debug').text(slide+'/'+width+'/'+height+'/'+target+'/'+pixels);		
		$("#FS_holder").css({"height": height, "margin-left":pixels})
		
	}
	
}
