jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 

(function($){
	$(
		function(){
			$.mask.masks = $.extend($.mask.masks,{ 
				datepl:{mask: '39-19-2999', defaultValue: '______' }, 
				datemysql:{mask: '2999-19-39', defaultValue: '________' }, 
				pcode:{mask:'99-999', defaultValue: '_____' },
			    phone2:{mask:'999 99 99 99', defaultValue: '_________' },
				shortint: {mask:'9999', type : 'reverse', defaultValue:'0'},
			    shortdecimal: {mask:'99.9999', type : 'reverse', defaultValue:'000'}
			  });
			if ($("#flashMessage").length > 0 ) {
				$("#infoBar").hide("fast",
				function() 
					{
				    $("#flashMessage").fadeIn("normal").fadeOut("fast").fadeIn("fast",
				        function() { $("#flashMessage").fadeOut(5000, 
				        function() { $("#infoBar").show("fast");}); });
					}
				);
			  }

		}
	);
})(jQuery);

