		//easing equation, borrowed from jQuery easing plugin
		//http://gsgd.co.uk/sandbox/jquery/easing/
		$.easing.easeOutQuart = function (x, t, b, c, d) {
			return -c * ((t=t/d-1)*t*t*t - 1) + b;
		};

function navPanel()
{
    var theId = this.pathname;
    var i = theId.lastIndexOf("/");
    if (i && i > 0)
    {
      theId = theId.substr(i);
    }
    theId = theId.replace("/","").replace(".html","").toUpperCase();
    self.clearTimeout(self.pti);
    self.pti = self.setTimeout( function() {
    $(".topNavPanel").hide();
    $("#topNav_" + theId).fadeIn(300);
    }, 100);
}

$(document).ready( function() {
  $(".nav-clothing").mouseover( navPanel );
  $(".nav-clothing_select").mouseover( navPanel );

  $(".topNavPanel").width($("#topNavV2").width());
  $(".layouttable").mouseover( function() { self.clearTimeout(self.pti); $(".topNavPanel").hide() } );

			$('#crossSells').serialScroll({
				items:'li',
				prev:'#crossSellContainer a.prev',
				next:'#crossSellContainer a.next',
				axis:'x',
				// offset:-330,
				start:0,
				duration:1200,
				force:false,
				stop:true,
				lock:false,
				cycle:false, //don't pull back once you reach the end
				easing:'easeOutQuart', //use this easing equation for a funny effect
				jump: false
			});

			$('#moreImages').serialScroll({
				items:'span',
				prev:'#moreImageContainer a.up',
				next:'#moreImageContainer a.down',
				axis:'y',
				//offset:-250,
				start:0,
				duration:1200,
				force:false,
				stop:true,
				lock:false,
				cycle:false, //don't pull back once you reach the end
				easing:'easeOutQuart', //use this easing equation for a funny effect
				jump: true
			});

			$(".navbar")
			.superfish({
				animation : { opacity:"show",height:"show"}
			});
			
			$("#topNavV2").find("a").click( function() { return false } ).css("cursor", "default");
			$(".topNavPanel a.m").click( function() { return false } ).css("cursor", "default");
			$("#navbar a.m").click( function() { return false } ).css("cursor", "default");

  }
);

