var LILoaded = false; var LILoading = false; function drawMap(latitude, longitude, html) { if (GBrowserIsCompatible()) { var point = new GLatLng(latitude, longitude); var map = new GMap2(document.getElementById('map')); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(point, 14); var marker = new GMarker(point); map.addOverlay(marker); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); marker.openInfoWindowHtml(html); } } function moveScroller() { var move = function() { var st = $(window).scrollTop(); var ot = $("#header-anchor").offset().top; var s = $("#header-scroller"); if(st > ot) { s.css({ position: "fixed" }); /* $('#content-wrapper').css({ backgroundAttachment: "fixed" }); */ } else { if(st <= ot) { s.css({ position: "static" }); /* $('#content-wrapper').css({ backgroundAttachment: "" }); */ } } }; $(window).scroll(move); move(); } $(function() { moveScroller(); $('#quick-search').submit(function() { if ($('#quick-search input[name="q"]').val() == 'search events') $('#quick-search input[name="q"]').val(''); return true; }); $('a[target="_blank"],a.external').live('click', function() { $.ajax({ type: 'POST', url: '/include/service/external-click.php', data: {url: $(this).attr("href"), referrer_url: window.location.href}, async: false }); }); $('#header #new-message').animate({opacity: 1}, 2000) // delay .animate({opacity: 0}, 250).animate({opacity: 0}, 250) // fade out and wait .animate({opacity: 1}, 250).animate({opacity: 1}, 250) // fade in and wait .animate({opacity: 0}, 250).animate({opacity: 0}, 250) // fade out and wait .animate({opacity: 1}, 250).animate({opacity: 1}, 250) // fade in and wait .animate({opacity: 0}, 250).animate({opacity: 0}, 250) // fade out and wait .animate({opacity: 1}, 250); // fade in if ($.browser.safari) $('.hideSafari').hide(); }); $(document).ready(function() { var scroll = 0; var marginTop = 10; $(window).scroll(function (e) { marginTop = ($(document).scrollTop() - scroll) + marginTop; scroll = $(document).scrollTop(); if ($(".ui-widget-overlay")) { //get the current popup position of the dialog box pos = $(".ui-dialog").position(); //adjust the dialog box so that it scrolls as you scroll the page $(".ui-dialog").css({ position: 'fixed' }); } }); });