1/* 2 Author: Igor Sunzharovskyi 3 Author URI: https://wpsoul.com 4*/ 5 6function reshowNav(){'use strict'; jQuery(this).addClass('hovered'); } 7function rehideNav(){'use strict'; jQuery(this).removeClass('hovered');} 8/*Throttle option*/ 9(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); 10 11 12var re_main_search = { 13 14 init: function init() { 15 16 // Search icon show/hide 17 jQuery(document).on( 'click', '.icon-search-onclick', function(e) { 18 e.preventDefault(); 19 e.stopPropagation(); 20 document.getElementById('rhSplashSearch').classList.toggle( 'top-search-onclick-open' ); 21 document.getElementById('rhSplashSearch').classList.toggle( 'css-ani-trigger' ); 22 }); 23 24 jQuery(document).on("click", function(e){ 25 if( jQuery(e.target).closest(".head_search").length || jQuery(e.target).closest(".custom_search_box").length) 26 return; 27 jQuery( '.re-aj-search-wrap' ).removeClass( 're-aj-search-open' ).empty(); 28 e.stopPropagation(); 29 }); 30 31 jQuery(document).on( 'click', '#close-src-splash', function(e) { 32 document.getElementById('rhSplashSearch').classList.remove('top-search-onclick-open'); 33 document.getElementById('rhSplashSearch').classList.remove('css-ani-trigger'); 34 }); 35 36 } 37}; 38 39//MOBILE MENU AND MEGAMENU 40var NavOverlayRemoved = true; 41var revMenuStyle = function() { 42 var menu = jQuery('#rhslidingMenu'), 43 openMenu = jQuery('#dl-trigger'), 44 navMenu = jQuery('#slide-menu-mobile'), 45 menuList = jQuery('#slide-menu-mobile > .menu'), 46 subMenu = menu.find('.sub-menu'), 47 mobilecustomheader = jQuery('#rhmobpnlcustom'), 48 mobsidebar = jQuery('#rh_woo_mbl_sidebar'), 49 mobsidebartrigger = jQuery('#mobile-trigger-sidebar'); 50 menuList.addClass('off-canvas'); 51 if (menuList.find('.close-menu').length === 0) { 52 menuList.append('<li class="close-menu rh-close-btn position-relative text-center cursorpointer rh-circular-hover mt10 mb10 margincenter"><span><i class="rhicon rhi-times whitebg roundborder50p rh-shadow4 abdposleft" aria-hidden="true"></i></span></li>'); 53 } 54 if(mobilecustomheader.length > 0){ 55 menuList.prepend('<li id="mobtopheaderpnl">'+mobilecustomheader.html()+'</li>'); 56 } 57 jQuery('#slide-menu-mobile .menu-item-has-children').children('a').after('<span class="submenu-toggle text-center cursorpointer blackcolor"><i class="rhicon rhi-angle-right"></i></span>'); 58 jQuery('#slide-menu-mobile .menu-item-has-children:not(.rh-mobile-linkable)').children('a').addClass('submenu-toggle'); 59 menuList.on('click', '.submenu-toggle', function(evt) { 60 evt.preventDefault(); 61 jQuery(this) 62 .siblings('.sub-menu') 63 .addClass('sub-menu-active'); 64 }); 65 subMenu.each(function() { 66 var $this = jQuery(this); 67 if ($this.find('.back-mb').length === 0) { 68 $this.prepend('<li class="back-mb"><span class="rehub-main-color"><i class="rhicon rhi-chevron-left mr10"></i> '+rhscriptvars.back+'</span></li>'); 69 } 70 menu.on('click', '.back-mb span', function(evt) { 71 evt.preventDefault(); 72 jQuery(this) 73 .parent() 74 .parent() 75 .removeClass('sub-menu-active'); 76 }); 77 }); 78 openMenu.on('click', function(e) { 79 e.preventDefault(); 80 e.stopPropagation(); 81 jQuery('#wpadminbar').css('z-index', '999'); 82 document.querySelector('.rh-outer-wrap').classList.add('rh-outer-wrap-move'); 83 navMenu.fadeIn(100); 84 menuList.addClass('off-canvas-active'); 85 jQuery(this).addClass('toggle-active'); 86 if(NavOverlayRemoved){ 87 jQuery('body').append(jQuery('<div class="offsetnav-overlay"></div>').hide().fadeIn()); 88 NavOverlayRemoved = false; 89 } 90 });
91 mobsidebartrigger.on('click', function(e) { 92 e.preventDefault(); 93 e.stopPropagation(); 94 mobsidebar.toggleClass('activeslide'); 95 if(NavOverlayRemoved){ 96 jQuery('body').append(jQuery('<div class="offsetnav-overlay"></div>').hide().fadeIn()); 97 NavOverlayRemoved = false; 98 } 99 }); 100 jQuery(document).on('click touchstart', '.close-menu, .offsetnav-overlay', function(event) { 101 //event.preventDefault(); 102 event.stopPropagation(); 103 setTimeout(function(){ 104 document.querySelector('.rh-outer-wrap').classList.remove('rh-outer-wrap-move'); 105 menuList.removeClass('off-canvas-active'); 106 openMenu.removeClass('toggle-active'); 107 jQuery('.sub-menu').removeClass('sub-menu-active'); 108 mobsidebar.removeClass('activeslide'); 109 if(!NavOverlayRemoved){ 110 jQuery('.offsetnav-overlay').remove(); 111 NavOverlayRemoved = true; 112 } 113 return false; 114 }, 100); 115 }); 116} 117 118jQuery(document).ready(function($) { 119 'use strict'; 120 121 /* better alerts*/ 122 (function(){$.simplyToast=function(e,t,n){function u(){$.simplyToast.remove(o)}n=$.extend(true,{},$.simplyToast.defaultOptions,n);var r='<div class="simply-toast rh-toast rh-toast-'+(t?t:n.type)+" "+(n.customClass?n.customClass:"")+'">';if(n.allowDismiss)r+='<span class="rh-toast-close" data-dismiss="alert">×</span>';r+=e;r+="</div>";var i=n.offset.amount;$(".simply-toast").each(function(){return i=Math.max(i,parseInt($(this).css(n.offset.from))+this.offsetHeight+n.spacing)});var s={position:n.appendTo==="body"?"fixed":"absolute",margin:0,"z-index":"999999",display:"none","min-width":n.minWidth,"max-width":n.maxWidth};s[n.offset.from]=i+"px";var o=$(r).css(s).appendTo(n.appendTo);switch(n.align){case"center":o.css({left:"50%","margin-left":"-"+o.outerWidth()/2+"px"});break;case"left":o.css("left","20px");break;default:o.css("right","20px")}if(o.fadeIn)o.fadeIn();else o.css({display:"block",opacity:1});if(n.delay>0){setTimeout(u,n.delay)}o.find('[data-dismiss="alert"]').removeAttr("data-dismiss").click(u);return o};$.simplyToast.remove=function(e){if(e.fadeOut){return e.fadeOut(function(){return e.remove()})}else{return e.remove()}};$.simplyToast.defaultOptions={appendTo:"body",customClass:false,type:"info",offset:{from:"top",amount:20},align:"right",minWidth:250,maxWidth:450,delay:4e3,allowDismiss:true,spacing:10}})(); 123 124 // Header and menu 125 var res_nav = $("#main_header .top_menu").html(); 126 $("#slide-menu-mobile").html(res_nav); 127 if ($('#re_menu_near_logo').length > 0) { 128 var header_responsive_menu = $("#re_menu_near_logo ul").html(); 129 $("#slide-menu-mobile ul.menu").append(header_responsive_menu); 130 } 131 if ($('#main_header .top-nav ul.menu').length > 0) { 132 var header_top_menu_add = $("#main_header .top-nav ul.menu").html(); 133 $("#slide-menu-mobile ul.menu").append(header_top_menu_add); 134 } 135 if ($('#main_header .top_custom_content').length > 0) { 136 var header_top_menu_add = $("#main_header .top_custom_content").html(); 137 $("#slide-menu-mobile ul.menu").append('<li><div class="pt15 pb15 pl15 pr15 top_custom_content_mobile font80">'+header_top_menu_add+'</div></li>'); 138 } 139 const rhtoolicons = document.getElementById("rhNavToolbar"); 140 const rhtooldiv = "<div class='rh-flex-center-align rh-flex-grow1 rh-flex-justify-center'></div>"; 141 if ($('.rh_woocartmenu_cell').length > 0) { 142 let prep = $(".rh_woocartmenu_cell").html(); 143 if(rhtoolicons){ 144 rhtoolicons.insertAdjacentHTML('afterbegin', rhtooldiv.replace("div", "div id='rhWoocartTool'")); 145 $( "#rhWoocartTool" ).prepend(prep); 146 }else{ 147 $( "#main_header .responsive_nav_wrap #mobile-menu-icons" ).append(prep); 148 } 149 } 150 const mobileinmenu = document.querySelectorAll('.mobileinmenu'); 151 if(mobileinmenu.length){ 152 if(rhtoolicons){ 153 mobileinmenu.forEach((item, index)=>{ 154 let clone = item.cloneNode(true); 155 let toolwrap = rhtooldiv.replace("div", "div id='rhToolicon"+index+"'"); 156 rhtoolicons.insertAdjacentHTML('afterbegin', toolwrap); 157 document.getElementById("rhToolicon"+index+"").prepend(clone); 158 }); 159 }else{ 160 $( "#main_header .responsive_nav_wrap #mobile-menu-icons" ).append( $(".logo-section .mobileinmenu").clone());
161 var mobilelogo = document.querySelector("a.logo_image_mobile img"); 162 if(mobilelogo !== null){ 163 if(document.body.classList.contains('rtl')){ 164 mobilelogo.setAttribute("style", "right:55px; left:auto; transform:none;"); 165 }else{ 166 mobilelogo.setAttribute("style", "left:55px; transform:none;"); 167 } 168 } 169 } 170 } 171 if ($('#logo_mobile_wrapper').length > 0) { 172 $( ".responsive_nav_wrap #dl-trigger" ).after($('#logo_mobile_wrapper').html() ); 173 $( ".logo_image_insticky, header .logo" ).addClass('hideontablet'); 174 } 175 if ($('.main-nav .logo-inmenu').length > 0) { 176 $( "#main_header .responsive_nav_wrap #dl-menu .menu-item.logo-inmenu" ).remove(); 177 } 178 179 $("nav.top_menu > ul li.menu-item-has-children").hoverIntent({ 180 over: reshowNav, 181 out: rehideNav, 182 timeout: 120, 183 interval: 100 184 }); 185 186 $("#main_header .top-nav > ul li.menu-item-has-children").hoverIntent({ 187 over: reshowNav, 188 out: rehideNav, 189 timeout: 120, 190 interval: 100 191 }); 192 193 revMenuStyle(); 194 re_main_search.init(); 195 196 /* scroll to # */ 197 $(document).on('click','.rehub_scroll, #kcmenu a, .kc-gotop', function (e) { 198 e.preventDefault(); 199 if (typeof $(this).data('scrollto') !== 'undefined') { 200 var target = $(this).data('scrollto'); 201 var hash = $(this).data('scrollto'); 202 } 203 else { 204 var target = $(this.hash + ', a[name="'+ this.hash.replace(/#/,"") +'"]').first(); 205 var hash = this.hash; 206 } 207 208 var $target = $(target); 209 if($target.length !==0){ 210 $('html, body').stop().animate({ 211 'scrollTop': $target.offset().top - 45 212 }, 500, 'swing', function () { 213 if(history.pushState) { 214 history.pushState(null, null, hash); 215 } 216 else { 217 window.location.hash = hash; 218 } 219 }); 220 } 221 }); 222 223 /*bar*/ 224 if($('.wpsm-bar').length > 0){ 225 $('.wpsm-bar').each(function(){ 226 $(this).find('.wpsm-bar-bar').animate({ width: $(this).attr('data-percent') }, 1500 ); 227 }); 228 } 229 230 if($(".countdown_dashboard").length > 0){ 231 $(".countdown_dashboard").each(function(){ 232 $(this).show(); 233 var id = $(this).attr("id"); 234 var day = $(this).attr("data-day"); 235 var month = $(this).attr("data-month"); 236 var year = $(this).attr("data-year"); 237 var hour = $(this).attr("data-hour"); 238 var min = $(this).attr("data-min"); 239 //var curtime = $(this).attr("data-currenttime"); 240 $(this).countDown({ 241 targetDate: { 242 "day": day, 243 "month": month, 244 "year": year, 245 "hour": hour, 246 "min": min, 247 "sec": 0 248 }, 249 //currenttime: curtime, 250 omitWeeks: true, 251 onComplete: function() { $("#"+ id).hide() } 252 }); 253 }); 254 } 255 256 /* offer archive dropdown */ 257 $(document).on('click', '.r_offer_details .r_show_hide', function(e){ 258 let element = $(this).closest('.r_offer_details').find('.open_dls_onclk'); 259 if(!element.hasClass('rh_collapse_in')){ 260 let y = element.position().top + window.scrollY - 50; 261 window.scroll({ 262 top: y, 263 behavior: 'smooth' 264 }); 265 } 266 element.toggleClass('rh_collapse_in'); 267 $(this).closest('.r_offer_details').find('.hide_dls_onclk').toggleClass('rhhidden'); 268 $(this).toggleClass('r_show_active'); 269 }); 270 271 //close the sliding panel 272 $('.rh-sslide-panel').on('click', function(event){ 273 if( $(event.target).is('.rh-sslide-panel') || $(event.target).is('.rh-sslide-close-btn') ) { 274 $('.rh-sslide-panel').removeClass('active'); 275 $('.rh-sslide-panel').find('.widget_shopping_cart').html(""); 276 event.preventDefault(); 277 } 278 }); 279 280 /* responsive video*/ 281 $('.rh-container').find( 'iframe[src*="player.vimeo.com"], iframe[src*="youtube.com"]' ).each( function() { 282 var $video = $(this); 283 if ( $video.parents( 'object' ).length ) return; 284 if ($video.parent().hasClass('rhpb-video-wrapper')) return; 285 if ($video.parent().hasClass('video-container')) return; 286 if ($video.parent().hasClass('wp-block-embed__wrapper')) return; 287 if ($video.parent().parent().hasClass('slides')) return; 288 if ( ! $video.prop( 'id' ) ) $video.attr( 'id', 'rvw' + Math.floor( Math.random() * 999999 ) ); 289 $video.wrap( '<div class="video-container"></div>'); 290 }); 291 292 // Coupon Modal 293 $(document).on("click", ".masked_coupon:not(.expired_coupon)", function(e){
294 e.preventDefault(); 295 var $this = $(this); 296 var codeid = $this.data('codeid'); 297 var codetext = $this.data('codetext'); 298 var issearch = window.location.search; 299 if(issearch){ 300 var codeidtext = "&codeid="; 301 var codetexttext = "&codetext="; 302 if (typeof URLSearchParams !== 'undefined') { 303 let params = new URLSearchParams(issearch.substring(1)); 304 params.delete('codeid'); 305 params.delete('codetext'); 306 issearch = '?' + params.toString(); 307 } 308 }else{ 309 var codeidtext = "?codeid="; 310 var codetexttext = "?codetext="; 311 } 312 if (typeof $this.data('codeid') !== 'undefined') {var couponpage = window.location.pathname + issearch + codeidtext + codeid;} 313 if (typeof $this.data('codetext') !== 'undefined') {var couponpage = window.location.pathname + issearch + codetexttext + codetext;} 314 var couponcode = $this.data('clipboard-text'); 315 var destination = $this.data('dest'); 316 window.open(couponpage); 317 if( destination != "" || destination != "#" ){ 318 window.location.href= destination; 319 } 320 }); 321 322 if($('#coupon_code_in_modal').length > 0){ 323 var codeid = $('#coupon_code_in_modal').data('couponid'); 324 var $change_code = $(".rehub_offer_coupon.masked_coupon:not(.expired_coupon)[data-codeid='" + codeid + "']"); 325 var couponcode = $change_code.data("clipboard-text"); 326 $change_code.removeClass("rh-deal-compact-btn masked_coupon woo_loop_btn coupon_btn btn_offer_block wpsm-button").addClass("not_masked_coupon").html( "<i class=\'rhicon rhi-scissors fa-rotate-180\'></i><span class=\'coupon_text\'>"+ couponcode +"</span>" ); 327 $change_code.closest(".reveal_enabled").removeClass("reveal_enabled"); 328 $.pgwModal({ 329 titleBar: false, 330 maxWidth: 650, 331 target: "#coupon_code_in_modal", 332 mainClassName : "pgwModal coupon-reveal-popup", 333 }); 334 } 335 336 $(document).on("click", "a.not_masked_coupon", function(e){ 337 e.preventDefault(); 338 }); 339 340 $(document).on("click", ".csspopuptrigger", function(e){ 341 e.preventDefault(); 342 var destination = '#' + $(this).data('popup'); 343 $(destination).toggleClass('active'); 344 $('body').addClass('flowhidden'); 345 }); 346 347 $(document).on("click", ".csspopup .cpopupclose", function(e){ 348 e.preventDefault(); 349 $(this).closest('.csspopup').removeClass('active'); 350 $('body').removeClass('flowhidden'); 351 }); 352 353 $(document).on("click", ".toggle-this-table", function(e){ 354 e.preventDefault(); 355 $(this).closest('.rh-tabletext-block').toggleClass('closedtable'); 356 }); 357 358 if($(".rehub_offer_coupon.masked_coupon.expired_coupon").length > 0){ 359 $(".rehub_offer_coupon.masked_coupon.expired_coupon").each(function() { 360 var couponcode = $(this).data('clipboard-text'); 361 $(this).removeClass('masked_coupon woo_loop_btn coupon_btn btn_offer_block wpsm-button').addClass('not_masked_coupon').text(couponcode); 362 $(this).closest('.reveal_enabled').removeClass('reveal_enabled'); 363 }); 364 } 365 366 //external links 367 $('.ext-source').replaceWith(function(){ 368 return '<a href="' + $(this).data('dest') + '" target="_blank" rel="nofollow sponsored">' + $(this).html() + '</a>'; 369 }); 370 371 $('.int-source').replaceWith(function(){ 372 return '<a href="' + $(this).data('dest') + '">' + $(this).html() + '</a>'; 373 }); 374
375 //Sharing popups JS 376 jQuery(document).on( 'click', '.share-link-image', function( event ) { 377 var href = jQuery( this ).data( "href" ), 378 service = jQuery( this ).data( 'service' ), 379 width = 'pinterest' == service ? 750 : 600, 380 height = 'twitter' == service ? 250 : 'pinterest' == service ? 320 : 300, 381 top = ( screen.height / 2 ) - height / 2, 382 left = ( screen.width / 2 ) - width / 2; 383 var options = 'top=' + top + ',left=' + left + ',width=' + width + ',height=' + height; 384 event.preventDefault(); 385 event.stopPropagation(); 386 window.open( href, service, options ); 387 }); 388 389 // Search icon show/hide 390 $(window).on("resize", function(){ 391 var w = $(window).width(); 392 if (w > 1023){ 393 $('#slide-menu-mobile').hide(); 394 $('.offsetnav-overlay').hide(); 395 } 396 }); 397 398}); //END Document.ready 399 400// Rate bar annimation 401jQuery(function($){ 402'use strict'; 403 $(document).ready(function(){ 404 $(document).on('inview', '.rate_bar_wrap', function(event, visible) { 405 if (visible) { 406 $('.rate-bar').each(function(){ 407 $(this).find('.rate-bar-bar').animate({ width: $(this).attr('data-percent') }, 1500 ); 408 }); 409 $(document).off('inview', '.rate_bar_wrap'); 410 } 411 }); 412 413 $(document).on('inview', '.review_visible_circle, .top_table_block, .top_chart', function(event, visible) { 414 if (visible) { 415 $('.radial-progress').each(function(){ 416 $(this).find('.circle .mask.full, .circle .fill:not(.fix)').animate({ borderSpacing: $(this).attr('data-rating')*18 }, { 417 step: function(now,fx) { 418 $(this).css('-webkit-transform','rotate('+now+'deg)'); 419 $(this).css('-moz-transform','rotate('+now+'deg)'); 420 $(this).css('transform','rotate('+now+'deg)'); 421 }, 422 duration:'slow' 423 },'linear'); 424 425 $(this).find('.circle .fill.fix').animate({ borderSpacing: $(this).attr('data-rating')*36 }, { 426 step: function(now,fx) { 427 $(this).css('-webkit-transform','rotate('+now+'deg)'); 428 $(this).css('-moz-transform','rotate('+now+'deg)'); 429 $(this).css('transform','rotate('+now+'deg)'); 430 }, 431 duration:'slow' 432 },'linear'); 433 434 }); 435 } 436 }); 437 438 }); 439}); 440 441 442//Scroll To top 443if(jQuery('.post-inner').length > 0){ 444 var postheight = jQuery('.post-inner').height() + jQuery('#main_header').height() - 100; 445 jQuery(window).on('scroll', jQuery.throttle( 250, function(){ 446 'use strict'; 447 448 if (jQuery(this).scrollTop() > 500) { 449 jQuery('#topcontrol, #float-posts-nav').addClass('scrollvisible'); 450 } else { 451 jQuery('#topcontrol').removeClass('scrollvisible'); 452 jQuery('#float-posts-nav').removeClass('scrollvisible'); 453 } 454 if (jQuery(this).scrollTop() > postheight) { 455 jQuery('#float-posts-nav').addClass('openedprevnext'); 456 } else { 457 jQuery('#float-posts-nav').removeClass('openedprevnext'); 458 } 459 460 })); 461}
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.