1jQuery.noConflict(); 2jQuery(document).ready(function($) { 3 4 5function createCookie(name,value,days){ 6 if (days){ 7 var date = new Date(); 8 date.setTime(date.getTime()+(days*24*60*60*1000)); 9 var expires = "; expires="+date.toGMTString(); 10 11 } 12 else var expires = ""; 13 document.cookie = name+"="+value+expires+"; path=/"; 14 } 15 16 function readCookie(name){ 17 var nameEQ = name + "="; 18 var ca = document.cookie.split(';'); 19 for(var i=0;i < ca.length;i++){ 20 var c = ca[i]; 21 while (c.charAt(0)==' ') c = c.substring(1,c.length); 22 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 23 } 24 return null; 25 } 26 27 function eraseCookie(name){ 28 createCookie(name,"",-1); 29 } 30 31/** 32* Styleswitch stylesheet switcher built on jQuery 33* Under an Attribution, Share Alike License 34* By Kelvin Luck ( http://www.kelvinluck.com/ ) 35**/ 36(function($){ 37 $(document).ready(function(){ 38 /*$('.styleswitch').click(function(){ 39 //console.info(this.getAttribute("rel")); 40 switchStylestyle(this.getAttribute("rel")); 41 return false; 42 });*/ 43 var c = readCookie('seasonCSS'); 44 if (c){ 45 46 } else { 47 var month = ['winter.css','winter.css','spring.css','spring.css','spring.css','summer.css','summer.css','summer.css','autumn.css','autumn.css','autumn.css','winter.css']; 48 var jetzt = new Date(); 49 var jetztMonat = jetzt.getMonth(); 50 c = month[jetztMonat] 51 createCookie('seasonCSS', c, 0); 52 } 53 //if (c) switchStylestyle(c); 54 }); 55 56 /*function switchStylestyle(styleName){ 57 $('link[@rel*=style][title]').each(function(i){ 58 this.disabled = true; 59 if (this.getAttribute('title') == styleName) this.disabled = false; 60 }); 61 createCookie('seasonCSS', styleName, 0); 62 }*/ 63 64})(jQuery); 65 66 67 68}); 69 70 71 // ************************************************************* 72 // JahresZeitenWechsler fixed by McRich 73 // ************************************************************* 74 75 function setActiveStyleSheet(title) { 76 77 /* 78 var i, a, main; 79 for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { 80 if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { 81 a.disabled = true; 82 if(a.getAttribute("title") == title) a.disabled = false; 83 } 84 } 85 */ 86 87 var styleTag; 88 var styleSwitch; 89 var styleHref=''; 90 91 for(var i=0; (styleTag = document.getElementsByTagName("link")[i]); i++) { 92 if(styleTag.getAttribute("title")=="switch") { 93 styleSwitch=styleTag; 94 } 95 if(styleTag.getAttribute("rel").indexOf("alternate stylesheet")!=-1 && styleTag.getAttribute("title")) { 96 if(styleTag.getAttribute("title")==title) { 97 styleHref=styleTag.getAttribute("href"); 98 } 99 } 100 } 101 102 if(styleSwitch != undefined){ 103 if (styleSwitch.getAttribute("href") != styleHref && styleHref != '') { 104 styleSwitch.setAttribute("href",styleHref); 105 } 106 } 107 108 if(title != '') { 109 createCookieS("style", title, 365); 110 } 111 112 return false; 113 } 114 115 function getActiveStyleSheet() { 116 117 /* 118 var i, a; 119 for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { 120 if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title"); 121 } 122 return null; 123 */ 124 125 var styleTag; 126 var styleSwitch; 127 var styleTitle=''; 128 129 for(var i=0; (styleTag = document.getElementsByTagName("link")[i]); i++) { 130 if(styleTag.getAttribute("title")=="switch") { 131 styleSwitch=styleTag; 132 } 133 } 134 135 for(var i=0; (styleTag = document.getElementsByTagName("link")[i]); i++) { 136 if(styleTag.getAttribute("rel").indexOf("alternate stylesheet")!=-1 && styleTag.getAttribute("title")) { 137 if(styleTag.getAttribute("href")==styleSwitch.getAttribute("href")) { 138 styleTitle=styleTag.getAttribute("title"); 139 } 140 } 141 } 142 143 return styleTitle; 144 } 145 146 function getPreferredStyleSheet() { 147 var i, a; 148 for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { 149 if(a.getAttribute("rel").indexOf("style") != -1 150 && a.getAttribute("rel").indexOf("alt") == -1 151 && a.getAttribute("title")) { 152 return a.getAttribute("title"); 153 } 154 } 155 return null; 156 } 157 158 function createCookieS(name,value,days) { 159 if (days) { 160 var date = new Date(); 161 date.setTime(date.getTime()+(days*24*60*60*1000)); 162 var expires = "; expires="+date.toGMTString(); 163 }else{ 164 expires = ""; 165 } 166 167 document.cookie = name+"="+value+expires+"; path=/"; 168 } 169 170 function readCookieS(name) { 171 var nameEQ = name + "="; 172 var ca = document.cookie.split(';'); 173 174 for(var i=0;i < ca.length;i++) { 175 var c = ca[i];
176 while (c.charAt(0)==' '){ 177 c = c.substring(1,c.length); 178 } 179 if (c.indexOf(nameEQ) == 0){ 180 return c.substring(nameEQ.length,c.length); 181 } 182 } 183 return null; 184 } 185 186 window.onload = function(e) { 187 var cookie = readCookieS("style"); 188 var title = cookie ? cookie : getPreferredStyleSheet(); 189 setActiveStyleSheet(title); 190 } 191 192 window.onunload = function(e) { 193 var title = getActiveStyleSheet(); 194 createCookieS("style", title, 365); 195 } 196 197 var cookie = readCookieS("style"); 198 var title = cookie ? cookie : getPreferredStyleSheet(); 199 setActiveStyleSheet(title); 200 201 202
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.