$(document).ready(function(){
	
	// external links
	/*$("a[@rel='external']").click(function() {
		return !window.open($(this).attr("href"));
	});
	*/
	$('.hide-with-js').hide(); // use this class to hide the message "please open this link in new window"
	
	// fade in messages
	$('.successMsg').hide();
	$('.successMsg').fadeIn(1000);
	$('.errorMsg div').hide();
	$('.errorMsg div').fadeIn(1000);
	$('.warningMsg').hide();
	$('.warningMsg').fadeIn(1000);
	
	// non-clickable links
	$(".return-false").click( function() {
		return false;
	});
	
	// JUMP MENU
	$("select.jump-menu").change(function(x){
		var url = $("option:selected", this).attr("title");
		if (url.length) {
			window.location.href = url;
		}
	});
		
	$("#not-logged a").focus(
		function() {
			$(".warningMsg",this).show();
		}
	);
	
	
	// Product Hovers
	$("#product-listing li").hover(
		function() {
			$(".product-tooptip", this).show();
		},
		function() {
			$(".product-tooptip", this).hide();
		}
	);
	$("#product-image").hover(
		function() {
			$("#oposite-detail-tooltip").show();
		},
		function() {
			$("#oposite-detail-tooltip").hide();
		}
	);
	
	// login first message
	$("#cat-prod-lisiting .warningMsg").hide();
	$("#cat-prod-lisiting #not-logged a").click(function(){
		$("#cat-prod-lisiting .warningMsg").hide();
		$('#cat-prod-lisiting .warningMsg').fadeIn(1000);
		return false;
	});
	
	//login custom program
	$("#content #log-in").hide();
	$("#content #proceed-custom  #not-logged a").click(function(){
		$("#content #log-in").hide();
		$('#content #log-in').fadeIn(1000);
		return false;
	});
	
	// disable right click
	$("body").noContext();
	
});
