$(document).ready(function(){
// ------------------------------------------------------------ //
	// online store sliders, click expand button panel opens, click again panel closes
	function setupSliders() {
		// loop each of the sliders and attach the toggle function to open and close content
			/*
			var content = 0;
			if (typeof($.jqURL) != "undefined") {
				content = $.jqURL.get('content');
			}
			/*
			
			//alert(preday);
			/*
			if (content ==1){

				$('.slider').parent().find('#1').slideDown('slow');	
				$('.slider').parent().find('.slider').addClass('slider_on');
				$('.slider').parent().attr('id','slider_open');
			}

			else if (content ==2){
				$('.slider').parent().find('#2').slideDown('slow');	
				$('.slider').parent().find('.slider').addClass('slider_on');
				$('.slider').parent().attr('id','slider_open');
			}
			
			else if (content ==3){
				$('.slider').parent().find('#3').slideDown('slow');	
				$('.slider').parent().find('.slider').addClass('slider_on');
				$('.slider').parent().attr('id','slider_open');
			}	
			
			else if (content ==4){
				$('.slider').parent().find('#4').slideDown('slow');	
				$('.slider').parent().find('.slider').addClass('slider_on');
				$('.slider').parent().attr('id','slider_open');
			}
			*/
		
		$('.slider').each(function(i){									   
			var open = $(this).parent().attr('id');
			if (open != "slider_open") {
				//var myslider = $(this); // normal slider
				$(this).toggle(function() {
					$(this).parent().find('.slider_content').slideDown('slow');
					$(this).parent().find('.slider_control img').attr("src", "images/bkgd/bkgd_accordion_exp_o.gif");
					$(this).parent().find('.slider').addClass('slider_on');						
				}, function() {
					$(this).parent().find('.slider_content').slideUp('fast', function() {
						$(this).css("border-bottom","none")
					});
					$(this).parent().find('.slider_control img').attr("src", "images/bkgd/bkgd_accordion_exp_n.gif");
					$(this).parent().find('.slider').removeClass('slider_on');
				});	
			}
			
				
		});		
	}
	setupSliders();	
	
	// if a slider has an id assigned as #slider_open this code slides the panel open
	/*
	if ($('#slider_open')) {
		$('#slider_open .slider_control img').attr("src", "images/btn_close.gif");
		$('#slider_open .slider_content').css("border-bottom","1px solid #bfc2c3").slideDown('300');
		$('#slider_open .slider').addClass('slider_on');
		$('#slider_open .slider').toggle(function() {
			$(this).parent().find('.slider_content').slideUp('fast', function() {
					$(this).css("border-bottom","none")
			});
			$(this).parent().find('.slider_control img').attr("src", "images/btn_expand.gif");
			$(this).parent().find('.slider').removeClass('slider_on');					 
		}, function() {
				$(this).parent().find('.slider_content').css("border-bottom","1px solid #bfc2c3").slideDown('300');
				$(this).parent().find('.slider_control img').attr("src", "images/btn_close.gif");
				$(this).parent().find('.slider').addClass('slider_on');
		})								 
	}
	*/

});
