this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 40;
		yOffset = -25;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});		
	
};

var z=0;
function fade_prom(z){
	if(typeof(z)=="undefined"){
		var z=0;
	}
	if(typeof(arProm[z])=="undefined"){
		var z=0;
	}
// 	$("#promotions").html($("#"+arProm[z]));
	$("#"+arProm[z]).css("zIndex", "10");
	$("#"+arProm[z]).fadeTo("normal",1, function(){
		setTimeout(function(){
			$("#"+arProm[z]).fadeTo("normal",0, function(){
				$("#"+arProm[z]).css("zIndex", "1");
				z++;
				fade_prom(z);
			});
		}, 3000);
	});
};




$(document).ready(function () {
tooltip();
$("#prods .prod:nth-child(3n)").addClass("remove");




    $("#det-data-nav li a").click(function() {
        var curList = $("#det-data-nav li a.current").attr("rel");
        var curListHeight = $("#det-data-rotate").height();
        $("#det-data-rotate").height(curListHeight);
        $("#det-data-nav li a").removeClass("current");
        $(this).addClass("current");
        var listID = $(this).attr("rel");
        if (listID != curList) {
            $("#"+curList).fadeOut(200, function() {
                $("#"+listID).fadeIn();
                var newHeight = $("#"+listID).height();
                $("#det-data-rotate").animate({
                    height: newHeight
                });
            });
        }        
        return false;
    });	
	
});
