1"use strict"; 2 3(function ($) { 4 $.fn.yprmHeight = function () { 5 return this.length ? this.height() : 0 6 }; 7 $.fn.yprmOuterHeight = function () { 8 return this.length ? this.outerHeight() : 0 9 }; 10 $.fn.yprmWidth = function () { 11 return this.length ? this.width() : 0 12 }; 13 $.fn.yprmOuterWidth = function () { 14 return this.length ? this.outerWidth() : 0 15 }; 16})(jQuery); 17 18function yprmHeaderScroll(scrollTop) { 19 if (scrollTop > 50) { 20 jQuery('.header-sticky .site-header').addClass('colored'); 21 } else { 22 jQuery('.header-sticky .site-header').removeClass('colored'); 23 } 24} 25 26jQuery(window).on('load scroll', function() { 27 yprmHeaderScroll(jQuery(window).scrollTop()); 28}); 29 30jQuery(window).on('load', function () { 31 jQuery('body').addClass('loaded'); 32}); 33 34jQuery(window).on('load resize elementor/frontend/init', function() { 35 jQuery('.header-space').css('height', jQuery('.site-header:visible').yprmOuterHeight()); 36 37 jQuery('.site-menu .has-mega-menu').each(function(e) { 38 var leftOffset = jQuery(this).offset().left; 39 jQuery(this).find('.pt-mega-menu-wrapper').css('left', -1 * leftOffset); 40 }); 41 42 var containers = [ 43 ".site-footer", 44 "#wpadminbar" 45 ]; 46 addCssElement('.site-main', containers); 47}); 48 49jQuery('.right-click-disable-true').on('contextmenu', function () { 50 jQuery('.right-click-disable-message').addClass('active'); 51 return false; 52}); 53 54jQuery('.right-click-disable-message:not(.lic)').on('click', function () { 55 jQuery(this).removeClass('active'); 56 return false; 57}); 58 59jQuery('.site-menu .sub-menu li a').on('mouseenter', function() { 60 jQuery(this).parent().parent().addClass('is-hovered'); 61}); 62 63jQuery('.site-menu .sub-menu li a').on('mouseleave', function() { 64 jQuery('.sub-menu').removeClass('is-hovered'); 65}); 66 67jQuery('.menu-toggle, .mobile-menu-toggle').on('click', function() { 68 jQuery('body').toggleClass('menu-toggled'); 69}); 70 71jQuery('.search-toggle').on('click', function() { 72 jQuery('body').toggleClass('search-toggled'); 73}); 74 75jQuery('.mobile-menu ul li.menu-item-has-children > a, .mobile-menu ul li.menu-item-has-children > .submenu-toggle, .widget_nav_menu ul li.menu-item-has-children > a, .widget_nav_menu ul li.menu-item-has-children > .submenu-toggle').on('click', function(e) { 76 if (jQuery(this).attr('href') && jQuery(this).attr('href').includes('#') && jQuery(this).attr('href').length > 1) { 77 jQuery('body').toggleClass('menu-toggled'); 78 } else { 79 e.preventDefault(); 80 81 jQuery(this).parent().children('ul').slideToggle(); 82 jQuery(this).parent().siblings().find('ul').slideUp(); 83 84 if (!jQuery(this).parent().hasClass('submenu-open')) { 85 jQuery(this).parent().addClass('submenu-open'); 86 } else { 87 jQuery(this).parent().removeClass('submenu-open'); 88 } 89 90 jQuery(this).parent().siblings().removeClass('submenu-open'); 91 92 return false; 93 } 94}); 95 96jQuery('.site-menu .menu-item-has-children, .pt-cart').on('mouseenter', function() { 97 let $li = jQuery(this), 98 $menu = $li.children('.pt-cart-minicart, .sub-menu'); 99 100 if($menu.length && $menu.offset().left+$menu.outerWidth() >= jQuery(window).width() && !$li.hasClass('on-left')) { 101 $li.addClass('on-left'); 102 } 103}); 104 105function addCssElement( selector, selectors, type = 'min-height' ) { 106 var height = jQuery(window).outerHeight(); 107 108 for (var i = 0; i < selectors.length; i++) { 109 var containerHeight = jQuery(selectors[i]).outerHeight(); 110 if ( containerHeight ) { 111 height -= containerHeight; 112 } 113 } 114 115 jQuery(selector).css(type, height); 116} 117 118jQuery( function( $ ) { 119 120 if ( ! String.prototype.getDecimals ) { 121 String.prototype.getDecimals = function() { 122 var num = this, 123 match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); 124 if ( ! match ) { 125 return 0; 126 } 127 return Math.max( 0, ( match[1] ? match[1].length : 0 ) - ( match[2] ? +match[2] : 0 ) ); 128 } 129 } 130 131 function wcqi_refresh_quantity_increments(){ 132 $( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<span class="plus"></span>' ).prepend( '<span class="minus"></span>' ); 133 } 134 135 $( document ).on( 'updated_wc_div', function() { 136 wcqi_refresh_quantity_increments(); 137 } ); 138 139 $( document ).on( 'click', '.plus, .minus', function() { 140 // Get values 141 var $qty = $( this ).closest( '.quantity' ).find( '.qty'), 142 currentVal = parseFloat( $qty.val() ), 143 max = parseFloat( $qty.attr( 'max' ) ), 144 min = parseFloat( $qty.attr( 'min' ) ), 145 step = $qty.attr( 'step' ); 146 147 // Format values 148 if ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0; 149 if ( max === '' || max === 'NaN' ) max = ''; 150 if ( min === '' || min === 'NaN' ) min = 0; 151 if ( step === 'any' || step === '' || step === undefined || parseFloat( step )
151=== 'NaN' ) step = 1; 152 153 // Change the value 154 if ( $( this ).is( '.plus' ) ) { 155 if ( max && ( currentVal >= max ) ) { 156 $qty.val( max ); 157 } else { 158 $qty.val( ( currentVal + parseFloat( step )).toFixed( step.getDecimals() ) ); 159 } 160 } else { 161 if ( min && ( currentVal <= min ) ) { 162 $qty.val( min ); 163 } else if ( currentVal > 0 ) { 164 $qty.val( ( currentVal - parseFloat( step )).toFixed( step.getDecimals() ) ); 165 } 166 } 167 168 // Trigger change event 169 $qty.trigger( 'change' ); 170 }); 171 172 wcqi_refresh_quantity_increments(); 173}); 174 175jQuery(document).ready(function () { 176 177 jQuery( 178 ".archive .portfolio-type-masonry" 179 ).each(function () { 180 var wrap = jQuery(this); 181 wrap.imagesLoaded(function () { 182 var $grid = wrap.isotope({ 183 itemSelector: "article", 184 masonry: { 185 //horizontalOrder: true 186 }, 187 }); 188 }); 189 }); 190 191 const $portfolio_carousel_swiper = new Swiper( 192 '.project-single-carousel .swiper', 193 { 194 spaceBetween: 30, 195 autoHeight: true, 196 breakpoints: { 197 0: { 198 slidesPerView: 1 199 }, 200 576: { 201 autoHeight: true, 202 slidesPerView: 1.7 203 }, 204 1024: { 205 slidesPerView: 2.5 206 } 207 }, 208 } 209 ); 210 211 /*------------------------------------------------------------------ 212 [ Post gallery masonry ] 213 */ 214 jQuery(".post-gallery-masonry").each(function () { 215 var $grid = jQuery(this).isotope({ 216 itemSelector: "div", 217 }); 218 }); 219 220 /*------------------------------------------------------------------ 221 [ Project slider ] 222 */ 223 jQuery(".project-slider").each(function () { 224 var head_slider = jQuery(this); 225 if (head_slider.find(".item").length == 1) { 226 head_slider.parent().removeClass("with-carousel-nav"); 227 } 228 if (jQuery(this).find(".item").length > 1) { 229 head_slider.addClass("owl-carousel").owlCarousel({ 230 //loop:true, 231 items: 1, 232 nav: true, 233 dots: false, 234 autoplay: false, 235 navClass: [ 236 "owl-prev basic-ui-icon-left-arrow", 237 "owl-next basic-ui-icon-right-arrow", 238 ], 239 navText: false, 240 autoHeight: true, 241 }); 242 243 var child_carousel = head_slider.next(".project-slider-carousel"); 244 245 var i = 0; 246 var flag = false; 247 var c_items = "4"; 248 249 if (head_slider.find(".owl-item:not(.cloned)").find(".item").length < 4) { 250 c_items = head_slider 251 .find(".owl-item:not(.cloned)") 252 .find(".item").length; 253 } 254 255 var child_carousel_c = child_carousel 256 .addClass("owl-carousel") 257 .owlCarousel({ 258 //loop:true, 259 items: 1, 260 nav: true, 261 dots: false, 262 autoplay: false, 263 navClass: [ 264 "owl-prev basic-ui-icon-left-arrow", 265 "owl-next basic-ui-icon-right-arrow", 266 ], 267 navText: false, 268 margin: 15, 269 responsive: { 270 0: { 271 nav: false, 272 }, 273 480: {}, 274 768: { 275 nav: true, 276 items: c_items, 277 }, 278 }, 279 }) 280 .on("click initialized.owl.carousel", ".item", function (e) { 281 e.preventDefault(); 282 head_slider.trigger("to.owl.carousel", [ 283 jQuery(e.target).parents(".owl-item").index(), 284 300, 285 true, 286 ]); 287 jQuery(e.target) 288 .parents(".owl-item") 289 .addClass("active-item") 290 .siblings() 291 .removeClass("active-item"); 292 }) 293 .data("owl.carousel"); 294 295 var child_carousel_item = child_carousel.find(".owl-item.active"); 296 297 head_slider 298 .on("change.owl.carousel", function (e) { 299 if ( 300 e.namespace && 301 e.property.name === "position" && 302 !flag && 303 typeof child_carousel_c !== "undefined" 304 ) { 305 flag = true; 306 child_carousel_c.to( 307 e.relatedTarget.relative(e.property.value), 308 300, 309 true 310 ); 311 head_slider 312 .parent() 313 .find(".banner-carousel .owl-item.active") 314 .first() 315 .addClass("active-item") 316 .siblings() 317 .removeClass("active-item"); 318 flag = false; 319 } 320 }) 321 .data("owl.carousel"); 322 } 323 }); 324 325 /*------------------------------------------------------------------ 326 [ Project horizontal slider ] 327 */ 328 jQuery(".project-horizontal-slider").each(function () { 329 var head_slider = jQuery(this);
330 if (head_slider.find(".item").length > 1) { 331 head_slider.imagesLoaded(function () { 332 head_slider.addClass("owl-carousel").owlCarousel({ 333 items: 1, 334 nav: true, 335 dots: false, 336 autoplay: false, 337 autoWidth: true, 338 navClass: [ 339 "owl-prev basic-ui-icon-left-arrow", 340 "owl-next basic-ui-icon-right-arrow", 341 ], 342 navText: false, 343 margin: 30, 344 responsive: { 345 0: { 346 nav: false, 347 }, 348 480: {}, 349 768: { 350 nav: true, 351 }, 352 }, 353 }); 354 }); 355 } 356 }); 357 358 jQuery(window).on("load resize elementor/frontend/init", function () { 359 jQuery( 360 ".project-horizontal-slider img, .project-horizontal, .project-horizontal-img" 361 ).css( 362 "height", 363 jQuery(window).outerHeight() - 364 jQuery(".header-space:not(.hide)").height() - 365 (jQuery(".site-footer").outerHeight() || 0) - 366 (jQuery("#wpadminbar").outerHeight() || 0) 367 ); 368 jQuery(".project-horizontal .cell").css( 369 "height", 370 jQuery(".project-horizontal").outerHeight() 371 ); 372 }); 373 374 jQuery(".js-pixproof-gallery").each(function () { 375 var $grid = jQuery(this) 376 .addClass("isotope") 377 .isotope({ 378 itemSelector: ".proof-photo" 379 }); 380 }); 381 382 jQuery( 383 ".site-menu-wrap.is-vertical ul li.menu-item-has-children > a, .site-menu-wrap.is-vertical ul li.page_item_has_children > a" 384 ).on("click", function () { 385 jQuery(this).parents().addClass("active-child"); 386 jQuery(this).parents().parents().addClass("hidden-items"); 387 return false; 388 }); 389 390 jQuery('.site-menu-wrap.is-vertical .sub-menu').prepend(jQuery('<div class="sub-menu-back"></div>')); 391 392 jQuery('.site-menu-wrap.is-vertical').on('click', '.sub-menu-back', function () { 393 jQuery(this).parent().parent().removeClass('active-child'); 394 jQuery(this).parent().parent().parent().removeClass('hidden-items'); 395 return false; 396 }); 397});
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.