//Cufon
Cufon.replace('.breadcrumb li');
Cufon.replace('h1.title');
Cufon.replace('h2.title');
Cufon.replace('h4.title');
Cufon.replace('.common-form button');
Cufon.replace('.link-button');
Cufon.replace('.download-button');
$(function () {
    $('.search input').focus(function () {
        $(this).siblings('label').hide();
    }).blur(function () {
        if ($(this).val() == "") {
            $(this).siblings('label').show();
        }
    }).keyup(function (e) {
        var code = e.keyCode ? e.keyCode : e.which;
        if (code == 13) {
            //window.location.href = "zoek-" + encodeURIComponent($(this).val()) + ".aspx";
            e.preventDefault();
            var form = $("form");
            form.append("<input name=search value='search'/>")
            // $("form").attr("action", "zoek.aspx");
            form.submit();
            return false;
        }
    });
    //fancybox
    $('.fancybox').fancybox();

    $(".common-form").find("button[type=reset]").click(function (e) {
        e.preventDefault();
        $(".common-form").find("input[type=text]").each(function (index, item) {
            $(item).val("");
        });
        $(".common-form").find(".error-message").hide();
        return false;
    });

    $(".common-form").find("input[type=text]").keyup(function (e) {
        var code = e.keyCode ? e.keyCode : e.which;
        if (code == 13) {
            //window.location.href = "zoek-" + encodeURIComponent($(this).val()) + ".aspx";
            e.preventDefault();
            var form = $("form");
            form.append("<input name=contact value='contact'/>")
            // $("form").attr("action", "zoek.aspx");
            form.submit();
            return false;
        }
    });
})
