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 = ['normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.css','normal.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 150 151 if(a.getAttribute("rel").indexOf("style") != -1 152 && a.getAttribute("rel").indexOf("alt") == -1 153 && a.getAttribute("title")) { 154 return a.getAttribute("title"); 155 } 156 } 157 return null; 158 } 159 160 function createCookieS(name,value,days) { 161 if (days) { 162 var date = new Date(); 163 date.setTime(date.getTime()+(days*24*60*60*1000)); 164 var expires = "; expires="+date.toGMTString(); 165 }else{ 166 expires = ""; 167 } 168 169 document.cookie = name+"="+value+expires+"; path=/"; 170 } 171 172 function readCookieS(name) { 173 var nameEQ = name + "="; 174 var ca = document.cookie.split(';'); 175 176 for(var i=0;i < ca.length;i++) { 177 var c = ca[i]; 178 while (c.charAt(0)==' '){ 179 c = c.substring(1,c.length); 180 } 181 if (c.indexOf(nameEQ) == 0){ 182 return c.substring(nameEQ.length,c.length); 183 } 184 } 185 return null; 186 } 187 188 window.onload = function(e) { 189 var cookie = readCookieS("style"); 190 var title = cookie ? cookie : getPreferredStyleSheet(); 191 setActiveStyleSheet(title); 192 } 193 194 window.onunload = function(e) { 195 var title = getActiveStyleSheet(); 196 createCookieS("style", title, 365); 197 } 198 199 var cookie = readCookieS("style"); 200 var title = cookie ? cookie : getPreferredStyleSheet(); 201 setActiveStyleSheet(title); 202 203 204
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.