var a;function open_facebox(b,f){f==true?jQuery.facebox({image:b}):jQuery.facebox({iframe:b})}function open_focusbox(b,f){open_facebox(b,f)}function close_facebox(){jQuery(document).trigger("close.facebox")}function close_focusbox(){close_facebox()}function close_parent_facebox(){window.parent.close_focusbox()}function close_parent_focusbox(){close_parent_facebox()}function facebox_update_iframe_size(){jQuery(document).trigger("resize.facebox")}
function focusbox_update_iframe_size(){facebox_update_iframe_size()}function facebox_update_parent_iframe(){window.parent&&window.parent.facebox_update_iframe_size&&window.parent.facebox_update_iframe_size()}function focusbox_update_parent_iframe(){facebox_update_parent_iframe()}var ie_fix_iframe_sizes={"/admin/layout":600,"/admin/blog":[850,1330]};jQuery(function(){jQuery("form:has(input[type=submit].ajax)").ajaxForm({dataType:"json",beforeSubmit:showLoadingAniAndDisableButton,success:finishSubmit})});
function showLoadingAniAndDisableButton(){jQuery(".submit_buttons").append(' &nbsp;<img src="/images/common/modal/ajax_footer_loading.gif" style="float: right; margin-top: 4px;" class="modalAjaxSubmitLoadingAni" />');jQuery(".submit_buttons input[type=submit].ajax").attr("disabled","true");return true}
function finishSubmit(b){if(b.error=="true"){alert(b.message);jQuery(".modalAjaxSubmitLoadingAni").remove();jQuery(".submit_buttons input[type=submit].ajax").removeAttr("disabled")}else{jQuery(".layout_has_been_changed").remove();top.close_focusbox();b.reload=="true"&&top.location.reload()}}
(function(b){b(document).ready(function(){b.facebox.settings.openCallback=function(){return true};b.facebox.settings.closeCallback=function(){iframe=b("#facebox_iframe").get(0);if(!iframe)return true;doc=null;if((doc=iframe.contentWindow&&iframe.contentWindow.document?iframe.contentWindow.document:iframe.contentDocument?iframe.contentDocument:iframe.document)&&doc.getElementById("layout_has_been_changed"))if(!confirm(translations.focusbox_close_continue))return false;doc&&doc.getElementById("reload_window")&&
location.reload();return true};b.facebox.settings.faceboxHtml='    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="t">                <a href="#" class="close">                   <img src="/images/common/modal/close.png" title="close" class="close_image" />                 </a>               </td><td class="tr"/>             </tr>             <tr>               <td class="l"/>               <td class="body">                 <div class="content">                 </div>               </td>               <td class="r"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>';
b.facebox.settings.closeImage="/images/common/modal/close.png";b.facebox.settings.loadingImage="/images/common/modal/loading.gif";b("a[rel*=focusbox]").facebox();b("a[rel*=facebox]").facebox();b("a[rel*=lightbox]").facebox()})})(jQuery);(function(b){function f(h){if(b.facebox.settings.inited)return true;else b.facebox.settings.inited=true;b(document).trigger("init.facebox");d();var k=b.facebox.settings.imageTypes.join("|");b.facebox.settings.imageTypesRegexp=new RegExp(".("+k+")$","i");h&&b.extend(b.facebox.settings,h);b("body").append(b.facebox.settings.faceboxHtml);var i=[new Image,new Image];i[0].src=b.facebox.settings.closeImage;i[1].src=b.facebox.settings.loadingImage;b("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){i.push(new Image);
i.slice(-1).src=b(this).css("background-image").replace(/url\((.+)\)/,"$1")});b("#facebox .close").click(b.facebox.close);b("#facebox .close_image").attr("src",b.facebox.settings.closeImage)}function c(){var h,k;if(self.pageYOffset){k=self.pageYOffset;h=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){k=document.documentElement.scrollTop;h=document.documentElement.scrollLeft}else if(document.body){k=document.body.scrollTop;h=document.body.scrollLeft}return new Array(h,
k)}function g(){var h;if(self.innerHeight)h=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)h=document.documentElement.clientHeight;else if(document.body)h=document.body.clientHeight;return h}function d(){var h=b.facebox.settings;h.loadingImage=h.loading_image||h.loadingImage;h.closeImage=h.close_image||h.closeImage;h.imageTypes=h.image_types||h.imageTypes;h.faceboxHtml=h.facebox_html||h.faceboxHtml}function e(h,k){if(h.match(/#/)){var i=window.location.href.split("#")[0];
h=h.replace(i,"");b.facebox.reveal(b(h).show().replaceWith("<div id='facebox_moved'></div>"),k)}else h.match(b.facebox.settings.imageTypesRegexp)?j(h,k):m(h,k)}function j(h,k){var i=new Image;i.onload=function(){b.browser.msie&&b.browser.version<7?b.facebox.reveal('<div class="image"><img style="'+(i.width>700?"width: 700px; ":"")+'" src="'+i.src+'" /></div>',k):b.facebox.reveal('<div class="image"><img style="max-width: 700px;" src="'+i.src+'" /></div>',k);b.facebox.updatePosition();b("#facebox .image img").click(function(){if(i.width>
700){width_attr=(iehack=b.browser.msie&&b.browser.version<7)?"width":"max-width";zoomed=b(this).css(width_attr)=="700px";b(this).css(width_attr,zoomed?null:"700px");zoomed?b(this).addClass("zoomed"):b(this).removeClass("zoomed");b.facebox.updatePosition()}})};i.src=h}function p(h,k){b.get(h,function(i){b.facebox.reveal(i,k)})}function m(h,k){b("#facebox .body").css("background","#fff url('/images/common/modal/loading.gif') no-repeat center");b.facebox.reveal('<iframe id="facebox_iframe" scrolling="no" frameBorder="0" border="0" src=""></iframe>',
k);b("#facebox_iframe").attr("src",h).load(function(){b(document).trigger("resize.facebox")})}function l(){return b.facebox.settings.overlay==false||b.facebox.settings.opacity===null}function q(){if(!l()){b("#facebox_overlay").length==0&&b("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');b("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",b.facebox.settings.opacity).click(function(){b(document).trigger("close.facebox")}).fadeIn(200);return false}}function n(){if(!l()){b("#facebox_overlay").fadeOut(200,
function(){b("#facebox_overlay").removeClass("facebox_overlayBG");b("#facebox_overlay").addClass("facebox_hide");b("#facebox_overlay").remove()});return false}}b.facebox=function(h,k){b.facebox.loading();if(h.ajax)p(h.ajax,k);else if(h.image)j(h.image,k);else if(h.div)e(h.div,k);else if(h.iframe)m(h.iframe,k);else b.isFunction(h)?h.call(b):b.facebox.reveal(h,k)};b.extend(b.facebox,{settings:{opacity:0.5,overlay:true,loadingImage:"/images/common/facebox/loading.gif",closeImage:"/images/common/facebox/closelabel.gif",
imageTypes:["png","jpg","jpeg","gif"],closeCallback:function(){return true},faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="footer">                   <a href="#" class="close">                     <img src="/images/common/facebox/closelabel.gif" title="close" class="close_image" />                   </a>                 </div>                 <div class="content">                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},
loading:function(){f();if(b("#facebox .loading").length==1)return true;q();b("#facebox .content").empty();b("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+b.facebox.settings.loadingImage+'"/></div>');b("#facebox").css({top:c()[1]+g()/10,left:b(window).width()/2-205}).show();b(document).bind("keydown.facebox",function(h){h.keyCode==27&&b.facebox.close();return true});b(document).trigger("loading.facebox")},updatePosition:function(){newleft=b(window).width()/2-b("#facebox table").width()/
2;if(newleft<0)newleft=0;b("#facebox").css("left",newleft)},reveal:function(h,k){b(document).trigger("beforeReveal.facebox");k&&b("#facebox .content").addClass(k);b("#facebox .body > .loading").remove();b("#facebox .content").append(h);b("#facebox .body").children().fadeIn("normal");this.updatePosition();b(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){b(document).trigger("close.facebox");return false}});b.fn.facebox=function(h){function k(i){b.facebox.loading(true);
i.stopPropagation();if(i=this.rel.match(/facebox\[?\.(\w+)\]?/))i=i[1];e(this.href,i);return false}f(h);return this.bind("click.facebox",k)};b(document).bind("resize.facebox",function(){var h=b("#facebox_iframe"),k=document.getElementById("facebox_iframe").contentWindow,i=k.document,o=0;if(jQuery.browser.msie&&ie_fix_iframe_sizes)if(size_fix=ie_fix_iframe_sizes[k.location.pathname]){advanced_options=i.getElementById("advanced_options_blog_options");o=size_fix[advanced_options.style.display==""?1:
0]}else o=i.body.scrollHeight;else if(i&&i.body&&i.body.offsetHeight)o=i.body.offsetHeight;else if(i&&i.body&&i.body.scrollHeight)o=i.body.scrollHeight;h.css("height",o+"px")});b(document).bind("beforeReveal.facebox",function(){b("object, embed").each(function(){var h=jQuery("<div>").addClass("embed_placeholder"),k=b(this).attr("height"),i=b(this).attr("width");h.css("height",k+"px");h.css("width",i+"px");b(this).after(h);b(this).addClass("hidden_embedded_element")});return true});b(document).bind("close.facebox",
function(){b(".hidden_embedded_element").removeClass("hidden_embedded_element");b(".embed_placeholder").remove();if(b.facebox.settings.closeCallback()){b(document).unbind("keydown.facebox");b("#facebox").fadeOut(function(){b("#facebox_moved").length==0?b("#facebox .content").removeClass().addClass("content"):b("#facebox_moved").replaceWith(b("#facebox .content").children().hide());n();b("#facebox .loading").remove()})}})})(jQuery);(function(b){function f(){b.fn.ajaxSubmit.debug&&window.console&&window.console.log&&window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}b.fn.ajaxSubmit=function(c){function g(){function n(){if(!B++){v.detachEvent?v.detachEvent("onload",n):v.removeEventListener("load",n,false);var y=true;try{if(C)throw"timeout";var w,x;x=v.contentWindow?v.contentWindow.document:v.contentDocument?v.contentDocument:v.document;if((x.body==null||x.body.innerHTML=="")&&!D){D=1;B--;setTimeout(n,
100);return}r.responseText=x.body?x.body.innerHTML:null;r.responseXML=x.XMLDocument?x.XMLDocument:x;r.getResponseHeader=function(F){return{"content-type":i.dataType}[F]};if(i.dataType=="json"||i.dataType=="script"){var z=x.getElementsByTagName("textarea")[0];r.responseText=z?z.value:r.responseText}else if(i.dataType=="xml"&&!r.responseXML&&r.responseText!=null)r.responseXML=h(r.responseText);w=b.httpData(r,i.dataType)}catch(G){y=false;b.handleError(i,r,"error",G)}if(y){i.success(w,"success");A&&b.event.trigger("ajaxSuccess",
[r,i])}A&&b.event.trigger("ajaxComplete",[r,i]);A&&!--b.active&&b.event.trigger("ajaxStop");if(i.complete)i.complete(r,y?"success":"error");setTimeout(function(){s.remove();r.responseXML=null},100)}}function h(y,w){if(window.ActiveXObject){w=new ActiveXObject("Microsoft.XMLDOM");w.async="false";w.loadXML(y)}else w=(new DOMParser).parseFromString(y,"text/xml");return w&&w.documentElement&&w.documentElement.tagName!="parsererror"?w:null}var k=m[0];if(b(":input[name=submit]",k).length)alert('Error: Form elements must not be named "submit".');
else{var i=b.extend({},b.ajaxSettings,c),o=b.extend(true,{},b.extend(true,{},b.ajaxSettings),i),u="jqFormIO"+(new Date).getTime(),s=b('<iframe id="'+u+'" name="'+u+'" src="about:blank" />'),v=s[0];s.css({position:"absolute",top:"-1000px",left:"-1000px"});var r={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;s.attr("src","about:blank")}},A=i.global;
A&&!b.active++&&b.event.trigger("ajaxStart");A&&b.event.trigger("ajaxSend",[r,i]);if(o.beforeSend&&o.beforeSend(r,o)===false)o.global&&b.active--;else if(!r.aborted){var B=0,C=0;if(o=k.clk){var E=o.name;if(E&&!o.disabled){c.extraData=c.extraData||{};c.extraData[E]=o.value;if(o.type=="image"){c.extraData[name+".x"]=k.clk_x;c.extraData[name+".y"]=k.clk_y}}}setTimeout(function(){var y=m.attr("target"),w=m.attr("action");k.setAttribute("target",u);k.getAttribute("method")!="POST"&&k.setAttribute("method",
"POST");k.getAttribute("action")!=i.url&&k.setAttribute("action",i.url);c.skipEncodingOverride||m.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});i.timeout&&setTimeout(function(){C=true;n()},i.timeout);var x=[];try{if(c.extraData)for(var z in c.extraData)x.push(b('<input type="hidden" name="'+z+'" value="'+c.extraData[z]+'" />').appendTo(k)[0]);s.appendTo("body");v.attachEvent?v.attachEvent("onload",n):v.addEventListener("load",n,false);k.submit()}finally{k.setAttribute("action",
w);y?k.setAttribute("target",y):m.removeAttr("target");b(x).remove()}},10);var D=0}}}if(!this.length){f("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof c=="function")c={success:c};var d=b.trim(this.attr("action"));if(d)d=(d.match(/^([^#]+)/)||[])[1];d=d||window.location.href||"";c=b.extend({url:d,type:this.attr("method")||"GET"},c||{});d={};this.trigger("form-pre-serialize",[this,c,d]);if(d.veto){f("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&
c.beforeSerialize(this,c)===false){f("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var e=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(var j in c.data)if(c.data[j]instanceof Array)for(var p in c.data[j])e.push({name:j,value:c.data[j][p]});else e.push({name:j,value:c.data[j]})}if(c.beforeSubmit&&c.beforeSubmit(e,this,c)===false){f("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[e,this,c,d]);if(d.veto){f("ajaxSubmit: submit vetoed via form-submit-validate trigger");
return this}j=b.param(e);if(c.type.toUpperCase()=="GET"){c.url+=(c.url.indexOf("?")>=0?"&":"?")+j;c.data=null}else c.data=j;var m=this,l=[];c.resetForm&&l.push(function(){m.resetForm()});c.clearForm&&l.push(function(){m.clearForm()});if(!c.dataType&&c.target){var q=c.success||function(){};l.push(function(n){b(c.target).html(n).each(q,arguments)})}else c.success&&l.push(c.success);c.success=function(n,h){for(var k=0,i=l.length;k<i;k++)l[k].apply(c,[n,h,m])};j=b("input:file",this).fieldValue();p=false;
for(d=0;d<j.length;d++)if(j[d])p=true;if(c.iframe||p||0)c.closeKeepAlive?b.get(c.closeKeepAlive,g):g();else b.ajax(c);this.trigger("form-submit-notify",[this,c]);return this};b.fn.ajaxForm=function(c){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){b(this).ajaxSubmit(c);return false}).each(function(){b(":submit,input:image",this).bind("click.form-plugin",function(g){var d=this.form;d.clk=this;if(this.type=="image")if(g.offsetX!=undefined){d.clk_x=g.offsetX;d.clk_y=g.offsetY}else if(typeof b.fn.offset==
"function"){var e=b(this).offset();d.clk_x=g.pageX-e.left;d.clk_y=g.pageY-e.top}else{d.clk_x=g.pageX-this.offsetLeft;d.clk_y=g.pageY-this.offsetTop}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},10)})})};b.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){b(":submit,input:image",this).unbind("click.form-plugin")})};b.fn.formToArray=function(c){var g=[];if(this.length==0)return g;var d=this[0],e=c?d.getElementsByTagName("*"):d.elements;if(!e)return g;for(var j=
0,p=e.length;j<p;j++){var m=e[j],l=m.name;if(l)if(c&&d.clk&&m.type=="image"){if(!m.disabled&&d.clk==m){g.push({name:l,value:b(m).val()});g.push({name:l+".x",value:d.clk_x},{name:l+".y",value:d.clk_y})}}else if((m=b.fieldValue(m,true))&&m.constructor==Array)for(var q=0,n=m.length;q<n;q++)g.push({name:l,value:m[q]});else m!==null&&typeof m!="undefined"&&g.push({name:l,value:m})}if(!c&&d.clk){c=b(d.clk);e=c[0];if((l=e.name)&&!e.disabled&&e.type=="image"){g.push({name:l,value:c.val()});g.push({name:l+
".x",value:d.clk_x},{name:l+".y",value:d.clk_y})}}return g};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(c){var g=[];this.each(function(){var d=this.name;if(d){var e=b.fieldValue(this,c);if(e&&e.constructor==Array)for(var j=0,p=e.length;j<p;j++)g.push({name:d,value:e[j]});else e!==null&&typeof e!="undefined"&&g.push({name:this.name,value:e})}});return b.param(g)};b.fn.fieldValue=function(c){for(var g=[],d=0,e=this.length;d<e;d++){var j=b.fieldValue(this[d],
c);j===null||typeof j=="undefined"||j.constructor==Array&&!j.length||(j.constructor==Array?b.merge(g,j):g.push(j))}return g};b.fieldValue=function(c,g){var d=c.name,e=c.type,j=c.tagName.toLowerCase();if(typeof g=="undefined")g=true;if(g&&(!d||c.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!c.checked||(e=="submit"||e=="image")&&c.form&&c.form.clk!=c||j=="select"&&c.selectedIndex==-1))return null;if(j=="select"){j=c.selectedIndex;if(j<0)return null;g=[];c=c.options;d=(e=e=="select-one")?
j+1:c.length;for(j=e?j:0;j<d;j++){var p=c[j];if(p.selected){var m=p.value;m||(m=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value);if(e)return m;g.push(m)}}return g}return c.value};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var c=this.type,g=this.tagName.toLowerCase();if(c=="text"||c=="password"||g=="textarea")this.value="";else if(c=="checkbox"||
c=="radio")this.checked=false;else if(g=="select")this.selectedIndex=-1})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};b.fn.enable=function(c){if(c==undefined)c=true;return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c==undefined)c=true;return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio")this.checked=c;else if(this.tagName.toLowerCase()=="option"){g=
b(this).parent("select");c&&g[0]&&g[0].type=="select-one"&&g.find("option").selected(false);this.selected=c}})}})(jQuery);(function(b){jQuery.fn.pngFix=function(f){f=jQuery.extend({blankgif:"blank.gif"},f);var c=navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1,g=navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1;if(jQuery.browser.msie&&(c||g)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr("width",jQuery(this).width());jQuery(this).attr("height",
jQuery(this).height());var d="",e="",j=jQuery(this).attr("id")?'id="'+jQuery(this).attr("id")+'" ':"",p=jQuery(this).attr("class")?'class="'+jQuery(this).attr("class")+'" ':"",m=jQuery(this).attr("title")?'title="'+jQuery(this).attr("title")+'" ':"",l=jQuery(this).attr("alt")?'alt="'+jQuery(this).attr("alt")+'" ':"",q=jQuery(this).attr("align")?"float:"+jQuery(this).attr("align")+";":"",n=jQuery(this).parent().attr("href")?"cursor:hand;":"";if(this.style.border){d+="border:"+this.style.border+";";
this.style.border=""}if(this.style.padding){d+="padding:"+this.style.padding+";";this.style.padding=""}if(this.style.margin){d+="margin:"+this.style.margin+";";this.style.margin=""}var h=this.style.cssText;e+="<span "+j+p+m+l;e+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+q+n;e+="width:"+jQuery(this).width()+"px;height:"+jQuery(this).height()+"px;";e+="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+jQuery(this).attr("src")+"', sizingMethod='scale');";
e+=h+'"></span>';if(d!="")e='<span style="position:relative;display:inline-block;'+d+n+"width:"+jQuery(this).width()+"px;height:"+jQuery(this).height()+'px;">'+e+"</span>";jQuery(this).hide();jQuery(this).after(e)});jQuery(this).find("*").each(function(){var d=jQuery(this).css("background-image");if(d.indexOf(".png")!=-1){d=d.split('url("')[1].split('")')[0];jQuery(this).css("background-image","none");jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
d+"',sizingMethod='scale')"}});jQuery(this).find("input[src$=.png]").each(function(){var d=jQuery(this).attr("src");jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d+"', sizingMethod='scale');";jQuery(this).attr("src",f.blankgif)})}return jQuery};b(document).ready(function(){b(document).pngFix()})})(jQuery);(function(b){function f(g){return typeof g=="object"?g:{top:g,left:g}}var c=b.scrollTo=function(g,d,e){b(window).scrollTo(g,d,e)};c.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};c.window=function(){return b(window)._scrollable()};b.fn._scrollable=function(){return this.map(function(){var g=this;if(!(!g.nodeName||b.inArray(g.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return g;g=(g.contentWindow||g).document||g.ownerDocument||g;return b.browser.safari||g.compatMode==
"BackCompat"?g.body:g.documentElement})};b.fn.scrollTo=function(g,d,e){if(typeof d=="object"){e=d;d=0}if(typeof e=="function")e={onAfter:e};if(g=="max")g=9E9;e=b.extend({},c.defaults,e);d=d||e.speed||e.duration;e.queue=e.queue&&e.axis.length>1;if(e.queue)d/=2;e.offset=f(e.offset);e.over=f(e.over);return this._scrollable().each(function(){function j(k){m.animate(n,d,e.easing,k&&function(){k.call(this,g,e)})}var p=this,m=b(p),l=g,q,n={},h=m.is("html,body");switch(typeof l){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(l)){l=
f(l);break}l=b(l,this);case "object":if(l.is||l.style)q=(l=b(l)).offset()}b.each(e.axis.split(""),function(k,i){var o=i=="x"?"Left":"Top",u=o.toLowerCase(),s="scroll"+o,v=p[s],r=c.max(p,i);if(q){n[s]=q[u]+(h?0:v-m.offset()[u]);if(e.margin){n[s]-=parseInt(l.css("margin"+o))||0;n[s]-=parseInt(l.css("border"+o+"Width"))||0}n[s]+=e.offset[u]||0;if(e.over[u])n[s]+=l[i=="x"?"width":"height"]()*e.over[u]}else{i=l[u];n[s]=i.slice&&i.slice(-1)=="%"?parseFloat(i)/100*r:i}if(/^\d+$/.test(n[s]))n[s]=n[s]<=0?
0:Math.min(n[s],r);if(!k&&e.queue){v!=n[s]&&j(e.onAfterFirst);delete n[s]}});j(e.onAfter)}).end()};c.max=function(g,d){var e=d=="x"?"Width":"Height";d="scroll"+e;if(!b(g).is("html,body"))return g[d]-b(g)[e.toLowerCase()]();e="client"+e;var j=g.ownerDocument.documentElement;g=g.ownerDocument.body;return Math.max(j[d],g[d])-Math.min(j[e],g[e])}})(jQuery);if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};
deconcept.SWFObject=function(b,f,c,g,d,e,j,p,m,l){if(document.getElementById){this.DETECT_KEY=l?l:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];b&&this.setAttribute("swf",b);f&&this.setAttribute("id",f);c&&this.setAttribute("width",c);g&&this.setAttribute("height",g);d&&this.setAttribute("version",new deconcept.PlayerVersion(d.toString().split(".")));this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7)deconcept.SWFObject.doPrepUnload=true;e&&this.addParam("bgcolor",e);this.addParam("quality",j?j:"high");this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);this.setAttribute("xiRedirectUrl",p?p:window.location);this.setAttribute("redirectUrl","");m&&this.setAttribute("redirectUrl",m)}};
deconcept.SWFObject.prototype={useExpressInstall:function(b){this.xiSWFPath=!b?"expressinstall.swf":b;this.setAttribute("useExpressInstall",true)},setAttribute:function(b,f){this.attributes[b]=f},getAttribute:function(b){return this.attributes[b]},addParam:function(b,f){this.params[b]=f},getParams:function(){return this.params},addVariable:function(b,f){this.variables[b]=f},getVariable:function(b){return this.variables[b]},getVariables:function(){return this.variables},getVariablePairs:function(){var b=
[],f,c=this.getVariables();for(f in c)b[b.length]=f+"="+c[f];return b},getSWFHTML:function(){var b="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';b+=
' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var f=this.getParams();for(var c in f)b+=[c]+'="'+f[c]+'" ';f=this.getVariablePairs().join("&");if(f.length>0)b+='flashvars="'+f+'"';b+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+
'" style="'+this.getAttribute("style")+'">';b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';f=this.getParams();for(c in f)b+='<param name="'+c+'" value="'+f[c]+'" />';f=this.getVariablePairs().join("&");if(f.length>0)b+='<param name="flashvars" value="'+f+'" />';b+="</object>"}return b},write:function(b){if(this.getAttribute("useExpressInstall"))if(this.installedVer.versionIsValid(new deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",
true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){(typeof b=="string"?document.getElementById(b):b).innerHTML=this.getSWFHTML();return true}else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"));
return false}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){var b=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var f=navigator.plugins["Shockwave Flash"];if(f&&f.description)b=new deconcept.PlayerVersion(f.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){f=1;for(var c=3;f;)try{c++;f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);b=new deconcept.PlayerVersion([c,
0,0])}catch(g){f=null}}else{try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(d){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=new deconcept.PlayerVersion([6,0,21]);f.AllowScriptAccess="always"}catch(e){if(b.major==6)return b}try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(j){}}if(f!=null)b=new deconcept.PlayerVersion(f.GetVariable("$version").split(" ")[1].split(","))}return b};
deconcept.PlayerVersion=function(b){this.major=b[0]!=null?parseInt(b[0]):0;this.minor=b[1]!=null?parseInt(b[1]):0;this.rev=b[2]!=null?parseInt(b[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(b){if(this.major<b.major)return false;if(this.major>b.major)return true;if(this.minor<b.minor)return false;if(this.minor>b.minor)return true;if(this.rev<b.rev)return false;return true};
deconcept.util={getRequestParameter:function(b){var f=document.location.search||document.location.hash;if(b==null)return f;if(f){f=f.substring(1).split("&");for(var c=0;c<f.length;c++)if(f[c].substring(0,f[c].indexOf("="))==b)return f[c].substring(f[c].indexOf("=")+1)}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){for(var b=document.getElementsByTagName("OBJECT"),f=b.length-1;f>=0;f--){b[f].style.display="none";for(var c in b[f])if(typeof b[f][c]=="function")b[f][c]=function(){}}};
if(deconcept.SWFObject.doPrepUnload)if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}if(!document.getElementById&&document.all)document.getElementById=function(b){return document.all[b]};
var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject;a=Number.prototype;a.bytes=function(){return this};a.kilobytes=function(){return this*1024};a.megabytes=function(){return this*(1024).kilobytes()};a.gigabytes=function(){return this*(1024).megabytes()};a.terabytes=function(){return this*(1024).gigabytes()};a.petabytes=function(){return this*(1024).terabytes()};a.exabytes=function(){return this*(1024).petabytes()};["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte","exabyte"].each(function(b){Number.prototype[b]=Number.prototype[b+"s"]});
Number.prototype.toPrecision=function(b){b=b||2;var f=Math.round(this*Math.pow(10,b)).toString(),c=f.length-b,g=f.substr(c,b);return f.substr(0,c)+(g.match("^0{"+b+"}$")?"":"."+g)};Number.prototype.toPercentage=function(){return(this*100).toPrecision()+"%"};
Number.prototype.toHumanSize=function(){if(this<(1).kilobyte())return this+" Bytes";if(this<(1).megabyte())return(this/(1).kilobyte()).toPrecision()+" KB";if(this<(1).gigabytes())return(this/(1).megabyte()).toPrecision()+" MB";if(this<(1).terabytes())return(this/(1).gigabytes()).toPrecision()+" GB";if(this<(1).petabytes())return(this/(1).terabytes()).toPrecision()+" TB";if(this<(1).exabytes())return(this/(1).petabytes()).toPrecision()+" PB";return(this/(1).exabytes()).toPrecision()+" EB"};(function(b){b(document).ready(function(){var f=0,c=0;b(".rate_help").click(function(){c=b(this).attr("help_text_id");rating=b(this).attr("rating");rating_description="#help_rating_description_"+c;rating_done="#help_rating_done_"+c;b.ajax({url:"/help_ratings",data:{help_text_id:c,rating:rating,authenticity_token:__blogage_token},type:"post",dataType:"json",success:function(g){f=g.id;b("#help_rating_"+c).hide();if(rating==1)b(rating_done).show();else{b(rating_description).show();b.scrollTo(b(rating_description),
{offset:{left:0,top:-30}});b(rating_description+" textarea[name=description]").focus()}}});b(rating_description+" form").submit(function(){b(this).find("input[type=submit]").attr("disabled","true").attr("value","Speichert...");f!=0&&b.ajax({url:"/help_ratings/"+f,data:{_method:"put",description:b(rating_description+" textarea[name=description]").val(),authenticity_token:__blogage_token},type:"post",dataType:"json",success:function(){b(rating_description).hide();b(rating_done).show()}});return false});
return false})})})(jQuery);function fade_flash(b){(b=$(b))&&new Effect.Fade(b,{duration:2,queue:"end"})}function fade_out_flash(b){Event.observe(window,"load",function(){window.setTimeout("fade_flash('"+b+"');",18E3)})}function autoHideFlash(){var b=$("notice");if(b){new Effect.Highlight(b,{startcolor:"#ffffff",duration:10,queue:"end"});new Effect.Fade(b,{duration:2,queue:"end"})}};function show_help(b,f,c){f=$(f);var g="help_"+b+"_"+c;$(g+"_container_parent")&&$(g+"_container_parent").remove();var d=$(document.createElement("div"));d.addClassName("help_text_container");d.id=g+"_container_parent";var e=$(document.createElement("div"));e.id=g+"_container";e.addClassName("help_text");e.addClassName("help_text_"+b);e.innerHTML="<div class='close'><a href='#' onclick='hide_help(\""+g+"\"); return false;'>Schlie\u00dfen <strong>X</strong></a></div><iframe id='"+g+"' class='text' frameborder='0' border='0'>Lade Text...</iframe>";
d.appendChild(e);f.parentNode.insertBefore(d,f);$(g).src="/direct_help/"+b+"?item="+c}function hide_help(b){$(b+"_container_parent").hide()};function add_login_box_defaults(){Event.observe(window,"load",function(b){setTimeout(function(){$("login").value==""&&$("login").addClassName("caption");$("password").value==""&&$("password").addClassName("caption")},1E3)},true);Event.observe("login","focus",function(b){$("login").removeClassName("caption")},true);Event.observe("login","blur",function(b){$("login").removeClassName("caption");$("login").value==""&&$("login").addClassName("caption")},true);Event.observe("login","change",function(b){$("login").removeClassName("caption")},
true);Event.observe("password","focus",function(b){$("password").removeClassName("caption")},true);Event.observe("password","blur",function(b){$("password").removeClassName("caption");$("password").value==""&&$("password").addClassName("caption")},true);Event.observe("password","change",function(b){$("password").removeClassName("caption")},true)};function nav_show_tab(b){$$(".navtabs li").each(function(f){"tab_"+b==f.id?f.addClassName("active"):f.removeClassName("active")});$$(".navcontent").each(function(f){b==f.id?f.removeClassName("nav_inactive"):f.addClassName("nav_inactive")})}function nav_start_loading(){$("loading_container").show();$("loading").removeClassName("not_loading")}function nav_finish_loading(){$("loading_container").hide();$("loading").addClassName("not_loading")};(function(b){function f(d){if(window.tinyMCE){window.tinyMCE.execCommand("mceBeginUndoLevel");window.tinyMCE.execCommand("mceInsertContent",false,d);window.tinyMCE.execCommand("mceEndUndoLevel")}else window.toolbar&&window.toolbar.insertMedia&&window.toolbar.insertMedia(d)}function c(d){code=null;if(d.filetype=="image")code="<a href='"+d.url+"' rel='lightbox' class='blog_image_external_link'><img src='"+d.url+"' class='blog_image_external inline' /></a>";else if(d.filetype=="video")code=d.url;else if(d.filetype==
"audio")code='<div class="blog_audio_external center"><embed src="http://blogage.de/flash/blogage_audio_player.swf" allowfullscreen="true" type="application/x-shockwave-flash" wmode="transparent" height="24" flashvars="blogageAudioUrl='+d.url+'" quality="high" width="480"></embed></div>';code&&f(code)}function g(d){code=null;switch(d.filetype){case 1:code='<a href="'+d.image_url+'" rel="lightbox" class="blog_image_link"><img src="'+d.thumbnail_urls[d.selected_thumbnail]+'" class="blog_image inline" /></a>';
break;case 2:case 98:case 99:code="<div class='blog_video center'>"+d.video_player+"</div>";break;case 3:case 97:code="<div class='blog_audio center'>"+d.audio_player+"</div>";break}code&&f(code+" ")}b.fn.mediaChooser=function(d){var e=b(this);d=d;var j=false,p=0,m=false,l={};b(this).click(function(){b(document).bind("reveal.facebox",function(){b("input.insert_external").click(function(){external_type=b(this).attr("data-media-type");(url=b("#external_url").attr("value"))&&url.length>0&&(external_type==
"video"||url.match(/^http(s?):\/\//))?e.trigger("file-selected",{external:true,url:url,filetype:external_type}):alert(t.choose_media_please_enter_valid_url)});b("#file_lists #recent_files").attr("num-files",0).bind("load-files",function(){if(!(j||m)){j=true;var q=b(this),n=q.find(".files_list");n.append("<div class='loader' />");var h=parseInt(q.attr("num-files"));q.bind("reload",function(){h=0;n.empty();q.attr("num-files",0).trigger("load-files")});b.getJSON("/admin/user_files/"+d+"?offset="+h,function(k){n.find(".loader").remove();
if(k.length==0)m=true;else{b.each(k,function(i,o){o=o;o.add_info=function(u){b.extend(l[this.id],u)};o.load_info=function(u){u=u;b.getJSON("/admin/user_files/"+o.id+"/info",function(s){o.add_info(s);u(o)})};o.selected_thumbnail=null;l[o.id]=o;container=b("<div class='file tr_type"+(i%2+1)+"' />").attr("file-id",o.id);container.append(b("<div class='image' />").append(b("<img />").attr("src",o.thumbnail||"blog/common/audio_file.png")));infos="<p><label>"+t.choose_media_file_name+"</label>"+o.title+
"</p>";infos+="<p><label>"+t.choose_media_uploaded_at+"</label>"+o.created_at+"</p>";infos+="<p><label>"+t.choose_media_file_size+"</label>"+o.filesize.toHumanSize()+"</p>";container.append(b("<div class='infos' />").append(b(infos)));n.append(container)});h+=k.length;q.attr("num-files",h);j=false;p++}})}}).trigger("load-files").find(".files_list").scroll(function(){if(!j){recent_files=b("#file_lists #recent_files");load_height=(parseInt(recent_files.attr("num-files"))-5)*100;this.scrollTop>load_height&&
recent_files.trigger("load-files")}});b(document).unbind("reveal.facebox");b(".file").live("click",function(){if((file=l[b(this).attr("file-id")])&&file.filetype==1)b.get("/admin/user_files/"+file.id+"/details",function(q){b("#file_detail").empty().append(q).show();b("#file_lists").hide();b(".files_header").hide();data=window.eval("("+b("#image_sizes").attr("data-file")+")");file.add_info(data);b("#file_detail .cancel_image").click(function(){b("#file_detail").empty().hide();b("#file_lists").show();
b(".files_header").show();return false});b("#file_detail .insert_image").click(function(){e.trigger("file-selected",file)});b("#image_sizes").bind("select-size",function(n,h){h=parseInt(h);thubmnail_size=[48,128,300,480,480][file.selected_thumbnail||h];file.selected_thumbnail=h;b(this).find(".image_size").removeClass("current");b(this).find(".image_size[thumbnail-index="+h+"]").addClass("current");if(current_height=parseInt(b(".preview_container img").css("height")))thubmnail_size=current_height;
b(".preview_container").empty().append(b("<div class='loader' />").css({height:thubmnail_size+"px"}));b("<img />").load(function(){b(".preview_container").empty().append(b(this))}).attr("src",file.thumbnail_urls[file.selected_thumbnail])}).trigger("select-size",2);b("#image_sizes .image_size").click(function(){b("#image_sizes").trigger("select-size",b(this).attr("thumbnail-index"))})});else file&&e.trigger("file-selected",file)})});b.facebox({ajax:"/admin/user_files/"+d})})};b(document).ready(function(){b(".media_chooser.image").mediaChooser("image");
b(".media_chooser.video").mediaChooser("video");b(".media_chooser.audio").mediaChooser("audio");b(".media_chooser").bind("file-selected",function(d,e){if(e)if(e.external){c(e);close_facebox()}else e.load_info(function(j){g(j);close_facebox()})})})})(jQuery);function reload_media_chooser(){jQuery("#file_lists #recent_files").trigger("reload")};(function(b){b(document).ready(function(){function f(){b("#weblogs_menu").hide().removeClass("show")}function c(){b("#weblogs_menu").show().addClass("show")}b("a.myblogage_blogs").click(function(){var g=b("#weblogs_menu");if(g.hasClass("show"))f();else{c();var d=g.find(".loader");if(d&&d.size()>0){var e=b("<div/>");b.getJSON("/users/blogs.json",function(j){j.each(function(p){p=="divider"?e.append("<hr />"):e.append("<a href='"+p.url+"'>"+p.title+"</a><br />")});d.replaceWith(e)})}}return false});
b("#weblogs_menu .close").click(function(){f();return false})})})(jQuery);(function(b){b(document).ready(function(){b(".pagination.ajax .arrow:not(.off)").live("click",function(){pagination=b(this).parent(".pagination");b.ajax({url:pagination.attr("url"),data:{page:b(this).attr("page")},type:"get",dataType:"html",success:function(f){pagination.parent(".paginateable").html(f)}});return false})})})(jQuery);
