// Lighting NewYork Customer Service 

$(function(){
	$("#cs1, #cs2, #cs3, #cs4, #cs5, #cs6").click(function(e){
		e.preventDefault();
	});
	
	//display the customer service tag based on the location selected
	if( cs == 2 ){
		$("#cs2").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#shipping").fadeIn(600);
	}
	else if( cs == 3 ){
		$("#cs3").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#guarantee").fadeIn(600);
	}
	else if( cs == 4 ){
		$("#cs4").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#policy").fadeIn(600);
	}
	else if( cs == 5 ){
		$("#cs5").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#security").fadeIn(600);
	}
	else if( cs == 6 ){
		$("#cs6").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#pricing").fadeIn(600);
	}
	else{
		$("#cs1").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#contact").fadeIn(600);	
	}
	
	//contact us tab clicked
	$("a#cs1").click(function(){
		$("#cs1").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs2, #cs3, #cs4, #cs5, #cs6").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#guarantee, #shipping, #policy, #security, #pricing").fadeOut(100,function(){
			$("#contact").fadeIn(600);																		  
		});
		
	});
	//shipping info tab clicked
	$("a#cs2").click(function(){
		$("#cs2").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs1, #cs3, #cs4, #cs5, #cs6").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#contact, #guarantee, #policy, #security, #pricing").fadeOut(100,function(){
			$("#shipping").fadeIn(600);																		 
		});
		
	});
	//guarantee tab clicked
	$("a#cs3").click(function(){
		$("#cs3").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs1, #cs2, #cs4, #cs5, #cs6").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#contact, #shipping, #policy, #security, #pricing").fadeOut(100,function(){
			$("#guarantee").fadeIn(600);																		
		});
		
	});
	//privacy and return policies tab clicked
	$("a#cs4").click(function(){
		$("#cs4").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs1, #cs2, #cs3, #cs5, #cs6").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#contact, #shipping, #guarantee, #security, #pricing").fadeOut(100,function(){
			$("#policy").fadeIn(600);																		   
		});
		
	});
	//security tab clicked
	$("a#cs5").click(function(){
		$("#cs5").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs1, #cs2, #cs3, #cs4, #cs6").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#contact, #shipping, #guarantee, #policy, #pricing").fadeOut(100,function(){
			$("#security").fadeIn(600);																		 
		});
		
	});
	//pricing disclaimer tab clicked
	$("a#cs6").click(function(){
		$("#cs6").css({
					  'background-color' : 'white',
					  'border-bottom-color' : 'white',
					  'background-image' : 'url(/grfx/cs/cs_tab_selected.png)'
					  });
		$("#cs1, #cs2, #cs3, #cs4, #cs5").css({
										'background-color' : 'white',
										'border-bottom-color' : '#ccc',
										'background-image' : 'url(/grfx/cs/cs_tab_gradient.png)'
										});
		$("#contact, #shipping, #guarantee, #policy, #security").fadeOut(100,function(){
			$("#pricing").fadeIn(600);																		  
		});
		
	});
});
