$(document).ready(function(){

	//if ($.browser.msie && $.browser.version < 7) return;
	$('.back-forward .back').append('<span class="hover_0" />');		   	
	$('.hover_0').css({opacity : 0}).hover(function () {
		$(this).stop().fadeTo(250, 1);
	}, function() {
		$(this).stop().fadeTo(250, 0);
	});
		
	$('.back-forward .forward').append('<span class="hover_1" />');
	$('.hover_1').css({opacity : 0}).hover(function () {
		$(this).stop().fadeTo(250, 1);
	}, function() {
		$(this).stop().fadeTo(250, 0);
	});
	
	if(window.location.pathname.match(/product-catalogue/)) {
		$(".nav li, .footer-nav li").each(function(index){
			if($(this).children('a').html() == 'Product Catalogue') {
				$(this).addClass('current_page_item');
			}
		});	
	}	
	
    $('.nav a, .footer-nav a').hover(function(){
		if(!$(this).parent().is(".current_page_item, .current-menu-item")){
	   		$(this).animate({
	   			color: '#FFF' 
	   		}, 300 );
		}
	}, function(){ 
   		if(!$(this).parent().is(".current_page_item, .current-menu-item")){
	   		$(this).animate({
	   			color: '#7a8090'
	   		}, 300);
	   	}
	});
   
	$(document).keyup(function(e) {
		if(e.keyCode == 27) { document.location = $url + 'admin'; }
	});
   
	var $buoop = {} 
	$buoop.ol = window.onload; 
	window.onload = function(){ 
		if ($buoop.ol) $buoop.ol(); 
		var e = document.createElement("script"); 
		e.setAttribute("type", "text/javascript"); 
		e.setAttribute("src", "http://browser-update.org/update.js"); 
		document.body.appendChild(e); 
	} 
   
});
