Premium Addons for Elementor - Version 2.1.5-beta1

Version Description

Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 2.1.5-beta1
Comparing to
See all releases

Code changes from version 2.1.4 to 2.1.5-beta1

assets/css/premium-addons.css CHANGED
@@ -1841,6 +1841,9 @@ button.close {
1841
  .premium-prefix-text {
1842
  font-size: 40px;
1843
  }
 
 
 
1844
  .premium-fancy-text-wrapper .premium-fancy-text-span-align {
1845
  vertical-align: top;
1846
  }
@@ -2641,8 +2644,28 @@ button.close {
2641
  align-items: center;
2642
  justify-content: center;
2643
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2644
  .premium-gallery-container .premium-gallery-item {
2645
  padding: 10px;
 
2646
  }
2647
  .premium-img-gallery-filter .premium-gallery-cats-container li a.category {
2648
  border-radius: 75px;
1841
  .premium-prefix-text {
1842
  font-size: 40px;
1843
  }
1844
+ .premium-fancy-text-wrapper .premium-fancy-list-items {
1845
+ list-style: none;
1846
+ }
1847
  .premium-fancy-text-wrapper .premium-fancy-text-span-align {
1848
  vertical-align: top;
1849
  }
2644
  align-items: center;
2645
  justify-content: center;
2646
  }
2647
+ .premium-grid-50 .premium-gallery-item:nth-child(2n+1) {
2648
+ clear: left;
2649
+ }
2650
+ .premium-grid-33330 .premium-gallery-item:nth-child(3n+1) {
2651
+ clear: left;
2652
+ }
2653
+ .premium-grid-25 .premium-gallery-item:nth-child(4n+1) {
2654
+ clear: left;
2655
+ }
2656
+ .premium-grid-20 .premium-gallery-item:nth-child(5n+1) {
2657
+ clear: left;
2658
+ }
2659
+ .premium-grid-1666 .premium-gallery-item:nth-child(6n+1) {
2660
+ clear: left;
2661
+ }
2662
+ .premium-img-gallery {
2663
+ clear: both;
2664
+ overflow: hidden;
2665
+ }
2666
  .premium-gallery-container .premium-gallery-item {
2667
  padding: 10px;
2668
+ float: left;
2669
  }
2670
  .premium-img-gallery-filter .premium-gallery-cats-container li a.category {
2671
  border-radius: 75px;
assets/js/lib/prettyPhoto.js CHANGED
@@ -6,8 +6,7 @@
6
  Version: 3.1.6 (Modified for .mp4 with locahost lightbox: http://forums.no-margin-for-errors.com/discussion/674/prettyphoto-for-avi-and-mp4/p1)
7
  ------------------------------------------------------------------------- */
8
  !function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function p(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function o(t,e){var i="[\\?&]"+(t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",p=new RegExp(i).exec(e);return null==p?"":p[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(a){function s(){t(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(I/2-f.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:f.contentHeight,width:f.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:j/2-f.containerWidth/2<0?0:j/2-f.containerWidth/2,width:f.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==h(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(f.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide()),!settings.autoplay_slideshow||P||v||t.prettyPhoto.startSlideshow(),settings.changepicturecallback(),v=!0}),m(),a.ajaxcallback()}function n(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){t(".pp_loaderIcon").show(),e()})}function l(e){e>1?t(".pp_nav").show():t(".pp_nav").hide()}function r(t,e){if(resized=!1,d(t,e),imageWidth=t,imageHeight=e,(k>j||b>I)&&doresize&&settings.allow_resize&&!$){for(resized=!0,fitting=!1;!fitting;)k>j?(imageWidth=j-200,imageHeight=e/t*imageWidth):b>I?(imageHeight=I-200,imageWidth=t/e*imageHeight):fitting=!0,b=imageHeight,k=imageWidth;(k>j||b>I)&&r(k,b),d(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(b),containerWidth:Math.floor(k)+2*settings.horizontal_padding,contentHeight:Math.floor(y),contentWidth:Math.floor(w),resized:resized}}function d(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),y=i+detailsHeight,w=e,b=y+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),k=e}function h(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.mp4\b/i)?"localvideo":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function c(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=_(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=I/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>I)return;$pp_pic_holder.css({top:projectedTop,left:j/2+scroll_pos.scrollLeft-contentwidth/2})}}function _(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function g(){I=t(window).height(),j=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(j)}function m(){isSet&&settings.overlay_gallery&&"image"==h(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((f.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function u(e){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(e){t(this).find("a").click(function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).bind("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").bind("click",function(){return t.prettyPhoto.close(),!1}),settings.allow_expand&&t("a.pp_expand").bind("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),n(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),c()}a=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt">&nbsp;</div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',localvideo_markup:'<video width="{width}" height="{height}" autoplay controls><source src="{path}" type="video/mp4"></video>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no" allowfullscreen="true"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},a);var f,v,y,w,b,k,P,x=this,$=!1,I=t(window).height(),j=t(window).width();return doresize=!0,scroll_pos=_(),t(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){c(),g()}),a.keyboard_shortcuts&&t(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){return settings=a,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=t(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("href")}):t.makeArray(t(this).attr("href")),pp_titles=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(t(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("title")?t(e).attr("title"):""}):t.makeArray(t(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(t(this).attr("href"),pp_images),rel_index=isSet?set_position:t("a["+settings.hook+"^='"+theRel+"']").index(t(this)),u(this),settings.allow_resize&&t(window).bind("scroll.prettyphoto",function(){c()}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(e){return"undefined"==typeof settings&&(settings=a,pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,u(e.target)),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),l(t(pp_images).size()),t(".pp_loaderIcon").show(),settings.deeplinking&&i(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+t(pp_images).size()),void 0!==pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(o("width",pp_images[set_position]))?o("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(o("height",pp_images[set_position]))?o("height",pp_images[set_position]):settings.default_height.toString(),$=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),$=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),$=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,h(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(pp_images).size()-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){f=r(imgPreloader.width,imgPreloader.height),s()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":f=r(movie_width,movie_height),movie_id=o("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,o("rel",pp_images[set_position])?movie+="?rel="+o("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":f=r(movie_width,movie_height),movie_id=pp_images[set_position];var e=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,i=movie_id.match(e);movie="//player.vimeo.com/video/"+i[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=f.width+"/embed/?moog_width="+f.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,f.height).replace(/{path}/g,movie);break;case"quicktime":(f=r(movie_width,movie_height)).height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"localvideo":(f=r(movie_width,movie_height)).height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.localvideo_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":f=r(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":f=r(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,f=r(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s()});break;case"custom":f=r(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,f=r(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?--set_position<0&&(set_position=t(pp_images).size()-1):"next"==e?++set_position>t(pp_images).size()-1&&(set_position=0):set_position=e,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),n(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?++currentGalleryPage>totalPage&&(currentGalleryPage=0):"previous"==t?--currentGalleryPage<0&&(currentGalleryPage=totalPage):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===P?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return t.prettyPhoto.stopSlideshow(),!1}),P=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(P),P=void 0},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).unbind("scroll.prettyphoto"),p(),settings.callback(),doresize=!0,v=!1,delete settings}))},!pp_alreadyInitialized&&e()&&(pp_alreadyInitialized=!0,hashIndex=e(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){t("a["+a.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",t.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
9
-
10
-
11
  jQuery(document).ready(function($) {
12
  'use strict';
13
  $(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto({
6
  Version: 3.1.6 (Modified for .mp4 with locahost lightbox: http://forums.no-margin-for-errors.com/discussion/674/prettyphoto-for-avi-and-mp4/p1)
7
  ------------------------------------------------------------------------- */
8
  !function(t){function e(){var t=location.href;return hashtag=-1!==t.indexOf("#prettyPhoto")&&decodeURI(t.substring(t.indexOf("#prettyPhoto")+1,t.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function i(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function p(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function o(t,e){var i="[\\?&]"+(t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)",p=new RegExp(i).exec(e);return null==p?"":p[1]}t.prettyPhoto={version:"3.1.6"},t.fn.prettyPhoto=function(a){function s(){t(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(I/2-f.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:f.contentHeight,width:f.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:j/2-f.containerWidth/2<0?0:j/2-f.containerWidth/2,width:f.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==h(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(f.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide()),!settings.autoplay_slideshow||P||v||t.prettyPhoto.startSlideshow(),settings.changepicturecallback(),v=!0}),m(),a.ajaxcallback()}function n(e){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){t(".pp_loaderIcon").show(),e()})}function l(e){e>1?t(".pp_nav").show():t(".pp_nav").hide()}function r(t,e){if(resized=!1,d(t,e),imageWidth=t,imageHeight=e,(k>j||b>I)&&doresize&&settings.allow_resize&&!$){for(resized=!0,fitting=!1;!fitting;)k>j?(imageWidth=j-200,imageHeight=e/t*imageWidth):b>I?(imageHeight=I-200,imageWidth=t/e*imageHeight):fitting=!0,b=imageHeight,k=imageWidth;(k>j||b>I)&&r(k,b),d(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(b),containerWidth:Math.floor(k)+2*settings.horizontal_padding,contentHeight:Math.floor(y),contentWidth:Math.floor(w),resized:resized}}function d(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),y=i+detailsHeight,w=e,b=y+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),k=e}function h(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.mp4\b/i)?"localvideo":t.match(/\b.swf\b/i)?"flash":t.match(/\biframe=true\b/i)?"iframe":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function c(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=_(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=I/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>I)return;$pp_pic_holder.css({top:projectedTop,left:j/2+scroll_pos.scrollLeft-contentwidth/2})}}function _(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function g(){I=t(window).height(),j=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(j)}function m(){isSet&&settings.overlay_gallery&&"image"==h(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((f.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function u(e){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(e){t(this).find("a").click(function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).bind("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").bind("click",function(){return t.prettyPhoto.close(),!1}),settings.allow_expand&&t("a.pp_expand").bind("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),n(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),c()}a=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> \t\t\t\t\t\t<div class="ppt">&nbsp;</div> \t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_social">{pp_social}</div> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',localvideo_markup:'<video width="{width}" height="{height}" autoplay controls><source src="{path}" type="video/mp4"></video>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no" allowfullscreen="true"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},a);var f,v,y,w,b,k,P,x=this,$=!1,I=t(window).height(),j=t(window).width();return doresize=!0,scroll_pos=_(),t(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){c(),g()}),a.keyboard_shortcuts&&t(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){return settings=a,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=t(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("href")}):t.makeArray(t(this).attr("href")),pp_titles=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(t(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(x,function(e,i){if(-1!=t(e).attr(settings.hook).indexOf(theRel))return t(e).attr("title")?t(e).attr("title"):""}):t.makeArray(t(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(t(this).attr("href"),pp_images),rel_index=isSet?set_position:t("a["+settings.hook+"^='"+theRel+"']").index(t(this)),u(this),settings.allow_resize&&t(window).bind("scroll.prettyphoto",function(){c()}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(e){return"undefined"==typeof settings&&(settings=a,pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,u(e.target)),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),l(t(pp_images).size()),t(".pp_loaderIcon").show(),settings.deeplinking&&i(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+t(pp_images).size()),void 0!==pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(o("width",pp_images[set_position]))?o("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(o("height",pp_images[set_position]))?o("height",pp_images[set_position]):settings.default_height.toString(),$=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),$=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),$=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,h(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(pp_images).size()-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){f=r(imgPreloader.width,imgPreloader.height),s()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":f=r(movie_width,movie_height),movie_id=o("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="//www.youtube.com/embed/"+movie_id,o("rel",pp_images[set_position])?movie+="?rel="+o("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":f=r(movie_width,movie_height),movie_id=pp_images[set_position];var e=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,i=movie_id.match(e);movie="//player.vimeo.com/video/"+i[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=f.width+"/embed/?moog_width="+f.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,f.height).replace(/{path}/g,movie);break;case"quicktime":(f=r(movie_width,movie_height)).height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"localvideo":(f=r(movie_width,movie_height)).height+=15,f.contentHeight+=15,f.containerHeight+=15,toInject=settings.localvideo_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":f=r(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":f=r(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,f.width).replace(/{height}/g,f.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,f=r(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s()});break;case"custom":f=r(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,f=r(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,s())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?--set_position<0&&(set_position=t(pp_images).size()-1):"next"==e?++set_position>t(pp_images).size()-1&&(set_position=0):set_position=e,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),n(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?++currentGalleryPage>totalPage&&(currentGalleryPage=0):"previous"==t?--currentGalleryPage<0&&(currentGalleryPage=totalPage):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===P?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return t.prettyPhoto.stopSlideshow(),!1}),P=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(P),P=void 0},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).unbind("scroll.prettyphoto"),p(),settings.callback(),doresize=!0,v=!1,delete settings}))},!pp_alreadyInitialized&&e()&&(pp_alreadyInitialized=!0,hashIndex=e(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){t("a["+a.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",t.prettyPhoto.initialize)}}(jQuery);var pp_alreadyInitialized=!1;
9
+
 
10
  jQuery(document).ready(function($) {
11
  'use strict';
12
  $(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto({
assets/js/premium-addons.js CHANGED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ //Premium Progress Bar Handler
3
+ var PremiumProgressBarWidgetHandler = function ($scope,$){
4
+ var progressbarElement = $scope.find('.premium-progressbar-progress-bar').each(function(){
5
+
6
+ var settings = $(this).data('settings');
7
+
8
+ var length = settings['progress_length'];
9
+
10
+ $(this).animate({width: length + '%'} , length * 25);
11
+ });
12
+ };
13
+ //Premium Progress Bar on Scroll Handler
14
+ var PremiumProgressBarScrollWidgetHandler = function ($scope,$){
15
+ $scope.waypoint(function (direction) {
16
+ PremiumProgressBarWidgetHandler($(this), $);
17
+ }, {
18
+ offset: $.waypoints('viewportHeight') - 150,
19
+ triggerOnce: true
20
+ });
21
+ };
22
+ //Premium Video Box Handler
23
+ var PremiumVideoBoxWidgetHandler = function($scope,$){
24
+ var videoBoxElement = $scope.find('.premium-video-box-container');
25
+ videoBoxElement.on( "click", function(){
26
+ $( this ).children( ".premium-video-box-video-container" ).css(
27
+ {
28
+ 'opacity': '1',
29
+ 'visibility': 'visible'
30
+ } );
31
+ setTimeout(function(){
32
+ videoBoxElement.find("iframe").attr('src', videoBoxElement.find("iframe").attr('src') + '?autoplay=1');
33
+ },600);
34
+ });
35
+ };
36
+ //Premium Grid Handler
37
+ var PremiumGridWidgetHandler = function($scope,$){
38
+ if ($().isotope === undefined) {
39
+ return;
40
+ }
41
+ var gridElement = $scope.find('.premium-img-gallery');
42
+ if (gridElement.length === 0) {
43
+ return;
44
+ }
45
+ var htmlContent = $scope.find('.premium-gallery-container');
46
+ var isotopeOptions = htmlContent.data('settings');
47
+ if(isotopeOptions['img_size'] === 'original'){
48
+ htmlContent.isotope({
49
+ // options
50
+ itemSelector: '.premium-gallery-item',
51
+ percentPosition: true,
52
+ animationOptions: {
53
+ duration: 750,
54
+ easing: 'linear',
55
+ queue: false
56
+ }
57
+ });
58
+ htmlContent.imagesLoaded(function () {
59
+ htmlContent.isotope({layoutMode: 'masonry'});
60
+ });
61
+ } else if(isotopeOptions['img_size'] === 'one_size'){
62
+
63
+ htmlContent.isotope({
64
+ // options
65
+ itemSelector: '.premium-gallery-item',
66
+ percentPosition: true,
67
+ animationOptions: {
68
+ duration: 750,
69
+ easing: 'linear',
70
+ queue: false
71
+ }
72
+ });
73
+ htmlContent.imagesLoaded(function () {
74
+ htmlContent.isotope({layoutMode: 'fitRows'});
75
+ });
76
+ }
77
+ $scope.find('.premium-gallery-cats-container li a').click(function(e){
78
+ e.preventDefault();
79
+ $scope.find('.premium-gallery-cats-container li .active').removeClass('active');
80
+ $(this).addClass('active');
81
+ var selector = $(this).attr('data-filter');
82
+ htmlContent.isotope({filter: selector});
83
+ return false;
84
+ });
85
+ $(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto({
86
+ theme: 'pp_default',
87
+ hook: 'data-rel',
88
+ opacity: 0.7,
89
+ show_title: false,
90
+ deeplinking: false,
91
+ overlay_gallery: false,
92
+ custom_markup: '',
93
+ default_width: 900,
94
+ default_height: 506,
95
+ social_tools: ''
96
+ });
97
+ };
98
+ //Premium Counter Handler
99
+ var PremiumCounterHandler = function($scope,$){
100
+ var counterElement = $scope.find('.premium-counter').each(function(){
101
+ var counterSettings = $(this).data('settings');
102
+
103
+ var counter_offset = $(this).offset().top;
104
+ var counter = new CountUp(
105
+ 'counter-' + counterSettings['id'],
106
+ 0,
107
+ counterSettings['value'],
108
+ counterSettings['d_after'],
109
+ counterSettings['speed'],
110
+ {
111
+ useEasing: true,
112
+ separator: counterSettings['separator'],
113
+ decimal: counterSettings['decimal']
114
+ }
115
+ );
116
+ if(counter_offset < $(window).outerHeight() - 150) {
117
+ counter.start();
118
+ }
119
+ function start_counter(){
120
+ if($(window).scrollTop() > counter_offset - 600 ) {
121
+ counter.start();
122
+ }
123
+ }
124
+ function isScrolledIntoView(elem) {
125
+ var docViewTop = $(window).scrollTop();
126
+ var docViewBottom = docViewTop + $(window).height();
127
+ var elemTop = elem.offset().top;
128
+ var elemBottom = elemTop + elem.height();
129
+ return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
130
+ }
131
+ function addAnimation() {
132
+ $('.premium-counter-init').each( function() {
133
+ var $this = $(this),
134
+ parentId = $this.parents('.premium-counter-area').attr('id'),
135
+ iconClass = $('#' + parentId ).find('.icon'),
136
+ animation = iconClass.data('animation');
137
+ if( iconClass.length ) {
138
+ if( isScrolledIntoView( iconClass ) ) {
139
+ if( ! iconClass.hasClass('animated') ) {
140
+ $('#' + parentId ).find('.icon').addClass('animated ' + animation );
141
+ }
142
+ }
143
+ }
144
+ });
145
+ }
146
+ addAnimation();
147
+ $(document).ready(function(){
148
+ $(window).on('scroll', function() {
149
+ addAnimation();
150
+ start_counter();
151
+ });
152
+ });
153
+ });
154
+ };
155
+ //Premium Fancy Text Handler
156
+ var PremiumFancyTextHandler = function($scope,$){
157
+ var fancyTextElement = $scope.find('.premium-fancy-text-wrapper');
158
+ var fancyTextSettings = fancyTextElement.data('settings');
159
+ if(fancyTextSettings['effect'] === 'typing'){
160
+ fancyTextElement.find('.premium-fancy-text').typed( {
161
+ strings: fancyTextSettings['strings'],
162
+ typeSpeed: fancyTextSettings['typeSpeed'],
163
+ backSpeed: fancyTextSettings['backSpeed'],
164
+ startDelay:fancyTextSettings['startDelay'],
165
+ backDelay: fancyTextSettings['backDelay'],
166
+ showCursor:fancyTextSettings['showCursor'],
167
+ cursorChar:fancyTextSettings['cursorChar'],
168
+ loop: fancyTextSettings['loop']
169
+ } );
170
+ } else {
171
+ fancyTextElement.find('.premium-fancy-text').vTicker( {
172
+ speed: fancyTextSettings['speed'],
173
+ showItems: fancyTextSettings['showItems'],
174
+ pause: fancyTextSettings['pause'],
175
+ mousePause : fancyTextSettings['mousePause'],
176
+ direction: "up"
177
+ });
178
+ }
179
+ };
180
+ //Premium Countdown Handler
181
+ var PremiumCountDownHandler = function ($scope,$){
182
+ var countDownElement = $scope.find('.premium-countdown').each(function(){
183
+ var countDownSettings = $(this).data('settings');
184
+ var label1 = countDownSettings['label1'],
185
+ label2 = countDownSettings['label2'],
186
+ newLabe1 = label1.split(','),
187
+ newLabe2 = label2.split(',');
188
+ if(countDownSettings['event'] === 'onExpiry'){
189
+ $(this).find('.premium-countdown-init').pre_countdown({
190
+ labels : newLabe2,
191
+ labels1 : newLabe1,
192
+ until : new Date( countDownSettings['until'] ),
193
+ format : countDownSettings['format'],
194
+ padZeroes : true,
195
+ onExpiry : function() {
196
+ $(this).html(countDownSettings['text']);
197
+ },
198
+ serverSync : function() { return new Date(countDownSettings['serverSync']); }
199
+ });
200
+ } else if(countDownSettings['event'] === 'expiryUrl') {
201
+ $(this).find('.premium-countdown-init').pre_countdown({
202
+ labels : newLabe2,
203
+ labels1 : newLabe1,
204
+ until : new Date( countDownSettings['until'] ),
205
+ format : countDownSettings['format'],
206
+ padZeroes : true,
207
+ expiryUrl : countDownSettings['text'],
208
+ serverSync : function() { return new Date(countDownSettings['serverSync']); }
209
+ });
210
+ }
211
+ times = $(this).find('.premium-countdown-init').pre_countdown('getTimes');
212
+ function runTimer( el ) {
213
+ return el == 0;
214
+ }
215
+ if( times.every( runTimer ) ) {
216
+ if( countDownSettings['event'] === 'onExpiry' ){
217
+ $(this).find('.premium-countdown-init').html(countDownSettings['text']);
218
+ }
219
+ if( countDownSettings['event'] === 'expiryUrl' ){
220
+ var editMode = $('body').find('#elementor').length;
221
+ if( editMode > 0 ) {
222
+ $(this).find('.premium-countdown-init').html( '<h1>You can not redirect url from elementor Editor!!</h1>' );
223
+ } else {
224
+ window.location.href = countDownSettings['text'];
225
+ }
226
+ }
227
+ }
228
+ });
229
+ };
230
+ //Premium Carousel Handler
231
+ var PremiumCarouselHandler = function ($scope,$){
232
+ var carouselElement = $scope.find('.premium-carousel-wrapper').each(function(){
233
+ var carouselSettings = $(this).data('settings');
234
+ function slideToShow( slick ) {
235
+ slidesToShow = slick.options.slidesToShow;
236
+ windowWidth = jQuery( window ).width();
237
+ if ( windowWidth < 1025 ) {
238
+ slidesToShow = slick.options.responsive[0].settings.slidesToShow;
239
+ }
240
+ if ( windowWidth < 769 ) {
241
+ slidesToShow = slick.options.responsive[1].settings.slidesToShow;
242
+ }
243
+ if ( windowWidth < 481 ) {
244
+ slidesToShow = slick.options.responsive[2].settings.slidesToShow;
245
+ }
246
+ return slidesToShow;
247
+ }
248
+ $(this).on('init', function (event, slick ) {
249
+ event.preventDefault();
250
+ $(this).find('item-wrapper.slick-active').each(function (index, el) {
251
+ $this = $(this);
252
+ $this.addClass($this.data('animation'));
253
+ });
254
+ $('.slick-track').addClass('translate');
255
+ });
256
+ $(this).find('.premium-carousel-inner').slick({
257
+ vertical : carouselSettings['vertical'],
258
+ slidesToScroll : carouselSettings['slidesToScroll'],
259
+ slidesToShow : carouselSettings['slidesToShow'],
260
+ responsive : carouselSettings['responsive'],
261
+ infinite : carouselSettings['infinite'],
262
+ speed : carouselSettings['speed'],
263
+ autoplay : carouselSettings['autoplay'],
264
+ autoplaySpeed : carouselSettings['autoplaySpeed'],
265
+ draggable : carouselSettings['draggable'],
266
+ touchMove : carouselSettings['touchMove'],
267
+ rtl : carouselSettings['rtl'],
268
+ adaptiveHeight : carouselSettings['adaptiveHeight'],
269
+ pauseOnHover : carouselSettings['pauseOnHover'],
270
+ centerMode : carouselSettings['centerMode'],
271
+ centerPadding : carouselSettings['centerPadding'],
272
+ arrows : carouselSettings['arrows'],
273
+ nextArrow : carouselSettings['nextArrow'],
274
+ prevArrow : carouselSettings['prevArrow'],
275
+ dots : carouselSettings['dots'],
276
+ customPaging : function(slider, i) {return '<i class="' + carouselSettings['customPaging'] + '"></i>';},
277
+ });
278
+ $(this).on('afterChange', function (event, slick, currentSlide, nextSlide) {
279
+ slidesScrolled = slick.options.slidesToScroll;
280
+ slidesToShow = slideToShow( slick );
281
+ centerMode = slick.options.centerMode;
282
+ $currentParent = slick.$slider[0].parentElement.id;
283
+ slideToAnimate = currentSlide + slidesToShow - 1;
284
+ if (slidesScrolled == 1) {
285
+ if ( centerMode == true ) {
286
+ animate = slideToAnimate - 2;
287
+ $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + animate + "']");
288
+ $inViewPort.addClass($inViewPort.data('animation'));
289
+ } else {
290
+ $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + slideToAnimate + "']");
291
+ $inViewPort.addClass($inViewPort.data('animation'));
292
+ }
293
+ } else {
294
+ for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
295
+ $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + i + "']");
296
+ $inViewPort.addClass($inViewPort.data('animation'));
297
+ }
298
+ }
299
+ });
300
+ $(this).on('beforeChange', function (event, slick, currentSlide) {
301
+ $inViewPort = $("[data-slick-index='" + currentSlide + "']");
302
+ $inViewPort.siblings().removeClass($inViewPort.data('animation'));
303
+ });
304
+ if( carouselSettings['vertical']) {
305
+ var maxHeight = -1;
306
+ $('.slick-slide').each(function() {
307
+ if ($(this).height() > maxHeight) {
308
+ maxHeight = $(this).height();
309
+ }
310
+ });
311
+ $('.slick-slide').each(function() {
312
+ if ($(this).height() < maxHeight) {
313
+ $(this).css('margin', Math.ceil((maxHeight-$(this).height())/2) + 'px 0');
314
+ }
315
+ });
316
+ }
317
+ var marginFix = {
318
+ element : $('a.ver-carousel-arrow'),
319
+ getWidth : function() {
320
+ var width = this.element.outerWidth();
321
+ return width / 2;
322
+ },
323
+ setWidth : function( type = 'vertical') {
324
+ if( type == 'vertical' ) {
325
+ this.element.css( 'margin-left', '-' + this.getWidth() + 'px' );
326
+ } else {
327
+ this.element.css( 'margin-top', '-' + this.getWidth() + 'px' );
328
+ }
329
+ }
330
+ }
331
+ marginFix.setWidth();
332
+ marginFix.element = $('a.carousel-arrow');
333
+ marginFix.setWidth('horizontal');
334
+ });
335
+ };
336
+ //Premium Banner Handler
337
+ var PremiumBannerHandler = function ($scope,$){
338
+ var bannerElement = $scope.find('.premium_banner');
339
+ bannerElement.find('.premium_addons-banner-ib').hover(
340
+ function() {
341
+ $(this).find('.premium_addons-banner-ib-img').addClass('active');
342
+ },
343
+ function() {
344
+ $(this).find('.premium_addons-banner-ib-img').removeClass('active');
345
+ });
346
+ };
347
+ //Premium Modal Box Handler
348
+ var PremiumModalBoxHandler = function ($scope,$){
349
+ var modalBoxElement = $scope.find('.premium-modal-box-container');
350
+ var modalBoxSettings = modalBoxElement.data('settings');
351
+ if(modalBoxSettings['trigger'] === 'pageload'){
352
+ $(document).ready(function($){
353
+ setTimeout( function(){
354
+ modalBoxElement.find('.premium-modal-box-modal').modal();
355
+ }, modalBoxSettings['delay'] * 1000);
356
+ });
357
+ }
358
+ };
359
+ //Premium Maps Handler
360
+ var PremiumMapsHandler = function($scope,$){
361
+ var mapElement = $scope.find('.premium_maps_map_height');
362
+ var mapSettings = mapElement.data('settings');
363
+ var mapStyle = mapElement.data('style');
364
+ premiumMap = newMap(mapElement,mapSettings,mapStyle);
365
+ function newMap(map,settings,mapStyle){
366
+ var scrollwheel = JSON.parse(settings['scrollwheel']);
367
+ var streetViewControl = JSON.parse(settings['streetViewControl']);
368
+ var fullscreenControl = JSON.parse(settings['fullScreen']);
369
+ var zoomControl = JSON.parse(settings['zoomControl']);
370
+ var mapTypeControl = JSON.parse(settings['typeControl']);
371
+ var centerLat = JSON.parse(settings['centerlat']);
372
+ var centerLong = JSON.parse(settings['centerlong']);
373
+ var autoOpen = JSON.parse(settings['automaticOpen']);
374
+ var hoverOpen = JSON.parse(settings['hoverOpen']);
375
+ var hoverClose = JSON.parse(settings['hoverClose']);
376
+ var args = {
377
+ zoom: settings['zoom'],
378
+ mapTypeId: settings['maptype'],
379
+ center: {lat: centerLat, lng: centerLong},
380
+ scrollwheel: scrollwheel,
381
+ streetViewControl: streetViewControl,
382
+ fullscreenControl: fullscreenControl,
383
+ zoomControl: zoomControl,
384
+ mapTypeControl: mapTypeControl,
385
+ styles: mapStyle
386
+ };
387
+ var markers = map.find(".premium-pin");
388
+ var map = new google.maps.Map( map[0], args);
389
+ map.markers = [];
390
+ // add markers
391
+ markers.each(function(){
392
+ add_marker( jQuery(this), map, autoOpen, hoverOpen, hoverClose );
393
+ });
394
+ return map;
395
+ }
396
+ function add_marker( pin, map ,autoOpen, hoverOpen, hoverClose ) {
397
+ var latlng = new google.maps.LatLng( pin.attr('data-lat'), pin.attr('data-lng') );
398
+
399
+ icon_img = pin.attr('data-icon');
400
+ if(icon_img != ''){
401
+ var icon = {
402
+ url : pin.attr('data-icon')
403
+ };
404
+ }
405
+
406
+ // create marker
407
+ var marker = new google.maps.Marker({
408
+ position : latlng,
409
+ map : map,
410
+ icon : icon
411
+ });
412
+
413
+ // add to array
414
+ map.markers.push( marker );
415
+
416
+ // if marker contains HTML, add it to an infoWindow
417
+
418
+ if( pin.find('.premium-maps-info-title').html() || pin.find('.premium-maps-info-desc').html() )
419
+ {
420
+ // create info window
421
+ var infowindow = new google.maps.InfoWindow({
422
+ content : pin.html()
423
+ });
424
+ if(autoOpen){
425
+ infowindow.open( map, marker );
426
+ }
427
+ if(hoverOpen){
428
+ google.maps.event.addListener(marker, 'mouseover', function() {
429
+ infowindow.open( map, marker );
430
+ });
431
+ if(hoverClose){
432
+ google.maps.event.addListener(marker, 'mouseout', function() {
433
+ infowindow.close( map, marker );
434
+ });
435
+ }
436
+ }
437
+ // show info window when marker is clicked
438
+ google.maps.event.addListener(marker, 'click', function() {
439
+ infowindow.open( map, marker );
440
+ });
441
+ }
442
+ }
443
+ };
444
+
445
+ //Elementor JS Hooks
446
+ $(window).on('elementor/frontend/init', function () {
447
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-video-box.default',PremiumVideoBoxWidgetHandler);
448
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-img-gallery.default',PremiumGridWidgetHandler);
449
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-fancy-text.default',PremiumFancyTextHandler);
450
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-counter.default',PremiumCounterHandler);
451
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-countdown-timer.default',PremiumCountDownHandler);
452
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-carousel-widget.default',PremiumCarouselHandler);
453
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-banner.default',PremiumBannerHandler);
454
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-modal-box.default',PremiumModalBoxHandler);
455
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-maps.default',PremiumMapsHandler);
456
+ if(elementorFrontend.isEditMode()){
457
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarWidgetHandler);
458
+ } else {
459
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarScrollWidgetHandler);
460
+ }
461
+ });
462
+ })(jQuery);
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 2.1.4
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -22,7 +22,7 @@ if( !function_exists('add_action') ) {
22
 
23
  if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
 
25
- define( 'PREMIUM_ADDONS_VERSION', '2.1.3' );
26
  define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
27
  define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
28
  define( 'PREMIUM_ADDONS_FILE', __FILE__ );
@@ -99,7 +99,7 @@ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.1.2');
99
  add_action( 'elementor/init', array( $this, 'initiate_elementor_addons' ) );
100
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
101
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
102
- add_action( 'elementor/frontend/before_register_scripts', array($this, 'premium_addons_register_scripts'));
103
  add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
104
  }
105
 
@@ -108,41 +108,67 @@ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.1.2');
108
  * @since 1.0
109
  */
110
  public function premium_addons_required_assets() {
111
- wp_enqueue_style( 'premium-addons-css', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), '1.0', 'all' );
112
  $premium_maps_api = get_option( 'pa_save_settings' )['premium-map-api'];
113
  $premium_maps_disable_api = get_option( 'pa_save_settings' )['premium-map-disable-api'];
114
  $premium_maps_enabled = get_option( 'pa_save_settings' )['premium-maps'];
115
  if ( $premium_maps_enabled == 1 && $premium_maps_disable_api == 1 ) {
116
- wp_enqueue_script('google-maps-script','https://maps.googleapis.com/maps/api/js?key='.$premium_maps_api , array('jquery'), '1.0', false);
117
- } else {
118
- wp_enqueue_script('jquery');
119
  }
120
  }
121
 
122
  public function premium_addons_register_scripts(){
123
  $check_component_active = get_option( 'pa_save_settings' );
124
-
125
- if( $check_component_active['premium-modalbox'] ) {
126
- wp_register_script( 'modal-js', PREMIUM_ADDONS_URL . 'assets/js/lib/modal.js', array( 'jquery' ), '3.3.7', true );
 
127
  }
128
-
129
- if( $check_component_active['premium-carousel'] ) {
130
- wp_register_script( 'slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array( 'jquery' ), '1.6.0', true );
131
  }
132
- if( $check_component_active['premium-countdown'] ) {
133
- wp_register_script( 'count-down-timer-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquerycountdown.js', array( 'jquery' ), '2.1.0', true );
134
- }
 
 
 
 
 
135
  if( $check_component_active['premium-counter'] ) {
136
- wp_register_script( 'counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array( 'jquery' ), '2.1.0', true );
 
137
  }
 
138
  if( $check_component_active['premium-fancytext'] ) {
139
- wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array( 'jquery' ), '1.0', true);
140
- wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array( 'jquery' ), '1.0', true);
 
141
  }
142
- if( $check_component_active['premium-grid'] ) {
143
- wp_enqueue_style( 'prettyphoto-css', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), '1.0', 'all' );
144
- wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array( 'jquery' ), '1.0', true);
145
- wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array( 'jquery' ), '1.0', true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
147
  }
148
 
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 2.1.5-beta1
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
22
 
23
  if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
 
25
+ define( 'PREMIUM_ADDONS_VERSION', '2.1.5-beta1' );
26
  define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
27
  define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
28
  define( 'PREMIUM_ADDONS_FILE', __FILE__ );
99
  add_action( 'elementor/init', array( $this, 'initiate_elementor_addons' ) );
100
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
101
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
102
+ add_action( 'elementor/frontend/after_register_scripts', array($this, 'premium_addons_register_scripts'));
103
  add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
104
  }
105
 
108
  * @since 1.0
109
  */
110
  public function premium_addons_required_assets() {
111
+ wp_enqueue_style( 'premium-addons-css', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), PREMIUM_ADDONS_VERSION, 'all' );
112
  $premium_maps_api = get_option( 'pa_save_settings' )['premium-map-api'];
113
  $premium_maps_disable_api = get_option( 'pa_save_settings' )['premium-map-disable-api'];
114
  $premium_maps_enabled = get_option( 'pa_save_settings' )['premium-maps'];
115
  if ( $premium_maps_enabled == 1 && $premium_maps_disable_api == 1 ) {
116
+ wp_enqueue_script('google-maps-script','https://maps.googleapis.com/maps/api/js?key='.$premium_maps_api , array(), PREMIUM_ADDONS_VERSION, false);
 
 
117
  }
118
  }
119
 
120
  public function premium_addons_register_scripts(){
121
  $check_component_active = get_option( 'pa_save_settings' );
122
+
123
+ if( $check_component_active['premium-progressbar'] ) {
124
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
125
+ wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
126
  }
127
+
128
+ if( $check_component_active['premium-videobox'] ) {
129
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
130
  }
131
+
132
+ if( $check_component_active['premium-grid'] ) {
133
+ wp_enqueue_style( 'prettyphoto-css', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all' );
134
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
135
+ wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
136
+ wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
137
+ }
138
+
139
  if( $check_component_active['premium-counter'] ) {
140
+ wp_register_script( 'counter-up-js', PREMIUM_ADDONS_URL .'assets/js/lib/countUpmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
141
+ wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
142
  }
143
+
144
  if( $check_component_active['premium-fancytext'] ) {
145
+ wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
146
+ wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
147
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
148
  }
149
+
150
+ if( $check_component_active['premium-countdown'] ) {
151
+ wp_register_script( 'count-down-timer-js', PREMIUM_ADDONS_URL .'assets/js/lib/jquerycountdown.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION,
152
+ true );
153
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
154
+ }
155
+
156
+ if( $check_component_active['premium-carousel'] ) {
157
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
158
+ wp_register_script( 'slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
159
+ }
160
+
161
+ if( $check_component_active['premium-banner'] ) {
162
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
163
+ }
164
+
165
+ if( $check_component_active['premium-modalbox'] ) {
166
+ wp_register_script( 'modal-js', PREMIUM_ADDONS_URL .'assets/js/lib/modal.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
167
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
168
+ }
169
+
170
+ if( $check_component_active['premium-maps'] ) {
171
+ wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
172
  }
173
  }
174
 
readme.txt CHANGED
@@ -5,6 +5,8 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 4.9.4
7
  Requires PHP: 5.4
 
 
8
  License: GPL v3.0
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
@@ -98,6 +100,11 @@ Premium Addons for Elementor is light weight and we also gave you the control to
98
 
99
  == Changelog ==
100
 
 
 
 
 
 
101
  = 2.1.4 =
102
 
103
  - Fix: Premium Grid light box bug on Chrome.
5
  Requires at least: 4.5
6
  Tested up to: 4.9.4
7
  Requires PHP: 5.4
8
+ Stable tag: 2.1.4
9
+ Beta tag: 2.1.5-beta1
10
  License: GPL v3.0
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
100
 
101
  == Changelog ==
102
 
103
+ = 2.1.5 =
104
+
105
+ - Tweak: Enhanced Javascript loading and performance.
106
+ - Fix: Premium Fancy Text Add item with Slide up effect bug on Firefox.
107
+
108
  = 2.1.4 =
109
 
110
  - Fix: Premium Grid light box bug on Chrome.
widgets/premium-banner.php CHANGED
@@ -26,6 +26,11 @@ class Premium_Banner_Widget extends Widget_Base {
26
  public function get_categories() {
27
  return [ 'premium-elements' ];
28
  }
 
 
 
 
 
29
 
30
  // Adding the controls fields for the premium banner
31
  // This will controls the animation, colors and background, dimensions etc
@@ -501,21 +506,7 @@ class Premium_Banner_Widget extends Widget_Base {
501
  }
502
  ?>
503
  </div>
504
- <script>
505
- (function( $ ) {
506
- $(document).ready( function() {
507
- $('.premium_addons-banner-ib').hover(
508
- function() {
509
- $(this).find('.premium_addons-banner-ib-img').addClass('active');
510
- },
511
- function() {
512
- $(this).find('.premium_addons-banner-ib-img').removeClass('active');
513
- }
514
- );
515
- })
516
- })(jQuery);
517
- </script>
518
- <?php if($settings['premium_banner_responsive_switcher'] == 'yes') : ?>
519
  <style>
520
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
521
  #premium-banner-<?php echo esc_attr($this->get_id()); ?> .premium_addons-banner-ib-content {
26
  public function get_categories() {
27
  return [ 'premium-elements' ];
28
  }
29
+
30
+ public function get_script_depends()
31
+ {
32
+ return ['premium-addons-js'];
33
+ }
34
 
35
  // Adding the controls fields for the premium banner
36
  // This will controls the animation, colors and background, dimensions etc
506
  }
507
  ?>
508
  </div>
509
+ <?php if($settings['premium_banner_responsive_switcher'] == 'yes') : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  <style>
511
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
512
  #premium-banner-<?php echo esc_attr($this->get_id()); ?> .premium_addons-banner-ib-content {
widgets/premium-carousel.php CHANGED
@@ -28,7 +28,7 @@ class Premium_Carousel_Widget extends Widget_Base {
28
  }
29
 
30
  public function get_script_depends() {
31
- return ['slick-carousel-js'];
32
  }
33
 
34
  public function get_categories() {
@@ -585,7 +585,6 @@ class Premium_Carousel_Widget extends Widget_Base {
585
  'label' => esc_html__( 'RTL Mode', 'premium-addons-for-elementor' ),
586
  'description' => esc_html__( 'Turn on RTL mode if your language starts from right to left', 'premium-addons-for-elementor' ),
587
  'type' => Controls_Manager::SWITCHER,
588
- 'default' => 'no',
589
  'condition' => [
590
  'premium_carousel_slider_type!' => 'vertical'
591
  ]
@@ -598,7 +597,6 @@ class Premium_Carousel_Widget extends Widget_Base {
598
  'label' => esc_html__( 'Adaptive Height', 'premium-addons-for-elementor' ),
599
  'description' => esc_html__( 'Adaptive height setting gives each slide a fixed height to avoid huge white space gaps', 'premium-addons-for-elementor' ),
600
  'type' => Controls_Manager::SWITCHER,
601
- 'default' => 'no'
602
  ]
603
  );
604
 
@@ -608,7 +606,6 @@ class Premium_Carousel_Widget extends Widget_Base {
608
  'label' => esc_html__( 'Pause on Hover', 'premium-addons-for-elementor' ),
609
  'description' => esc_html__( 'Pause the slider when mouse hover', 'premium-addons-for-elementor' ),
610
  'type' => Controls_Manager::SWITCHER,
611
- 'default' => 'no'
612
  ]
613
  );
614
 
@@ -618,7 +615,6 @@ class Premium_Carousel_Widget extends Widget_Base {
618
  'label' => esc_html__( 'Center Mode', 'premium-addons-for-elementor' ),
619
  'description' => esc_html__( 'Center mode enables a centered view with partial next/previous slides. Animations and all visible scroll type doesn\'t work with this mode', 'premium-addons-for-elementor' ),
620
  'type' => Controls_Manager::SWITCHER,
621
- 'default' => 'no'
622
  ]
623
  );
624
 
@@ -635,27 +631,24 @@ class Premium_Carousel_Widget extends Widget_Base {
635
 
636
  protected function render() {
637
  $settings = $this->get_settings();
638
- $options = '';
639
  $arrows_position = $settings['premium_carousel_arrow_position']['size'] . 'px';
640
  // Carousel sliding type
641
  if( $settings['premium_carousel_slider_type'] == 'horizontal' ){
642
- $options .= 'vertical: false,'."\r\n";
643
  } else if( $settings['premium_carousel_slider_type'] == 'vertical' ) {
644
- $options .= 'vertical: true,'."\r\n";
645
  }
646
 
647
  // responsive carousel set up
648
 
649
  $slides_on_desk = $settings['premium_carousel_responsive_desktop'];
650
  if( $settings['premium_carousel_slides_to_show'] == 'all' ) {
651
- $slide_to_scroll = $slides_on_desk;
652
- $options .= 'slidesToScroll: ' . $slide_to_scroll . ','."\r\n";
653
  } else {
654
- $slide_to_scroll = 1;
655
- $options .= 'slidesToScroll: ' . $slide_to_scroll .','."\r\n";
656
  }
657
 
658
- $options .= 'slidesToShow: ' .$slides_on_desk . ',';
659
 
660
  $slides_on_tabs = $settings['premium_carousel_responsive_tabs'];
661
  $slides_on_mob = $settings['premium_carousel_responsive_mobile'];
@@ -668,77 +661,71 @@ class Premium_Carousel_Widget extends Widget_Base {
668
  $slides_on_mob = $slides_on_desk;
669
  }
670
 
671
- $options .= 'responsive : [
672
- {
673
- breakpoint: 1025,
674
- settings: {
675
- slidesToShow: ' . $slides_on_desk . ',
676
- slidesToScroll: ' . $slide_to_scroll . '
677
- }
678
- },
679
- {
680
- breakpoint: 769,
681
- settings: {
682
- slidesToShow: ' . $slides_on_tabs . ',
683
- slidesToScroll: ' . $slides_on_tabs . '
684
- }
685
- },
686
- {
687
- breakpoint: 481,
688
- settings: {
689
- slidesToShow: ' . $slides_on_mob . ',
690
- slidesToScroll: ' . $slides_on_mob . '
691
- }
692
- }
693
- ],';
694
 
695
  if( $settings['premium_carousel_loop'] == 'yes' ) {
696
- $options . 'infinite : true,';
697
  } else {
698
- $options . 'infinite : false,';
699
  }
700
 
701
  if( $settings['premium_carousel_speed'] != '' ) {
702
- $options .= 'speed : ' . $settings['premium_carousel_speed'].',';
703
- }
 
 
704
 
705
  if( $settings['premium_carousel_autoplay'] == 'yes' ) {
706
- $options .= 'autoplay : true,';
707
 
708
- if( $settings['premium_carousel_autoplay_speed'] !== '' ) {
709
- $options .= 'autoplaySpeed : ' . $settings['premium_carousel_autoplay_speed'] .',';
710
- }
711
-
712
- }
 
 
713
 
714
  if( $settings['premium_carousel_draggable_effect'] == 'yes' ) {
715
- $options .= 'draggable : true,';
716
- }
 
 
717
  if( $settings['premium_carousel_touch_move'] == 'yes' ) {
718
- $options .= 'touchMove : true,';
719
- }
 
 
720
  $dir = '';
721
  if( $settings['premium_carousel_RTL_Mode'] == 'yes' ) {
722
- $options .= 'rtl : true,';
723
  $dir = 'dir="rtl"';
724
- }
 
 
725
  if( $settings['premium_carousel_adaptive_height'] == 'yes' ) {
726
- $options .= 'adaptiveHeight : true,';
727
- }
728
- if( $settings['premium_carousel_pausehover'] == 'no' ) {
729
- $options .= 'pauseOnHover: false,';
 
 
730
  } else {
731
- $options .= 'pauseOnHover: true,';
732
  }
733
  if( $settings['premium_carousel_center_mode'] == 'yes' ) {
734
- $options .= 'centerMode : true,';
735
- }
 
 
736
  if( $settings['premium_carousel_space_btw_items'] !== '' ) {
737
- $options .= 'centerPadding : ' . '"'.$settings['premium_carousel_space_btw_items'].'px",';
738
- }
 
 
739
  // Navigation arrow setting setup
740
  if( $settings['premium_carousel_navigation_show'] == 'yes') {
741
- $options .= 'arrows : true,';
742
 
743
  if( $settings['premium_carousel_slider_type'] == 'vertical' ) {
744
  $vertical_alignment = "ver-carousel-arrow";
@@ -834,13 +821,15 @@ class Premium_Carousel_Widget extends Widget_Base {
834
 
835
  $left_arrow = '<a type="button" data-role="none" class="'. $vertical_alignment .' carousel-prev'.$arrow_class.'" aria-label="Next" role="button" style=""><i class="'.$icon_prev_class.'" aria-hidden="true"></i></a>';
836
 
837
- $options .= 'nextArrow : \''.$next_arrow.'\',';
838
- $options .= 'prevArrow : \''.$left_arrow.'\',';
839
  } else {
840
- $options .= 'arrows : false,';
 
 
841
  }
842
  if( $settings['premium_carousel_dot_navigation_show'] == 'yes' ){
843
- $options .= 'dots: true,';
844
  if( $settings['premium_carousel_dot_icon'] == 'square_white' ) {
845
  $dot_icon = 'fa fa-square-o';
846
  }
@@ -856,18 +845,43 @@ class Premium_Carousel_Widget extends Widget_Base {
856
  if( $settings['premium_carousel_dot_icon'] == 'circle_thin_bold' ) {
857
  $dot_icon = 'fa fa-circle-o';
858
  }
859
- $options .= 'customPaging: function(slider, i) {
860
- return \'<i class="' . $dot_icon . '"></i>\';
861
- },';
862
- }
 
 
863
  $extra_class = $settings['premium_carousel_extra_class'] !== '' ? ' '.$settings['premium_carousel_extra_class'] : '';
864
 
865
  $animation_class = $settings['premium_carousel_animation_list'];
866
  $animation = 'class="item-wrapper" data-animation="animated ' . $animation_class .'"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
  ?>
868
 
869
- <div id="premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-wrapper carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?><?php echo $extra_class;?>" <?php echo $dir; ?>>
870
- <div id="premium-carousel-<?php echo esc_attr( $this->get_id() ); ?>">
871
  <?php
872
  $premium_elements_page_id = is_array( $settings['premium_carousel_slider_content'] ) ? $settings['premium_carousel_slider_content'] : array();
873
  $premium_elements_frontend = new Frontend;
@@ -890,98 +904,7 @@ class Premium_Carousel_Widget extends Widget_Base {
890
  }
891
  <?php endif; ?>
892
  </style>
893
- <script type="text/javascript">
894
- (function( $ ) {
895
- $(document).ready( function() {
896
- function slideToShow( slick ) {
897
- slidesToShow = slick.options.slidesToShow;
898
- windowWidth = jQuery( window ).width();
899
- if ( windowWidth < 1025 ) {
900
- slidesToShow = slick.options.responsive[0].settings.slidesToShow;
901
- }
902
- if ( windowWidth < 769 ) {
903
- slidesToShow = slick.options.responsive[1].settings.slidesToShow;
904
- }
905
- if ( windowWidth < 481 ) {
906
- slidesToShow = slick.options.responsive[2].settings.slidesToShow;
907
- }
908
- return slidesToShow;
909
- }
910
- $('.carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>').on('init', function (event, slick ) {
911
- event.preventDefault();
912
- $('.carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?> .item-wrapper.slick-active').each(function (index, el) {
913
- $this = $(this);
914
- $this.addClass($this.data('animation'));
915
- });
916
-
917
- $('.slick-track').addClass('translate');
918
-
919
- });
920
- $('#premium-carousel-<?php echo esc_attr( $this->get_id() ); ?>').slick({ <?php echo $options; ?> });
921
-
922
- $('.carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>').on('afterChange', function (event, slick, currentSlide, nextSlide) {
923
- slidesScrolled = slick.options.slidesToScroll;
924
- slidesToShow = slideToShow( slick );
925
- centerMode = slick.options.centerMode;
926
- $currentParent = slick.$slider[0].parentElement.id;
927
- slideToAnimate = currentSlide + slidesToShow - 1;
928
-
929
- if (slidesScrolled == 1) {
930
- if ( centerMode == true ) {
931
- animate = slideToAnimate - 2;
932
- $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + animate + "']");
933
- $inViewPort.addClass($inViewPort.data('animation'));
934
- } else {
935
- $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + slideToAnimate + "']");
936
- $inViewPort.addClass($inViewPort.data('animation'));
937
- }
938
- } else {
939
- for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
940
- $inViewPort = $( '#' + $currentParent + " [data-slick-index='" + i + "']");
941
- $inViewPort.addClass($inViewPort.data('animation'));
942
- }
943
- }
944
- });
945
-
946
- $('.carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>').on('beforeChange', function (event, slick, currentSlide) {
947
- $inViewPort = $("[data-slick-index='" + currentSlide + "']");
948
- $inViewPort.siblings().removeClass($inViewPort.data('animation'));
949
- });
950
- <?php if( $settings['premium_carousel_slider_type'] == 'vertical' ) : ?>
951
- var maxHeight = -1;
952
- $('.slick-slide').each(function() {
953
- if ($(this).height() > maxHeight) {
954
- maxHeight = $(this).height();
955
- }
956
- });
957
- $('.slick-slide').each(function() {
958
- if ($(this).height() < maxHeight) {
959
- $(this).css('margin', Math.ceil((maxHeight-$(this).height())/2) + 'px 0');
960
- }
961
- });
962
- <?php endif; ?>
963
- var marginFix = {
964
- element : $('a.ver-carousel-arrow'),
965
- getWidth : function() {
966
- var width = this.element.outerWidth();
967
- return width / 2;
968
- },
969
- setWidth : function( type = 'vertical') {
970
- if( type == 'vertical' ) {
971
- this.element.css( 'margin-left', '-' + this.getWidth() + 'px' );
972
- } else {
973
- this.element.css( 'margin-top', '-' + this.getWidth() + 'px' );
974
- }
975
- }
976
- }
977
- marginFix.setWidth();
978
- marginFix.element = $('a.carousel-arrow');
979
- marginFix.setWidth('horizontal');
980
- });
981
- })(jQuery);
982
- </script>
983
- <?php
984
-
985
  }
986
  }
987
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
28
  }
29
 
30
  public function get_script_depends() {
31
+ return ['premium-addons-js','slick-carousel-js'];
32
  }
33
 
34
  public function get_categories() {
585
  'label' => esc_html__( 'RTL Mode', 'premium-addons-for-elementor' ),
586
  'description' => esc_html__( 'Turn on RTL mode if your language starts from right to left', 'premium-addons-for-elementor' ),
587
  'type' => Controls_Manager::SWITCHER,
 
588
  'condition' => [
589
  'premium_carousel_slider_type!' => 'vertical'
590
  ]
597
  'label' => esc_html__( 'Adaptive Height', 'premium-addons-for-elementor' ),
598
  'description' => esc_html__( 'Adaptive height setting gives each slide a fixed height to avoid huge white space gaps', 'premium-addons-for-elementor' ),
599
  'type' => Controls_Manager::SWITCHER,
 
600
  ]
601
  );
602
 
606
  'label' => esc_html__( 'Pause on Hover', 'premium-addons-for-elementor' ),
607
  'description' => esc_html__( 'Pause the slider when mouse hover', 'premium-addons-for-elementor' ),
608
  'type' => Controls_Manager::SWITCHER,
 
609
  ]
610
  );
611
 
615
  'label' => esc_html__( 'Center Mode', 'premium-addons-for-elementor' ),
616
  'description' => esc_html__( 'Center mode enables a centered view with partial next/previous slides. Animations and all visible scroll type doesn\'t work with this mode', 'premium-addons-for-elementor' ),
617
  'type' => Controls_Manager::SWITCHER,
 
618
  ]
619
  );
620
 
631
 
632
  protected function render() {
633
  $settings = $this->get_settings();
 
634
  $arrows_position = $settings['premium_carousel_arrow_position']['size'] . 'px';
635
  // Carousel sliding type
636
  if( $settings['premium_carousel_slider_type'] == 'horizontal' ){
637
+ $vertical = false;
638
  } else if( $settings['premium_carousel_slider_type'] == 'vertical' ) {
639
+ $vertical = true;
640
  }
641
 
642
  // responsive carousel set up
643
 
644
  $slides_on_desk = $settings['premium_carousel_responsive_desktop'];
645
  if( $settings['premium_carousel_slides_to_show'] == 'all' ) {
646
+ $slidesToScroll = !empty($slides_on_desk) ? $slides_on_desk : 1;
 
647
  } else {
648
+ $slidesToScroll = 1;
 
649
  }
650
 
651
+ $slidesToShow = !empty($slides_on_desk) ? $slides_on_desk : 1;
652
 
653
  $slides_on_tabs = $settings['premium_carousel_responsive_tabs'];
654
  $slides_on_mob = $settings['premium_carousel_responsive_mobile'];
661
  $slides_on_mob = $slides_on_desk;
662
  }
663
 
664
+ $responsive = 'responsive : [{breakpoint: 1025,settings: {slidesToShow: ' . $slides_on_desk . ',slidesToScroll: ' . $slidesToScroll . '}},{breakpoint: 769,settings: {slidesToShow: ' . $slides_on_tabs . ',slidesToScroll: ' . $slides_on_tabs . '}},{breakpoint: 481,settings: {slidesToShow: ' . $slides_on_mob . ',slidesToScroll: ' . $slides_on_mob . '}}]';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
 
666
  if( $settings['premium_carousel_loop'] == 'yes' ) {
667
+ $infinite = true;
668
  } else {
669
+ $infinite = false;
670
  }
671
 
672
  if( $settings['premium_carousel_speed'] != '' ) {
673
+ $speed = $settings['premium_carousel_speed'];
674
+ } else {
675
+ $speed = '';
676
+ }
677
 
678
  if( $settings['premium_carousel_autoplay'] == 'yes' ) {
679
+ $autoplay = true;
680
 
681
+ if( $settings['premium_carousel_autoplay_speed'] !== '' ) {
682
+ $autoplaySpeed = $settings['premium_carousel_autoplay_speed'];
683
+ }
684
+ } else {
685
+ $autoplay = false;
686
+ $autoplaySpeed = '';
687
+ }
688
 
689
  if( $settings['premium_carousel_draggable_effect'] == 'yes' ) {
690
+ $draggable = true;
691
+ } else {
692
+ $draggable = false;
693
+ }
694
  if( $settings['premium_carousel_touch_move'] == 'yes' ) {
695
+ $touchMove = true;
696
+ } else {
697
+ $touchMove = false;
698
+ }
699
  $dir = '';
700
  if( $settings['premium_carousel_RTL_Mode'] == 'yes' ) {
701
+ $rtl = true;
702
  $dir = 'dir="rtl"';
703
+ } else {
704
+ $rtl = false;
705
+ }
706
  if( $settings['premium_carousel_adaptive_height'] == 'yes' ) {
707
+ $adaptiveHeight = true;
708
+ } else {
709
+ $adaptiveHeight = false;
710
+ }
711
+ if( $settings['premium_carousel_pausehover'] == 'yes' ) {
712
+ $pauseOnHover = true;
713
  } else {
714
+ $pauseOnHover = false;
715
  }
716
  if( $settings['premium_carousel_center_mode'] == 'yes' ) {
717
+ $centerMode = true;
718
+ } else {
719
+ $centerMode = false;
720
+ }
721
  if( $settings['premium_carousel_space_btw_items'] !== '' ) {
722
+ $centerPadding = $settings['premium_carousel_space_btw_items']."px";
723
+ } else {
724
+ $centerPadding = '';
725
+ }
726
  // Navigation arrow setting setup
727
  if( $settings['premium_carousel_navigation_show'] == 'yes') {
728
+ $arrows = true;
729
 
730
  if( $settings['premium_carousel_slider_type'] == 'vertical' ) {
731
  $vertical_alignment = "ver-carousel-arrow";
821
 
822
  $left_arrow = '<a type="button" data-role="none" class="'. $vertical_alignment .' carousel-prev'.$arrow_class.'" aria-label="Next" role="button" style=""><i class="'.$icon_prev_class.'" aria-hidden="true"></i></a>';
823
 
824
+ $nextArrow = $next_arrow;
825
+ $prevArrow = $left_arrow;
826
  } else {
827
+ $arrows = false;
828
+ $nextArrow = '';
829
+ $prevArrow = '';
830
  }
831
  if( $settings['premium_carousel_dot_navigation_show'] == 'yes' ){
832
+ $dots = true;
833
  if( $settings['premium_carousel_dot_icon'] == 'square_white' ) {
834
  $dot_icon = 'fa fa-square-o';
835
  }
845
  if( $settings['premium_carousel_dot_icon'] == 'circle_thin_bold' ) {
846
  $dot_icon = 'fa fa-circle-o';
847
  }
848
+ $customPaging = $dot_icon;
849
+ } else {
850
+ $dots = false;
851
+ $dot_icon = '';
852
+ $customPaging = '';
853
+ }
854
  $extra_class = $settings['premium_carousel_extra_class'] !== '' ? ' '.$settings['premium_carousel_extra_class'] : '';
855
 
856
  $animation_class = $settings['premium_carousel_animation_list'];
857
  $animation = 'class="item-wrapper" data-animation="animated ' . $animation_class .'"';
858
+
859
+ $carousel_settings = [
860
+ 'vertical' => $vertical,
861
+ 'slidesToScroll'=> $slidesToScroll,
862
+ 'slidesToShow' => $slidesToShow,
863
+ 'responsive' => $responsive,
864
+ 'infinite' => $infinite,
865
+ 'speed' => $speed,
866
+ 'autoplay' => $autoplay,
867
+ 'autoplaySpeed' => $autoplaySpeed,
868
+ 'draggable' => $draggable,
869
+ 'touchMove' => $touchMove,
870
+ 'rtl' => $rtl,
871
+ 'adaptiveHeight'=> $adaptiveHeight,
872
+ 'pauseOnHover' => $pauseOnHover,
873
+ 'centerMode' => $centerMode,
874
+ 'centerPadding' => $centerPadding,
875
+ 'arrows' => $arrows,
876
+ 'nextArrow' => $nextArrow,
877
+ 'prevArrow' => $prevArrow,
878
+ 'dots' => $dots,
879
+ 'customPaging' => $customPaging,
880
+ ];
881
  ?>
882
 
883
+ <div id="premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-wrapper carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?><?php echo $extra_class;?>" <?php echo $dir; ?> data-settings='<?php echo wp_json_encode($carousel_settings); ?>'>
884
+ <div id="premium-carousel-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-inner">
885
  <?php
886
  $premium_elements_page_id = is_array( $settings['premium_carousel_slider_content'] ) ? $settings['premium_carousel_slider_content'] : array();
887
  $premium_elements_frontend = new Frontend;
904
  }
905
  <?php endif; ?>
906
  </style>
907
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
  }
909
  }
910
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
widgets/premium-countdown.php CHANGED
@@ -20,7 +20,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
20
  }
21
 
22
  public function get_script_depends() {
23
- return [ 'count-down-timer-js' ];
24
  }
25
 
26
  public function get_categories() {
@@ -451,8 +451,10 @@ class Premium_Counter_Down_Widget extends Widget_Base {
451
  $time = str_replace('-', '/', current_time('mysql') );
452
  $serverSync = '';
453
  if( $settings['premium_countdown_s_u_time'] == 'wp-time' ) :
454
- $serverSync = 'serverSync : function() { return new Date(\'' .$time .'\') }';
455
- endif;
 
 
456
 
457
  $redirect = !empty( $settings['premium_countdown_expiry_redirection_'] ) ? esc_url($settings['premium_countdown_expiry_redirection_']) : '';
458
 
@@ -480,63 +482,31 @@ class Premium_Counter_Down_Widget extends Widget_Base {
480
 
481
  $pcdt_style = $settings['premium_countdown_style'] == 'd-u-s' ? ' side' : ' down';
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  ?>
484
- <div id="countDownContiner">
485
- <div class="countdown<?php echo $pcdt_style; ?>" id="countdown-<?php echo esc_attr( $this->get_id() ); ?>"></div>
486
- </div>
487
- <script>
488
- ( function( $ ) {
489
- $(document).ready( function() {
490
- var label1 = '<?php echo $label; ?>',
491
- label2 = '<?php echo $labels1; ?>',
492
- newLabe1 = label1.split(','),
493
- newLabe2 = label2.split(',');
494
-
495
- $('#countdown-<?php echo esc_attr( $this->get_id() ); ?>').pre_countdown({
496
- labels : newLabe2,
497
- labels1 : newLabe1,
498
- until : new Date( '<?php echo $target_date; ?>'),
499
- format : '<?php echo $format; ?>',
500
- padZeroes : true,
501
- <?php if( $settings['premium_countdown_expire_text_url'] == 'text' ): ?>
502
- onExpiry : function() {
503
- $(this).html("<?php echo $expire_text; ?>");
504
- },
505
- <?php endif; ?>
506
- <?php if( $settings['premium_countdown_expire_text_url'] == 'url' ): ?>
507
- expiryUrl : '<?php echo $redirect; ?>',
508
- <?php endif; ?>
509
- <?php echo $serverSync; ?>
510
- });
511
- times = $('#countdown-<?php echo esc_attr( $this->get_id() );?>').pre_countdown('getTimes');
512
- function runTimer( el ) {
513
- return el == 0;
514
- }
515
- if( times.every( runTimer ) ) {
516
- <?php if( $settings['premium_countdown_expire_text_url'] == 'text' ): ?>
517
- $('#countdown-<?php echo esc_attr( $this->get_id() ); ?>').html("<?php echo $expire_text; ?>");
518
- <?php endif; ?>
519
- <?php if( $settings['premium_countdown_expire_text_url'] == 'url' ): ?>
520
- var editMode = $('body').find('#elementor').length;
521
- if( editMode > 0 ) {
522
- $('#countdown-<?php echo esc_attr( $this->get_id() ); ?>').html( '<h1>You can not redirect url from elementor Editor!!</h1>' );
523
- } else {
524
- window.location.href = '<?php echo addslashes($redirect); ?>';
525
- }
526
-
527
- <?php endif; ?>
528
- }
529
- });
530
-
531
- })( jQuery );
532
-
533
- </script>
534
-
535
  <?php
536
-
537
  }
538
-
539
-
540
  }
541
 
542
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
20
  }
21
 
22
  public function get_script_depends() {
23
+ return [ 'premium-addons-js','count-down-timer-js' ];
24
  }
25
 
26
  public function get_categories() {
451
  $time = str_replace('-', '/', current_time('mysql') );
452
  $serverSync = '';
453
  if( $settings['premium_countdown_s_u_time'] == 'wp-time' ) :
454
+ $sent_time = $time;
455
+ else:
456
+ $sent_time = '';
457
+ endif;
458
 
459
  $redirect = !empty( $settings['premium_countdown_expiry_redirection_'] ) ? esc_url($settings['premium_countdown_expiry_redirection_']) : '';
460
 
482
 
483
  $pcdt_style = $settings['premium_countdown_style'] == 'd-u-s' ? ' side' : ' down';
484
 
485
+ if( $settings['premium_countdown_expire_text_url'] == 'text' ){
486
+ $event = 'onExpiry';
487
+ $text = $expire_text;
488
+ }
489
+
490
+ if( $settings['premium_countdown_expire_text_url'] == 'url' ){
491
+ $event = 'expiryUrl';
492
+ $text = $redirect;
493
+ }
494
+ $countdown_settings = [
495
+ 'label1' => $label,
496
+ 'label2' => $labels1,
497
+ 'until' => $target_date,
498
+ 'format' => $format,
499
+ 'event' => $event,
500
+ 'text' => $text,
501
+ 'serverSync'=> $sent_time,
502
+ ];
503
+
504
  ?>
505
+ <div id="countDownContiner-<?php echo esc_attr($this->get_id()); ?>" class="premium-countdown" data-settings='<?php echo wp_json_encode($countdown_settings); ?>'>
506
+ <div id="countdown-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-countdown-init countdown<?php echo $pcdt_style; ?>"></div>
507
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  <?php
 
509
  }
 
 
510
  }
511
 
512
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
widgets/premium-counter.php CHANGED
@@ -18,7 +18,7 @@ class Premium_Counter_Widget extends Widget_Base {
18
  }
19
 
20
  public function get_script_depends() {
21
- return [ 'counter-up-js' ];
22
  }
23
 
24
  public function get_categories() {
@@ -481,14 +481,11 @@ class Premium_Counter_Widget extends Widget_Base {
481
 
482
  $this->add_inline_editing_attributes('premium_counter_title');
483
 
484
- $options = ''; // The counter settings store
485
- $options .= 'useEasing : true,';
486
-
487
  if( $sep = $settings['premium_counter_t_separator'] ) {
488
- $options .= 'separator : \''. $sep .'\',';
489
  }
490
  if( $dec = $settings['premium_counter_t_separator'] ) {
491
- $options .= 'decimal : \''. $dec .'\',';
492
  }
493
 
494
  if( $settings['premium_counter_icon_image'] == 'icon' ) {
@@ -522,9 +519,18 @@ class Premium_Counter_Widget extends Widget_Base {
522
  if( $settings['premium_counter_icon_image'] == 'custom' && $settings['premium_counter_icon_style'] == 'simple' ) {
523
  $flex_width = ' flex-width ';
524
  }
525
- ?>
526
 
527
- <div class="premium-counter-area<?php echo $center; ?>" id="counter-wrapper-<?php echo esc_attr($this->get_id()); ?>">
 
 
 
 
 
 
 
 
 
 
528
  <?php if( $settings['premium_counter_icon_position'] == 'right' ) : ?>
529
  <div class="premium-init-wrapper <?php echo $settings['premium_counter_icon_position']; ?>">
530
 
@@ -565,57 +571,9 @@ class Premium_Counter_Widget extends Widget_Base {
565
  <?php endif; ?>
566
 
567
  </div>
568
-
569
- <script type="text/javascript">
570
- jQuery(document).ready(function( $ ) {
571
- var counter_offset = $("#counter-<?php echo esc_attr($this->get_id()); ?>").offset().top;
572
- var <?php echo 'counter' . esc_attr($this->get_id()); ?> = new CountUp(
573
- 'counter-<?php echo esc_attr($this->get_id()); ?>', 0,
574
- <?php echo $settings['premium_counter_value']; ?>,
575
- <?php echo $d_after; ?>,
576
- <?php echo $settings['premium_counter_speed']; ; ?>,
577
- { <?php echo $options ?> }
578
- );
579
- if(counter_offset < $(window).outerHeight()- 150) {
580
- counter<?php echo esc_attr($this->get_id()); ?>.start();
581
- }
582
- function start_counter(){
583
- if($(window).scrollTop() > counter_offset - 600 ) {
584
- counter<?php echo esc_attr($this->get_id()); ?>.start();
585
- }
586
- }
587
- function isScrolledIntoView(elem) {
588
- var docViewTop = $(window).scrollTop();
589
- var docViewBottom = docViewTop + $(window).height();
590
- var elemTop = elem.offset().top;
591
- var elemBottom = elemTop + elem.height();
592
- return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
593
- }
594
- function addAnimation() {
595
- $('.premium-counter-init').each( function() {
596
- var $this = $(this),
597
- parentId = $this.parents('.premium-counter-area').attr('id'),
598
- iconClass = $('#' + parentId ).find('.icon'),
599
- animation = iconClass.data('animation');
600
- if( iconClass.length ) {
601
- if( isScrolledIntoView( iconClass ) ) {
602
- if( ! iconClass.hasClass('animated') ) {
603
- $('#' + parentId ).find('.icon').addClass('animated ' + animation );
604
- }
605
- }
606
- }
607
- });
608
- }
609
- addAnimation();
610
- $(window).on('scroll', function() {
611
- addAnimation();
612
- start_counter();
613
- });
614
- });
615
- </script>
616
  <?php
617
  }
618
-
619
  }
620
 
621
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Widget() );
18
  }
19
 
20
  public function get_script_depends() {
21
+ return [ 'waypoints','premium-addons-js','counter-up-js' ];
22
  }
23
 
24
  public function get_categories() {
481
 
482
  $this->add_inline_editing_attributes('premium_counter_title');
483
 
 
 
 
484
  if( $sep = $settings['premium_counter_t_separator'] ) {
485
+ $separator = $sep;
486
  }
487
  if( $dec = $settings['premium_counter_t_separator'] ) {
488
+ $decimal = $dec;
489
  }
490
 
491
  if( $settings['premium_counter_icon_image'] == 'icon' ) {
519
  if( $settings['premium_counter_icon_image'] == 'custom' && $settings['premium_counter_icon_style'] == 'simple' ) {
520
  $flex_width = ' flex-width ';
521
  }
 
522
 
523
+ $counter_settings = [
524
+ 'id' => $this->get_id(),
525
+ 'value' => $settings['premium_counter_value'],
526
+ 'digits_after' => $d_after,
527
+ 'speed' => $settings['premium_counter_speed'],
528
+ 'separator' => $separator,
529
+ 'decimal' => $decimal,
530
+ ];
531
+
532
+ ?>
533
+ <div id="counter-wrapper-<?php echo esc_attr($this->get_id()); ?>" class="premium-counter premium-counter-area<?php echo $center; ?>" data-settings='<?php echo wp_json_encode($counter_settings); ?>'>
534
  <?php if( $settings['premium_counter_icon_position'] == 'right' ) : ?>
535
  <div class="premium-init-wrapper <?php echo $settings['premium_counter_icon_position']; ?>">
536
 
571
  <?php endif; ?>
572
 
573
  </div>
574
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  <?php
576
  }
 
577
  }
578
 
579
  Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Widget() );
widgets/premium-fancytext.php CHANGED
@@ -19,7 +19,7 @@ class Premium_Fancy_Text_Widget extends Widget_Base
19
 
20
  public function get_script_depends()
21
  {
22
- return ['typed-js','vticker-js'];
23
  }
24
 
25
  public function get_categories() {
@@ -392,55 +392,52 @@ class Premium_Fancy_Text_Widget extends Widget_Base
392
  $this->add_render_attribute( 'premium_fancy_suffix_text', 'class', 'premium-fancy-text-span-align' );
393
  }
394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  ?>
396
 
397
 
398
- <div class="premium-fancy-text-wrapper">
399
  <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_prefix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
400
 
401
  <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?><span id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" ></span>
402
  <?php else : ?>
403
  <div id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
404
  <ul>
405
- <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) : ?><?php if ( ! empty( $item['premium_text_strings_text_field'] ) ) : ?><?php echo "<li>".esc_attr( $item['premium_text_strings_text_field'] )."</li>"; ?><?php endif; ?><?php endforeach; ?>
406
  </ul>
407
  </div>
408
  <?php endif; ?>
409
  <span class="premium-suffix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_suffix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_suffix_text'] ), true ); ?></span></span>
410
  </div>
411
-
412
- <!-- Typing Effect-->
413
- <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?>
414
- <script type="text/javascript">
415
- jQuery(document).ready(function( $ ) {
416
- $( "#premium_fancy_text_<?php echo esc_attr( $this->get_id() );?> " ).typed( {
417
- strings: [ <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) : ?><?php if ( ! empty( $item['premium_text_strings_text_field'] ) ) : ?>"<?php echo esc_attr($item['premium_text_strings_text_field'] ); ?>",<?php endif; ?><?php endforeach; ?> ],
418
- typeSpeed: <?php echo esc_attr( $settings['premium_fancy_text_type_speed'] ); ?>,
419
- backSpeed: <?php echo esc_attr( $settings['premium_fancy_text_back_speed'] ); ?>,
420
- startDelay: <?php echo esc_attr( $settings['premium_fancy_text_start_delay'] ); ?>,
421
- backDelay: <?php echo esc_attr( $settings['premium_fancy_text_back_delay'] ); ?>,
422
- showCursor: <?php if( !empty( $settings['premium_fancy_text_show_cursor'] ) ) : ?> true <?php else : ?>false<?php endif; ?>,
423
- cursorChar: <?php echo '"' . $cursor_text . '"' ; ?>,
424
- loop: <?php if( !empty( $settings['premium_fancy_text_type_loop'] ) ) : ?>true<?php else : ?>false<?php endif; ?>,
425
- });
426
- });
427
- </script>
428
- <?php endif; ?>
429
- <!-- Slide up Effect -->
430
- <?php if ( $settings['premium_fancy_text_effect'] === 'slide') : ?>
431
- <script>
432
- jQuery(function( $ ) {
433
- $( "#premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>").vTicker( {
434
- speed: <?php echo esc_attr( $settings['premium_slide_up_speed'] ); ?>,
435
- showItems: <?php echo esc_attr( $settings['premium_slide_up_shown_items'] ); ?>,
436
- pause: <?php echo esc_attr( $settings['premium_slide_up_pause_time'] ); ?>,
437
- mousePause : <?php if ( !empty( $settings['premium_slide_up_hover_pause'] ) ) : ?>true<?php else : ?>false<?php endif; ?>,
438
- direction: "up"
439
- });
440
- });
441
- </script>
442
- <?php endif; ?>
443
-
444
  <?php
445
  }
446
  }
19
 
20
  public function get_script_depends()
21
  {
22
+ return ['premium-addons-js','typed-js','vticker-js'];
23
  }
24
 
25
  public function get_categories() {
392
  $this->add_render_attribute( 'premium_fancy_suffix_text', 'class', 'premium-fancy-text-span-align' );
393
  }
394
 
395
+ if($settings['premium_fancy_text_effect'] == 'typing'){
396
+ $show_cursor = (!empty($settings['premium_fancy_text_show_cursor'])) ? true : false;
397
+ $loop = !empty( $settings['premium_fancy_text_type_loop'] ) ? true : false;
398
+ $strings = array();
399
+ foreach ( $settings['premium_fancy_text_strings'] as $item ) :
400
+ if ( ! empty( $item['premium_text_strings_text_field'] ) ) :
401
+ array_push($strings, $item['premium_text_strings_text_field']);
402
+ endif;
403
+ endforeach;
404
+ $fancytext_settings = [
405
+ 'effect' => $settings['premium_fancy_text_effect'],
406
+ 'strings' => $strings,
407
+ 'typeSpeed' => $settings['premium_fancy_text_type_speed'],
408
+ 'backSpeed' => $settings['premium_fancy_text_back_speed'],
409
+ 'startDelay'=> $settings['premium_fancy_text_start_delay'],
410
+ 'showCursor'=> $show_cursor,
411
+ 'cursorChar'=> $cursor_text,
412
+ 'loop' => $loop,
413
+ ];
414
+ } else {
415
+ $mause_pause = !empty( $settings['premium_slide_up_hover_pause'] ) ? true : false;
416
+ $fancytext_settings = [
417
+ 'effect' => $settings['premium_fancy_text_effect'],
418
+ 'speed' => $settings['premium_slide_up_speed'],
419
+ 'showItems' => $settings['premium_slide_up_shown_items'],
420
+ 'pause' => $settings['premium_slide_up_pause_time'],
421
+ 'mousePause' => $mause_pause
422
+ ];
423
+ }
424
+
425
  ?>
426
 
427
 
428
+ <div class="premium-fancy-text-wrapper" data-settings='<?php echo wp_json_encode($fancytext_settings); ?>'>
429
  <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_prefix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
430
 
431
  <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?><span id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" ></span>
432
  <?php else : ?>
433
  <div id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
434
  <ul>
435
+ <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) : ?><?php if ( ! empty( $item['premium_text_strings_text_field'] ) ) : ?><?php echo "<li class='premium-fancy-list-items' >".esc_attr( $item['premium_text_strings_text_field'] )."</li>"; ?><?php endif; ?><?php endforeach; ?>
436
  </ul>
437
  </div>
438
  <?php endif; ?>
439
  <span class="premium-suffix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_suffix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_suffix_text'] ), true ); ?></span></span>
440
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
  <?php
442
  }
443
  }
