| Server IP : 89.248.107.232 / Your IP : 216.73.217.70 Web Server : Apache System : Linux host2.kasilh.com 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64 User : seg ( 10005) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/seg-sa.es/peyco.es/wp-content/themes/StoreFront/js/ |
Upload File : |
jQuery(document).ready(function() {
$( ".slideportada.slide1" ).css( "height", window.innerHeight);
//alert(screen.height);
//alert(window.innerHeight);
});
var dominioPagina = "/mantenimientos21"; //IMPORTANTE
window.onload = capturar_url;
function capturar_url() {
jQuery('#url').val(document.URL);
}
function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
function validar_contacto(form){
var mensaje = "";
var swi = 0;
if(form.nombre.value.length === 0){
swi = 1; mensaje+="Introduce por favor tu nombre\n";
}
if (form.email.value.indexOf('@', 0) === -1 || form.email.value.indexOf('.', 0) === -1) {
swi = 1; mensaje += "Introduce por favor un email valido\n";
}
if (form.telefono.value.length === 0) {
swi = 1;
mensaje += "Introduce por favor tu telefono\n";
}
if (!form.politica.checked) {
swi = 1; mensaje += "Debes aceptar la Politica de privacidad\n";
}
if(swi===1) alert(mensaje);
else {
alert("Formulario enviado con éxito");
form.submit();
}
}
function openTab(evt, elemento) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(elemento).style.display = "block";
evt.currentTarget.className += " active";
}
$(".efecto-hover").hover(function(){
$(this).addClass("activo");
}, function(){
$(this).removeClass("activo");
});
$(function(){
$('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
&& location.hostname == this.hostname) {
var $target = $(this.hash);
$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
if ($target.length) {
var targetOffset = $target.offset().top;
$('html,body').animate({scrollTop: targetOffset}, 1000);
return false;
}
}
});
});
$(document).ready(function() {
/* Every time the window is scrolled ... */
$(window).scroll( function(){
/* Check the location of each desired element */
$('.fondo-a-subir').each( function(i){
/* If the object is completely visible in the window, fade it it */
if( $(window).scrollTop() > 850 ){
$(this).addClass("subir");
} else {
$(this).removeClass("subir");
}
});
$('.form-a-subir').each( function(i){
/* If the object is completely visible in the window, fade it it */
if( $(window).scrollTop() > 850 ){
$(this).addClass("subir");
} else {
$(this).removeClass("subir");
}
});
});
});
var slideIndex = 1;
showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
if (n > slides.length) {slideIndex = 1}
if (n < 1) {slideIndex = slides.length}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
}