'+ data.places[i].address +'
x
",r.appendChild(e.childNodes[1])}var d={selector:["iframe","object"],players:["www.youtube.com","player.vimeo.com"]},o=[".fluidvids {","width: 100%; max-width: 100%; position: relative;","}",".fluidvids-item {","position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;","}"].join(""),r=document.head||document.getElementsByTagName("head")[0];return d.render=function(){for(var e=document.querySelectorAll(d.selector.join()),t=e.length;t--;)i(e[t])},d.init=function(e){for(var t in e)d[t]=e[t];d.render(),n()},d}); (function($){ "use strict"; var initFluidVids = function() { fluidvids.init({ selector: ['iframe:not(.pt-plus-bg-video)'],players: ['www.youtube.com', 'player.vimeo.com']}) }; $(window).on('load', initFluidVids); $(document).ready(function(){ initFluidVids(); }); $('body').on('post-load', initFluidVids); })(jQuery); /*-video post ----*/ /* CountDown */ if(wid_sec.find('.pt_plus_countdown').length>0){ ( function ( $ ) { "use strict"; $(document).ready(function () { theplus_countdown(); $(".pt_plus_countdown").change(function () { theplus_countdown(); }); }); function theplus_countdown(){ $(".pt_plus_countdown").each(function () { var timer1 = $(this).attr("data-timer"); var res = timer1.split("-"); var text_days=$(this).data("days"); var text_hours=$(this).data("hours"); var text_minutes=$(this).data("minutes"); var text_seconds=$(this).data("seconds"); $(this).downCount({ date: res[1]+"/"+res[0]+"/"+res[2]+" 12:00:00", offset: +1, text_day:text_days, text_hour:text_hours, text_minute:text_minutes, text_second:text_seconds, }); }); } } ( jQuery ) ); } /* CountDown*/ /*-social icon element----*/ if(wid_sec.find('.ts-chaffle').length>0){ ( function ( $ ) { 'use strict'; $(document).ready(function() { $('.ts-chaffle').chaffle({ speed: 20, time: 140 }); }); } ( jQuery ) ); } /*-social icon element----*/ /*device carousel */ if(wid_sec.find('.plus-device-carousal').length>0){ var carousel_elem = $scope.find('.plus-device-carousal').eq(0); var $self=carousel_elem; var $uid=$self.data("id"); var infinite=$self.data("infinite"); var autoplay=$self.data("autoplay"); var autoplay_speed=$self.data("autoplay_speed"); var speed=$self.data("speed"); if(!$('.'+$uid).hasClass("done-carousel")){ $('.'+$uid).slick({ arrows:false, dots:false, infinite: infinite, speed: speed, autoplay: autoplay, autoplaySpeed: autoplay_speed, centerMode: true, centerPadding: '0px', slidesToShow: 1, slidesToScroll: 1, draggable:true, variableWidth: true, }); $('.'+$uid).addClass("done-carousel"); } } /*device carousel */ /* switcher toggle load*/ if(wid_sec.find('.theplus-switcher').length>0){ var target = $scope.find('.theplus-switcher'); var switch_toggle = target.find('.switch-toggle'); var switch_1_toggle = target.find('.switch-1'); var switch_2_toggle = target.find('.switch-2'); $(document).ready(function(){ var i,n,f,r; $(switch_toggle).unbind().click(function(e) { i = $(this).closest(".theplus-switcher").find(".switcher-section-1"); n = $(this).closest(".theplus-switcher").find(".switcher-section-2"); f = $(this).closest(".theplus-switcher").find(".switcher-toggle"); i.toggle(); n.toggle(); if(f.hasClass("active")){ (f.removeClass("active").addClass("inactive"));}else{ (f.removeClass("inactive").addClass("active"));} }); $(switch_1_toggle).unbind().on("click", function(e) { i = $(this).parents(".theplus-switcher").find(".switcher-section-1"); n = $(this).parents(".theplus-switcher").find(".switcher-section-2"); f = $(this).parents(".theplus-switcher").find(".switcher-toggle"); r = $(this).parents(".theplus-switcher").find(".switch-toggle"); r.prop("checked", !1), i.show(), n.hide(), f.hasClass("active") ? (f.removeClass("active").addClass("inactive")) : (f.removeClass("inactive").addClass("active")) }); $(switch_2_toggle).unbind().on("click", function(e) { i = $(this).parents(".theplus-switcher").find(".switcher-section-1"); n = $(this).parents(".theplus-switcher").find(".switcher-section-2"); f = $(this).parents(".theplus-switcher").find(".switcher-toggle"); r = $(this).parents(".theplus-switcher").find(".switch-toggle"); r.prop("checked", !0), i.hide(), n.show(), f.hasClass("active") ? (f.removeClass("active").addClass("inactive")) : (f.removeClass("inactive").addClass("active")) }); }); } /* switcher toggle load*/ /* post listing out*/ if(wid_sec.find('.list-isotope').length>0){ var b = window.theplus || {}; b.window = $(window), b.document = $(document), b.windowHeight = b.window.height(), b.windowWidth = b.window.width(); b.list_isotope_Posts = function() { var c = function(c) { $('.list-isotope').each(function() { var e, c = $(this), d = c.data("layout-type"),f = { itemSelector: ".grid-item", resizable: !0, sortBy: "original-order" }; var uid=c.data("id"); var inner_c=$('.'+uid).find(".post-inner-loop"); $('.'+uid).addClass("pt-plus-isotope layout-" + d), e = "masonry" === d ? "packery" : "fitRows", f.layoutMode = e, function() { //b.initMetroIsotope(), inner_c.isotope(f) }(), $('.'+uid+' .post-filter-data').find(".filter-category-list").click(function(event) { event.preventDefault(); var d = $(this).attr("data-filter"); $(this).parent().parent().find(".active").removeClass("active"), $(this).addClass("active"), inner_c.isotope({ filter: d }), $("body").trigger("isotope-sorted"); }); }) }; b.window.on("load resize", function() { c('[data-enable-isotope="1"]') }), b.document.on("load resize", function() { c('[data-enable-isotope="1"]') }), $(document).ready(function() { c('[data-enable-isotope="1"]') }), $("body").on("post-load resort-isotope", function() { setTimeout(function() { c('[data-enable-isotope="1"]') }, 800) }), $("body").on("tabs-reinited", function() { setTimeout(function() { c('[data-enable-isotope="1"]') }, 800) }), $.browser.firefox = /firefox/.test(navigator.userAgent.toLowerCase()), $.browser.firefox && setTimeout(function() { c('[data-enable-isotope="1"]') }, 2500); }, b.init = function() { b.list_isotope_Posts(); } , b.init(); } if(wid_sec.find('.list-isotope-metro').length>0){ if ($('.list-isotope-metro').size() > 0) { $(window).on("load resize", function() { theplus_setup_packery_portfolio('all'); $('.list-isotope-metro .post-inner-loop').isotope('layout').isotope("reloadItems"); }); $("body").on("post-load resort-isotope", function() { setTimeout(function() { theplus_setup_packery_portfolio('all'); $('.list-isotope-metro .post-inner-loop').isotope('layout'); }, 800) }); $("body").on("tabs-reinited", function() { setTimeout(function() { theplus_setup_packery_portfolio('all'); $('.list-isotope-metro .post-inner-loop').isotope('layout'); }, 800) }); $.browser.firefox = /firefox/.test(navigator.userAgent.toLowerCase()), $.browser.firefox && setTimeout(function() { theplus_setup_packery_portfolio('all'); $('.list-isotope-metro .post-inner-loop').isotope('layout'); }, 2500); } } if(wid_sec.find('.list-carousel-slick').length>0){ var carousel_elem = $scope.find('.list-carousel-slick').eq(0); $(document).ready(function() { if (carousel_elem.length > 0) { if(!carousel_elem.hasClass("done-carousel")){ theplus_carousel_list(); } } }); } if(wid_sec.find('.gallery-list.gallery-style-3').length>0){ $('.gallery-list.gallery-style-3 .grid-item').each( function() { $(this).hoverdir(); } ); } /* post listing out*/ if(wid_sec.find('.blog-list.blog-style-1,.gallery-list.gallery-style-2').length>0){ jQuery(document).ready(function($) { jQuery(document).on('mouseenter',".blog-list.blog-style-1 .grid-item .blog-list-content,.gallery-list.gallery-style-2 .grid-item .gallery-list-content",function() { //jQuery(".blog-list.blog-style-1 .grid-item .blog-list-content").hover(function() { jQuery(this).find(".post-hover-content").slideDown(300) }); jQuery(document).on('mouseleave',".blog-list.blog-style-1 .grid-item .blog-list-content,.gallery-list.gallery-style-2 .grid-item .gallery-list-content",function() { jQuery(this).find(".post-hover-content").slideUp(300) }) }); } }; /* Default load WidgetThePlusHandler */ /* Backend load WidgetThePlusHandler */ var WidgetThePlusHandlerBackEnd = function ($scope, $) { var wid_sec=$scope.parents('section.elementor-element'); /*--- on load animation ----*/ if(wid_sec.find(".animate-general").length){ "use strict"; jQuery('.animate-general').each(function() { var c, p=jQuery(this); if(!p.hasClass("animation-done")){ if(p.find('.animated-columns').length){ var b = jQuery('.animated-columns',this); var delay_time=p.data("animate-delay"); c = p.find('.animated-columns'); c.each(function() { if(!jQuery(this).hasClass("animation-done")){ jQuery(this).css("opacity", "0"); } }); }else{ var b=jQuery(this); var delay_time=b.data("animate-delay"); if(b.data("animate-item")){ c = b.find(b.data("animate-item")); c.each(function() { if(!jQuery(this).hasClass("animation-done")){ jQuery(this).css("opacity", "0"); } }); }else{ b.css("opacity", "0"); } } } }); var d = function() { jQuery('.animate-general').each(function() { var c, d, p=jQuery(this), e = "85%"; var id=jQuery(this).data("id"); if(p.data("animate-columns")=="stagger"){ var b = jQuery('.animated-columns',this); var animation_stagger=p.data("animate-stagger"); var delay_time=p.data("animate-delay"); var out_delay_time=p.data("animate-out-delay"); var duration_time=p.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); var d = p.data("animate-type"); var o = p.data("animate-out-type"); var animate_offset = p.data("animate-offset"); p.css("opacity","1"); c = p.find('.animated-columns'); p.waypoint(function(direction) { if( direction === 'down'){ if(!c.hasClass("animation-done")){ c.addClass("animation-done").removeClass("animation-out-done").velocity(d,{ delay: delay_time,duration: duration_time,display:'auto',stagger: animation_stagger}); } }else if (direction === 'up' && o!='' && o!=undefined && !c.hasClass("animation-out-done")) { c.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto',stagger: animation_stagger}); } }, { offset: animate_offset } ); if(c){ jQuery('head').append("") } }else if(p.data("animate-columns")=="columns"){ var b = jQuery('.animated-columns',this); var delay_time=p.data("animate-delay"); var out_delay_time=p.data("animate-out-delay"); var d = p.data("animate-type"); var o = p.data("animate-out-type"); var animate_offset = p.data("animate-offset"); var duration_time=p.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); p.css("opacity","1"); c = p.find('.animated-columns'); c.each(function() { var bc=jQuery(this); bc.waypoint(function(direction) { if( direction === 'down'){ if(!bc.hasClass("animation-done")){ bc.addClass("animation-done").removeClass("animation-out-done").velocity(d,{ delay: delay_time,duration: duration_time,drag:true,display:'auto'}); } }else if (direction === 'up' && o!='' && o!=undefined && !bc.hasClass("animation-out-done")) { bc.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto'}); } }, { offset: animate_offset } ); }); if(c){ jQuery('head').append("") } }else{ var b = jQuery(this); var delay_time=b.data("animate-delay"); var out_delay_time=b.data("animate-out-delay"); var duration_time=b.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); d = b.data("animate-type"), o = b.data("animate-out-type"), animate_offset = b.data("animate-offset"), b.waypoint(function(direction ) { if( direction === 'down'){ if(!b.hasClass("animation-done")){ b.addClass("animation-done").removeClass("animation-out-done").velocity(d, {delay: delay_time,duration: duration_time,display:'auto'}); } }else if (direction === 'up' && o!='' && o!=undefined && !b.hasClass("animation-out-done")) { if(!b.hasClass("animation-out-done")){ b.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto' }); } } }, { offset: animate_offset } ); } }) }, e = function() { jQuery(".call-on-waypoint").each(function() { var c = jQuery(this); c.waypoint(function() { c.trigger("on-waypoin") }, { triggerOnce: !0, offset: "bottom-in-view" }) }) }; jQuery(document).ready(function(){ e(); d(); }); } /*--- on load animation ----*/ /*magic scroll */ if(wid_sec.find(".magic-scroll").length){ ( function ( $ ) { 'use strict'; $(document).ready(function(){ pt_plus_animateParalax(); }); } ( jQuery ) ); } /*magic scroll */ /*cascading Slide Show Image*/ if(wid_sec.find(".cascading-block").length > 0){ cascading_overflow(); } if(wid_sec.find('.slide_show_image').length>0){ cascading_slide_show_image(); } /*cascading Slide Show Image*/ /*Text Heading Animation*/ if(wid_sec.find('.pt-plus-cd-headline').length>0){ plus_heading_animation(); } /*Text Heading Animation*/ /* bg creative parallax */ if(wid_sec.find('.creative-simple-img-parallax').length>0){ pt_plus_bg_image_scroll_parallax(); } /* bg creative parallax */ /* animated svg */ $(document).ready(function() { setTimeout(function(){ $('.pt_plus_row_bg_animated_svg').pt_plus_animated_svg(); $('.pt_plus_animated_svg,.ts-hover-draw-svg').pt_plus_animated_svg(); $('body').find('.pt_plus_row_bg_animated_svg').attr('style', 'stroke:black'); }, 100); }); /* animated svg */ if(wid_sec.find('.list-isotope-metro').length>0){ $(document).ready(function(){ "use strict"; var container=wid_sec.find('.list-isotope-metro'); var uid=container.data("id"); var columns=container.attr('data-columns'); var metro_style=container.attr('data-metro-style'); theplus_backend_packery_portfolio(uid,columns,metro_style); }); } if(wid_sec.find('.list-carousel-slick').length>0){ var carousel_elem = $scope.find('.list-carousel-slick').eq(0); $(document).ready(function() { if (carousel_elem.length > 0) { if(!carousel_elem.hasClass("done-carousel")){ theplus_carousel_list(); } } }); } if(wid_sec.find('.theplus-contact-form').length){ $(document).ready(function() { plus_cf7_form(); }); } if(wid_sec.find(".columns-vimeo-bg").length){ $(document).ready(function() { $('.columns-vimeo-bg iframe').each(function() { var $self = $(this) id = $self.attr('id'); if (window.addEventListener) { window.addEventListener('message', onMessageReceived, false); } else { window.attachEvent('onmessage', onMessageReceived, false); } function onMessageReceived(e) { var data = JSON.parse(e.data); switch (data.event) { case 'ready': $self[0].contentWindow.postMessage('{"method":"play", "value":1}','*'); if($self.data('muted') && $self.data('muted') == '1') { $self[0].contentWindow.postMessage('{"method":"setVolume", "value":0}','*'); } var videoHolder = document.getElementById('wrapper-'+id); if(videoHolder && videoHolder.id){ videoHolder.classList.remove('tp-loading'); } break; } } }); }); } }; /* Backend load WidgetThePlusHandler */ $(window).on('elementor/frontend/init', function () { elementorFrontend.hooks.addAction('frontend/element_ready/tp-row-background.default', WidgetRowBackgroundHandler); elementorFrontend.hooks.addAction('frontend/element_ready/global', WidgetThePlusHandler); elementorFrontend.hooks.addAction('frontend/element_ready/tp-google-map.default', WidgetGoogleMapHandler); if (elementorFrontend.isEditMode()) { elementorFrontend.hooks.addAction('frontend/element_ready/tp-google-map.default', WidgetGoogleMapHandler); elementorFrontend.hooks.addAction('frontend/element_ready/tp-row-background.default', WidgetRowBackgroundHandler); elementorFrontend.hooks.addAction('frontend/element_ready/global', WidgetThePlusHandler); elementorFrontend.hooks.addAction('frontend/element_ready/global', WidgetThePlusHandlerBackEnd); } }); })(jQuery); /*--- on load animation ----*/ ( function ( $ ) { 'use strict'; jQuery(document).ready(function() { "use strict"; jQuery('.animate-general').each(function() { var c, p=jQuery(this); if(!p.hasClass("animation-done")){ if(p.find('.animated-columns').length){ var b = jQuery('.animated-columns',this); var delay_time=p.data("animate-delay"); c = p.find('.animated-columns'); c.each(function() { jQuery(this).css("opacity", "0"); }); }else{ var b=jQuery(this); var delay_time=b.data("animate-delay"); if(b.data("animate-item")){ c = b.find(b.data("animate-item")); c.each(function() { jQuery(this).css("opacity", "0"); }); }else{ b.css("opacity", "0"); } } } }); var d = function() { jQuery('.animate-general').each(function() { var c, d, p=jQuery(this), e = "85%"; var id=jQuery(this).data("id"); if(p.data("animate-columns")=="stagger"){ var b = jQuery('.animated-columns',this); var animation_stagger=p.data("animate-stagger"); var delay_time=p.data("animate-delay"); var out_delay_time=p.data("animate-out-delay"); var duration_time=p.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); var d = p.data("animate-type"); var o = p.data("animate-out-type"); var animate_offset = p.data("animate-offset"); p.css("opacity","1"); c = p.find('.animated-columns'); p.waypoint(function(direction) { if( direction === 'down'){ if(!c.hasClass("animation-done")){ c.addClass("animation-done").removeClass("animation-out-done").velocity(d,{ delay: delay_time,duration: duration_time,display:'auto',stagger: animation_stagger}); } }else if (direction === 'up' && o!='' && o!=undefined && !c.hasClass("animation-out-done")) { c.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto',stagger: animation_stagger}); } }, { offset: animate_offset } ); if(c){ jQuery('head').append("") } }else if(p.data("animate-columns")=="columns"){ var b = jQuery('.animated-columns',this); var delay_time=p.data("animate-delay"); var out_delay_time=p.data("animate-out-delay"); var d = p.data("animate-type"); var o = p.data("animate-out-type"); var animate_offset = p.data("animate-offset"); var duration_time=p.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); p.css("opacity","1"); c = p.find('.animated-columns'); c.each(function() { var bc=jQuery(this); bc.waypoint(function(direction) { if( direction === 'down'){ if(!bc.hasClass("animation-done")){ bc.addClass("animation-done").removeClass("animation-out-done").velocity(d,{ delay: delay_time,duration: duration_time,drag:true,display:'auto'}); } }else if (direction === 'up' && o!='' && o!=undefined && !bc.hasClass("animation-out-done")) { bc.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto'}); } }, { offset: animate_offset } ); }); if(c){ jQuery('head').append("") } }else{ var b = jQuery(this); var delay_time=b.data("animate-delay"); var out_delay_time=b.data("animate-out-delay"); var duration_time=b.data("animate-duration"); var out_duration_time=p.data("animate-out-duration"); d = b.data("animate-type"), o = b.data("animate-out-type"), animate_offset = b.data("animate-offset"), b.waypoint(function(direction ) { if( direction === 'down'){ if(!b.hasClass("animation-done")){ b.addClass("animation-done").removeClass("animation-out-done").velocity(d, {delay: delay_time,duration: duration_time,display:'auto'}); } }else if (direction === 'up' && o!='' && o!=undefined && !b.hasClass("animation-out-done")) { if(!b.hasClass("animation-out-done")){ b.addClass("animation-out-done").removeClass("animation-done").velocity(o,{ delay: out_delay_time,duration: out_duration_time,display:'auto' }); } } }, { offset: animate_offset } ); } }) }, e = function() { jQuery(".call-on-waypoint").each(function() { var c = jQuery(this); c.waypoint(function() { c.trigger("on-waypoin") }, { triggerOnce: !0, offset: "bottom-in-view" }) }) }; jQuery(document).ready(e),jQuery(window).load(e), jQuery(document.body).on('post-load', function() { e() }), jQuery(document).ready(d),jQuery(window).load(d), jQuery(document.body).on('post-load', function() { d() }); jQuery(document).ready(function(){ e(); d(); }); }); } ( jQuery ) ); /*--- on load animation ----*/ /*accordion/tabs connection*/ function accordion_tabs_connection(tab_index,connection){ if(connection!='' && jQuery("."+connection).length==1){ var current=jQuery('.'+connection+' > .post-inner-loop').slick('slickCurrentSlide'); if(current!=(tab_index-1)){ jQuery('.'+connection+' > .post-inner-loop').slick('slickGoTo', tab_index-1); } } } /*accordion/tabs connection*/ /*------------- magic scroll js ---*/ ( function ( $ ) { 'use strict'; $(document).ready(function(){ pt_plus_animateParalax(); }); } ( jQuery ) ); function pt_plus_animateParalax() { if(jQuery('body').find('.magic-scroll').length>0){ var controller = new ScrollMagic.Controller(); jQuery('.magic-scroll').each(function(index, elem){ var tween = 'tween-'+index; tween = new TimelineMax(); var lengthBox = jQuery(elem).find('.parallax-scroll').length; var scroll_offset=jQuery(elem).find('.parallax-scroll').data("scroll_offset"); var scroll_duration=jQuery(elem).find('.parallax-scroll').data("scroll_duration"); for(var i=0; i < lengthBox; i++){ var speed = 0.5; var scroll_type=jQuery(elem).find('.parallax-scroll').data("scroll_type"); var scroll_x_from=jQuery(elem).find('.parallax-scroll').data("scroll_x_from"); var scroll_x_to=jQuery(elem).find('.parallax-scroll').data("scroll_x_to"); var scroll_y_from=jQuery(elem).find('.parallax-scroll').data("scroll_y_from"); var scroll_y_to=jQuery(elem).find('.parallax-scroll').data("scroll_y_to"); var scroll_opacity_from=jQuery(elem).find('.parallax-scroll').data("scroll_opacity_from"); var scroll_opacity_to=jQuery(elem).find('.parallax-scroll').data("scroll_opacity_to"); var scroll_rotate_from=jQuery(elem).find('.parallax-scroll').data("scroll_rotate_from"); var scroll_rotate_to=jQuery(elem).find('.parallax-scroll').data("scroll_rotate_to"); var scroll_scale_from=jQuery(elem).find('.parallax-scroll').data("scroll_scale_from"); var scroll_scale_to=jQuery(elem).find('.parallax-scroll').data("scroll_scale_to"); var j1 = 0.2*(i+1); var k1 = 0.5*i; if(scroll_type=='position'){ if(i==0) { tween.fromTo(jQuery(elem).find('.parallax-scroll:eq('+i+')'), 1, {scale:scroll_scale_from,rotation:scroll_rotate_from,opacity:scroll_opacity_from,x:-(scroll_x_from*speed),y:-(scroll_y_from*speed), ease: Linear.easeNone},{scale:scroll_scale_to,rotation:scroll_rotate_to,opacity:scroll_opacity_to,x:-(scroll_x_to*speed),y:-(scroll_y_to*speed), ease: Linear.easeNone}) }else { tween.to(jQuery(elem).find('.parallax-scroll:eq('+i+')'), 1, {scale:scroll_scale_to,y:-(scroll_y_to*speed), ease: Linear.easeNone}, '-=1') } } } new ScrollMagic.Scene({triggerElement: elem, duration: scroll_duration, triggerHook:.5,offset: scroll_offset}) .setTween(tween) .addTo(controller); }) } } /*------------- magic scroll js ---*/ /* list carosel slick*/ function theplus_carousel_list(){ jQuery('.list-carousel-slick').each(function() { var $self=jQuery(this); var $uid=$self.data("id"); var slider_direction=$self.data("slider_direction"); var slide_speed=$self.data("slide_speed"); var default_active_slide=$self.data("default_active_slide"); var slider_desktop_column=$self.data("slider_desktop_column"); var steps_slide=$self.data("steps_slide"); var slide_fade_inout=$self.data("slide_fade_inout"); var slider_padding=$self.data("slider_padding"); var slider_draggable=$self.data("slider_draggable"); var slider_infinite=$self.data("slider_infinite"); var slider_pause_hover=$self.data("slider_pause_hover"); var slider_adaptive_height=$self.data("slider_adaptive_height"); var slider_autoplay=$self.data("slider_autoplay"); var autoplay_speed=$self.data("autoplay_speed"); var slider_rows=$self.data("slider_rows"); var slider_center_mode=$self.data("slider_center_mode"); var center_padding=$self.data("center_padding"); var scale_center_slide=$self.data("scale_center_slide"); var scale_normal_slide=$self.data("scale_normal_slide"); var opacity_normal_slide=$self.data("opacity_normal_slide"); var slider_dots=$self.data("slider_dots"); var slider_dots_style=$self.data("slider_dots_style"); var slider_arrows=$self.data("slider_arrows"); var slider_arrows_style=$self.data("slider_arrows_style"); var arrows_position=$self.data("arrows_position"); var slider_responsive_tablet=$self.data("slider_responsive_tablet"); var slider_tablet_column=$self.data("slider_tablet_column"); var tablet_steps_slide=$self.data("tablet_steps_slide"); var tablet_center_mode=$self.data("tablet_center_mode"); var tablet_center_padding=$self.data("tablet_center_padding"); var tablet_slider_draggable=$self.data("tablet_slider_draggable"); var tablet_slider_infinite=$self.data("tablet_slider_infinite"); var tablet_slider_autoplay=$self.data("tablet_slider_autoplay"); var tablet_autoplay_speed=$self.data("tablet_autoplay_speed"); var tablet_slider_dots=$self.data("tablet_slider_dots"); var tablet_slider_arrows=$self.data("tablet_slider_arrows"); var tablet_slider_rows=$self.data("tablet_slider_rows"); var tablet_center_mode=$self.data("tablet_center_mode"); var tablet_center_padding=$self.data("tablet_center_padding"); var slider_responsive_mobile=$self.data("slider_responsive_mobile"); var mobile_slider_draggable=$self.data("mobile_slider_draggable"); var mobile_slider_infinite=$self.data("mobile_slider_infinite"); var mobile_slider_autoplay=$self.data("mobile_slider_autoplay"); var mobile_autoplay_speed=$self.data("mobile_autoplay_speed"); var slider_mobile_column=$self.data("slider_mobile_column"); var mobile_steps_slide=$self.data("mobile_steps_slide"); var mobile_center_mode=$self.data("mobile_center_mode"); var mobile_center_padding=$self.data("mobile_center_padding"); var mobile_slider_dots=$self.data("mobile_slider_dots"); var mobile_slider_arrows=$self.data("mobile_slider_arrows"); var mobile_slider_rows=$self.data("mobile_slider_rows"); var mobile_center_mode=$self.data("mobile_center_mode"); var mobile_center_padding=$self.data("mobile_center_padding"); var testimonial_style=$self.data("testimonial-style"); var slide_mouse_scroll=$self.data("slide_mouse_scroll"); if(steps_slide=='1'){ steps_slide=='1'; }else{ steps_slide=slider_desktop_column; } if(tablet_steps_slide=='1'){ tablet_steps_slide=='1'; }else{ tablet_steps_slide=slider_tablet_column; } if(slider_responsive_tablet!='yes'){ tablet_slider_draggable=slider_draggable; tablet_slider_infinite=slider_infinite; tablet_slider_autoplay=slider_autoplay; tablet_autoplay_speed=autoplay_speed; tablet_slider_dots=slider_dots; tablet_slider_arrows=slider_arrows; tablet_slider_rows=slider_rows; tablet_center_mode=slider_center_mode; tablet_center_padding=center_padding; } if(slider_responsive_mobile!='yes'){ mobile_slider_draggable=slider_draggable; mobile_slider_infinite=slider_infinite; mobile_slider_autoplay=slider_autoplay; mobile_autoplay_speed=autoplay_speed; mobile_slider_dots=slider_dots; mobile_slider_arrows=slider_arrows; mobile_slider_rows=slider_rows; mobile_center_mode=slider_center_mode; mobile_center_padding=center_padding; } if(mobile_steps_slide=='1'){ mobile_steps_slide=='1'; }else{ mobile_steps_slide=slider_mobile_column; } if(slider_arrows_style=='style-1'){ var prev_arrow=''; var next_arrow=''; } if(slider_arrows_style=='style-2'){ var prev_arrow=''; var next_arrow=''; } if(slider_arrows_style=='style-3' || slider_arrows_style=='style-4' ){ var prev_arrow=''; var next_arrow=''; } if(slider_arrows_style=='style-5'){ var prev_arrow=''; var next_arrow=''; } if(slider_arrows_style=='style-6'){ var prev_arrow=''; var next_arrow=''; } if(default_active_slide==undefined){ default_active_slide=0; } if(!jQuery(this).hasClass("done-carousel")){ jQuery('.'+$uid+' > .post-inner-loop').slick({ dots: slider_dots, vertical: slider_direction, fade:slide_fade_inout, arrows: slider_arrows, infinite: slider_infinite, speed: slide_speed, initialSlide: default_active_slide, adaptiveHeight: slider_adaptive_height, autoplay: slider_autoplay, autoplaySpeed: autoplay_speed, pauseOnHover: slider_pause_hover, centerMode: slider_center_mode, centerPadding: center_padding+'px', prevArrow: prev_arrow, nextArrow: next_arrow, slidesToShow: slider_desktop_column, slidesToScroll: steps_slide, draggable:slider_draggable, dotsClass:slider_dots_style, rows : slider_rows, responsive: [ { breakpoint: 800, settings: { dots: tablet_slider_dots, arrows: tablet_slider_arrows, infinite: tablet_slider_infinite, autoplay: tablet_slider_autoplay, autoplaySpeed: tablet_autoplay_speed, draggable:tablet_slider_draggable, rows : tablet_slider_rows, slidesToShow: slider_tablet_column, slidesToScroll: tablet_steps_slide, centerMode: tablet_center_mode, centerPadding: tablet_center_padding+'px', } }, { breakpoint: 600, settings: { dots: mobile_slider_dots, arrows: mobile_slider_arrows, infinite: mobile_slider_infinite, autoplay: mobile_slider_autoplay, autoplaySpeed: mobile_autoplay_speed, draggable:mobile_slider_draggable, rows : mobile_slider_rows, slidesToShow: slider_mobile_column, slidesToScroll: mobile_steps_slide, centerMode: mobile_center_mode, centerPadding: mobile_center_padding+'px', } } ] }); setTimeout(function(){ jQuery(".slick-dots.style-2 li").each(function(){ if(jQuery(this).find("svg").length==0){ jQuery(this).append(''); } }); }, 1000); jQuery(this).addClass("done-carousel"); if(slide_mouse_scroll==true && slide_mouse_scroll!=undefined){ jQuery('.'+$uid+' > .post-inner-loop').mousewheel(function(e) { e.preventDefault(); if (e.deltaY < 0) { jQuery('.'+$uid+' > .post-inner-loop').slick("slickNext"); } else { jQuery('.'+$uid+' > .post-inner-loop').slick("slickPrev"); } }); } } }); } /* list carosel slick*/ /*----cascading image loop slide -----*/ (function($) { 'use strict'; $(document).ready(function() { cascading_slide_show_image(); cascading_overflow(); }); $(window).on("load resize",function() { cascading_overflow(); }); })(jQuery); function cascading_slide_show_image(){ (function($) { 'use strict'; $(document).ready(function() { $(".slide_show_image").length && $(".slide_show_image").each(function() { var t = $(this),uid1=t.data("uid"); var uid=$('.'+uid1); $('.'+uid1+'.slide_show_image .cascading-image:last').addClass('active'); var i = t.find(".cascading-image"),opt=t.data("play"); $('.'+uid1+" .cascading-image").each(function() { var o = $(this); if(opt=='onclick'){ o.click(function() { if (!i.last().is(o)) return o.addClass("out").animate({ opacity: 0.7, }, 200, function() { o.detach(), o.insertAfter(i.last()).animate({ opacity: 1, }, 500, function() { o.removeClass("out") }), i = t.find(".cascading-image"), i.removeClass('active'), o.addClass("active"); }), !1 }); }else{ var time=$('.'+uid1).data('interval_time'); setInterval(function () { var current = $('.'+uid1+'.slide_show_image .cascading-image.active').removeClass('active'), o = current.next().length ? current.next() : current.siblings().filter(':first'); o.addClass('active'); if (!i.last().is(o)) return o.addClass("out").animate({ opacity: 0.7, }, 200, function() { o.detach(), o.insertAfter(i.last()).animate({ opacity: 1, }, 500, function() { o.removeClass("out") }), i = t.find(".cascading-image"), i.removeClass('active'), o.addClass("active"); }), !1 }, time); o.click(function() { if (!i.last().is(o)) return o.addClass("out").animate({ opacity: 0.7, }, 200, function() { o.detach(), o.insertAfter(i.last()).animate({ opacity: 1, }, 500, function() { o.removeClass("out") }), i = t.find(".cascading-image"), i.removeClass('active'), o.addClass("active"); }), !1 }); } }) }); }); })(jQuery); } function cascading_overflow(){ jQuery(".cascading-block").length && jQuery(".cascading-block").each(function() { var width = window.innerWidth; var cadcading_overflow=jQuery(this); var cadcading_overflow_desktop=jQuery(this).data('overflow-desktop'); var cadcading_overflow_tablet=jQuery(this).data('overflow-tablet'); var cadcading_overflow_mobile=jQuery(this).data('overflow-mobile'); if(cadcading_overflow_desktop=='yes' && width > 991){ cadcading_overflow.closest("section.elementor-element").css("overflow","hidden"); }else if(cadcading_overflow_tablet=='yes' && (width <= 991 && width > 600)){ cadcading_overflow.closest("section.elementor-element").css("overflow","hidden"); }else if(cadcading_overflow_mobile=='yes' && width <= 600){ cadcading_overflow.closest("section.elementor-element").css("overflow","hidden"); }else{ cadcading_overflow.closest("section.elementor-element").css("overflow","visible"); } }); } /*----cascading image loop slide -----*/ /*----mordern parallax image----*/ (function($) { 'use strict'; $(window).resize(function(){ $(".mordern-image-effect").each(function() { var win_width = $(window).width(); var tab_w=$(this).attr('data-tablet-width'); var mob_w=$(this).attr('data-mobile-width'); if(win_width<768){ $(this).css('width',tab_w); } if(win_width<480){ $(this).css('width',mob_w); } if(win_width>=768){ $(this).css('width','auto'); } }); }); })(jQuery); /*-----mordern parallax image---*/ /*--- animated background color ---*/ ;(function($, window, document, undefined) { $.fn.animatedBG = function(options){ var defaults = { colorSet: ['#ef008c', '#00be59', '#654b9e', '#ff5432', '#00d8e6'], speed: 3000 }, settings = $.extend({}, defaults, options); return this.each(function(){ var $this = $(this); $this.each(function(){ var $el = $(this), colors = settings.colorSet; function shiftColor() { var color = colors.shift(); colors.push(color); return color; } // initial color var initColor = shiftColor(); $el.css('backgroundColor', initColor); setInterval(function(){ var color = shiftColor(); $el.animate({backgroundColor: color}, 3000); }, settings.speed); }); }); }; $(function(){ $(document).ready(function() { $(".row-animated-bg").each(function() { var data_id= $(this).data('id'); var data_time=$(this).data('bg-time'); var colors =$(this).data('bg'); $('.'+data_id).animatedBG({ colorSet: colors, speed: data_time }); }); }); }); }(jQuery, window, document)); /*--- animated background color ---*/ /*---bg imageclip---*/ (function($) { 'use strict'; $(document).ready(function() { $(".pt-plus-row-imageclip").each(function() { var data_id= $(this).data('id'); var border_width= $(this).data('border-width'); var border_style= $(this).data('border-style'); var border_color= $(this).data('border-color'); var box_shadow=$(this).data('box-shadow'); $('head').append(''); }); }); })(jQuery); /*---bg imageclip---*/ /*text Heading Animation*/ (function($) { 'use strict'; $(document).ready(function() { plus_heading_animation(); }); })(jQuery); function plus_heading_animation(){ /*------ heading animation--------*/ jQuery(document).ready(function($){ "use strict"; //set animation timing var animationDelay = 2500, //loading bar effect barAnimationDelay = 3800, barWaiting = barAnimationDelay - 3000, //letters effect lettersDelay = 50, //type effect typeLettersDelay = 150, selectionDuration = 500, typeAnimationDelay = selectionDuration + 800, //clip effect revealDuration = 600, revealAnimationDelay = 1500; pt_plus_initHeadline(); function pt_plus_initHeadline() { //insert element for each letter of a changing word singleLetters($('.pt-plus-cd-headline.letters').find('b')); //initialise headline animation animateHeadline($('.pt-plus-cd-headline')); } function singleLetters($words) { $words.each(function(){ var i; var word = $(this), letters = word.text().split(''), selected = word.hasClass('is-visible'); for (i in letters) { if(word.parents('.rotate-2').length > 0) letters[i] = '' + letters[i] + ''; letters[i] = (selected) ? '' + letters[i] + '': '' + letters[i] + ''; } var newLetters = letters.join(''); word.html(newLetters).css('opacity', 1); }); } function animateHeadline($headlines) { var duration = animationDelay; $headlines.each(function(){ var headline = $(this); if(headline.hasClass('loading-bar')) { duration = barAnimationDelay; setTimeout(function(){ headline.find('.cd-words-wrapper').addClass('is-loading') }, barWaiting); } else if (headline.hasClass('clip')){ var spanWrapper = headline.find('.cd-words-wrapper'), newWidth = spanWrapper.width() + 10 spanWrapper.css('width', newWidth); } else if (!headline.hasClass('type') ) { //assign to .cd-words-wrapper the width of its longest word var words = headline.find('.cd-words-wrapper b'), width = 0; words.each(function(){ var wordWidth = $(this).width(); if (wordWidth > width) width = wordWidth; }); headline.find('.cd-words-wrapper').css('width', width+12); }; //trigger animation setTimeout(function(){ hideWord( headline.find('.is-visible').eq(0) ) }, duration); }); } function hideWord($word) { var nextWord = takeNext($word); if($word.parents('.pt-plus-cd-headline').hasClass('type')) { var parentSpan = $word.parent('.cd-words-wrapper'); parentSpan.addClass('selected').removeClass('waiting'); setTimeout(function(){ parentSpan.removeClass('selected'); $word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out'); }, selectionDuration); setTimeout(function(){ showWord(nextWord, typeLettersDelay) }, typeAnimationDelay); } else if($word.parents('.pt-plus-cd-headline').hasClass('letters')) { var bool = ($word.children('i').length >= nextWord.children('i').length) ? true : false; hideLetter($word.find('i').eq(0), $word, bool, lettersDelay); showLetter(nextWord.find('i').eq(0), nextWord, bool, lettersDelay); } else if($word.parents('.pt-plus-cd-headline').hasClass('clip')) { $word.parents('.cd-words-wrapper').animate({ width : '2px' }, revealDuration, function(){ switchWord($word, nextWord); showWord(nextWord); }); } else if ($word.parents('.pt-plus-cd-headline').hasClass('loading-bar')){ $word.parents('.cd-words-wrapper').removeClass('is-loading'); switchWord($word, nextWord); setTimeout(function(){ hideWord(nextWord) }, barAnimationDelay); setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('is-loading') }, barWaiting); } else { switchWord($word, nextWord); setTimeout(function(){ hideWord(nextWord) }, animationDelay); } } function showWord($word, $duration) { if($word.parents('.pt-plus-cd-headline').hasClass('type')) { showLetter($word.find('i').eq(0), $word, false, $duration); $word.addClass('is-visible').removeClass('is-hidden'); } else if($word.parents('.pt-plus-cd-headline').hasClass('clip')) { $word.parents('.cd-words-wrapper').animate({ 'width' : $word.width() + 10 }, revealDuration, function(){ setTimeout(function(){ hideWord($word) }, revealAnimationDelay); }); } } function hideLetter($letter, $word, $bool, $duration) { $letter.removeClass('in').addClass('out'); if(!$letter.is(':last-child')) { setTimeout(function(){ hideLetter($letter.next(), $word, $bool, $duration); }, $duration); } else if($bool) { setTimeout(function(){ hideWord(takeNext($word)) }, animationDelay); } if($letter.is(':last-child') && $('html').hasClass('no-csstransitions')) { var nextWord = takeNext($word); switchWord($word, nextWord); } } function showLetter($letter, $word, $bool, $duration) { $letter.addClass('in').removeClass('out'); if(!$letter.is(':last-child')) { setTimeout(function(){ showLetter($letter.next(), $word, $bool, $duration); }, $duration); } else { if($word.parents('.pt-plus-cd-headline').hasClass('type')) { setTimeout(function(){ $word.parents('.cd-words-wrapper').addClass('waiting'); }, 200);} if(!$bool) { setTimeout(function(){ hideWord($word) }, animationDelay) } } } function takeNext($word) { return (!$word.is(':last-child')) ? $word.next() : $word.parent().children().eq(0); } function takePrev($word) { return (!$word.is(':first-child')) ? $word.prev() : $word.parent().children().last(); } function switchWord($oldWord, $newWord) { $oldWord.removeClass('is-visible').addClass('is-hidden'); $newWord.removeClass('is-hidden').addClass('is-visible'); } }); /*----header animation element--------*/ } /*text Heading Animation*/ /*video bg responsive*/ (function($) { 'use strict'; var d_i=0,t_i=0,m_i=0; $(window).on('load resize',function() { var inner_width=window.innerWidth; if($('body').find(".plus-video-poster").length>0){ $('.plus-video-poster').each(function(){ var desktop_poster=$(this).data("desktop-poster"),tablet_poster=$(this).data("tablet-poster"),mobile_poster=$(this).data("mobile-poster"); if(tablet_poster==undefined || tablet_poster==''){ tablet_poster=desktop_poster; } if(mobile_poster==undefined || mobile_poster==''){ mobile_poster=tablet_poster; } if(inner_width<=991 && inner_width>=601 && tablet_poster!=undefined && t_i==0){ if(!$(this).hasClass("self-hosted-video-bg")){ $(this).css('background-image', 'url(' + tablet_poster + ')'); }else{ $(this).css('background-image', 'url(' + tablet_poster + ')'); $('video',this).attr('poster',tablet_poster); } d_i=0;t_i++;m_i=0; } if(inner_width<=600 && mobile_poster!=undefined && m_i==0){ if(!$(this).hasClass("self-hosted-video-bg")){ $(this).css('background-image', 'url(' + mobile_poster + ')'); }else{ $(this).css('background-image', 'url(' + mobile_poster + ')'); $('video',this).attr('poster',mobile_poster); } d_i=0;t_i=0;m_i++; } if(inner_width>=992 && desktop_poster!=undefined && d_i==0){ if(!$(this).hasClass("self-hosted-video-bg")){ $(this).css('background-image', 'url(' + desktop_poster + ')'); }else{ $(this).css('background-image', 'url(' + desktop_poster + ')'); $('video',this).attr('poster',desktop_poster); } d_i++;t_i=0;m_i=0; } }); } }); })(jQuery); /*video bg responsive*/ /*----------animated image hover tilt option------------------*/ ( function ( $ ) { 'use strict'; $(window).load(function () { $(".hover-tilt").hover3d({ selector: ".blog-list-style-content,> .cascading-inner-loop,> .call-to-action-img,> .blog-hover-inner-tilt,> .logo-image-wrap", shine: !1, perspective: 2e3, invert: !0, sensitivity: 35, }); }); } ( jQuery ) ); /*----------animated image hover tilt option------------------*/ /*---------creative simple image super parallax----------------------*/ function pt_plus_bg_image_scroll_parallax(){ if(jQuery('body').find('.creative-simple-img-parallax').length>0){ var controller = new ScrollMagic.Controller(); jQuery('.creative-simple-img-parallax').each(function(index, elem){ var data_parallax =jQuery(this).data("scroll-parallax"); data_parallax = -(data_parallax); var parallax_image=jQuery('.simple-parallax-img',this); var tween = 'tween-'+index; tween = new TimelineMax(); new ScrollMagic.Scene({ triggerElement: elem, duration: '150%' }).setTween(tween.from(parallax_image, 1, {x:data_parallax,ease: Linear.easeNone})).addTo(controller);; }); } } ( function ( $ ) { 'use strict'; $(document).ready(function(){ pt_plus_bg_image_scroll_parallax(); }); } ( jQuery ) ); /*---------creative simple image super parallax----------------------*/ /*--------- animated svg js -----------*/ ( function ( $ ) { 'use strict'; $.fn.pt_plus_animated_svg = function() { return this.each(function() { var $self = $(this); var data_id=$self.data("id"); var data_duration=$self.data("duration"); var data_type=$self.data("type"); var data_stroke=$self.data("stroke"); var data_fill_color=$self.data("fill_color"); new Vivus(data_id, {type: data_type, duration: data_duration,forceRender:false,start: 'inViewport',onReady: function (myVivus) { var c=myVivus.el.childNodes; var show_id=document.getElementById(data_id); show_id.style.opacity = "1"; if(data_stroke!=''){ for (var i = 0; i < c.length; i++) { $(c[i]).attr("fill", data_fill_color); $(c[i]).attr("stroke",data_stroke); var child=c[i]; var pchildern=child.children; if(pchildern != undefined){ for(var j=0; j < pchildern.length; j++){ $(pchildern[j]).attr("fill", data_fill_color); $(pchildern[j]).attr("stroke",data_stroke); } } } } } }); }); }; $(window).load(function() { setTimeout(function(){ $('.pt_plus_row_bg_animated_svg').pt_plus_animated_svg(); $('.pt_plus_animated_svg,.ts-hover-draw-svg').pt_plus_animated_svg(); $('body').find('.pt_plus_row_bg_animated_svg').attr('style', 'stroke:black'); }, 100); }); } ( jQuery ) ); /*--------- animated svg js -----------*/ /*- contact form-----------*/ ( function ( $ ) { 'use strict'; $(document).ready(function() { plus_cf7_form(); }); } ( jQuery ) ); function plus_cf7_form(){ jQuery('.theplus-contact-form').each(function(){ var radio_checkbox='plus-checkbox'; var i=0; if(!jQuery(this).hasClass("tp-form-loaded")){ jQuery(".wpcf7-form-control.wpcf7-radio .wpcf7-list-item",this).each(function(){ var text_val=jQuery(this).find('.wpcf7-list-item-label').text(); jQuery(this).find('.wpcf7-list-item-label').remove(); var label_Tags=jQuery('input[type="radio"]',this); if ( label_Tags.parent().is( 'label' )) { label_Tags.unwrap(); } var radio_name=jQuery(this).find('input[type="radio"]').attr('name'); jQuery(this).append(''); jQuery(this).find('input[type="radio"]').attr('id',radio_name+i); jQuery(this).find('input[type="radio"]').addClass("input-radio-check"); jQuery(this).parents(".wpcf7-form-control-wrap").addClass(radio_checkbox); i++; }); var i=0; jQuery(".wpcf7-form-control.wpcf7-checkbox .wpcf7-list-item",this).each(function(){ var text_val=jQuery(this).find('.wpcf7-list-item-label').text(); jQuery(this).find('.wpcf7-list-item-label').remove(); var label_Tags=jQuery('input[type="checkbox"]',this); if ( label_Tags.parent().is( 'label' )) { label_Tags.unwrap(); } jQuery(this).append(''); jQuery(this).find('input[type="checkbox"]').attr('id',radio_checkbox+i); jQuery(this).find('input[type="checkbox"]').addClass("input-checkbox-check"); jQuery(this).parents(".wpcf7-form-control-wrap").addClass(radio_checkbox); i++; }); jQuery(".wpcf7-form-control-wrap input[type='file']",this).each(function(){ var file_name=jQuery(this).attr('name'); jQuery(this).attr('id',file_name+i); jQuery(this).attr('data-multiple-caption',"{count} files selected"); jQuery(this).parents(".wpcf7-form-control-wrap").append(''); jQuery(this).parents(".wpcf7-form-control-wrap").addClass("cf7-style-file"); i++; }); jQuery(this).addClass("tp-form-loaded"); } }); } /*- contact form-----------*/ /*--Content hover Effects --*/ ( function ( $ ) { 'use strict'; $(window).load(function () { $('.content_hover_effect').each(function () { var $this=$(this); var hover_uniqid = $this.data('hover_uniqid'); var hover_shadow = $this.data('hover_shadow'); var content_hover_effects= $this.data('content_hover_effects'); if(content_hover_effects=='float_shadow'){ $('head').append(''); } if(content_hover_effects=='shadow_radial'){ $('head').append(''); } if(content_hover_effects=='grow_shadow'){ $('head').append(''); } }); }); } ( jQuery ) ); /*--Content hover Effects --*/ /*--Content hover Effects --*/ ( function ( $ ) { 'use strict'; $(window).load(function () { $('.animted-content-inner').each(function () { var $this=$(this); var bg_uniqid = $this.data('bg_uniqid'); var bg_animated_color = $this.data('bg_animated_color'); $('head').append(''); }); }); } ( jQuery ) ); /*--Content hover Effects --*/ /*-the plus video--*/ ! function(e) { "use strict"; function t(t) { var a = t.find("video"), n = t.find(".ts-video-lazyload"); if (t.is("[data-grow]") && t.css("max-width", "none"), t.find(".ts-video-title, .ts-video-description, .ts-video-play-btn, .ts-video-thumbnail").addClass("ts-video-hidden"), n.length) { var i = n.data(); e("").attr(i).insertAfter(n) } a.length && a.get(0).play() } function a() { e(".ts-video-wrapper[data-inview-lazyload]").one("inview", function(a, n) { n && t(e(this)) }) } e(document).on("click", '[data-mode="lazyload"] .ts-video-play-btn', function(a) { a.preventDefault(), t(e(this).closest(".ts-video-wrapper")) }), a(), e(document).ajaxComplete(function() { a() }), e(document).on("lity:open", function() { }), e(document).on("lity:ready", function(t, a) { var n = a.element(), i = n.find("video"), r = n.find(".ts-video-lazyload"); if (e(".lity-wrap").attr("id", "ts-video"), r.length) e("").attr(r.data()).insertAfter(r); i.length && i.get(0).play() }), e(document).on("lity:close", function(t, a) { a.element().find("video").length && a.element().find("video").get(0).pause(), e(".ts-video-lity-container .pt-plus-video-frame").remove(), e("[data-hidden-fixed]").removeClass("ts-video-hidden") }), e(document).ready(function() { e(".ts-video-lightbox-link").off() }) }(jQuery); /*-the plus video--*/ function pt_plus_hexToRgbA(hex,data_opacity){ var c; if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)){ c= hex.substring(1).split(''); if(c.length== 3){ c= [c[0], c[0], c[1], c[1], c[2], c[2]]; } c= '0x'+c.join(''); return 'rgba('+[(c>>16)&255, (c>>8)&255, c&255].join(',')+','+data_opacity+')'; } } /*-Grid Masonry Metro list js-----*/ (function($) { 'use strict'; $(document).ready(function() { $('.list-isotope-metro').each(function() { var c = $(this); var uid=c.data("id"); var inner_c=$('.'+uid).find(".post-inner-loop"); $('.'+uid+' .post-filter-data').find(".filter-category-list").click(function(event) { event.preventDefault(); var d = $(this).attr("data-filter"); $(this).parent().parent().find(".active").removeClass("active"), $(this).addClass("active"), inner_c.isotope({ filter: d, visibleStyle: { opacity: 1 } }), $("body").trigger("isotope-sorted"); }); }); }); })(jQuery); jQuery(window).on("load resize", function() { "use strict"; if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); jQuery('.list-isotope-metro .post-inner-loop').isotope('layout'); } }); jQuery(document).ready(function() { if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); jQuery('.list-isotope-metro .post-inner-loop').isotope('layout').isotope("reloadItems"); } }); function theplus_backend_packery_portfolio(uid,metro_column,metro_style) { var setPad=0; var myWindow=jQuery(window); var container=jQuery("#"+uid); if ( metro_column== '4') { var norm_size = Math.floor((container.width() - setPad*2)/4), double_size = norm_size*2; container.find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item9') ) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = norm_size; } } if(metro_style=='style-2'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10') ) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item8')) { set_w = double_size, set_h = norm_size; } } if(metro_style=='style-3'){ if (jQuery(this).hasClass('metro-item5')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item1')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item6')) { set_w = double_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '5') { var norm_size = Math.floor((container.width() - setPad*2)/5), double_size = norm_size*2; container.find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item15')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item6') || jQuery(this).hasClass('metro-item14')) { set_w = norm_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '6') { var norm_size = Math.floor((container.width() - setPad*2)/6), double_size = norm_size*2; container.find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item7') || jQuery(this).hasClass('metro-item14') || jQuery(this).hasClass('metro-item15') || jQuery(this).hasClass('metro-item16')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item6') || jQuery(this).hasClass('metro-item8')) { set_w = norm_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '3') { var norm_size = Math.floor((container.width() - setPad*2)/3), double_size = norm_size*2; container.find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item9')) { set_w = double_size, set_h = norm_size; } }else if(metro_style=='style-2'){ if (jQuery(this).hasClass('metro-item2')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item8')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = double_size; } }else if(metro_style=='style-3'){ if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item15')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item9')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = double_size; } }else if(metro_style=='style-4'){ if (jQuery(this).hasClass('metro-item1')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = norm_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (myWindow.innerWidth() > 767) { jQuery("#"+uid).isotope({ itemSelector: '.grid-item', layoutMode: 'masonry', masonry: { columnWidth: norm_size } }); }else{ jQuery("#"+uid).isotope({ layoutMode: 'masonry', masonry: { columnWidth: '.grid-item' } }); } jQuery("#"+uid).isotope('layout').isotope('layout').isotope( 'reloadItems' ); jQuery("#"+uid).imagesLoaded( function(){ jQuery("#"+uid).isotope('layout').isotope( 'reloadItems' ); }); } function theplus_setup_packery_portfolio(packery_id) { jQuery('.list-isotope-metro').each(function(){ var uid=jQuery(this).data("id"); var metro_column=jQuery(this).attr('data-columns'); var tablet_metro_column=jQuery(this).attr('data-tablet-metro-columns'); var setPad = 0; var myWindow=jQuery(window); var responsive_width=window.innerWidth; if(responsive_width <= 1024 && tablet_metro_column!=undefined){ metro_column=tablet_metro_column; } if ( metro_column== '4') { var metro_style=jQuery(this).attr('data-metro-style'); var norm_size = Math.floor((jQuery(this).width() - setPad*2)/4), double_size = norm_size*2; jQuery(this).find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item9') ) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = norm_size; } } if(metro_style=='style-2'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10') ) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item8')) { set_w = double_size, set_h = norm_size; } } if(metro_style=='style-3'){ if (jQuery(this).hasClass('metro-item5')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item1')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item6')) { set_w = double_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '5') { var metro_style=jQuery(this).attr('data-metro-style'); var norm_size = Math.floor((jQuery(this).width() - setPad*2)/5), double_size = norm_size*2; jQuery(this).find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item15')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item3') || jQuery(this).hasClass('metro-item6') || jQuery(this).hasClass('metro-item14')) { set_w = norm_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '6') { var metro_style=jQuery(this).attr('data-metro-style'); var norm_size = Math.floor((jQuery(this).width() - setPad*2)/6), double_size = norm_size*2; jQuery(this).find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item5') || jQuery(this).hasClass('metro-item9') || jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item2') || jQuery(this).hasClass('metro-item7') || jQuery(this).hasClass('metro-item14') || jQuery(this).hasClass('metro-item15') || jQuery(this).hasClass('metro-item16')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item6') || jQuery(this).hasClass('metro-item8')) { set_w = norm_size, set_h = double_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if (metro_column == '3') { var metro_style=jQuery(this).attr('data-metro-style'); if(responsive_width <= 1024 && tablet_metro_column!=undefined){ metro_style=jQuery(this).attr('data-tablet-metro-style'); } var norm_size = Math.floor((jQuery(this).width() - setPad*2)/3), double_size = norm_size*2; jQuery(this).find('.grid-item').each(function(){ var set_w = norm_size, set_h = norm_size; if(metro_style=='style-1'){ if (jQuery(this).hasClass('metro-item1') || jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item9')) { set_w = double_size, set_h = norm_size; } }else if(metro_style=='style-2'){ if (jQuery(this).hasClass('metro-item2')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item8')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = double_size; } }else if(metro_style=='style-3'){ if (jQuery(this).hasClass('metro-item4') || jQuery(this).hasClass('metro-item15')) { set_w = double_size, set_h = norm_size; } if (jQuery(this).hasClass('metro-item9')) { set_w = norm_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item10')) { set_w = double_size, set_h = double_size; } }else if(metro_style=='style-4'){ if (jQuery(this).hasClass('metro-item1')) { set_w = double_size, set_h = double_size; } if (jQuery(this).hasClass('metro-item7')) { set_w = double_size, set_h = norm_size; } } if (myWindow.width() < 760) { set_w = myWindow.width() - setPad*2; set_h = myWindow.width() - setPad*2; } jQuery(this).css({ 'width' : set_w+'px', 'height' : set_h+'px' }); }); } if(jQuery(this).hasClass('list-isotope-metro')){ if (myWindow.innerWidth() > 767) { jQuery("#"+uid).isotope({ itemSelector: '.grid-item', layoutMode: 'masonry', masonry: { columnWidth: norm_size } }); }else{ jQuery("#"+uid).isotope({ layoutMode: 'masonry', masonry: { columnWidth: '.grid-item' } }); } }else{ jQuery("#"+uid).isotope({ layoutMode: 'masonry', masonry: { columnWidth: norm_size } }); } jQuery("#"+uid).isotope('layout'); jQuery("#"+uid).imagesLoaded( function(){ jQuery("#"+uid).isotope('layout').isotope( 'reloadItems' ); }); }); } /*-Grid Masonry Metro list js-----*/ /*----load more post ajax----------------*/ ;( function($) { 'use strict'; $(document).ready(function(){ if($(".post-load-more").length > 0){ $(document).on("click",".post-load-more",function(e){ e.preventDefault(); var current_click= $(this); var post_load=$(this).data('load'); var post_type=$(this).data('post_type'); var texonomy_category=$(this).data('texonomy_category'); var page = $(this).attr('data-page'); var total_page=$(this).data('total_page'); var load_class= $(this).data('load-class'); var layout=$(this).data('layout'); var desktop_column=$(this).data('desktop-column'); var tablet_column=$(this).data('tablet-column'); var mobile_column=$(this).data('mobile-column'); var metro_column=$(this).data('metro_column'); var metro_style=$(this).data('metro_style'); var responsive_tablet_metro=$(this).data('responsive_tablet_metro'); var tablet_metro_column=$(this).data('tablet_metro_column'); var tablet_metro_style=$(this).data('tablet_metro_style'); var style=$(this).data('style'); var style_layout=$(this).data('style_layout'); var offset_posts=$(this).data('offset-posts'); var category=$(this).data('category'); var post_tags=$(this).data('post_tags'); var order_by=$(this).data('order_by'); var post_order=$(this).data('post_order'); var filter_category=$(this).data('filter_category'); var display_post=$(this).data('display_post'); var post_load_more=$(this).data('post_load_more'); var animated_columns=$(this).data('animated_columns'); var display_post_title=$(this).data('display_post_title'); var display_post_meta=$(this).data('display_post_meta'); var post_meta_tag_style=$(this).data('post_meta_tag_style'); var display_excerpt=$(this).data('display_excerpt'); var post_excerpt_count=$(this).data('post_excerpt_count'); var display_post_category=$(this).data('display_post_category'); var post_category_style=$(this).data('post_category_style'); var featured_image_type=$(this).data('featured_image_type'); var display_button=$(this).data('display_button'); var button_style=$(this).data('button_style'); var before_after=$(this).data('before_after'); var button_text=$(this).data('button_text'); var button_icon_style=$(this).data('button_icon_style'); var button_icon=$(this).data('button_icon'); var button_icons_mind=$(this).data('button_icons_mind'); var current_text= $(this).text(); if ( current_click.data('requestRunning') ) { return; } if(offset_posts==undefined || offset_posts==""){ offset_posts=0; } current_click.data('requestRunning', true); if(total_page >= page){ var offset=(parseInt(page-1)*parseInt(post_load_more))+parseInt(display_post)+parseInt(offset_posts); $.ajax({ type:'POST', data:'style='+style+'&style_layout='+style_layout+'&action=theplus_more_post&post_load='+post_load+'&post_type='+post_type+'&texonomy_category='+texonomy_category+'&layout='+layout+'&desktop_column='+desktop_column+'&tablet_column='+tablet_column+'&mobile_column='+mobile_column+'&offset='+offset+'&category='+category+'&post_tags='+post_tags+'&display_post='+display_post+'&order_by='+order_by+'&filter_category='+filter_category+'&post_order='+post_order+'&animated_columns='+animated_columns+'&post_load_more='+post_load_more+'&metro_column='+metro_column+'&metro_style='+metro_style+'&responsive_tablet_metro='+responsive_tablet_metro+'&tablet_metro_column='+tablet_metro_column+'&tablet_metro_style='+tablet_metro_style+'&display_post_meta='+display_post_meta+'&post_meta_tag_style='+post_meta_tag_style+'&display_excerpt='+display_excerpt+'&post_excerpt_count='+post_excerpt_count+'&display_post_category='+display_post_category+'&post_category_style='+post_category_style+'&featured_image_type='+featured_image_type+'&display_button='+display_button+'&button_style='+button_style+'&before_after='+before_after+'&button_text='+button_text+'&button_icon_style='+button_icon_style+'&button_icon='+button_icon+'&button_icons_mind='+button_icons_mind+'&paged='+page+'&display_post_title='+display_post_title, url:theplus_ajax_url, beforeSend: function() { $(current_click).text('Loading..'); },success: function(data) { if(data==''){ $(current_click).addClass("hide"); }else{ $("."+load_class+' .post-inner-loop').append( data ); if(layout=='grid' || layout=='masonry'){ if(!$("."+load_class).hasClass("list-grid-client")){ var $newItems = $(''); $("."+load_class+' .post-inner-loop').isotope( 'insert', $newItems ); $("."+load_class+' .post-inner-loop').isotope( 'layout' ).isotope( 'reloadItems' ); } } if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); } if($("."+load_class).parents(".animate-general").length){ var c,d; if($("."+load_class).find(".animated-columns").length){ var p = $("."+load_class).parents(".animate-general"); var delay_time=p.data("animate-delay"); var animation_stagger=p.data("animate-stagger"); var d = p.data("animate-type"); var animate_offset = p.data("animate-offset"); p.css("opacity","1"); c = p.find('.animated-columns'); c.each(function() { var bc=$(this); bc.waypoint(function(direction) { if( direction === 'down'){ if(!bc.hasClass("animation-done")){ bc.addClass("animation-done").velocity(d,{ delay: delay_time,display:'auto'}); } } }, {triggerOnce: true, offset: animate_offset } ); }); }else{ var b = $("."+load_class).parents(".animate-general"); var delay_time=b.data("animate-delay"); d = b.data("animate-type"), animate_offset = p.data("animate-offset"), b.waypoint(function(direction ) { if( direction === 'down'){ if(!b.hasClass("animation-done")){ b.addClass("animation-done").velocity(d, {delay: delay_time,display:'auto'}); } } }, {triggerOnce: true, offset: animate_offset } ); } } $(".hover-tilt").hover3d({ selector: ".blog-list-style-content,.portfolio-item-content", shine: !1, perspective: 1000, invert: !0, sensitivity: 35, }); $('.pt_theplus-list-portfolio-post .grid-item').each(function() { var data_opacity= $(this).data('opacity'); var data_color=$(this).data('color'); var rgba_color=pt_plus_hexToRgbA(data_color,data_opacity); $(this).find(".portfolio-item-hover").css('background',rgba_color); }); } page++; if(page==total_page){ $(current_click).addClass("hide"); $(current_click).attr('data-page', page); }else{ $(current_click).text(current_text); $(current_click).attr('data-page', page); } },complete: function() { if(layout=='grid' || layout=='masonry'){ if(!$("."+load_class).hasClass("list-grid-client")){ setTimeout(function(){ $("."+load_class+' .post-inner-loop').isotope( 'layout' ).isotope( 'reloadItems' ); }, 500); } } if (jQuery('.list-isotope-metro').size() > 0) { setTimeout(function(){ theplus_setup_packery_portfolio('all'); }, 500); } current_click.data('requestRunning', false); } }).then(function(){ if(!$("."+load_class).hasClass("list-grid-client")){ if(layout=='grid' || layout=='masonry'){ var container = $("."+load_class+' .post-inner-loop'); container.isotope({ itemSelector: '.grid-item', }); } } if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); } }); }else{ $(current_click).addClass("hide"); } }); } }); })(jQuery ); /*----load more post ajax----------------*/ /*----lazy load ajax----------------*/ ;( function($) { 'use strict'; $(window).load(function(){ if($('body').find('.post-lazy-load').length>=1){ var windowWidth, windowHeight, documentHeight, scrollTop, containerHeight, containerOffset, $window = $(window); var recalcValues = function() { windowWidth = $window.width(); windowHeight = $window.height(); documentHeight = $('body').height(); setTimeout(function(){ containerHeight = $('.list-isotope,.list-isotope-metro').height(); containerOffset = $('.list-isotope,.list-isotope-metro').offset().top+50; }, 50); }; recalcValues(); $window.resize(recalcValues); $window.bind('scroll', function(e) { e.preventDefault(); recalcValues(); scrollTop = $window.scrollTop(); if(scrollTop < documentHeight && scrollTop > (containerHeight + containerOffset - windowHeight)){ $(".post-lazy-load").each(function() { var current_click= $(this); var post_load=$(this).data('load'); var post_type=$(this).data('post_type'); var texonomy_category=$(this).data('texonomy_category'); var page = $(this).attr('data-page'); var total_page=$(this).data('total_page'); var load_class= $(this).data('load-class'); var layout=$(this).data('layout'); var desktop_column=$(this).data('desktop-column'); var tablet_column=$(this).data('tablet-column'); var mobile_column=$(this).data('mobile-column'); var metro_column=$(this).data('metro_column'); var metro_style=$(this).data('metro_style'); var responsive_tablet_metro=$(this).data('responsive_tablet_metro'); var tablet_metro_column=$(this).data('tablet_metro_column'); var tablet_metro_style=$(this).data('tablet_metro_style'); var style=$(this).data('style'); var style_layout=$(this).data('style_layout'); var offset_posts=$(this).data('offset-posts'); var category=$(this).data('category'); var post_tags=$(this).data('post_tags'); var order_by=$(this).data('order_by'); var post_order=$(this).data('post_order'); var filter_category=$(this).data('filter_category'); var display_post=$(this).data('display_post'); var post_load_more=$(this).data('post_load_more'); var animated_columns=$(this).data('animated_columns'); var display_post_title=$(this).data('display_post_title'); var display_post_meta=$(this).data('display_post_meta'); var post_meta_tag_style=$(this).data('post_meta_tag_style'); var display_excerpt=$(this).data('display_excerpt'); var post_excerpt_count=$(this).data('post_excerpt_count'); var display_post_category=$(this).data('display_post_category'); var post_category_style=$(this).data('post_category_style'); var featured_image_type=$(this).data('featured_image_type'); var display_button=$(this).data('display_button'); var button_style=$(this).data('button_style'); var before_after=$(this).data('before_after'); var button_text=$(this).data('button_text'); var button_icon_style=$(this).data('button_icon_style'); var button_icon=$(this).data('button_icon'); var button_icons_mind=$(this).data('button_icons_mind'); var current_text= $(this).text(); if ( current_click.data('requestRunning') ) { return; } if(offset_posts==undefined || offset_posts==""){ offset_posts=0; } if(page<=total_page){ current_click.data('requestRunning', true); var offset=(parseInt(page-1)*parseInt(post_load_more))+parseInt(display_post)+parseInt(offset_posts); $.ajax({ type:'POST', data:'style='+style+'&action=theplus_more_post&post_load='+post_load+'&post_type='+post_type+'&texonomy_category='+texonomy_category+'&layout='+layout+'&desktop_column='+desktop_column+'&tablet_column='+tablet_column+'&mobile_column='+mobile_column+'&offset='+offset+'&category='+category+'&post_tags='+post_tags+'&display_post='+display_post+'&order_by='+order_by+'&filter_category='+filter_category+'&post_order='+post_order+'&animated_columns='+animated_columns+'&post_load_more='+post_load_more+'&metro_column='+metro_column+'&metro_style='+metro_style+'&responsive_tablet_metro='+responsive_tablet_metro+'&tablet_metro_column='+tablet_metro_column+'&tablet_metro_style='+tablet_metro_style+'&display_post_meta='+display_post_meta+'&post_meta_tag_style='+post_meta_tag_style+'&display_excerpt='+display_excerpt+'&post_excerpt_count='+post_excerpt_count+'&display_post_category='+display_post_category+'&post_category_style='+post_category_style+'&featured_image_type='+featured_image_type+'&display_button='+display_button+'&button_style='+button_style+'&before_after='+before_after+'&button_text='+button_text+'&button_icon_style='+button_icon_style+'&button_icon='+button_icon+'&button_icons_mind='+button_icons_mind+'&paged='+page+'&display_post_title='+display_post_title, url:theplus_ajax_url, beforeSend: function() { $(current_click).text('Loading..'); },success: function(data) { if(data==''){ $(current_click).addClass("hide"); }else{ $("."+load_class+' .post-inner-loop').append( data ); if(layout=='grid' || layout=='masonry'){ if(!$("."+load_class).hasClass("list-grid-client")){ var $newItems = $(''); $("."+load_class+' .post-inner-loop').isotope( 'insert', $newItems ); $("."+load_class+' .post-inner-loop').isotope( 'layout' ).isotope( 'reloadItems' ); } } if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); } if($("."+load_class).parents(".animate-general").length){ var c,d; if($("."+load_class).find(".animated-columns").length){ var p = $("."+load_class).parents(".animate-general"); var delay_time=p.data("animate-delay"); var animation_stagger=p.data("animate-stagger"); var d = p.data("animate-type"); var animate_offset = p.data("animate-offset"); p.css("opacity","1"); c = p.find('.animated-columns'); c.each(function() { var bc=$(this); bc.waypoint(function(direction) { if( direction === 'down'){ if(!bc.hasClass("animation-done")){ bc.addClass("animation-done").velocity(d,{ delay: delay_time,display:'auto'}); } } }, {triggerOnce: true, offset: animate_offset } ); }); }else{ var b = $("."+load_class).parents(".animate-general"); var delay_time=b.data("animate-delay"); d = b.data("animate-type"), animate_offset = p.data("animate-offset"), b.waypoint(function(direction ) { if( direction === 'down'){ if(!b.hasClass("animation-done")){ b.addClass("animation-done").velocity(d, {delay: delay_time,display:'auto'}); } } }, {triggerOnce: true, offset: animate_offset } ); } } $(".hover-tilt").hover3d({ selector: ".blog-list-style-content,.portfolio-item-content", shine: !1, perspective: 2e3, invert: !0, sensitivity: 35, }); $('.pt_theplus-list-portfolio-post .grid-item').each(function() { var data_opacity= $(this).data('opacity'); var data_color=$(this).data('color'); var rgba_color=pt_plus_hexToRgbA(data_color,data_opacity); $(this).find(".portfolio-item-hover").css('background',rgba_color); }); page++; if(page==total_page){ $(current_click).addClass("hide"); $(current_click).attr('data-page', page); }else{ $(current_click).text(current_text); $(current_click).attr('data-page', page); } } $(current_click).text(current_text); page++; $(current_click).attr('data-page', page); },complete: function() { if(layout=='grid' || layout=='masonry'){ if(!$("."+load_class).hasClass("list-grid-client")){ setTimeout(function(){ $("."+load_class+' .post-inner-loop').isotope( 'layout' ).isotope( 'reloadItems' ); }, 500); } } if (jQuery('.list-isotope-metro').size() > 0) { setTimeout(function(){ theplus_setup_packery_portfolio('all'); }, 500); } current_click.data('requestRunning', false); } }).then(function(){ if(!$("."+load_class).hasClass("list-grid-client")){ if(layout=='grid' || layout=='masonry'){ var container = $("."+load_class+' .post-inner-loop'); container.isotope({ itemSelector: '.grid-item', }); } } if (jQuery('.list-isotope-metro').size() > 0) { theplus_setup_packery_portfolio('all'); } }); }else{ $(current_click).addClass("hide"); } }); } }); } }); })(jQuery ); /*---*/ /*--bottom bubble js ---*/ function snow_particles_background(canvas_scene, canvas_inner) { let circles, target, animateHeader = true; let canvas = canvas_inner; let width = canvas_scene.innerWidth(); let height = canvas_scene.innerHeight(); let canvas_header = canvas_scene; let ctx = canvas.getContext('2d'); initHeader(); addListeners(); function initHeader() { canvas.width = width; canvas.height = height; target = { x: 0, y: height }; canvas_header.css({ 'height': height + 'px' }); circles = []; for (let x = 0; x < width * 0.5; x++) { let c = new Circle(); circles.push(c); } animate(); } function addListeners() { window.addEventListener('scroll', scrollCheck); window.addEventListener('resize', resize); } function scrollCheck() { if (document.body.scrollTop > height) animateHeader = false; else animateHeader = true; } function resize() { width = window.innerWidth; height = window.innerHeight; canvas_header.css({ 'height': height + 'px' }); canvas.width = width; canvas.height = height; } function animate() { if (animateHeader) { ctx.clearRect(0, 0, width, height); for (let i in circles) { circles[i].draw(); } } requestAnimationFrame(animate); } function Circle() { let $this = this; (function () { $this.pos = {}; init(); })(); function init() { $this.pos.x = Math.random() * width; $this.pos.y = height + Math.random() * 100; $this.alpha = 0.1 + Math.random() * 0.4; $this.scale = 0.1 + Math.random() * 0.3; $this.velocity = Math.random(); } this.draw = function () { if ($this.alpha <= 0) { init(); } $this.pos.y -= $this.velocity; $this.alpha -= 0.0003; ctx.beginPath(); ctx.arc($this.pos.x, $this.pos.y, $this.scale * 10, 0, 2 * Math.PI, false); ctx.fillStyle = 'rgba(255,255,255,' + $this.alpha + ')'; ctx.fill(); }; } } /*--bottom bubble js ---*/;