widgets/premium-grid.php CHANGED
@@ -23,7 +23,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
23
  }
24
 
25
  public function get_script_depends(){
26
- return ['prettyPhoto-js','isotope-js'];
27
  }
28
 
29
  public function is_reload_preview_required(){
@@ -169,7 +169,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
169
  '33.330%' => esc_html__( '3 Columns', 'premium-addons-for-elementor' ),
170
  '25%' => esc_html__( '4 Columns', 'premium-addons-for-elementor' ),
171
  '20%' => esc_html__( '5 Columns', 'premium-addons-for-elementor' ),
172
- '16.67%' => esc_html__( '6 Columns', 'premium-addons-for-elementor' ),
173
  ],
174
  'selectors' => [
175
  '{{WRAPPER}} .premium-gallery-container .premium-gallery-item' => 'width: {{VALUE}};',
@@ -193,7 +193,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
193
  $this->add_group_control(
194
  Group_Control_Image_Size::get_type(),
195
  [
196
- 'name' => 'thumnail', // Actually its `image_size`.
197
  'default' => 'full',
198
  'condition' => [
199
  'premium_gallery_img_size_select' => 'one_size'
@@ -988,12 +988,18 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
988
  $settings = $this->get_settings();
989
  $filter = $settings['premium_gallery_filter'];
990
 
991
- $number_columns = $settings['premium_gallery_column_number'];
992
 
993
  $layout = $settings['premium_gallery_img_style'];
994
  $min_size = $settings['premium_gallery_min_range'].'px';
995
  $max_size = $settings['premium_gallery_max_range'].'px';
996
 
 
 
 
 
 
 
997
  ?>
998
  <div id="premium-img-gallery-<?php echo esc_attr($this->get_id()); ?>" class="premium-img-gallery">
999
  <?php if($filter == 'yes') : ?>
@@ -1009,14 +1015,14 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
1009
  <?php endforeach; ?>
1010
  </ul>
1011
  </div>
1012
- <div class="premium-gallery-container <?php echo esc_attr($number_columns) . ' '.esc_attr($number_columns_tabs) . ' ' . esc_attr($number_columns_mobile); ?>">
1013
  <?php foreach( $settings['premium_gallery_img_content'] as $image ) : ?>
1014
  <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1015
  <div class="pa-gallery-img <?php echo esc_attr($layout); ?>">
1016
  <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1017
  <?php if($settings['premium_gallery_img_size_select'] == 'one_size'):
1018
  $image_src = $image['premium_gallery_img'];
1019
- $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumnail', $settings );
1020
  if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
1021
  ?>
1022
  <img src="<?php echo $image_src_size; ?>" class="pa-gallery-image">
@@ -1108,12 +1114,12 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
1108
  <?php endforeach; ?>
1109
  </div>
1110
  <?php else: ?>
1111
- <div class="premium-gallery-container <?php echo esc_attr($number_columns) . ' '.esc_attr($number_columns_tabs) . ' ' . esc_attr($number_columns_mobile); ?>">
1112
  <?php foreach( $settings['premium_gallery_img_content'] as $image ) : ?>
1113
  <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1114
  <div class="pa-gallery-img <?php echo esc_attr($layout); ?>">
1115
  <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1116
- <?php if($settings['premium_gallery_img_size_select'] == 'one_size'):
1117
  $image_src = $image['premium_gallery_img'];
1118
  $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1119
  if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;?>
@@ -1207,93 +1213,6 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
1207
  </div>
1208
  <?php endif; ?>
1209
  </div>
1210
- <script>
1211
- jQuery(document).ready( function($) {
1212
- <?php if($settings['premium_gallery_img_size_select'] == 'original' && $settings['premium_gallery_filter'] == 'yes'): ?>
1213
- var $container = $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-container').isotope();
1214
- $container.imagesLoaded( function() {
1215
- $container.isotope({
1216
- filter: '*',
1217
- itemSelector: '.premium-gallery-item',
1218
- percentPosition: true,
1219
- layoutMode: "masonry"
1220
- });
1221
- });
1222
- $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-cats-container li a').click(function(){
1223
- $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-cats-container li .active').removeClass('active');
1224
- $(this).addClass('active');
1225
- var selector = $(this).attr('data-filter');
1226
- $container.isotope({
1227
- filter: selector,
1228
- percentPosition: true,
1229
- animationOptions: {
1230
- duration: 750,
1231
- easing: 'linear',
1232
- queue: false
1233
- }
1234
- });
1235
- return false;
1236
- });
1237
- <?php elseif($settings['premium_gallery_img_size_select'] == 'one_size' && $settings['premium_gallery_filter'] == 'yes'): ?>
1238
- var $container = $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-container').isotope();
1239
- $container.imagesLoaded( function() {
1240
- $container.isotope({
1241
- filter: '*',
1242
- itemSelector: '.premium-gallery-item',
1243
- percentPosition: true,
1244
- layoutMode: "fitRows"
1245
- });
1246
- });
1247
- $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-cats-container li a').click(function(){
1248
- $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-cats-container li .active').removeClass('active');
1249
- $(this).addClass('active');
1250
- var selector = $(this).attr('data-filter');
1251
- $container.isotope({
1252
- filter: selector,
1253
- animationOptions: {
1254
- duration: 750,
1255
- easing: 'linear',
1256
- queue: false
1257
- }
1258
- });
1259
- return false;
1260
- });
1261
- <?php elseif($settings['premium_gallery_img_size_select'] == 'original' && $settings['premium_gallery_filter'] != 'yes'): ?>
1262
- var $container = $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-container').isotope();
1263
- $container.imagesLoaded( function() {
1264
- $container.isotope({
1265
- itemSelector: '.premium-gallery-item',
1266
- percentPosition: true,
1267
- layoutMode: "masonry"
1268
- });
1269
- });
1270
- <?php elseif($settings['premium_gallery_img_size_select'] == 'one_size' && $settings['premium_gallery_filter'] != 'yes'): ?>
1271
- var $container = $('#premium-img-gallery-<?php echo esc_attr($this->get_id()); ?> .premium-gallery-container').isotope();
1272
- $container.imagesLoaded( function() {
1273
- $container.isotope({
1274
- itemSelector: '.premium-gallery-item',
1275
- percentPosition: true,
1276
- layoutMode: "fitRows"
1277
- });
1278
- });
1279
- <?php endif; ?>
1280
-
1281
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1282
- $("#premium-img-gallery-<?php echo esc_attr( $this->get_id() ); ?> a[data-rel^='prettyPhoto']").prettyPhoto({
1283
- theme: 'pp_default',
1284
- hook: 'data-rel',
1285
- opacity: 0.7,
1286
- show_title: false,
1287
- deeplinking: false,
1288
- overlay_gallery: false,
1289
- custom_markup: '',
1290
- default_width: 900,
1291
- default_height: 500,
1292
- social_tools: ''
1293
- });
1294
- <?php endif; ?>
1295
- });
1296
- </script>
1297
  <?php if($settings['premium_gallery_responsive_switcher'] == 'yes') : ?>
