(function ($) {
    $(function () {
        $('.new-window').live('click', function () {
            window.open(this, null);
            return false;
        });

        $('.focus-clear').addClass("temp");

        $('.focus-clear').live('focus', function () {
            if (this.value == this.defaultValue) {
                this.value = '';
                $(this).removeClass('temp');
            }
        });

        $('.focus-clear').live('blur', function () {
            if (this.value == '') {
                this.value = this.defaultValue;
                $(this).addClass('temp');
            }
        });

        $('.focus-first').focus();

        $('.confirm').click(function () {
            var el = $(this);
            var message = el.data("message");
            if (message == undefined) {
                'Are you sure you want to do this?';
            }

            return confirm(message);
        });

    });
})(jQuery);
