shell bypass 403
$(document).ready(function() {
$(document).on('click', '.mfp-arrow.mfp-arrow-right.mfp-prevent-close', function() {
this.click();
});
// Quitamos duplicamos del select del filtro provincia
$("#InmuebleIdProvincia > option").each(function() {
if(this.text == '') {
this.remove();
}
if(this.text == 'Málaga' || this.text == 'Murcia' || this.text == 'Alicante') {
this.remove();
}
// Colocamos Cantabria en primer lugar
if(this.text == 'Cantabria') {
$("#InmuebleIdProvincia option:first").after(this);
}
});
/*var options = $('#InmuebleIdProvincia option' );
$( options[ 1 ] ).insertAfter( $( options[ 0 ] ) );
$( options[ 2 ] ).insertAfter( $( options[ 3 ] ) );*/
// Quitamos duplicamos del select del filtro localidad
$("#InmuebleIdLocalidad > option").each(function() {
if(this.text == '') {
this.remove();
}
// Colocamos Santander en primer lugar
if(this.text == 'Santander') {
$("#InmuebleIdLocalidad option:first").after(new Option("Santander", this.value));
}
});
$('.autoplay').slick({
slidesToShow: 5,
slidesToScroll: 5,
autoplay: false,
dots:true,
arrows: false,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: true
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
]
});
// Poner en activo las TABS
$( "#top-searcher-gestion button" ).click(function() {
$( "#top-searcher-gestion button").removeClass('active');
$(this).addClass('active');
});
$( ".content-tabs-properties-list button" ).click(function() {
$( ".content-tabs-properties-list button").removeClass('active');
$(this).addClass('active');
});
$("#btn-mobile").click(function(e){
$("#menu").toggleClass('d-none').animate( { "opacity": "show", top:"-14"} , 150 );
});
// Tabs Home
$("#tabs-home li button").click(function(e){
idTab = $(this).data('tab');
$('.content-properties').addClass('d-none');
$(".content-properties[data-tab='" + idTab +"']").removeClass('d-none');
});
// Slider Ficha
$('.slider-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
fade: true,
asNavFor: '.slider-nav'
});
$('.slider-nav').slick({
variableWidth: true,
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: '.slider-for',
dots: true,
focusOnSelect: true,
arrows: false,
});
$('a[data-slide]').click(function(e) {
e.preventDefault();
var slideno = $(this).data('slide');
$('.slider-nav').slick('slickGoTo', slideno - 1);
});
// Poner todos los checbox disabled si no tienen inmuebles
$('input[type="checkbox"].disabledCheck').each(function() {
$(this).prop('disabled', true);
});
// Pop con imáganes que pasan
$('.test-popup-link').magnificPopup({
type: 'image',
mainClass: 'mfp-with-zoom', // this class is for CSS animation below
gallery: {
enabled: true, // set to true to enable gallery
preload: [0,2], // read about this option in next Lazy-loading section
navigateByImgClick: true,
arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', // markup of an arrow button
tPrev: 'Previous (Left arrow key)', // title for left button
tNext: 'Next (Right arrow key)', // title for right button
tCounter: '<span class="mfp-counter">%curr% of %total%</span>' // markup of counter
},
zoom: {
enabled: true, // By default it's false, so don't forget to enable it
duration: 300, // duration of the effect, in milliseconds
easing: 'ease-in-out', // CSS transition easing function
// The "opener" function should return the element from which popup will be zoomed in
// and to which popup will be scaled down
// By defailt it looks for an image tag:
opener: function(openerElement) {
// openerElement is the element on which popup was initialized, in this case its <a> tag
// you don't need to add "opener" option if this code matches your needs, it's defailt one.
return openerElement.is('img') ? openerElement : openerElement.find('img');
}
}
// other options
});
// Convertir a SVG las imágenes con clase SVG
$('img.svg').each(function() {
var $img = jQuery(this);
var imgURL = $img.attr('src');
var attributes = $img.prop("attributes");
$.get(imgURL, function(data) {
// Get the SVG tag, ignore the rest
var $svg = jQuery(data).find('svg');
// Remove any invalid XML tags
$svg = $svg.removeAttr('xmlns:a');
// Loop through IMG attributes and apply on SVG
$.each(attributes, function() {
$svg.attr(this.name, this.value);
});
// Replace IMG with SVG
$img.replaceWith($svg);
}, 'xml');
});
//$("#filtros select").select2();
//Mailto
/* $('a[href^=mailto]').each(function() {
var email = '';
var emailCode = $(this).attr('href').replace('mailto:', '');
var valor = emailCode.substr(0, 1);
var mailto = emailCode.substr(1, emailCode.length);
//Evitamos los caracteres para abrir y cerrar etiquetas
mailto = replaceAll('«', '<', mailto);
mailto = replaceAll('»', '>', mailto);
for (var i = 0; i <= mailto.length - 1; i++) {
var caracter = parseInt(mailto.substr(i, 1).charCodeAt(0)) - valor;
email += String.fromCharCode(caracter);
}
$(this).html($(this).html().replace(emailCode, email));
$(this).attr('href', 'mailto:' + email);
});
//GMaps
if ($('.gmaps').length > 0) {
$.each($('.gmaps'), function(k, v) {
var coordenadas = $(this).attr('data-coordenadas').split(',');
var myOptions = {
zoom: 15,
scrollwheel: false,
center: new google.maps.LatLng(coordenadas[0], coordenadas[1]),
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
var map = new google.maps.Map($(this).get(0), myOptions);
new google.maps.Marker({
position: new google.maps.LatLng(coordenadas[0], coordenadas[1]),
map: map,
icon: '/img/frontend/marker.png',
});
});
}
//Alertas
if ($('.alert:not(.cookies)').length > 0) {
$('html, body').animate({scrollTop: $('.alert:not(.cookies)').offset().top - 200}, 1000);
}
//Filtro
if ($('.filtro').length > 0) {
$(document).on('click', '.filtro nav ul li.vertodo', function() {
$(this).parent('ul').find('li.hide').removeClass('hide');
$(this).remove();
return false;
});
//Selectores para el rango de precios
$(document).on('change', '.filtro nav form select', function() {
$(this).parents('form').submit();
});
//Checks para los extras
$('.filtro nav form label').unbind();
$('.filtro nav form label').click(function(e) {
var form = $(this).parents('form');
e.preventDefault();
e.stopPropagation();
$(this).prev().click();
form.submit();
});
}
//Paginador
if ($('.paginador-orden').length > 0) {
$('.paginador-orden .paginador-orden-content').popover({html: true, trigger: 'click'});
}
//Pastillas
$(document).on('click', '.pastilla', function() {
window.open($(this).find('a:last').attr('href'), '_blank');
return false;
});
//Inmuebles vista de iconos y listado
$(document).on('click', '.inmueble-listado-list-contenido', function() {
window.location = $(this).find('a:first').attr('href');
return false;
});
$(document).on('click', '.inmueble-listado-grid', function() {
var a = $(this).find('a:first');
var target = a.attr('target');
if (target == '_blank') {
window.open(a.attr('href'), '_blank');
} else {
window.location = a.attr('href');
}
return false;
});
*/
});