1298
  <style>
1299
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
23
  }
24
 
25
  public function get_script_depends(){
26
+ return ['premium-addons-js','prettyPhoto-js','isotope-js'];
27
  }
28
 
29
  public function is_reload_preview_required(){
169
  '33.330%' => esc_html__( '3 Columns', 'premium-addons-for-elementor' ),
170
  '25%' => esc_html__( '4 Columns', 'premium-addons-for-elementor' ),
171
  '20%' => esc_html__( '5 Columns', 'premium-addons-for-elementor' ),
172
+ '16.66%' => esc_html__( '6 Columns', 'premium-addons-for-elementor' ),
173
  ],
174
  'selectors' => [
175
  '{{WRAPPER}} .premium-gallery-container .premium-gallery-item' => 'width: {{VALUE}};',
193
  $this->add_group_control(
194
  Group_Control_Image_Size::get_type(),
195
  [
196
+ 'name' => 'thumbnail', // Actually its `image_size`.
197
  'default' => 'full',
198
  'condition' => [
199
  'premium_gallery_img_size_select' => 'one_size'
988
  $settings = $this->get_settings();
989
  $filter = $settings['premium_gallery_filter'];
990
 
991
+ $number_columns = str_replace(array('%','.'),'', 'premium-grid-'.$settings['premium_gallery_column_number'] );
992
 
993
  $layout = $settings['premium_gallery_img_style'];
994
  $min_size = $settings['premium_gallery_min_range'].'px';
995
  $max_size = $settings['premium_gallery_max_range'].'px';
996
 
997
+ $grid_settings = [
998
+ 'img_size' => $settings['premium_gallery_img_size_select'],
999
+ 'filter' => $settings['premium_gallery_filter'],
1000
+ 'light_box' => $settings['premium_gallery_light_box']
1001
+ ];
1002
+
1003
  ?>
1004
  <div id="premium-img-gallery-<?php echo esc_attr($this->get_id()); ?>" class="premium-img-gallery">
1005
  <?php if($filter == 'yes') : ?>
1015
  <?php endforeach; ?>
1016
  </ul>
1017
  </div>
1018
+ <div class="premium-gallery-container js-isotope <?php echo esc_attr($number_columns); ?>" data-settings='<?php echo wp_json_encode($grid_settings); ?>'>
1019
  <?php foreach( $settings['premium_gallery_img_content'] as $image ) : ?>
1020
  <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1021
  <div class="pa-gallery-img <?php echo esc_attr($layout); ?>">
1022
  <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1023
  <?php if($settings['premium_gallery_img_size_select'] == 'one_size'):
1024
  $image_src = $image['premium_gallery_img'];
1025
+ $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1026
  if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
1027
  ?>
1028
  <img src="<?php echo $image_src_size; ?>" class="pa-gallery-image">
1114
  <?php endforeach; ?>
1115
  </div>
1116
  <?php else: ?>
1117
+ <div class="premium-gallery-container js-isotope <?php echo esc_attr($number_columns); ?>" data-settings='<?php echo wp_json_encode($grid_settings); ?>'>
1118
  <?php foreach( $settings['premium_gallery_img_content'] as $image ) : ?>
1119
  <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1120
  <div class="pa-gallery-img <?php echo esc_attr($layout); ?>">
1121
  <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1122
+ <?php if($settings['premium_gallery_img_size_select'] == 'one_size') :
1123
  $image_src = $image['premium_gallery_img'];
1124
  $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1125
  if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;?>
1213
  </div>
1214
  <?php endif; ?>
1215
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1216
  <?php if($settings['premium_gallery_responsive_switcher'] == 'yes') : ?>
1217
  <style>
1218
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
widgets/premium-maps.php CHANGED
@@ -25,6 +25,10 @@ class Premium_Maps_Widget extends Widget_Base
25
  public function get_categories() {
26
  return [ 'premium-elements' ];
27
  }
 
 
 
 
28
 
29
  // Adding the controls fields for the premium maps
30
  // This will controls the animation, colors and background, dimensions etc
@@ -492,9 +496,13 @@ class Premium_Maps_Widget extends Widget_Base
492
  {
493
  // get our input from the widget settings.
494
  $settings = $this->get_settings();
 
 
495
 
496
  if( !empty( $settings['premium_maps_custom_styling'] ) ){
497
- $map_custom_style = 'styles:' . $settings['premium_maps_custom_styling'] . ',';
 
 
498
  }
499
 
500
  if ($settings['premium_maps_map_option_streeview'] == 'yes') {
@@ -525,86 +533,70 @@ class Premium_Maps_Widget extends Widget_Base
525
  $map_type_control = 'true';
526
  } else {
527
  $map_type_control = 'false';
528
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  ?>
530
- <div id="premium-map-script-trriger-<?php echo esc_attr($this->get_id()); ?>"></div>
531
- <div class="premium-maps-container" id="premium-maps-container">
532
- <div id="premium-maps-map-<?php echo esc_attr($this->get_id()); ?>" class="premium_maps_map_height"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
  </div>
534
  <script>
535
-
536
- var premium_mapDiv = document.getElementById('premium-map-script-trriger-<?php echo esc_attr($this->get_id()); ?>');
537
- google.maps.event.addDomListener(premium_mapDiv, 'click', initMap);
538
- google.maps.event.addDomListener(window, 'load', initMap);
539
- jQuery(document).ready(function( $ ) {
540
- initMap();
541
- });
542
-
543
- function initMap(){
544
-
545
- var myLatLng = {lat: <?php echo $settings['premium_maps_center_lat']; ?>, lng: <?php echo $settings['premium_maps_center_long']; ?>};
546
- var locations = [<?php
547
- foreach ($settings['premium_maps_map_pins'] as $item) {echo '[' . "'" . esc_attr($item['pin_title']) . "'" . ',' . "'" . $item['pin_desc'] . "'" . ',' . esc_attr($item['map_latitude']) . ',' . esc_attr($item['map_longitude']) . ',' ."'" . esc_attr($item['pin_icon']['url']). "'" . '],'; } ?>];
548
- var map = new google.maps.Map( document.getElementById('premium-maps-map-<?php echo esc_attr($this->get_id()); ?>') ,
549
- {
550
- zoom: <?php echo $settings['premium_maps_map_zoom']['size']; ?>,
551
- mapTypeId: '<?php echo $settings['premium_maps_map_type']; ?>',
552
- center: myLatLng,
553
- scrollwheel: <?php echo $scroll_wheel; ?>,
554
- streetViewControl: <?php echo $street_view; ?>,
555
- fullscreenControl: <?php echo $enable_full_screen; ?>,
556
-
557
- zoomControl: <?php echo $enable_zoom_control; ?>,
558
- mapTypeControl: <?php echo $map_type_control; ?>,
559
- <?php if( !empty( $settings['premium_maps_custom_styling'] ) ){ echo $map_custom_style; }?>
560
- });
561
-
562
- var marker, i, infowindow;
563
-
564
- for (i = 0; i < locations.length; i++) {
565
- marker = new google.maps.Marker({
566
- position: new google.maps.LatLng(locations[i][2], locations[i][3]),
567
- icon: locations[i][4],
568
- optimized: false,
569
- map: map
570
- });
571
- infowindow = new google.maps.InfoWindow({
572
- content: "<div class='premium-maps-info-container'><p class='premium-maps-info-title'>" + locations[i][0] + "</p><div class='premium-maps-info-desc'>" + locations[i][1] + "</div></div>"
573
- });
574
- <?php if( $settings['premium_maps_marker_open'] == 'yes' ) : ?>
575
- if(locations[i][0] !== '' || locations[i][1] !== '') {
576
- infowindow.open(map, marker);
577
- }
578
- <?php endif; ?>
579
- <?php if( $settings['premium_maps_marker_hover_open'] == 'yes' ) : ?>
580
- google.maps.event.addListener(marker, 'mouseover', (function(marker, i) {
581
- return function() {
582
- if(locations[i][0] !== '' || locations[i][1] !== '') {
583
- infowindow.setContent("<div class='premium-maps-info-container'><p class='premium-maps-info-title'>" + locations[i][0] + "</p><div class='premium-maps-info-desc'>" + locations[i][1] + "</div></div>");
584
- infowindow.open(map, marker);
585
- }
586
- }
587
- })(marker, i));
588
- <?php if( $settings['premium_maps_marker_mouse_out'] == 'yes' ) : ?>
589
- google.maps.event.addListener(marker, 'mouseout', (function(marker, i) {
590
- return function() {
591
- if(locations[i][0] !== '' || locations[i][1] !== '') {
592
- infowindow.close(map, marker);
593
- }
594
- }
595
- })(marker, i));
596
- <?php endif; ?>
597
- <?php endif; ?>
598
- google.maps.event.addListener(marker, 'click', (function(marker, i) {
599
- return function() {
600
- if(locations[i][0] !== '' || locations[i][1] !== '') {
601
- infowindow.setContent("<div class='premium-maps-info-container'><p class='premium-maps-info-title'>" + locations[i][0] + "</p><div class='premium-maps-info-desc'>" + locations[i][1] + "</div></div>");
602
- infowindow.open(map, marker);
603
- }
604
- }
605
- })(marker, i));
606
- }
607
- }
608
  </script>
609
 
610
 
25
  public function get_categories() {
26
  return [ 'premium-elements' ];
27
  }
28
+
29
+ public function get_script_depends() {
30
+ return ['premium-addons-js'];
31
+ }
32
 
33
  // Adding the controls fields for the premium maps
34
  // This will controls the animation, colors and background, dimensions etc
496
  {
497
  // get our input from the widget settings.
498
  $settings = $this->get_settings();
499
+
500
+ $map_pins = $settings['premium_maps_map_pins'];
501
 
502
  if( !empty( $settings['premium_maps_custom_styling'] ) ){
503
+ $map_custom_style = $settings['premium_maps_custom_styling'];
504
+ } else {
505
+ $map_custom_style = '';
506
  }
507
 
508
  if ($settings['premium_maps_map_option_streeview'] == 'yes') {
533
  $map_type_control = 'true';
534
  } else {
535
  $map_type_control = 'false';
536
+ }
537
+
538
+ if ($settings['premium_maps_marker_open'] == 'yes') {
539
+ $automatic_open = 'true';
540
+ } else {
541
+ $automatic_open = 'false';
542
+ }
543
+
544
+ if ($settings['premium_maps_marker_hover_open'] == 'yes') {
545
+ $hover_open = 'true';
546
+ } else {
547
+ $hover_open = 'false';
548
+ }
549
+
550
+ if ($settings['premium_maps_marker_mouse_out'] == 'yes') {
551
+ $hover_close = 'true';
552
+ } else {
553
+ $hover_close = 'false';
554
+ }
555
+
556
+ $centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
557
+ $centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
558
+
559
+ $map_settings = [
560
+ 'zoom' => $settings['premium_maps_map_zoom']['size'],
561
+ 'maptype' => $settings['premium_maps_map_type'],
562
+ 'streetViewControl' => $street_view,
563
+ 'centerlat' => $centerlat,
564
+ 'centerlong' => $centerlong,
565
+ 'scrollwheel' => $scroll_wheel,
566
+ 'fullScreen' => $enable_full_screen,
567
+ 'zoomControl' => $enable_zoom_control,
568
+ 'typeControl' => $map_type_control,
569
+ 'automaticOpen' => $automatic_open,
570
+ 'hoverOpen' => $hover_open,
571
+ 'hoverClose' => $hover_close,
572
+ ];
573
+
574
+ $this->add_render_attribute('style_wrapper', 'data-style', $settings['premium_maps_custom_styling']);
575
  ?>
576
+
577
+ <div class="premium-maps-container" id="premium-maps-container">
578
+ <?php if(count($map_pins)){
579
+ ?>
580
+ <div class="premium_maps_map_height" data-settings='<?php echo wp_json_encode($map_settings); ?>' <?php echo $this->get_render_attribute_string('style_wrapper'); ?>>
581
+ <?php
582
+ foreach($map_pins as $pin){
583
+ ?>
584
+ <div class="premium-pin" data-lng="<?php echo $pin['map_longitude']; ?>" data-lat="<?php echo $pin['map_latitude']; ?>" data-icon="<?php echo $pin['pin_icon']['url']; ?>">
585
+ <?php if(!empty($pin['pin_title'])|| !empty($pin['pin_desc'])):?>
586
+
587
+ <div class='premium-maps-info-container'><p class='premium-maps-info-title'><?php echo $pin['pin_title']; ?></p><div class='premium-maps-info-desc'><?php echo $pin['pin_desc']; ?></div></div>
588
+ <?php endif; ?>
589
+ </div>
590
+ <?php
591
+ }
592
+ ?>
593
+ </div>
594
+ <?php
595
+ } ?>
596
+
597
  </div>
598
  <script>
599
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
600
  </script>
601
 
602
 
widgets/premium-modalbox.php CHANGED
@@ -19,7 +19,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
19
 
20
  public function get_script_depends()
21
  {
22
- return ['modal-js'];
23
  }
24
 
25
  public function get_categories() {
@@ -962,10 +962,14 @@ class Premium_Modal_Box_Widget extends Widget_Base
962
  $settings = $this->get_settings();
963
  $this->add_inline_editing_attributes('premium_modal_box_selector_text');
964
 
 
 
 
 
965
  ?>
966
 
967
 
968
- <div class="container premium-modal-box-container">
969
  <!-- Trigger The Modal Box -->
970
  <div class="premium-modal-box-selector-container">
971
  <?php
@@ -979,14 +983,6 @@ class Premium_Modal_Box_Widget extends Widget_Base
979
  <img class="premium-modal-box-img-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" src="<?php echo $settings['premium_modal_box_image_src']['url'];?>">
980
  <?php elseif($settings['premium_modal_box_display_on'] === 'text') : ?>
981
  <span class="premium-modal-box-text-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>"><div <?php echo $this->get_render_attribute_string('premium_modal_box_selector_text'); ?>><?php echo $settings['premium_modal_box_selector_text'];?></div></span>
982
- <?php elseif ( $settings['premium_modal_box_display_on'] === 'pageload' ) : ?>
983
- <script>
984
- jQuery( document ).ready( function( $ ){
985
- setTimeout( function(){
986
- $( "#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" ).modal();
987
- },<?php echo $settings['premium_modal_box_popup_delay'] * 1000; ?>);
988
- });
989
- </script>
990
  <?php endif; ?>
991
  </div>
992
 
19
 
20
  public function get_script_depends()
21
  {
22
+ return ['premium-addons-js','modal-js'];
23
  }
24
 
25
  public function get_categories() {
962
  $settings = $this->get_settings();
963
  $this->add_inline_editing_attributes('premium_modal_box_selector_text');
964
 
965
+ $modal_settings = [
966
+ 'trigger' => $settings['premium_modal_box_display_on'],
967
+ 'delay' => $settings['premium_modal_box_popup_delay'],
968
+ ];
969
  ?>
970
 
971
 
972
+ <div class="container premium-modal-box-container" data-settings='<?php echo wp_json_encode($modal_settings); ?>'>
973
  <!-- Trigger The Modal Box -->
974
  <div class="premium-modal-box-selector-container">
975
  <?php
983
  <img class="premium-modal-box-img-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" src="<?php echo $settings['premium_modal_box_image_src']['url'];?>">
984
  <?php elseif($settings['premium_modal_box_display_on'] === 'text') : ?>
985
  <span class="premium-modal-box-text-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>"><div <?php echo $this->get_render_attribute_string('premium_modal_box_selector_text'); ?>><?php echo $settings['premium_modal_box_selector_text'];?></div></span>
 
 
 
 
 
 
 
 
986
  <?php endif; ?>
987
  </div>
988
 
widgets/premium-progressbar.php CHANGED
@@ -20,6 +20,11 @@ class Premium_Progressbar_Widget extends Widget_Base
20
  public function get_categories() {
21
  return [ 'premium-elements' ];
22
  }
 
 
 
 
 
23
 
24
  // Adding the controls fields for the premium progress bar
25
  // This will controls the animation, colors and background, dimensions etc
@@ -162,9 +167,6 @@ class Premium_Progressbar_Widget extends Widget_Base
162
  'size' => 50,
163
  'unit' => '%',
164
  ],
165
- 'selectors' => [
166
- '{{WRAPPER}} .premium-progressbar-progress-bar' => 'width: {{SIZE}}{{UNIT}};',
167
- ]
168
  ]
169
  );
170
 
@@ -562,6 +564,10 @@ class Premium_Progressbar_Widget extends Widget_Base
562
  $settings = $this->get_settings();
563
  $this->add_inline_editing_attributes('premium_progressbar_left_label');
564
  $this->add_inline_editing_attributes('premium_progressbar_right_label');
 
 
 
 
565
  ?>
566
 
567
  <div class="premium-progressbar-container">
@@ -668,37 +674,10 @@ class Premium_Progressbar_Widget extends Widget_Base
668
  <?php endif;?>
669
  <div class="clearfix"></div>
670
  <div class="pa-progress premium-progressbar-progress">
671
- <div class=" premium-progressbar-progress-bar progress-bar <?php if( $settings['premium_progressbar_progress_style'] === 'solid' ){ echo "";} elseif( $settings['premium_progressbar_progress_style'] === 'stripped' ){ echo "progress-bar-striped";}?> <?php if( $settings['premium_progressbar_progress_animation'] === 'yes' ){ echo "active";}?>" role="progressbar" aria-valuenow="<?php echo $settings['premium_progressbar_progress_percentage']['size']; ?>" aria-valuemin="0" aria-valuemax="100">
672
  </div>
673
  </div>
674
  </div>
675
- <script>
676
- var progress_bar_interval;
677
- jQuery(function($){
678
- $(document).ready(function(){
679
- var i = 0;
680
- if ( $(document).outerWidth() < 768 ) {
681
- progress_bar_interval = 600;
682
- } else {
683
- progress_bar_interval = 1000;
684
- }
685
- $(".premium-progressbar-progress-bar").css('width','0');
686
- var number_of_progress_bars = $(".premium-progressbar-progress-bar").length;
687
- for(;;){if(i >= number_of_progress_bars){break;} scrollFunction(i); i = i + 1;}
688
- });
689
- });
690
- function scrollFunction(progressBar){
691
- jQuery(function($){$(document).scroll(function(){
692
- if( $(this).scrollTop() >= $(".premium-progressbar-progress:eq(" + progressBar+ ")").offset().top - 600 ){
693
- $(".premium-progressbar-progress-bar:eq("+progressBar+")").animate({
694
- width: $(".premium-progressbar-progress-bar:eq("+progressBar+")").attr('aria-valuenow') + '%'
695
- },progress_bar_interval);
696
- }
697
- });
698
- });
699
- };
700
- </script>
701
-
702
  <?php
703
  }
704
  }
20
  public function get_categories() {
21
  return [ 'premium-elements' ];
22
  }
23
+
24
+ public function get_script_depends()
25
+ {
26
+ return ['premium-addons-js', 'waypoints'];
27
+ }
28
 
29
  // Adding the controls fields for the premium progress bar
30
  // This will controls the animation, colors and background, dimensions etc
167
  'size' => 50,
168
  'unit' => '%',
169
  ],
 
 
 
170
  ]
171
  );
172
 
564
  $settings = $this->get_settings();
565
  $this->add_inline_editing_attributes('premium_progressbar_left_label');
566
  $this->add_inline_editing_attributes('premium_progressbar_right_label');
567
+
568
+ $progressbar_settings = [
569
+ 'progress_length' => $settings['premium_progressbar_progress_percentage']['size']
570
+ ];
571
  ?>
572
 
573
  <div class="premium-progressbar-container">
674
  <?php endif;?>
675
  <div class="clearfix"></div>
676
  <div class="pa-progress premium-progressbar-progress">
677
+ <div class=" premium-progressbar-progress-bar progress-bar <?php if( $settings['premium_progressbar_progress_style'] === 'solid' ){ echo "";} elseif( $settings['premium_progressbar_progress_style'] === 'stripped' ){ echo "progress-bar-striped";}?> <?php if( $settings['premium_progressbar_progress_animation'] === 'yes' ){ echo "active";}?>" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-settings='<?php echo wp_json_encode($progressbar_settings); ?>'>
678
  </div>
679
  </div>
680
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
681
  <?php
682
  }
