jQuery.noConflict(); function changeColInUri(data,colfrom,colto){ var img=new Image(); img.src=data; img.style.visibility="hidden"; document.body.appendChild(img); var canvas=document.createElement("canvas"); canvas.id='canvas'; canvas.width=img.offsetWidth; canvas.height=img.offsetHeight; var ctx=canvas.getContext("2d"); ctx.drawImage(img,0,0); img.parentNode.removeChild(img); if(canvas.width!=0&&canvas!=undefined){ var imageData=ctx.getImageData(0,0,canvas.width,canvas.height); var data=imageData.data; var rgbfrom=hexToRGB(colfrom); var rgbto=hexToRGB(colto); var r,g,b; for(var x=0, len=data.length; x < len; x+=4){ r=data[x]; g=data[x+1]; b=data[x+2]; data[x]=rgbto.r; data[x+1]=rgbto.g; data[x+2]=rgbto.b; } ctx.putImageData(imageData,0,0); } return canvas.toDataURL(); } jQuery(document).ready(function($){ jQuery('#input-dropdown').find('li').each(function(){ var iconsrc=jQuery(this).find('img').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#41A6DF","#ffffff"); jQuery(this).prepend(''); }}); jQuery('.listing-single-cat').find('li').each(function(){ var iconsrc=jQuery(this).find('.base-icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#41A6DF","#ffffff"); jQuery(this).find('.base-icon').attr("src", changecolor); }}); jQuery('.user-portfolio ul.post-socials').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#41A6DF"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.blog-social ul.blog-social').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#41A6DF"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.user-info ul.social-icons').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#6e6e6e"); jQuery(this).find('.icon').attr("src", changecolor); }}); jQuery('.popup-post-left-bottom ul.social-icons').find('li').each(function(){ var iconsrc=jQuery(this).find('.icon').attr('src'); if(iconsrc!=''&&iconsrc!=undefined){ var changecolor=changeColInUri(iconsrc,"#ffffff","#6e6e6e"); jQuery(this).find('.icon').attr("src", changecolor); }}); }); var geocoderr; function lpGetGpsLocName(lpcalback){ if(navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ var clat=position.coords.latitude; var clong=position.coords.longitude; jpCodeLatLng(clat,clong, function(citynamevalue){ lpcalback(citynamevalue); }); }); }else{ alert("Geolocation is not supported by this browser."); }} function lpgeocodeinitialize(){ geocoderr=new google.maps.Geocoder(); } function jpCodeLatLng(lat, lng, lpcitycallback){ var geocoder; geocoder=new google.maps.Geocoder(); var latlng=new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function(results, status){ if(status==google.maps.GeocoderStatus.OK){ if(results[0]){ var add=results[0].formatted_address ; var value=add.split(","); count=value.length; country=value[count-1]; state=value[count-2]; city=value[count-3]; lpcitycallback(city); }else{ console.log("address not found"); }}else{ console.log("Geocoder failed due to: " + status); }} ); /* latlng=new google.maps.LatLng(lat, lng), geocoderrr=new google.maps.Geocoder(); geocoderrr.geocode({'latLng': latlng}, function(results, status){ if(status==google.maps.GeocoderStatus.OK){ console.log(results); if(results[1]){ for (var i=0; i < results.length; i++){ if(results[i].types[0]==="locality"){ var city=results[i].address_components[0].short_name; var state=results[i].address_components[2].short_name; lpcitycallback(city); }} }else{console.log("No reverse geocode results.")}}else{console.log("Geocoder failed: " + status)}});*/ } jQuery(document).ready(function(){ lpgeocodeinitialize(); }); jQuery(document).ready(function(){ jQuery(document).on('click', '.lp-hide-show-price-features', function(){ var $this=jQuery(this); jQuery('.lp-hide-show-price-features').text('View All Features'); if(false==jQuery(this).next().is(':visible')){ jQuery(".lp-hide-show-price-features").removeClass('expanded'); } $this.toggleClass('MoreDetails'); if($this.hasClass('MoreDetails')){ $this.text('Hide All Features'); jQuery(".lp-price-list").fadeIn('400'); }else{ $this.text('View All Features'); jQuery(".lp-price-list").fadeOut('400'); }}); }); jQuery(document).ready(function (){ jQuery('.lp-price-cats-with-icon li input[type=radio]').click(function (){ jQuery('.lp-price-cats-with-icon li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio"); jQuery('.lp-price-cats-with-icon li input[type=radio]:checked').parent().addClass("active-category-radio"); }); }); jQuery(document).ready(function (){ jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]').click(function (){ jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:not(:checked)').parent().removeClass("active-category-radio-v2"); jQuery('.lp-price-cats-with-icon-v2 li input[type=radio]:checked').parent().addClass("active-category-radio-v2"); }); }); jQuery(document).ready(function (){ jQuery(document).on('click', '.horizontal_view_list li input[type=radio]', function(){ jQuery('.horizontal_view_list li input[type=radio]:not(:checked)').parent('label').removeClass("price_plan_active_disable"); jQuery('.horizontal_view_list li input[type=radio]:checked').parent('label').addClass("price_plan_active_disable"); jQuery('.lp_hori_view_plan_left_section').removeClass('horizontal_choose_button'); jQuery(this).closest('.lp_hori_view_plan_left_section').addClass('horizontal_choose_button'); jQuery(this).closest('.lp-horizontial-specific').addClass('lp-horizontial-specific-height'); }); jQuery(document).on('click', '.lp-standerd-exlusiv button', function(event){ jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height'); }); jQuery(document).on('click', '.lp_button_switcher span', function(event){ jQuery('.lp-horizontial-specific').removeClass('lp-horizontial-specific-height'); }); jQuery('.horizontal_view_list li:nth(0) input[type=radio]').trigger('click').parent('label').addClass("price_plan_active_disable"); }); jQuery(document).ready(function(){ var x=jQuery('.lp_category_list_slide').children(); for (i=0; i < x.length ; i +=1){ x.slice(i,i+1).wrapAll('
'); } if(jQuery('.lp_category_list_slide').length!=0){ jQuery('.lp_category_list_slide').slick({ slidesToShow: 5, slidesToScroll: 1, prevNext: true, arrows: true, dots: false, responsive: [ { breakpoint: 768, settings: { arrows: true, infinite: false, slidesToShow: 4, slidesToScroll: 1 }}, { breakpoint: 481, settings: { arrows: true, infinite: false, slidesToShow: 3, slidesToScroll: 1 }}, { breakpoint: 390, settings: { arrows: true, infinite: false, slidesToShow: 2, slidesToScroll: 1 }} ] }); }}); /*jQuery(document).ready(function(){ jQuery('.slider_pricing_Plan').slick({ slidesToShow: 3, slidesToScroll: 1, arrows: true, fade: true, dots: true, arrows:true }); });*/ jQuery(document).ready(function(){ jQuery('#category_dropdown').on('select2:select', function (e){ $this=jQuery(this); jQuery("body").addClass("listingpro-loading"); jQuery('#cats-selected-plans').html(''); var templatestyle=jQuery(this).closest('#select_style').data('style'); jQuery.ajax({ type: 'POST', dataType: 'json', url: ajax_term_object.ajaxurl, data: { 'action': 'listingpro_select_plan_by_cat', 'term_id': $this.val(), 'templatestyle': templatestyle, }, success: function(data){ jQuery("body").removeClass("listingpro-loading"); if(data.plans){ jQuery('#cats-selected-plans').html(data.plans); var $hiddenField=''; jQuery($hiddenField).appendTo(".price-plan-button"); }} }); }); }); jQuery(document).ready(function(){ jQuery('.tooltip_price_features span').on('mouseover', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible"); }); jQuery('.tooltip_price_features span').on('mouseout', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden"); }); }); jQuery(document).ready(function(){ jQuery(document).on('mouseover', '.tooltip_price_features span', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","visible"); }); jQuery(document).on('mouseout', '.tooltip_price_features span', function(){ var $this=jQuery(this); $this.closest('.tooltip_price_features').find('.lp_tooltip_text').css("visibility","hidden"); }); }); jQuery.noConflict(); jQuery(window).on('resize load live', function (){ jQuery(window).resize(function (){ if(jQuery(window).width() <=768){ jQuery('a.open-map-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').addClass('open-map'); jQuery('header').addClass('map-view-content'); }); jQuery('a.open-img-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').removeClass('open-map'); jQuery('header').removeClass('map-view-content'); }); if(jQuery('#wpadminbar').length > 0){ jQuery('html body').css('margin-top','-46px'); }}else{ jQuery('.sidemap-container').removeClass('open-map'); if(jQuery('#wpadminbar').length > 0){ jQuery('html body').css('margin-top','0px'); } jQuery('a.open-map-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').addClass('open-map'); jQuery('header').addClass('map-view-content'); }); jQuery('a.open-img-view').on('click', function(event){ event.preventDefault(); jQuery('.sidemap-container').removeClass('open-map'); jQuery('header').removeClass('map-view-content'); }); } if(jQuery(window).width() <=480){ jQuery('#more_filters').hide(); }else{ jQuery('#more_filters').show(); }}); }); jQuery(document).ready(function(){ jQuery('.lp_cancel_notic').click(function (e){ e.preventDefault(); jQuery('.lp_notification_wrapper').slideToggle(400); }) jQuery('.claimformtrigger2').click(function(){ jQuery('header').addClass('lp-head-zindex'); }) jQuery('.lp-click-zindex').click(function(){ jQuery('header').removeClass('lp-head-zindex'); }); jQuery('.lp-tagline-submit-tagline label input[type="checkbox"]').click(function(event){ if(jQuery(this).prop("checked")==true){ jQuery(".with-title-cond").fadeIn(700); }else if(jQuery(this).prop("checked")==false){ jQuery(".with-title-cond").fadeOut(700); }}); jQuery('.stickynavbar ul li').each(function (e){ var tagetID=jQuery(this).find('a').attr('href'); if(jQuery(tagetID).length==0){ jQuery(this).remove(); }}); var hh=jQuery('header').outerHeight(); var ab=jQuery('.absolute'); ab.css('top', hh); if(jQuery('.chosen-container').length > 0){ jQuery('.chosen-container').on('touchstart', function(e){ e.stopPropagation(); e.preventDefault(); jQuery(this).trigger('mousedown'); }); } jQuery('#see_filter').on('click', function(event){ event.preventDefault(); var filter=jQuery('#more_filters'); jQuery(this).next('#more_filters').toggleClass('open_filter'); if(filter.hasClass('open_filter')){ jQuery(this).next('#more_filters').slideDown(400); }else{ jQuery(this).next('#more_filters').slideUp(400); };}); }); jQuery(document).ready(function($){ var loc=jQuery('.ui-widget').data('option'); var apiType=jQuery('#page').data('ipapi'); var currentlocationswitch='1'; currentlocationswitch=jQuery('#page').data('lpcurrentloconhome'); if(currentlocationswitch=="0"){ loc='locationifoff'; jQuery('.lp-location-search .ui-widget > i').fadeOut('fast'); } if(loc=='yes'){ if(jQuery('.form-group').is('.lp-location-search')||jQuery('.form-group').is('.lp-location-inner-search')){ if(apiType==="geo_ip_db"){ jQuery.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(lpgpsclocation); jQuery('#searchlocation').find('#def_location').val(lpgpsclocation); jQuery('#cities').val(lpgpsclocation); jQuery('input[name=lp_s_loc]').val(lpgpsclocation); jQuery(".select2-selection__rendered").attr("title",lpgpsclocation).text(lpgpsclocation); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); }} }else if(loc=='no'){ jQuery('.lp-location-search .ui-widget > i').on('click', function(event){ event.preventDefault(); jQuery(this).addClass('fa-circle-o-notch fa-spin'); jQuery(this).removeClass('fa-crosshairs'); if(jQuery('.form-group').is('.lp-location-search')){ if(apiType==="geo_ip_db"){ jQuery.getJSON('https://geoip-db.com/json/geoip.php?jsonp=?') .done (function(location){ jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); if(location.city==null){ }else{ jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); } jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); } else if(apiType==="ip_api"){ jQuery.get("https://ipapi.co/json", function(location){ jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); if(location.city==null){ }else{ jQuery('#searchlocation').find('#def_location').text(location.city); jQuery('#searchlocation').find('#def_location').val(location.city); jQuery('#cities').val(location.city); jQuery('input[name=lp_s_loc]').val(location.city); } jQuery(".select2-selection__rendered").attr("title",location.city).text(location.city); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }, "json"); }else{ lpGetGpsLocName(function (lpgetcurrentcityvalue){ lpgpsclocation=lpgetcurrentcityvalue; jQuery('.chosen-single').addClass('remove-margin'); jQuery("#searchlocation").prop('disabled', true).trigger('chosen:updated'); jQuery('#searchlocation').find('#def_location').text(lpgpsclocation); jQuery('#searchlocation').find('#def_location').val(lpgpsclocation); jQuery('#cities').val(lpgpsclocation); jQuery('input[name=lp_s_loc]').val(lpgpsclocation); jQuery(".select2-selection__rendered").attr("title",lpgpsclocation).text(lpgpsclocation); jQuery("#searchlocation").prop('disabled', false).trigger('chosen:updated'); jQuery('.select2-selection__rendered').parent('.select2-selection').addClass('slide-right'); jQuery('.lp-location-search .ui-widget > i').fadeOut('slow'); }); }} }); } jQuery('#lp-new-ad-compaignForm').on('submit', function(e){ var $this=jQuery(this); if($this.data('type')=="adsperclick"){ totalPrice=jQuery('input[name="adsprice_pc"]').val(); }else{ totalPrice=jQuery('input[name="ads_price"]').val(); } method=jQuery('input[name="method"]:checked').val(); currency=$this.find('input[name="currency"]').val(); listing_id=jQuery('input[name=lp_ads_for_listing]').val(); listing_name=jQuery('input[name=lp_ads_title]').val(); taxRate=$this.find('input[name="taxprice"]').val(); if(listing_id===''||method===''){ alert(jQuery('input#ad-blank-errorMsg').val()); e.preventDefault(); } else if(method==='stripe'){ if(jQuery("li.taxpricein")[0]){ if(jQuery.trim(totalPrice)==''){}else{ $taxVal=jQuery('li.taxpricein h5 span').text(); $taxVal=parseInt($taxVal); $taxVal=$taxVal/100; $taxVal=$taxVal*totalPrice; $taxVal=$taxVal.toFixed(2); totalPrice=parseFloat($taxVal) + parseFloat(totalPrice); }} totalPrice=parseFloat(totalPrice)*100; totalPrice=parseFloat(totalPrice).toFixed(); handler.open({ name: listing_name, description: "", zipCode: true, amount: totalPrice, currency: currency }); e.preventDefault(); } else if(method==='2checkout'){ var packages=[]; jQuery('input.checked_class[type="checkbox"]:checked').each(function (){ packages.push($this.data('package')); }); jQuery('#myCCForm #tprice').val(totalPrice); jQuery('#myCCForm #listing_id_2check').val(listing_id); jQuery('#myCCForm #packages').val(packages); jQuery('#myCCForm #taxprice').val($this.find('input[name="taxprice"]').val()); jQuery("button.lp-2checkout-modal2").trigger('click'); e.preventDefault(); }}); }); jQuery(window).load(function(){ jQuery('.lp-suggested-search').on('click', function(event){ jQuery("#input-dropdown").niceScroll({ cursorcolor:"#363F48", cursoropacitymax: 1, boxzoom:false, cursorwidth: "10px", cursorborderradius: "0px", cursorborder: "0px solid #fff", touchbehavior:true, preventmultitouchscrolling: false, cursordragontouch: true, background: "#f7f7f7", horizrailenabled: false, autohidemode: false, zindex:"999999", }); }); jQuery('.notice a.close').on('click', function(event){ event.preventDefault(); jQuery(this).parent('.notice').fadeOut('slow'); }); jQuery('.lp-header-full-width .lp-menu-bar .header-filter, .lp-menu-bar .header-filter.pos-relative.form-group').css('display', 'block'); var logoH=jQuery('.lp-logo').outerHeight(); var acHgt=jQuery('.header-right-panel.clearfix'); var a=parseInt(logoH + 10); var b=jQuery('.header-right-panel').height(); var c=a - b; var d=c/2; acHgt.css({ 'padding-top': d+'px' }); jQuery('.rating-symbol:nth-child(1)').hover(function(){ jQuery('.review.angry').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.angry').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(2)').hover(function(){ jQuery('.review.cry').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.cry').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(3)').hover(function(){ jQuery('.review.sleeping').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.sleeping').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(4)').hover(function(){ jQuery('.review.smily').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.smily').css({ 'opacity': '0', 'visibility': 'hidden', }); }); jQuery('.rating-symbol:nth-child(5)').hover(function(){ jQuery('.review.cool').css({ 'opacity': '1', 'visibility': 'visible', }); }, function(){ jQuery('.review.cool').css({ 'opacity': '0', 'visibility': 'hidden', }); }); var rtngSym=jQuery('.rating-symbol'); var rtngTip=jQuery('input.rating-tooltip'); jQuery('.rating-symbol:first-of-type').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#de9147'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(2)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#de9147'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#de9147'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(3)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#dec435'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#dec435'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#dec435'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(4)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#c5de35'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(4) .rating-symbol-foreground span').css('color', '#c5de35'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); jQuery('.rating-symbol:nth-of-type(5)').hover(function(){ jQuery(this).closest('span').addClass('active-stars-wrap'); jQuery('.active-stars-wrap .rating-symbol:first-of-type .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(2) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(3) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(4) .rating-symbol-foreground span').css('color', '#73cf42'); jQuery('.active-stars-wrap .rating-symbol:nth-of-type(5) .rating-symbol-foreground span').css('color', '#73cf42'); }, function(){ jQuery('.active-stars-wrap').removeClass('active-stars-wrap'); }); rtngSym.on('click', function(event){ event.preventDefault(); var thsVal=jQuery('input.rating-tooltip').val(); if(thsVal==1){ jQuery('.review.angry').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.angry').removeClass('visible'); }; if(thsVal==2){ jQuery('.review.cry').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('cry'); jQuery('.rating-symbol:nth-of-type(2)').addClass('cry'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.cry').removeClass('visible'); }; if(thsVal==3){ jQuery('.review.sleeping').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('sleeping'); jQuery('.rating-symbol:nth-of-type(2)').addClass('sleeping'); jQuery('.rating-symbol:nth-of-type(3)').addClass('sleeping'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('smily'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.sleeping').removeClass('visible'); }; if(thsVal==4){ jQuery('.review.smily').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('smily'); jQuery('.rating-symbol:nth-of-type(2)').addClass('smily'); jQuery('.rating-symbol:nth-of-type(3)').addClass('smily'); jQuery('.rating-symbol:nth-of-type(4)').addClass('smily'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('cool'); }else{ jQuery('.review.smily').removeClass('visible'); }; if(thsVal==5){ jQuery('.review.cool').addClass('visible'); jQuery('.rating-symbol:first-of-type').addClass('cool'); jQuery('.rating-symbol:nth-of-type(2)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(3)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(4)').addClass('cool'); jQuery('.rating-symbol:nth-of-type(5)').addClass('cool'); jQuery('.rating-symbol').removeClass('angry'); jQuery('.rating-symbol').removeClass('cry'); jQuery('.rating-symbol').removeClass('sleeping'); jQuery('.rating-symbol').removeClass('smily'); }else{ jQuery('.review.cool').removeClass('visible'); }; var CheckMultiRatingState=jQuery('#rewies_form').data('multi-rating'); var ratingSumTotal=0; if(CheckMultiRatingState==1){ var activeRatingLength=jQuery('.lp-multi-rating-val').length; jQuery('.lp-multi-rating-val').each(function (index){ ratingSumTotal +=Number(jQuery(this).val()); }) var activeRatingClass=Math.round(ratingSumTotal/activeRatingLength); jQuery('.lp-review-stars').removeClass(function (index, css){ return (css.match (/\bactive-rating-avg\S+/g)||[]).join(' '); }); jQuery('.lp-review-stars').addClass('active-rating-avg'+activeRatingClass); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').removeClass('fa-star-o').addClass('fa-star'); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').prevAll('.fa-star-o').removeClass('fa-star-o').addClass('fa-star'); jQuery('.lp-review-stars i.fa:nth-child('+ Number(activeRatingClass+1) +')').nextAll('.fa-star').removeClass('fa-star-o').addClass('fa-star-o'); }}); }); jQuery(document).ready(function(){ 'use-strict'; var checkdInput=jQuery('.checkboxx input.checked_class'); checkdInput.on('change', function(event){ event.preventDefault(); if(checkdInput.is(':checked')){ jQuery('a#lp-next').css('display', 'block'); jQuery('a#lp-next').removeClass('hide'); jQuery('span.show').removeClass('show'); jQuery('.promotional-section > .lp-face.lp-pay-options.lp-dash-sec > span').addClass('hide'); }else{ jQuery('a#lp-next').addClass('hide'); jQuery('.promotional-section > .lp-face.lp-pay-options.lp-dash-sec > span').addClass('show'); };}); var rdoInput=jQuery('.lp-method-wrap input.radio_checked'); rdoInput.on('change', function(event){ event.preventDefault(); if(rdoInput.is(':checked')){ jQuery('input.lp-next2.promotebtn').css('display', 'block'); jQuery('input.lp-next2.promotebtn').removeClass('hide'); jQuery('.promotional-section span.proceed-btn').removeClass('show'); jQuery('.promotional-section span.proceed-btn').addClass('hide'); }else{ jQuery('input.lp-next2.promotebtn').addClass('hide'); jQuery('.promotional-section span.proceed-btn').addClass('show'); };}); jQuery('.promotional-section a.lp-submit-btn').on('click', function(event){ event.preventDefault(); jQuery(this).parent('.promotional-section').slideUp(500); jQuery(this).parent('.promotional-section').next('.lp-card > form#ads_promotion').slideDown(1000); }); var dash=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown > a'); var dashli=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown'); var dashul=jQuery('.dashboard-tabs.lp-main-tabs.text-center > ul > li.dropdown > ul'); dash.on('click', function(event){ event.preventDefault(); if(dashli.hasClass('opened')){ jQuery(dashli).removeClass('opened'); jQuery(dashul).removeClass('opened'); jQuery(this).parent('li').addClass('opened'); jQuery(this).next('ul').addClass('opened'); }else{ jQuery(dashul).removeClass('opened'); jQuery(dashli).removeClass('opened'); jQuery(this).parent('li').addClass('opened'); jQuery(this).next('ul').addClass('opened'); };}); jQuery('h3#reply-title').on('click', function(event){ event.preventDefault(); var thiss=jQuery(this); if(thiss.hasClass('active')){ jQuery(this).removeClass('active'); jQuery(this).next('#rewies_form').slideUp(); jQuery(this).next('#rewies_formm').slideUp(); }else{ jQuery(this).addClass('active'); jQuery(this).next('#rewies_form').slideDown(); jQuery(this).next('#rewies_formm').slideDown(); };}); jQuery('#clicktoreview').on('click', function(event){ event.preventDefault(); var thiss=jQuery('#reply-title'); thiss.addClass('active'); thiss.next('#rewies_form').slideDown(); thiss.next('#rewies_formm').slideDown(); jQuery('html, body').animate({ scrollTop: jQuery('#reply-title').offset().top }, 2000); }); jQuery('.leadformtrigger').on('click', function(e){ e.preventDefault(); jQuery('.app-view-lead-form').slideToggle(500); }); jQuery('.open-lead-form-app-view').on('click', function(e){ if(jQuery('.app-view-lead-form')[0]){ jQuery('.app-view-lead-form').slideToggle(500); jQuery('html, body').animate({ scrollTop: jQuery('.leadformtrigger').offset().top }, 2000); }}) jQuery('#rewies_form input[type=file]').change(function(e){ $in=jQuery(this); $in.prev().prev().text($in.val()); }); jQuery('a.grid').on('click', function(event){ event.preventDefault(); jQuery('a.list').removeClass('active'); jQuery(this).addClass('active'); jQuery('.listing-simple').removeClass('listing_list_view'); if(jQuery('#list-grid-view-v2').length!=0&&jQuery('#list-grid-view-v2').hasClass('swtch-ll')){ jQuery('#list-grid-view-v2').attr('data-layout-class', 'grid'); } if(jQuery('#content-grids').hasClass('v2-toggle')){ jQuery('.loop-switch-class').removeClass('col-md-12'); jQuery('.loop-switch-class').addClass('col-md-6'); jQuery('.lp-listings.active-view').removeClass('list-style'); jQuery('.lp-listings.active-view').addClass('grid-style'); }else{ jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); if(jQuery('#content-grids').hasClass('listing-with-header-filters-wrap')){ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); }else{ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-4 col-sm-12 grid_view2'); } jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-sm-12 list_view'); jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-md-6 col-sm-12 grid_view2'); }}); jQuery('a.list').on('click', function(event){ event.preventDefault(); jQuery('a.grid').removeClass('active'); jQuery(this).addClass('active'); jQuery('.listing-simple').addClass('listing_list_view'); if(jQuery('#list-grid-view-v2').length!=0&&jQuery('#list-grid-view-v2').hasClass('swtch-ll')){ jQuery('#list-grid-view-v2').attr('data-layout-class', 'list'); } if(jQuery('#content-grids').hasClass('v2-toggle')){ jQuery('.loop-switch-class').removeClass('col-md-6'); jQuery('.loop-switch-class').addClass('col-md-12'); jQuery('.lp-listings.active-view').addClass('list-style'); jQuery('.lp-listings.active-view').removeClass('grid-style'); }else{ jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view2'); jQuery('.post-with-map-container').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); if(jQuery('#content-grids').hasClass('listing-with-header-filters-wrap')){ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view2'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); }else{ jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-4 col-sm-6 grid_view2'); jQuery('.listing-simple').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); } jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').removeClass('col-md-6 col-sm-6 grid_view3'); jQuery('.listing-with-sidebar').find('.lp-grid-box-contianer.card1.lp-grid-box-contianer1').addClass('col-sm-12 list_view'); }}); jQuery('a.show-all-timings').on('click', function(event){ event.preventDefault(); jQuery(this).toggleClass('opened'); jQuery(this).next('ul.hidding-timings').slideToggle(400); }); jQuery(".detail-page2-tab-content .review-form h3").removeAttr("id"); jQuery('.listing-app-view .listing-app-view-bar .pricy-form-group #lp-find-near-me-outer ul > li > a').click(function(){ jQuery(this).toggleClass('margin-right-0 lp-remove-border'); }); var inputs=document.querySelectorAll('.inputfile'); Array.prototype.forEach.call(inputs, function(input){ var label=input.nextElementSibling, labelVal=label.innerHTML; input.addEventListener('change', function(e){ var fileName=''; if(this.files&&this.files.length > 1) fileName=(this.getAttribute('data-multiple-caption')||'').replace('{count}', this.files.length); else fileName=e.target.value.split('\\').pop(); if(fileName) label.querySelector('span').innerHTML=fileName; else label.innerHTML=labelVal; }); input.addEventListener('focus', function(){ input.classList.add('has-focus'); }); input.addEventListener('blur', function(){ input.classList.remove('has-focus'); }); }); if(jQuery('body').hasClass('home')||jQuery('body').hasClass('app-view-home')){ jQuery('.listing-app-view.home .map-view-list-container2,.listing-app-view.app-view-home .map-view-list-container2').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 2, dots: true, arrows: false }); jQuery('.listing-app-view.home .lp-location-slider,.listing-app-view.app-view-home .lp-location-slider').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 3, dots: true, arrows: false }); } if(jQuery('.listing-category-slider4').length > 0){ jQuery('.listing-category-slider4').slick({ centerMode: false, centerPadding: '0px', infinite: true, accesibility: false, draggable: true, swipe: true, touchMove: false, autoplaySpeed: 1400, speed: 100, slidesToShow: 4, dots: false, arrows: true, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 4 }}, { breakpoint: 480, settings: { arrows: false, centerMode: false, centerPadding: '0px', slidesToShow: 1 }} ] }); } jQuery('#map-view-icon2').click(function (){ jQuery("#search-filter-attr-filter").animate({width: "toggle"}, 5); }); jQuery("#app-view-login-popup .signUpClick").on('click' , function(){ jQuery('.signInClick').removeClass('active'); jQuery('.siginincontainer2').hide(); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginupcontainer2').fadeIn(); jQuery(this).addClass('active'); }); jQuery("#app-view-login-popup .signInClick").on('click' , function(){ jQuery('.signUpClick').removeClass('active'); jQuery(this).addClass('active'); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginupcontainer2').hide(); jQuery('.siginincontainer2').fadeIn(); }); jQuery("#app-view-login-popup .forgetPasswordClick").on('click' , function(){ jQuery('.siginupcontainer2').hide(); jQuery('.siginincontainer2').hide(); jQuery('.forgetpasswordcontainer2').fadeIn(); }); jQuery("#app-view-login-popup .cancelClick").on('click' , function(){ jQuery('.siginupcontainer2').hide(); jQuery('.forgetpasswordcontainer2').hide(); jQuery('.siginincontainer2').fadeIn(); }); jQuery('.listing-app-view .lp-search-toggle .user-menu').click(function(e){ jQuery(".lp-user-menu").toggleClass("main"); }); jQuery(document).mouseup(function(e){ var container=jQuery(".lp-user-menu"); if(!container.is(e.target)&&container.has(e.target).length===0){ jQuery('.lp-user-menu').removeClass('main'); }}); jQuery('.lp-detail-page-template-3 #clicktoreview2').on('click', function(event){ event.preventDefault(); jQuery(".single-tabber2 ul li").removeClass('active'); jQuery(".detail-page2-tab-content .tab-content .tab-pane").removeClass('active'); jQuery('.single-tabber2 ul .lpreviews').addClass('active'); jQuery('.detail-page2-tab-content .tab-content .lpreviews').addClass('active'); }); jQuery('[data-toggle="tooltip"]').tooltip(); jQuery('a.see_more_btn').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); if($this.hasClass('closedd')){ $this.removeClass('closedd'); $this.addClass('openedd'); jQuery(this).find('i').removeClass('fa-arrow-down'); jQuery(this).find('i').addClass('fa-arrow-up'); }else{ $this.removeClass('openedd'); $this.addClass('closedd'); jQuery(this).find('i').removeClass('fa-arrow-up'); jQuery(this).find('i').addClass('fa-arrow-down'); } jQuery(this).next('.review-content').slideToggle(200); }); jQuery('a.open-reply').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); if($this.hasClass('closeddd')){ $this.removeClass('closeddd'); $this.addClass('openeddd'); jQuery(this).find('i').removeClass('fa-arrow-down'); jQuery(this).find('i').addClass('fa-arrow-up'); }else{ $this.removeClass('openeddd'); $this.addClass('closeddd'); jQuery(this).find('i').removeClass('fa-arrow-up'); jQuery(this).find('i').addClass('fa-arrow-down'); } jQuery(this).next('.post_response').slideToggle(200); }); jQuery('button.add-hours').on('click', function(event){ event.preventDefault(); var $this=jQuery(this); var lp2times=$this.closest('#day-hours-BusinessHours').data('lpenabletwotimes'); var error=false; var fullday=''; var fullhoursclass=''; var lpdash="~"; if(lp2times=="disable"){ var weekday=jQuery('select.weekday').val(); if(jQuery(".fulldayopen").is(":checked")){ jQuery('.fulldayopen').attr('checked', false); jQuery('select.hours-start').prop("disabled", false); jQuery('select.hours-end').prop("disabled", false); var startVal=''; var endVal=''; var hrstart=''; var hrend=''; fullday=$this.data('fullday'); fullhoursclass='fullhours'; lpdash=""; }else{ var startVal=jQuery('select.hours-start').val(); var endVal=jQuery('select.hours-end').val(); var hrstart=jQuery('select.hours-start').find('option:selected').val(); var hrend=jQuery('select.hours-end').find('option:selected').val(); var startVal_digit=hrstart.replace(':', ''); var endVal_digit=hrend.replace(':', ''); if(startVal_digit.indexOf('am') > -1){ startVal_digit=startVal_digit.replace('am', ''); } else if(startVal_digit.indexOf('pm') > -1){ startVal_digit=startVal_digit.replace('pm', ''); if(startVal_digit!='1200'&&startVal_digit!='1230'){ startVal_digit=parseInt(startVal_digit) + 1200; }} if(endVal_digit.indexOf('am') > -1){ endVal_digit=endVal_digit.replace('am', ''); endVal_digit=parseInt(endVal_digit); if(endVal_digit >=1200){ endVal_digit=parseInt(endVal_digit) - 1200; }} else if(endVal_digit.indexOf('pm') > -1){ endVal_digit=endVal_digit.replace('pm', ''); endVal_digit=parseInt(endVal_digit) + 1200; } if(startVal_digit > endVal_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday=weekday+"~"+nextWeekday; }} var sorryMsg=jQuery(this).data('sorrymsg'); var alreadyadded=jQuery(this).data('alreadyadded'); if($this.hasClass('lp-add-hours-st')){ var remove=''; }else{ var remove=jQuery(this).data('remove'); } jQuery('.hours-display .hours').each(function(index, element){ var weekdayTExt=jQuery(element).children('.weekday').text(); if(weekdayTExt==weekday){ alert(sorryMsg+'! '+weekday+' '+alreadyadded); error=true; }}); if(error!=true){ jQuery('.hours-display').append(""); var current=jQuery('select.weekday').find('option:selected'); var nextval=current.next(); current.removeAttr('selected'); nextval.attr('selected','selected'); jQuery('select.weekday').trigger('change.select2'); }}else{ var lptwentlyfourisopen=''; var weekday=jQuery('select.weekday').val(); var weekday1=weekday; var weekday2=weekday; if(jQuery(".fulldayopen").is(":checked")){ lptwentlyfourisopen='yes'; jQuery('.fulldayopen').attr('checked', false); jQuery('select.hours-start').prop("disabled", false); jQuery('select.hours-end').prop("disabled", false); jQuery('select.hours-start2').prop("disabled", false); jQuery('select.hours-end2').prop("disabled", false); var startVal1=''; var endVal1=''; var hrstart1=''; var hrend1=''; var startVal2=''; var endVal2=''; var hrstart2=''; var hrend2=''; fullday=$this.data('fullday'); fullhoursclass='fullhours'; lpdash=""; }else{ var startVal1=jQuery('select.hours-start').val(); var endVal1=jQuery('select.hours-end').val(); var hrstart1=jQuery('select.hours-start').find('option:selected').val(); var hrend1=jQuery('select.hours-end').find('option:selected').val(); var startVal1_digit=hrstart1.replace(':', ''); var endVal1_digit=hrend1.replace(':', ''); if(startVal1_digit.indexOf('am') > -1){ startVal1_digit=startVal1_digit.replace('am', ''); } else if(startVal1_digit.indexOf('pm') > -1){ startVal1_digit=startVal1_digit.replace('pm', ''); if(startVal1_digit!='1200'&&startVal1_digit!='1230'){ startVal1_digit=parseInt(startVal1_digit) + 1200; }} if(endVal1_digit.indexOf('am') > -1){ endVal1_digit=endVal1_digit.replace('am', ''); endVal1_digit=parseInt(endVal1_digit); if(endVal1_digit >=1200){ endVal1_digit=parseInt(endVal1_digit) - 1200; }} else if(endVal1_digit.indexOf('pm') > -1){ endVal1_digit=endVal1_digit.replace('pm', ''); endVal1_digit=parseInt(endVal1_digit) + 1200; } if(startVal1_digit > endVal1_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday1=weekday+"~"+nextWeekday; } var startVal2=jQuery('select.hours-start2').val(); var endVal2=jQuery('select.hours-end2').val(); var hrstart2=jQuery('select.hours-start2').find('option:selected').text(); var hrend2=jQuery('select.hours-end2').find('option:selected').text(); var startVal2_digit=hrstart2.replace(':', ''); var endVal2_digit=hrend2.replace(':', ''); if(startVal2_digit.indexOf('am') > -1){ startVal2_digit=startVal2_digit.replace('am', ''); } else if(startVal2_digit.indexOf('pm') > -1){ startVal2_digit=startVal2_digit.replace('pm', ''); if(startVal2_digit!='1200'&&startVal2_digit!='1230'){ startVal2_digit=parseInt(startVal2_digit) + 1200; }} if(endVal2_digit.indexOf('am') > -1){ endVal2_digit=endVal2_digit.replace('am', ''); endVal2_digit=parseInt(endVal2_digit); if(endVal2_digit >=1200){ endVal2_digit=parseInt(endVal2_digit) - 1200; }} else if(endVal2_digit.indexOf('pm') > -1){ endVal2_digit=endVal2_digit.replace('pm', ''); endVal2_digit=parseInt(endVal2_digit) + 1200; } if(startVal2_digit > endVal2_digit){ nextWeekday=jQuery("select.weekday option:selected+option").val(); if(typeof nextWeekday==="undefined"){ nextWeekday=jQuery("select.weekday").find("option:first-child").val(); } weekday2=weekday+"~"+nextWeekday; }} var sorryMsg=jQuery(this).data('sorrymsg'); var alreadyadded=jQuery(this).data('alreadyadded'); if($this.hasClass('lp-add-hours-st')){ var remove=''; }else{ var remove=jQuery(this).data('remove'); } jQuery('.hours-display .hours').each(function(index, element){ var weekdayTExt=jQuery(element).children('.weekday').text(); if(weekdayTExt==weekday){ alert(sorryMsg+'! '+weekday+' '+alreadyadded); error=true; }}); if(error!=true){ if((jQuery(".lp-check-doubletime .enable2ndday").is(":checked"))&&(lptwentlyfourisopen==="")){ jQuery('.hours-display').append("'+LPaddress+'
'+LPaddress+'
'+ errMsg +'
'); }}); jQuery(document).ready(function(){ jQuery('.lp-event-view-less').click(function(e){ e.preventDefault(); var lessText=jQuery(this).data('contract'); var moreText=jQuery(this).data('expand'); if(jQuery(this).hasClass('event-shown')){ jQuery(this).removeClass('event-shown'); jQuery(this).html(moreText); jQuery('.lp-attende-extra').removeClass('active'); }else{ jQuery(this).addClass('event-shown'); jQuery('.lp-attende-extra').addClass('active'); jQuery(this).html(lessText); }}); function initializeEventAddr(){ if(jQuery('.event-addr').length > 0){ jQuery('.event-addr').each(function(index){ var input=document.getElementById(jQuery(this).attr('id')); var autocomplete=new google.maps.places.Autocomplete(input); google.maps.event.addListener(autocomplete, 'place_changed', function (){ var place=autocomplete.getPlace(); var lat=place.geometry.location.lat(); var lon=place.geometry.location.lng(); jQuery('input.latitude').val(lat); jQuery('input.longitude').val(lon); }); }); }} google.maps.event.addDomListener(window, 'load', initializeEventAddr); }); jQuery(document).on('click', 'span.remove-menu-img', function (e){ e.preventDefault(); var targetID=jQuery(this).data('target'), targetSrc=jQuery(this).data('src')+',', targetImgs=jQuery('.active-upload').find('.frontend-input-multiple').val(); if(targetImgs==undefined){ targetImgs=jQuery('#'+targetID).val(); } targetImgs=targetImgs.replace(targetSrc, ''); jQuery(this).closest('.menu-edit-img-wrap').remove(); jQuery('input#'+targetID).val(targetImgs); }); jQuery(document).on('click', '.select2-results ul li', function(e){ jQuery('.lp-pp-noa-tip').fadeIn(); }); jQuery('.select2-ajax-unique').on('select2:select', function (e){ jQuery('.lp-pp-noa-tip').fadeOut(); }); jQuery('.select2-ajax').on('select2:select', function (e){ jQuery('.lp-pp-noa-tip').fadeOut(); }); jQuery(document).on('click', '.remove-event-img', function (e){ e.preventDefault(); var $this=jQuery(this); if($this.hasClass('remove-eei')){ var targetID=$this.data('targetid'); $this.closest('.removeable-image').find('.frontend-image').attr('src', ''); $this.closest('.removeable-image').find('.lp-uploaded-img').attr('src', ''); $this.closest('.removeable-image').find('.frontend-input').val(''); jQuery('#event-old-img-'+targetID).val(''); $this.remove(); }else{ $this.closest('.removeable-image').find('.frontend-image').attr('src', ''); $this.closest('.removeable-image').find('.frontend-input').val(''); $this.remove(); }}); jQuery(document).ready(function(){ jQuery('#reservaListing').select2({ ajax: { url: ajax_search_term_object.ajaxurl, dataType: 'json', type:'GET', data: function (params){ return { q: params.term, action: 'select2_ajax_dashbaord_listing_booking' }; console.log(params); }, processResults: function(data){ var options=[]; if(data){ jQuery.each(data, function(index, text){ options.push({ id: text[0], text: text[1] }); }); } return { results: options };}, cache: true }, minimumInputLength: 3 }); }); jQuery(document).on('click', '.lp-copy-code', function (e){ e.preventDefault(); var $this=jQuery(this); var targetCodeEL=jQuery(this).data('target-code'), thisHtml=jQuery(this).data('html'), targetCodeELC='.'+targetCodeEL; if($this.hasClass('close-copy-pop')){ jQuery(targetCodeELC).animate({ bottom: '-'+ jQuery(targetCodeELC).height() +'px' }, 500, function (e){ $this.html(thisHtml); $this.removeClass('close-copy-pop'); }); }else{ var bottomPlus=0; if($this.hasClass('lp-discount-btn')){ bottomPlus=49; } jQuery(targetCodeELC).animate({ bottom: bottomPlus+'px' }, 500, function (e){ if($this.hasClass('lp-discount-btn')){ $this.addClass('close-copy-pop'); $this.html(''); }}); }}); jQuery(document).on('click', '.close-right-icon', function (e){ e.preventDefault(); var $this=jQuery(this), target='.'+$this.data('target'); jQuery(target).animate({ bottom: '-'+jQuery(target).height()+'px' }); }); jQuery(document).on('click', '.copy-now', function (e){ e.preventDefault(); var targetCodeEL=jQuery(this).data('target-code'), targetCodeELC='#'+targetCodeEL; jQuery(targetCodeELC).find('input[type="text"]').select(); document.execCommand ("copy"); jQuery(targetCodeELC).find('.dis-code-copy-pop-inner-cell').find('p:first-child').text(jQuery('.copy-now').data('coppied-label')); }); jQuery(document).on('click', '.lp-pagination.author-reviews-pagination span', function (e){ e.preventDefault(); var paginNo=jQuery(this).data('pageurl'); jQuery('.reviews-pagin-wrap').hide(); jQuery('.reviews-pagin-wrap.reviews-pagin-wrap-'+paginNo).show(); }); jQuery(document).on('click', '.lp-filter-pagination-ajx ul li span.author-haspaglink', function (e){ e.preventDefault(); var pageNo=jQuery(this).data('pageurl'), authorID=jQuery('.lp-author-nav').data('author'), authorPagin='yes', listingLayout=jQuery('#mylistings').data('listing-layout'); jQuery('.lp-filter-pagination-ajx ul li span').removeClass('current'); jQuery(this).addClass('current'); jQuery('#mylistings').find('.author-inner-content-wrap').addClass('content-loading'); jQuery('#mylistings #content-grids').remove(); jQuery.ajax({ type: 'POST', url: ajax_search_term_object.ajaxurl, data: { 'action': 'author_archive_tabs_cb', 'pageNo': pageNo, 'authorID':authorID, 'authorPagin':authorPagin, 'listingLayout':listingLayout }, success: function(data){ jQuery('#mylistings').find('.author-inner-content-wrap').removeClass('content-loading'); jQuery('#mylistings').find('.author-inner-content-wrap').html(data); console.log(data); }}); }); jQuery(document).ready(function(){ if(jQuery('.featuresDataContainer.lp-check-custom-wrapp').length > 0){ jQuery('.featuresDataContainerOuterSubmit').show(); jQuery('.featuresDataContainer.lp-check-custom-wrapp').show(); }}); !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=14)}([function(t,e){t.exports=jQuery},,,function(t,e){!function(t){"use strict";t.fn.fitVids=function(e){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("div");i.innerHTML='x
',r.appendChild(i.childNodes[1])}return e&&t.extend(n,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&e.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var i=t(this).find(e.join(","));(i=(i=i.not("object object")).not(r)).each((function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var n=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var i="fitvid"+t.fn.fitVids._count;e.attr("name",i),t.fn.fitVids._count++}e.wrap('').parent(".fluid-width-video-wrapper").css("padding-top",100*n+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto)},function(t,e){ !function(){"use strict";function t(r){if(!r)throw new Error("No options passed to Waypoint constructor");if(!r.element)throw new Error("No element option passed to Waypoint constructor");if(!r.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,r),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=r.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var r in n)e.push(n[r]);for(var i=0,o=e.length;o>i;i++)e[i][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=i.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,r[t.waypointContextKey]=this,n+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,r={},i=window.Waypoint,o=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete r[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",(function(){e.didResize||(e.didResize=!0,i.requestAnimationFrame(t))}))},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",(function(){(!e.didScroll||i.isTouch)&&(e.didScroll=!0,i.requestAnimationFrame(t))}))},e.prototype.handleResize=function(){i.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var r=e[n],i=r.newScroll>r.oldScroll?r.forward:r.backward;for(var o in this.waypoints[n]){var a=this.waypoints[n][o],s=r.oldScroll