$(document).ready(function () {
    $("input[type=text], textarea")
        .focus(function () {
            $(this).addClass("focus");
            if ($(this).val() == $(this).attr("placeholder")) {
                $(this).val("");
            }
        })
        .blur(function () {
            $(this).removeClass("focus");
            if ($(this).val() == "") {
                $(this).val($(this).attr("placeholder"));
            }
        });

    $(".newsletter a.envie").click(function (event) {
        $(this).parents("form").submit();
        event.preventDefault();
        return false;
    });

    $("a[target=_blank]").click(function (event) {
        var x = (screen.width / 2) - 270;
        var y = (screen.height / 2) - 200;
        var janela = window.open($(this).attr("href"), "popup",
            "left = " + x + ", top = " + y + ", height = 450, width = 650");
        $("body", janela.document).css("background", "#000").css("margin", 0);
        janela.resizeTo(518, 418);
        janela.moveTo(x, y);
        $("img", janela.document).css("margin", "14px 0 0 14px");
        event.preventDefault();
        return false;
    });
});