683
  }
widgets/premium-videobox.php CHANGED
@@ -20,6 +20,10 @@ class Premium_Video_Box_Widget extends Widget_Base
20
  public function get_categories() {
21
  return [ 'premium-elements' ];
22
  }
 
 
 
 
23
 
24
  // Adding the controls fields for the premium video box
25
  // This will controls the animation, colors and background, dimensions etc
@@ -541,20 +545,6 @@ class Premium_Video_Box_Widget extends Widget_Base
541
 
542
  </div>
543
  </div>
544
- <script>
545
- jQuery(function( $ ){
546
- $( "#premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?>" ).on( "click", function(){
547
- $( this ).children( ".premium-video-box-video-container" ).css(
548
- {
549
- 'opacity': '1',
550
- 'visibility': 'visible'
551
- } );
552
- setTimeout(function(){
553
- $("#premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?> iframe" ).attr('src', $("#premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?> iframe").attr('src') + '?autoplay=1'); ;
554
- },600);
555
- });
556
- });
557
- </script>
558
 
559
  <?php
560
  }
20
  public function get_categories() {
21
  return [ 'premium-elements' ];
22
  }
23
+
24
+ public function get_script_depends() {
25
+ return [ 'premium-addons-js' ];
26
+ }
27
 
28
  // Adding the controls fields for the premium video box
29
  // This will controls the animation, colors and background, dimensions etc
545
 
546
  </div>
547
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
 
549
  <?php
550
  }