// JavaScript Document
/*NMS - disable Right Click  */
var message="COPYING NOT PERMITTED. \n\nAll photographs contained on this web site and photo galleries within site are protected by international copyright laws.\nNone of the images you see here are in the public domain and remain exclusively the copyright of Photographer noted and or Lembeh Resort.\nNo image is to be copied, duplicated, modified or redistributed in whole or part without prior writer permission.\n\n© Lembeh Resort / Critters@Lembeh";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}


// Temp Disable
//document.oncontextmenu=new Function("alert(message);return false")




// TOOL TIPS

this.toolTipPreview = function(){	
		xOffset = -110;
		yOffset = -4;
		this.timer;
		
		$("a.toolTip").hover(function(e){
			$("#toolTip").remove();
			this.t = this.title;
			this.title = "";	
			var c = (this.t != "") ? "" + this.t : "";
			$("body").append("<p id='toolTip'><span style='color:#d2d2d2'>"+ c +"</span></p>");								 
			$("#toolTip")
				.css("top",(e.pageY - yOffset) + "px")
				.css("left",(e.pageX + xOffset) + "px")
				.fadeIn("fast");						
		},
		function(){
			this.title = this.t;
			//alert ("mouseOut");	
			//$("#toolTip").remove();
			
			function removeTip() { 
			   this.title = this.t;
			  //$("#toolTip").fadeOut("slow");
			  $("#toolTip").remove();
			}
			var myTimeout = window.setTimeout(removeTip, 4000, true);    

		});	
		$("a.toolTip").mousemove(function(e){
			xOffset = -($("#toolTip").width())/2;
		
			$("#toolTip")
				.css("top",(e.pageY - yOffset) + "px")
				.css("left",(e.pageX + xOffset) + "px");
		});	
		
};	
		


$(document).ready(function() {
	toolTipPreview();
});


