$(document).ready(function() {
// add initialisers here that need to be loaded when the document is ready
	$("a.gallery").attr('rel', 'gallery').fancybox({
			'transitionIn'	:	'elastic',
			'transitionOut'	:	'elastic',
			'speedIn'		:	600, 
			'speedOut'		:	200, 
			'overlayShow'	:	true,
			'cyclic'		: 	true
	});
	$("article.product a").fancybox({
        'type': 'ajax',
        'ajax': {
        dataFilter: function(data) {
                var content = $(data);
                content = $('div#lightbox', content); 
                return(content);
        		}
    		}
	}); 
	$('section#promotions ul').bxSlider({
			mode: 'fade',                 // 'horizontal', 'vertical', 'fade'
			infiniteLoop: true,                 // true, false - display first slide after last
			hideControlOnEnd: false,            // true, false - if true, will hide 'next' control on last slide and 'prev' control on first
			controls: true,                     // true, false - previous and next controls
			speed: 500,                         // integer - in ms, duration of time slide transitions will occupy
			easing: 'swing',                    // used with jquery.easing.1.3.js - see http://gsgd.co.uk/sandbox/jquery/easing/ for available options
			pager: false,                        // true / false - display a pager
			nextText: 'next',                   // string - text displayed for 'next' control
			nextImage: '/public/ihd/skin/next.png',                      // string - filepath of image used for 'next' control. ex: 'images/next.jpg'
			nextSelector: null,                 // jQuery selector - element to contain the next control. ex: '#next'
			prevText: 'previous',                   // string - text displayed for 'previous' control
			prevImage: '/public/ihd/skin/previous.png',                      // string - filepath of image used for 'previous' control. ex: 'images/prev.jpg'
			prevSelector: null,                 // jQuery selector - element to contain the previous control. ex: '#next'
//			captions: false,                    // true, false - display image captions (reads the image 'title' tag)
//			captionsSelector: null,             // jQuery selector - element to contain the captions. ex: '#captions'
			auto: true,                        // true, false - make slideshow change automatically
			autoDirection: 'next',              // 'next', 'prev' - direction in which auto show will traverse
//			autoControls: false,                // true, false - show 'start' and 'stop' controls for auto show
//			autoControlsSelector: null,         // jQuery selector - element to contain the auto controls. ex: '#auto-controls'
			autoStart: true,                    // true, false - if false show will wait for 'start' control to activate
			autoHover: false,                   // true, false - if true show will pause on mouseover
			autoDelay: 0,                       // integer - in ms, the amount of time before starting the auto show
			pause: 5000,                        // integer - in ms, the duration between each slide transition
			wrapperClass: 'bx-wrapper',         // string - classname attached to the slider wraper
			startingSlide: 0,                   // integer - show will start on specified slide. note: slides are zero based!
			displaySlideQty: 1,                 // integer - number of slides to display at once
			moveSlideQty: 1,                    // integer - number of slides to move at once
			randomStart: false                 // true, false - if true show will start on a random slide
	});
	$('section#features ul').bxSlider({
			mode: 'horizontal',                 // 'horizontal', 'vertical', 'fade'
			infiniteLoop: true,                 // true, false - display first slide after last
			hideControlOnEnd: false,            // true, false - if true, will hide 'next' control on last slide and 'prev' control on first
			controls: true,                     // true, false - previous and next controls
			speed: 500,                         // integer - in ms, duration of time slide transitions will occupy
			easing: 'swing',                    // used with jquery.easing.1.3.js - see http://gsgd.co.uk/sandbox/jquery/easing/ for available options
			pager: false,                        // true / false - display a pager
			nextText: 'next',                   // string - text displayed for 'next' control
			nextImage: '/public/ihd/skin/next.png',                      // string - filepath of image used for 'next' control. ex: 'images/next.jpg'
			nextSelector: null,                 // jQuery selector - element to contain the next control. ex: '#next'
			prevText: 'previous',                   // string - text displayed for 'previous' control
			prevImage: '/public/ihd/skin/previous.png',                      // string - filepath of image used for 'previous' control. ex: 'images/prev.jpg'
			prevSelector: null,                 // jQuery selector - element to contain the previous control. ex: '#next'
			auto: false,                        // true, false - make slideshow change automatically
			autoDirection: 'next',              // 'next', 'prev' - direction in which auto show will traverse
			autoStart: true,                    // true, false - if false show will wait for 'start' control to activate
			autoHover: false,                   // true, false - if true show will pause on mouseover
			autoDelay: 0,                       // integer - in ms, the amount of time before starting the auto show
			pause: 5000,                        // integer - in ms, the duration between each slide transition
			wrapperClass: 'bx-wrapper',         // string - classname attached to the slider wraper
			startingSlide: 0,                   // integer - show will start on specified slide. note: slides are zero based!
			displaySlideQty: 1,                 // integer - number of slides to display at once
			moveSlideQty: 1,                    // integer - number of slides to move at once
			randomStart: false                 // true, false - if true show will start on a random slide
	});
	
//	var selected_collection = $.cookie("collection"); 
//  	$("select#collection").val(selected_collection);	
//	$("select#collection").change(function() {
//		var collection = $(this).find('option:selected').attr('value');
//		$.cookie("collection", null);
//		$.cookie("collection", collection, { path: '/' });
//	});


//	var selected_type = $.cookie("type"); 
//  	$("select#type").val(selected_type);	
//	$("select#type").change(function() {
//		var type = $(this).find('option:selected').attr('value');
//		$.cookie("type", null);
//		$.cookie("type", type, { path: '/' });
//	});

//	var selected_gender = $.cookie("gender"); 
//  	$("select#gender").val(selected_gender);	
//	$("select#gender").change(function() {
//		var gender = $(this).find('option:selected').attr('value');
//		$.cookie("gender", null);
//		$.cookie("gender", gender, { path: '/' });
//	});

//	var selected_materials = $.cookie("materials"); 
//  	$("select#materials").val(selected_materials);	
//	$("select#materials").change(function() {
//		var materials = $(this).find('option:selected').attr('value');
//		$.cookie("materials", null);
//		$.cookie("materials", materials, { path: '/' });
//	});

//	var selected_gems = $.cookie("gems"); 
//  	$("select#gems").val(selected_gems);	
//	$("select#gems").change(function() {
//		var gems = $(this).find('option:selected').attr('value');
//		$.cookie("gems", null);
//		$.cookie("gems", gems, { path: '/' });
//	});

});
$(window).load(function() {
// add initialisers here that need to be loaded when the window is loaded
});
