PageSourceSearch

https://www.zkw-otterbein.de/templates/kallyas/js/m3-jquery.js

js zkw-otterbein.de collected 2026-10-04 05:09:10 UTC 10,525 bytes, 241 lines download raw bytes

1var $jquery = jQuery.noConflict();
2// $j is now an alias to the jQuery function; creating the new alias is optional.
3
4$jquery(document).ready(function() {
5	var CFID;
6	var shop = 0;
7	var result_msg;
8	var isinsidetree = -1;
9	$jquery("#thumbs").addClass("closed");
10	$jquery("#thumbs").after("<div class='showreferenzen'>Alle Referenzen anzeigen +</div>");
11	
12	setInterval(checkHeight, 500);
13	
14	$jquery('.showreferenzen').click(function() {
15		$jquery('#thumbs').toggleClass('closed');
16		if ($jquery("#thumbs").hasClass("closed")) {
17			$jquery('.showreferenzen').text("Alle Referenzen anzeigen +");
18		} else {
19			$jquery('.showreferenzen').text("Weniger Referenzen anzeigen -");
20		}
21	});
22	
23	function checkHeight() {
24		//console.log("New Initialization: "+$jquery('#thumbs').height());
25		if ($jquery('#thumbs').height() > 760) {
26			$jquery('.showreferenzen').removeClass("hidethis");
27		} else {
28			$jquery('.showreferenzen').addClass("hidethis");
29		}
30	}
31	
32	if ($jquery("#cf_form_676").length > 0) { CFID = 676 };
33	if ($jquery("#cf_form_242").length > 0) { CFID = 242 };
34	
35	//$jquery(".hg-portfolio-sortable > ul > li > .inner-item").children("a").removeAttr("target");
36	//console.log("Breite: "+$jquery(window).width());
37	//console.log("Höhe: "+$jquery(window).height());
38	
39	$jquery("#bd_results").parent(".span12").css("display", "flex");
40	
41	////console.log("Location: " + window.location.pathname);
42	isinsidetree = window.location.pathname.indexOf("produkte/alle_artikel/");
43	////console.log("is inside tree = "+isinsidetree);
44	if (isinsidetree != -1) {
45		$jquery("#bd_results").css("margin-left","40px").css("width","calc(100% - 386px) !important");
46		$jquery("#products_leftside").show();
47	}
48	
49	// Radio Buttons mit der selben Funktion versehen.
50	function setRadiobuttons () {
51		var counter = $jquery(".cf_option").length;
52		for (var i = 0; i < counter; i++) {
53			var href = $jquery(".cf_option:nth("+i+")").attr("href");
54			if (href != undefined) {
55				$jquery(".cf_option:nth("+i+")").parent("label").children("input").click({param1: href}, radioClicker);
56			}
57		}
58	}
59	
60	function radioClicker (event) {
61		event.preventDefault();
62		window.location = event.data.param1;
63	}
64	
65	// Funktion zum öffnen / schließen der Filterüberschriften, automatisches Deaktivieren der "Besonderheiten des Untergrunds"
66	var headercounter = $jquery(".cf_flt_header").length;
67	
68	//Automatisches Schliessen einer Filterkategorie
69	for (var k = 2; k <= headercounter; k++) {
70		//$jquery(".cf_flt_header:nth("+k+")").children("div").toggleClass("headexpand_hider");
71		//$jquery(".cf_flt_header:nth("+k+")").parent("div").children(".cf_wrapper_inner").toggleClass("content-noshow");
72	}
73	
74	for(var j = 0; j < headercounter; j++) {
75		$jquery(".cf_flt_header:nth("+j+")").on("click",{"id":j}, changeOpenHeadexpand);
76	}
77	
78	function changeOpenHeadexpand(event) {
79		//$jquery(".cf_flt_header:nth("+event.data.id+")").children("div").toggleClass("headexpand_hider");
80		//$jquery(".cf_flt_header:nth("+event.data.id+")").parent("div").children(".cf_wrapper_inner").toggleClass("content-noshow");
81	}
82	
83	function clickThis(doclick) {
84		var doclick_arr = doclick.split("=");
85		////console.log(doclick_arr[0].split("[")[0]+" --- "+doclick_arr[1]);
86		if (doclick_arr[0] != "q") {
87			////console.log("Checked auf: #"+doclick_arr[0].split("[")[0]+"_"+CFID+"_elid wird entfernt.");
88			////console.log("Checked auf: #"+doclick_arr[0].split("[")[0]+"_"+CFID+"_elid"+doclick_arr[1]+" wird durchgeführt.");
89			// Klick löst dauerschleife aus
90			//$jquery("#"+doclick_arr[0].split("[")[0]+"_"+CFID+"_elid"+doclick_arr[1]).click();
91			$jquery("#"+doclick_arr[0].split("[")[0]+"_"+CFID+"_elid").removeAttr("checked");
92			$jquery("#"+doclick_arr[0].split("[")[0]+"_"+CFID+"_elid"+doclick_arr[1]).attr("checked", "checked");
93		} else {
94			return;
95		}
96	}
97	
98	function openMain(doclick) {
99		var doclick_arr = doclick.split("=");
100		//console.log(doclick_arr[0]);
101		//if (doclick_arr[0] != "q" && doclick_arr[0] != "custom_f_36[0]" && doclick_arr[0] != "custom_f_37[0]") {
102		if (doclick_arr[0] != "q") {
103			//console.log("Öffne Überkategorie "+"#headexpand_"+doclick_arr[0].split("[")[0]+"_"+CFID);
104			var opened_menu = $jquery("#headexpand_"+doclick_arr[0].split("[")[0]+"_"+CFID).hasClass("headexpand_hide");
105			//console.log(opened_f_36_676);
106			if (opened_menu == true) {
107				//$jquery("#headexpand_custom_f_36_676").click();
108				$jquery("#headexpand_"+doclick_arr[0].split("[")[0]+"_"+CFID).click();
109			}
110		} else {
111			return;
112		}
113	}
114	
115	function checkIfClicked() {
116		if (window.location.href.split('?')[1] != undefined) {
117			var completelocation = window.location.href;
118			var explodedlocation = window.location.href.split('?')[1];
119			var locationparts = new Array();
120			if ((explodedlocation.split("&").length - 1) > 0) {
121				locationparts = explodedlocation.split('&');
122				////console.log(completelocation);
123				for (var i = 0; i < locationparts.length; i++) {
124					console.log(locationparts[i]);
125					clickThis(locationparts[i]);
126					openMain(locationparts[i]);
127				}
128			} else {
129				////console.log(completelocation);
130				////console.log(explodedlocation);
131				clickThis(explodedlocation);
132				openMain(explodedlocation);
133			}
134		}
135		setRadiobuttons();
136	}
137	if (window.location.pathname.indexOf("/sortiment") != -1) { shop++; }
138	if (window.location.pathname.indexOf("/link-generation") != -1) { shop++; }
139	//console.log(shop);
140	if (shop >= 1) {
141		var checked_if_visible = $jquery(".detailsuche_products").is(":visible");
142		if (checked_if_visible == true) {
143			setTimeout(scrollToSearch, 1000);
144			setTimeout(checkIfClicked, 1500);
145			toggleFixedMenu();
146			//console.log("Scroll & Clickcheck wird ausgeführt");
147		}
148	}
149	//console.log(window.location.pathname);
150	if (window.location.pathname == "/link-generation/") {
151		$jquery("#cf_flt_wrapper_custom_f_126_676").show();
152	}
153	
154	// Umbenennen der Suchfelder im CF Filtermodul
155	var anzahl_kategorien = $jquery(".cf_filters_list").length;
156	for (var h=0; h < anzahl_kategorien; h++) {
157		var name = $jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text();
158		////console.log(h+" - "+name);
159		if (name == "Alle Produktsparte") {
160			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Produktsparten");
161		}
162		if (name == "Alle Besondere Produkteigenschaften") {
163			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle besonderen Produkteigenschaften");
164		}
165		if (name == "Alle Anwendungsgebiet") {
166			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Anwendungsgebiete");
167		}
168		if (name == "Alle Produktkategorie") {
169			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Produktkategorien");
170		}
171		if (name == "Alle Anwendung") {
172			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Anwendungen");
173		}
174		if (name == "Alle Anwendungsort") {
175			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Anwendungsorte");
176		}
177		if (name == "Alle Größtkorn") {
178			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Körnungen");
179		}
180		if (name == "Alle Druckfestigkeit nach 28 Tagen") {
181			$jquery(".cf_filters_list:nth("+h+")").children("li:nth(0)").children("label").children("a").text("Alle Druckfestigkeiten nach 28 Tagen");
182		}
183	}
184	
185	// Ändern der Reihenfolge im CF Filtermodul
186	// Clonen der Original-Inhalte (Abbilder der Alten Inhalte)
187	var alle = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(0)").clone();
188	var kalk = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(1)").clone();
189	var moertel = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(2)").clone();
190	var putz = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(3)").clone();
191	var mineralische_anstriche_und_mehr = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(4)").clone();
192	var zement = $jquery("#cf_list_custom_f_36_"+CFID).children("li:nth(5)").clone();
193	// Entfernen der Inhalte (Alte Reihenfolge)
194	$jquery("#cf_list_custom_f_36_"+CFID).children("li").detach();
195	// Neu einbinden der Inhalte (Neue Reihenfolge)
196	$jquery("#cf_list_custom_f_36_"+CFID).append(alle);
197	$jquery("#cf_list_custom_f_36_"+CFID).append(zement);
198	$jquery("#cf_list_custom_f_36_"+CFID).append(kalk);
199	$jquery("#cf_list_custom_f_36_"+CFID).append(putz);
200	$jquery("#cf_list_custom_f_36_"+CFID).append(moertel);
201	$jquery("#cf_list_custom_f_36_"+CFID).append(mineralische_anstriche_und_mehr);
202	
203	// Zu den Ergebnissen Klickfunktion
204	$jquery(".zu_den_ergebnissen-button").click(scrollToResults);
205	function scrollToResults() {
206		$jquery('html, body').animate({ scrollTop: $jquery("#bd_results").offset().top - 35}, 1500);
207	}
208	
209	// Automatische Funktion die nach dem Laden (innerhalb des Shops) zur Suchmaske läuft
210	function scrollToSearch() {
211		$jquery('html, body').animate({ scrollTop: $jquery(".detailsuche_products").offset().top - 35}, 1500);
212	}
213	
214	// Accordeon Funktionalität
215	var anzahlcss3acc = $jquery(".css3accordion").length;
216	// //console.log(anzahlcss3acc);
217	for (var z = 0; z < anzahlcss3acc; z++) {
218		var part1 = $jquery(".css3accordion:nth("+z+")").children("ul").children("li").children(".inner-acc:nth(0)").clone();
219		var part2 = $jquery(".css3accordion:nth("+z+")").children("ul").children("li").children(".inner-acc:nth(1)").clone();
220		var part3 = $jquery(".css3accordion:nth("+z+")").children("ul").children("li").children(".inner-acc:nth(2)").clone();
221		$jquery(".css3accordion:nth("+z+")").after("<div id=\"acc_responsive_container"+z+"\"></div>");
222		$jquery("#acc_responsive_container"+z).append(part1.removeClass("inner-acc").addClass("acc_responsive_inhalt"));
223		$jquery("#acc_responsive_container"+z).append(part2.removeClass("inner-acc").addClass("acc_responsive_inhalt"));
224		$jquery("#acc_responsive_container"+z).append(part3.removeClass("inner-acc").addClass("acc_responsive_inhalt"));
225	}
226
227});
228
229function toggleFixedMenu() {
230	if($jquery(document).scrollTop() >= 300 && $jquery(window).width() < 1200){
231		$jquery("#mod680").addClass("fixedMenu");
232		$jquery(".mdrei_menu_burger").css("display","block");
233	}if($jquery(document).scrollTop() < 300 ){
234		$jquery("#mod680").removeClass("fixedMenu");
235		$jquery(".mdrei_menu_burger").css("display","none");
236	}
237}
238
239$jquery(document).scroll(function(){
240	toggleFixedMenu();
241});

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.