var $j = jQuery.noConflict();
$j(function(){
$j('.js-placeholder').each(function ( )
{
    (function ( elm )
    {
        var defaultColor    = '#999999';
        $j.data(elm, 'placeholder-string', $j(elm).attr('jqplaceholder'));
        $j.data(elm, 'placeholder-color', $j(elm).css('color'));
        switch ( $j(elm).val() ) {
            case '' :
                $j(elm).val($j.data(elm, 'placeholder-string'));
            case $j.data(elm, 'placeholder-string') :
                $j(elm).css('color', defaultColor);
            break;
        }
        $j(elm).focus(function ( )
        {
            if ( $j(this).val() == $j.data(this, 'placeholder-string') ) {
                $j(this).val('');
                $j(this).css('color', $j.data(this, 'placeholder-color'));
            }
        });
        $j(elm).blur(function ( )
        {
            if ( $j(this).val() == '' ) {
                $j(this).val($j.data(this, 'placeholder-string'));
                $j(this).css('color', defaultColor);
            }
        });
        $j(elm).parents().filter('form').submit(function ( )
        {
            if ( $j(elm).val() == $j.data(elm, 'placeholder-string') ) {
                $j(elm).val('');
            }
            return true;
        });
    })( this )
});
});

