{"version":3,"sources":["app/js/app.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtJA;AAAA","file":"public/js/app.js","sourcesContent":["\"use strict\";\n\nvar Headroom = require('headroom.js');\nvar jQueryBridget = require('jquery-bridget');\nvar Masonry = require('masonry-layout');\njQueryBridget( 'masonry', Masonry, $ );\nrequire('bootstrap');\nrequire('bootstrap-select');\nrequire('moment/locale/it.js');\nrequire('tempusdominus-bootstrap-4');\n\n(function( $ ) {\n\n\t$.fn.setImg = function() {\n\t\tvar bg = $(this).data('img');\n\t\t$(this).css({\n\t\t\t'background-image': 'url(' + bg + ')'\n\t\t});\n\t};\n\n\t$(function() {\n \n\t\t$('.imgToDiv').each(function(index, elem) {\n\t\t\t$(elem).setImg();\n\t\t});\n\n\t\t$('select').selectpicker({\n\t\t\twidth: '100%'\n\t\t});\n\n\t\t$('.datetimepicker-input').datetimepicker({\n\t\t\tlocale: 'it',\n\t\t\tformat: 'L'\n\t\t});\n\n\t\tvar header = document.querySelector(\".header.headroom\");\n\t\tif(header) {\n\t\t\tvar headroom = new Headroom(header, {\n\t\t\t\toffset: 599\n\t\t\t});\n\t\t\theadroom.init();\n\t\t}\n\n\t\t$('.grid-socialwall').masonry({\n\t\t\titemSelector: '.grid-item',\n\t\t\tcolumnWidth: '.grid-sizer',\n\t\t\tpercentPosition: true\n\t\t});\n\n\t\t$('.top .arrow').on('click', function(e) {\n\t\t\te.preventDefault();\n\t\t\t$('html, body').animate({\n scrollTop: $(\".page-home .steps\").offset().top\n }, 300);\n\t\t});\n\n\t\t$('.footer .up').on('click', function(e) {\n\t\t\te.preventDefault();\n\t\t\t$('html, body').animate({\n scrollTop: 0\n }, 300);\n\t\t});\n\n\t\t$('.annulla').on('click', function(e) {\n\t\t\te.preventDefault();\n\t\t\t$('.dropdown-menu').removeClass('show');\n\t\t});\n\n\t\t$('.collapse').on('show.bs.collapse hide.bs.collapse', function() {\n\t\t\t$(this).prev('.collapse-toggle').find('img').toggleClass('rotated');\n\t\t});\n\n\t\tif($('#map').length) {\n\n\t\t\tvar infoBoxOptions = {\n\t\t\t\tisableAutoPan: false,\n\t\t\t\tmaxWidth: 0,\n\t\t\t\tpixelOffset: new google.maps.Size(-38, -264),\n\t\t\t\tzIndex: null,\n\t\t\t\tboxStyle: {\n\t\t\t\t\tpadding: \"0px 0px 0px 0px\",\n\t\t\t\t\twidth: \"250px\",\n\t\t\t\t\theight: \"250px\"\n\t \t},\n\t \tcloseBoxURL : \"\",\n\t \tinfoBoxClearance: new google.maps.Size(1, 1),\n\t \t\tisHidden: false,\n\t \t\tpane: \"floatPane\",\n\t \t\tenableEventPropagation: false\n\t\t\t};\n\t\t\tvar locations = $('#map').find('.marker');\n\t\t\tvar bounds = new google.maps.LatLngBounds();\n\t\t\tvar map;\n\t\t\tvar infowindow = new InfoBox(infoBoxOptions);\n\t\t var marker;\n\t\t var image;\n\t\t var latlng;\n\t\t var markers = [];\n\n\t\t\tmap = new google.maps.Map(document.getElementById('map'), {\n\t\t\t\tcenter: {lat: 45.69601, lng: 9.66721},\n\t\t\t\tzoom: 15,\n\t\t\t\tdisableDefaultUI: true\n\t\t\t});\n\n\t\t $(locations).each(function(index, location) {\n\n\t\t if($(location).data('tipo') == 'standard') {\n\t\t\t image = 'public/img/Marker_Standard.png';\n\t\t }\n\t\t else if($(location).data('tipo') == 'business') {\n\t\t \timage = 'public/img/Marker_Business.png';\n\t\t }\n\t\t else if($(location).data('tipo') == 'disattiva') {\n\t\t \timage = 'public/img/Marker_Disattiva.png';\n\t\t }\n\t\t latlng = new google.maps.LatLng($(location).data('lat'), $(location).data('lng'));\n\t\t marker = new google.maps.Marker({\n\t\t position: latlng,\n\t\t map: map,\n\t\t icon: image\n\t\t });\n\t\t markers.push(marker);\n \t\t bounds.extend(latlng);\n \t\t if($(location).html()) {\n\t\t\t google.maps.event.addListener(marker, 'click', (function(marker) {\n\t\t\t return function() {\n\t\t\t infowindow.setContent($(location).html());\n\t\t\t infowindow.open(map, marker);\n\t\t\t }\n\t\t\t })(marker));\n\t\t\t }\n\n\t\t \t});\n\n\t\t \tmap.fitBounds(bounds);\n\t\t \tif(markers.length == 1) {\n\t\t\t \tsetTimeout(function() {\n\t\t\t \t\tmap.setZoom(15);\n\t\t\t \t}, 250);\n\t\t \t}\n\n\t\t \tgoogle.maps.event.addListener(map, \"click\", function(event) {\n\t\t\t infowindow.close();\n\t\t\t});\n\n\t \t}\n\n\t});\n\n})(jQuery);"]}