(function ($) {
	$.fn.extend({
		flash_process: function () {
			return this.each(function (index, selfDom) {
				var selfJq = $(selfDom),
				data = selfJq.metadata();
				
				selfJq
					.empty()
					.flash(data, {update: true, expressInstall: true });
			});
		}
	});
	
	// Hook into all .flash elements
	$(function ($) {
		$(".flash").flash_process();
	});
})(jQuery);
