 /* ratio: 22.7% */ urlsClass=new Class({Implements:[Options,Events],options:{},initialize:function(options){},save_comment:function(){showLoading($('submit_comment'));if($('recaptcha_response_field')!=undefined){var recaptcha_response=$('recaptcha_response_field').value;var recaptcha_challenge=$('recaptcha_challenge_field').value}else{var recaptcha_response='';var recaptcha_challenge=''}var text=$('CommentText').value;var url_id=$('CommentUrlId').value;if($('write_comment_err')){$('write_comment_err').destroy()}new Request.JSON({url:'./rpc/urls/save_comment/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){new Fx.Slide('write_comment',{'duration':800,'onComplete':function(){}}).slideOut('vertical');new Element('div',{'id':'write_comment_err','class':'message','html':json.message}).inject('CommentAddForm','before');if(json.guest==true){urls.add_guest_comment($('CommentText').value)}else{urls.update_comments(url_id)}if($('no_comments')!=null&&typeof $('no_comments')!='undefined'){$('no_comments').addClass('hidden')}}else{new Element('div',{'id':'write_comment_err','class':'status_error','html':json.error_message}).injectBefore('write_comment')}hideLoading($('submit_comment'))}}).post({'recaptcha_response':encodeURIComponent(recaptcha_response),'recaptcha_challenge':encodeURIComponent(recaptcha_challenge),'url_id':encodeURIComponent(url_id),'text':encodeURIComponent(text)})},update_comments:function(url_id){if(!$('comments_wrapper')){return false}showLoading($('comments_wrapper'));new Request.HTML({url:'./rpc/urls/get_comments/',onComplete:function(tree,el,html){$('comments_wrapper').set('html',html);hideLoading($('comments_wrapper'))}}).post({'url_id':encodeURIComponent(url_id)})},delete_comment:function(url_id,comment_id){tags.delete_comment(url_id,comment_id)},amazon_ad:function(keyword){new Request.HTML({url:'./rpc/urls/amazon_ad/',onComplete:function(tree,el,html){$('amazon_ad').set('html',html)}}).get({'keyword':encodeURIComponent(keyword)})},add_guest_comment:function(comment){co='<img width="48" height="48" border="0" class="avatar width-48" src="http://img.mister-wong.de/48/default.png"><div style="background: url(\'/img/comment_bubbly.png\') no-repeat scroll 0pt 5px transparent; width: 12px; float: left; height: 48px;" class="spacer"></div><div style="padding: 4px 8px; -moz-border-radius: 5px 5px 5px 5px; background-color: rgb(243, 243, 243); min-height: 40px;" class="container"><div class="text"><span class="quote">“</span><span class="comment">'+comment+'</span><span class="quote">”</span></div><div class="meta">Gast, gerade eben&nbsp;&nbsp;&nbsp;</div></div><div class="clear"></div>';new Element('li',{'id':'new_comment','class':'','html':co}).inject('comments','top');if(!Browser.Engine.trident){fx=new Fx.Slide('new_comment',{duration:800}).hide().slideIn('vertical')}}});var bookmarksClass=new Class({Implements:[Options,Events],options:{},buddys:{},url_title_cache:'http://',ani_yt:false,initialize:function(options){_this=this;_this.twitter_enter_message='';_this.twitter_data_res=''},del:function(obj,id,identifier,fromgroup){if(!confirm(lg.text_confirm_popup_bookmark_delete)){return false}var objRPC=new Request.JSON({url:_wp+'rpc/bookmarks/delete/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$(identifier).set('styles',{'margin':'0'});var delFx=new Fx.Slide(identifier,{duration:400,onComplete:function(){$(identifier).destroy()}}).slideOut('vertical')}else{alert('Error!')}}}).post({'id':encodeURIComponent(id),'fromgroup':(fromgroup!=undefined&&fromgroup==true?'yes':'no')})},rating_del:function(obj,id,identifier){if(!confirm(lg.text_confirm_popup_bookmark_delete)){return false}var objRPC=new Request.JSON({url:_wp+'rpc/urls/delete_rating/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$(identifier).set('styles',{'margin':'0'});var delFx=new Fx.Slide(identifier,{duration:400,onComplete:function(){$(identifier).destroy()}}).slideOut('vertical')}else{alert('Error!')}}}).post({'id':encodeURIComponent(id)})},get_url_title:function(url_id,refreshId){var url=$(url_id).value;if(url==bookmarks.url_title_cache){return false}bookmarks.url_title_cache=url;showLoading($('title_loading'));var objRPC=new Request.JSON({url:_wp+'rpc/get_url_title/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){hideLoading($('title_loading'));if($(refreshId).get('value')==''){$(refreshId).set('value',json.title)}if(json.tags){if($('tag_suggestions')==undefined){e=new Element('div',{'class':'tag_suggestions','id':'tag_suggestions','html':json.tags});e.inject($('BookmarkTags'),'after')}else{$('tag_suggestions').set('html',json.tags)}_this.set_tag_suggestions_bold()}}else{}}}).post({'url':encodeURIComponent(url)})},set_tag_suggestions_bold:function(){if(typeof $('tag_suggestions')=='undefined'){return false}for(var i=0;i<$('tag_suggestions').childNodes.length;i++){if($('tag_suggestions').childNodes[i].tagName=='A'){for(var j=0;j<aNames.length;j++){if($('tag_suggestions').childNodes[i].innerHTML==aNames[j]){$('tag_suggestions').childNodes[i].innerHTML='<span style="font-weight:bold;">'+aNames[j]+'</span>';continue}}}}},input_fill:function(id,text){if($(id).value==''){$(id).value=text}},input_reset:function(id,text){if($(id).value==text){$(id).value=''}},twitter_preview:function(){showLoading($('TwitterMessageWrapper'));toggle('TwitterMessage');toggle('TwitterPreview');toggle('twitter_chars_left');toggle('TwitterPreviewBtn');toggle('TwitterEditBtn');if($('TwitterPreviewBtn').hasClass('hidden')){var signs=(100-$('TwitterMessage').value.length);$('twitter_chars_left_value').innerHTML=signs}else{hideLoading($('TwitterMessageWrapper'));return true}var content=$('TwitterMessage').value;if(content==_this.twitter_enter_message){content=''}var usr=_this.twitter_data_res!='NO'?_this.twitter_data_res:$('TwitterUsername').value;content='<a href="http://twitter.com/'+usr+'" target="_blank" class="twitter_username">'+usr+'</a> '+content;var objRPC=new Request.JSON({url:'./rpc/shorturls/get/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$('TwitterPreview').innerHTML=content+' <a href="'+json.url+'" target="_blank">'+json.url+'</a>'}else{$('TwitterPreview').innerHTML=content}if(popupmode){auto_set_size()}hideLoading($('TwitterMessageWrapper'))}}).post({'url':encodeURIComponent($('BookmarkUrl').value)})},toggle_twitter_data:function(){if($('BookmarksFacebook').get('checked')||$('BookmarksTwitter').get('checked')){$('TwitterData').removeClass('hidden')}else{$('TwitterData').addClass('hidden')}if(popupmode){auto_set_size()}if(_this.twitter_data_res!=''){return true}},check_twitter_data:function(){var objRPC=new Request.JSON({url:'./rpc/twitter/has_data/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){if(json.res=='NO'){_this.twitter_data_res='NO';$('twitter_connect').setProperty('onclick','window.open(\''+json.url+'\', \'twitter_access\')');$('TwitterUserData').removeClass('hidden')}else{_this.twitter_data_res=json.res;$('TwitterUserData').addClass('hidden');$('post_to_twitter').removeClass('hidden');$('BookmarksTwitter').set('checked','checked');bookmarks.toggle_twitter_data()}}}}).post()},facebook_data_ok:function(){showLoading($('FacebookUserData'));new Request.JSON({url:'./rpc/users/connect/',onComplete:function(json,x){hideLoading($('FacebookUserData'));if(json!=undefined&&json.info=='suc'){$('FacebookUserData').addClass('hidden');$('post_to_facebook').removeClass('hidden');$('BookmarksFacebook').set('checked','checked');bookmarks.toggle_twitter_data()}}}).post()},twitter_data_ok:function(){new Fx.Slide($('TwitterUserData'),{duration:400}).slideOut('vertical');$('twitter_success').removeClass('hidden');new Fx.Slide($('twitter_success'),{duration:400}).hide().slideIn('vertical')},toggle_top_favorite:function(id,unique_id){var objRPC=new Request.JSON({url:'./rpc/bookmarks/toggle_top_favorite/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$(unique_id).src=json.img}else{}}}).post({'id':encodeURIComponent(id)})},start_ani_snap_yt:function(id,thumb){if(thumb.thumb_x==undefined){thumb.thumb_x=1}var ani_snap_yt=function(id){thumb.set('src','http://img.youtube.com/vi/'+id+'/'+thumb.thumb_x+'.jpg');thumb.thumb_x=(thumb.thumb_x>=3)?thumb.thumb_x=1:thumb.thumb_x+1};ani_yt=ani_snap_yt.periodical(400,thumb,id)},stop_ani_snap_yt:function(){$clear(ani_yt)}});Element.implement({getCaretPosition:function(){if(this.createTextRange){var r=document.selection.createRange().duplicate();r.moveEnd('character',this.value.length);if(r.text==='')return this.value.length;return this.value.lastIndexOf(r.text)}else return this.selectionStart}});var ResizableTextbox=new Class({Implements:Options,options:{min:5,max:500,step:7},initialize:function(element,options){var that=this;this.setOptions(options);this.el=$(element);this.width=this.el.offsetWidth;this.el.addEvents({'keydown':function(){this.store('rt-value',this.get('value').length)},'keyup':function(){var newsize=that.options.step*this.get('value').length;if(newsize<=that.options.min)newsize=that.width;if(!(this.get('value').length==this.retrieve('rt-value')||newsize<=that.options.min||newsize>=that.options.max))this.setStyle('width',newsize)}})}});var TextboxList=new Class({Implements:[Events,Options],options:{resizable:{},className:'bit',separator:'###',extrainputs:true,startinput:true,hideempty:true},initialize:function(element,options){this.setOptions(options);this.element=$(element).setStyle('display','none');this.bits=new Hash;this.events=new Hash;this.count=0;this.current=false;this.maininput=this.createInput({'class':'maininput'});this.holder=new Element('ul',{'class':'holder','events':{'click':function(e){e=new Event(e).stop();if(this.maininput!=this.current)this.focus(this.maininput)}.bind(this)}}).inject(this.element,'before').adopt(this.maininput);this.makeResizable(this.maininput);this.setEvents()},setEvents:function(){document.addEvent(Browser.Engine.trident?'keydown':'keypress',function(e){if(!this.current)return;if(this.current.retrieve('type')=='box'&&e.code==Event.Keys.backspace)new Event(e).stop()}.bind(this));document.addEvents({'keyup':function(e){e=new Event(e).stop();if(!this.current)return;switch(e.code){case Event.Keys.left:return this.move('left');case Event.Keys.right:return this.move('right');case Event.Keys.backspace:return this.moveDispose()}}.bind(this),'click':function(){this.fireEvent('onBlur').blur()}.bind(this)})},update:function(){this.element.set('value',this.bits.getValues().join(this.options.separator));return this},add:function(text,html){var id=this.options.className+'-'+this.count++;var el=this.createBox($pick(html,text),{'id':id}).inject(this.current||this.maininput,'before');el.addEvent('click',function(e){e=new Event(e).stop();this.focus(el)}.bind(this));this.bits.set(id,text);if(this.options.extrainputs&&(this.options.startinput||el.getPrevious()))this.addSmallInput(el,'before');return el},addSmallInput:function(el,where){var input=this.createInput({'class':'smallinput'}).inject(el,where);input.store('small',true);this.makeResizable(input);if(this.options.hideempty)input.setStyle('display','none');return input},dispose:function(el){if(el.getPrevious().retrieve('small'))el.getPrevious().destroy();if(this.current==el)this.focus(el.getNext());if(el.retrieve('type')=='box')this.fireEvent('onBoxDispose',el);el.destroy();return this},focus:function(el,nofocus){if(!this.current)this.fireEvent('onFocus',el);else if(this.current==el)return this;this.blur();el.addClass(this.options.className+'-'+el.retrieve('type')+'-focus');if(el.retrieve('small'))el.setStyle('display','block');if(el.retrieve('type')=='input'){this.fireEvent('onInputFocus',el);if(!nofocus)this.callEvent(el.retrieve('input'),'focus')}else this.fireEvent('onBoxFocus',el);this.current=el;return this},blur:function(noblur){if(!this.current)return this;if(this.current.retrieve('type')=='input'){var input=this.current.retrieve('input');if(!noblur)this.callEvent(input,'blur');this.fireEvent('onInputBlur',input)}else this.fireEvent('onBoxBlur',this.current);if(this.current.retrieve('small')&&!input.get('value')&&this.options.hideempty)this.current.setStyle('display','none');this.current.removeClass(this.options.className+'-'+this.current.retrieve('type')+'-focus');this.current=false;return this},createBox:function(text,options){return new Element('li',$extend(options,{'class':this.options.className+'-box'})).set('html',text).store('type','box')},createInput:function(options){var li=new Element('li',{'class':this.options.className+'-input'});var el=new Element('input',$extend(options,{'type':'text','events':{'click':function(e){e=new Event(e).stop()},'focus':function(e){if(!this.isSelfEvent('focus'))this.focus(li,true)}.bind(this),'blur':function(){if(!this.isSelfEvent('blur'))this.blur(true)}.bind(this),'keydown':function(e){this.store('lastvalue',this.value).store('lastcaret',this.getCaretPosition())}}}));return li.store('type','input').store('input',el).adopt(el)},callEvent:function(el,type){this.events.set(type,el);el[type]()},isSelfEvent:function(type){return(this.events.get(type))?!!this.removeEvent(type):false},makeResizable:function(li){var el=li.retrieve('input');el.store('resizable',new ResizableTextbox(el,$extend(this.options.resizable,{min:el.offsetWidth,max:this.element.getStyle('width').toInt()})));return this},checkInput:function(){var input=this.current.retrieve('input');return(!input.retrieve('lastvalue')||(input.getCaretPosition()===0&&input.retrieve('lastcaret')===0))},move:function(direction){var el=this.current['get'+(direction=='left'?'Previous':'Next')]();if(el&&(!this.current.retrieve('input')||((this.checkInput()||direction=='right'))))this.focus(el);return this},moveDispose:function(){if(this.current.retrieve('type')=='box')return this.dispose(this.current);if(this.checkInput()&&this.bits.getKeys().length&&this.current.getPrevious())return this.focus(this.current.getPrevious())}});function set_google_ad_type(gat){mw_google_ad_type=gat}function get_google_ad_type(){return mw_google_ad_type}var google_adnum=0;var google_ad_block=0;function google_ad_request_done(google_ads){var s='';var i;google_ad_block++;if(google_ads.length==0){if(get_google_ad_type()=="image+flash"){s+='<img src="http://s3.trafficmaxx.de/thx.php?sid=f18d4ecac4523cb96235f2e6042346a0&amp;java=no&amp;conversionName=&amp;pageCategory=&amp;campaignName=" alt="" /></div>'}return}if(google_ads[0].type=="image"){s+='<div style="margin-top: 16px;"><a href="'+google_info.feedback_url+'" style="color:#565656;text-decoration:none;font-size:11px;display:block;margin-bottom:5px;">Google Anzeigen</a><a href="'+google_ads[0].url+'" target="_top" title="go to '+google_ads[0].visible_url+'" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+google_ads[0].visible_url+'\';return true"><img border="0" src="'+google_ads[0].image_url+'"width="'+google_ads[0].image_width+'"height="'+google_ads[0].image_height+'"></a></div>'}else if(google_ads[0].type=="flash"){s+='<div style="margin-top: 16px;"><a href="'+google_info.feedback_url+'" style="color:#565656;text-decoration:none;font-size:11px;display:block;margin-bottom:5px;">Google Anzeigen</a>'+'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+google_ad.image_width+'" HEIGHT="'+google_ad.image_height+'"> <PARAM NAME="movie" VALUE="'+google_ad.image_url+'">'+'<PARAM NAME="quality" VALUE="high">'+'<PARAM NAME="AllowScriptAccess" VALUE="never">'+'<EMBED src="'+google_ad.image_url+'" WIDTH="'+google_ad.image_width+'" HEIGHT="'+google_ad.image_height+'" TYPE="application/x-shockwave-flash"'+' AllowScriptAccess="never" '+' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></div>'}else if(google_ads[0].type=="html"){s+='<div style="margin-top: 16px;"><a href="'+google_info.feedback_url+'" style="color:#565656;text-decoration:none;font-size:11px;display:block;margin-bottom:5px;">Google Anzeigen</a>'+google_ads[0].snippet}else{s+='<div style="text-align:left;font-size:11px;margin-bottom: 5px; margin-left: 6px;">'+'<a href="'+google_info.feedback_url+'" style="color:#565656;text-decoration: none;">Google Anzeigen</a>'+'</div>';for(i=0;i<google_ads.length;++i){if(test_afc==1){s+='<div style="margin-bottom: 8px;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size:12px;color:#990000;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight: bold;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;font-size:11px;">'+google_ads[i].line2+'<br>'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size:10px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else if(test_afc==2&&google_ad_block==1){s+='<div onmouseover="this.style.backgroundColor=\'#DDD\';" onmouseout="this.style.backgroundColor=\'#F9F9F9\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; background: #F9F9F9; border: 1px solid #ddd;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 16px;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold; letter-spacing: 0.1em;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else if(test_afc==3&&google_ad_block==1){s+='<div style="margin-bottom: 8px;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size:12px;color:blue;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight: bold;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;font-size:11px;">'+google_ads[i].line2+'<br>'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size:10px;color:green;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else if(test_afc==4&&google_ad_block==1){s+='<div onmouseover="this.style.backgroundColor=\'#fef6e4\';" onmouseout="this.style.backgroundColor=\'#fef6e4\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; background: #fef6e4; border: 1px solid #ffe6ad;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 16px; color: blue;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold; letter-spacing: 0.1em;">'+google_ads[i].line1+'</span></a><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:green !important;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a> '+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span>'+'</div>'}else if(test_afc==500&&google_ad_block==1){s+='<div onmouseover="this.style.backgroundColor=\'#DDD\';" onmouseout="this.style.backgroundColor=\'#EEE\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; background: #EEE; border: 1px solid #AAA;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 14px;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span>'+'<a style="float:right;cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666 !important;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+' '+google_ads[i].visible_url+'</a>'+'</div>'}else if(test_afc==8){s+='<div style="padding: 0px 3px 8px 0px; margin: 3px 0 2px; clear:both;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 14px;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold;">'+google_ads[i].line1+'</span></a> '+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span> '+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else if(test_afc==9){s+='<div onmouseover="this.style.backgroundColor=\'#EEE\';" onmouseout="this.style.backgroundColor=\'#FFF\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; clear:both;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 14px;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else if(test_afc==10){s+='<div onmouseover="this.style.backgroundColor=\'#EEE\';" onmouseout="this.style.backgroundColor=\'#FFF\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; clear:both;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 16px; letter-spacing: 0.1em; font-weight: bold;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}else{s+='<div onmouseover="this.style.backgroundColor=\'#EEE\';" onmouseout="this.style.backgroundColor=\'#FFF\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px;"><a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 14px;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'" onmouseover="window.status=\'gehe zu '+google_ads[i].visible_url+'\'" onmouseout="window.status=\'\'">'+'<span style="text-decoration:underline;font-weight:bold;">'+google_ads[i].line1+'</span></a><br />'+'<span style="color:#000000;">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3+'</span><br />'+'<a style="cursor:pointer;cursor:hand;text-decoration:none;font-size: 12px;color:#666;" onclick="javascript:top.location.href=\''+google_ads[i].url+'\'">'+google_ads[i].visible_url+'</a></div>'}}if(google_ads[0].bidtype=="CPC"){google_adnum=google_adnum+google_ads.length}}if(name=='top'){document.write('<div id="google_ad_unit_top">'+s+'</div>');window.addEvent('domready',function(){if($('adsense_250x250')&&$('google_ad_unit_top')){$('adsense_250x250').set('styles',{'min-height':($('google_ad_unit_top').getCoordinates().height-10)+'px'})}})}else{document.write(s)}return}var BuddyList=new Class({Extends:TextboxList,options:{onBoxDispose:function(item){this.autoFeed(item.retrieve('text'))},onInputFocus:function(){this.autoShow()},onInputBlur:function(el){this.lastinput=el;this.blurhide=this.autoHide.delay(200,this)},autocomplete:{'opacity':0.8,'maxresults':10,'minchars':1}},initialize:function(element,autoholder,options){this.parent(element,options);this.data=[];this.autoholder=$(autoholder).set('opacity',this.options.autocomplete.opacity);this.autoresults=this.autoholder.getElement('ul');var children=this.autoresults.getElements('li');children.each(function(el){this.add(el.innerHTML)},this)},autoShow:function(search){this.autoholder.setStyle('display','block');this.autoholder.getChildren().setStyle('display','none');if(!search||!search.trim()||(!search.length||search.length<this.options.autocomplete.minchars)){this.autoholder.getElement('.default').setStyle('display','block');this.resultsshown=false}else{this.resultsshown=true;this.autoresults.setStyle('display','block').empty();this.data.filter(function(str){return str?str.test(search,'i'):false}).each(function(result,ti){if(ti>=this.options.autocomplete.maxresults)return;var that=this;var el=new Element('li').addEvents({'mouseenter':function(){that.autoFocus(this)},'click':function(e){new Event(e).stop();that.autoAdd(this)}}).set('html',this.autoHighlight(result,search)).inject(this.autoresults);el.store('result',result);if(ti==0)this.autoFocus(el)},this)}return this},autoHighlight:function(html,highlight){return html.replace(new RegExp(highlight,'gi'),function(match){return'<em>'+match+'</em>'})},autoHide:function(){this.resultsshown=false;this.autoholder.setStyle('display','none');return this},autoFocus:function(el){if(!el)return;if(this.autocurrent)this.autocurrent.removeClass('auto-focus');this.autocurrent=el.addClass('auto-focus');return this},autoMove:function(direction){if(!this.resultsshown)return;this.autoFocus(this.autocurrent['get'+(direction=='up'?'Previous':'Next')]());return this},autoFeed:function(text){this.data.include(text);return this},autoAdd:function(el){if(!el||!el.retrieve('result'))return;this.add(el.retrieve('result'));delete this.data[this.data.indexOf(el.retrieve('result'))];this.autoHide();var input=this.lastinput||this.current.retrieve('input');input.set('value','').focus();return this},createInput:function(options){var li=this.parent(options);var input=li.retrieve('input');input.addEvents({'keydown':function(e){this.dosearch=false;switch(new Event(e).code){case Event.Keys.up:return this.autoMove('up');break;case Event.Keys.down:return this.autoMove('down');break;case Event.Keys.enter:if(!this.autocurrent){break}this.autoAdd(this.autocurrent);this.autocurrent=false;this.autoenter=true;break;case Event.Keys.esc:this.autoHide();if(this.current&&this.current.retrieve('input')){this.current.retrieve('input').set('value','')}break;default:this.dosearch=true;break}}.bind(this),'keyup':function(){if(this.dosearch){this.autoShow(input.value)}}.bind(this)});input.addEvent(Browser.Engine.trident?'keydown':'keypress',function(e){if(this.autoenter){new Event(e).stop()}this.autoenter=false}.bind(this));return li},createBox:function(text,options){var li=this.parent(text,options);return li.addEvents({'mouseenter':function(){this.addClass('bit-hover')},'mouseleave':function(){this.removeClass('bit-hover')}}).adopt(new Element('a',{'href':'#','class':'closebutton','events':{'click':function(e){new Event(e).stop();if(!this.current){this.focus(this.maininput)}this.dispose(li)}.bind(this)}})).store('text',text)}});var google_ad_arr=new Array();var google_ad_top=0;var google_ad_bottom=0;function google_afs_request_done(google_ads){var google_num_ads=google_ads.length;if(google_num_ads<=0){return}var wideAds="";var wideAdsBottom="";var narrowAds="";for(i=0;i<google_num_ads;i++){line_1=google_ads[i].line1;line_2=google_ads[i].line2;if(google_ads[i].line3)line_3=google_ads[i].line3;else line_3="";if(google_ads[i].type=="text/wide"){if(i<google_ad_top){if(typeof(mw_channel)!='undefined'&&mw_channel=='search'){wideAds+='<div style="padding: 2px 0px 2px 0px; margin-bottom: 5px;" ><a style="text-decoration:none;font-size:14px" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_line1" style="letter-spacing: 0.1em; font-size: 16px;">'+google_ads[i].line1+'</span></a><br>'+'<span class="ad_text">'+google_ads[i].line2+'</span><br>'+'<a style="text-decoration:none" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_url">'+google_ads[i].visible_url+'</span></a></div>'}else{wideAds+='<div onmouseover="this.style.backgroundColor=\'#EEE\';" onmouseout="this.style.backgroundColor=\'#FFF\';" style="padding: 6px 3px 6px 6px; margin: 3px 0 2px; "><a style="text-decoration:none;font-size:14px" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_line1">'+google_ads[i].line1+'</span></a><br>'+'<span class="ad_text">'+google_ads[i].line2+'</span><br>'+'<a style="text-decoration:none" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_url">'+google_ads[i].visible_url+'</span></a></div>'}}else{wideAdsBottom+='<a style="text-decoration:none;font-size:14px" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_line1">'+google_ads[i].line1+'</span></a><br>'+'<span class="ad_text">'+google_ads[i].line2+'</span><br>'+'<a style="text-decoration:none" onmouseover="javascript:window.status=\''+google_ads[i].url+'\';return true;" '+'onmouseout="javascript:window.status=\'\';return true;" '+'href="'+google_ads[i].url+'">'+'<span class="ad_url">'+google_ads[i].visible_url+'</span><br><br></a>'}}else{}}if(wideAds!=""){wideAds='<a class="ad_header" style="color:#565656;font-size: 11px;text-decoration:none;margin-bottom:5px; margin-left: 6px;" href="http://services.google.com/feedback/online_hws_feedback">'+google_ad_text+'</a>'+wideAds;document.getElementById("google_ad_unit_top").innerHTML=wideAds}if(wideAdsBottom!=""){wideAdsBottom='<a class="ad_header" style="color:#565656;font-size: 11px;text-decoration:none;margin-bottom:5px; margin-left: 6px;" href="http://services.google.com/feedback/online_hws_feedback">'+google_ad_text+'</a>'+wideAdsBottom;document.getElementById("google_ad_unit_bottom").innerHTML=wideAdsBottom}window.addEvent('domready',function(){if($('adsense_250x250')&&$('google_ad_unit_top')){$('adsense_250x250').set('styles',{'min-height':($('google_ad_unit_top').getCoordinates().height-10)+'px'})}})}tagsClass=new Class({Implements:[Options,Events],options:{},buddys:{},tagcloud_navi_toggle:function(obj,id){},add_tag_to_form:function(tag,id){var tags=$(id).value;var tag_arr=tags.split(' ');var newtags;var deleted=false;for(i=0;i<tag_arr.length;i++){if(tag_arr[i]!=""){if(tag_arr[i]!=tag){if(newtags){newtags=newtags+" "+tag_arr[i]}else{newtags=tag_arr[i]}}else{deleted=true}}}if(deleted==false){newtags=(newtags?newtags+" ":"")+tag}if(typeof(newtags)=='undefined'){newtags=''}$(id).value=newtags},set_user_tags:function(type){var bundles=$$('#tagcloud .bundler');var has_bundles=bundles.length>0;$('tagnavi_list').removeClass('underline');$('tagnavi_cloud').removeClass('underline');if($('tagcloud_inner_'+type).hasClass('hidden')==false){return true}if(type=='list'){var p2=$('tagcloud_inner_list');var p=$('tagcloud_inner_cloud');p.getElements('a').each(function(a){var li=a.getParent('li');li.innerHTML=li.innerHTML.replace(/ $/,'');if(has_bundles){var bid=parseInt(li.get('rel').replace(/b-/,''));li.inject($('bundle-'+bid))}});bundles.each(function(a){a.removeClass('hidden')});$('tagnavi_list').addClass('underline')}else{bundles.each(function(a){a.addClass('hidden')});var p2=$('tagcloud_inner_cloud');var p=$('tagcloud_inner_list');p.getElements('a').each(function(a){var li=a.getParent('li');li.innerHTML+=' ';if(has_bundles){li.inject(p)}});$('tagnavi_cloud').addClass('underline')}p2.innerHTML=p.innerHTML;p.addClass('hidden');p2.removeClass('hidden');new Request.JSON({url:'./rpc/users/set_tag_type/'}).post({'type':encodeURIComponent(type)});return true},extend_comment:function(id,avatar_html,url_id){var activity=false;if(typeof(url_id)!="undefined"){activity=true;url_id=id}var textarea=$('comment_text_'+id).set('onfocus','').removeEvents('focus');if(textarea.getParent().getElement('img')==null){new Element('img',{'class':'avatar','width':24,'height':24,'src':_user['avatar'],'style':'float:left; margin-right:5px;'}).inject($('comment_'+id),'top');textarea.setStyle('width',(textarea.getStyle('width').toInt()-29)+'px')}if(textarea.get('used')==undefined||!textarea.get('used')){textarea.addEvent('keydown',function(){textarea.set('used',true)})}if(textarea.get('cto')==undefined||!textarea.get('cto')){textarea.set('cto',textarea.value)}textarea.set('value','').setStyles({'height':'39px','color':'#333','border':'1px solid #cc3333','padding':'3px'}).addClass('flext growme maxheight-200');new Element('small',{'class':'comment_chars','html':'<span id="comment_chars_value">5000</span> '+lg.text_left_chars}).inject($('comment_'+id),'bottom');new Element('input',{'type':'submit','value':'Speichern!','id':'comment_save_'+id,'events':{click:function(){tags.submit_comment(id,textarea.getParent().getElement('img').get('src'),activity);return false}}}).inject($('comment_'+id),'bottom');new Element('div',{'class':'clear2'}).inject($('comment_'+id),'bottom');new Flext(textarea);textarea.addEvents({blur:function(){tags.unextend_comment(id,false)},keyup:function(){checkLength(textarea,'comment_chars_value',5000,4900)}});return true},unextend_comment:function(id,force){var textarea=$('comment_text_'+id);if(force||textarea.value==''||textarea.get('used')==undefined||!textarea.get('used')){if($('comment_'+id).getElement('img')){var avatar_html=$('comment_'+id).getElement('img').get('src')}textarea.setStyles({'height':'14px','color':'#777','border':'1px solid #f5cfcf','padding':'4px 3px'}).addEvent('focus',function(){tags.extend_comment(id,avatar_html)}).removeEvents('blur').removeClass('flext growme maxheight-200');$('comment_'+id).getElement('input').dispose();$('comment_'+id).getElement('small').dispose();$('comment_'+id).getElement('.clear2').dispose();textarea.set('used',undefined).set('value',textarea.get('cto'))}},submit_comment:function(id,avatar_html,activity){showLoading($('comment_save_'+id));var text=$('comment_text_'+id).get('value');if($('write_comment_err')){$('write_comment_err').destroy()}var path='urls';if(activity){path='activities'}new Request.JSON({url:'./rpc/'+path+'/save_comment/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){hideLoading($('comment_save_'+id));tags.create_comment(id,json.comment.text,json.comment.user_name,avatar_html);tags.unextend_comment(id,true)}else{e=new Element('div',{'id':'write_comment_err','class':'status_error','html':json.error_message}).injectBefore($('comment_text_'+id))}}}).post({'url_id':encodeURIComponent(id),'text':encodeURIComponent(text)})},create_comment:function(id,text,user_name,avatar_html){var container=new Element('div',{'class':'comments_avatar ac_comment','html':': "'+text+'"<div class="clear2"></div>'});new Element('a',{'href':'./user/'+user_name+'/','html':user_name,'class':'username'}).inject(new Element('strong').inject(container,'top'),'top');new Element('img',{'src':avatar_html,'class':'avatar','width':'24','height':'24'}).inject(container,'top');container.inject($('comments_'+id),'bottom')},comment_show_delete:function(id){$('comment_delete_'+id).removeClass('hidden')},comment_hide_delete:function(id){$('comment_delete_'+id).addClass('hidden')},delete_comment:function(url_id,comment_id){if(comment_id<=0||url_id<=0){return false}showLoading($('comment_delete_'+comment_id));new Request.JSON({url:'./rpc/urls/delete_comment/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){new Fx.Slide('comment_'+comment_id,{duration:600,onComplete:function(){$('comment_'+comment_id).destroy()}}).slideOut('vertical')}else if(json!=undefined&&json.msg!=undefined){alert(json.msg);hideLoading($('comment_delete_'+comment_id))}else{alert(lg.text_users_error_deleting_comment);hideLoading($('comment_delete_'+comment_id))}}}).post({'url_id':encodeURIComponent(url_id),'comment_id':encodeURIComponent(comment_id)});return true},recommend:function(obj,url_id){if($(obj).getParents('li')[0].getElement('#recommend_container')){tags.recommend_close();return false}tags.recommend_close();e=new Element('div',{'class':'recommend','id':'recommend_container','html':'<h3>'+lg.head_recommend_bookmark+'</h3><div class="input text"><label for="recommend_to">'+lg.text_email_or_username+'</label><input id="recommend_to" style="width: 200px;" /> <select id="recommend_to_list" style="width:90px;"><option value="">'+lg.title_buddys+'</option></select></div><div class="input text"><label for="recommend_comment">'+lg.title_users_your_comment+'</label><input id="recommend_comment" style="width: 300px;" /></div><div><div class="submit"><input class="button" id="recommend_submit" name="submit_invitation" value="'+lg.word_recommend+'" onclick="tags.recommend_send();" type="button"> <input class="button" name="cancel" value="'+lg.word_cancel+'" onclick="tags.recommend_close(); return false;" type="reset" style="margin:0;"></div></div>'});e.injectInside(obj.getParents('li')[0]);new Element('input',{'type':'hidden','value':url_id,'id':'recommend_url'}).injectInside($('recommend_container'));if(tags.buddys.length==undefined){$('recommend_to_list').options.length=1;$('recommend_to_list').options[1]=new Option(lg.word_loading);new Request.JSON({url:'./rpc/buddys/list',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$('recommend_to_list').options.length=1;tags.buddys=json.buddys;tags.recommend_set_buddys()}}}).post()}else{tags.recommend_set_buddys()}$('recommend_to_list').removeEvents('change');$('recommend_to_list').addEvent('change',function(){tags.recommend_set()})},recommend_send:function(){showLoading($('recommend_submit'));var emails=encodeURIComponent($('recommend_to').value);var comment=encodeURIComponent($('recommend_comment').value);var url=encodeURIComponent($('recommend_url').value);new Request.JSON({url:'./rpc/buddys/recommend',onComplete:function(json){if(json!=undefined&&json.info=='suc'){var recommend_class='status_success'}else{var recommend_class='status_error'}$('recommend_container').getElements('.status_success').each(function(a){a.destroy()});$('recommend_container').getElements('.status_error').each(function(a){a.destroy()});new Element('div',{'class':recommend_class,'html':json.msg}).injectInside($('recommend_container'));hideLoading($('recommend_submit'))}}).post({'emails':emails,'comment':comment,'url':url})},recommend_close:function(){$$('.recommend').each(function(a){a.destroy()})},recommend_set:function(){if($('recommend_to_list').selectedIndex!=0){var str_value=($('recommend_to_list').value?$('recommend_to_list').value:$('recommend_to_list').options[$('recommend_to_list').selectedIndex].innerText);$('recommend_to').value=str_value}},recommend_set_buddys:function(){tags.buddys.each(function(a){$('recommend_to_list').options[$('recommend_to_list').options.length]=new Option(a)})},toggle_more_tags:function(btn,id){toggle(id);if($(id).hasClass('hidden')){btn.set('html','[&raquo;]')}else{btn.set('html','[&laquo;]')}},toggle_top_favorite:function(id,unique_id){new Request.JSON({url:'./rpc/bookmarks/toggle_top_favorite/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){$(unique_id).src=json.img}else{}}}).post({'id':encodeURIComponent(id)})},vote:function(id,rating,url){var rating_element=$('rating_'+id);if(id==0&&typeof(url)!="undefined"){id=url}var rating_class=rating==-1?'down':'up';var rating_button=rating_element.getElement('.rating_'+rating_class);var rating_result=rating_element.getElement('.rating_result');var rating_unused=rating_element.getElement('.rating_'+(rating==-1?'up':'down'));if(rating_unused!=null){rating_unused.removeClass('active')}if(rating_button.hasClass('active')){rating_button.removeClass('active').addClass('rating_'+rating_class)}else{rating_button.addClass('active')}new Request.JSON({url:_wp+'rpc/urls/save_rating/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){if(rating==1&&json.bookmarked==false&&rating_button.hasClass('active')&&typeof(__info_popup)!="undefined"){info(rating_button,__info_popup,275,12000,true)}var summary=$('ratings_summary_'+id);if(typeof(summary)!="undefined"&&summary!=null){summary.set('html','');if(json.rating_count>0){summary.set('html',lg.text_avg_rating);var pp=json.rating_p/json.rating_count;var username=json.username;var pc=1-pp;var max=240;var p_container=new Element('div',{'class':'pro_container','html':'<div class="icon"></div> '+Math.round(pp*100)+'%'});new Element('div',{'class':'pro',html:' ','styles':{'width':Math.round(max*pp)+3}}).inject(p_container.inject(summary,'bottom').getElement('.icon'),'after');if(username!=null){summary.set('html',summary.get('html')+'<a href="/user/'+username+'/liked/">'+lg.text_click_here+'</a> '+lg.text_for_websites_you_like)}summary.removeClass('hidden')}else{summary.addClass('hidden')}}}}}).post({'u':id,'v':rating,'l':(rating_from!=undefined?rating_from:'other')})},ac_vote:function(id,rating,e){showLoading(e);new Request.JSON({url:_wp+'rpc/urls/save_rating/',onComplete:function(json){if(json!=undefined&&json.info=='suc'){hideLoading(e);if(json.rating>0){e.set('html','dir gefällt das')}else{e.set('html','gefällt mir')}}}}).post({'u':id,'v':rating,'l':'stream','item_id':$(e).getParent('.ac_item').get('data-id')})},attach_tools:function(id){$('tools_'+id).setStyle('display','none');$('bookmark_'+id).addEvents({'mouseover':function(){this.setStyle('background-color','#f9f9f9');$('tools_'+id).setStyle('display','block')},'mouseout':function(){this.setStyle('background-color','#ffffff');$('tools_'+id).setStyle('display','none')}})}});function toggle_bundle(bundleID){var isClosed=(($('bundle-'+bundleID).style.display=='none')?true:false);if(!isClosed){$('bundle-'+bundleID).style.display='none';$('bundler-'+bundleID).removeClass('folded-out').addClass('folded-in')}else{$('bundle-'+bundleID).style.display='block';$('bundler-'+bundleID).removeClass('folded-in').addClass('folded-out')}}var addBuddyFired=false;var bdLastId=-1;var bdRemoveLastId=-1;function toggle_buddy_msg(str_buddy_name){if($('follow_up_'+str_buddy_name).hasClass('hidden')){$('follow_up_'+str_buddy_name).removeClass('hidden');$('button_confirm_buddy_'+str_buddy_name).setAttribute('href','javascript:document.forms.form_buddy_'+str_buddy_name+'.submit();')}else{$('follow_up_'+str_buddy_name).addClass('hidden');$('text_buddy_'+str_buddy_name).value=''}}function showBuddyDialogue(buddyID,bolRight,strSender){if(addBuddyFired){return false}if($('add_buddy_message')!=undefined&&$('add_buddy_message')!=null){setBuddyDialogueBox(strSender,'add_buddy_message',bolRight);initializeBuddyDialogue(buddyID,bolRight,strSender);return true}showLoading($('addbuddy-'+buddyID));var objRPC=new Request.JSON({url:'./rpc/buddys/dialogue/',onComplete:function(json){if(json!=undefined&&json.info!=undefined&&json.info=='suc'){var bo=$$('body')[0];bo.set('html',bo.get('html')+json.html);hideLoading($('addbuddy-'+buddyID));setBuddyDialogueBox(strSender,'add_buddy_message',bolRight);initializeBuddyDialogue(buddyID,bolRight,strSender)}}}).post({})}function initializeBuddyDialogue(buddyID,bolRight,strSender){if($('add_buddy_message')!=undefined&&$('add_buddy_message')!=null&&!$('add_buddy_message').hasClass('hidden')){hideBuddyDialogue();return false}$('add_buddy_message').buddyID=buddyID;$('add_buddy_message_text').value='';$('add_buddy_message_user').innerHTML='&laquo;'+buddyID+'&raquo;';addBuddyFired=false;$('add_buddy_message').removeClass('hidden');$('add_buddy_send').removeEvents().addEvent('click',function(){addBuddy(buddyID);return false})}function showBuddyRemoveDialogue(buddyID,bolRight,strSender){if(addBuddyFired){return}if($('add_buddy_message_remove')!=undefined){if(!$('add_buddy_message_remove').hasClass('hidden')){hideBuddyRemoveDialogue();return false}setBuddyDialogueBox(strSender,'add_buddy_message_remove',bolRight);initializeBuddyRemoveDialogue(buddyID,bolRight,strSender);return false}showLoading($('addbuddy-'+buddyID));var objRPC=new Request.JSON({url:'./rpc/buddys/dialogue/',onComplete:function(json){if(json!=undefined&&json.info!=undefined&&json.info=='suc'){var bo=$$('body')[0];bo.set('html',bo.get('html')+json.html);hideLoading($('addbuddy-'+buddyID));setBuddyDialogueBox(strSender,'add_buddy_message_remove',bolRight);initializeBuddyRemoveDialogue(buddyID,bolRight,strSender)}}}).post({'type':'remove'})}function initializeBuddyRemoveDialogue(buddyID,bolRight,strSender){$('add_buddy_message_remove_user').innerHTML='&laquo;'+buddyID+'&raquo;';$('add_buddy_message_remove').removeClass('hidden');$('add_buddy_remove_send').removeEvents().addEvent('click',function(){removeBuddy(buddyID);return false})}function hideBuddyDialogue(){if(!$('add_buddy_message').hasClass('hidden')){$('add_buddy_message').addClass('hidden')}}function hideBuddyRemoveDialogue(){if(!$('add_buddy_message_remove').hasClass('hidden')){$('add_buddy_message_remove').addClass('hidden')}}function addBuddy(username,message_to){if(addBuddyFired){return false}if($('add_buddy_message_text')!=undefined&&$('add_buddy_message_text')!=null){var strMessage=$('add_buddy_message_text').value}else{var strMessage=''}addBuddyFired=true;if(message_to!=undefined){showLoading(message_to)}else{showLoading($('add_buddy_send'))}var objRPC=new Request.JSON({url:'./rpc/buddys/add/',onComplete:function(json){if(json!=undefined&&json.info!=undefined&&json.info=='suc'){if(message_to!=undefined){hideLoading(message_to);message_to.getParent().set('html',json.msg)}else{hideLoading($('add_buddy_send'));$('addbuddy-'+username).set('html',json.msg)}$('addbuddy-'+username).removeEvents().addEvent('click',function(){return false});$('addbuddy-'+username).set('onclick','return false;');if($('add_buddy_message_text')!=undefined&&$('add_buddy_message_text')!=null){hideBuddyDialogue()}addBuddyFired=false;return true}if(message_to!=undefined){hideLoading(message_to)}else{hideLoading($('add_buddy_send'))}if(json!=undefined&&json.msg!=undefined&&json.msg!=''){alert(json.msg)}else{alert('Error!')}addBuddyFired=false}}).post({'username':encodeURIComponent(username),'text':encodeURIComponent(strMessage)})}function removeBuddy(username){if(addBuddyFired){return false}addBuddyFired=true;showLoading($('add_buddy_remove_send'));var objRPC=new Request.JSON({url:'./rpc/buddys/remove/',onComplete:function(json){if(json.info=='suc'){$('addbuddy-'+username).innerHTML=json.msg;hideBuddyRemoveDialogue()}else{alert('Error!')}hideLoading($('add_buddy_remove_send'))}}).post({'username':encodeURIComponent(username)})}function setBuddyDialogueBox(strSender,strTarget,bolRight){var intY=getY($(strSender))+(Browser.Engine.trident?20:20);var intX=getX($(strSender))+(Browser.Engine.trident?0:0);if(strSender=='addbuddy-5-href'){intY=intY-100}if(bolRight){intX=intX-283;$(strTarget+'_arrow').addClass('right')}else{$(strTarget+'_arrow').removeClass('right')}$(strTarget).style.top=intY+'px';$(strTarget).style.left=intX+'px'}var featuredLinksClass=new Class({Implements:[Options,Events],options:{},eff_popular_more_info:null,bolRecentPopularInProgress:null,bolRecentPopularInfoOpen:false,current_language:null,popular_cache:null,slide_reverse:false,initialize:function(options){if(!$("popular_more_container")){return false}this.popular_more_eff=new Fx.Slide("popular_more_container",{duration:400,onComplete:this.change_link});this.popular_more_eff.hide();$('popular_more_container').removeClass('hidden');this.myFxPopular=new Fx.Morph('popular');this.myFxPopularContainer=new Fx.Morph('popular_container');this.myFxPopular2=new Fx.Morph('popular2');this.myFxPopularContainer2=new Fx.Morph('popular_container2',{onComplete:function(){this.swap_ids()}.bind(this)});if($('popular_more_info')!=null){this.eff_popular_more_info=new Fx.Morph('popular_more_info')}this.bolRecentPopularInfoOpen=false;this.set_current_language('de');this.popular_cache=new Object},set_current_language:function(language){if(this.current_language!=null){$('popular_link_'+this.current_language).setStyle('text-decoration','underline').removeEvents().addEvent('click',function(){featured_links.slide(this.current_language);return false})}$('popular_link_'+language).setStyle('text-decoration','none').removeEvents().addEvent('click',function(){return false});this.current_language=language},slide:function(str_lang){if(str_lang==this.current_language||this.bolRecentPopularInProgress){return false}var parent=this;this.bolRecentPopularInProgress=true;this.set_state(str_lang);if($('popular_more_info')&&this.bolRecentPopularInfoOpen){this.eff_popular_more_info.start({'opacity':[1,0]})}str_rp_pass_language=str_lang;if(this.popular_more_eff.open){this.popular_more_eff.addEvent('onComplete',function(obj){parent.slide_init()});this.popular_more_eff.toggle()}else{parent.slide_init()}},set_state:function(str_lang){if($('recent_popular_lang')==null){return false}if(str_lang=='en'){str_lang='com'}for(var i=0;i<$('recent_popular_lang').childNodes.length;i++){if($('recent_popular_lang').childNodes[i].hasChildNodes()){$('recent_popular_lang').childNodes[i].childNodes[0].className='';if($('recent_popular_lang').childNodes[i].childNodes[0].innerHTML==str_lang){$('recent_popular_lang').childNodes[i].childNodes[0].className='selected'}}}},change_link:function(){},add_to_cache:function(str_language){if(!this.popular_cache[str_language]){this.popular_cache[str_language]=new Object}if(!this.slide_reverse){this.popular_cache[str_language]['popular']=$('popular').get('html')}else{this.popular_cache[str_language]['popular']=$('popular2').get('html')}this.popular_cache[str_language]['more']=$('popular_more_container').innerHTML},slide_init:function(){this.popular_more_eff.removeEvents();str_lang=str_rp_pass_language;this.add_to_cache(this.current_language);this.set_state(str_lang);if(this.popular_cache[str_lang]){this.start_slide(this.popular_cache[str_lang]['popular'],this.popular_cache[str_lang]['more'],str_lang)}else{$('popular_more_loader').innerHTML='<img src="'+_wp+'/img/loading.gif" alt="loading" />';var obj_rpc=new Request.HTML({url:'./rpc/featured_links/get_intl_links/',onComplete:function(tree,el,html){html=html.split('<!-- more -->');this.start_slide(html[0],html[1],str_lang)}.bind(this)}).post({'lang':encodeURIComponent(str_lang)})}},get_int_links_ready:function(tree,el,html){this.start_slide(html,'','es')},start_slide:function(str_popular_content,str_popular_more_content,str_language){if(!this.slide_reverse){$('popular2').innerHTML=str_popular_content;$('popular2').setStyle('margin-left',0);this.myFxPopular.start({'margin-left':[0,-600]});this.myFxPopularContainer.start({'width':[600,0]});this.myFxPopularContainer2.start({'width':[0,600]})}else{$('popular').innerHTML=str_popular_content;$('popular').setStyle('margin-left',0);this.myFxPopular2.start({'margin-left':[0,-600]});this.myFxPopularContainer2.start({'width':[600,0]});this.myFxPopularContainer.start({'width':[0,600]})}this.slide_reverse=!this.slide_reverse;$('popular_more_container').innerHTML=str_popular_more_content+'&nbsp;';this.set_current_language(str_language)},set_state:function(str_lang){if($('recent_popular_lang')==null){return false}if(str_lang=='en'){str_lang='com'}for(var i=0;i<$('recent_popular_lang').childNodes.length;i++){if($('recent_popular_lang').childNodes[i].hasChildNodes()){$('recent_popular_lang').childNodes[i].childNodes[0].className='';if($('recent_popular_lang').childNodes[i].childNodes[0].innerHTML==str_lang){$('recent_popular_lang').childNodes[i].childNodes[0].className='selected'}}}},swap_ids:function(){$('popular_more_loader').innerHTML='';this.bolRecentPopularInProgress=false;var str_lang_desc;if($('popular_more_info')){$('popular_more_info').innerHTML=lang['text_browser_burners_'+this.current_language];if(!this.bolRecentPopularInfoOpen){this.eff_popular_more_info.start({'height':[0,15],'opacity':[0,1]});this.bolRecentPopularInfoOpen=true}else{this.eff_popular_more_info.start({'opacity':[0,1]})}}if(this.slide_reverse){this.swap_nodes($('popular_container2'),$('popular_container'))}else{this.swap_nodes($('popular_container'),$('popular_container2'))}},swap_nodes:function(obj_node1,obj_node2){var nextSibling=obj_node1.nextSibling;var parentNode=obj_node1.parentNode;obj_node2.parentNode.replaceChild(obj_node1,obj_node2);parentNode.insertBefore(obj_node2,nextSibling)},toggle_more:function(){this.popular_more_eff.toggle();obj=$$('#popular_container'+(this.slide_reverse?'2':'')+' li')[2];if(obj.hasClass('dots')){obj.addClass('nodots').removeClass('dots')}else{obj.addClass('dots').removeClass('nodots')}}});var Observer=new Class({Implements:[Options,Events],options:{periodical:false,delay:1000},initialize:function(el,onFired,options){this.element=$(el)||$$(el);this.addEvent('onFired',onFired);this.setOptions(options);this.bound=this.changed.bind(this);this.resume()},changed:function(){var value=this.element.get('value');if($equals(this.value,value))return;this.clear();this.value=value;this.timeout=this.onFired.delay(this.options.delay,this)},setValue:function(value){this.value=value;this.element.set('value',value);return this.clear()},onFired:function(){this.fireEvent('onFired',[this.value,this.element])},clear:function(){$clear(this.timeout||null);return this},pause:function(){if(this.timer)$clear(this.timer);else this.element.removeEvent('keyup',this.bound);return this.clear()},resume:function(){this.value=this.element.get('value');if(this.options.periodical)this.timer=this.changed.periodical(this.options.periodical,this);else this.element.addEvent('keyup',this.bound);return this}});var $equals=function(obj1,obj2){return(obj1==obj2||JSON.encode(obj1)==JSON.encode(obj2))};var Autocompleter=new Class({Implements:[Options,Events],options:{minLength:1,markQuery:true,width:'inherit',maxChoices:8,injectChoice:null,customChoices:null,emptyChoices:null,visibleChoices:true,className:'autocompleter-choices',zIndex:65558,delay:400,observerOptions:{},fxOptions:{},autoSubmit:false,overflow:false,overflowMargin:25,selectFirst:false,filter:null,filterCase:false,filterSubset:false,forceSelect:false,selectMode:true,choicesMatch:null,multiple:false,separator:', ',separatorSplit:/\s*[,;]\s*/,autoTrim:false,allowDupes:false,cache:true,relative:false},initialize:function(element,options){this.element=$(element);this.setOptions(options);this.build();this.observer=new Observer(this.element,this.prefetch.bind(this),$merge({'delay':this.options.delay},this.options.observerOptions));this.queryValue=null;if(this.options.filter)this.filter=this.options.filter.bind(this);var mode=this.options.selectMode;this.typeAhead=(mode=='type-ahead');this.selectMode=(mode===true)?'selection':mode;this.cached=[]},build:function(){if($(this.options.customChoices)){this.choices=this.options.customChoices}else{this.choices=new Element('ul',{'class':this.options.className,'styles':{'zIndex':this.options.zIndex}}).inject(document.body);this.relative=false;if(this.options.relative){this.choices.inject(this.element,'after');this.relative=this.element.getOffsetParent()}this.fix=new OverlayFix(this.choices)}if(!this.options.separator.test(this.options.separatorSplit)){this.options.separatorSplit=this.options.separator}this.fx=(!this.options.fxOptions)?null:new Fx.Tween(this.choices,$merge({'property':'opacity','link':'cancel','duration':200},this.options.fxOptions)).addEvent('onStart',Chain.prototype.clearChain).set(0);this.element.setProperty('autocomplete','off').addEvent((Browser.Engine.trident||Browser.Engine.webkit)?'keydown':'keypress',this.onCommand.bind(this)).addEvent('click',this.onCommand.bind(this,[false])).addEvent('focus',this.toggleFocus.create({bind:this,arguments:true,delay:100})).addEvent('blur',this.toggleFocus.create({bind:this,arguments:false,delay:100}))},destroy:function(){if(this.fix)this.fix.destroy();this.choices=this.selected=this.choices.destroy()},toggleFocus:function(state){this.focussed=state;if(!state)this.hideChoices(true);this.fireEvent((state)?'onFocus':'onBlur',[this.element])},onCommand:function(e){if(!e&&this.focussed)return this.prefetch();if(e&&e.key&&!e.shift){switch(e.key){case'enter':if(this.element.value!=this.opted)return true;if(this.selected&&this.visible){this.choiceSelect(this.selected);return!!(this.options.autoSubmit)}break;case'up':case'down':if(!this.prefetch()&&this.queryValue!==null){var up=(e.key=='up');this.choiceOver((this.selected||this.choices)[(this.selected)?((up)?'getPrevious':'getNext'):((up)?'getLast':'getFirst')](this.options.choicesMatch),true)}return false;case'esc':case'tab':this.hideChoices(true);break}}return true},setSelection:function(finish){var input=this.selected.inputValue,value=input;var start=this.queryValue.length,end=input.length;if(input.substr(0,start).toLowerCase()!=this.queryValue.toLowerCase())start=0;if(this.options.multiple){var split=this.options.separatorSplit;value=this.element.value;start+=this.queryIndex;end+=this.queryIndex;var old=value.substr(this.queryIndex).split(split,1)[0];value=value.substr(0,this.queryIndex)+input+value.substr(this.queryIndex+old.length);if(finish){var tokens=value.split(this.options.separatorSplit).filter(function(entry){return this.test(entry)},/[^\s,]+/);if(!this.options.allowDupes)tokens=[].combine(tokens);var sep=this.options.separator;value=tokens.join(sep)+sep;end=value.length}}this.observer.setValue(value);this.opted=value;if(finish||this.selectMode=='pick')start=end;this.element.selectRange(start,end);this.fireEvent('onSelection',[this.element,this.selected,value,input])},showChoices:function(){var match=this.options.choicesMatch,first=this.choices.getFirst(match);this.selected=this.selectedValue=null;if(this.fix){var pos=this.element.getCoordinates(this.relative),width=this.options.width||'auto';this.choices.setStyles({'left':pos.left,'top':pos.bottom,'width':(width===true||width=='inherit')?pos.width:width})}if(!first)return;if(!this.visible){this.visible=true;this.choices.setStyle('display','');if(this.fx)this.fx.start(1);this.fireEvent('onShow',[this.element,this.choices])}if(this.options.selectFirst||this.typeAhead||first.inputValue==this.queryValue)this.choiceOver(first,this.typeAhead);var items=this.choices.getChildren(match),max=this.options.maxChoices;var styles={'overflowY':'hidden','height':''};this.overflown=false;if(items.length>max){var item=items[max-1];styles.overflowY='scroll';styles.height=item.getCoordinates(this.choices).bottom;this.overflown=true};this.choices.setStyles(styles);this.fix.show();if(this.options.visibleChoices){var scroll=document.getScroll(),size=document.getSize(),coords=this.choices.getCoordinates();if(coords.right>scroll.x+size.x)scroll.x=coords.right-size.x;if(coords.bottom>scroll.y+size.y)scroll.y=coords.bottom-size.y;window.scrollTo(Math.min(scroll.x,coords.left),Math.min(scroll.y,coords.top))}},hideChoices:function(clear){if(clear){var value=this.element.value;if(this.options.forceSelect)value=this.opted;if(this.options.autoTrim){value=value.split(this.options.separatorSplit).filter($arguments(0)).join(this.options.separator)}this.observer.setValue(value)}if(!this.visible)return;this.visible=false;if(this.selected)this.selected.removeClass('autocompleter-selected');this.observer.clear();var hide=function(){this.choices.setStyle('display','none');this.fix.hide()}.bind(this);if(this.fx)this.fx.start(0).chain(hide);else hide();this.fireEvent('onHide',[this.element,this.choices])},prefetch:function(){var value=this.element.value,query=value;if(this.options.multiple){var split=this.options.separatorSplit;var values=value.split(split);var index=this.element.getSelectedRange().start;var toIndex=value.substr(0,index).split(split);var last=toIndex.length-1;index-=toIndex[last].length;query=values[last]}if(query.length<this.options.minLength){this.hideChoices()}else{if(query===this.queryValue||(this.visible&&query==this.selectedValue)){if(this.visible)return false;this.showChoices()}else{this.queryValue=query;this.queryIndex=index;if(!this.fetchCached())this.query()}}return true},fetchCached:function(){return false;if(!this.options.cache||!this.cached||!this.cached.length||this.cached.length>=this.options.maxChoices||this.queryValue)return false;this.update(this.filter(this.cached));return true},update:function(tokens){this.choices.empty();this.cached=tokens;var type=tokens&&$type(tokens);if(!type||(type=='array'&&!tokens.length)||(type=='hash'&&!tokens.getLength())){(this.options.emptyChoices||this.hideChoices).call(this)}else{if(this.options.maxChoices<tokens.length&&!this.options.overflow)tokens.length=this.options.maxChoices;tokens.each(this.options.injectChoice||function(token){var choice=new Element('li',{'html':this.markQueryValue(token)});choice.inputValue=token;this.addChoiceEvents(choice).inject(this.choices)},this);this.showChoices()}},choiceOver:function(choice,selection){if(!choice||choice==this.selected)return;if(this.selected)this.selected.removeClass('autocompleter-selected');this.selected=choice.addClass('autocompleter-selected');this.fireEvent('onSelect',[this.element,this.selected,selection]);if(!this.selectMode)this.opted=this.element.value;if(!selection)return;this.selectedValue=this.selected.inputValue;if(this.overflown){var coords=this.selected.getCoordinates(this.choices),margin=this.options.overflowMargin,top=this.choices.scrollTop,height=this.choices.offsetHeight,bottom=top+height;if(coords.top-margin<top&&top)this.choices.scrollTop=Math.max(coords.top-margin,0);else if(coords.bottom+margin>bottom)this.choices.scrollTop=Math.min(coords.bottom-height+margin,bottom)}if(this.selectMode)this.setSelection()},choiceSelect:function(choice){if(choice)this.choiceOver(choice);this.setSelection(true);this.queryValue=false;this.hideChoices()},filter:function(tokens){return(tokens||this.tokens).filter(function(token){return this.test(token)},new RegExp(((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp(),(this.options.filterCase)?'':'i'))},markQueryValue:function(str){return(!this.options.markQuery||!this.queryValue)?str:str.replace(new RegExp('('+((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp()+')',(this.options.filterCase)?'':'i'),'<span class="autocompleter-queried">$1</span>')},markQueryValueKey:function(str){return(!this.options.markQuery||!this.queryValue)?str:str.replace(new RegExp('('+((this.options.filterSubset)?'':'^')+this.queryValue.escapeRegExp().substr(1)+')',(this.options.filterCase)?'':'i'),'<span class="autocompleter-queried">$1</span>')},addChoiceEvents:function(el){return el.addEvents({'mouseover':this.choiceOver.bind(this,el),'click':this.choiceSelect.bind(this,el)})}});var OverlayFix=new Class({initialize:function(el){if(Browser.Engine.trident){this.element=$(el);this.relative=this.element.getOffsetParent();this.fix=new Element('iframe',{'frameborder':'0','scrolling':'no','src':'javascript:false;','styles':{'position':'absolute','border':'none','display':'none','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'}}).inject(this.element,'after')}},show:function(){if(this.fix){var coords=this.element.getCoordinates(this.relative);delete coords.right;delete coords.bottom;this.fix.setStyles($extend(coords,{'display':'','zIndex':(this.element.getStyle('zIndex')||1)-1}))}return this},hide:function(){if(this.fix)this.fix.setStyle('display','none');return this},destroy:function(){if(this.fix)this.fix=this.fix.destroy()}});Element.implement({getSelectedRange:function(){if(!Browser.Engine.trident)return{start:this.selectionStart,end:this.selectionEnd};var pos={start:0,end:0};var range=this.getDocument().selection.createRange();if(!range||range.parentElement()!=this)return pos;var dup=range.duplicate();if(this.type=='text'){pos.start=0-dup.moveStart('character',-100000);pos.end=pos.start+range.text.length}else{var value=this.value;var offset=value.length-value.match(/[\n\r]*$/)[0].length;dup.moveToElementText(this);dup.setEndPoint('StartToEnd',range);pos.end=offset-dup.text.length;dup.setEndPoint('StartToStart',range);pos.start=offset-dup.text.length}return pos},selectRange:function(start,end){if(Browser.Engine.trident){var diff=this.value.substr(start,end-start).replace(/\r/g,'').length;start=this.value.substr(0,start).replace(/\r/g,'').length;var range=this.createTextRange();range.collapse(true);range.moveEnd('character',start+diff);range.moveStart('character',start);range.select()}else{this.focus();this.setSelectionRange(start,end)}return this}});Autocompleter.Local=new Class({Extends:Autocompleter,options:{minLength:0,delay:200},initialize:function(element,tokens,options){this.parent(element,options);this.tokens=tokens},query:function(){this.update(this.filter())}});Autocompleter.Request=new Class({Extends:Autocompleter,options:{postData:{},ajaxOptions:{},postVar:'value'},query:function(){var data=$unlink(this.options.postData)||{};data[this.options.postVar]=this.queryValue;var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','');var cls=this.options.indicatorClass;if(cls)this.element.addClass(cls);this.fireEvent('onRequest',[this.element,this.request,data,this.queryValue]);this.request.send({'data':data})},queryResponse:function(){var indicator=$(this.options.indicator);if(indicator)indicator.setStyle('display','none');var cls=this.options.indicatorClass;if(cls)this.element.removeClass(cls);return this.fireEvent('onComplete',[this.element,this.request])}});Autocompleter.Request.JSON=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.JSON($merge({'url':url,'link':'cancel'},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this))},queryResponse:function(response){this.parent();this.update(response)}});Autocompleter.Request.HTML=new Class({Extends:Autocompleter.Request,initialize:function(el,url,options){this.parent(el,options);this.request=new Request.HTML($merge({'url':url,'link':'cancel','update':this.choices},this.options.ajaxOptions)).addEvent('onComplete',this.queryResponse.bind(this))},queryResponse:function(tree,elements){this.parent();if(!elements||!elements.length){this.hideChoices()}else{this.choices.getChildren(this.options.choicesMatch).each(this.options.injectChoice||function(choice){var value=choice.innerHTML;choice.inputValue=value;this.addChoiceEvents(choice.set('html',this.markQueryValue(value)))},this);this.showChoices()}}});Autocompleter.Ajax={Base:Autocompleter.Request,Json:Autocompleter.Request.JSON,Xhtml:Autocompleter.Request.HTML};lg=new Object();lg.word_loading='Lade ...';lg.head_recommend_bookmark='Bookmark weiterempfehlen';lg.text_email_or_username='E-Mail-Adresse oder Username';lg.title_users_your_comment='Dein Kommentar:';lg.title_buddys='Buddys';lg.word_recommend='empfehlen';lg.word_cancel='abbrechen';lg.text_confirm_popup_bookmark_delete='Möchtest du das Bookmark wirklich löschen?';lg.msg_group_delete_confirm='Möchtest du diesen User und seine Bookmarks wirklich aus der Gruppe löschen?';lg.text_users_error_deleting_comment='Kommentar konnte nicht gelöscht werden';lg.js_twitter_error_deleting='Ein Fehler beim Löschen ist aufgetreten. Bitte versuche es erneut!';lg.js_twitter_invite_question='Wir versenden einmalig eine Direktnachricht über Twitter mit deinem Benutzernamen, damit der Empfänger erkennt wer ihn einladen will. Bist du damit einverstanden?';lg.js_twitter_invite_error='Ein Fehler beim Versenden ist aufgetreten, bitte versuche es noch einmal!';lg.js_twitter_block_confirm='Möchtest du in Zukunft keine Twitter-Links mehr von diesem User bei Mister Wong sehen?';lg.js_twitter_block_error='Ein Fehler beim ausblenden ist aufgetreten. Bitte versuche es erneut!';lg.text_left_chars='Zeichen übrig';lg.text_avg_rating='Durchschnittliche Bewertung dieser Seite:';lg.text_click_here='Klick hier';lg.text_for_websites_you_like='für alle Webseiten, die du magst!';var ReMooz=new Class({Implements:[Events,Options,Chain],options:{link:null,type:'image',container:null,className:null,centered:false,dragging:true,closeOnClick:true,shadow:(Browser.Engine.trident)?'onOpenEnd':'onOpen',resize:true,margin:20,resizeFactor:0.95,resizeLimit:false,fixedSize:false,cutOut:true,addClick:true,opacityLoad:0.6,opacityResize:1,opacityTitle:0.9,resizeOptions:{},fxOptions:{},closer:true,parse:false,parseSecure:false,temporary:false,onBuild:$empty,onLoad:$empty,onOpen:$empty,onOpenEnd:$empty,onClose:$empty,onCloseEnd:$empty,generateTitle:function(el){var text=el.get('title');if(!text)return false;var title=text.split(' :: ');var head=new Element('h6',{'html':title[0]});return(title[1])?[head,new Element('p',{'html':title[1]})]:head}},initialize:function(element,options){this.element=$(element);this.setOptions(options);if(this.options.parse){var obj=this.element.getProperty(this.options.parse);if(obj&&(obj=JSON.decode(obj,this.options.parseSecure)))this.setOptions(obj)}var origin=this.options.origin;this.origin=((origin)?$(origin)||this.element.getElement(origin):null)||this.element;this.link=this.options.link||this.element.get('href')||this.element.get('src');this.container=$(this.options.container)||this.element.getDocument();this.bound={'click':function(e){this.open.delay(1,this);return false}.bind(this),'close':this.close.bind(this),'dragClose':function(e){if(e.rightClick)return;this.close()}.bind(this)};if(this.options.addClick)this.bindToElement()},destroy:function(){if(this.box)this.box.destroy();this.box=this.tweens=this.body=this.content=null},bindToElement:function(element){($(element)||this.element).addClass('remooz-element').addEvent('click',this.bound.click);return this},getOriginCoordinates:function(){var coords=this.origin.getCoordinates();delete coords.right;delete coords.bottom;return coords},open:function(e){if(this.opened)return(e)?this.close():this;this.opened=this.loading=true;if(!this.box)this.build();this.coords=this.getOriginCoordinates();this.coords.opacity=this.options.opacityLoad;this.coords.display='';this.tweens.box.set(this.coords);this.box.addClass('remooz-loading');ReMooz.open(this.fireEvent('onLoad'));this['open'+this.options.type.capitalize()]();return this},finishOpen:function(){this.tweens.fade.start(0,1);this.drag.attach();this.fireEvent('onOpenEnd').callChain()},close:function(){if(!this.opened)return this;this.opened=false;ReMooz.close(this.fireEvent('onClose'));if(this.loading){this.box.setStyle('display','none');return this}this.drag.detach();this.tweens.fade.cancel().set(0).fireEvent('onComplete');if(this.tweens.box.timer)this.tweens.box.clearChain();var vars=this.getOriginCoordinates();if(this.options.opacityResize!=1)vars.opacity=this.options.opacityResize;this.tweens.box.start(vars).chain(this.closeEnd.bind(this));return this},closeEnd:function(){if(this.options.cutOut)this.element.setStyle('visibility','visible');this.box.setStyle('display','none');this.fireEvent('onCloseEnd').callChain();if(this.options.temporary)this.destroy()},openImage:function(){var tmp=new Image();tmp.onload=tmp.onabort=tmp.onerror=function(fast){this.loading=tmp.onload=tmp.onabort=tmp.onerror=null;if(!tmp.width||!this.opened){this.fireEvent('onError').close();return}var to={x:tmp.width,y:tmp.height};if(!this.content)this.content=$(tmp).inject(this.body);else tmp=null;this[(this.options.resize)?'zoomRelativeTo':'zoomTo'].create({'delay':(tmp&&fast!==true)?1:null,'arguments':[to],'bind':this})()}.bind(this);tmp.src=this.link;if(tmp&&tmp.complete&&tmp.onload)tmp.onload(true)},openElement:function(){this.content=this.content||$(this.link)||$E(this.link);if(!this.content){this.fireEvent('onError').close();return}this.content.inject(this.body);this.zoomTo({x:this.content.scrollWidth,y:this.content.scrollHeight})},zoomRelativeTo:function(to){var scale=this.options.resizeLimit;if(!scale){scale=this.container.getSize();scale.x*=this.options.resizeFactor;scale.y*=this.options.resizeFactor}for(var i=2;i--;){if(to.x>scale.x){to.y*=scale.x/to.x;to.x=scale.x}else if(to.y>scale.y){to.x*=scale.y/to.y;to.y=scale.y}}return this.zoomTo({x:to.x.toInt(),y:to.y.toInt()})},zoomTo:function(to){to=this.options.fixedSize||to;var box=this.container.getSize(),scroll=this.container.getScroll();var pos=(!this.options.centered)?{x:(this.coords.left+(this.coords.width/2)-to.x/2).toInt().limit(scroll.x+this.options.margin,scroll.x+box.x-this.options.margin-to.x),y:(this.coords.top+(this.coords.height/2)-to.y/2).toInt().limit(scroll.y+this.options.margin,scroll.y+box.y-this.options.margin-to.y)}:{x:scroll.x+((box.x-to.x)/2).toInt(),y:scroll.y+((box.y-to.y)/2).toInt()};if(this.options.cutOut)this.element.setStyle('visibility','hidden');this.box.removeClass('remooz-loading');var vars={left:pos.x,top:pos.y,width:to.x,height:to.y};if(this.options.opacityResize!=1)vars.opacity=[this.options.opacityResize,1];else this.box.set('opacity',1);this.tweens.box.start(vars).chain(this.finishOpen.bind(this));this.fireEvent('onOpen')},build:function(){this.addEvent('onBlur',function(){this.focused=false;this.box.removeClass('remooz-box-focus').setStyle('z-index',ReMooz.options.zIndex)},true);this.addEvent('onFocus',function(){this.focused=true;this.box.addClass('remooz-box-focus').setStyle('z-index',ReMooz.options.zIndexFocus)},true);var classes=['remooz-box','remooz-type-'+this.options.type,'remooz-engine-'+Browser.Engine.name+Browser.Engine.version];if(this.options.className)classes.push(this.options.className);this.box=new Element('div',{'class':classes.join(' '),'styles':{'display':'none','top':0,'left':0,'zIndex':ReMooz.options.zIndex}});this.tweens={'box':new Fx.Morph(this.box,$merge({'duration':400,'unit':'px','transition':Fx.Transitions.Quart.easeOut,'chain':'cancel'},this.options.resizeOptions)),'fade':new Fx.Tween(null,$merge({'property':'opacity','duration':(Browser.Engine.trident)?0:300,'chain':'cancel'},this.options.fxOptions)).addEvents({'onComplete':function(){if(!this.element.get('opacity'))this.element.setStyle('display','none')},'onStart':function(){if(!this.element.get('opacity'))this.element.setStyle('display','')}})};this.tweens.fade.element=$$();if(this.options.shadow){if(Browser.Engine.webkit420){this.box.setStyle('-webkit-box-shadow','0 0 10px rgba(0, 0, 0, 0.7)')}else if(!Browser.Engine.trident4){var shadow=new Element('div',{'class':'remooz-bg-wrap'}).inject(this.box);['n','ne','e','se','s','sw','w','nw'].each(function(dir){new Element('div',{'class':'remooz-bg remooz-bg-'+dir}).inject(shadow)});this.tweens.bg=new Fx.Tween(shadow,{'property':'opacity','chain':'cancel'}).set(0);this.addEvent(this.options.shadow,this.tweens.bg.set.bind(this.tweens.bg,1),true);this.addEvent('onClose',this.tweens.bg.set.bind(this.tweens.bg,0),true)}}if(this.options.closer){var closer=new Element('a',{'class':'remooz-btn-close','events':{'click':this.bound.close}}).inject(this.box);this.tweens.fade.element.push(closer)}this.body=new Element('div',{'class':'remooz-body'}).inject(this.box);var title=this.options.title||this.options.generateTitle.call(this,this.element);if(title){var title=new Element('div',{'class':'remooz-title'}).adopt(new Element('div',{'class':'remooz-title-bg','opacity':this.options.opacityTitle}),new Element('div',{'class':'remooz-title-content'}).adopt(title)).inject(this.box);this.tweens.fade.element.push(title)}this.tweens.fade.set(0).fireEvent('onComplete');this.drag=new Drag.Move(this.box,{'snap':15,'preventDefault':true,'onBeforeStart':function(){if(!this.focused&&!this.loading)ReMooz.focus(this);else if(this.loading||this.options.closeOnClick)this.box.addEvent('mouseup',this.bound.dragClose)}.bind(this),'onSnap':function(){this.box.removeEvent('mouseup',this.bound.dragClose);if(!this.options.dragging)this.drag.stop();else this.box.addClass('remooz-box-dragging')}.bind(this),'onComplete':function(){this.box.removeClass('remooz-box-dragging')}.bind(this)});this.drag.detach();this.fireEvent('onBuild',this.box,this.element);this.box.inject(this.element.getDocument().body)}});ReMooz.factory=function(extended){return $extend(this,extended)};ReMooz.factory(new Options).factory({options:{zIndex:41,zIndexFocus:42,query:'a.remooz',modal:false},assign:function(elements,options){return $$(elements).map(function(element){return new ReMooz(element,options)},this)},stack:[],open:function(obj){var last=this.stack.getLast();this.focus(obj);if(last&&this.options.modal)last.close()},close:function(obj){var length=this.stack.length-1;if(length>1&&this.stack[length]==obj)this.focus(this.stack[length-1]);this.stack.erase(obj)},focus:function(obj){var last=this.stack.getLast();obj.fireEvent('onFocus',[obj]);if(last==obj)return;if(last)last.fireEvent('onBlur',[last]);this.stack.erase(obj).push(obj)}});
