var facebox=new Class({Implements:Options,options:{speed:300,fx:Fx.Transitions.linear.easeOut},initialize:function(a,b){this.setOptions(b);this.message=a;var $head=$$("head")[0];if(!$('facebox_css'))new Element('link',{id:'facebox_css',type:'text/css',rel:'stylesheet',media:'all',href:'http://m.oleeee.com/f/c/facebox.css'}).inject($head);if(!$('faceboxContener')){this.contener=new Element('div',{id:'faceboxContener'});this.contener.set('html',this.html()).inject(document.body);}
$facebox=$('facebox');$facebox.getElement('div.wca').set('html',this.message);$facebox.setStyles({top:$(window).getScroll().y+($(window).getHeight()/3),left:$(window).getWidth()/2-(410/2),display:'block',opacity:0});$myFx=new Fx.Tween($facebox,{duration:this.options.speed,transition:this.options.fx});$myFx.start('opacity',1);$facebox.getElement('a.close').addEvent('click',function(e){e.stop();$myFx.start('opacity',0).chain(function(){$facebox.setStyle('display','none');});return false;});},html:function(){return' <div style="top: 0; left: 0;" id="facebox">       <div class="popup">         <table style="width:410px">           <tbody>             <tr>               <td class="tr"/><td class="b"/><td class="tl"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content" style="display: block;"><div class="wca"></div></div>                 <div class="footer" style="display: block;">                   <a class="close" href="#">                     <img class="close_image" title="close" src="http://m.oleeee.com/f/i/themes/defaut/facebox/closelabel.gif"/>                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="br"/><td class="b"/><td class="bl"/>             </tr>           </tbody>         </table>       </div>     </div><div class="facebox_hide facebox_overlayBG" id="facebox_overlay" style="display: block; opacity: 0;"/>';},});;function resizeM(){var newIMG=document.getElementsByTagName('img');for(i=0;i<newIMG.length;i++){manM=new Image();theIMG=newIMG[i];if(newIMG[i].width>maxWidth){newIMG[i].width=maxWidth;newIMG[i].style.cursor="pointer";newIMG[i].onclick=function(){window.open(this.src);}
newDiv=document.createElement("div");newDiv.className="imgAlert";newDiv.style.width=newIMG[i].width-2+"px";newDiv.innerHTML=newMsg;parentDiv=theIMG.parentNode;parentDiv.insertBefore(newDiv,newIMG[i]);}}};window.addEvent('domready',function(){var $t=$$('.fav_it');$cnt='<img src="http://m.oleeee.com/f/i/themes/defaut/Favorites_12x12.png" alt="" /><br />أضف للمفضلة';$cnt_un='<img src="http://m.oleeee.com/f/i/themes/defaut/Favorites_12x12_un.png" alt="" /><br />أزل من المفضلة';var req=new Request({url:'ajax.php',onSuccess:function(txt){var newBox=new facebox(txt);},onFailure:function(){var newBox=new facebox('لم يتم الاتصال بالملفات للازمة للقيام بهده العملية');}});$t.each(function(item){item.addEvent('click',function(){req.send('do=fav&t='+$t.getProperty('rel'));if(item.get('html').test('Favorites_12x12.png')){$t.each(function(it){it.set('html',$cnt_un);});}
else if(item.get('html').test('Favorites_12x12_un.png')){$t.each(function(it){it.set('html',$cnt);});}});});});