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 * big tabs 97 * --------------------------------------------------*/ 98 var tabTitle = $('.tab-titles'), 99 tabTitle2 = $('.tab-titles-2'); 100 if ( tabTitle.length > 0 ) { 101 tabTitle.each( function(){ 102 var tabItem = $(this).find('.title-item'); 103 tabItem.on( 'click', function(){ 104 tabItem.removeClass('tab-active'); 105 $(this).addClass('tab-active'); 106 tabItem.each(function() { 107 $($(this).data('link')).hide(); 108 }); 109 $($(this).data('link')).show(); 110 }); 111 tabItem.first().trigger('click'); 112 }); 113 } 114 if ( tabTitle2.length > 0 ) { 115 tabTitle2.each( function(){ 116 var tabItem = $(this).find('.title-item-2'); 117 tabItem.on( 'click', function(){ 118 tabItem.removeClass('tab-active'); 119 $(this).addClass('tab-active'); 120 tabItem.each(function() { 121 $($(this).data('link')).hide(); 122 }); 123 $($(this).data('link')).show(); 124 }); 125 tabItem.first().trigger('click'); 126 }); 127 } 128 129 /*Gallery Post*/ 130 $('.gallery-post').each( function () { 131 $(this).slick({ 132 infinite: true, 133 slidesToShow: 1, 134 slidesToScroll: 1, 135 arrows: true, 136 dots: false, 137 autoplay: true, 138 autoplaySpeed: 7000, 139 rtl: rtl_slick(), 140 prevArrow: '<button type="button" class="prev-nav"><i class="flaticon-back"></i></button>', 141 nextArrow: '<button type="button" class="next-nav"><i class="flaticon-right-arrow-1"></i></button>', 142 responsive: [] 143 }); 144 });
145 146 /*Popup Video*/ 147 var $video_play = $('.btn-play'); 148 if ($video_play.length > 0 ) { 149 $video_play.magnificPopup({ 150 type: 'iframe', 151 removalDelay: 160, 152 preloader: true, 153 fixedContentPos: true, 154 callbacks: { 155 beforeOpen: function() { 156 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 157 this.st.mainClass = this.st.el.attr('data-effect'); 158 } 159 }, 160 }); 161 } 162 163 /*Portfolio Filter*/ 164 $(window).on("load", function () { 165 if( $('#projects_grid').length > 0 ){ 166 var $container = $('#projects_grid'); 167 $container.isotope({ 168 itemSelector : '.project-item', 169 layoutMode : 'masonry', 170 isOriginLeft: rtl_isotop() 171 }); 172 173 var $optionSets = $('.project_filters'), 174 $optionLinks = $optionSets.find('a'); 175 176 $optionLinks.click(function(){ 177 var $this = $(this); 178 179 if ( $this.hasClass('selected') ) { 180 return false; 181 } 182 var $optionSet = $this.parents('.project_filters'); 183 $optionSets.find('.selected').removeClass('selected'); 184 $this.addClass('selected'); 185 186 var selector = $(this).attr('data-filter'); 187 $container.isotope({ 188 filter: selector 189 }); 190 return false; 191 }); 192 }; 193 194 if( $('.blog-grid').length > 0 ){ 195 var $container = $('.blog-grid'); 196 $container.isotope({ 197 itemSelector : '.masonry-post-item', 198 layoutMode : 'masonry' 199 }); 200 }; 201 }); 202 203 /*Gird Lines*/ 204 $('.has-lines').each(function () { 205 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>'); 206 $(this).prepend(l); 207 }); 208 209 /* ========================================== 210 Back To Top 211 ========================================== */ 212 if ($('#back-to-top').length) { 213 var scrollTrigger = 500, /*px*/ 214 backToTop = function () { 215 var scrollTop = $(window).scrollTop(); 216 if (scrollTop > scrollTrigger) { 217 $('#back-to-top').addClass('show'); 218 } else { 219 $('#back-to-top').removeClass('show'); 220 } 221 }; 222 backToTop(); 223 $(window).on('scroll', function () { 224 backToTop(); 225 }); 226 $('#back-to-top').on('click', function (e) { 227 e.preventDefault(); 228 $('html,body').animate({ 229 scrollTop: 0 230 }, 700); 231 }); 232 } 233 234 // const root = document.documentElement; 235 // const marqueeWrap = document.querySelector("div.ot-industries-marquee"); 236 // const marqueeContent = document.querySelector("ul.industries-marquee-content"); 237 // const marqueeElementsDisplayed = parseInt(marqueeWrap.dataset.display); 238 239 // root.style.setProperty("--marquee-elements-displayed", marqueeElementsDisplayed); 240 // root.style.setProperty("--marquee-elements", marqueeContent.children.length); 241 242 // for(let i=0; i<marqueeElementsDisplayed; i++) { 243 // marqueeContent.appendChild(marqueeContent.children[i].cloneNode(true)); 244 // } 245 246})( jQuery ); 247
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.