/* 

(c) LeanOpen Webdevelopment 2010

To make the value describe the input and let it hide on focus.

Tested with jQuery 1.4.2

*/


doValTag = function(){
    origvalue = new Array
    onch = $('.valuetag')
    onch.each(function(){
        if(this.tagName == 'INPUT'){
            this.origval = this.value;
            this.onfocus = function(){
                if(this.value == this.origval){
                    this.value = '';
                    $(this).addClass('active')
                }
            }
            this.onblur = function(){
                if(this.value == ''){
                    this.value = this.origval;
                    $(this).removeClass('active')
                }
            }
        }
    })
}

$(document).ready(function(){
    doValTag();
})
