1var oldww = 0; 2$(document).ready(function() { 3 $('#nav').slicknav({ 4 label: '', 5 duration: 1000, 6 prependTo:'#heyvisual', 7 allowParentLinks: true, 8 closeOnClick: true, 9 beforeOpen : function(trigger) { slicknavOpened(trigger); }, 10 11 }); 12 13 $( ".accordion-vertikal" ).accordion({header : 'header', active:false, collapsible:true, heightStyle:'auto', animate:false}); 14 if($( "#jfmulticontent_2366" ).length > 0){ 15 $( "#jfmulticontent_2366" ).accordionjs(); 16 } 17 if($( "#jfmulticontent_2430" ).length > 0){ 18 $( "#jfmulticontent_2430" ).accordionjs(); 19 } 20 //if($( ".anythingSlider" ).length > 0){ 21 $( ".anythingSlider" ).anythingSlider({ 22 easing: 'swing', 23 animationTime: 1000, 24 autoPlay: true, 25 delay: 15000, 26 startStopped: false, 27 stopAtEnd: false, 28 theme: 'saw', 29 mode: 'horizontal', 30 buildArrows: false, 31 allowRapidChange: true, 32 resumeOnVideoEnd: false, 33 playRtl: false, 34 hashTags: false, 35 pauseOnHover: false, 36 buildNavigation: false, 37 buildStartStop: true, 38 startText: '', 39 stopText: '', 40 startPanel: Math.floor(Math.random()*9) 41 }); 42 //} 43 44 45 46 /** Bei GröÃenänderungen checken, ob was geändert werden muss **/ 47 /**$(window).bind('resize orientationchange', function(){ 48 adjustWebsite(); 49 }); 50 adjustWebsite(); **/ 51 52 quickSearch(); 53 54 55 56}); 57 58 59function quickSearch() { 60 // clearing values after reload 61 $('#search input:text').attr('value', ''); 62 63 // Show/hide label 64 $('#search input').focus(function(){ 65 $(this).parents('#search').find('label').hide(); 66 }).blur(function(){ 67 if (!$(this).attr('value')) $(this).parents('#search').find('label').show(); 68 }); 69} 70 71 72function adjustWebsite(){ 73 var ww = document.body.clientWidth; 74 if( ww >= 1000 && ww <=1024 ){ 75 ww = window.innerWidth; 76 } 77 if(changedView(oldww, ww)){ 78 if(ww >= 977){ 79 } 80 else{ 81 } 82 oldww = ww; 83 } 84} 85 86function changedView(oldww,ww){ 87 /**if(oldww < 320 && ww < 320 && oldww != 0){ 88 return false; 89 } 90 else if (oldww >= 320 && oldww < 568 && ww >= 320 && ww < 568){ 91 return false; 92 } 93 else if (oldww >= 568 && oldww < 768 && ww >= 568 && ww < 768){ 94 return false; 95 }else if(oldww >= 768 && oldww < 1280 && ww >= 768 && ww < 1280){ 96 return false; 97 }else if(oldww >= 1280 && ww >=1280){ 98 return false; 99 }**/ 100 if(oldww < 978 && ww < 978 && oldww != 0){ 101 return false; 102 }else if(oldww >= 977 && ww >=977){ 103 } 104 return true; 105} 106 107 108function slicknavOpened(trigger) { 109 var $trigger = $(trigger[0]); 110 if ($trigger.hasClass('slicknav_btn')) { 111 // this is the top-level menu/list opening. 112 // we only want to trap lower-level/sublists. 113 return; 114 } 115 // trigger is an <a> anchor contained in a <li> 116 var $liParent = $trigger.parent(); 117 // parent <li> is contained inside a <ul> 118 var $ulParent = $liParent.parent(); 119 // loop through all children of parent <ul> 120 // i.e. all siblings of this <li> 121 $ulParent.children().each(function () { 122 var $child = $(this); 123 if ($child.is($liParent)) { 124 // this child is self, not is sibling 125 return; 126 } 127 if ($child.hasClass('slicknav_collapsed')) { 128 // this child is already collapsed 129 return; 130 } 131 if (!$child.hasClass('slicknav_open')) { 132 // could throw an exception here: this shouldn't happen 133 // because I expect li to have class either slicknav_collapsed or slicknav_open 134 return; 135 }https://www.google.de/webhp?hl=de&sa=X&ved=0ahUKEwiFxK7j_ODXAhUBKFAKHR0IAXkQPAgD 136 // found a sibling <li> which is already open. 137 // expect that its first child is an anchor item. 138 var $anchor = $child.children().first(); 139 if (!$anchor.hasClass('slicknav_item')) { 140 return; 141 } 142 // close the sibling by emulating a click on its anchor. 143 $anchor.click(); 144 }); 145} 146 147 /*********************************************************************************************** 148 @author Leon Kleinmann - damit die die Bilder auf den Seiten "Branchen", "Themen", "Zielgruppen" hovern :) 149 ************************************************************************************************/ 150 if($("body").hasClass('layout-1 lang-0') || $("body").hasClass('layout-1 lang-1') || $("body").hasClass('layout-1 lang-2') || $("body").hasClass('layout-1 lang-3') || $("body").hasClass('layout-1 lang-4')) { 151 $('*[id^="c"]').each(function() { 152 $(this).hover(function() { 153 $(".ce-gallery", this).css('display', 'none'); 154 $(".ce-bodytext", this).css('visibility', 'visible'); 155 }, function() { 156 $(".ce-gallery", this).css('display', 'block'); 157 $(".ce-bodytext", this).css('visibility', 'hidden'); 158 }); 159 }); 160 } 161 162 /* @author Leon -> kleiner Code damit dass Dropdown-Menü für Sprachen auf iOS wieder richtig angezeigt wird */ 163 164 /*********************************************************************************************** 165 @author Leon Kleinmann - damit dass Dropdown-Menü für Sprachen auf iOS wieder richtig angezeigt wird 166 ************************************************************************************************/ 167 var isSafariMobile = (navigator.userAgent.match(/like Mac OS X/i)) ? true: false; //Vorsicht 168 var menuOpened = false;
169 170 //Wenn es Safari Mobile ist 171 if(isSafariMobile) { 172 173 document.addEventListener("touchstart", function() {}, false); 174 175 if(menuOpened) { 176 $('.current').on('click touch', function() { 177 var par = $(this).parentNode; 178 var child = $(this); 179 par.removeChild($(this)); 180 par.addChild(child); 181 menuOpened = false; 182 }); 183 } else { 184 $('.current').on("click touch", function(e) { 185 e.preventDefault(); 186 menuOpened = true; 187 }); 188 } 189 } 190 191 192 193 /********************************************************************************************** 194 @author Leon Kleinmann - JS damit der Text nicht mehr in den Accordion-Boxen overflowt 195 ************************************************************************************************/ 196 function isOverflowing(len, maxChars) { 197 if(len>maxChars) { 198 return true; 199 } else { 200 return false; 201 } 202 } 203 function findLatestWhiteSpace(textContent, maxChars) { 204 var res = -1; 205 var i; 206 207 for(i=maxChars;i>0;i--) { 208 if(textContent.charAt(i) == ' ') { 209 res = i; 210 break; 211 } 212 } 213 return res; 214 } 215 function isRotated() { 216 var rotation = false; 217 if($(".accordionjs-title").width() < 40) { 218 rotation = true; 219 } 220 return rotation; 221 } 222 $(document).ready(function() { 223 if(isRotated() == true) { 224 $(".accordionjs-title span").each(function() { 225 var originalContent = $(this).html(); //Der unberührte ursprüngliche Content 226 var textContent = null; //Der reine Text der in der Accordion-Box steht 227 var modifiedContent = ""; 228 var htmlContent = null; //Der andere Inhalt neben den Text den wir erst am ende wieder zum zusammenbauen brauchen 229 var htmlContentSize = 91; //In jeder Box ist der htmlContent immer 91 Zeichen lang 230 231 var maxChars = 27; //Anzahl der Chars die maximal auf eine Zeile passen 232 233 $(this).css("line-height", "1em"); 234 $(this).css("padding", "8px"); 235 236 //Contents holen 237 htmlContent = originalContent.substring(0, htmlContentSize); 238 textContent = originalContent.substring(htmlContentSize, originalContent.length); 239 240 //Falls der Text overflowt, muss er verändert werden 241 var line = textContent; 242 var latestWhitespace = null; 243 var counter = 0; 244 if(isOverflowing(textContent.length, maxChars)) { 245 246 while(isOverflowing(line.length, maxChars)) { 247 latestWhitespace = findLatestWhiteSpace(line, maxChars); 248 var trennstrich_mit_leerzeichen = line.indexOf('- '); 249 // Sonderfall IVSS-Sektion Maschinen- und Systemsicherheit - hier kommt der letzte Whitespace zu spät 250 if ((trennstrich_mit_leerzeichen > 0) && (latestWhitespace > trennstrich_mit_leerzeichen)) { 251 latestWhitespace = trennstrich_mit_leerzeichen+1; 252 } 253 if(latestWhitespace>0) { 254// console.log(textContent); 255 modifiedContent = modifiedContent + line.substring(0, latestWhitespace) + "<br class=\"wir-ueber-uns wir-ueber-uns-if\" />"; 256 line = line.substring(latestWhitespace, line.length); 257 counter+=1; 258 } else { 259 modifiedContent = modifiedContent + line.substring(0, maxChars) + "<br class=\"wir-ueber-uns wir-ueber-uns-else\"/>"; 260 line = line.substring(maxChars, line.length); 261 counter+=1; 262 } 263 } 264 265 modifiedContent += line; 266 $(this).css("padding", "6px"); 267 if(counter > 2) { 268 $(this).css("font-size", "85%"); 269 $(this).css("padding", "1px"); 270 } 271 $(this).html(modifiedContent); 272 } 273 }); 274 } 275 }); 276 277 278 279 280 281
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.