	$(document).ready(function(){
			
// Navigation
		$('#nav a.menu')
			.css( {backgroundPosition: "0 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(0 -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(0 0)"}, 
					{duration:300})
				})
		$('#nav a.menu.selected')
			.css( {backgroundPosition: "0 -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(0 -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(0 -25px)"}, 
					{duration:300})
				})				
		$('#nav a.profile')
			.css( {backgroundPosition: "-63px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-63px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-63px 0)"}, 
					{duration:300})
				})
		$('#nav a.profile.selected')
			.css( {backgroundPosition: "-63px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-63px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-63px -25px)"}, 
					{duration:300})
				})						
		$('#nav a.press')
			.css( {backgroundPosition: "-144px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-144px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-144px 0)"}, 
					{duration:300})
				})
		$('#nav a.press.selected')
			.css( {backgroundPosition: "-144px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-144px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-144px -25px)"}, 
					{duration:300})
				})				
		$('#nav a.book')
			.css( {backgroundPosition: "-216px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-216px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-216px 0)"}, 
					{duration:300})
				})
		$('#nav a.book.selected')
			.css( {backgroundPosition: "-216px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-216px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-216px -25px)"}, 
					{duration:300})
				})				
		$('#nav a.boutique')
			.css( {backgroundPosition: "-342px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-342px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-342px 0)"}, 
					{duration:300})
				})
		$('#nav a.boutique.selected')
			.css( {backgroundPosition: "-342px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-342px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-342px -25px)"}, 
					{duration:300})
				})		
		$('#nav a.pro')
			.css( {backgroundPosition: "-409px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-409px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-409px 0)"}, 
					{duration:300})
				})					
		$('#nav a.pro.selected')
			.css( {backgroundPosition: "-409px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-409px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-409px -25px)"}, 
					{duration:300})
				})						
		$('#nav a.blog')
			.css( {backgroundPosition: "-467px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-467px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-467px 0)"}, 
					{duration:300})
				})					
		$('#nav a.blog.selected')
			.css( {backgroundPosition: "-467px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-467px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-467px -25px)"}, 
					{duration:300})
				})								
		$('#nav a.contact')
			.css( {backgroundPosition: "-532px 0"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-532px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-532px 0)"}, 
					{duration:300})
				})					
		$('#nav a.contact.selected')
			.css( {backgroundPosition: "-532px -25px"} )
			.mouseover(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-532px -25px)"}, 
					{duration:300})
				})
			.mouseout(function(){
				$(this).stop().animate(
					{backgroundPosition:"(-532px -25px)"}, 
					{duration:300})
				})													
				
// Scroll
		  function filterPath(string) {
		  return string
		 .replace(/^\//,'')
		 .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
		 .replace(/\/$/,'');
		  }
		  var locationPath = filterPath(location.pathname);
		  $('a[href*=#]').each(function() {
		 var thisPath = filterPath(this.pathname) || locationPath;
		 if (  locationPath == thisPath
		 && (location.hostname == this.hostname || !this.hostname)
		 && this.hash.replace(/#/,'') ) {
		   var $target = $(this.hash), target = this.hash;
		   if (target) {
		  var targetOffset = $target.offset().top;
		  $(this).click(function(event) {
		    event.preventDefault();
		    $('html, body').animate({scrollTop: targetOffset}, 400, function() {
		   location.hash = target;
		    });
		  });
		   }
		 }
		  });
		  

   		 
}); 
	    


	
	
	


