function fx(ft, e){ if(typeof ft === 'undefined') ft = 'x'; if(typeof e === 'undefined') e = $('body'); var jdt; $.getJSON("\/en\/_x\/_fx\/x", function(jdt){ var mxL; $('.flash').each(function(i){ if (typeof mxL === 'undefined' || mxL.data('prio') <= $(this).data('prio')) mxL = $(this); }); var xL = e.find('.flash').first(); if(xL) mxL = xL; if(typeof mxL != 'undefined') $('.flash').each( function(i, e){ if( $(e).get(0) === mxL.get(0)) $(e).hide('drop', {direction: 'up'},350, function(){ $('.flash').html(''); if (typeof jdt != 'undefined' && typeof jdt.fx != 'undefined'){ mxL.html(jdt.fx); mxL.show('drop', {direction: 'up'}, 350, function(){}); } }); else $(e).hide('drop', {direction: 'up'},350); }); else alert(jdt.fx); }); }