$(document).ready(function() {	
	
				
	
	$("#slideshowLinks").tabs("#slideshowList > .image", {
				
		effect: 		'fade',
		fadeInSpeed: 	1000,
		fadeOutSpeed: 	1000,
		rotate:			true,
		tabs:			'li'
				
	}).slideshow({
		
		autoplay: 		true,
		autopause: 		false,
		interval: 		3000
	
	});
	
	var slideshowAPI = $("#slideshowLinks").data("slideshow");
	

	$("#media").hover( 
		
			function() {		
			
				slideshowAPI.pause();
				
			}, // END MEDIA HOVER IN
			function() {		
			
				slideshowAPI.play();				
				
			}// END MEDIA HOVER OUT			
			
		);			
	
	$("a[rel=lightbox], a.lightbox, .image.lightbox a").fancybox({
		
		'margin'         	: 0,
		'padding'        	: 10,
		'speedIn'         	: 300,
		'speedOut'        	: 100,
		'changeSpeed'       : 300,
		'changeFade'        : 300,
		'centerOnScroll'	: true,
		'cyclic'			: true,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',		  
		'overlayOpacity'	: '0.85',
		'overlayColor'		: '#000000'
		
	});	
	
	 $("#themeList .theme:last-child").addClass("last");
	
});
