$(document).ready(function() {

    var resize = function() {
		
        var width = $(window).width();
        width = width / 2;
        var target = $("#fixed_form_container");
        width = width - $(target).width();
        width = width - 375;

        if(width < 0) {
            width = 10;
        }
	
        $(target).css("right", width);

    }

    // resize();
    // $(window).resize(resize);

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

        return true;
    });

    function SetPlaceholder(div) {
        $(div).val($(div).attr("placeholder"));
    }

    $("#fixed_form_container input[type=text], #fixed_form_container textarea").each(function() {
        SetPlaceholder(this);

        $(this).focus(function() {
            $(this).val("");
        });

        $(this).focusout(function() {
            if($(this).val() == "") {
                SetPlaceholder(this);
            }
        });
    });

});

  
