try { var map; var gdir; $(document).ready(function() { seminar_ort = $(".seminar_ort").html(); seminar_strasse = $(".seminar_strasse").html(); if (seminar_ort && seminar_strasse) if (seminar_ort.length > 0 && seminar_strasse.length > 0) loadGoogleMap(seminar_ort + ", " + seminar_strasse); }); function setDirections(fromAddress) { seminar_ort = $(".seminar_ort").html(); seminar_strasse = $(".seminar_strasse").html(); if (seminar_ort && seminar_strasse && gdir) { if (seminar_ort.length > 0 && seminar_strasse.length > 0){ gdir.load("from: " + fromAddress + " to: " + seminar_ort + ", " + seminar_strasse,{ "locale": "de"}); } } } function loadGoogleMap(address) { geocoder = new GClientGeocoder(); if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("google_map_anfahrt"),{size:new GSize(570, 450)}); gdir = new GDirections(map, document.getElementById("google_directions")); GEvent.addListener(gdir, "error", handleErrors); if (geocoder) { geocoder.getLatLng(address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 14); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml($('.seminar_name').html() + "

" + $(".seminar_ort").html() + '
' + $(".seminar_strasse").html()); } }); } } } function handleErrors(){ var status = gdir.getStatus(); $.get("../../content_scripts/ajax/GMapErrorHandle.php", "error_number=" + status.code, function(data){ $("#google_directions").html(data); }); } } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { init_FontSize(11.5, 'px', 1); }); // Ende $(document).ready(); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { $(' .text').each(function() { try { $(this).find(' p:first').css('display', 'inline'); } catch (ex) { console.debug(ex); } }); $(' .event_text').each(function() { try { $(this).find(' p:first').css('display', 'inline'); } catch (ex) { console.debug(ex); } }); }); // Ende $(document).ready(); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { $('#tabs_content').tabs(); $("#tabs_content ul li a").click(function(){ if($.browser.version != 6.0) $("#center").redrawShadow(); }); }); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function(){ $("#faq-list").treeview( { collapsed: true, animated: "fast" } ); }); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function(){ $("#sitemap-list").treeview( { collapsed: true, animated: "fast" }); }); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { $(".hidden").hide(); }); // Ende $(document).ready(); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { if( $.browser.version != 6.0) { $("#center").dropShadow( { left : -3, top : 3, blur : 2, opacity : 0.3 }); } }); // Ende $(document).ready(); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function() { $("a[href^=#]").each(function() { $(this).click(function() { var $href = $(this).attr("href"); $href = $href.split("#"); $href = "#" + $href[1]; window.location.hash = $href; return false; }); }); // Empty Search-Field on focus, refill on blur var $val; $("#such_input, .empty-on-focus").focus(function() { $val = $(this).val(); $(this).val(""); }).blur(function() { if ($(this).val().length <= 0) { $(this).val($val); } }); var options = { toPrint: "#content, #content2, #content3, #content4, #content5, #seminar_wrapper" }; //$(".print").print(options); $("#newsletter_anmeldung").validate(); }); } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(document).ready(function(){ $('a.karte_punkt_tip').cluetip({mouseOutClose: true,sticky: true,closeText:'', dropShadow: false, width: 300 }); }); } catch(ex) { try { log(ex); } catch(ex2) { } } try { /******************************************************************************* * log() : sort of var_dump() for JS ******************************************************************************/ var log = function(){ if (window && window.console && window.console.log) { for (var i = 0, len = arguments.length; i < len; i++) { console.log(arguments[i]); } } else { for (var i = 0, len = arguments.length; i < len; i++) { $("body").prepend(arguments[i]); } } };// Ende log } catch(ex) { try { log(ex); } catch(ex2) { } } try { $(function(){ $(".fb").fancybox(); //Get our elements for faster access and set overlay width var div = $('div.fbScroll'), ul = $('ul.fbScroll'), // unordered list's left margin ulPadding = 15; //Get menu width var divWidth = div.width(); //Remove scrollbars div.css({overflow: 'hidden'}); //Find last image container var lastLi = ul.find('li:last-child'); //When user move mouse over menu div.mousemove(function(e){ //As images are loaded ul width increases, //so we recalculate it each time var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding; var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth; div.scrollLeft(left); }); $(".fbScrollNav a.fbScrollNext").click(function(){ var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding; ul.width(ulWidth); div.scrollLeft( div.scrollLeft() + 50); }); $(".fbScrollNav a.fbScrollPrev").click(function(){ var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding; ul.width(ulWidth); div.scrollLeft(div.scrollLeft() - 50); }); }); } catch(ex) { try { log(ex); } catch(ex2) { } }