/*
 * @package armc.ru
 * @section project script
 * @date 17/01/2012
 * @lastmodified 17/01/2012
 * @version 1.0
 * 
 * @author BINN
 */

// Placeholder Plugin
jQuery.fn.extend({
    placeHolder : function() {
		
		this.focus(function(){ 
			if (jQuery(this).attr("value") == jQuery(this).attr("title")){
				jQuery(this).attr("value", "");
			}
		});
		this.blur(function(){
			if (jQuery(this).attr("value") == ""){
				jQuery(this).attr("value", jQuery(this).attr("title"));
			}
		});
		this.parents('form').submit(function(){
			if (jQuery(this).attr("value") == jQuery(this).attr("title")){
				jQuery(this).attr("value", "");
			}
		});
    }
});

$(document).ready(function() {

    // PIE Init
    if (window.PIE) {
        $(".pie").each(function() {
            PIE.attach(this);
        });
    }

	// Placeholder Init
	$(".inputbox").placeHolder();

});

