// JavaScript Document
$(document).ready(function(){

	//Larger thumbnail preview 
	$("ul.thumb li").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-110px', 
				marginLeft: '-110px', 
				top: '50%', 
				left: '50%', 
				width: '240px', 
				height: '196px',
				padding: '0px' 
			}, 200);
		
		} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '182px', 
				height: '149px'
			}, 400);
	});
	
	//Swap Image on Click
	$("ul.thumb li a").click(function() {
		window.location = $(this).attr("href");
		//var mainImage = $(this).attr("href"); //Find Image Name
		//$("#main_view img").attr({ src: mainImage });
		return false;		
	});
	
//});

////////////////////////////////////////////////////////////

// AND FOR THE DETAILSHOVER
	//Larger thumbnail preview 
	$("ul.detailsHover li").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-280px', 
				marginLeft: '-180px', 
				top: '0%', 
				left: '0%', 
				width: '640px', 
				height: '480px',
				padding: '0px',
				border: '5px solid #CCCCCC'
			}, 200);
		
		} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '240px', 
				height: '180px',
				border: '5px solid #CCCCCC'
			}, 400);
	});
	
	//Swap Image on Click
	$("ul.detailsHover li a").click(function() {
		//window.location = $(this).attr("href");
		//var mainImage = $(this).attr("href"); //Find Image Name
		//$("#main_view img").attr({ src: mainImage });
		return false;		
	});
 
});
