1 2function isElementInViewport (el) { 3 if (typeof jQuery === "function" && el instanceof jQuery) { 4 el = el[0]; 5 } 6 var rect = el.getBoundingClientRect(); 7 8 return ( 9 rect.top >= 0 && 10 rect.left >= 0 && 11 rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */ 12 rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */ 13 ); 14} 15 16window.addEvent('domready',function() { 17 if(jQuery(".tylkoglowna").length && location.search!='' && location.search!='?option=com_content&view=featured&Itemid=827' ) { 18 jQuery("#gkMainbodyTop").remove(); 19 } 20}); 21 22jQuery(document).bind('pagebeforeload', function(event, data) { 23 //console.log("dziwne"); 24 if(jQuery(".tylkoglowna").length && location.search!='' && location.search!='?option=com_content&view=featured&Itemid=827' ) { 25 jQuery("#gkMainbodyTop").remove(); 26 } 27}); 28 29jQuery("#gkMainbodyTop").load(function() { 30 if(jQuery(".tylkoglowna").length && location.search!='' && location.search!='?option=com_content&view=featured&Itemid=827' ) { 31 jQuery("#gkMainbodyTop").remove(); 32 } 33}); 34 35jQuery(window).load (function () { 36 37 if(jQuery(".tylkoglowna").length && location.search!='' && location.search!='?option=com_content&view=featured&Itemid=827' ) { 38 jQuery("#gkMainbodyTop").remove(); 39 } 40 41 jQuery(".kratka-intro-left").each(function() { 42 //console.log(jQuery("img",this).width()); 43 if(jQuery("img",this).width() < jQuery(this).width()) { 44 45 jQuery("img",this).css('cssText','width:100% !important; max-height:none !important;'); 46 47 } 48 /*if(jQuery("img",this).) { 49 50 }*/ 51 }); 52 53 54 jqs(".wyroznione-wprowadzenie").dotdotdot({ 55 ellipsis : '... ', 56 height: 180 57 58 }); 59 60 /*if(isElementInViewport(jQuery('#gkContentWrap')) ) { 61 jQuery('aside#gkSidebar').css('height',jQuery('#gkContent').outerHeight()); 62 jQuery('aside#gkInset').css('height',jQuery('#gkContent').outerHeight()); 63 }*/ 64 65 if(jQuery('aside#gkSidebar').outerHeight() > jQuery('#gkContent').outerHeight() ) { 66 console.log("wystrzal"); 67 jQuery('#gkContent').css('height',jQuery('aside#gkSidebar').outerHeight()); 68 } 69 //rownam wewnetrzny element gkcontentu 70 if(jQuery('#gkContent').outerHeight()> jQuery('#gkContentWrap').outerHeight()) { 71 jQuery('#gkContentWrap').css('height',jQuery('#gkContent').outerHeight()); 72 } 73 74 //jQuery('aside#gkInset').css('width',jQuery('aside#gkInset').width()); 75 76 if(jQuery('#wraperSidebara').length) { 77 //jQuery('#wraperSidebara').css('width',jQuery('#wraperSidebara')[0].getBoundingClientRect().width); 78 } 79 //ustawiam wysokosc modulow bocznych... 80 if(jQuery('aside#gkInset').outerHeight() < jQuery('#wraperSidebara').outerHeight() ) { 81 jQuery('aside#gkInset').css('height',jQuery('#wraperSidebara').outerHeight()); 82 } 83 else { 84 jQuery('#wraperSidebara').css('height',jQuery('aside#gkInset').outerHeight()); 85 } 86 87 if(jQuery("#gkContentWrap").outerHeight() < jQuery('#gkMainbody').outerHeight()) { 88 jQuery("#gkContentWrap").css('height',''); 89 } 90 91}); 92 93jQuery(document).ready(function(){ 94 95 jQuery("#gkSidebar").wrapInner("<div id=\"wraperSidebara\"></div>"); 96 97 //rownam szerokosc gksidebara do wysokosci main contentu 98 if(isElementInViewport(jQuery('#gkContentWrap')) ) { 99 jQuery('aside#gkSidebar').css('height',jQuery('#gkContent').outerHeight()); //zmiana 27.04 to jest zbedne teraz, ale zachowuje na wszelki wypadek 100 jQuery('aside#gkInset').css('height',jQuery('#gkContent').outerHeight()); 101 } 102 103 if(jQuery('aside#gkSidebar').outerHeight() > jQuery('#gkContent').outerHeight()) { 104 jQuery('#gkContent').css('height',jQuery('aside#gkSidebar').outerHeight()); 105 } 106 107 //gdyby glowny content byl wiekszy niz to co jest w srodku ( i dostarcza biale tlo) 108 if(jQuery('#gkContent').outerHeight()> jQuery('#gkContentWrap').outerHeight()) { 109 jQuery('#gkContentWrap').css('height',jQuery('#gkContent').outerHeight()); 110 } 111//znowu gdyby artykul przerosl swojego rodzica. 112 if(jQuery("#gkContentWrap").outerHeight() < jQuery('#gkMainbody').outerHeight()) { 113 jQuery("#gkContentWrap").css('height',''); 114 } 115 116setInterval(function() { 117 if(jQuery("#gkContentWrap").outerHeight() < jQuery('#gkMainbody').outerHeight()) { 118 jQuery("#gkContentWrap").css('height',''); 119 } 120 if(isElementInViewport(jQuery('#gkContentWrap')) ) { 121 jQuery('aside#gkSidebar').css('height',jQuery('#gkContent').outerHeight()); //zmiana 27.04 to jest zbedne teraz, ale zachowuje na wszelki wypadek 122 jQuery('aside#gkInset').css('height',jQuery('#gkContent').outerHeight()); 123 } 124 125 126},1000); 127 128 129//modyfikuje szerokosc playera youtubowego coby nie defaultowal sie do 320 pixli 130 jQuery("#gkSidebar .avPlayerBlock >
130 iframe").css("cssText","min-width: 20px !important"); 131 jQuery(".filmyomiescie .avPlayerBlock > iframe").css("cssText","min-width: 20px !important"); 132 //jQuery('aside#gkInset').css('width',jQuery('aside#gkInset').width()); 133 134 if(jQuery('#wraperSidebara').length) { 135 136 //jQuery('aside#gkSidebar').css('width',jQuery('aside#gkSidebar')[0].getBoundingClientRect().width); 137 } 138 //ustawiam wysokosc modulow bocznych... 139 if(jQuery('aside#gkInset').outerHeight() < jQuery('#wraperSidebara').outerHeight() ) { 140 jQuery('aside#gkInset').css('height',jQuery('#wraperSidebara').outerHeight()); 141 } 142 else { 143 jQuery('#wraperSidebara').css('height',jQuery('aside#gkInset').outerHeight()); 144 } 145 146//jezdzacy lewy modul // i prawy 147 148/* 149 150 151 jQuery(window).scroll(function () { 152 var scrollTop = jQuery(window).scrollTop(), 153 elementOffset = jQuery('body').offset().top, 154 distance = (elementOffset - scrollTop); 155 console.log (distance); 156 if(distance<(-105) && jQuery('aside#gkInset').outerHeight() < jQuery('#gkContent').outerHeight() ) { 157 jQuery("#gkInset").css({position:"fixed", top:"0px"}); 158 jQuery("#wraperSidebara").css({position:"fixed", top:"0px"}); 159 } 160 else { 161 jQuery("#gkInset").css({position:"static", top:"0px"}); 162 jQuery("#wraperSidebara").css({position:"static", top:"0px"}); 163 } 164 }); 165*/ 166 167 //jQuery(".glogowlive").find("img") 168 169 jqs("a.kamerka").has("img").css({'display':'block','overflow':'hidden','height':'220'}); 170 171 jqs("a.kamerka").fancybox({ 172 type: 'iframe', 173 autoSize: false, 174 beforeLoad : function() { 175 this.width = 1200; 176 this.height = 850; 177 } 178 }); 179 180 //jQuery(".blog .article_column > div > p span").find("span").contents().unwrap(); 181 jQuery(".blog .article_column > div > p span").replaceWith(jQuery(".blog .article_column > div > p span").html()); 182 jQuery(".blog .article_column > div > p").find("a[rel]").wrap("<p class='zdjecieNoFloat'></p>"); 183 jQuery(".blog .article_column > div > p:nth-of-type(1)").addClass("erteel"); 184 //var humm = jQuery(".blog .article_column p:has('a')").text(); 185 186 jQuery(".blog .article_column > div > p:nth-of-type(1)").contents().each(function() { 187 if (this.nodeType == 3 && jQuery.trim(this.nodeValue) != '') { 188 jQuery(this).wrap('<p class="tekstFloat"></p>'); 189 return 1; 190 } 191 }); 192 jQuery(".blog .article_column p:has('a') br").remove(); 193 jQuery(".zdjecieNoFloat").after('<div class="clearboth"></div>'); 194 195 //dodajÄ link powrotu do galerii folderów miejskich 196 197 jQuery(".flash_text").html('<a class="powrocik" href="#" onclick="history.go(-1)">Powrót do poprzedniej strony</a>'); 198 199 /********************************************************************************/ 200 jQuery(function() { 201 var $mybook = jQuery('#mybook'); 202 var $bttn_next = jQuery('#next_page_button'); 203 var $bttn_prev = jQuery('#prev_page_button'); 204 var $loading = jQuery('#loading'); 205 var $mybook_images = $mybook.find('img'); 206 var cnt_images = $mybook_images.length; 207 var loaded = 0; 208 209 $mybook_images.each(function(){ 210 var $img = jQuery(this); 211 var source = $img.attr('src'); 212 jQuery('<img/>').load(function(){ 213 ++loaded; 214 if(loaded == cnt_images){ 215 $loading.hide(); 216 $bttn_next.show(); 217 $bttn_prev.show(); 218 $mybook.show().booklet({ 219 name: null, width: 800, height: 500, speed: 600, direction: 'LTR', startingPage: 0, easing: 'easeInOutQuad', easeIn: 'easeInQuad', 220 easeOut: 'easeOutQuad', closed: true, closedFrontTitle: null, closedFrontChapter: null, closedBackTitle: null, closedBackChapter: null, 221 covers: false, pagePadding: 10, pageNumbers: true, hovers: false, overlays: false, tabs: false, tabWidth: 60, tabHeight: 20, arrows: false, cursor: 'pointer', 222 hash: false, keyboard: true, next: $bttn_next, prev: $bttn_prev, menu: null, pageSelector: false, 223 chapterSelector: false, shadows: true, shadowTopFwdWidth: 166, shadowTopBackWidth: 166, shadowBtmWidth: 50, 224 before: function(){}, 225 after: function(){} 226 }); 227 } 228 }).attr('src',source); 229 }); 230 231 }); 232//poszerzam bloki gdyby nie pojawil sie gkSidebar 233 if(jQuery('aside#gkSidebar').length == 0) { 234 jQuery('#gkInset').css('width','21%'); 235 //jQuery('#gkContentWrap').css('width','971px'); 236 jQuery('#gkContentWrap').css('width','79%'); 237 jQuery('#gkContent').attr('style','background-position: 21% 0 !important'); 238 } 239 240 241});
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.