Avvocati Penalisti

' + '
' + '
' + ''; }}); container.on('shown.bs.sabaipopover', function(){ if (slid) return; var label = container.find('.sabai-directory-search-radius-label strong').text(radius.val()); container.find('.sabai-directory-search-radius-slider').slider({animate: true, min: 0, max: 100, value: radius.val(), step: 1, slide: function(e, ui){ radius.val(ui.value); label.text(ui.value); }}); if (navigator.geolocation) { container.find('.sabai-directory-search-geolocate').show().click(function(e){ var $this = $(this); SABAI.ajaxLoader($this); e.preventDefault(); if (!geocoder) geocoder = new google.maps.Geocoder(); navigator.geolocation.getCurrentPosition( function (pos) { geocoder.geocode({'latLng': new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude)}, function(results, status) { SABAI.ajaxLoader($this, true); if (status == google.maps.GeocoderStatus.OK) { location.typeahead('val', results[0].formatted_address); location.effect('highlight', {}, 2000); $('#sabai-inline-content-directory-search .sabai-directory-search-location input[name="center"]') .val(results[0].geometry.location.lat() + ',' + results[0].geometry.location.lng()); } }); }, function (error) {SABAI.ajaxLoader($this, true);}, {enableHighAccuracy:true, timeout:5000} ); }); } slid = true; }); }); $('#sabai-inline-content-directory-search .sabai-directory-search-submit .sabai-btn').click(function(e){ var $this = $(this), form = $this.closest('form'); e.preventDefault(); form.find('[placeholder]').each(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); } }); var submit = function(){ SABAI.ajax({ type: 'get', target: '#sabai-directory-listings', scrollTo: '#sabai-directory-listings', url: form.attr('action') + '&' + form.serialize(), pushState: true }); }; var center = $('#sabai-inline-content-directory-search .sabai-directory-search-location input[name="center"]'); if (location.val()) { if (!center.val()) { if (!geocoder) geocoder = new google.maps.Geocoder(); geocoder.geocode({address: location.val()}, function(results, status) { switch (status) { case google.maps.GeocoderStatus.OK: center.val(results[0].geometry.location.lat() + ',' + results[0].geometry.location.lng()); submit(); break; case google.maps.GeocoderStatus.ZERO_RESULTS: alert('Invalid location'); break; default: alert(status); } }); } else { submit(); } } else { center.val(''); submit(); } }); });
Visualizzazione di 4 risultati