// function to close notification message
// slideUp the message
function closeNotification(duration){
var divHeight = $('div#info_message').height();
setTimeout(function(){
$('div#info_message').animate({
top: '-'+divHeight
});
// removing the notification from body
setTimeout(function(){
$('div#info_message').remove();
},200);
}, parseInt(duration * 1000));
}
// sliding down the notification
function slideDownNotification(startAfter, autoClose, duration){
setTimeout(function(){
$('div#info_message').animate({
top: 0
});
if(autoClose){
setTimeout(function(){
closeNotification(duration);
}, duration);
}
}, parseInt(startAfter * 1500));
}