/* ----------------------------------------------------------------------------- file: js core version: 1.0 last change: 00/00/00 -------------------------------------------------------------------------------- */ (function() { "use strict"; var fastrans = { init: function() { this.basic.init(); }, basic: { init: function() { this.preloader(); this.backgroundimage(); this.animation(); this.stickyheader(); this.mobilemenu(); this.scrolltop(); this.mainslider(); this.counterup(); this.popup(); this.carouselsliderjs(); this.circleprogress(); this.countdown(); this.milesrange(); }, preloader: function (){ jquery(window).on('load', function(){ jquery('#preloader').fadeout('slow',function(){jquery(this).remove();}); }) }, backgroundimage: function (){ $('[data-background]').each(function() { $(this).css('background-image', 'url('+ $(this).attr('data-background') + ')'); }); }, animation: function (){ if($('.wow').length){ var wow = new wow( { boxclass: 'wow', animateclass: 'animated', offset: 0, mobile: true, live: true } ); wow.init(); } }, stickyheader: function (){ jquery(window).on('scroll', function() { if (jquery(window).scrolltop() > 250) { jquery('.ft-header-section').addclass('sticky-on') } else { jquery('.ft-header-section').removeclass('sticky-on') } }) }, mobilemenu: function (){ $('.open_mobile_menu').on("click", function() { $('.mobile_menu_wrap').toggleclass("mobile_menu_on"); }); $('.open_mobile_menu').on('click', function () { $('body').toggleclass('mobile_menu_overlay_on'); }); if($('.mobile_menu li.dropdown ul').length){ $('.mobile_menu li.dropdown').append(''); $('.mobile_menu li.dropdown .dropdown-btn').on('click', function() { $(this).prev('ul').slidetoggle(500); }); } $(".dropdown-btn").on("click", function () { $(this).toggleclass("toggle-open"); }); }, scrolltop: function (){ $(window).on("scroll", function() { if ($(this).scrolltop() > 200) { $('.scrollup').fadein(); } else { $('.scrollup').fadeout(); } }); $('.scrollup').on("click", function() { $("html, body").animate({ scrolltop: 0 }, 800); return false; }); }, mainslider: function (){ var tpj = jquery; if(window.rs_modules === undefined) window.rs_modules = {}; if(rs_modules.modules === undefined) rs_modules.modules = {}; rs_modules.modules["revslider271"] = {once: rs_modules.modules["revslider271"]!==undefined ? rs_modules.modules["revslider271"].once : undefined, init:function() { window.revapi27 = window.revapi27===undefined || window.revapi27===null || window.revapi27.length===0 ? document.getelementbyid("rev_slider_27_1") : window.revapi27; if(window.revapi27 === null || window.revapi27 === undefined || window.revapi27.length==0) { window.revapi27inittry = window.revapi27inittry ===undefined ? 0 : window.revapi27inittry+1; if (window.revapi27inittry<20) requestanimationframe(function() {rs_modules.modules["revslider271"].init()}); return;} window.revapi27 = jquery(window.revapi27); if(window.revapi27.revolution==undefined){ revslider_showdoublejqueryerror("rev_slider_27_1"); return;} revapi27.revolutioninit({ revapi:"revapi27", dpr:"dpr", sliderlayout:"fullwidth", visibilitylevels:"1240,1024,778,480", gridwidth:"1240,1024,778,480", gridheight:"930,768,500,450", perspective:600, perspectivetype:"global", editorheight:"930,768,500,450", responsivelevels:"1240,1024,778,480", progressbar:{disableprogressbar:true}, navigation: { wheelcalldelay:1000, onhoverstop:false, thumbnails: { enable:true, tmp:" ", style:"gyges", h_align:"right", v_offset:0, space:5, width:70, height:70, wrapper_padding:5, wrapper_color:"transparent" } }, parallax: { levels:[5,10,15,20,25,30,35,40,45,46,47,48,49,50,51,30], type:"scroll", origo:"slidercenter", speed:0 }, viewport: { global:false, globaldist:"-200px", enable:false }, fallbacks: { allowhtml5autoplayonandroid:true }, }); }} if (window.rs_modules.checkminimal!==undefined) { window.rs_modules.checkminimal();}; var tpj = jquery; if(window.rs_modules === undefined) window.rs_modules = {}; if(rs_modules.modules === undefined) rs_modules.modules = {}; rs_modules.modules["revslider291"] = {once: rs_modules.modules["revslider291"]!==undefined ? rs_modules.modules["revslider291"].once : undefined, init:function() { window.revapi29 = window.revapi29===undefined || window.revapi29===null || window.revapi29.length===0 ? document.getelementbyid("rev_slider_29_1") : window.revapi29; if(window.revapi29 === null || window.revapi29 === undefined || window.revapi29.length==0) { window.revapi29inittry = window.revapi29inittry ===undefined ? 0 : window.revapi29inittry+1; if (window.revapi29inittry<20) requestanimationframe(function() {rs_modules.modules["revslider291"].init()}); return;} window.revapi29 = jquery(window.revapi29); if(window.revapi29.revolution==undefined){ revslider_showdoublejqueryerror("rev_slider_29_1"); return;} revapi29.revolutioninit({ revapi:"revapi29", dpr:"dpr", sliderlayout:"fullwidth", visibilitylevels:"1240,1024,778,480", gridwidth:"1240,1024,778,480", gridheight:"930,768,650,450", perspective:600, perspectivetype:"global", editorheight:"930,768,650,450", responsivelevels:"1240,1024,778,480", progressbar:{disableprogressbar:true}, navigation: { wheelcalldelay:1000, onhoverstop:false, arrows: { enable:true, style:"hesperiden", hide_onmobile:true, hide_under:778, left: { h_offset:30 }, right: { h_align:"left", h_offset:29, v_offset:-53 } } }, viewport: { global:false, globaldist:"-200px", enable:false }, fallbacks: { allowhtml5autoplayonandroid:true }, }); }} // end of revinitscript if (window.rs_modules.checkminimal!==undefined) { window.rs_modules.checkminimal();}; }, counterup: function (){ if($('.counter').length){ jquery('.counter').counterup({ delay: 50, time: 2000, }); }; }, popup: function (){ $('.zoom-gallery').magnificpopup({ delegate: 'a', type: 'image', closeoncontentclick: false, closebtninside: false, mainclass: 'mfp-with-zoom mfp-img-mobile', gallery: { enabled: true }, zoom: { enabled: true, duration: 300, opener: function(element) { return element.find('img'); } } }); jquery(window).on('load', function(){ $('.filtr-container').imagesloaded ( function(){}); var filterizd = $('.filtr-container'); if(filterizd.length) { filterizd.filterizr({ }); $('.filtr-button').on('click', function() { $('.filtr-button.filtr-active').removeclass('filtr-active'); $(this).addclass('filtr-active'); }); } }); }, carouselsliderjs: function (){ $('.ft-service-slider-wrapper').slick({ arrow: false, dots: true, infinite: false, slidestoshow: 3, slidestoscroll: 1, responsive: [ { breakpoint: 1024, settings: { slidestoshow: 2, slidestoscroll: 1, infinite: true, dots: true } }, { breakpoint: 800, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 2 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $('.ft-project-slider-area').slick({ arrow: false, dots: true, infinite: true, slidestoshow: 2, slidestoscroll: 1, centermode: true, variablewidth: true, responsive: [ { breakpoint: 1024, settings: { slidestoshow: 1, slidestoscroll: 1, infinite: true, dots: true } }, { breakpoint: 800, settings: { slidestoshow: 1, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 1, slidestoscroll: 2 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $('.ft-testimonial-slider-area').slick({ arrow: false, infinite: false, slidestoshow: 3, slidestoscroll: 1, dots: true, responsive: [ { breakpoint: 1024, settings: { slidestoshow: 3, slidestoscroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidestoshow: 3, slidestoscroll: 1 } }, { breakpoint: 799, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 599, settings: { slidestoshow: 1, slidestoscroll: 1 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $('.ft-service-slider-2').slick({ arrow: false, infinite: false, slidestoshow: 4, slidestoscroll: 1, dots: true, responsive: [ { breakpoint: 1100, settings: { slidestoshow: 3, slidestoscroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidestoshow: 3, slidestoscroll: 1 } }, { breakpoint: 799, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 599, settings: { slidestoshow: 1, slidestoscroll: 1 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $('.ft-portfolio-slider-2').slick({ arrow: false, infinite: false, slidestoshow: 4, slidestoscroll: 1, dots: true, responsive: [ { breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidestoshow: 3, slidestoscroll: 1 } }, { breakpoint: 799, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 599, settings: { slidestoshow: 1, slidestoscroll: 1 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $('.ft-blog-slider-2').slick({ arrow: true, dots: false, infinite: false, slidestoshow: 3, slidestoscroll: 1, prevarrow: ".blg-left_arrow", nextarrow: ".blg-right_arrow", responsive: [ { breakpoint: 1024, settings: { slidestoshow: 2, slidestoscroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 2 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); $("#myslider1").animatedslider( { prevbutton: "#btn_prev1", nextbutton: "#btn_next1", visibleitems: 3, infinitescroll: true, willchangecallback: function(obj, item) { $("#statustext").text("will change to " + item); }, changedcallback: function(obj, item) { $("#statustext").text("changed to " + item); } }); $(".ft-testimonial-slider-3").slick({ autoplay: false, dots: true, custompaging : function(slider, i) { var thumb = $(slider.$slides[i]).data(); return ''+(i+1)+''; }, }); $('.blog-slider-3').slick({ dots: true, infinite: false, slidestoshow: 3, slidestoscroll: 1, custompaging : function(slider, i) { var thumb = $(slider.$slides[i]).data(); return ''+(i+1)+''; }, responsive: [ { breakpoint: 1024, settings: { slidestoshow: 2, slidestoscroll: 1, infinite: true, } }, { breakpoint: 800, settings: { slidestoshow: 2, slidestoscroll: 1 } }, { breakpoint: 600, settings: { slidestoshow: 2, slidestoscroll: 2 } }, { breakpoint: 500, settings: { slidestoshow: 1, slidestoscroll: 1 } } ] }); }, circleprogress: function (){ if($('.count-box').length){ $('.count-box').appear_c(function(){ var $t = $(this), n = $t.find(".count-text").attr("data-stop"), r = parseint($t.find(".count-text").attr("data-speed"), 10); if (!$t.hasclass("counted")) { $t.addclass("counted"); $({ countnum: $t.find(".count-text").text() }).animate({ countnum: n }, { duration: r, easing: "linear", step: function() { $t.find(".count-text").text(math.floor(this.countnum)); }, complete: function() { $t.find(".count-text").text(this.countnum); } }); } },{accy: 0}); }; if($('.dial').length){ $('.dial').appear_c(function(){ var elm = $(this); var color = elm.attr('data-fgcolor'); var perc = elm.attr('value'); var thickness = elm.attr('thickness'); elm.knob({ 'value': 0, 'min':0, 'max':100, 'skin':'tron', 'readonly':true, 'thickness':.1, 'dynamicdraw': true, 'displayinput':false }); $({value: 0}).animate({ value: perc }, { duration: 3500, easing: 'swing', progress: function () { elm.val(math.ceil(this.value)).trigger('change'); } }); },{accy: 0}); } }, countdown: function (){ if ($('.coming-soon-countdown').length > 0) { var deadlinedate = new date('sep 26, 2023 23:59:59').gettime(); var countdowndays = document.queryselector('.days .ft-count-down-number'); var countdownhours = document.queryselector('.hours .ft-count-down-number'); var countdownminutes = document.queryselector('.minutes .ft-count-down-number'); var countdownseconds = document.queryselector('.seconds .ft-count-down-number'); setinterval(function () { var currentdate = new date().gettime(); var distance = deadlinedate - currentdate; var days = math.floor(distance / (1000 * 60 * 60 * 24)); var hours = math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = math.floor((distance % (1000 * 60)) / 1000); countdowndays.innerhtml = days; countdownhours.innerhtml = hours; countdownminutes.innerhtml = minutes; countdownseconds.innerhtml = seconds; }, 1000); }; jquery('.video_box').magnificpopup({ disableon: 200, type: 'iframe', mainclass: 'mfp-fade', removaldelay: 160, preloader: false, fixedcontentpos: false, }); }, milesrange: function (){ if ($("#slider-range").length) { $( "#slider-range" ).slider({ range: true, min: 0, max: 3000, values: [ 0, 1500 ], slide: function( event, ui ) { $( "#amount" ).val( "" + ui.values[ 0 ] + " - " + ui.values[ 1 ] ); } }); }; if ($("#amount").length) { $( "#amount" ).val( "" + $( "#slider-range" ).slider( "values", 0 ) + " - " + $( "#slider-range" ).slider( "values", 1 ) ); }; $('.count').prop('disabled', true); $(document).on('click','.plus',function(){ $('.count').val(parseint($('.count').val()) + 1 ); }); $(document).on('click','.minus',function(){ $('.count').val(parseint($('.count').val()) - 1 ); if ($('.count').val() == 0) { $('.count').val(1); } }); }, } } jquery(document).ready(function (){ fastrans.init(); }); })();