  


/* StepCarousel */
/* start */

stepcarousel.setup({
			galleryid: 'news-sections', //id of carousel DIV
			beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
			panelclass: 'panel', //class of panel DIVs each holding content
			autostep: {enable:true, moveby:1, pause:8000},
			panelbehavior: {speed:500, wraparound:true, persist:true},
			defaultbuttons: {enable: false, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
			statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
			contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
		})

/* end */	


	  
	  
	
						
			
			
		
		
		
		
		
		
/* External Links */

function externalLinks() {  
 if (!document.getElementsByTagName) return;  
 var anchors = document.getElementsByTagName("a");  
 for (var i=0; i<anchors.length; i++) {  
   var anchor = anchors[i];  
   if (anchor.getAttribute("href") &&  
       anchor.getAttribute("rel") == "nofollow external")  
     anchor.target = "_blank";  
 }  
 
}  
window.onload = externalLinks;

/* end */
	

	

$(document).ready(function() {
	
	
	
	$('ul#nav_categories li').toggle(function() {
	
	
	  if($(this).children().is(':hidden') == true) {
			
			$(this).children().slideDown('normal');
		}
	  
	}, function() {
	
	 $(this).find("ul").slideUp('normal');
	  
	});


	
	$('ul#nav_categories li ul').hide();
	 
	$("ul#nav_categories li a#england").next('ul').css('display', 'block');
	$("ul#nav_categories li ul li a#first").next('ul').css('display', 'block');
	
	
	$('ul#nav_categories li ul li a.clsChildLink').click(function() {
	
		var currentvalue = $(this).attr("href");
		var current_array=currentvalue.split("/");
		
		var linkvalue = $(this).text();
		$('.grid_16 h6').html(linkvalue);
		$('#divShopList').html("<li><p>Locating shops...</p></li>");
		$('#divShopList').load("/site-shops/"+current_array[2]);
	});
	
	
	// Cream Page Accordions //
	
	$('.creamUse').hide();
	$('.creamIngredients').hide();
	
	
	$('h4.creamUseTitle').toggle(function() {
	
	  if($('.creamUse').is(':hidden') == true) {
			
			$('.creamUse').slideDown('normal');
		}
	  
		}, function() {
	
		$('.creamUse').slideUp('normal');
	  
	});
	
	$('h4.creamIngredientsTitle').toggle(function() {
	
	  if($('.creamIngredients').is(':hidden') == true) {
			
			$('.creamIngredients').slideDown('normal');
		}
	  
		}, function() {
	
		$('.creamIngredients').slideUp('normal');
	  
	});
	
	
});



	  

	

