(function () {
if (!('placeholder' in document.createElement('input'))) {
$('input[placeholder], textarea[placeholder]').each(function () {
var that = $(this)
var text = that.attr('placeholder')
if (that.val() === '') {
that.val(text).addClass('placeholder')
that.css('color', '#9A9791')
}
that.focus(function () {
if (that.val() === text) {
that.val('').removeClass('placeholder')
that.css('color', '')
}
})
that.blur(function () {
if (that.val() === '') {
that.val(text).addClass('placeholder')
that.css('color', '#9A9791')
}
})
.closest('form').submit(function () {
if (that.val() === text) {
that.val('')
that.css('color', '')
}
})
})
}
})()