var slInterval = 5000;
var slTransSpeed = 1000;

$(document).ready(function(){

	$('#slideshow_list').cycle({
		fx:     'fade,scrollRight,turnDown,scrollLeft', 
		before: slideCapDown,
		speed:  slTransSpeed, 
		timeout: slInterval, 
		pause:   1
	});
	$('#slideshow_list').find('.slideshow_content_wrap').slideDown('fast');
	
	$("#product_block_list li").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});
	$("#product_block_list li").hover(
	function(){
		$(this).addClass('block_list_hover');
	},
	function(){
		$(this).removeClass('block_list_hover')        
	});
	
	$("#product_block_list.internal_blocks li").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});
	$("#product_block_list.internal_blocks li").hover(
	function(){
		$(this).addClass('block_list_hover');
	},
	function(){
		$(this).removeClass('block_list_hover')        
	});
	
	/*Gallery Switch*/
	$(".thumbs_list li a").click(function(){			

	var largePath = $(this).attr("href");

	$("#largeImg").attr({ src: largePath });return false;
	
	});   

});

function slideCapDown(currSlideElement, nextSlideElement, options, forwardFlag){
	$('#slideshow_list').cycle('pause');
	$('#slideshow_list').find('.slideshow_content_wrap').slideUp('fast');
	$('#slideshow_list').cycle('resume');
	var timeout = setTimeout(slideCapUp , (slInterval + slTransSpeed + 100));
}

function slideCapUp(currSlideElement, nextSlideElement, options, forwardFlag){
	//alert('Hello World 2');
	//$(currSlideElement).find('.slideshow_content_wrap').slideDown('fast');
	//$(nextSlideElement).find('.slideshow_content_wrap').slideDown('fast');
	$(nextSlideElement).find('.slideshow_content_wrap').slideDown('slow');
	//$(nextSlideElement).find('.slideshow_content_wrap').css('display' , 'block');
}
