File: D:/HostingSpaces/SBogers10/lab.komma-mediadesign.nl/wwwroot/kms2013/kms/public/js/merge/alerts.js
// Animate Alerts
var $mask = $('.alert_mask');
var $alert = $mask.children('.alert');
var $eMark = $alert.children('.icon');
if($mask.length > 0)
{
// Get height + arrow (10)
var mh = $mask.height() + 10;
var mw = $mask.width() + 10;
var speed = 500;
// Set start position
$mask.css({ display: 'block', left: (mw/2-5)+'px', width: '10px', height: 0, top: '-10px' });
$alert.css({ left: -1*(mw/2-5)+'px'});
// Animate
$mask.stop().animate({ left: 0, width: mw+'px', height: mh+'px', top: (-10-mh)+'px' },speed,'easeOutQuart');
$alert.stop().animate({ left: 0 },speed,'easeOutQuart',function()
{
setInterval(function(){
// Animate exclamation mark
$eMark.stop().animate({ top: '-10px' },120,'easeOutCubic',function(){
$eMark.stop().animate({ top: 0 },300,'easeOutBounce');
});
},1500);
});
}