// plPopup.min.js v 0.7
// by Radiocity @bk.ru
// Requests: jquery 1.4.3+
(f unction($){var f={width:'400',height:'200',background:false,html:'',url:'',close:'close'};var g;$.fn.plPopup=f unction(d){g=$.extend({},f,g,d);var e=1+Math.floor(Math.random()*1024);if(g.background){if(!$("div").is("#plup_fade")){$("body").append('<div id="plup_fade'+e+'" class="plup_fade"></div>');$("#plup_fade"+e).hide()}}$("body").append('<div id="plup_msg'+e+'" class="plup_msg" st yle="width:'+parseInt(g.width)+'px; min-height:'+parseInt(g.height)+'px; height:'+parseInt(g.height)+'px; margin-top: -'+(parseInt(g.height)/2)+'px; margin-left: -'+(parseInt(g.width)/2)+'px;"></div>');$("#plup_msg"+e).html('<div class="plup_data"></div>');if(g.html){$("#plup_msg"+e+" .plup_data").html(g.html)}else{if(g.url){$("#plup_msg"+e+" .plup_data").load(g.url,f unction(a,b,c){if(b=="error"){$("#plup_msg"+e+" .plup_data").html('<b>plPopup:</b> Error loading data =(</div>')}})}else{$("#plup_msg"+e+" .plup_data").html('<b>plPopup:</b> Nothing to render! =(')}}$("#plup_msg"+e).hide();if(g.close){$("#plup_msg"+e).append('<div class="plup_close"><a href="#" title="'+g.close+'">'+g.close+'</a></div>')}$(this).click(f unction(){$("#plup_fade"+e).show();$("#plup_msg"+e).fadeIn('slow')});$("#plup_msg"+e+" .plup_close a, #plup_fade"+e).click(f unction(){$("#plup_msg"+e).fadeOut('slow');$("#plup_fade"+e).delay(8000).hide()});return this}})(jQuery);
|