jQuery(document).ready( function($) {

	$(".topLinks li a").mouseover( function() {
		//IE
		if(navigator.appVersion.indexOf('MSIE') > 0) {
			$('span', $(this)).css('background-position-y', '-21px');
		} //End IE
		else {
			var orig = $('span', $(this)).css('background-position');
			var position = orig.replace(" 0px", " -21px");
			$('span', $(this)).css('background-position', position);
		}
	});
	$(".topLinks li a").mouseout( function() {
		//IE
		if(navigator.appVersion.indexOf('MSIE') > 0) {
			$('span', $(this)).css('background-position-y', '0px');
		}//End IE
		else {
			var orig = $('span', $(this)).css('background-position');
			var position = orig.replace("-21px", "0px");
			$('span', $(this)).css('background-position', position);
		}
	});

	$('.sub-menu').hover(
		function () {
			$("a:first", $(this).parent()).addClass("hovered");
		},
		function() {
			$("a:first", $(this).parent()).removeClass("hovered");
		}
	);
	
	$('div.link').click(function() {
		$(window).attr('location', $(this).attr('href'));
	});
	$('div.link').hover(
		function() {
			$(this).addClass('hover');
		},
		function() {
			$(this).removeClass('hover');
		}
	);

	
	$('#slider').mouseenter(function() {
                $('a.prev').addClass('leftactive');
                $('a.next').addClass('rightactive');
        });
        $('#slider').mouseleave(function() {
                $('a.prev').removeClass('leftactive');
                $('a.next').removeClass('rightactive');
        });


});

