1jQuery(document).ready(function() { 2 jQuery('p').each(function() { 3 var $this = jQuery(this); 4 if($this.html().replace(/\s| /g, '').length == 0) 5 $this.remove(); 6 }); 7 jQuery(function($){ 8 $('.matchheight').matchHeight(); 9 }); 10 jQuery('.login').on('click', function () { 11 jQuery('#login-form').slideToggle('slow'); 12 }); 13 jQuery('.login').on('click', function () { 14 jQuery('#mobile-login-form').slideToggle('slow'); 15 }); 16 jQuery('.bxslider').bxSlider(); 17 jQuery('.essb_item a').on('click', function() { 18 sl_share_popup_close(); 19 }); 20 jQuery(".sl-share-popup-shadow").hide(); 21 jQuery('.sl-like-logged-out').on('click', function() { 22 if (jQuery(this).parent().children( ".like-login" ).hasClass("sl-hide")) { 23 jQuery(this).parent().children( ".like-login" ).removeClass("sl-hide"); 24 } else { 25 jQuery(this).parent().children( ".like-login" ).addClass("sl-hide"); 26 } 27 }); 28 window.addEventListener('scroll', function(e){ 29 var distanceY = window.pageYOffset || document.documentElement.scrollTop, 30 shrinkOn = 60, 31 header = document.querySelector("header"); 32 if (distanceY > shrinkOn) { 33 jQuery("#header").addClass("smaller"); 34 } else { 35 if (jQuery("#header").hasClass("smaller")) { 36 jQuery("#header").removeClass("smaller"); 37 } 38 } 39 }); 40}); 41 jQuery('.toggle-sl').click(function () { 42 jQuery('.handheld-navigation').fadeToggle(200); 43}); 44 jQuery('.menu-item-has-children').click(function () { 45 jQuery('.sub-menu').fadeToggle(200); 46}); 47 48var sl_share_popup_close = function() { 49 jQuery(".sl-share-popup").fadeOut(200); 50 jQuery(".sl-share-popup-shadow").fadeOut(400); 51} 52 53var sl_share_popup_show = function() { 54 jQuery.fn.extend({ 55 center: function () { 56 return this.each(function() { 57 var top = (jQuery(window).height() - jQuery(this).outerHeight()) / 2; 58 var left = (jQuery(window).width() - jQuery(this).outerWidth()) / 2; 59 jQuery(this).css({position:'fixed', margin:0, top: (top > 0 ? top : 0)+'px', left: (left > 0 ? left : 0)+'px'}); 60 }); 61 } 62 }); 63 64 var element = jQuery('.sl-share-popup'); 65 if (!element.length) { return; } 66 67 var popWidth = jQuery(element).attr("data-width") || ""; 68 var popHideOnClose = jQuery(element).attr("data-close-hide") || ""; 69 var popHideOnCloseAll = jQuery(element).attr("data-close-hide-all") || ""; 70 var popPostId = jQuery(element).attr("data-postid") || ""; 71 72 var popAutoCloseAfter = jQuery(element).attr("data-close-after") || ""; 73 74 if (popHideOnClose == "1" || popHideOnCloseAll == "1") { 75 var cookie_name = ""; 76 var base_cookie_name = "essb_popup_"; 77 if (popHideOnClose == "1") { 78 cookie_name = base_cookie_name + popPostId; 79 80 var cookieSet = essbGetCookie(cookie_name); 81 if (cookieSet == "yes") { return; } 82 essbSetCookie(cookie_name, "yes", 7); 83 } 84 if (popHideOnCloseAll == "1") { 85 cookie_name = base_cookie_name + "all"; 86 87 var cookieSet = essbGetCookie(cookie_name); 88 //console.log("cookie exist all =" + cookieSet); 89 if (cookieSet == "yes") { return; } 90 essbSetCookie(cookie_name, "yes", 7); 91 } 92 } 93 94 var win_width = jQuery( window ).width(); 95 var doc_height = jQuery('document').height(); 96 97 var base_width = 800; 98 var userwidth = popWidth; 99 if (Number(userwidth) && Number(userwidth) > 0) { 100 base_width = userwidth; 101 } 102 103 if (win_width < base_width) { base_width = win_width - 60; } 104 105 // automatically close 106 if (Number(popAutoCloseAfter) && Number(popAutoCloseAfter) > 0) { 107 shortly = new Date(); 108 var user_message = jQuery('#essb_settings_popup_user_autoclose').text(); 109 if (user_message == '') { 110 user_message = "Window will automatically close in "; 111 } 112 shortly.setSeconds(shortly.getSeconds() + Number(popAutoCloseAfter)); 113 jQuery('.essb_popup_counter_text').countdown({until: shortly, onExpiry: essb_popup_close, "layout" : user_message + " {sn} {sl}"}); 114 } 115 116 jQuery(".sl-share-popup").css( { width: base_width+'px'}); 117 jQuery(".sl-share-popup").center(); 118 119 jQuery(".sl-share-popup").fadeIn(400); 120 jQuery(".sl-share-popup-shadow").fadeIn(200); 121 122 123 124 125}
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.