$(document).ready(function() { InitCarousel(); InitPropertyCarousel(); InitOffCanvasNavigation(); InitMap(); InitChosen(); InitEzmark(); InitPriceSlider(); InitImageSlider(); InitAccordion(); InitTabs(); InitPalette(); }); function InitPalette() { if ($.cookie('palette') == 'true') { $('.palette').addClass('open'); } $('.palette .toggle a').on({ click: function(e) { e.preventDefault(); var palette = $(this).closest('.palette'); if (palette.hasClass('open')) { palette.animate({'left': '-195'}, 500, function() { palette.removeClass('open'); }); $.cookie('palette', false) } else { palette.animate({'left': '0'}, 500, function() { palette.addClass('open'); $.cookie('palette', true); }); } } }); if ($.cookie('color-variant')) { var link = $('.palette').find('a.'+ $.cookie('color-variant')); var file = link.attr('href'); var klass = link.attr('class'); $('#color-variant').attr('href', file); $('body').addClass(klass); } if ($.cookie('pattern')) { $('body').addClass($.cookie('pattern')); } if ($.cookie('header')) { $('body').addClass($.cookie('header')); } $('.palette a').on({ click: function(e) { e.preventDefault(); // Colors if ($(this).closest('div').hasClass('colors')) { var file = $(this).attr('href'); var klass = $(this).attr('class'); $('#color-variant').attr('href', file); if (!$('body').hasClass(klass)) { $('body').removeClass($.cookie('color-variant')); $('body').addClass(klass); } $.cookie('color-variant', klass) } // Patterns else if ($(this).closest('div').hasClass('patterns')) { var klass = $(this).attr('class'); if (!$('body').hasClass(klass)) { $('body').removeClass($.cookie('pattern')); $('body').addClass(klass); $.cookie('pattern', klass); } } // Headers else if ($(this).closest('div').hasClass('headers')) { var klass = $(this).attr('class'); if (!$('body').hasClass(klass)) { $('body').removeClass($.cookie('header')); $('body').addClass(klass); $.cookie('header', klass); } } } }); $('.palette .reset').on({ click: function() { $('body').removeClass($.cookie('color-variant')); $('#color-variant').attr('href', null); $.removeCookie('color-variant'); $('body').removeClass($.cookie('pattern')); $.removeCookie('pattern'); $('body').removeClass($.cookie('header')); $.removeCookie('header'); } }) } function InitPropertyCarousel() { $('.carousel.property .content li img').on({ click: function(e) { var src = $(this).attr('src'); var img = $(this).closest('.carousel.property').find('.preview img'); img.attr('src', src); $('.carousel.property .content li').each(function() { $(this).removeClass('active'); }); $(this).closest('li').addClass('active'); } }) } function InitTabs() { $('.tabs a').click(function (e) { e.preventDefault(); $(this).tab('show'); }); } function InitImageSlider() { $('.iosSlider').iosSlider({ desktopClickDrag: true, snapToChildren: true, infiniteSlider: true, navSlideSelector: '.slider .navigation li', onSlideComplete: function(args) { if(!args.slideChanged) return false; $(args.sliderObject).find('.slider-info').attr('style', ''); $(args.currentSlideObject).find('.slider-info').animate({ left: '15px', opacity: '.9' }, 'easeOutQuint'); }, onSliderLoaded: function(args) { $(args.sliderObject).find('.slider-info').attr('style', ''); $(args.currentSlideObject).find('.slider-info').animate({ left: '15px', opacity: '.9' }, 'easeOutQuint'); }, onSlideChange: function(args) { $('.slider .navigation li').removeClass('active'); $('.slider .navigation li:eq(' + (args.currentSlideNumber - 1) + ')').addClass('active'); }, autoSlide: true, scrollbar: true, scrollbarContainer: '.sliderContainer .scrollbarContainer', scrollbarMargin: '0', scrollbarBorderRadius: '0', keyboardControls: true }); } function InitAccordion() { $('.accordion').on('show', function (e) { $(e.target).prev('.accordion-heading').find('.accordion-toggle').addClass('active'); }); $('.accordion').on('hide', function (e) { $(this).find('.accordion-toggle').not($(e.target)).removeClass('active'); }); } function InitPriceSlider() { jQuery('.price-value .from').text(100); jQuery('.price-value .from').currency({ region: 'EUR', thousands: ' ', decimal: ',', decimals: 0 }); jQuery('.price-value .to').text(1000000); jQuery('.price-value .to').currency({ region: 'EUR', thousands: ' ', decimal: ',', decimals: 0 }); $('.property-filter .price-slider').slider({ range: true, min: 100, max: 1000000, values: [100, 1000000], slide: function(event, ui) { jQuery('.property-filter .price-from input').attr('value', ui.values[0]); jQuery('.property-filter .price-to input').attr('value', ui.values[1]); jQuery('.price-value .from').text(ui.values[0]); jQuery('.price-value .from').currency({ region: 'EUR', thousands: ' ', decimal: ',', decimals: 0 }); jQuery('.price-value .to').text(ui.values[1]); jQuery('.price-value .to').currency({ region: 'EUR', thousands: ' ', decimal: ',', decimals: 0 }); } }); } function InitEzmark() { $('input[type="checkbox"]').ezMark(); $('input[type="radio"]').ezMark(); } function InitChosen() { $('select').chosen({ disable_search_threshold: 10 }); } function InitOffCanvasNavigation() { $('#btn-nav').on({ click: function() { $('body').toggleClass('nav-open'); } }) } function InitCarousel() { $('#main .carousel .content ul').carouFredSel({ scroll: { items: 1 }, auto: false, next: { button: '#main .carousel-next', key: 'right' }, prev: { button: '#main .carousel-prev', key: 'left' } }); $('.carousel-wrapper .content ul').carouFredSel({ scroll: { items: 1 }, auto: false, next: { button: '.carousel-wrapper .carousel-next', key: 'right' }, prev: { button: '.carousel-wrapper .carousel-prev', key: 'left' } }); } function LoadMapProperty() { var locations = new Array( [45.6366534,10.6084597] ); var markers = new Array(); var mapOptions = { center: new google.maps.LatLng(45.6366534,10.6084597), zoom: 17, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }; var map = new google.maps.Map(document.getElementById('property-map'), mapOptions); $.each(locations, function(index, location) { var marker = new google.maps.Marker({ position: new google.maps.LatLng(location[0], location[1]), map: map, icon: 'http://www.comune.toscolanomaderno.bs.it/personalizzazione/tpl/img/marker-transparent.png' }); var myOptions = { content: '', disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-146, -190), zIndex: null, closeBoxURL: "", infoBoxClearance: new google.maps.Size(1, 1), position: new google.maps.LatLng(location[0], location[1]), isHidden: false, pane: "floatPane", enableEventPropagation: false }; marker.infobox = new InfoBox(myOptions); marker.infobox.isOpen = false; var myOptions = { draggable: true, content: '
', disableAutoPan: true, pixelOffset: new google.maps.Size(-21, -58), position: new google.maps.LatLng(location[0], location[1]), closeBoxURL: "", isHidden: false, // pane: "mapPane", enableEventPropagation: true }; marker.marker = new InfoBox(myOptions); marker.marker.open(map, marker); markers.push(marker); google.maps.event.addListener(marker, "click", function (e) { var curMarker = this; $.each(markers, function (index, marker) { // if marker is not the clicked marker, close the marker if (marker !== curMarker) { marker.infobox.close(); marker.infobox.isOpen = false; } }); if(curMarker.infobox.isOpen === false) { curMarker.infobox.open(map, this); curMarker.infobox.isOpen = true; map.panTo(curMarker.getPosition()); } else { curMarker.infobox.close(); curMarker.infobox.isOpen = false; } }); }); } function LoadMap() { var locations = new Array( [45.6531069,10.6263544, '
Locanda Cavallino
Via Cecina, 10
25088 CECINA (BS)
tel.: 0365 642072 cell. 366 4189826
e-mail: info@locandacavallino.com
web: www.locandacavallino.com
'], [45.636047,10.597154, '
Bel Soggiorno Hotel & Spa
Via Roma, 16
25088 Toscolano Maderno (BS)
tel.: +39 0365 641301
fax: +39 0365 540807
e-mail: info@hotel-belsoggiorno.it
web: http://www.hotel-belsoggiorno.it
'], [45.637922,10.612414, '
Hotel Antico Monastero (villaggio albergo)
Via Religione, 88
25088 Toscolano Maderno (BS)
tel.: 0365-641346
e-mail: toscolano@hg-hotels.com
web: www.hg-hotels.com
'], [45.652837,10.627035, '
Piccolo Paradiso (Villaggio Albergo)
Via Messaga, 24-25
25088 Toscolano Maderno (BS)
tel.: +39 0365 643080
fax: +39 0365 954357
e-mail: villaggiopiccoloparadiso@gmail.com
web: www.hg-hotels.com
'], [45.6290769,10.5869191, '
Hotel Villa Maria
Via Roma, 45
25088 Toscolano Maderno (BS)
tel.: 0365-546201
e-mail: info@hotel-villamaria.org
web: www.hotel-villamaria.org
'], [45.634917,10.600289, '
Ristorante il Cortiletto
Via F.lli Bianchi, 10
25088 Toscolano Maderno (BS)
tel.: 0365 540033
e-mail: ilcortilettosnc@libero.it
web: www.ristoranteilcortiletto.com/
'], [45.65557,10.6295327, '
La Sosta
Via Cecina, 79
25088 Toscolano Maderno (BS)
tel.: 0365 644295
'], [45.635972,10.597894, '
Ristorante La Tana
via Aquilani, 14
25088 Toscolano Maderno (BS)
tel.: 0365-644286
'], [45.644936,10.615766, '
Osteria San Carlo
Via Trento, 200
25088 Toscolano Maderno (BS)
tel.: 0365 641529
e-mail: merigogermano@gmail.com
'], [45.6345116,10.6003511, '
Gatto D'Oro
Via Fratelli Bianchi, 41
25088 Toscolano Maderno (BS)
tel.: 0365 540975
'], [45.626261,10.582323, '
Ristorante Boccondivino
Via Zanardelli, 155
25088 Fasano di Gardone Riviera (BS)
tel.: 0365541777 3382161923
e-mail: info@hotelaquavite.com
web: www.hotelaquavite.com
'], [45.6425102,10.6051609, '
La Cascina SAmbrogio
Via S. Ambrogio, 16
25088 Toscolano Maderno (BS)
tel.: 0365 541122
'], [45.6534425,10.6152622, '
Osteria Ai Cantagai
Via Del Sarto,
25088 GAINO (BS)
tel.: 0365 641785
'], [45.6366058,10.6164009, '
Camping La Foce
Via Religione,
25088 Toscolano Maderno (BS)
tel.: 0365 644201
e-mail: lafoce@libero.it
web: www.camplafoce.com
'], [45.633347,10.612628, '
Ristorante Pizzeria Promontorio
Via Promontorio, 73
25088 Toscolano Maderno (BS)
tel.: +39 0365 692184 - +39 333 8414999
web: http://campingpromontorio.it/bar-restaurant-pizzeria.html
'], [45.6355897,10.6100431, '
Camping Riviera
Via Promontorio,
25088 Toscolano Maderno (BS)
tel.: 0365 643039
e-mail: info@camping-riviera.com
web: www.camping-riviera.com
'], [45.6705561,10.6465738, '
Al Bertansì
Via Roina, 31
25088 Toscolano Maderno (BS)
tel.: 0365 643126
'], [45.63645,10.59881, '
Gatto Giallo
Via Montana, 13
25088 Toscolano Maderno (BS)
tel.: 0365 540659
'], [45.6358798,10.5990862, '
Ristorante Pizzeria La Bussola
Piazza San Marco, 10
25088 Toscolano Maderno (BS)
tel.: 0365 541554
'], [45.634545,10.591592, '
Rustichel
Via Maclino, 31
25088 Toscolano Maderno (BS)
tel.: 0365 540373
'], [45.638372,10.619080, '
Lido degli Ulivi
Viale Marconi, 38
25088 Toscolano Maderno (BS)
tel.: 0365 644013
'], [45.635255,10.599943, '
Ristorante Pizzeria Il Cantinone
Piazza San Marco, 49
25088 Toscolano Maderno (BS)
tel.: 0365 641447
web: https://www.facebook.com/pages/Ristorante-Pizzeria-Cantinone/212251722179295
'], [45.6528924,10.6261127, '
La Macina
Via Cecina, 6
25088 Toscolano Maderno (BS)
tel.: 0365 643095
'], [45.633666,10.609933, '
Nappo Jenny Ristopub Cento 22
Via Foscolo, 61
25088 Toscolano Maderno (BS)
tel.: 3291935212
'], [45.636098,10.604484, '
S Ercolano
Via Statale, 5
25088 Toscolano Maderno (BS)
tel.: 0365 642674
'], [45.636802,10.599906, '
Ristorante Oasi del Re
Via Garibaldi, 75
25088 Toscolano Maderno (BS)
'], [45.632038,10.603925, '
Lido Azzurro
Lung.Zanardelli, 44
25088 Toscolano Maderno (BS)
tel.: 0365 643727
'], [45.629215,10.586522, '
Benella
Via Bornico, 1
25088 Toscolano Maderno (BS)
tel.: 0365 641833
'], [45.655896,10.617560, '
Agriturismo Scuderia Castello
via Castello, 10
25088 Gaino (Toscolano Maderno) (BS)
tel.: +39 0365 644101
e-mail: info@scuderiacastello.it
web: www.scuderiacastello.it/
'], [45.657767,10.614673, '
San Lorenzo di Persegno
Via Camerate, 39
25088 Gaino (Toscolano Maderno) (BS)
tel.: 329 3103384
e-mail: info@sanlorenzodipersegno.it
web: www.sanlorenzodipersegno.i
'], [45.641183,10.609294, '
Risto Bar Alle Piante
Largo IV Novembre,
25088 Toscolano Maderno (BS)
tel.: 0365 642805
'], [45.636276,10.600317, '
Osteria Antico Pozzo
Via Benamati, 24
25088 Toscolano Maderno (BS)
tel.: 0365 642356
'], [45.6439499,10.61698, '
Igea
Via Caboto, 6
25088 Toscolano Maderno (BS)
tel.: 0365 641548
'], [45.6321839,10.6062365, '
Villa Angela
Via Dante, 13
25088 Toscolano Maderno (BS)
tel.: 0365 641730
'], [45.634049,10.590156, '
Belvedere Hotel Villa Ristorante
Via Maclino, 2
25088 Montemaderno (BS)
tel.: 0365 641210
e-mail: info@belvederevillahotel.it
web: www.belvederevillahotel.it/
'], [45.634049,10.590156, '
Belvedere Hotel Villa Ristorante
Via Maclino, 2
25088 Montemaderno (BS)
tel.: 0365 641210
e-mail: info@belvederevillahotel.it
web: www.belvederevillahotel.it/
'], [45.6348072,10.6011518, '
Ristorante Hotel Maderno
Via Statale, 12
25088 Toscolano Maderno (BS)
tel.: 0365 641070
fax: 0365 644277
e-mail: info@hotelmaderno.it
web: www.hotelmaderno.it
'], [45.6290769,10.5869191, '
Villa Maria
Via Roma, 45
25088 Toscolano Maderno (BS)
tel.: 0365 546201
'], [45.644929,10.616332, '
Hotel Adria
Piazza Caduti, 4
25088 Toscolano Maderno (BS)
tel.: 0365 548421
e-mail: info@adriaresort.it
web: www.adriaresort.it/
'], [45.6379966,10.6071793, '
Sole
Via Promontorio, 7
25088 Toscolano Maderno (BS)
tel.: 0365 641335
'], [45.638272,10.60275, '
La VittoRia
Via Benamati, 118
25088 Toscolano Maderno (BS)
tel.: 0365 641320
'], [45.6366299,10.60158, '
Giardino
Via Benamati, 58
25088 Toscolano Maderno (BS)
tel.: 0365 641360
'], [45.634499,10.599727, '
Bella Piada
Lungolago Zanardelli,
25088 Toscolano Maderno (BS)
'], [45.6421102,10.6141447, '
Bar Gunny
Via Marconi, 9
25088 Toscolano Maderno (BS)
tel.: 0365 644175
'], [45.632063,10.603913, '
Lido Azzurro
Lung.Zanardelli, 44
25088 Toscolano Maderno (BS)
'], [45.641606,10.612238, '
Benaco
Via Statale, 116
25088 Toscolano Maderno (BS)
'], [45.649234,10.604203, '
Montespino
Via Cartiere, 20
25088 Toscolano Maderno (BS)
'], [45.644809,10.616586, '
Scarlett Rose
Piazza Caduti, 9
25088 Toscolano Maderno (BS)
'], [45.640143,10.608327, '
Taqui's
Via Bellini, 1
25088 Toscolano Maderno (BS)
'], [45.634263,10.599516, '
Don Carlos
Lung.Zanardelli, 15
25088 Toscolano Maderno (BS)
'], [45.64056,10.60847, '
Posta
Via Statale, 136
25088 Toscolano Maderno (BS)
'], [45.642028,10.613244, '
Stazione
Largo Matteotti, 5
25088 Toscolano Maderno (BS)
'], [45.636948,10.6157467, '
Migbar
Via Religione, 56
25088 Toscolano Maderno (BS)
'], [45.635597,10.599225, '
Hotion
Piazza S.Marco, 15
25088 Toscolano Maderno (BS)
'], [45.638944,10.607718, '
B-SIDE Cafè
Via Statale, 77
25088 Toscolano Maderno (BS)
'], [45.6421102,10.6141447, '
Viennese
Viale Marconi, 9
25088 Toscolano Maderno (BS)
'], [45.643759,10.614124, '
Bernini
Parco Bernini,
25088 Toscolano Maderno (BS)
'], [45.631401,10.605335, '
Ciringhito dai Rosei
Largo Zanardelli,
25088 Toscolano Maderno (BS)
'], [45.633418,10.607424, '
Giardino dei Colori
Via D\'Annunzio, 28
25088 Toscolano Maderno (BS)
'], [45.633121,10.592490, '
CARTABIANCA
Via Roma, 36
25088 Toscolano Maderno (BS)
tel.: +39/366 3485801
'], [45.635512,10.599444, '
Bar Pasticceria Gelateria Centrale
Piazza San Marco, 17
25088 Toscolano Maderno (BS)
tel.: 0365 541662
'], [45.64886,10.61758, '
Bar Gelateria Castellari
Via P.Gaino, 47
25088 Toscolano Maderno (BS)
'], [45.6446724,10.6168594, '
Bar Gelateria Babo
Piazza Caduti, 1
25088 Toscolano Maderno (BS)
'], [ 45.641805, 10.6126, '
Ciocolat
Via Statale, 130
25088 Toscolano Maderno (BS)
tel.: 0365 541699
e-mail: florioli@alice.it
'], [45.643761,10.619252, '
Kyma Beach Bar & Food
Via Amerigo Vespucci,
25088 Toscolano Maderno (BS)
tel.: 0365 644195
e-mail: info@kymabeachbar.it
web: www.kymabeachbar.it
'], [45.662538,10.6373051, '
Ristorante Golf Bogliaco
Via del Golf, 21
25088 Toscolano Maderno (BS)
tel.: 0365 540548
e-mail: info@ristorantegolfbogliaco.it
web: www.ristorantegolfbogliaco.it
'], [45.644468,10.593806, '
Villa Dei Roccoli Di Tavella Pasquale
Via Sanico, 11
25088 Toscolano Maderno (BS)
tel.: 0365 541592
e-mail: ristorantevilladeiroccoli.com
'] ); var markers = new Array(); var mapOptions = { center: new google.maps.LatLng(45.640145031343, 10.607704513433), zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }; var map = new google.maps.Map(document.getElementById('map'), mapOptions); $.each(locations, function(index, location) { var marker = new google.maps.Marker({ position: new google.maps.LatLng(location[0], location[1]), map: map, icon: 'http://www.comune.toscolanomaderno.bs.it/personalizzazione/tpl/assets/img/marker-transparent.png' }); var myOptions = { content: location[2], disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-146, -190), zIndex: null, closeBoxMargin: "0px -15px -15px 0px", closeBoxURL: "http://www.comune.toscolanomaderno.bs.it/personalizzazione/tpl/assets/img/close-button.png", infoBoxClearance: new google.maps.Size(1, 1), position: new google.maps.LatLng(location[0], location[1]), isHidden: false, pane: "floatPane", enableEventPropagation: false }; marker.infobox = new InfoBox(myOptions); marker.infobox.isOpen = false; var myOptions = { draggable: true, content: '
', disableAutoPan: true, pixelOffset: new google.maps.Size(-21, -58), position: new google.maps.LatLng(location[0], location[1]), closeBoxURL: "", isHidden: false, // pane: "mapPane", enableEventPropagation: true }; marker.marker = new InfoBox(myOptions); marker.marker.open(map, marker); markers.push(marker); google.maps.event.addListener(marker, "click", function (e) { var curMarker = this; $.each(markers, function (index, marker) { // if marker is not the clicked marker, close the marker if (marker !== curMarker) { marker.infobox.close(); marker.infobox.isOpen = false; } }); if(curMarker.infobox.isOpen === false) { curMarker.infobox.open(map, this); curMarker.infobox.isOpen = true; map.panTo(curMarker.getPosition()); } else { curMarker.infobox.close(); curMarker.infobox.isOpen = false; } }); }); } function InitMap() { google.maps.event.addDomListener(window, 'load', LoadMap); google.maps.event.addDomListener(window, 'load', LoadMapProperty); }