1(function( $ ) { 2 "use strict"; 3 4 /* rtl check */ 5 function rtl_isotop(){ 6 if ($('body').hasClass("rtl")) { 7 return false; 8 } else { 9 return true; 10 }}; 11 12 function rtl_slick(){ 13 if ($('body').hasClass("rtl")) { 14 return true; 15 } else { 16 return false; 17 }}; 18 19 /* -------------------------------------------------- 20 * preloader 21 * --------------------------------------------------*/ 22 if ( $('#royal_preloader').length ) { 23 var $selector = $('#royal_preloader'), 24 $width = $selector.data('width'), 25 $height = $selector.data('height'), 26 $color = $selector.data('color'), 27 $bgcolor = $selector.data('bgcolor'), 28 $logourl = $selector.data('url'); 29 30 Royal_Preloader.config({ 31 mode : 'logo', 32 logo : $logourl, 33 logo_size : [$width, $height], 34 showProgress : true, 35 showPercentage : true, 36 text_colour: $color, 37 background: $bgcolor, 38 }); 39 } 40 41 /* ========================================== 42 Sticky Header Default 43 ========================================== */ 44 $('.sticky-header').append('<div class="header-clone"></div>'); 45 $('.header-clone').height($('.site-header .octf-main-header').outerHeight()); 46 $('.sticky-header .header-clone').hide(); 47 $(window).on("scroll", function(){ 48 if ( $( '#site-header' ).hasClass( "sticky-header" ) ) { 49 var site_header = $('#site-header').outerHeight() + 30; 50 51 if ($(window).scrollTop() >= site_header) { 52 $('.sticky-header .octf-main-header, .mobile-header-sticky .header_mobile').addClass('is-stuck'); 53 $('.sticky-header .header-clone').show(); 54 }else { 55 $('.sticky-header .octf-main-header, .mobile-header-sticky .header_mobile').removeClass('is-stuck'); 56 $('.sticky-header .header-clone').hide(); 57 } 58 } 59 }); 60 61 /* ========================================== 62 search on header 63 ========================================== */ 64 $('.octf-mainbar .toggle_search').on("click", function(){ 65 $(this).toggleClass( "active" ); 66 $('.h-search-form-field').toggleClass('show'); 67 if ($(this).find('i').hasClass( "flaticon-search" )) { 68 $('.toggle_search > i').removeClass( "flaticon-search" ).addClass("flaticon-close"); 69 }else{ 70 $('.toggle_search > i').removeClass( "flaticon-close" ).addClass("flaticon-search"); 71 } 72 $('.h-search-form-inner > form > input.search-field').focus(); 73 }); 74 75 /* -------------------------------------------------- 76 * switcher 77 * --------------------------------------------------*/ 78 var swt = $('.ot-switcher').find('.switch input'); 79 $('section.yearly').hide(); 80 swt.on( 'change', function() { 81 var parent = $(this).parents('.elementor-top-section'); 82 if(this.checked) { 83 parent.find('.r-switch').addClass('active'); 84 parent.find('.l-switch').removeClass('active'); 85 parent.find('section.monthly').hide(); 86 parent.find('section.yearly').show(); 87 }else{ 88 parent.find('.l-switch').addClass('active'); 89 parent.find('.r-switch').removeClass('active'); 90 parent.find('section.yearly').hide(); 91 parent.find('section.monthly').show(); 92 } 93 }); 94 95 /* -------------------------------------------------- 96 * Switcher with Container 97 * --------------------------------------------------*/ 98 var swt2 = $('.ot-switcher').find('.switch input'); 99 $('.e-con.yearly').hide(); 100 swt2.on( 'change', function() { 101 var parent = $(this).parents('.elementor-widget-iswitcher'); 102 if(this.checked) { 103 parent.find('.r-switch').addClass('active'); 104 parent.find('.l-switch').removeClass('active'); 105 parent.find('~ .monthly').hide(); 106 parent.find('~ .yearly').show(); 107 }else{ 108 parent.find('.l-switch').addClass('active'); 109 parent.find('.r-switch').removeClass('active'); 110 parent.find('~ .yearly').hide(); 111 parent.find('~ .monthly').show(); 112 } 113 });
114 115 /* -------------------------------------------------- 116 * big tabs 117 * --------------------------------------------------*/ 118 var tabTitle = $('.tab-titles'), 119 tabTitle2 = $('.tab-titles-2'); 120 if ( tabTitle.length > 0 ) { 121 tabTitle.each( function(){ 122 var tabItem = $(this).find('.title-item'); 123 tabItem.on( 'click', function(){ 124 tabItem.removeClass('tab-active'); 125 $(this).addClass('tab-active'); 126 tabItem.each(function() { 127 $($(this).data('link')).hide(); 128 }); 129 $($(this).data('link')).show(); 130 }); 131 tabItem.first().trigger('click'); 132 }); 133 } 134 if ( tabTitle2.length > 0 ) { 135 tabTitle2.each( function(){ 136 var tabItem = $(this).find('.title-item-2'); 137 tabItem.on( 'click', function(){ 138 tabItem.removeClass('tab-active'); 139 $(this).addClass('tab-active'); 140 tabItem.each(function() { 141 $($(this).data('link')).hide(); 142 }); 143 $($(this).data('link')).show(); 144 }); 145 tabItem.first().trigger('click'); 146 }); 147 } 148 149 /*Gallery Post*/ 150 $('.gallery-post').each( function () { 151 $(this).slick({ 152 infinite: true, 153 slidesToShow: 1, 154 slidesToScroll: 1, 155 arrows: true, 156 dots: false, 157 autoplay: true, 158 autoplaySpeed: 7000, 159 rtl: rtl_slick(), 160 prevArrow: '<button type="button" class="prev-nav"><i class="flaticon-back"></i></button>', 161 nextArrow: '<button type="button" class="next-nav"><i class="flaticon-right-arrow-1"></i></button>', 162 responsive: [] 163 }); 164 }); 165 166 /*Popup Video*/ 167 var $video_play = $('.btn-play'); 168 if ($video_play.length > 0 ) { 169 $video_play.magnificPopup({ 170 type: 'iframe', 171 removalDelay: 160, 172 preloader: true, 173 fixedContentPos: true, 174 callbacks: { 175 beforeOpen: function() { 176 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 177 this.st.mainClass = this.st.el.attr('data-effect'); 178 } 179 }, 180 }); 181 } 182 183 /*Portfolio Filter*/ 184 $(window).on("load", function () { 185 if( $('#projects_grid').length > 0 ){ 186 var $container = $('#projects_grid'); 187 $container.isotope({ 188 itemSelector : '.project-item', 189 layoutMode : 'masonry', 190 isOriginLeft: rtl_isotop() 191 }); 192 193 var $optionSets = $('.project_filters'), 194 $optionLinks = $optionSets.find('a'); 195 196 $optionLinks.click(function(){ 197 var $this = $(this); 198 199 if ( $this.hasClass('selected') ) { 200 return false; 201 } 202 var $optionSet = $this.parents('.project_filters'); 203 $optionSets.find('.selected').removeClass('selected'); 204 $this.addClass('selected'); 205 206 var selector = $(this).attr('data-filter'); 207 $container.isotope({ 208 filter: selector 209 }); 210 return false; 211 }); 212 }; 213 214 if( $('.blog-grid').length > 0 ){ 215 var $container = $('.blog-grid'); 216 $container.isotope({ 217 itemSelector : '.masonry-post-item', 218 layoutMode : 'masonry' 219 }); 220 }; 221 }); 222 223 /*Gird Lines*/ 224 $('.has-lines').each(function () { 225 var l = $('<div class="grid-lines"><span class="g-line line-left"><span class="g-dot"></span></span><span class="g-line line-cleft"><span class="g-dot"></span></span><span class="g-line line-center"><span class="g-dot"></span></span><span class="g-line line-cright"><span class="g-dot"></span></span><span class="g-line line-right"><span class="g-dot"></span></span></div>'); 226 $(this).prepend(l); 227 });
228 229 /* ========================================== 230 Back To Top 231 ========================================== */ 232 if ($('#back-to-top').length) { 233 var scrollTrigger = 500, /*px*/ 234 backToTop = function () { 235 var scrollTop = $(window).scrollTop(); 236 if (scrollTop > scrollTrigger) { 237 $('#back-to-top').addClass('show'); 238 } else { 239 $('#back-to-top').removeClass('show'); 240 } 241 }; 242 backToTop(); 243 $(window).on('scroll', function () { 244 backToTop(); 245 }); 246 $('#back-to-top').on('click', function (e) { 247 e.preventDefault(); 248 $('html,body').animate({ 249 scrollTop: 0 250 }, 700); 251 }); 252 } 253 254 // const root = document.documentElement; 255 // const marqueeWrap = document.querySelector("div.ot-industries-marquee"); 256 // const marqueeContent = document.querySelector("ul.industries-marquee-content"); 257 // const marqueeElementsDisplayed = parseInt(marqueeWrap.dataset.display); 258 259 // root.style.setProperty("--marquee-elements-displayed", marqueeElementsDisplayed); 260 // root.style.setProperty("--marquee-elements", marqueeContent.children.length); 261 262 // for(let i=0; i<marqueeElementsDisplayed; i++) { 263 // marqueeContent.appendChild(marqueeContent.children[i].cloneNode(true)); 264 // } 265 266})( jQuery ); 267
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.