var browserName=navigator.appName; 

 if (browserName=="Microsoft Internet Explorer")
 {}
  else {

	 
var Navigation = function() {
	var me = this;
	var args = arguments;
	
	var self = {
		c: {
			navItems: '#navigation .home, #wh .webhero, #navigation .about, #navigation .stair_covers, #navigation .stair_nosings, #navigation .floor_sheets, #navigation .installation, #navigation .technical,  #navigation .contact',
			
			navSpeed: ($.browser.safari ? 600 : 350),
			
			snOpeningSpeed: ($.browser.safari ? 400 : 250),
			snOpeningTimeout: 150,
			
			snClosingSpeed: function() {
				if (self.subnavHovered()) return 123450; return 150; 			
			},
			snClosingTimeout: 700 
		},
		
		init: function() {
			$('.subnav', this.c.navItems).css({
					'opacity': 0
				});
			
			this.initHoverFades();
			/*this.initSubmenus();*/
		},
		
		subnavHovered: function() {
			var hovered = false;
			$(self.c.navItems).each(function() {
				if (this.hovered /* && $('.subnav', this).length > 0*/) hovered = true;
			});
			return hovered;
		},
		
		initHoverFades: function() {
			$('#navigation .links a, #wh .links a').append('<span class="hover"></span>');
			
			$('#navigation .hover, #wh .hover').css('opacity', 0);
			
			/*$('#navigation .home, #navigation .contact,#logotype').hover(function() {*/
			$('#navigation a, #wh a').hover(function() {

				self.fadeNavIn.apply(this);
			}, function() {
				var el = this;
				
				setTimeout(function() {
					if (!el.open) self.fadeNavOut.apply(el);
				}, 10);
			});
		},
		
		fadeNavIn: function() {
			$('.hover', this).stop().animate({
				'opacity': 1
			}, self.c.navSpeed);
		},


		fadeNavOut: function() {
			$('.hover', this).stop().animate({
				'opacity': 0
			}, self.c.navSpeed);
		
		}
		
	};
	
	self.init.apply(self);
	return self;
};

function d(s) {
//	$('body').append	('<p>' + s + '</p>');
}

$(function(){
	new Navigation();
});

}