function notify(flash_message)
{
// jQuery: reference div, load in message, and fade in
var flash_div = this.parent.$("#flash");
flash_div.html(flash_message);
flash_div.fadeTo(0, 0);
flash_div.show();
flash_div.fadeTo(100, 1);
// use Javascript timeout function to delay calling
// our jQuery fadeOut, and hide
setTimeout(function(){
flash_div.fadeOut(100,
function(){
flash_div.html("");
flash_div.hide()})},
3000);
}

$(function(){ // <<JQUERY after dom is loaded event
	// hide our container div
	window.parent.$("#flash").hide();
	window.parent.$("#flash").addClass('flash_ajax');
	// grab flash message from our div
	var flash_message = jQuery.trim($("#flash").html());
	// call our flash display function
	if(flash_message.length > 6)
	{
	notify(flash_message);
	}	
})
