<!-- --><script>
$(function(){
    $(".notice, .warning, .message").
        append("<span class=\"sub\">(click to hide)</span>").
        click(function(){
            $(this).fadeOut("fast");
        })
        .css("cursor", "pointer");

    if ($.browser.safari)
        $("input#search").attr({
            placeholder: "Search..."
        });

    if ($("#debug").size())
        $("#wrapper").css("padding-bottom", $("#debug").height());

    $("#debug .toggle").click(function(){
        if (Cookie.get("hide_debug") == "true") {
            Cookie.destroy("hide_debug");
            $("#debug h5:first span").remove();
            $("#debug").animate({ height: "33%" });
        } else {
            Cookie.set("hide_debug", "true", 30);
            $("#debug").animate({ height: 15 });
            $("#debug ul li").each(function(){
                $("<span class=\"sub\"> | "+ $(this).html() +"</span>").appendTo("#debug h5:first");
            })
        }
    })

    $("input#slug").live("keyup", function(e){
        if (/^([a-zA-Z0-9\-\._:]*)$/.test($(this).val()))
            $(this).css("background", "")
        else
            $(this).css("background", "#ff2222")
    })

    if (Cookie.get("hide_debug") == "true") {
        $("#debug").height(15);
        $("#debug ul li").each(function(){
            $("<span class=\"sub\"> | "+ $(this).html() +"</span>").appendTo("#debug h5:first");
        })
    }

    if (!supports_input_placeholder()) {
        $("form").submit(function(){
            $(this).find("input[placeholder]").each(function(){
                if ($(this).val() == $(this).attr("placeholder"))
                    $(this).val("");
            });
        });

        $("input[placeholder]").each(function() {
			if ($(this).val() == "") {
				$(this).val($(this).attr("placeholder"));
				$(this).css("color", "#888");
				$(this).data("modified", false);
			} else
				$(this).data("modified", true);

            $(this).focus(function(){
                if ($(this).data("modified"))
                    return;

                $(this).val('');
                $(this).css("color", "#666");
            });

            $(this).keydown(function(){
                if ($(this).data("modified"))
                    return;

                $(this).data("modified", true);
            });

            $(this).blur(function(){
                if ($(this).val() != "")
                    return;

                $(this).val($(this).attr("placeholder"));
                $(this).css("color", "#888");
                $(this).data("modified", false);
            });
        });
    }

	$("a#contact_sdk").click(function(){
		Shadowbox.open({
			content: $(this).attr("href") + "_js",
			player: "iframe",
			width: 560
		});
		return false;
	});

})

function supports_input_placeholder() {
    var i = document.createElement('input');
    return 'placeholder' in i;
}

Shadowbox.init({
	players: ["html"]
});
<!-- --></script>
