1//Planet IC GmbH - Initial JS-File 2// adaptions made by kontur networx GmbH 3 4jQuery(document).ready(function($) { 5 "use strict"; 6 7 var kategorien = new Array("aktuelles", "buecher", "verlag"); // actually different ones for every site; didn't want to change to much in js, css and so on, so the categories get mapped in fluid template 8 var regexpCat=new RegExp("(?:^|\\s+)("+kategorien.join("|")+")(jumper)?(?:\\s|$)"); 9 10 // Accordion Detailseite 11 if( $(".accordion").length ) { 12 $(".accordion").accordion({ 13 header: ".accordion_head", 14 collapsible: true, 15 heightStyle: "content", 16 active: false 17 }); 18 } 19 20 //Sprachschalter Selectbox stylen 21 $("select.language").selectBox({ 22 mobile: true, 23 menuSpeed: "fast" 24 }); 25 26 //Preise / Buchungen 27 //loadObe(); 28 29 //Imagemap 30 imagemapActivator(); 31 32 //Vertical carousel 33 verticalCarousel(); 34 35 //Angebotsfilter 36 angebotsFilterActivate(); 37 38 //Datepicker 39 bindDatepicker(); 40 41 // Fancybox 42 $("a.fancy").fancybox({ 43 "titlePosition": "over", 44 "autoScale": false, 45 "overlayColor": "#000", 46 "transitionIn": "none", 47 "transitionOut": "none", 48 "easingIn": "swing", 49 "padding": 0 50 }); 51 $("a.fancy_inline").fancybox({ 52 "titlePosition": "over", 53 "autoScale": false, 54 "overlayColor": "#000", 55 "transitionIn": "none", 56 "transitionOut": "none", 57 "easingIn": "swing", 58 "width": "50%", 59 "height": "50%", 60 "padding": 0 61 }); 62 63 //Suche ein-/ausblenden 64 $("#meta > li.suche > a").click(function() { $("#meta li #searchform").fadeToggle(100); }); 65 66 //Animation Subnavi Hover 67 $("#mainnavi > li > ul").hide(); 68 $("#mainnavi > li") 69 .mouseenter(function() { $(this).children("ul").stop(false,true).fadeIn(200); }) 70 .mouseleave(function() { $(this).children("ul").stop(false,true).fadeOut(400); }) 71 ; 72 73 $(".owl_carousel").owlCarousel({ // OWL Carousel Startseite 74 autoPlay:5000, 75 navigation:true, 76 pagination:false, 77 slideSpeed:300, 78 transitionStyle:false, // must be false due to errors in many browsers 79 items:1, 80 singleItem:true, 81 autoHeight:true, 82 addClassActive:true, 83 afterMove:function() { // Sync current item with jumper 84 var catMatch=$(".stage .owl-item:eq(" + this.currentItem + ") > .item").attr("class").match(regexpCat); 85 if(catMatch) { // Change jumper 86 $(".jumper li > a") 87 .width("90px") 88 .removeClass("active") 89 .filter("a."+catMatch[1]+"jumper") 90 .width("350px") 91 .addClass("active") 92 ; 93 } 94 }, 95 afterInit:function() { 96 var owl=this; 97 var $items=$(".stage .owl-item"); 98 $(".jumper a") 99 .click(function(e) { 100 e.preventDefault(); 101 var catMatch=$(this).attr("class").match(regexpCat); 102 owl.goTo( $(".stage .owl-item ."+catMatch[1]).index(".stage .owl-item > *") ); 103 }) 104 .first() 105 .each(function() { 106 var catMatch=$(this).attr("class").match(regexpCat); 107 if(catMatch) owl.jumpTo( $(".stage .owl-item ."+catMatch[1]).index(".stage .owl-item > *") ); 108 }) 109 ; 110 $(".jcarousel-control-next").click(function(e) { 111 e.preventDefault(); 112 owl.goTo( (owl.currentItem+1)%$items.length ); 113 }); 114 $(".jcarousel-control-prev").click(function(e) { 115 e.preventDefault(); 116 owl.goTo( (owl.currentItem-1+$items.length)%$items.length ); 117 }); 118 } 119 }); 120 121 $(".owl_carousel_produkte").owlCarousel({ 122 navigation : true, // Show next and prev buttons 123 slideSpeed : 300, 124 paginationSpeed : 400, 125 itemsCustom : [ 126 [0, 1], 127 [320, 1], 128 [512, 1], 129 [768, 2], 130 [1024, 3], 131 [1120, 3] 132 ], 133 pagination: true, 134 addClassActive: true 135 }); 136 137 $(".owl_carousel_detailseite").owlCarousel({ 138 navigation : true, // Show next and prev buttons 139 slideSpeed : 300, 140 paginationSpeed : 400, 141 pagination: true, 142 singleItem:true, 143 addClassActive: true 144 }); 145 146 $(window).resize(function() { 147 var bodyWidth = $("body").width(); 148 if (bodyWidth <= 512) { 149 $("body").addClass("mobile"); 150 $("#mainnavi_wrapper").prependTo("body").addClass("sidr").addClass("left"); 151 $("#menu_show") 152 .sidr({source: ".mobile #mainnavi_wrapper"}) 153 .click(function() { $(this).toggleClass("active"); }) 154 ; 155 //Aufklappmenue mobile Ansicht 156 $(".sidr-inner > ul > li > a").click(function(e) { 157 e.preventDefault(); 158 var parent_li = $(this).closest("li"); 159 if( parent_li.hasClass("current") ) window.location = $(this).attr("href"); 160 $(".sidr-inner > ul li ul:not(.dropdown-menu)").hide(); 161 $(".sidr-inner > ul li").removeClass("current"); 162 parent_li.children("ul").fadeIn(); 163 parent_li.toggleClass("current"); 164 }); 165 } else { 166 $("body").removeClass("mobile"); 167 $("#mainnavi_wrapper").prependTo("#innerheader").removeClass("sidr").removeClass("left"); 168 } 169 loadObe(); 170 }); 171 172 function imagemapActivator() { 173 $(".mapcontainer").each(function(e) { 174 var maplinks = $(this).find(".map_links"); 175 //Area-Hover 176 $(this).find("map area").hover( 177 function() { 178 var number = $(this).data("link"); 179 $("#imagemap").removeClass(); 180 maplinks.find("li a").removeClass("active"); 181 $("#imagemap").addClass("active-" + number); 182 maplinks.find("li a.maplink-" + number).addClass("active"); 183 }, 184 function() { 185 maplinks.find("li a").removeClass("active"); 186 $("#imagemap").removeClass(); 187 } 188 ); 189 maplinks.find("li a").hover( 190 function() { 191 var number = $(this).data("link"); 192 $("#imagemap").removeClass(); 193 $("#imagemap").addClass("active-" + number); 194 }, 195 function() { 196 $("#imagemap").removeClass(); 197 } 198 ); 199 }); 200 } 201 202 function verticalCarousel() { 203 $(".map_links").jcarousel({ 204 vertical: true, 205 wrap: "circular", 206 list: "ul" 207 }); 208 } 209 210 function angebotsFilterActivate() { 211 $(".angebot_filter select[name='angebot_typ']").change(function() { 212 if( $(this).val() == "all" || $(this).val() === "" ) { 213 $(".angebot_list li").show(); 214 } else { 215 $(".angebot_list li").show(); 216 $(".angebot_list li:not(." + $(this).val() + ")").hide(); 217 } 218 }); 219 } 220 221 function bindDatepicker() { 222 $.datepicker.regional.de = { 223 clearText: "löschen", clearStatus: "aktuelles Datum löschen", 224 closeText: "schlieÃen", closeStatus: "ohne Ãnderungen schlieÃen", 225 prevText: "«zurück", prevStatus: "letzten Monat zeigen", 226 nextText: "Vor»
226", nextStatus: "nächsten Monat zeigen", 227 currentText: "heute", currentStatus: "", 228 monthNames: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], 229 monthNamesShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], 230 monthStatus: "anderen Monat anzeigen", yearStatus: "anderes Jahr anzeigen", 231 weekHeader: "Wo", weekStatus: "Woche des Monats", 232 dayNames: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], 233 dayNamesShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 234 dayNamesMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], 235 dayStatus: "Setze DD als ersten Wochentag", dateStatus: "Wähle D, M d", 236 dateFormat: "dd.mm.yy", 237 firstDay: 1, 238 initStatus: "Wähle ein Datum", 239 isRTL: false 240 }; 241 $.datepicker.setDefaults($.datepicker.regional.de); 242 $("#startdatum, #enddatum").datepicker({ 243 minDate: new Date() 244 }); 245 // set minDate for datepickers of sysext:form, timeout seems necessary for some browsers 246 $(window).on("load", function() { $("[id^='requestForm-datepicker-']").datepicker("option", "minDate", new Date()); }); 247 } 248 249 function loadObe(){ 250if(1) return; 251 //Load Content 252 var obe_element = $("<div class='obe_menu'></div>"); 253 obe_element.load("/obe/site/searchFrame/"); 254 $("#mainnavi > li:last-child, #sidr-id-mainnavi > li:last-child").append(obe_element); 255 //bind handlers 256 $("#mainnavi > li:last-child a, #sidr-id-mainnavi > li:last-child a").on("click",function(e){ 257 if( $(this).parent().find(".obe_menu").length > 0 ) { 258 e.preventDefault(); 259 $(this).parent().toggleClass("open"); 260 } 261 }); 262 } 263 264 $(window).trigger("resize"); 265 266});
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.