cument).ready(function() { $('#shorturl').facebox(); $('#speedmax').facebox(); }); function getChanges(obj,vals){ var oldval=$(obj).val(); if(oldval!=''||this.value!=vals){ $(obj).css("color","black"); } } function clearMumayi(obj,vals){ var oldval=$(obj).val(); if(oldval==vals){ $(obj).val(''); $(obj).css("color","#999999"); } } function showMumayi(obj,vals){ var oldval=$(obj).val(); if(oldval==''){ $(obj).val(vals); $(obj).css("color","#999999"); } } $(function(){ (function(){ var szrzImg=$('.szrz'), szrzLayer=$('.szrzlayer'); var istate=true; szrzImg.click(function(){ if(istate){ fnShow(); istate=false; }else{ if(!istate){ fnClose(); istate=true; }; }; return false; }); $(document).click(function(){ if(!istate){ fnClose(); istate=true; }; }); function fnShow(){ szrzLayer.css({ 'display': 'block', 'left': szrzImg.offset().left, 'top': szrzImg.offset().top+22 }); }; function fnClose(){ szrzLayer.css({ 'display': 'none' }); }; })(); });