var x=$(document);
x.ready(inicializarEventosJQuery);

function blockScreen(){
	$.blockUI({ message:'<br /><img src="busy.gif" /><span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:16px;font-weight:bolder;margin-left:10px;">Cargando contenidos...</span><br /><span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;">Si el proceso demora demasiado presione F5.</span><br /><br />'}); 
}

function unblockScreen(){
	$.unblockUI();
}

function inicializarEventosJQuery(){


	$(".fotoMenuOption img").hide();
	$(".toolTip").hide();
	$(".fotoMenuOption").mouseenter(function(){
											$("img",this).fadeIn();
											$(".toolTip .toolTipLabel").html($(this).attr("lbl"));
											$(".toolTip").fadeIn("fast");
											}
									);
	$(".fotoMenuOption").click(function(){
										window.location = $($(this).attr("class").replace("fotoMenuOption link-","#")).attr("href");							
											/*$.get($($(this).attr("class").replace("fotoMenuOption link-","#")).attr("href"), function(data){
											 	 $(".toolTip").hide();
    											 $("#myBodyContents").fadeOut("fast");
												 $("#myBodyContents").html($("#myBodyContents",data).html());
												 $("#myBodyContents").fadeIn();

											});*/

										}
									);
  	$(".fotoMenuOption").mouseleave(function(){
											$("img",this).hide();
											$(".toolTip").hide();
											 }
									);
	
	$(".menuOption").mouseenter(function(){
										var id  = $(this).attr("id");
										$(".link-"+id+" img").show();
										  }
									);
	
	$(".menuOption").mouseleave(function(){
										var id  = $(this).attr("id");
										$(".link-"+id+" img").hide();
										  }
									);
	$("#myBodyContentsArea").mousemove(
									  function(e){
										  var x = e.clientX;
										  var y = e.clientY; 
										  $(".toolTip").css({
												top: (e.pageY + 15) + "px",
												left: (e.pageX+ 15) + "px"
											});

										  }
									  );
}


