$(document).ready(function () {
    /* Einstellungen */
    TimeDown = 800; //Geschwindigkeit Einblenden
    TimeUp = 500; //Geschwindigkeit Ausblenden
    Link = "/Portrait/Infoanlaesse.aspx";
    var Height = $("#Infoanlaesse").css("top");
    if (($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0")) || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i)) {
        //bei Mouseover
        $("#InfoToggle").mousedown(function () {
            document.location.href = Link;
        });
    }
    else {
        //Einblenden bei Mouseover
        $("#InfoToggle").mousedown(function () {
            if (($("#Infoanlaesse").attr('class') == 'geschlossen')) {
                $("#Infoanlaesse").removeClass('geschlossen').addClass('offen');
                $("#InfoToggle").attr('title', 'Infoanlässe schliessen');
                $("#Infoanlaesse").animate({ top: "0px" }, TimeDown);
            }
            else if (($("#Infoanlaesse").attr('class') == 'offen')) {
                $("#InfoToggle").attr('title', 'Infoanlässe öffnen');
                $("#Infoanlaesse").animate({ top: Height }, TimeUp);
                setTimeout(function () { $("#Infoanlaesse").removeClass('offen').addClass('geschlossen'); }, (TimeUp));
            }
        });
    } //end else
}); 
