1/** 2 * 3 * sauron page configuration 4 * 5 */ 6WDWT_PG_page_settings = { 7 /** 8 * page width: desktop, tablet or phone 9 */ 10 width: 'desktop', 11 desktop_size: 1024, 12 tablet_size: 768 13 14} 15 16 17/** 18 * 19 * resize thumbs in gallery according to sizes of their containers 20 * 21 */ 22 23var WDWT_PG_gallery = { 24 25 image_parent_class: 'image_list_itema', 26 standart_size: 300, 27 kaificent: 310 / 370, 28 enable_home: 1, 29 30 31}; 32 33 34/** 35 * 36 * object to rearrange page layout 37 * 38 */ 39 40var WDWT_PG_page_layout = { 41 42 /*refreshes layout according to screen size*/ 43 44 refresh: function () 45 { 46 47 48 49 //################SCREEN 50 if (matchMedia('only screen and (min-width: 1025px)').matches) { 51 this.desktop(); 52 } 53 //################TABLET 54 if (matchMedia('only screen and (min-width: 768px) and (max-width: 1024px)').matches) { 55 this.tablet(); 56 } 57 //################PHONE 58 if (matchMedia('only screen and (max-width : 767px)').matches) { 59 this.phone(false); 60 } 61 62 }, 63 64 /*switch page layout to desktop mode*/ 65 desktop: function () 66 { 67 jQuery('.container').css({width: ''}); 68 jQuery('.container>#content').before(jQuery('.container>#sidebar1')); 69 ; 70 71 if (WDWT_PG_page_settings.width == 'tablet' || WDWT_PG_page_settings.width == 'phone') { 72 jQuery('.phone-menu-block').after(jQuery('#search-block')) 73 } 74 75 76 if (wdwt_fixed_menu == "1" && !jQuery('#header').hasClass('sticky_menu')) { 77 jQuery('#header').css('padding-top', 12); 78 } 79 jQuery('#top-nav').show(); 80 81 wdwt_shorter_body(); 82 this.refresh_lavalamp(); 83 this.resize_iframes(); 84 WDWT_PG_page_settings.width = 'desktop'; 85 86 }, 87 /*switch page layout to tablet mode*/ 88 tablet: function () 89 { 90 /*jQuery('#footer').append(jQuery('#footer-bottom'));*/ 91 /*ttt!!! there is not #footer*/ 92 jQuery('.container').css({width: '97%'}); 93 jQuery('#content, #blog').after(jQuery('#sidebar1')); 94 95 if (WDWT_PG_page_settings.width == 'desktop') { 96 jQuery('.phone-menu-block').before(jQuery('#search-block')); 97 } 98 99 if (wdwt_fixed_menu == "1" && !jQuery('#header').hasClass('sticky_menu')) { 100 jQuery('#header').css('padding-top', 12); 101 } 102 jQuery('#top-nav').show(); 103 WDWT_PG_page_settings.width = 'tablet'; 104 jQuery('#footer').css('top', ''); 105 this.refresh_lavalamp(); 106 this.refresh_sidebar('.sidebar-container'); 107 this.resize_iframes(); 108 109 }, 110 /*switch page layout to phone mode*/ 111 phone: function (full) 112 { 113 jQuery('.container').css({width: ''}); 114 /*jQuery('#footer').append(jQuery('#footer-bottom'));*/ 115 /*ttt!!! there is not #footer*/ 116 if (WDWT_PG_page_settings.width != 'phone') { 117 jQuery('#blog, #content').after(jQuery('#sidebar1')); 118 } 119 if (WDWT_PG_page_settings.width == 'desktop') { 120 jQuery('.phone-menu-block').before(jQuery('#search-block')); 121 } 122 123 jQuery("#header").find("#menu-button-block").remove(); 124 jQuery("#header .phone-menu-block").append('<div id="menu-button-block"><a href="#">Menu</a></div>'); 125 jQuery('#menu-button-block').after(jQuery('#top-nav')); 126 127 128 if (wdwt_fixed_menu == "1" && !jQuery('#header').hasClass('sticky_menu')) { 129 jQuery('#header').css('padding-top', 12); 130 } 131 jQuery('#footer').css('top', ''); 132 this.refresh_lavalamp(); 133 this.refresh_sidebar('.sidebar-container'); 134 this.resize_iframes(); 135 WDWT_PG_page_settings.width = 'phone'; 136 }, 137 138 /*rearrange content of sidebar according to sidebar's width*/ 139 refresh_sidebar: function (sidebar) 140 { 141 jQuery(sidebar).children('.clear:not(:last-child)').remove(); 142 var iner_elements = jQuery(sidebar).children(); 143 var main_width = jQuery(sidebar).width(); 144 var summary_width = 0; 145 for (i = 0; i < iner_elements.length; i++) { 146 summary_width += jQuery(iner_elements[i]).outerWidth(); 147 if (summary_width >= main_width) { 148 jQuery(iner_elements[i]).before('<div class="clear"></div>') 149 summary_width = jQuery(iner_elements[i]).outerWidth(); 150 } 151 } 152 }, 153 resize_iframes: function () 154 { 155 156 var allVideos = jQuery("iframe, object, embed"); 157 158 allVideos.each(function () 159 { 160 161 var el = jQuery(this); 162 fluidParent = el.parent(); 163 var newWidth = fluidParent.width(); 164 165 if (newWidth >= el.attr('data-origWidth')) { 166 newWidth = el.attr('data-origWidth'); 167 } 168 el.width(newWidth) 169 .height(newWidth * el.attr('data-aspectRatio')); 170 171 }); 172 }, 173 refresh_lavalamp: function () 174 { 175 if (!wdwt_is_ios()) { 176 jQuery(".lavalamp-object").remove(); 177 jQuery('#top-nav-list,.top-nav-list >ul').lavalamp({ 178 easing: 'easeOutBack', 179 activeObj: '.current_page_item, .current-menu-item, .current-menu-parent, .current_page_parent', 180 }); 181 } 182 183 } 184 , 185 186 handle_new_elements: function (arrayOfNewElems) 187 { 188 jQuery(arrayOfNewElems).css('opacity', '0'); 189 jQuery(arrayOfNewElems).animate({opacity: 1}, 800); 190 this.refresh(); 191 jQuery('.da-thumbs > div').hoverdir(); 192 jQuery('.do_nathing').click(function () 193 { 194 return false;
195 }); 196 197 198 } 199 200} 201jQuery(document).ready(function () 202{ 203 jQuery('.do_nathing').click(function () 204 { 205 return false; 206 }); 207//var previus_view=document.getElementById('top_posts_web').innerHTML; 208 209 WDWT_PG_page_settings.width = 'desktop'; 210 211 /*keep iframe, video and embed aspect ratios when resizing the window*/ 212 var allVideos = jQuery("iframe, object, embed"); 213 214 allVideos.each(function () 215 { 216 217 var el = jQuery(this); 218 219 jQuery(this) 220 // jQuery .data does not work on object/embed elements 221 .attr('data-aspectRatio', this.height / this.width) 222 .attr('data-origWidth', this.width) 223 .removeAttr('height') 224 .removeAttr('width'); 225 226 }); 227 228 229 if (matchMedia('only screen and (max-width : 767px)').matches) { 230 WDWT_PG_page_layout.phone(); 231 } 232 else 233 if (matchMedia('only screen and (min-width: 768px) and (max-width: 1024px)').matches) { 234 WDWT_PG_page_layout.tablet(); 235 } 236 else { 237 WDWT_PG_page_layout.refresh(); 238 } 239 240 241}); 242 243//alert(jQuery(".container").width()) 244if (jQuery(window).width() < jQuery(".container").width()) 245 jQuery('body').addClass('resize'); 246 247jQuery(window).resize(function () 248{ 249 WDWT_PG_page_layout.refresh(); 250 jQuery('body').addClass('resize'); 251});
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.