fbq('trackCustom', 'PageView_Tree'); var what; var minombre; var miwhatsapp; var mireferidonombre; var mireferidowhatsapp; var codigo; var txt; function getDeviceType() { const ua = navigator.userAgent; if (/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(ua)) { return "tablet"; } if ( /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test( ua ) ) { return "Movil"; } return "Desktop"; }; function cargarOpiniones(pCO){ //console.log(pCO) if (pCO['places'] != undefined){ $('#modal_opiniones').find('[titulo_opiniones] [name]').each(function(){ var e = $(this); //console.log(e.attr('name')); if (pCO['places'][e.attr('name')] != undefined){ e.text(pCO['places'][e.attr('name')]); } }) $('#modal_opiniones').find('[titulo_opiniones]').removeClass('hide'); $('[google_puntaje]').text(pCO['places']['rating']) var rRating = Math.round(pCO['places']['rating']); for (i = 1; i <= rRating; i++){ var estrella = $('#modal_opiniones').find('[estrella_amarilla_gde][nuevo]').clone(true); estrella.removeClass('hide'); estrella.removeAttr('nuevo'); $('#modal_opiniones').find('[lista_estrellas_gde]').append(estrella); } for (i = rRating + 1; i <= 5; i++){ var estrella = $('#modal_opiniones').find('[estrella_gris_gde][nuevo]').clone(true); estrella.removeClass('hide'); estrella.removeAttr('nuevo'); $('#modal_opiniones').find('[lista_estrellas_gde]').append(estrella); } $.each(pCO['places']['reviews'], function(k, oItem) { if (oItem['rating'] >= 4){ //console.log(oItem); var opinion = $('#modal_opiniones').find('[opinion][nuevo]').clone(true); opinion.removeClass('hide'); opinion.removeAttr('nuevo'); opinion.find('[name]').each(function(){ var e = $(this); //console.log(e.attr('name')); if (oItem[e.attr('name')] != undefined){ e.text(oItem[e.attr('name')]); } }) opinion.find('[foto]').attr('src', oItem['profile_photo_url']); var rRating = Math.round(oItem['rating']); for (i = 1; i <= rRating; i++){ var estrella = $('#modal_opiniones').find('[estrella_amarilla_peq][nuevo]').clone(true); estrella.removeClass('hide'); estrella.removeAttr('nuevo'); opinion.find('[lista_estrellas]').append(estrella); } for (i = rRating + 1; i <= 5; i++){ var estrella = $('#modal_opiniones').find('[estrella_gris_peq][nuevo]').clone(true); estrella.removeClass('hide'); estrella.removeAttr('nuevo'); opinion.find('[lista_estrellas]').append(estrella); } $('#modal_opiniones').find('[lista_opiniones]').append(opinion); } }) } $('[div_ver_opiniones]').removeClass('hide') } function initMap() { const map = new google.maps.Map(document.getElementById("map"), { center: { lat: -33.866, lng: 151.196 }, zoom: 15, }); const request = { placeId: "ChIJfWssacWhMI4RsbHHPVGciGE", fields: ["name", "formatted_address", "place_id", "geometry", "opening_hours", "rating", "reviews", "user_ratings_total"], }; const infowindow = new google.maps.InfoWindow(); const service = new google.maps.places.PlacesService(map); service.getDetails(request, (place, status) => { if ( status === google.maps.places.PlacesServiceStatus.OK && place && place.geometry && place.geometry.location ) { const marker = new google.maps.Marker({ map, position: place.geometry.location, }); /* console.log("opening_hours", place.opening_hours) console.log("rating", typeof place.rating) console.log("reviews", place.reviews) console.log("user_ratings_total", place.user_ratings_total) */ var dS = {}; dS['array'] = {}; dS['accion']= '1772465282e83b85549dc7864e8f90da'; dS['json']= true; dS['array']['a5a13c6772a0db4640411726fc7b728d'] = 'places'; dS['array']['1c5a2160fdf108124cfe98b1cd89232b'] = {}; dS['array']['1c5a2160fdf108124cfe98b1cd89232b']['opening_hours'] = place.opening_hours.weekday_text; dS['array']['1c5a2160fdf108124cfe98b1cd89232b']['rating'] = place.rating; dS['array']['1c5a2160fdf108124cfe98b1cd89232b']['reviews'] = place.reviews; dS['array']['1c5a2160fdf108124cfe98b1cd89232b']['user_ratings_total'] = place.user_ratings_total; cargarOpiniones({'places': dS['array']['1c5a2160fdf108124cfe98b1cd89232b']}); p =({'data': dS}); if (f9450182465036c1e6c451dbd65016efe(p)){ //console.log(j);return; oGetData = jQuery.parseJSON(j); //console.log(oGetData); } google.maps.event.addListener(marker, "click", () => { const content = document.createElement("div"); const nameElement = document.createElement("h2"); nameElement.textContent = place.name; content.appendChild(nameElement); const placeIdElement = document.createElement("p"); placeIdElement.textContent = place.place_id; content.appendChild(placeIdElement); const placeAddressElement = document.createElement("p"); placeAddressElement.textContent = place.formatted_address; content.appendChild(placeAddressElement); infowindow.setContent(content); infowindow.open(map, marker); }); } }); } function myNavFunc(){ // If it's an iPhone.. var sLink = "https://g.page/kibbes-fusion-sur?share"; if( (navigator.platform.indexOf("iPhone") != -1) || (navigator.platform.indexOf("iPod") != -1) || (navigator.platform.indexOf("iPad") != -1)) window.open(sLink); else window.open(sLink); } autoplay(); function autoplay() { $('.carousel').carousel('next'); setTimeout(autoplay, 4500); } String.prototype.replaceArray = function(find, replace) { var replaceString = this; for (var i = 0; i < find.length; i++) { replaceString = replaceString.replaceAll(find[i], replace[i]); } return replaceString; };