	function getStyle(el,styleProp) {
			var x = document.getElementById(el);
			if (x.currentStyle)
				var y = x.currentStyle[styleProp];
			else if (window.getComputedStyle)
				var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
			return y;
		}
		function setMenuOffset() {
			var header = document.getElementById('nav');
			var pmenu  = document.getElementById('product_menu');
			if (!header) return;
			var currentOffset = document.documentElement.scrollTop || document.body.scrollTop; // body for Safari
			var startPos = 150;
			var desiredOffset = startPos - currentOffset;

			if (currentOffset > 150) {
				if (desiredOffset != parseInt(header.style.top)) 
					header.style.top = currentOffset + 'px';
			} else {
					header.style.top = '150px';				
			}

			if (currentOffset > 150) {
					pmenu.style.top  = (currentOffset - 122) + 'px';
			} else {
					pmenu.style.top  = '30px';			
			}

		}

		function setupMenus() {
			//  Convert menu to absolute positioning
			containerPos = $("#title").position();
			$("#nav").css({ position: "absolute" });
			$("#nav").css({ top: containerPos.top + 150, left: containerPos.left});

			mainContainerPos = $("#yui-main").position();
			$("#product_menu").css({ position: "absolute" });
			$("#product_menu").css({ top: 18, left: 0});

//			window.onscroll = document.documentElement.onscroll = setMenuOffset;
			window.onresize = setupMenus;
		}

	// initialise plugins
	jQuery(function(){
//		jQuery('ul#categories').show();
		jQuery('ul#categories').superfish();
		setupMenus();
		setMenuOffset();
	
		$('#categories').show();
	
// Set the message for the alert box
am = "All images are copyright (c) Equis Menswear Ltd";

// do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
	
	
$('.product_image_sm').click(function() {
	return false;
});

/*
	$('#bt_next').click(function() {
	nextSlug = $(this).attr('href').substr(1,100);
	$('#loaded_product').load('/load_product/' + nextSlug);
	});
*/

//  Tooltips for products
//	if($(".tip").length > 0) $('.tip').tooltip();

});
