$(window).load(function() {
	$('#slider').nivoSlider();
	});
<!-- Google Maps Code -->			
			 

<!-- END Google Maps Code -->
$(document).ready(function(){			   
		jQuery('#mycarousel').jcarousel({
        easing: 'BounceEaseOut',
        animation: 1000
    });
	
		 var options1 = {
        }
        var options2 = {
            caption:    false,
            navigation: 'permanent',
            direction:  'left'
        }
        var options3 = {
            caption:    'permanent',
            opacity:    1
        }
    
        $('#ppy1').popeye(options1);
        $('#ppy2').popeye(options2);
        $('#ppy3').popeye(options3);
				$("a[rel^='prettyPhoto']").prettyPhoto();
				//{ changepicturecallback: function() {
				 //$(".pp_inline script").each(function() { eval($(this).text()); }); } }
				$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'dark_rounded',slideshow:3000, autoplay_slideshow: true});
				$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',theme:'dark_rounded',slideshow:10000, hideflash: true});
		
				$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
					custom_markup: '<div id="map_canvas" style="width:500px; height:400px"></div>',
					changepicturecallback: function(){ iniciarmapeo(); }
				});

				$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
					custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
					changepicturecallback: function(){ _bsap.exec(); }
				});
			
});
jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};
function nueAjax() {
    try{
        req = new XMLHttpRequest();
    }catch(err1){
        try{
            req = new ActiveXObject("Msxml2.XMLHTTP");
        }catch(err2){
            try{
                req = new ActiveXObject("Microsoft.XMLHTTP");
            }catch(err3){
                req = false;
            }
        }
    }
    return req;
}
function cargandocuerpo(thc,idth)
{ var httpx = nueAjax();
     var capa=document.getElementById("bloquecentral");
     httpx.open("POST","mostrarmate.php",true);
     httpx.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	 httpx.send("th="+thc+"&idth="+idth);
    httpx.onreadystatechange=function(){ 
        if (httpx.readyState==1){
			  capa.innerHTML="<center><img src='./web/ajaxload_1.gif'/></center>";      
        }
        if (httpx.readyState==4){    
          	 respuesta=httpx.responseText;
            capa.innerHTML=respuesta;
        }	
		$('#slider').nivoSlider();
		 var options1 = {
        }
        var options2 = {
            caption:    false,
            navigation: 'permanent',
            direction:  'left'
        }
        var options3 = {
            caption:    'permanent',
            opacity:    1
        }
    
        $('#ppy1').popeye(options1);
        $('#ppy2').popeye(options2);
        $('#ppy3').popeye(options3);
    }
}
function envioemail()
{ var httpe = nueAjax();
 var email=document.formemail.email.value;
  var nombres=document.formemail.nombre.value;
   var asunto=document.formemail.asunto.value;
    var mensaje=document.formemail.mensaje.value;
	var capt=document.formemail.tmptxt.value;
	if(email=="" || nombres=="" || asunto=="" || mensaje=="" || capt==""){
		alert("No dejar campos en Blanco");return false;
		}
     var capap=document.getElementById("respuesta");
     httpe.open("POST","enviaemail.php",true);
     httpe.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	 httpe.send("email="+email+"&nombres="+nombres+"&asunto="+asunto+"&mensaje="+mensaje+"&tmptxt="+capt);
    httpe.onreadystatechange=function(){ 
        if (httpe.readyState==1){
			  capap.innerHTML="<center><img src='./web/ajaxload_1.gif'/></center>";      
        }
        if (httpe.readyState==4){    
          	 respuesta=httpe.responseText;
            capap.innerHTML=respuesta;
			limpiaremail();
        }	
    }
}
function limpiaremail(){
	 document.formemail.email.value="";
     document.formemail.nombre.value="";
    document.formemail.asunto.value="";
    document.formemail.mensaje.value="";
	document.formemail.tmptxt.value="";
	document.formemail.nombre.focus();
	}

/*
function cargandocuerpoe(thc)
{ var httpz = nueAjax();
     var capax=document.getElementById("bloquecuerpo");
     httpz.open("POST","mostrarmateenglish.php",true);
     httpz.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	 httpz.send("th="+thc);
    httpz.onreadystatechange=function(){ 
        if (httpz.readyState==1){
            capax.innerHTML="<center><img src='loading.gif'/></center>";
        }
        if (httpz.readyState==4){    
            respuesta=httpz.responseText;
            capax.innerHTML=respuesta;
        }	
    }
}
*/
function cargandoimg(thx,idhx)
{ 	
var http = nueAjax();
     var cap=document.getElementById("llenarimg");
     http.open("POST","mostrarimagenes.php",true);
     http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	 http.send("th="+thx+"&idth="+idhx);
    http.onreadystatechange=function(){ 
        if (http.readyState==1){
            cap.innerHTML="<center><img src='./web/ajaxload_1.gif'/></center>";
        }
        if (http.readyState==4){    
            respuesta=http.responseText;
            cap.innerHTML=respuesta;
        }
		$('#slider').nivoSlider();
	$(document).ready(function(){
		var options1 = {
        }
        var options2 = {
            caption:    false,
            navigation: 'permanent',
            direction:  'left'
        }
        var options3 = {
            caption:    'permanent',
            opacity:    1
        }
    
        $('#ppy1').popeye(options1);
        $('#ppy2').popeye(options2);
        $('#ppy3').popeye(options3);
				$("a[rel^='prettyPhoto']").prettyPhoto();	
				$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'dark_rounded',slideshow:3000, autoplay_slideshow: true});
				$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',theme:'dark_rounded',slideshow:10000, hideflash: true});
				jQuery('#mycarousel').jcarousel({easing: 'BounceEaseOut',animation: 1000});
			});
		
    }
}
/*
function cargandoimge(thx)
{ 	
var httpp = nueAjax();
     var capx=document.getElementById("llenarimg");
     httpp.open("POST","mostrarimagenesenglish.php",true);
     httpp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	 httpp.send("th="+thx);
    httpp.onreadystatechange=function(){ 
        if (httpp.readyState==1){
            capx.innerHTML="<center><img src='loading.gif'/></center>";
        }
        if (httpp.readyState==4){    
            respuesta=httpp.responseText;
            capx.innerHTML=respuesta;
        }
	$(document).ready(function(){
				$("a[rel^='prettyPhoto']").prettyPhoto();	
				$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'dark_rounded',slideshow:3000, autoplay_slideshow: true});
				$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',theme:'dark_rounded',slideshow:10000, hideflash: true});
				jQuery('#mycarousel').jcarousel({easing: 'BounceEaseOut',animation: 1000});
			});
		
    }
}
	*/
//-->
function cargar_musica(){
	$("#jquery_jplayer_1").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
				m4a: "http://www.chiclayo-hotelcentral.com/archivos/marinera.m4a",
				oga: "../archivos/marinera/marinera.ogg"
			}).jPlayer("play");
		},
		ended: function (event) {
			$(this).jPlayer("stop");
		},
		swfPath: "js",
		supplied: "m4a, oga"
	});
	}
function detener_musica(){
	$("#jquery_jplayer_1").jPlayer({
		ready: function () {
			$(this).jPlayer("setMedia", {
				m4a: "http://www.chiclayo-hotelcentral.com/archivos/marinera.m4a",
				oga: "../archivos/marinera/marinera.ogg"
			}).jPlayer("stop");
		},
		ended: function (event) {
			$(this).jPlayer("stop");
		},
		swfPath: "js",
		supplied: "m4a, oga"
	});
	}
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}   
