(function(A){var B=jQuery;B.fn.mullinx=function(D){var D=B.extend({},B.fn.mullinx.defaults,D);var C=new Date().getTime();return this.each(function(K,F){var L=jQuery(this);L.status="bottom";var M=L.offset();var I={w:L.width(),h:L.height()};var J={};var G=L.attr("rev").split(D.separator);if(G.length>0&&G[0]!=""){var N=B("<div></div>").attr("id","mux_"+K+"_"+C).css({position:"absolute",top:M.top+I.h+"px",backgroundColor:"transparent",display:"none",fontFamily:D.fontFamily,letterSpacing:"-0.025em",fontWeight:"bold",fontSize:D.fontSize}).bind("mouseleave",function(P){N.hide()});var O='<li><a href="'+L.attr("href")+'" style="color:'+D.color+';display:block;text-decoration:none;white-space:nowrap;" target="'+L.attr("target")+'">'+L.html()+"</a></li>";B.each(G,function(){var P=this.split(D.sub_separator);O+='<li style="margin:2px 0;"><a href="'+B.trim(P[0])+'" style="color:'+D.color+';display:block;text-decoration:none;white-space:nowrap;" target="'+L.attr("target")+'">'+B.trim((P[1]?P[1]:P[0]))+"</a></li>"});O='<ul style="margin:0;padding:0;list-style:none;list-style-image:none;">'+O+"</ul>";B(N).roundbox({id:"mux_"+K+"_"+C+"_rc",content:O,bgcolor:D.bgcolor,opacity:D.opacity});N.appendTo(B(document.body));N.find("li a").hover(function(){B(this).css({"text-decoration":"underline",color:D.hoverColor})},function(){B(this).css({"text-decoration":"none",color:D.color})}).click(function(P){N.hide()});function H(){N.find("ul li").each(function(){A(this).prependTo(A(this).parent())})}function E(P){if(P<0){if(L.status!="top"){H();L.status="top";N.find("div.arrow").css({top:J.h+"px",height:"12px"}).find("span").eq(0).html("v").css({top:"-52px",marginLeft:"11px"})}}else{if(L.status!="bottom"){H();L.status="bottom";N.find("div.arrow").css({top:"-8px",height:"8px"}).find("span").eq(0).html("A").css({top:"0px",marginLeft:"0px"})}}}B("<div></div>").addClass("arrow").html('<span style="position:relative;top:0px;margin-left:0px;">A</span>').css({position:"absolute",color:D.bgcolor,width:"40px",left:"-15px",top:"-8px",height:"8px",fontSize:"86px",lineHeight:"56px",fontFamily:"Times New Roman",fontWeight:"bold",overflow:"hidden",opacity:D.opacity}).appendTo("#"+N.attr("id")+"_rc");L.bind("mouseenter",function(Q){M=L.offset();N.show();J=(J.w)?J:{w:N.children("div").eq(0).width(),h:N.children("div").eq(0).height()};var R=B(window).width()-(M.left+J.w);var P=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;P=(B(window).height()+P)-(M.top+I.h+J.h);E(P);N.css({left:M.left+(R<0?(R-5):0)+"px",width:J.w+"px",top:(P<0)?(M.top-19-J.h+"px"):(M.top+I.h+"px")}).children("div").eq(0).css({top:"8px"}).children("div.arrow").eq(0).css({left:(R<0?(-R):-15)+"px"})}).bind("mouseleave",function(P){if(L.status=="bottom"&&!(P.pageY>=M.top+I.h)){N.hide()}if(L.status=="top"&&!(P.pageY<=M.top)){N.hide()}});B(window).resize(function(P){M=L.offset();N.css({top:M.top+I.h+"px"})})}})};jQuery.fn.roundbox=function(){var C=jQuery.extend({bgcolor:"#000",color:"#fff",opacity:0.8},arguments[0]||{});var D='<em class="ctl"><b>&bull;</b></em><em class="ct">&nbsp;</em><em class="ctr"><b>&bull;</b></em><em class="cl">&nbsp;</em><em class="c_box">&nbsp;</em><em class="cr">&nbsp;</em><em class="cbl"><b>&bull;</b></em><em class="cb">&nbsp;</em><em class="cbr"><b>&bull;</b></em><div style="text-align:left;z-index:9002;margin:5px;padding:8px;color:'+C.color+';position:relative;">'+C.content+'</div><div style="clear:both;"></div>';var E=jQuery("<div>"+D+"</div>").attr("id",C.id).css("position","absolute").appendTo(this).children(".ctl,.ctr,.cbl,.cbr").css({width:"6px",height:"6px",color:C.bgcolor,background:"transparent",overflow:"hidden",fontStyle:"normal",zIndex:1}).end().find("em").css({position:"absolute",zIndex:9001,color:C.bgcolor,opacity:C.opacity}).end().find(".ct,.cr,.cb,.cl,.c_box").css("background",C.bgcolor).end().find(".ct").css({top:"0",height:"6px",left:"6px",right:"6px"}).end().find(".cl").css({top:"6px",width:"6px",left:"0",bottom:"6px"}).end().find(".c_box").css({top:"6px",bottom:"6px",left:"6px",right:"6px"}).end().find(".cr").css({top:"6px",bottom:"6px",width:"6px",right:"0"}).end().find(".cb").css({height:"6px",bottom:"0",left:"6px",right:"6px"}).end().find(".ctl").css({top:"0",left:"0",height:"6px"}).end().find(".cbl").css({bottom:"0",left:"0"}).end().find(".ctr").css({top:"0",right:"0",height:"6px"}).end().find(".cbr").css({bottom:"0",right:"0"}).end().find("em b").css({position:"absolute",fontSize:"60px",fontFamily:"arial",lineHeight:"16px",fontWeight:"normal",color:C.bgcolor}).end().find(".ctl b").css({left:"-3px",top:"0px"}).end().find(".ctr b").css({left:"-12px",top:"0"}).end().find(".cbl b").css({left:"-3px",top:"-9px",bottom:"0"}).end().find(".cbr b").css({left:"-12px",top:"-9px",bottom:"0"}).end();if(jQuery.browser.msie&&jQuery.browser.version<7){E.css("background-color",C.bgcolor)}return this};B.fn.mullinx.defaults={separator:";",sub_separator:"|",bgcolor:"#000",color:"#fff",hoverColor:"#ffff00",opacity:0.9,fontSize:"0.8em",fontFamily:"Arial"}})(jQuery);
