$(document).ready(function() {
/*
    // tooltip
    if (document.getElementById("whats_the")) {
        $("#whats_the div.item a").cluetip({splitTitle: ' | ', positionBy: 'mouse'});
    }
*/
    $("#form-order-id input").focus(function () {
         $(this).css('border','1px solid #ff0000');
    });
    $("#form-order-id input").blur(function () {
         $(this).css('border','1px solid #cccccc');
    });
    $("#form-order-id select").focus(function () {
         $(this).css('border','1px solid #ff0000');
    });
    $("#form-order-id select").blur(function () {
         $(this).css('border','1px solid #cccccc');
    });
    $("#form-order-id textarea").focus(function () {
         $(this).css('border','1px solid #ff0000');
    });
    $("#form-order-id textarea").blur(function () {
         $(this).css('border','1px solid #cccccc');
    });

    var elem_class = window.location.hash.replace('#', '');
    if (elem_class) {
        // FAQ
        $("div." + elem_class).toggle();
        $("span." + elem_class).css('display', 'none');

        // Productpage
        switchEff(elem_class);
    }
});

function toggleElem(el) {
    $("#ful_"+el).toggle();
}

function hovEff(el) {
    var $curr = $(el);
    $curr.toggleClass("hover");
}

function switchEff(el) {
    if (document.getElementById("fb_"+el)) {
        $("#functions div.func_body").hide();
        $("#fb_"+el).show();
        $("#functions li.ln_item").removeClass("active");
        $("#ln_"+el).addClass("active");
    }
}
