1var businessEliteCurSize = 'screen'; 2var business_elite_slider_imgs = []; 3jQuery('document').ready(function(){ 4 jQuery('.cont_vat_tab ul.content > li').filter(function() { return jQuery(this).css("display")!='none'}).addClass('active'); 5 jQuery('#wd-categories-tabs > .tabs > li').eq(0).addClass('active'); 6 sliderHeight = parseInt(jQuery("#slider-wrapper").height()); 7 sliderWidth = parseInt(jQuery("#slider-wrapper").width()); 8 sliderIndex = sliderHeight/sliderWidth; 9 10 /*keep iframe, video and embed aspect ratios when resizing the window*/ 11 var allVideos = jQuery("iframe, object, embed"); 12 13 allVideos.each(function() { 14 15 var el = jQuery(this); 16 17 /* Ignore dynamically sized iframes */ 18 19 if (el[0].style.width === '100%' || el[0].style.height === '100%') { 20 return; 21 } 22 23 var h = Number(this.height); 24 var w = Number(this.width); 25 26 if(h != 0){ 27 jQuery(this)// jQuery .data does not work on object/embed elements 28 .attr('data-aspectRatio', h / w) 29 .attr('data-origWidth', w) 30 .removeAttr('height') 31 .removeAttr('width'); 32 } 33 34 35 }); 36 37 38 39 if(matchMedia('only screen and (max-width : 767px)').matches){ 40 phone(); 41 } 42 else if (matchMedia('only screen and (min-width: 768px) and (max-width: 1024px)').matches){ 43 tablet(); 44 } 45 else{checkMedia();} 46 47 jQuery(window).resize(function(){checkMedia();}); 48 49 /*in phone and tablet modes, menu links with submenu should not work*/ 50 jQuery("body #top-nav > div > ul li.menu-item-has-children>a").on('click', function(){ 51 if(matchMedia('only screen and (max-width : 1024px)').matches){ 52 return false; 53 } 54 }); 55 56 57 function checkMedia(){ 58 //################SCREEN 59 if(matchMedia('only screen and (min-width: 1025px)').matches){screen();} 60 //################TABLET 61 if (matchMedia('only screen and (min-width: 768px) and (max-width: 1024px)').matches){ tablet(); } 62 //################PHONE 63 if(matchMedia('only screen and (max-width : 767px)').matches){ phone(false); } 64 65 /*fix sticky menu after resize if layout has been changed*/ 66 if(jQuery(window).scrollTop()>100 && !jQuery('#top-nav').hasClass('open')) { 67 /*i stycky menu option enabled*/ 68 if(wdwt_sticky_menu == 1){ 69 jQuery( "#header .container, #header" ).addClass('sticky_menu'); 70 sticky_menu(); 71 } 72 73 } 74 } 75 function screen(){ 76 for(ii=0;ii<jQuery('.content-post').length;ii++){ 77 if(ii%2!=0){ 78 jQuery('.content-post > img').eq(ii).before(jQuery('.content-post > div').eq(2*ii+1)); 79 } 80 } 81 82 if(full_width_business_elite == 1){ 83 jQuery("#top-nav-list").css({'text-align':'center'}); 84 } 85 86 sHeight = sliderIndex * parseInt(jQuery("#slider-wrapper").width()); 87 sliderSize(sHeight); 88 wdwt_resize_iframes(); 89 90 if(businessEliteCurSize == 'phone'){ 91 92 jQuery(".hide_on_phone .bwg_slideshow_image").each(function(index, el){ 93 jQuery(this).attr("src",business_elite_slider_imgs[index]); 94 }); 95 if(jQuery("#header-middle img").length) { 96 jQuery("#header .container").prepend(jQuery("#header-middle")); 97 } 98 jQuery("#header-middle").prepend(jQuery("#logo")); 99 jQuery("aside .sidebar-container .widget-area").removeClass("clear"); 100 101 jQuery("#top-nav .sub-menu").css("display",""); 102 jQuery("#top-nav").removeClass("open"); 103 } 104 if(businessEliteCurSize == 'tablet' || businessEliteCurSize == 'phone'){ 105 /*homepage content, others blog*/ 106 jQuery('.container > #content').before(jQuery('#sidebar1')); 107 jQuery('.container > #blog').before(jQuery('#sidebar1')); 108 109 jQuery("#header").find("#menu-button-block").remove(); 110 jQuery("#top-nav").css({"display":"block"}); 111 112 jQuery("#top-nav > div li.addedli").remove(); 113 /*hide submenu in case of window resize and submenu opened*/ 114 jQuery("#top-nav > div li.open > ul").removeAttr('style') 115 jQuery("#top-nav > div li.open").addClass('active').removeClass('open'); 116 117 } 118 119 jQuery('.cont_vat_tab ul.content').height(jQuery('.cont_vat_tab ul.content > li.active').filter(function() { return jQuery(this).css("display") != "none" }).height()); 120 businessEliteCurSize = 'screen'; 121 } 122 function tablet() { 123 if(businessEliteCurSize == 'screen') { 124 /*homepage content, others blog*/ 125 jQuery('.container>#content').after(jQuery('#sidebar1')); 126 jQuery('.container>#blog').after(jQuery('#sidebar1')); 127 } 128 129 if(businessEliteCurSize == 'phone') { 130 jQuery(".hide_on_phone .bwg_slideshow_image").each(function(index, el){ 131 jQuery(this).attr("src",business_elite_slider_imgs[index]); 132 }); 133 if(jQuery("#header-middle img").length) { 134 jQuery("#header .container").prepend(jQuery("#header-middle")); 135 } 136 jQuery("#header").find("#menu-button-block").remove(); 137 jQuery("#top-nav").css({"display":"block"}); 138 jQuery("aside .sidebar-container .widget-area").removeClass("clear"); 139 jQuery("#top-nav .sub-menu").css("display",""); 140 jQuery("#top-nav > div li.open, #top-nav").removeClass('open'); 141 } 142 jQuery('.cont_vat_tab ul.content').height(jQuery('.cont_vat_tab ul.content > li.active').filter(function() { return jQuery(this).css("display") != "none" }).height()) 143
144 sHeight = sliderIndex * parseInt(jQuery("#slider-wrapper").width()); 145 sliderSize(sHeight); 146 wdwt_resize_iframes(); 147 148 if(businessEliteCurSize == 'screen' ) { 149 150 /* TABLET UNIQUE STYLES */ 151 jQuery("#top-nav > div > ul li:has(> ul),#top-nav > div > div > ul li:has(> ul)").each(function() { 152 var strtext = jQuery(this).children("a").html(); 153 var strhref = jQuery(this).children("a").attr("href"); 154 var strlink = '<a href="' + strhref + '">' + strtext + '</a>'; 155 if(typeof strhref != 'undefined'){ 156 jQuery(this).children("ul").prepend('<li class="addedli">' + strlink + '</li>'); 157 } 158 159 jQuery(this).find('.addedli a').each(function(){ 160 menu_elem = this; 161 wdwt_attach_event_addedli(jQuery(this)); 162 wdwt_scrollto_menuitem(menu_elem); 163 }); 164 }); 165 } 166 businessEliteCurSize = 'tablet'; 167 } 168 169 function phone(full) { 170 /*homepage content, others blog*/ 171 jQuery('.container>#content').after(jQuery('#sidebar1')); 172 jQuery('.container>#blog').after(jQuery('#sidebar1')); 173 174 sHeight = sliderIndex * parseInt(jQuery("#slider-wrapper").width()); 175 sliderSize(sHeight); 176 wdwt_resize_iframes(); 177 /* PHONE UNIQUE STYLES */ 178 jQuery("#top-nav > div > ul li.addedli,#top-nav > div > div > ul li.addedli").remove(); 179 jQuery("#top-nav > div > ul li:has(> ul),#top-nav > div > div > ul li:has(> ul)").each(function() { 180 var strtext = jQuery(this).children("a").html(); 181 var strhref = jQuery(this).children("a").attr("href"); 182 var strlink = '<a href="' + strhref + '">' + strtext + '</a>'; 183 if(typeof strhref != 'undefined') { 184 jQuery(this).children("ul").prepend('<li class="addedli">' + strlink + '</li>'); 185 } 186 jQuery(this).find('.addedli a').each(function(){ 187 menu_elem = this; 188 wdwt_attach_event_addedli(jQuery(this)); 189 wdwt_scrollto_menuitem(menu_elem); 190 }); 191 192 }); 193 194 if(businessEliteCurSize != 'phone'){ 195 jQuery(".hide_on_phone .bwg_slideshow_image").each(function(){ 196 business_elite_slider_imgs.push(jQuery(this).attr("src")); 197 jQuery(this).attr("src",""); 198 }); 199 200 jQuery("#header").find("#menu-button-block").remove(); 201 var menu_content = '<div id="menu-button-block" class="title-img"><div id="phone-menu-toggle"></div><span id="trigram-for-heaven"></span></div>'; 202 if(!jQuery("#header-middle img").length) { 203 menu_content = '<div id="menu-button-block"><a href="#">Menu</a><span id="trigram-for-heaven"></span></div>'; 204 } 205 jQuery("#header .phone-menu-block").append(menu_content); 206 if(jQuery("#header-middle img").length) { 207 jQuery("#menu-button-block").prepend(jQuery("#header-middle")); 208 } 209 } 210 for(var i=0;i<jQuery("aside .sidebar-container .widget-area").length;i++){ 211 if (i%2 == 0){jQuery("aside .sidebar-container .widget-area").eq(i).addClass("clear");} 212 } 213 214 if(!jQuery("#top-nav").hasClass("open")){jQuery("#top-nav").css({"display":"none"})}; 215 jQuery('.cont_vat_tab ul.content').height(jQuery('.cont_vat_tab ul.content > li.active').filter(function() { return jQuery(this).css("display") != "none" }).height()) 216 businessEliteCurSize = 'phone'; 217 } 218 function sliderSize(sHeight) { 219 jQuery("#slider-wrapper").css('height',sHeight); 220 } 221 function wdwt_resize_iframes(){ 222 var allVideos = jQuery("iframe, object, embed"); 223 224 allVideos.each(function() { 225 226 var el = jQuery(this); 227 /* Ignore dynamically sized iframes */ 228 229 if (el[0].style.width === '100%' || el[0].style.height === '100%') { 230 return; 231 } 232 233 if(typeof el.attr('data-origWidth') != 'undefined' ){ 234 235 fluidParent = el.parent(); 236 var newWidth = fluidParent.width(); 237 238 if(newWidth >= el.attr('data-origWidth')){ 239 newWidth = el.attr('data-origWidth'); 240 } 241 el.width(newWidth) 242 .height(newWidth * el.attr('data-aspectRatio')); 243 } 244 245 246 }); 247 } 248 249});
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.