/* //////////////////////////////////////////////////////////////// // // Allgemeine JavaScript Funktionen // // Weblication CMS Strukturdesign Version 5.1.0.0 // erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de // erstellt mit Weblication Content Management Server, www.weblication.de // //////////////////////////////////////////////////////////////// */ //////////////////////////////////////////////////////////////// // // @method void wOpenPrintPreview(url) // // @desc Öffnet die aktuelle Seite in der Druckvorschau // // @return void // //////////////////////////////////////////////////////////////// function wOpenPrintPreview(width, height, name){ var name = name || 'printpreview'; var url = location.href.indexOf('?') == -1 ? location.href + '?viewmode=print' : location.href + '&viewmode=print'; wOpenPopupURL(url, width, height, name); } //////////////////////////////////////////////////////////////// // // @method void wOpenURL(url) // // @desc Öffnet eine Seite // // @return void // //////////////////////////////////////////////////////////////// function wOpenURL(url, target){ if(location.pathname.indexOf('/weblication/grid5/') != 0){ if(target == '_blank'){ window.open(url); } else{ top.location.href = url; } } } //////////////////////////////////////////////////////////////// // // @method void wOpenPopupURL(url, width, height, name) // // @desc Öffnet eine Seite in einem Popup // // @return void // //////////////////////////////////////////////////////////////// function wOpenPopupURL(url, width, height, name){ var name = name || ''; if(width == '' || width == ' ' || typeof(width) == 'undefined'){ width = 786; } if(height == '' || height == ' ' || typeof(height) == 'undefined'){ height = 677; } url = url.replace(/&/g, '&'); options = ',location=no, menubar=no,toolbar=no,resizable=no,scrollbars=yes,status=no'; width = parseInt(width); height = parseInt(height); var posLeft = (screen.width / 2) - (width / 2); var posTop = (screen.height / 2) - (height / 2); //alert(name); window.open(url, name, 'top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options); } //////////////////////////////////////////////////////////////// // // @method void wSendMailNospam(data) // // @desc Öffnet eine E-Mail zum Versenden // // @return void // //////////////////////////////////////////////////////////////// function wSendMailNospam(data){ location.href = 'mailto:' + data.replace('|', '@'); } //////////////////////////////////////////////////////////////// // // @method void wEmbedNavpoint(id, url, mode) // // @desc Öffnet einen eingebetteten Navigationspunkt // // @return void // //////////////////////////////////////////////////////////////// function wEmbedNavpoint(id, url, mode){ if(typeof wEditor == 'object'){ return false; } if(jQuery('#navpoint_' + id).data('hasLoaded') == '1'){ jQuery('#navEmbed_' + id).show(); } else{ if(mode == 'embed'){ url = url.indexOf('?') == -1 ? url + '?viewmode=embed' : url + '&viewmode=embed'; url = url.replace('[URL]', location.pathname + location.search); $.ajax({ type: "GET", url: url, success: function(result){ result = result.replace(/\n/g, '_wNL-').replace(/\s+id="[^"]+"/gim, '').replace(/_wNL-/g, "\n"); jQuery('#navpoint_' + id).data('hasLoaded', '1'); jQuery('#navEmbed_' + id).html(result); var navpointLeft = jQuery('#navpoint_' + id).offset().left; jQuery('#navEmbed_' + id).show(); var layerLeft = jQuery('#navEmbed_' + id).offset().left; var blockMainRight = jQuery('#blockMain').offset().left + jQuery('#blockMain').width(); if(layerLeft < navpointLeft){ jQuery('#navEmbed_' + id).css('left', String(navpointLeft - layerLeft - 6) + 'px'); } var layerRight = jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width(); if(layerRight > blockMainRight){ jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left')) - (layerRight - blockMainRight)) + 'px'); } jQuery('#navpoint_' + id).mouseout(function(){ jQuery('#navEmbed_' + id).hide(); }); jQuery('#navEmbed_' + id).mouseover(function(){ jQuery('#navEmbed_' + id).show(); }); jQuery('#navEmbed_' + id).mouseout(function(){ jQuery('#navEmbed_' + id).hide(); }); } }); } else{ url = url.indexOf('?') == -1 ? url + '?viewmode=blank&parentIframeId=navEmbedIframe_'+id : url + '&viewmode=blank&parentIframeId=navEmbedIframe_'+id; url = url.replace('[URL]', location.pathname + location.search); jQuery('#navpoint_' + id).data('hasLoaded', '1'); var iframeEmbed = document.createElement('iframe'); iframeEmbed.id = 'navEmbedIframe_' + id; iframeEmbed.className = 'navLevel1Embed'; iframeEmbed.frameBorder = '0'; iframeEmbed.scrolling = 'no'; iframeEmbed.src = url; var embedContainer = document.getElementById('navEmbed_' + id); embedContainer.appendChild(iframeEmbed); var navpointLeft = jQuery('#navpoint_' + id).offset().left; jQuery('#navEmbed_' + id).show(); var layerLeft = jQuery('#navEmbed_' + id).offset().left; var blockMainRight = jQuery('#blockMain').offset().left + jQuery('#blockMain').width() - 2; if(layerLeft < navpointLeft){ jQuery('#navEmbed_' + id).css('left', String(navpointLeft - layerLeft - 6) + 'px'); } var layerRight = jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width(); if(layerRight > blockMainRight){ jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left')) - (layerRight - blockMainRight)) + 'px'); } jQuery('#navpoint_' + id).mouseout(function(){ jQuery('#navEmbed_' + id).hide(); }); jQuery('#navEmbed_' + id).mouseover(function(){ jQuery('#navEmbed_' + id).show(); }); jQuery('#navEmbed_' + id).mouseout(function(){ jQuery('#navEmbed_' + id).hide(); }); //jQuery('.blockContentEmbed').attr('id', 'blockContent'); //jQuery('.blockContentEmbedInner').attr('id', 'blockContentInner'); } } } //////////////////////////////////////////////////////////////// // // @method void wShowLayerBookmarklet() // // @desc Schlägt vor, diese Webseite als App abzulegen // // @return void // //////////////////////////////////////////////////////////////// function wShowLayerBookmarklet(){ if(/iPhone|iPod/.test(window.navigator.userAgent)){ if(window.localStorage){ if(typeof(window.localStorage['numberBookmarketShown']) == 'undefined' || Number(window.localStorage['numberBookmarketShown']) < 2){ window.localStorage['numberBookmarketShown'] = String(Number(window.localStorage['numberBookmarketShown'] || 0) + 1); var bookmarkletInfo = document.createElement('div'); bookmarkletInfo.id = 'wBookmarkletInfo'; bookmarkletInfo.style.width = '100%'; bookmarkletInfo.style.position = 'absolute'; bookmarkletInfo.style.bottom = '0'; var bookmarkletInfoInner = document.createElement('div'); bookmarkletInfoInner.style.color = '#ffffff'; bookmarkletInfoInner.style.border = 'solid 4px #ffffff'; bookmarkletInfoInner.style.margin = '20px'; bookmarkletInfoInner.style.padding = '8px'; bookmarkletInfoInner.style.overflow = 'hidden'; bookmarkletInfoInner.style.position = 'relative'; bookmarkletInfoInner.style.background = '#cddcf3 -webkit-gradient(linear, left top, left bottom, from(#B5C9D9), to(#6886B0)) no-repeat bottom'; bookmarkletInfoInner.style.WebkitBorderRadius = '8px'; bookmarkletInfoInner.style.WebkitBoxShadow = '0 4px 6px #a0a0a0'; bookmarkletInfo.appendChild(bookmarkletInfoInner); var bookmarkletInfoIcon = document.createElement('img'); bookmarkletInfoIcon.style.margin = '8px'; bookmarkletInfoIcon.style.position = 'absolute'; var linkTags = document.getElementsByTagName('link'); for(var i = 0; i != linkTags.length; i++){ if(linkTags[i].getAttribute('rel') == 'apple-touch-icon'){ bookmarkletInfoIcon.src = linkTags[i].getAttribute('href'); } } bookmarkletInfoInner.appendChild(bookmarkletInfoIcon); var bookmarkletInfoCloser = document.createElement('img'); bookmarkletInfoCloser.src = '/weblication/grid5/gui/images/style/bookmarklet_close.png'; bookmarkletInfoCloser.style.margin = '-4px'; bookmarkletInfoCloser.style.padding = '2px'; bookmarkletInfoCloser.style.background = '#ffffff'; bookmarkletInfoCloser.style.border = 'solid 1px #c0c0c0'; bookmarkletInfoCloser.style.float = 'right'; bookmarkletInfoCloser.onclick = function(){document.getElementById('wBookmarkletInfo').parentNode.removeChild(document.getElementById('wBookmarkletInfo'));window.localStorage['numberBookmarketShown'] = '99'}; bookmarkletInfoInner.appendChild(bookmarkletInfoCloser); var bookmarkletInfoText = document.createElement('div'); bookmarkletInfoText.style.margin = '8px 8px 8px 100px'; bookmarkletInfoText.style.position = 'left'; bookmarkletInfoText.style.backgroundColor = 'none'; bookmarkletInfoText.innerHTML = 'Klicken Sie unten auf das "+" Zeichen und dann auf "Zum Home-Bildschirm hinzufügen", um diese Seiten als App abzulegen.'; bookmarkletInfoInner.appendChild(bookmarkletInfoText); var bookmarkletArrow = document.createElement('div'); bookmarkletArrow.style.height = '23px'; bookmarkletArrow.style.width = '100%'; bookmarkletArrow.style.marginTop = '-23px'; bookmarkletArrow.style.position = 'absolute'; bookmarkletArrow.style.zIndex = '10'; bookmarkletArrow.style.backgroundRepeat = 'no-repeat'; bookmarkletArrow.style.backgroundPosition = 'center'; bookmarkletArrow.style.backgroundImage = 'url(/weblication/grid5/gui/images/style/arrow_bookmarklet.png)'; bookmarkletInfo.appendChild(bookmarkletArrow); document.body.appendChild(bookmarkletInfo); } else{ } } } } //////////////////////////////////////////////////////////////// // // @method void setViewmode(viewmode) // // @desc Setzt den Ansichtsmodus eines Links // // @param viewmode Ansichtmodus // // @return void // //////////////////////////////////////////////////////////////// jQuery.fn.setViewmode = function(viewmode){ jQuery.each(jQuery(this), function(){ var hrefNew = this.getAttribute('href'); var anchor = ''; if(/#[^#]+$/.test(hrefNew)){ anchor = hrefNew.replace(/.*#/, ''); hrefNew = hrefNew.replace(/#.*/, ''); } hrefNew = hrefNew.indexOf('?') != -1 ? hrefNew + '&viewmode=' + viewmode: hrefNew + '?viewmode=' + viewmode; if(anchor != ''){ hrefNew += '#' + anchor; } if(this.innerHTML.indexOf('Zeichen!" }, captcha: "Kein gültiger Sicherheitscode!" } }); $("#refreshimg").click(function(){ $.post('/de-wGlobal/wGlobal/layout/scripts/php/mail/captcha/newsession.php'); $(".reload").load('/de-wGlobal/wGlobal/layout/scripts/php/mail/captcha/image_req.php'); return false; }); $("#refreshimgdel").click(function(){ $.post('/de-wGlobal/wGlobal/layout/scripts/php/mail/captcha/newsession.php'); $(".reloaddel").load('/de-wGlobal/wGlobal/layout/scripts/php/mail/captcha/image_req.php'); return false; }); $(function() { $(".ui-accordion-b").accordion({ autoHeight: false, active: false, navigation: true, collapsible: true }); }); //Autocomplete mit UI-Framework $(function() { function log(message) { $("
").text(message).prependTo("#log"); $("#log").attr("scrollTop", 0); } $.ajax({ url: "/de/suche/autocomplete/autocomplete.xml", dataType: "xml", success: function(xmlResponse) { var data = $("searchname", xmlResponse).map(function() { return { value: $("name", this).text() }; }).get(); $("#searchTerm").autocomplete({ source: data, minLength: 2, select: function(event, ui) { log(ui.item ? ("Selected: " + ui.item.value) : "Nothing selected, input was " + this.value); } }); } }) }); $('#listEntriesPreview_0ce582fe').slick({ dots: false, speed: 1000, slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 5000, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); $('.bgrslideshow').bgStretcher({ images: ['/de/slides/uploads/4_Trifels_001_897x440.jpg','/de/slides/uploads/5_rlf_001_897x440.jpg','/de/slides/uploads/6_Annweiler Wassergasse 19.jpg','/de/slides/uploads/7_SliderTrifelsland.jpg'], imageWidth: 904, imageHeight: 440, slideDirection: 'N', slideShowSpeed: 2000, transitionEffect: 'fade', sequenceMode: 'normal', buttonPrev: '#prev', buttonNext: '#next', pagination: '#navi', anchoring: 'center center', anchoringImg: 'center center' }); $(".jCarouselLite").jCarouselLite({ btnNext: ".slidenext", btnPrev: ".slideprev", auto: 10000, speed: 500, visible: 1 }); $('.bl-login').hide(); $('.bl-call').hide(); $("#call").toggle(function(){ $('.bl-call').show(); $('#gesendet').hide(); $('#contact_wrapper').show(); $("#call").addClass("on");}, function(){ $('.bl-call').hide(); $("#call").removeClass("on");} ); $("#login").toggle(function(){ $('.bl-login').show(); $("#login").addClass("on");}, function(){ $('.bl-login').hide(); $("#login").removeClass("on");} ); $("#datum").datepicker({minDate: -0, maxDate: '+48M +30D', changeMonth: true, changeYear: true }).datepicker($.datepicker.regional['de']); }); this.sitemapstyler = function(){ var sitemap = document.getElementById("sitemap") if(sitemap){ this.listItem = function(li){ if(li.getElementsByTagName("ul").length > 0){ var ul = li.getElementsByTagName("ul")[0]; ul.style.display = "none"; var span = document.createElement("span"); span.className = "collapsed"; span.onclick = function(){ ul.style.display = (ul.style.display == "none") ? "block" : "none"; this.className = (ul.style.display == "none") ? "collapsed" : "expanded"; }; li.appendChild(span); }; }; var items = sitemap.getElementsByTagName("li"); for(var i=0;i