jQuery(document).ready(function ($) { "use strict"; // Maplace Destination Markers var LocsUS = [ { lat: 42.415902, lon: 11.426275, title: "Bar Bar Tavola Calda Il Girasole", html: "Bar Bar Tavola Calda Il Girasole", id: "272" }, { lat: 42.438734, lon: 11.479259, title: "Bauernhof La Vigna sul mare, cantina e foresteria", html: "Bauernhof La Vigna sul mare, cantina e foresteria", id: "264" }, { lat: 42.544913, lon: 11.268330, title: "Bauernhof Botanical Dry Garden", html: "Bauernhof Botanical Dry Garden", id: "250" }, { lat: 42.580017, lon: 11.188153, title: "Bauernhof Azienda Agricola Ricci", html: "Bauernhof Azienda Agricola Ricci", id: "239" }, { lat: 42.537358, lon: 11.182056, title: "Camping Campeggio Acapulco", html: "Camping Campeggio Acapulco", id: "255" }, { lat: 42.533908, lon: 11.184566, title: "Camping Camping Campo Regio", html: "Camping Camping Campo Regio", id: "256" }, { lat: 42.379162, lon: 11.447941, title: "Camping Village Camping Village Costa d\'Argento", html: "Camping Village Camping Village Costa d'Argento", id: "269" }, { lat: 42.409869, lon: 11.208694, title: "Camping Village Camping Feniglia", html: "Camping Village Camping Feniglia", id: "252" }, { lat: 42.519421, lon: 11.192333, title: "Camping Village Campin Village OASI", html: "Camping Village Campin Village OASI", id: "155" }, { lat: 42.532773, lon: 11.185801, title: "Camping Village Il Gabbiano Camping Village", html: "Camping Village Il Gabbiano Camping Village", id: "158" }, { lat: 42.527452, lon: 11.188062, title: "Camping Village Village Camping Voltoncino", html: "Camping Village Village Camping Voltoncino", id: "230" }, { lat: 42.500463, lon: 11.194360, title: "Camping Village Bocche d\'Albegna Camping Village", html: "Camping Village Bocche d'Albegna Camping Village", id: "251" }, { lat: 42.535803, lon: 11.183787, title: "Camping Village Camping Hawaii", html: "Camping Village Camping Hawaii", id: "241" }, { lat: 42.524010, lon: 11.189617, title: "Camping Village Camping Village Marina Chiara", html: "Camping Village Camping Village Marina Chiara", id: "159" }, { lat: 42.522281, lon: 11.459813, title: "Country Relais Country Villas Fattoria le Guardiole", html: "Country Relais Country Villas Fattoria le Guardiole", id: "247" }, { lat: 42.404945, lon: 11.09266, title: "Hotel Torre di Cala Piccola", html: "Hotel Torre di Cala Piccola", id: "175" }, { lat: 42.434055, lon: 11.138178, title: "Hotel Baia D\'Argento", html: "Hotel Baia D'Argento", id: "166" }, { lat: 42.553763, lon: 11.131704, title: "Hotel Hotel Capo d\'Uomo", html: "Hotel Hotel Capo d'Uomo", id: "242" }, { lat: 42.441812, lon: 11.217683, title: "Hotel Park Hotel", html: "Hotel Park Hotel", id: "178" }, { lat: 42.55303133172033, lon: 11.134395301214681, title: "Hotel Il Telamonio", html: "Hotel Il Telamonio", id: "173" }, { lat: 42.455814, lon: 11.422206, title: "Hotel-Residence Valle del Buttero", html: "Hotel-Residence Valle del Buttero", id: "260" }, { lat: 42.453867, lon: 11.180188, title: "Hotel-Residence Hotel Lido di Giannella", html: "Hotel-Residence Hotel Lido di Giannella", id: "254" }, { lat: 42.366202, lon: 10.881831, title: "Immobilienbüro Ammiraglio", html: "Immobilienbüro Ammiraglio", id: "246" }, { lat: 42.496671, lon: 11.192304, title: "Immobilienbüro Agenzia Immobiare. La Rotonda", html: "Immobilienbüro Agenzia Immobiare. La Rotonda", id: "130" }, { lat: 42.417001, lon: 11.410578, title: "Lokale Produkte Frantoio Terre di Capalbio", html: "Lokale Produkte Frantoio Terre di Capalbio", id: "263" }, { lat: 42.366202, lon: 10.881831, title: "Private Ferienwohnungen Ammiraglio - Locazione estive", html: "Private Ferienwohnungen Ammiraglio - Locazione estive", id: "128" }, { lat: 42.505365, lon: 11.20717, title: "Reisebüro Viaggi Vacanze", html: "Reisebüro Viaggi Vacanze", id: "135" }, { lat: 42.522117, lon: 11.189929, title: "Residence La Pineta", html: "Residence La Pineta", id: "189" }, { lat: 42.521626, lon: 11.191189, title: "Residence Casale Voltoncino, Residenza d\'epoca", html: "Residence Casale Voltoncino, Residenza d'epoca", id: "190" }, { lat: 42.447132, lon: 11.457774, title: "Resort Locanda Rossa Resort & Spa", html: "Resort Locanda Rossa Resort & Spa", id: "261" }, { lat: 42.425865, lon: 11.390285, title: "Resort Resort Capalbio", html: "Resort Resort Capalbio", id: "257" }, { lat: 42.416716, lon: 11.184146, title: "Resort Argentario Golf Resort & Spa", html: "Resort Argentario Golf Resort & Spa", id: "273" }, { lat: 42.455464, lon: 11.419241, title: "Restaurant Trattoria da Carla", html: "Restaurant Trattoria da Carla", id: "270" }, { lat: 42.379317, lon: 11.448602, title: "Restaurant Rosso e Vino alla Dogana", html: "Restaurant Rosso e Vino alla Dogana", id: "266" }, { lat: 42.454389, lon: 11.422189, title: "Restaurant Il Frantoio ristorante, bar, arte e libri", html: "Restaurant Il Frantoio ristorante, bar, arte e libri", id: "262" }, { lat: 42.451844, lon: 11.423578, title: "Services Nannoni Bus", html: "Services Nannoni Bus", id: "259" }, { lat: 42.454393, lon: 11.419441, title: "Services Associazione CapalbioèVino", html: "Services Associazione CapalbioèVino", id: "267" }, { lat: 42.421060, lon: 11.182403, title: "Sport Argentario Polo Club SRL", html: "Sport Argentario Polo Club SRL", id: "214" }, { lat: 42.481584, lon: 11.192370, title: "Sport CM Equitazione", html: "Sport CM Equitazione", id: "215" }, { lat: 42.402758, lon: 11.346039, title: "Stabilimento balneare Carmen Bay", html: "Stabilimento balneare Carmen Bay", id: "258" }, { lat: 42.386611, lon: 11.20822, title: "Stabilimento balneare Riva del Marchese", html: "Stabilimento balneare Riva del Marchese", id: "227" }, { lat: 42.508268, lon: 11.196269, title: "Stabilimento balneare AI Delfini - Stabilimento balneare e Sosta Camper", html: "Stabilimento balneare AI Delfini - Stabilimento balneare e Sosta Camper", id: "217" }, { lat: 42.398777, lon: 11.423193, title: "Urlaub auf dem Bauernhof La Capalbiola", html: "Urlaub auf dem Bauernhof La Capalbiola", id: "265" }, { lat: 42.458157, lon: 11.406403, title: "Urlaub auf dem Bauernhof Antica Pinciana Agriturismo e Maneggio", html: "Urlaub auf dem Bauernhof Antica Pinciana Agriturismo e Maneggio", id: "268" }, { lat: 42.456728, lon: 11.386532, title: "Urlaub auf dem Bauernhof Agriturismo Il Casale degli Olivi", html: "Urlaub auf dem Bauernhof Agriturismo Il Casale degli Olivi", id: "271" }, { lat: 42.499931, lon: 11.251094, title: "Urlaub auf dem Bauernhof Podere del Priorato", html: "Urlaub auf dem Bauernhof Podere del Priorato", id: "248" }, { lat: 42.588497, lon: 11.108003, title: "Urlaub auf dem Bauernhof Club Le Cannelle", html: "Urlaub auf dem Bauernhof Club Le Cannelle", id: "137" }, { lat: 42.493175, lon: 11.248699, title: "Urlaub auf dem Bauernhof Antica Fattoria La Parrina", html: "Urlaub auf dem Bauernhof Antica Fattoria La Parrina", id: "136" }, { lat: 42.553687, lon: 11.174718, title: "Village Argentario Osa Village", html: "Village Argentario Osa Village", id: "220" }, { lat: 42.496455, lon: 11.194386, title: "Village Argentario Camping Village", html: "Village Argentario Camping Village", id: "221" }, { lat: 42.565103, lon: 11.139510, title: "Village Talamone Camping Village", html: "Village Talamone Camping Village", id: "222" }, { lat: 42.513884, lon: 11.194407, title: "Village Villaggio Golfo degli Etruschi", html: "Village Villaggio Golfo degli Etruschi", id: "154" }, { lat: 42.471646, lon: 11.257605, title: '', html: '' } ]; if ('undefined' !== typeof Maplace && $('.td-gmap').length ) { $('a[href="#destinations-map"]').on('shown.bs.tab', function () { var map = new Maplace({ map_div: '.td-gmap', controls_title: 'Choose a location:', locations: LocsUS, map_options: { mapTypeId: google.maps.MapTypeId.ROADMAP, set_center: [42.471646, 11.257605], zoom: 10 } }).Load(); google.maps.event.trigger(map, 'resize'); }); } if ('undefined' !== typeof Maplace && $('#gmap-route').length ) { // Maplace Route Map new Maplace({ locations: LocsRoute, map_div: '#gmap-route', generate_controls: false, show_markers: false, type: 'directions', draggable: false }).Load(); } // Search Filter $('#searchFilter').on('keyup', function(event) { var target = $(this), targetValue = $.trim(target.val().toLowerCase()), targetFilter = $('#td-search-filter-list li'), hasitems = false; $('#td-search-filter-list').hide(); targetFilter.each( function() { var item = $(this), link = item.children('a'), linkText = $.trim(link.text().toLowerCase()); if (!targetValue.length || linkText.substring(0, targetValue.length) !== targetValue ) { return item.hide(); } item.show(); hasitems = true; }); if(hasitems) { $('#td-search-filter-list').show(); } }); // Bootstrap Dropdown Fix $('.dropdown-menu').on ('click', function(e) { var target = $( e.target ); if ( target.is('a') ) { if ( target.filter(":not([data-toggle])").length ) { return; } var tabID = target.attr('href'), parent = target.parent(); parent.siblings().find('a.active').removeClass('active'); target.addClass('active'); $( tabID ).addClass('active'); $( tabID ).siblings().removeClass('active'); } e.stopPropagation(); e.preventDefault(); }); // UI Dropdowns $('#selectAdults').selectmenu(); $('#selectChildren').selectmenu(); $('#selectInfants').selectmenu(); // Date Range Picker var dateFormat = "dd/mm/yy", from = $( "#from" ).datepicker({ dateFormat: 'dd-mm-yy', defaultDate: "+1w", changeMonth: true }).on( "change", function() { to.datepicker( "option", "minDate", getDate( this ) ); }), to = $( "#to" ).datepicker({ dateFormat: 'dd-mm-yy', defaultDate: "+1w", changeMonth: true }).on( "change", function() { from.datepicker( "option", "maxDate", getDate( this ) ); }); function getDate( element ) { var date; try { date = $.datepicker.parseDate( dateFormat, element.value ); } catch( error ) { date = null; } return date; } // Footer Map Parallax Scrolling var getmapheight = $(".footer-map").height(); $(".wrapper").css({ "margin-bottom": getmapheight}); // Filterizr if ( "function" === typeof $.fn.filterizr && $('.filtr-container').length ) { $('.filtr-container').filterizr(); } $('.td-nav-filter .nav-item').on('click', '.nav-link', function(){ var self = $(this), parent = self.parent(); parent.siblings().find('.nav-link.active').removeClass('active'); self.addClass('active'); }); }); //Document Ready var mn = $(".navbar-nav"); mns = "main-nav-scrolled"; hdr = $('.td-navbar').height(); $(window).scroll(function() { if( $(this).scrollTop() > hdr ) { mn.addClass(mns); } else { mn.removeClass(mns); } // MENU LATERALE if( $(this).scrollTop() > $('.td-header').height() ) { $(".menustick").addClass("menusticksi"); } else { $(".menustick").removeClass("menusticksi"); } // MENU LATERALE });