$(function(){
	/**
	 * Placeholder
	 *  
	 * http://zachwaugh.com/2008/07/swapping-input-field-placeholder-text-with-jquery/
	 * 
	 * Modifyed by Nadya 05.2010
	 * 
	 */
	ph_attr = 'placeholder';
	ph_cname = '.placeholder';
	function el_focus(el) {
		if ($(el).attr(ph_attr) == undefined) {
			$(el).attr(ph_attr, $(el).attr('defaultValue'));
		}
		if($(el).val() == $(el).attr(ph_attr)) {
	      $(el).val('');
		  $(el).removeClass('ph');
	    }
	}
	function el_blur(el) {
		if($(el).val() == '') {
	      $(el).val($(el).attr(ph_attr));
		  $(el).addClass('ph');
	    } 
	}
	$('input[type=text]'+ph_cname).each( function(){el_blur(this);});
	$(ph_cname+' input[type=text]').each(function(){el_blur(this);});
	$('textarea'+ph_cname).each( function(){el_blur(this);});
	$(ph_cname+' textarea').each(function(){el_blur(this);});

	$('input[type=text]'+ph_cname).focus(function(){	el_focus($(this)); });	  
	$('input[type=text]'+ph_cname).blur( function(){	el_blur($(this)); });
	
	$(ph_cname+' input[type=text]').focus(function(){	el_focus($(this)); });	  
	$(ph_cname+' input[type=text]').blur( function(){	el_blur($(this)); });
	
	$('textarea'+ph_cname).focus(function(){	el_focus($(this)); });	  
	$('textarea'+ph_cname).blur( function(){	el_blur($(this)); });
	$(ph_cname+' textarea').focus(function(){	el_focus($(this));});	  
	$(ph_cname+' textarea').blur( function(){	el_blur($(this)); });
});
