PageSourceSearch

https://www.icehouse-aue.de/public/www/themes/frontend/responsive/_public/src/js/theme.js?_=6ac556649a67c

js icehouse-aue.de collected 2026-10-06 20:13:37 UTC 23,390 bytes, 519 lines download raw bytes

1var GAL = {};
2    GAL.imageList = null;
3    GAL.Init = function(){
4        $('div[class^="lightbox-"]').bind('click',function(){
5            
6            var _CLASS = $(this).attr("class");
7            var _FIRST = $(this).find('img.'+_CLASS)[0];
8            GAL.imageList = $('img.'+_CLASS);
9
10            var now = 0;
11            $.each(GAL.imageList, function( k, v ) {
12                if(v == _FIRST){
13                    now = k;
14                }
15            });
16            
17            $('body').addClass('noscroll');
18
19            var _GALTpl  = '<modal class="gallery" data-id="'+now+'">';
20                _GALTpl += '<div class="close"><span></span><span></span></div>';
21                _GALTpl += '<div class="prev"><span></span></div>';
22                _GALTpl += '<div class="next"><span></span></div>';
23                _GALTpl += '<div class="bg" style="background-image:url('+$(_FIRST).attr("src")+')"></div>';
24                _GALTpl += '<div class="pic" style="background-image:url('+$(_FIRST).attr("src")+')"></div>';
25                _GALTpl += '</modal>';
26            $('body').append(_GALTpl);
27            $('modal.gallery .close').bind('click',function(){
28                $('modal.gallery').remove();
29                $('body').removeClass('noscroll');
30            });
31
32            if(GAL.imageList.length == 1){
33                /* OPEN SINGLE */
34                $('modal.gallery .prev, modal.gallery .next').remove();
35            }else{
36                /* OPEN MULTI */
37                $('modal.gallery .prev').bind('click',function(){
38                    var did = parseFloat($('modal.gallery').attr("data-id"));
39                    if(did == 0){
40                        var _SID = GAL.imageList.length - 1;
41                    }else{
42                        var _SID = did - 1;
43                    }
44                    $('modal.gallery .bg').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
45                    $('modal.gallery .pic').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
46                    $('modal.gallery').attr("data-id",_SID);
47                });
48                $('modal.gallery .next').bind('click',function(){
49                    var did = parseFloat($('modal.gallery').attr("data-id"));
50                    if(did >= (GAL.imageList.length-1)){
51                        var _SID = 0;
52                    }else{
53                        var _SID = did + 1;
54                    }
55                    $('modal.gallery .bg').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
56                    $('modal.gallery .pic').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
57                    $('modal.gallery').attr("data-id",_SID);
58                });
59            }
60        });
61    };
62
63    GAL.Init2 = function(){
64        $('.slidGastroWrapper .item').css("cursor","pointer");
65        $('.slidGastroWrapper .item').bind('click',function(){
66            
67            var _CLASS = $(this).attr("class");
68            var _FIRST = $(this).find('img')[0];
69            GAL.imageList = $('.slidGastroWrapper .item img');
70            
71
72            var now = 0;
73            $.each(GAL.imageList, function( k, v ) {
74                if(v == _FIRST){
75                    now = k;
76                }
77            });
78            
79            $('body').addClass('noscroll');
80
81            var _GALTpl  = '<modal class="gallery" data-id="'+now+'">';
82                _GALTpl += '<div class="close"><span></span><span></span></div>';
83                _GALTpl += '<div class="prev"><span></span></div>';
84                _GALTpl += '<div class="next"><span></span></div>';
85                _GALTpl += '<div class="bg" style="background-image:url('+$(_FIRST).attr("src")+')"></div>';
86                _GALTpl += '<div class="pic" style="background-image:url('+$(_FIRST).attr("src")+')"></div>';
87                _GALTpl += '</modal>';
88            $('body').append(_GALTpl);
89            $('modal.gallery .close').bind('click',function(){
90                $('modal.gallery').remove();
91                $('body').removeClass('noscroll');
92            });
93
94            if(GAL.imageList.length == 1){
95                /* OPEN SINGLE */
96                $('modal.gallery .prev, modal.gallery .next').remove();
97            }else{
98                /* OPEN MULTI */
99                $('modal.gallery .prev').bind('click',function(){
100                    var did = parseFloat($('modal.gallery').attr("data-id"));
101                    if(did == 0){
102                        var _SID = GAL.imageList.length - 1;
103                    }else{
104                        var _SID = did - 1;
105                    }
106                    $('modal.gallery .bg').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
107                    $('modal.gallery .pic').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
108                    $('modal.gallery').attr("data-id",_SID);
109                });
110                $('modal.gallery .next').bind('click',function(){
111                    var did = parseFloat($('modal.gallery').attr("data-id"));
112                    if(did >= (GAL.imageList.length-1)){
113                        var _SID = 0;
114                    }else{
115                        var _SID = did + 1;
116                    }
117                    $('modal.gallery .bg').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
118                    $('modal.gallery .pic').css('background-image','url('+$(GAL.imageList[_SID]).attr("src")+')');
119                    $('modal.gallery').attr("data-id",_SID);
120                });
121            }
122        });
123    };
124
125function elementInViewport2(el) { var top = el.offsetTop; var left = el.offsetLeft; var width = el.offsetWidth; var height = el.offsetHeight; while(el.offsetParent) { el = el.offsetParent; top += el.offsetTop; left += el.offsetLeft; } return ( top < (window.pageYOffset + window.innerHeight) && left < (window.pageXOffset + window.innerWidth) && (top + height) > window.pageYOffset && (left + width) > window.pageXOffset ); }
126var PARALLAX = {};
127    PARALLAX.i = 0;
128var THEME = {};
129THEME.closeSVG  = '<svg height="329pt" viewBox="0 0 329.26933 329" width="329pt" xmlns="http://www.w3.org/2000/svg"><path d="m194.800781 164.769531 128.210938-128.214843c8.34375-8.339844 8.34375-21.824219 0-30.164063-8.339844-8.339844-21.824219-8.339844-30.164063 0l-128.214844 128.214844-128.210937-128.214844c-8.34375-8.339844-21.824219-8.339844-30.164063 0-8.34375 8.339844-8.34375 21.824219 0 30.164063l128.210938 128.214843-128.210938 128.214844c-8.34375 8.339844-8.34375 21.824219 0 30.164063 4.15625 4.160156 9.621094 6.25 15.082032 6.25 5.460937 0 10.921875-2.089844 15.082031-6.25l128.210937-128.214844 128.214844 128.214844c4.160156 4.160156 9.621094 6.25 15.082032 6.25 5.460937 0 10.921874-2.089844 15.082031-6.25 8.34375-8.339844 8.34375-21.824219 0-30.164063zm0 0"/></svg>';
130THEME.searchSVG = '<svg width="16px" height="16px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> <g> <g> <path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"></path> </g> </g> <g> <g> <path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"></path> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>';
131    THEME.Init = function(){
132
133
134        
135            if(!$('body').hasClass("is--")){
136                    $('body').append('<a href="tour.html" target="_blank" id="tour360">360°</a>');
137                    $('body').append('<a id="iceHouse" href="https://www.bowlingstreet.de/" target="_blank">Ice<span>House</span></a>');
138            }
139            
140        if($('#eventWidget').length!=0){
141            $.ajax({
142                method: "GET",
143                url: './api',
144                data: { "do":"event_widget", "_": Math.random() },
145                success: function(data){
146                    $('#eventWidget').html(data);
147                }
148            });
149        }
150
151
152        $('#search--input').slideUp(0);
153        $('header item[data-role="search"]').bind('click',function(){
154            if(!$('#search--input').hasClass('open')){
155                $('header item[data-role="search"]').html(THEME.closeSVG);
156                $('header').addClass('scroll');
157                $('#search--input').slideDown(300).addClass('open');
158                window.setTimeout(function(){
159                    $('#search--input input').trigger('click').focus().select();
160                },400);
161            }else{
162                $('header item[data-role="search"]').html(THEME.searchSVG);
163                var ft = $(window).scrollTop();
164                if(ft < 150 && $('header').hasClass('scroll')){
165                    $('header').removeClass('scroll');
166                }
167                $('#search--input input').blur();
168                $('#search--input').slideUp(300).removeClass('open');
169            }
170        });
171        $('#search--input input').bind('keypress',function(e){
172            if(e.keyCode == 13){
173                var _SEARCH = $.trim($(this).val());    
174                if(_SEARCH.length<3){
175                    SYS.alert(SEARCH_ERROR_01_TITLE,SEARCH_ERROR_01_TEXT,function(){
176                        $('#search--input input').trigger('click').focus().select();
177                    });
178                }else{
179                    document.location.href = './search/'+_SEARCH;
180                }
181            }
182        });
183        $('#newsletter-bottom input[type="email"]').bind('keypress',function(e){
184            if(e.keyCode == 13){
185                var _MAIL = $.trim($(this).val());    
186                if(_MAIL == ""){
187                    SYS.alert(SEARCH_ERROR_01_TITLE,NL_ERROR_01_TEXT,function(){
188                        $('#newsletter-bottom input').trigger('click').focus().select();
189                    });
190                }else{
191                    document.location.href = './newsletter/in/'+_MAIL;
192                }
193            }
194        });
195        $('#newsletter-bottom .input a').bind('click',function(e){
196                var _MAIL = $.trim($('#newsletter-bottom input[type="email"]').val());    
197                if(_MAIL == ""){
198                    SYS.alert(SEARCH_ERROR_01_TITLE,NL_ERROR_01_TEXT,function(){
199                        $('#newsletter-bottom input').trigger('click').focus().select();
200                    });
201                }else{
202                    document.location.href = './newsletter/in/'+_MAIL;
203                }
204            
205        });
206
207        $('#scrollTop').bind('click',function(){
208            var body = $("html, body");
209                body.stop().animate({scrollTop:0}, 500, 'swing', function() { });
210        });
211
212        $(window).bind('scroll',function(){
213            var ft = $(window).scrollTop();
214            if(ft >= 500 && !$('#scrollTop').hasClass('show')){
215                    $('#scrollTop').addClass("show");
216                
217            }
218            else if(ft < 150 && $('#scrollTop').hasClass('show')){
219                    $('#scrollTop').removeClass("show");
220                
221            }
222            $('.inViewport').each(function(){
223                if(elementInViewport2($(this)[0])){
224                    $('#'+$(this).attr('data-viewport')).show();
225                }else{
226                    $('#'+$(this).attr('data-viewport')).hide();
227                }
228            });
229
230            $('.is-anim').each(function(){
231                if(elementInViewport2($(this)[0])){
232                    var animClass = 'animate__'+$(this).attr('data-anim');
233                    PARALLAX.animateNow($(this),animClass);
234                }
235            });
236           
237        });
238        $(window).trigger('scroll');
239
240        window.setTimeout(function(){
241            $('a, input, button, select, textarea, header, aside, #aside-bg').addClass('anim');
242        },440);
243
244        $('.twitter .twitter-tweet').each(function(){
245            var _ID = $(this).attr("tweetid");
246            $(this).replaceWith('<blockquote class="twitter-tweet"><a data-chrome="noborders noheader nofooter" href="https://twitter.com/x/status/'+_ID+'"></a></blockquote>');
247        });
248
249        THEME.InitTwitter();
250
251        $('a.asOverlay').each(function(){
252            $(this).bind('click',function(event){
253                event.preventDefault();
254                THEME.closeAside();
255                $('body').addClass('noscroll');
256                $('modal#window').remove();
257                var S = $(this).attr("href");
258                    S = S.split("/");
259                    
260                 var _SOURCE= "./modal/"+S[(S.length - 1)];
261                var _TITLE  = $(this).text();
262                
263                var WIN  = '<modal id="window">';
264                    WIN += '<div class="window">';
265                    WIN += '<div class="title">';
266                    WIN += '<span>'+_TITLE+'</span>';
267                    WIN += '<a onclick="THEME.closeWindow()">'+THEME.closeSVG+'</a>';
268                    WIN += '</div>';
269                    WIN += '<div class="content">';
270                    WIN += '<p>Lade Daten ...<br>Bitte warten ...</p>';
271                    WIN += '</div>';
272                    WIN += '</div>';
273                    WIN += '</modal>';
274
275                $('body').append(WIN);
276
277                $.ajax({
278                    method: "GET",
279                    url: _SOURCE,
280                    data: { "_": Math.random() },
281                    success: function(data){
282                        $('modal#window .window .content').html(data);
283                        $('modal#window .window .content .pageBlock:nth-child(1) .dropZone').css("padding-top","20px");
284                        $('modal#window .window .content .pageBlock:last-child .dropZone').css("padding-bottom","20px");
285                    }
286                });
287
288                $('modal#window').addClass('see');
289                window.setTimeout(function(){
290                    $('modal#window').addClass('show');
291                },10);
292                window.setTimeout(function(){
293                    $('modal#window .window').addClass('show');
294                },200);
295
296                return false;
297            });
298        });
299        $('img[class^="lightbox-"]').each(function(){
300            $(this).wrap( '<div class="'+$(this).attr("class")+'"></div>' );
301        });
302        window.setTimeout(function(){
303            GAL.Init();
304        },20);
305
306        $('header item[data-role="mobile-menu"]').bind('click',function(){
307           THEME.openSidebar();
308        });
309    };
310	
311	THEME.popupWindow = function(_ID){
312		if(!window.sessionStorage.getItem('dswinpo')){
313		$('body').addClass('noscroll');
314                $('modal#window').remove();
315               
316                    
317                 var _SOURCE= "./modal2/"+_ID;
318                var _TITLE  = $(this).text();
319                
320                var WIN  = '<modal id="window">';
321                    WIN += '<div class="window">';
322                    WIN += '<div class="title">';
323                    WIN += '<span>'+_TITLE+'</span>';
324                    WIN += '<a onclick="THEME.closeWindow()">'+THEME.closeSVG+'</a>';
325                    WIN += '</div>';
326                    WIN += '<div class="content">';
327                    WIN += '<p>Lade Daten ...<br>Bitte warten ...</p>';
328                    WIN += '</div>';
329                    WIN += '</div>';
330                    WIN += '</modal>';
331
332                $('body').append(WIN);
333
334                $.ajax({
335                    method: "GET",
336                    url: _SOURCE,
337                    data: { "_": Math.random() },
338                    success: function(data){
339                        $('modal#window .window .content').html(data);
340                        $('modal#window .window .content .pageBlock:nth-child(1) .dropZone').css("padding-top","20px");
341                        $('modal#window .window .content .pageBlock:last-child .dropZone').css("padding-bottom","20px");
342                    }
343                });
344
345                $('modal#window').addClass('see');
346                window.setTimeout(function(){
347                    $('modal#window').addClass('show');
348                },10);
349                window.setTimeout(function(){
350                    $('modal#window .window').addClass('show');
351                },200);
352				window.sessionStorage.setItem('dswinpo',1);
353		}
354	};
355	
356    THEME.openSidebar = function(){
357        $('#bg-aside').addClass('see');
358        $('body').addClass('noscroll');
359        window.setTimeout(function(){
360            $('#bg-aside, aside').addClass('show');
361        },20);
362    };
363    THEME.closeSidebar = function(){
364        $('#bg-aside, aside').removeClass('show');
365        $('body').removeClass('noscroll');
366        window.setTimeout(function(){
367            $('#bg-aside').removeClass('see');
368        },310);
369    };
370    THEME.closeWindow = function(){
371        $('modal#window .window').removeClass('show');
372        window.setTimeout(function(){
373            $('modal#window').removeClass('show');
374        },200);
375        window.setTimeout(function(){
376            $('modal#window').remove();
377            $('body').removeClass('noscroll');
378        },510);
379    };
380    THEME.closeAside = function(){
381
382    };
383
384
385    THEME.InitTwitter = function(){
386/*
387        var _SCRIPT = document.createElement('script');
388        _SCRIPT.setAttribute('src','//platform.twitter.com/widgets.js');
389        _SCRIPT.setAttribute('charset','utf-8');
390        //_SCRIPT.setAttribute('async ','true');
391        document.getElementsByTagName('head')[0].appendChild(_SCRIPT);
392		*/
393    };
394
395    THEME.RemoveSocial  = function(){
396        $('.youtube, .twitter, .disqus_comment').append('<div class="noview"><div><strong>Content blockiert</strong>Ihre aktuellen Cookie-Einstellungen lassen die Anzeige von Drittanbietern nicht zu.</div></div>');
397        $('#disqus_thread').replaceWith('<div id="disqus_thread"></div>');
398    };
399    THEME.InitSocial = function(){
400        $('.youtube .noview, .twitter .noview, .disqus_comment .noview').remove();
401        loadDisqus();
402    };
403
404    PARALLAX.animateNow = function(element,animClass){
405        window.setTimeout(function(){
406            element.addClass('animate__animated '+animClass);
407            element.removeClass('is-anim');
408        },10);
409    };
410    function loadDisqus()   {
411        if($('#disqus_thread').length!=0){
412				   var d = document, s = d.createElement('script');
413				   s.src = 'https://mdvcms.disqus.com/embed.js';
414				   s.setAttribute('data-timestamp', +new Date());
415				   (d.head || d.body).appendChild(s);
416        }
417    }
418    THEME.ShareInitNow = function(){
419        if($('.share').length!=0){
420            var _FB = 'https://www.facebook.com/sharer/sharer.php?u='+document.location.href;
421            var _TW = 'https://twitter.com/intent/tweet?text='+document.location.href;
422            var _LI = 'http://www.linkedin.com/shareArticle?mini=true&url='+document.location.href+'&title=&source='+document.location.href;
423            var _PI = 'https://pinterest.com/pin/create/button/?url='+document.location.href+'&media=&description=';
424            var _WA = 'https://wa.me/?text='+document.location.href;
425            $('.share a.wa').bind('click',function(){
426                window.open(_WA,'','');
427            });
428            $('.share a.fb').bind('click',function(){
429                popupwindow(_FB, 'Auf Facebook teilen', 640, 480);
430            });
431            $('.share a.tw').bind('click',function(){
432                popupwindow(_TW, 'Auf Twitter teilen', 640, 480);
433            });
434            $('.share a.li').bind('click',function(){
435                popupwindow(_LI, 'Auf LinkedIn teilen', 640, 480);
436            });
437            $('.share a.pi').bind('click',function(){
438                popupwindow(_PI, 'Auf Pinterest teilen', 640, 480);
439            });
440            $('.share a.em').bind('click',function(){
441                document.location.href = 'mailto:?&subject=&body='+document.location.href;
442            });
443        }
444    };
445
446    THEME.doNL = false;
447    THEME.registerNewsletter = function(){
448        var send = true;
449        var _DATA = {};
450        $('content article .form input').each(function(){
451            if($(this).attr("required") && $.trim($(this).val())==""){
452                $(this).addClass("error");
453                send = false;
454            }else{
455                $(this).removeClass("error");
456                _DATA[$(this).attr("name")] = $.trim($(this).val());
457            }
458        });
459        if(send == false){
460            SYS.alert(SEARCH_ERROR_01_TITLE,NL_ERROR_02_TEXT,function(){
461                
462            });
463        }else{
464            NL_SEND_TEXT = $('content article .act a').text();
465            $('content article .act a').html(NL_SAVE_TEXT);
466            if($('content article .form select').val()=="in"){ THEME.doNL = "in"; }else{ THEME.doNL = "out"; }
467            $.ajax({
468                method: "POST",
469                url: "./api",
470                data: { 
471                    "do": "save_nl",
472                    "set" : THEME.doNL,
473                    "data" : _DATA,
474                    "_"     : Math.random()
475                },
476                success: function(data){
477                    var API = JSON.parse(data);
478                    if(API.error){
479                        if(THEME.doNL == "out" && (API.error == 404 || API.error == "404")){
480                            SYS.alert(SEARCH_ERROR_01_TITLE,NL_ERROR_NFOUND,false);
481                            $('content article .act a').html(NL_SEND_TEXT);
482                        }
483                        else if(THEME.doNL == "in" && (API.error == 404 || API.error == "404")){
484                            SYS.alert(SEARCH_ERROR_01_TITLE,NL_ERROR_FOUND,false);
485                            $('content article .act a').html(NL_SEND_TEXT);
486                        }
487                    }else{
488                        if(THEME.doNL == "in"){
489                            SYS.alert(OKAY_TITLE,NL_OKAY_TEXT,function(){
490                                location.reload();
491                            });
492                        }else{
493                            SYS.alert(OKAY_TITLE,NL_OKAY_TEXT2,function(){
494                                location.reload();
495                            });
496                        }
497                    }
498                }
499            });
500        }
501    };
502
503    function popupwindow(url, title, w, h) {
504        var left = (screen.width/2)-(w/2);
505        var top = (screen.height/2)-(h/2);
506        return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left
506='+left);
507      } 
508$(document).ready(function(){
509    THEME.Init();
510    THEME.ShareInitNow();
511});
512
513
514
515
516
517
518
519

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.