/// <reference path="jquery-1.6.1-vsdoc.js" />
$(function() {
    function closeGaleries(duration) {
        $(".gallery.active").hideFaded(duration).removeClass("active");
    }
    function closePages(duration) {
        $(".page.active").hideFaded(duration).removeClass("active");
    }

    function closeContents(duration) {
        $(".content.active").hideFaded(duration).removeClass("active");
    }

    $(".hiddenOpacity").css({ "opacity": 0, "display": "none" });


    $("#logo").click(function() {
        closeContents(600);
        return false;
    });


    $(".content.gallery").Ggallery();

    $(".openContent").click(function() {
        var elm = $(".content" + $(this).attr("href"));
        if (elm.length != 1) return false;
        

        if (elm.hasClass("active")) {
            closeContents(600);
        }
        else {
            closeContents(1200);
            elm.showFaded(600).addClass("active");
            if (elm.hasClass("gallery")) elm.GmoveToFirstPicture();
        }

        return false;
    });

    if (window.location.hash.length > 1) {
        if ($("a[href=" + window.location.hash + "]").length > 0) {
            $("a[href=" + window.location.hash + "]").trigger("click");
        }
    }



});

 
