$(document).ready(function(){

	 // When an entry is hovered over, show the link as hovered.
	 $(".sf-menu").children("li").hover(
	 	function() {
	 		$(this).addClass("prettyHover");
	 		$(this).css("background-image", "url('/salonalchemyapp/hotlocks/content/hotlocks/images/nav-background-hover.png.action')");
	 	},
	 	function() {
	 		$(this).removeClass("prettyHover");
	 		$(this).css("background-image", "url('/salonalchemyapp/hotlocks/content/hotlocks/images/nav-background.png.action')");
	 	}
	 );
	 
	 // When an entry is clicked on, activate the link.
	 $(".sf-menu").children("li").click(
	 	function() {
	 		window.location = $(this).children("a").attr("href");
	 	}
	 );
	 
	 // Open external links in a new window.
	 $("a").filter(".link").click(function(){
	   return !window.open(this.href);
	 });
	 
	// Cycle slideshow images.
	$('#slideshow').innerfade({ 
    	speed: 2500,
    	timeout: 5000,
    	runningclass: 'gallery'
  	});

    // Use Facebox for gallery images.
	jQuery(document).ready(function($) {
	  $('a[rel*=facebox]').facebox(); 
	});

	 // Add map.
	 var map = $("#map");
	 if (map)
	 {
	 	$.create("iframe", {"src" : "http://www.salonguineapig.co.uk/location/Hot Locks Hair Extensions/-2.656088/53.556054/7/290/240/", "width" : "295", "height" : "290"}).appendTo(map);
	 }
});
