function invertStyle()
{

 if ($("link#ctl00_ctl00_invert").attr("href") != "/styles/leer.css")
  {
   if (navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 6") != -1)
    {
     $.cookie('checkCookie','true',{expires: 2});
     if ($.cookie('checkCookie') == "true") { 
         $("link#ctl00_ctl00_invert").attr("href","/styles/leer.css");
         $.cookie('styleCookie',null);
         location.reload(); }
     else {
         location.reload(); }
    }
    else
    {
   $("link#ctl00_ctl00_invert").attr("href","/styles/leer.css");
   $.cookie('styleCookie',null);
    }
  }
 else
  {
   $("link#ctl00_ctl00_invert").attr("href","/styles/invert.css");
   $.cookie('styleCookie', 'invert', { expires: 2 });
   if (navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 6") != -1)
    {
     $.cookie('checkCookie','true',{expires: 2});
     if ($.cookie('checkCookie') == "true") { 
         location.reload(); }
    }
  }
}

/* ########################################################### */
/* ## Document Ready Funktion ################################ */
/* ########################################################### */

$(document).ready(function(){
  
if ($.cookie('styleCookie') == "invert")
 {
   $("link#ctl00_ctl00_invert").attr("href","/styles/invert.css");
 }

loadZoom();

/* IE 6 BUG Fix Selectboxen */
if (navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 6") != -1)
{

$("#nav06 a,#nav07 a").hover(function () {
 $("#anliegen").css({"visibility": "hidden"});
 $("#stadtteile").css({"visibility": "hidden"});
},function () {
 $("#anliegen").css({"visibility": "visible"});
 $("#stadtteile").css({"visibility": "visible"});
});

}


    /* ::: Start Accordion Function ::: */
    $.each($("div.onAccordion > div"), function(i, n) {
        $(n).children("h3:first-child").addClass("hide");
        jQuery(n).before("<h3 class='onAccHead'>" + $(n).children("h3:first-child").html() + "</h3>");

        if ($(n).hasClass('open')) {
            $(n).prev(".onAccHead").addClass("selected")
            $(n).prev(".onAccHead").addClass("selected")
        } else {
            $(n).addClass("hide");
        }
    });

    $(".onAccHead").click(function() {
        $(this).addClass("current");
        $.each($(this).parent(".onAccordion").children(".selected:not('.current')"), function(i, n) {
            $(n).next("div").animate({ height: 'toggle', opacity: 'toggle' }, { duration: 300,
                complete: function() {
                    $(n).parent(".onAccordion").children(".onAccHead:not('.current')").removeClass("selected");
                } 
            });
        });
        $(this).next("div").animate({ height: 'toggle', opacity: 'toggle' }, { duration: 300,
            complete: function() {
                $(this).prev(".onAccHead").toggleClass("selected");
                $(this).prev(".onAccHead").removeClass("current");
            } 
        });
    });
    /* ##### End Accordion Function ##### */


}); 