var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
jQuery(document).ready(function ($) {
if($.fn.select2){
$.fn.select2.defaults.set("minimumResultsForSearch", "6");
}
var countersStarted = false;
$.fn.isInViewport = function() {
var elementTop = $(this).offset().top;
var elementBottom = elementTop + $(this).outerHeight();
var viewportTop = $(window).scrollTop();
var viewportBottom = viewportTop + $(window).height();
return elementBottom > viewportTop && elementTop < viewportBottom;
};
$(window).on('resize scroll', function() {
if ($('#footer_counters').isInViewport() && !countersStarted) {
// start all the timers
$('.timer').each(count);
countersStarted = true;
}
});
//resize main conteiner if content too small so whole page is covered
$(window).resize(function(){
var wY=$(window).height();
var headerY = $('header').outerHeight(true);
var navY = $('#main-menu').outerHeight(true);
var main = $('main').outerHeight(true);
var footer = $('footer').outerHeight(true);
var content = headerY + navY + main + footer;
console.log(wY ,content);
if(wY > content){
var padding = (wY - content) / 2;
$('main').css('padding-top',padding);
$('main').css('padding-bottom',padding);
}
});
$(window).trigger('resize');
setTimeout(function(){
$('#main-menu').css('opacity',1);
$('main').css('opacity',1);
$('header').css('opacity',1);
},50);
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
// fix voting click propaagte
$('.w3-ratings-wrap').click(function(e){
e.preventDefault();
e.stopPropagation();
});
// homepage carousel
if($.fn.slick){
$('#index_diamond').slick({
autoplay:true,
centerMode: true,
infinite: true,
speed: 300,
slidesToShow:5,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
arrows: false
}
}
]
});
$('#index_gold').slick({
autoplay:true,
centerMode: true,
infinite: true,
speed: 400,
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1025,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
arrows: false
}
}
]
});
$('#index_standard').slick({
rows:500,
slidesPerRow:4,
responsive: [
{
breakpoint: 600,
settings: {
slidesPerRow: 2,
}
},
]
});
$('#all_profiles').slick({
rows:500,
slidesPerRow:4,
responsive: [
{
breakpoint: 600,
settings: {
slidesPerRow: 2,
}
},
]
});
$('#city_profiles').slick({
rows:500,
slidesPerRow:3,
responsive: [
{
breakpoint: 600,
settings: {
slidesPerRow: 1,
}
},
]
});
$('#preferiti_wrap').slick({
rows:500,
slidesPerRow:3,
responsive: [
{
breakpoint: 600,
settings: {
slidesPerRow: 1,
}
},
]
});
}
// favourites
// Manage reviews
// $('body').on('click','.profile_review_delete',function() {
// var id = $(this).data('id');
// var div = $(this).closest('.user_review_row');
// bootbox.confirm({
// title: "=__( 'Sei sicuro?', 'w3_escorts' )?>",
// message: "
=__( 'La recensione sarĂ eliminata!', 'w3_escorts' )?>
",
// centerVertical: true,
// buttons: {
// confirm: {
// label: ' =__( 'Si', 'w3_escorts' )?>',
// className: 'btn col-lg-3 btn-danger'
// },
// cancel: {
// label: ' =__( 'No', 'w3_escorts' )?>',
// className: 'btn col-lg-5 btn-secondary'
// }
// },
// callback: function (result) {
// if(result){
// div.fadeOut();
// }
// }
// });
// });
// main menu on scroll
$(window).scroll(function(){
var pos = $('#main-menu').offset();
console.log(pos);
if(pos.top > 142 ){
$('#main-menu').addClass('sticked');
}else{
$('#main-menu').removeClass('sticked');
}
}).trigger('scroll');
// header search
$('#header_search_input').keyup(handleKeyup);
function handleKeyup(){
var s = $('#header_search_input').val().replace(/<(|\/|[^>\/bi]|\/[^>bi]|[^\/>][^>]+|\/[^>][^>]+)>/g, '');//sanitize
var result_wrap = $('#header_search_results');
result_wrap.html('');
if(s.length){
$('#header_search_clear').slideDown();
}else{
$('#header_search_clear').slideUp();
}
if(s.length > 1){
$.ajax({
type: "POST",
dataType: "json",
url: w3_ajax_script.ajaxurl,
data: {
s,
action:'get_header_search'
},
success: function (results) {
result_wrap.html('');
var profilesCount = Object.keys(results.profiles).length;
var citiesCount = Object.keys(results.cities).length;
console.log(results);
if(profilesCount){
var html ='';
for(var i in results.profiles){
html += `
`;
}
result_wrap.append(html+'
');
}
if(citiesCount){
var html2 ='';
for(var id in results.cities){
html2 += `
`;
}
result_wrap.append(html2 + '
');
}
},
error: function (jqXHR, textStatus, errorThrown) {
console.log(textStatus);
}
});
}
}
$('body').on('click','#header_search_clear',function(){
console.log('header_search_clear');
$('#header_search_input').val('');
handleKeyup();
})
handleKeyup();
// footer counters
// custom formatting example
$('.count-number').data('countToOptions', {
formatter: function (value, options) {
return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
}
});
function count(options) {
var $this = $(this);
options = $.extend({}, options || {}, $this.data('countToOptions') || {});
$this.countTo(options);
}
// filters toggle
$('.filter-section .section-row-title').click(function(){
console.log('#filter_toggle');
$('.filter-section').toggleClass('open');
})
});
(function ($) {
$.fn.countTo = function (options) {
options = options || {};
return $(this).each(function () {
// set options for current element
var settings = $.extend({}, $.fn.countTo.defaults, {
from: $(this).data('from'),
to: $(this).data('to'),
speed: $(this).data('speed'),
refreshInterval: $(this).data('refresh-interval'),
decimals: $(this).data('decimals')
}, options);
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;
// references & variables that will change with each update
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data('countTo') || {};
$self.data('countTo', data);
// if an existing interval can be found, clear it first
if (data.interval) {
clearInterval(data.interval);
}
data.interval = setInterval(updateTimer, settings.refreshInterval);
// initialize the element with the starting value
render(value);
function updateTimer() {
value += increment;
loopCount++;
render(value);
if (typeof(settings.onUpdate) == 'function') {
settings.onUpdate.call(self, value);
}
if (loopCount >= loops) {
// remove the interval
$self.removeData('countTo');
clearInterval(data.interval);
value = settings.to;
if (typeof(settings.onComplete) == 'function') {
settings.onComplete.call(self, value);
}
}
}
function render(value) {
var formattedValue = settings.formatter.call(self, value, settings);
$self.html(formattedValue);
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 0, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
formatter: formatter, // handler for formatting the value before rendering
onUpdate: null, // callback method for every time the element is updated
onComplete: null // callback method for when the element finishes updating
};
function formatter(value, settings) {
return value.toFixed(settings.decimals);
}
}(jQuery))
}
/*
FILE ARCHIVED ON 18:37:51 Aug 03, 2022 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 19:28:52 Apr 20, 2025.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 0.777
exclusion.robots: 0.034
exclusion.robots.policy: 0.021
esindex: 0.014
cdx.remote: 5.05
LoadShardBlock: 475.914 (3)
PetaboxLoader3.datanode: 192.412 (4)
PetaboxLoader3.resolve: 281.838 (2)
load_resource: 145.217
*/