// JavaScript Document

//jQuery functions

$(function () {
			 
	$('#emoNav a')
		.css( {backgroundPosition: "0 0"} ).mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -20px)"}, {duration:250})
		}).mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:250})
	})
		
	$('#footer-navigation a')
		.css( {backgroundPosition: "0 0"} ).mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px -12px)"}, {duration:250})
		}).mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:250})
	})
	
	$('#bristol-show a').click(function () {
		$(this).addClass("selected");
		$("#highworth-show a").addClass("not-selected").removeClass("selected");
		$("#map-holder-bristol").fadeIn(1000);
		$("#map-holder-highworth").fadeOut(1000);
									   });
	
	$('#highworth-show a').click(function () {
		
		$(this).addClass("selected");
		$("#bristol-show a").addClass("not-selected").removeClass("selected");
		$("#map-holder-bristol").fadeOut(1000);
		$("#map-holder-highworth").fadeIn(1000);
									   });
	  
	   $('a.scroller-link').mouseover(function() {
				$(".scroller-bar").css( {backgroundPosition: "0px -52px"}).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200});
				$('.scroller-title').stop().animate({color: 'emoorange'},{duration:200});
											   
											   });
	   
	    $('a.scroller-link').mouseout(function() {
				$(".scroller-bar").css( {backgroundPosition: "0 0"}).stop().animate({backgroundPosition:"(0px -52px)"}, {duration:200});
				$('.scroller-title').stop().animate({color: 'emogrey'},{duration:200});
											   
											   });
			 
});