1var wrapperWidth = 990; 2var background = 0; 3 4var baseUrl = location.protocol + '//' + location.hostname; 5 6var jsonProxy = baseUrl + "/api-kfv-hn/"; 7 8// var jsonProxy = "https://testweb1.heilbronn.de/api-kfv-hn/"; 9 10jQuery(document).ready(function(){ 11 setTimeout(function () { 12 menuItems(); 13 }, 20); 14 15 jQuery('html').fadeTo('slow', 1); 16 17/* 18 jQuery('.zoom.Up a').click(function(event){ 19 event.preventDefault(); 20 var e = false; 21 var e = jQuery.Event('keydown'); 22 e.which = 43; 23 e.ctrlKey = true; 24 jQuery(this).trigger(e); 25 //console.log(e); 26 }); 27*/ 28// //console.log(document.styleSheets); 29 30 jQuery('body').removeClass('noJQuery'); 31/* 32 var timenow = new Date(new Date().getTime()); 33 var timethen = new Date(new Date().getTime() + (1000 * 60 * 2)); 34 //console.log('now ' + timenow + ' then ' + timethen); 35*/ 36 iframeSize(); 37 //imageRow(); 38 figcaptionWidth(); 39 // getTD() 40 41 42 if ( jQuery('#subMenu').find('ul').length == 0 ) { 43 jQuery('#subMenu').css('background', 'none'); 44 } 45 46 jQuery(window).resize(function(){ 47 menuItems(); 48 getWrapperWidth(); 49 if ( wrapperWidth > 640 ) { 50 jQuery('#subMenu > ul').show(); 51 jQuery('#mainMenu > ul').show(); 52 } 53 else { 54 jQuery('#mainMenu > ul').hide(); 55 jQuery('#subMenu > ul').hide(); 56 } 57 responsiveMainMenu(); 58 iframeSize(); 59 //imageRow(); 60 figcaptionWidth(); 61 }); 62 63 getSubMenuBackground(); 64 65 jQuery('#subMenu > h3').click(function(event){ 66 getWrapperWidth(); 67// console.log('wrapperweite' + wrapperWidth); 68// console.log('hintergrund' + background); 69 70 if ( wrapperWidth < 660 ) { 71 //jQuery('#subMenu').css('background-image','none'); 72 event.preventDefault(); 73 if ( jQuery(this).hasClass('opened') ) { 74 jQuery('#subMenu > ul').stop().slideToggle(500); 75 jQuery('#subMenu').css('background-image','none'); 76 jQuery(this).removeClass('opened').addClass('closed'); 77 } 78 else { 79 jQuery(this).removeClass('closed').addClass('opened'); 80 jQuery('#subMenu > ul').stop().slideToggle(500); 81 //jQuery('#subMenu').css('background-image', background); 82 } 83 } 84 }); 85 86 jQuery('#mainMenu > h3').click(function(event){ 87 getWrapperWidth(); 88// console.log(wrapperWidth); 89 90 if ( wrapperWidth < 660 ) { 91 event.preventDefault(); 92 if ( jQuery(this).hasClass('opened') ) { 93 jQuery('#mainMenu > ul').stop().slideToggle(500); 94 jQuery(this).removeClass('opened').addClass('closed'); 95 } 96 else { 97 jQuery(this).removeClass('closed').addClass('opened'); 98 jQuery('#mainMenu > ul').stop().slideToggle(500); 99 } 100 } 101 }); 102 103 jQuery('#quick_navigation > h2').click(function(){ 104 getWrapperWidth(); 105 /* 106 console.log(wrapperWidth); 107 108 var originalQuick = jQuery('#quick_navigation > ul'); 109 var listorg = originalQuick.find('li').length; 110 console.log('itemsquick' + listorg); 111 112 var listelemente = originalQuick.find('li'); 113 114 listelemente.each(function(index){ 115 if ( index === 3){ 116 var contentshow = jQuery(this).html(); 117 alert(contentshow); 118 } 119 120 jQuery(this).append('hallo'); 121 }); 122 123 console.log(listelemente); 124 125 */ 126 /*i = Math.ceil(listorg / 2); 127 128 while ( listorg ) { 129 var neuulcontent = listelemente.splice(0, 4).wrap('<ul>'); 130 } 131 132 133 originalQuick.text(neuulcontent); 134 */ 135 136 if ( wrapperWidth < 660 ) { 137 138 if ( jQuery(this).hasClass('opened') ) { 139 jQuery('#quick_navigation > ul').stop().slideToggle(500); 140 jQuery(this).removeClass('opened').addClass('closed'); 141 /* jQuery('#quick_navigation > ul > li.sep').fadeOut(function(){ 142 setTimeout(function () { 143 jQuery('#quick_navigation > ul > li.sep').remove(); 144 }, 1000); 145 }); 146 */ 147 } 148 else { 149 jQuery(this).removeClass('closed').addClass('opened'); 150 jQuery('#quick_navigation > ul').stop().slideToggle(500); 151 // jQuery('#quick_navigation > ul > li:nth-child(even)').after('<li class="sep" style="width:0; clear: left;">'); 152 } 153 } 154 }); 155 156 jQuery('#metaMenu li.zoom').click(function(event){ 157 var zoomNotice = jQuery('#metaMenu li.zoom span.zoomNotice, #metaMenu li.zoom div.zoomNotice'); 158// console.log(zoomNotice); 159 event.preventDefault(); 160 if ( ! zoomNotice.hasClass('open')) { 161 zoomNotice.stop().fadeIn().addClass('open'); 162 } 163 else { 164 zoomNotice.stop().fadeOut().removeClass('open'); 165 } 166 }); 167 168 mobileSlide(); 169 170 jQuery('.toggleSubMenu').click(function(){ 171 var $toggle = jQuery(this); 172 /* 173 $toggle.prev('.sub').stop().slideToggle('slow', function(){ 174 $toggle.parent('.hasSubMenu').toggleClass('active'); 175 }); 176 */ 177 $toggle.prev('.sub').stop().slideToggle('slow'); 178 $toggle.parent('.hasSubMenu').toggleClass('active');
179 console.log($toggle.parent('.sub')); 180 }); 181 182 jQuery('.offCanvasClose').click(function(){ 183 jQuery('#offCanvasMenu').removeClass('open'); 184 }); 185 186 jQuery('.toggleOffCanvas').click(function(e){ 187 e.preventDefault(); 188 jQuery('#offCanvasMenu').toggleClass('open'); 189 return false; 190 }); 191 192 /** News **/ 193 /* 194 * Makes the image div height equal to text so the read more link does not 195 * slide underneath the preview image in top news 196 */ 197 /* 198 var $allTopNews = jQuery('.news-list-view .article.topnews'); 199 $allTopNews.each(function(index) { 200 var $topNews = $allTopNews.eq(index), 201 imageHeight = $topNews.find('.news-img-wrap').height(), 202 textHeight = $topNews.find('.teaser-text').height(); 203 204 if(textHeight > imageHeight) { 205 $topNews.find('.news-img-wrap').height(textHeight); 206 } 207 }); 208 */ 209}); 210 211function mobileSlide(){ 212 var mobileContainer = jQuery('.mobileContainer'); 213 214 //console.log(mobileContainer); 215 216 mobileContainer.each(function(container){ 217 var elementstohide = jQuery(this).find('> div'), 218 subtitle = jQuery(this).find('h4'); 219 220 subtitle.addClass('closed'); 221 elementstohide.hide(); 222 223 subtitle.click(function(){ 224 //console.log(elementstohide); 225 if ( subtitle.hasClass('closed') ){ 226 elementstohide.stop().slideToggle(500); 227 subtitle.removeClass('closed').addClass('opened'); 228 } 229 else { 230 elementstohide.stop().slideToggle(500); 231 subtitle.removeClass('opened').addClass('closed'); 232 } 233 return false; 234 }); 235 }); 236} 237 238function getSubMenuBackground(){ 239 background = jQuery('#subMenu').css('background-image'); 240} 241 242function getWrapperWidth(){ 243 wrapperWidth = jQuery('div.wrapper').width(); 244} 245 246function menuItems(){ 247 getWrapperWidth(); 248 249 var mainMenuItemsCount = 0; 250 var mainMenuItemsWidth = 0; 251 var menuMenuItemsPadding = 0; 252 var menuFree = 0; 253 var mainMenuItemsPaddingRight = 0; 254 255 //jQuery('#mainMenu li a').css('padding-right','0'); 256 257 var mainMenuItemsCount = jQuery('#mainMenu li').length; 258 jQuery('#mainMenu li a').each(function(){ 259 mainMenuItemsWidth += parseInt(jQuery(this).width()); 260 //mainMenuItemsPaddingRight += parseInt(jQuery(this).find('a').css('padding-right').replace("px","")); 261 }); 262 263 if ( wrapperWidth > mainMenuItemsWidth && wrapperWidth > 660 ) { 264 var menuFree = parseInt(wrapperWidth - mainMenuItemsWidth); 265// console.log('menufree' + menuFree); 266 267 var menuMenuItemsPadding = parseInt(menuFree / mainMenuItemsCount); 268// console.log('padding' + menuMenuItemsPadding); 269 } 270 271 272// console.log('wrapperweite' + wrapperWidth); 273// console.log('itemsanzahl' + mainMenuItemsCount); 274// console.log('itemssumme' + mainMenuItemsWidth); 275// console.log('paddingRight' + mainMenuItemsPaddingRight); 276 jQuery('#mainMenu li a').css('padding-right', menuMenuItemsPadding); 277 278} 279 280function responsiveMainMenu() { 281 var mainMenu = jQuery('#mainMenu ul'); 282 var mainMenuWidth = 0; 283 284 if ( mainMenu.css('display') == 'none') { 285 mainMenu.css({'display':'block','visibility':'hidden','height':'0'}); 286 mainMenuWidth = mainMenu.width(); 287 mainMenu.css({'display':'none','visibility':'','height':''}); 288 } 289 else { 290 mainMenuWidth = mainMenu.width(); 291 } 292 293// console.log('weite' + mainMenuWidth); 294} 295 296function iframeSize() { 297 var iframeItems = jQuery('.frame-type-html iframe'); 298 var iframeWidth = 0; 299 var iframeHeight = 0; 300 var parentWidth = 0; 301 var newHeight = 0; 302 //console.log('iframesize' + iframeItems + iframeWidth + iframeHeight + parentWidth + newHeight); 303 304 //iframeItems.hide(); 305 306 iframeItems.each(function(){ 307 var iframeWidth = jQuery(this).outerWidth(); 308 var iframeHeight = jQuery(this).outerHeight(); 309 var parentWidth = jQuery(this).parent().width(); 310 if ( iframeWidth != parentWidth ) { 311 var heightCalc = parseFloat(iframeWidth / parentWidth); 312 var newHeight = parseInt(iframeHeight / heightCalc); 313 //console.log('heightCalc' + heightCalc); 314 jQuery(this).css({'width': parentWidth,'height': newHeight}); 315 //console.log('iframesize' + iframeItems + iframeWidth + iframeHeight + parentWidth + newHeight); 316 } 317 }); 318} 319 320function imageRow() { 321 jQuery('.csc-textpic-imagerow, .ce-row').each(function() { 322 // console.log(jQuery('.csc-textpic').width()); 323 var imageRowWidth = jQuery(this).closest('.csc-textpic, .ce-gallery').width(), 324 imageColumn = jQuery(this).find('.csc-textpic-imagecolumn, .ce-column'), 325 imageColumnCount = imageColumn.length; 326 327 if(imageColumnCount > 1) { 328 var imageColumnMargin = parseInt(imageColumn.eq(0).css('margin-right')); 329 imageRowWidth = (imageRowWidth - ((imageColumnCount - 1) * imageColumnMargin)) - 1; 330 var imageColumnWidth = parseInt(imageRowWidth / imageColumnCount); 331 } else { 332 var imageColumnWidth = imageRowWidth; 333 } 334
335 if ( wrapperWidth < 440 ) { 336 imageColumnWidth = parseInt(imageRowWidth); 337 imageColumn.find('img').width(parseInt( imageRowWidth)); 338 } 339 340 imageColumn.each(function() { 341 jQuery(this).width(imageColumnWidth); 342 }); 343 // console.log(imageRowWidth, imageColumn, imageColumnCount, jQuery(this).parent('.csc-textpic-imagewrap')); 344 // console.log(jQuery('.csc-textpic').width()); 345 // console.log(wrapperWidth); 346 }); 347} 348 349function figcaptionWidth() { 350 setTimeout(function(){ 351 jQuery('figcaption').each(function() { 352 jQuery(this).css('width', 'auto'); 353 //var imgWidth = jQuery(this).prev('img').outerWidth(); 354 var figureWidth = jQuery(this).parents('figure').outerWidth(); 355 356 jQuery(this).width(figureWidth - 1); 357 //console.log('1 '+jQuery(this).parents('figure').outerWidth()); 358 //console.log('2 '+jQuery(this).prev('img').innerWidth()); 359 }); 360 },200); 361} 362 363/* 364function getTD() { 365 jQuery('table.contenttable').each(function() { 366 jQuery(this).find('tr').each(function(){ 367 jQuery(this).find('td:odd, th:odd').addClass('odd'); 368 jQuery(this).find('td:even, th:even').addClass('even'); 369 }); 370 }); 371} 372*/
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.