$(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('../images/nav-background-hover.png')");
	 	},
	 	function() {
	 		$(this).removeClass("prettyHover");
	 		$(this).css("background-image", "url('../images/nav-background.png')");
	 	}
	 );
	 
	 // 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 gallery page.
	$('#slideshow').innerfade({ 
    	speed: 2500,
    	timeout: 5000,
    	runningclass: 'gallery'
  	});

	 // Add map.
	 var map = $("#map");
	 if (map)
	 {
	 	$.create("iframe", {"src" : "http://www.salonguineapig.co.uk/location/Angelina's Hair and Beauty/-2.250645/52.388155/7/350/300/", "width" : "355", "height" : "350"}).appendTo(map);
	 }
});
