$(document).ready(function(){
	
	/*
	 * Sort out the image gallery bit
	 */
	
	// initilise pretty photo
	var theme = 'dark_rounded';
	if( $.browser.msie && $.browser.version < 7 ){
    	//png don't work on IE6 so use dark_square instead
    	theme = 'dark_square';
    }

	$("a[rel^='prettyPhoto']").prettyPhoto({
	    animationSpeed: 'normal', /* fast/slow/normal */
	    padding: 40, /* padding for each side of the picture */
	    opacity: 0.5, /* Value betwee 0 and 1 */
	    showTitle: false, /* true/false */
	    allowresize: true, /* true/false */
	    counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
	    theme: theme, /* light_rounded / dark_rounded / light_square / dark_square */
	    callback: function(){}
	}); 


	// show the nav bit
	$("#product_gallery .product_image .gallery_info .image_nos").show();
	
	// if one of them is clicked
	$("#product_gallery .product_image .gallery_info .image_nos a").click(function(){
		
		var rel = $(this).attr('rel');
		
		$("#product_gallery .product_image").hide();
		$("#product_gallery .product_image:nth-child("+ rel +")").show();
		
		return false;
			
	});	
	
	
	/*
	 * what is this link
	 */
	 
	$('#main #product #product_single .details .fav .question').hover(
		function () {
			$('#main #product #product_single .details .fav .what_is_help').show();
		}, 
		function () {
			$('#main #product #product_single .details .fav .what_is_help').hide();
		}
    );
	

});
