﻿$(document).ready(function () {
    
    $("[data-uitype='autoreset']").focus(function () { if ($(this).val() == $(this).attr("data-uitext")) { $(this).val(""); } });
    $("[data-uitype='autoreset']").blur(function () { if ($(this).val() == "") { $(this).val($(this).attr("data-uitext")); } });
    $("[data-uitype='autoreset']").each(function () { if ($(this).val() == "") { $(this).val($(this).attr("data-uitext")); } });

    if ($(".accordinStyle")) {
        $(".accordinStyle dl").hide();
        $(".accordinStyle h2").click(function () {
            if (this.className.indexOf("clicked") != -1) {
                $(this).next().slideUp("fast");
                $(this).removeClass("clicked");
            }
            else {
                $(".accordinStyle h2").show();
                $(this).addClass("clicked");
                $(".accordinStyle dl:visible").slideUp("fast");
                $(this).next().slideDown("fast");
            }
            return false;
        });
    }
    $("div .box,.smallbox").click(function () {
        var url = $(this).children(":first-child").attr("href");
        if (url != undefined) {
            window.location.href = url;
        }
        else {
            window.location.href = "#";
        }
    });
});
