

	
	
	// SLIDING FUNCTIONS

jQuery(function( $ ){
	
			
	/**
	 *  HIDE THE NAV UNTIL THE PAGE HAS FULLY LOADED
	 * 
	 */
	 
	 $("ul.navigation").show();
			

	/**
	 * NAVIGATION STUFF
	 * 
	 */		
			
	function getFile(str)
	{
		if("undefined"==typeof(str) )
				str=location.href;
			return (str.replace(/.+[\/]([^\/]+)$/,'$1'))
	}
	/* with no arguments you get back the file name of the page that is currently loaded on the browser */
	//alert( getFile() );
	 
	$("ul.navigation > li > a").css({ opacity: 0.5 });
 	
	if(getFile()=="http://www.banks-sheridan.co.uk/"){
		$("ul.navigation li.nav01").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
	if(getFile()=="about.php"){
		$("ul.navigation > li.nav02").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
		if(getFile()=="about.php#directors"){
			$("ul.navigation > li.nav02").addClass("active").children().css({ opacity: 1, borderWidth: "2px"});
			//$("ul.navigation > li  ul ").addClass("active").children().css({ marginTop: "-24px"});
		}
	if(getFile()=="services.php"){
		$("ul.navigation li.nav03").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
	if(getFile()=="resources.php"){
		$("ul.navigation li.nav04").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
	if(getFile()=="contact.php"){
		$("ul.navigation li.nav05").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
	if(getFile()=="gallery.php"){
		$("ul.navigation li.nav06").addClass("active").children().css({ opacity: 1, marginTop: "24px", borderWidth: "2px"});
	}
		

	$("ul.navigation > li > a").hover(
		function(){
			if($(this).parent().hasClass("active")){
				
			}else{
				$(this).animate({ opacity: 1, marginTop: "24px", borderWidth: "2px"}, 100 );
			}
		},
		function(){
			if($(this).parent().hasClass("active")){
			}else{
				$(this).animate({ opacity: 0.5, marginTop: "28px",  borderWidth: "0px"}, 100 );
				
				
				
			}
		}

	);
	
	
	
		$("#RedBand div a").hover(
		function(){
			if($(this).parent().hasClass("active")){
				
			}else{
				$(this).animate({ opacity: 1, paddingTop: "5px", borderWidth: "0px"}, 100 );
			}
		},
		function(){
			if($(this).parent().hasClass("active")){
			}else{
				$(this).animate({ opacity: 1, paddingTop: "0px",  borderWidth: "0px"}, 100 );
			}
		}

	);

	
		
});


