(function(){function a(f){if(typeof f=="string")f=o.getElementById(f);return f}function i(f,g,h){if(n.addEventListener)f.addEventListener(g,h,false);else n.attachEvent&&f.attachEvent("on"+g,function(){h.call(f,n.event)})}function k(f,g){f.className=f.className.replace(RegExp("(\\s|^)"+g+"(\\s|$)")," ")}var o=document,n=window,x=function(){var f=o.createElement("div");return function(g){f.innerHTML=g;g=f.childNodes[0];f.removeChild(g);return g}}(),p=document.documentElement.getBoundingClientRect?function(f){var g=
f.getBoundingClientRect(),h=f.ownerDocument;f=h.body;h=h.documentElement;var e=h.clientTop||f.clientTop||0,l=h.clientLeft||f.clientLeft||0,m=1;if(f.getBoundingClientRect){m=f.getBoundingClientRect();m=(m.right-m.left)/f.clientWidth}if(m>1)l=e=0;return{top:g.top/m+(window.pageYOffset||h&&h.scrollTop/m||f.scrollTop/m)-e,left:g.left/m+(window.pageXOffset||h&&h.scrollLeft/m||f.scrollLeft/m)-l}}:function(f){if(n.jQuery)return jQuery(f).offset();var g=0,h=0;do{g+=f.offsetTop||0;h+=f.offsetLeft||0}while(f=
f.offsetParent);return{left:h,top:g}},B=function(){var f=0;return function(){return"ValumsAjaxUpload"+f++}}();Ajax_upload=AjaxUpload=function(f,g){if(f.jquery)f=f[0];else if(typeof f=="string"&&/^#.*/.test(f))f=f.slice(1);f=a(f);this._input=null;this._button=f;this._justClicked=this._submitting=this._disabled=false;this._parentDialog=o.body;if(window.jQuery&&jQuery.ui&&jQuery.ui.dialog){var h=jQuery(this._button).parents(".ui-dialog");if(h.length)this._parentDialog=h[0]}this._settings={action:"upload.php",
name:"userfile",data:{},autoSubmit:true,responseType:false,onChange:function(){},onSubmit:function(){},onComplete:function(){}};for(var e in g)this._settings[e]=g[e];this._createInput();this._rerouteClicks()};AjaxUpload.prototype={setData:function(f){this._settings.data=f},disable:function(){this._disabled=true},enable:function(){this._disabled=false},destroy:function(){if(this._input){this._input.parentNode&&this._input.parentNode.removeChild(this._input);this._input=null}},_createInput:function(){var f=
this,g=o.createElement("input");g.setAttribute("type","file");g.setAttribute("name",this._settings.name);var h={position:"absolute",margin:"-5px 0 0 -175px",padding:0,width:"220px",height:"30px",fontSize:"14px",opacity:0,cursor:"pointer",display:"none",zIndex:2147483583},e;for(e in h)g.style[e]=h[e];if(g.style.opacity!=="0")g.style.filter="alpha(opacity=0)";this._parentDialog.appendChild(g);i(g,"change",function(){var l=this.value.replace(/.*(\/|\\)/,"");if(f._settings.onChange.call(f,l,/[.]/.exec(l)?
/[^.]+$/.exec(l.toLowerCase()):"")!=false)f._settings.autoSubmit&&f.submit()});i(g,"click",function(){f.justClicked=true;setTimeout(function(){f.justClicked=false},3E3)});this._input=g},_rerouteClicks:function(){var f=this,g,h={top:0,left:0},e=false;i(f._button,"mouseover",function(){if(!(!f._input||e)){e=true;var l=f._button,m,c;c=p(l);m=c.left;c=c.top;g={left:m,right:m+l.offsetWidth,top:c,bottom:c+l.offsetHeight};if(f._parentDialog!=o.body)h=p(f._parentDialog)}});i(document,"mousemove",function(l){var m=
f._input;if(m&&e)if(f._disabled){k(f._button,"hover");m.style.display="none"}else{if(!l.pageX&&l.clientX){var c=1,q=document.body;if(q.getBoundingClientRect){c=q.getBoundingClientRect();c=(c.right-c.left)/q.clientWidth}l={x:l.clientX/c+o.body.scrollLeft+o.documentElement.scrollLeft,y:l.clientY/c+o.body.scrollTop+o.documentElement.scrollTop}}else l={x:l.pageX,y:l.pageY};if(l.x>=g.left&&l.x<=g.right&&l.y>=g.top&&l.y<=g.bottom){m.style.top=l.y-h.top+"px";m.style.left=l.x-h.left+"px";m.style.display=
"block";m=f._button;m.className.match(/(\s|^)hover(\s|$)/)||(m.className+=" hover")}else{e=false;if(!f.justClicked)m.style.display="none";k(f._button,"hover")}}})},_createIframe:function(){var f=B(),g=x('<iframe src="javascript:false;" name="'+f+'" />');g.id=f;g.style.display="none";o.body.appendChild(g);return g},submit:function(){var f=this,g=this._settings;if(this._input.value!==""){var h=this._input.value.replace(/.*(\/|\\)/,"");if(g.onSubmit.call(this,h,/[.]/.exec(h)?/[^.]+$/.exec(h.toLowerCase()):
"")!=false){var e=this._createIframe(),l=this._createForm(e);l.appendChild(this._input);l.submit();o.body.removeChild(l);this._input=l=null;this._createInput();var m=false;i(e,"load",function(){if(e.src=="javascript:'%3Chtml%3E%3C/html%3E';"||e.src=="javascript:'<html></html>';")m&&setTimeout(function(){o.body.removeChild(e)},0);else{var c=e.contentDocument?e.contentDocument:frames[e.id].document;if(!(c.readyState&&c.readyState!="complete"))if(!(c.body&&c.body.innerHTML=="false")){var q;if(c.XMLDocument)q=
c.XMLDocument;else if(c.body){q=c.body.innerHTML;if(g.responseType&&g.responseType.toLowerCase()=="json"){if(c.body.firstChild&&c.body.firstChild.nodeName.toUpperCase()=="PRE")q=c.body.firstChild.firstChild.nodeValue;q=q?window.eval("("+q+")"):{}}}else q=c;g.onComplete.call(f,h,q);m=true;e.src="javascript:'<html></html>';"}}})}else{o.body.removeChild(this._input);this._input=null;this._createInput()}}},_createForm:function(f){var g=this._settings,h=x('<form method="post" enctype="multipart/form-data"></form>');
h.style.display="none";h.action=g.action;h.target=f.name;o.body.appendChild(h);for(var e in g.data){f=o.createElement("input");f.type="hidden";f.name=e;f.value=g.data[e];h.appendChild(f)}return h}}})();$(document).ready(function(){$(".areyousure").bind("click",function(a){var i="delete";if($(this).attr("id").indexOf("frag")!=-1)var k="this fragment";else if($(this).attr("id").indexOf("blog")!=-1)k="this blog";else if($(this).attr("id").indexOf("ping")!=-1){k="this ping";i="dismiss"}else if($(this).attr("id").indexOf("dquote")!=-1){k="this quote";i="dismiss"}else if($(this).attr("id").indexOf("mail")!=-1){k="this message";i="trash"}else k="this";confirm("THIS FUNCTION IS DEPRECATED. PLEASE REPORT THIS PAGE AS A BUG. Are you sure you want to "+
i+" "+k+"?")||a.preventDefault()});$(".spoiler").click(function(){$(this).next("div").slideToggle()});$(".vote-up").bind("click",function(){var a=$(this).parent().attr("id").replace("-d","");$("#"+a+"-c").fadeOut("slow",function(){$.post("/function_like.php",{id:a,vote:"1"},function(i){$("#"+a+"-c").html(i);$("#"+a+"-c").fadeIn("fast")})})});$(".vote-down").bind("click",function(){var a=$(this).parent().attr("id").replace("-d","");$("#"+a+"-c").fadeOut("slow",function(){$.post("/function_like.php",
{id:a,vote:"-1"},function(i){$("#"+a+"-c").html(i);$("#"+a+"-c").fadeIn("fast")})})})});function stoggle(a,i){$("#"+a).slideToggle("slow");$(i).html()=="Show"?$(i).html("Hide"):$(i).html("Show")}function toggle(a){$("#"+a).animate({width:"toggle"},250)}function toolExpand(a){messagebox=document.getElementById(a);if(messagebox.style.height!="50em")messagebox.style.height=messagebox.style.height?10+parseInt(messagebox.style.height)+"em":"20em"}
function toolDexpand(a){messagebox=document.getElementById(a);if(messagebox.style.height!="10em")if(messagebox.style.height)messagebox.style.height=-10+parseInt(messagebox.style.height)+"em"}
function insertAtCaret(a,i,k){messagebox=document.getElementById(k);messagebox.focus();if(document.selection){k=document.selection.createRange();if(k.parentElement()!=messagebox)return;k.text=a+k.text+i;k.select()}else if(typeof messagebox.selectionStart!=="undefined"){k=messagebox.selectionStart;var o=messagebox.selectionEnd;i=messagebox.value.substring(0,k)+a+messagebox.value.substring(k,o)+i+messagebox.value.substring(o,messagebox.value.length);messagebox.value=i;k+=a.length;o+=a.length;messagebox.setSelectionRange(k,
o)}else messagebox.value+=a+i;messagebox.focus()}function insertPrompt(a,i,k,o){messagebox=document.getElementById(o);if(typeof messagebox.selectionStart!=="undefined"&&messagebox.selectionEnd-messagebox.selectionStart)insertAtCaret("["+a+"]","[/"+a+"]");else if(href=prompt(i,"http://"))k?insertAtCaret("["+a+"="+href+"]","[/"+a+"]",o):insertAtCaret("["+a+"]"+href+"[/"+a+"]","",o)};eval(function(a,i,k,o,n,x){n=function(p){return(p<i?"":n(parseInt(p/i)))+((p%=i)>35?String.fromCharCode(p+29):p.toString(36))};if(!"".replace(/^/,String)){for(;k--;)x[n(k)]=o[k]||n(k);o=[function(p){return x[p]}];n=function(){return"\\w+"};k=1}for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6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});",
62,74,"||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce".split("|"),
0,{}));(function(a){var i,k,o,n,x,p,B,f,g,h=0,e={},l=[],m=0,c={},q=[],E=null,w=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,s,t,r=false,C=a.extend(a("<div/>")[0],{prop:0}),z=0,O=!a.support.opacity&&!window.XMLHttpRequest,J=function(){k.hide();w.onerror=w.onload=null;E&&E.abort();i.empty()},P=function(){a.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},
K=function(){return[a(window).width(),a(window).height(),a(document).scrollLeft(),a(document).scrollTop()]},T=function(){var b=K(),d={},j=c.margin,u=c.autoScale,y=(20+j)*2,A=(20+j)*2,v=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=b[0]*parseFloat(c.width)/100-40;u=false}else d.width=c.width+v;if(c.height.toString().indexOf("%")>-1){d.height=b[1]*parseFloat(c.height)/100-40;u=false}else d.height=c.height+v;if(u&&(d.width>b[0]-y||d.height>b[1]-A))if(e.type=="image"||e.type=="swf"){y+=v;
A+=v;u=Math.min(Math.min(b[0]-y,c.width)/c.width,Math.min(b[1]-A,c.height)/c.height);d.width=Math.round(u*(d.width-v))+v;d.height=Math.round(u*(d.height-v))+v}else{d.width=Math.min(d.width,b[0]-y);d.height=Math.min(d.height,b[1]-A)}d.top=b[3]+(b[1]-(d.height+40))*0.5;d.left=b[2]+(b[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(b[3]+j,d.top);d.left=Math.max(b[2]+j,d.left)}return d},U=function(b){if(b&&b.length)switch(c.titlePosition){case "inside":return b;case "over":return'<span id="fancybox-title-over">'+
b+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+b+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var b=c.title,d=t.width-c.padding*2,j="fancybox-title-"+c.titlePosition;a("#fancybox-title").remove();z=0;if(c.titleShow!==false){b=a.isFunction(c.titleFormat)?c.titleFormat(b,q,m,c):U(b);if(!(!b||b==="")){a('<div id="fancybox-title" class="'+j+'" />').css({width:d,paddingLeft:c.padding,
paddingRight:c.padding}).html(b).appendTo("body");switch(c.titlePosition){case "inside":z=a("#fancybox-title").outerHeight(true)-c.padding;t.height+=z;break;case "over":a("#fancybox-title").css("bottom",c.padding);break;default:a("#fancybox-title").css("bottom",a("#fancybox-title").outerHeight(true)*-1)}a("#fancybox-title").appendTo(x).hide()}}},W=function(){a(document).unbind("keydown.fb").bind("keydown.fb",function(b){if(b.keyCode==27&&c.enableEscapeButton){b.preventDefault();a.fancybox.close()}else if(b.keyCode==
37){b.preventDefault();a.fancybox.prev()}else if(b.keyCode==39){b.preventDefault();a.fancybox.next()}});if(a.fn.mousewheel){n.unbind("mousewheel.fb");q.length>1&&n.bind("mousewheel.fb",function(b,d){b.preventDefault();r||d===0||(d>0?a.fancybox.prev():a.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&q.length>1||m!==0)f.show();if(c.cyclic&&q.length>1||m!=q.length-1)g.show()}},L=function(){p.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling==
"yes"?"auto":"visible");if(!a.support.opacity){p.get(0).style.removeAttribute("filter");n.get(0).style.removeAttribute("filter")}a("#fancybox-title").show();c.hideOnContentClick&&p.one("click",a.fancybox.close);c.hideOnOverlayClick&&o.one("click",a.fancybox.close);c.showCloseButton&&B.show();W();a(window).bind("resize.fb",a.fancybox.center);c.centerOnScroll?a(window).bind("scroll.fb",a.fancybox.center):a(window).unbind("scroll.fb");a.isFunction(c.onComplete)&&c.onComplete(q,m,c);r=false;var b,d;if(q.length-
1>m){b=q[m+1].href;if(typeof b!=="undefined"&&b.match(G)){d=new Image;d.src=b}}if(m>0){b=q[m-1].href;if(typeof b!=="undefined"&&b.match(G)){d=new Image;d.src=b}}},M=function(b){var d=Math.round(s.width+(t.width-s.width)*b),j=Math.round(s.height+(t.height-s.height)*b);n.css({width:d+"px",height:j+"px",top:Math.round(s.top+(t.top-s.top)*b)+"px",left:Math.round(s.left+(t.left-s.left)*b)+"px"});d=Math.max(d-c.padding*2,0);j=Math.max(j-(c.padding*2+z*b),0);p.css({width:d+"px",height:j+"px"});if(typeof t.opacity!==
"undefined")n.css("opacity",b<0.5?0.5:b)},Q=function(){var b=e.orig?a(e.orig):false,d={};if(b&&b.length){b=b;d=b.offset();d.top+=parseFloat(b.css("paddingTop"))||0;d.left+=parseFloat(b.css("paddingLeft"))||0;d.top+=parseFloat(b.css("border-top-width"))||0;d.left+=parseFloat(b.css("border-left-width"))||0;d.width=b.width();d.height=b.height();b=d;d={width:b.width+c.padding*2,height:b.height+c.padding*2,top:b.top-c.padding-20,left:b.left-c.padding-20}}else{b=K();d={width:1,height:1,top:b[3]+b[1]*0.5,
left:b[2]+b[0]*0.5}}return d},N=function(){k.hide();if(n.is(":visible")&&a.isFunction(c.onCleanup))if(c.onCleanup(q,m,c)===false){a.event.trigger("fancybox-cancel");r=false;return}q=l;m=h;c=e;p.get(0).scrollTop=0;p.get(0).scrollLeft=0;if(c.overlayShow){O&&a("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});o.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}t=
T();V();if(n.is(":visible")){a(B.add(f).add(g)).hide();var b=n.position(),d;s={top:b.top,left:b.left,width:n.width(),height:n.height()};d=s.width==t.width&&s.height==t.height;p.fadeOut(c.changeFade,function(){var j=function(){p.html(i.contents()).fadeIn(c.changeFade,L)};a.event.trigger("fancybox-change");p.empty().css("overflow","hidden");if(d){p.css({top:c.padding,left:c.padding,width:Math.max(t.width-c.padding*2,1),height:Math.max(t.height-c.padding*2-z,1)});j()}else{p.css({top:c.padding,left:c.padding,
width:Math.max(s.width-c.padding*2,1),height:Math.max(s.height-c.padding*2,1)});C.prop=0;a(C).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:j})}})}else{n.css("opacity",1);if(c.transitionIn=="elastic"){s=Q();p.css({top:c.padding,left:c.padding,width:Math.max(s.width-c.padding*2,1),height:Math.max(s.height-c.padding*2,1)}).html(i.contents());n.css(s).show();if(c.opacity)t.opacity=0;C.prop=0;a(C).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{p.css({top:c.padding,
left:c.padding,width:Math.max(t.width-c.padding*2,1),height:Math.max(t.height-c.padding*2-z,1)}).html(i.contents());n.css(t).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){i.width(e.width);i.height(e.height);if(e.width=="auto")e.width=i.width();if(e.height=="auto")e.height=i.height();N()},D=function(){J();var b=l[h],d,j,u,y,A;e=a.extend({},a.fn.fancybox.defaults,typeof a(b).data("fancybox")=="undefined"?e:a(b).data("fancybox"));u=b.title||a(b).title||e.title||"";if(b.nodeName&&!e.orig)e.orig=
a(b).children("img:first").length?a(b).children("img:first"):a(b);if(u===""&&e.orig)u=e.orig.attr("alt");d=b.nodeName&&/^(?:javascript|#)/i.test(b.href)?e.href||null:e.href||b.href||null;if(e.type){j=e.type;if(!d)d=e.content}else if(e.content)j="html";else if(d)if(d.match(G))j="image";else if(d.match(S))j="swf";else if(a(b).hasClass("iframe"))j="iframe";else if(d.match(/#/)){b=d.substr(d.indexOf("#"));j=a(b).length>0?"inline":"ajax"}else j="ajax";else j="inline";e.type=j;e.href=d;e.title=u;if(e.autoDimensions&&
e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(a.isFunction(e.onStart))if(e.onStart(l,h,e)===false){r=false;return}i.css("padding",20+e.padding+e.margin);a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){a(this).replaceWith(p.children())});switch(j){case "html":i.html(e.content);F();break;case "inline":a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(b)).bind("fancybox-cleanup",
function(){a(this).replaceWith(p.children())}).bind("fancybox-cancel",function(){a(this).replaceWith(i.children())});a(b).appendTo(i);F();break;case "image":r=false;a.fancybox.showActivity();w=new Image;w.onerror=function(){P()};w.onload=function(){w.onerror=null;w.onload=null;r=true;e.width=w.width;e.height=w.height;a("<img />").attr({id:"fancybox-img",src:w.src,alt:e.title}).appendTo(i);N()};w.src=d;break;case "swf":y='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+
'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';A="";a.each(e.swf,function(v,R){y+='<param name="'+v+'" value="'+R+'"></param>';A+=" "+v+'="'+R+'"'});y+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+A+"></embed></object>";i.html(y);F();break;case "ajax":b=d.split("#",2);j=e.ajax.data||{};if(b.length>1){d=b[0];if(typeof j=="string")j+="&selector="+b[1];else j.selector=b[1]}r=false;a.fancybox.showActivity();E=a.ajax(a.extend(e.ajax,
{url:d,data:j,error:P,success:function(v){if(E.status==200){i.html(v);F()}}}));break;case "iframe":a('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(i);N()}},X=function(){if(k.is(":visible")){a("div",k).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},Y=function(){if(!a("#fancybox-wrap").length){a("body").append(i=a('<div id="fancybox-tmp"></div>'),k=a('<div id="fancybox-loading"><div></div></div>'),
o=a('<div id="fancybox-overlay"></div>'),n=a('<div id="fancybox-wrap"></div>'));if(!a.support.opacity){n.addClass("fancybox-ie");k.addClass("fancybox-ie")}x=a('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(n);
x.append(p=a('<div id="fancybox-inner"></div>'),B=a('<a id="fancybox-close"></a>'),f=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),g=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));B.click(a.fancybox.close);k.click(a.fancybox.cancel);f.click(function(b){b.preventDefault();a.fancybox.prev()});g.click(function(b){b.preventDefault();a.fancybox.next()});if(O){o.get(0).style.setExpression("height",
"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");k.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");x.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}}};
a.fn.fancybox=function(b){a(this).data("fancybox",a.extend({},b,a.metadata?a(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!r){r=true;a(this).blur();l=[];h=0;d=a(this).attr("rel")||"";if(!d||d==""||d==="nofollow")l.push(this);else{l=a("a[rel="+d+"], area[rel="+d+"]");h=l.index(this)}D();return false}});return this};a.fancybox=function(b,d){if(!r){r=true;d=typeof d!=="undefined"?d:{};l=[];h=d.index||0;if(a.isArray(b)){for(var j=0,u=b.length;j<u;j++)if(typeof b[j]==
"object")a(b[j]).data("fancybox",a.extend({},d,b[j]));else b[j]=a({}).data("fancybox",a.extend({content:b[j]},d));l=jQuery.merge(l,b)}else{if(typeof b=="object")a(b).data("fancybox",a.extend({},d,b));else b=a({}).data("fancybox",a.extend({content:b},d));l.push(b)}if(h>l.length||h<0)h=0;D()}};a.fancybox.showActivity=function(){clearInterval(H);k.show();H=setInterval(X,66)};a.fancybox.hideActivity=function(){k.hide()};a.fancybox.next=function(){return a.fancybox.pos(m+1)};a.fancybox.prev=function(){return a.fancybox.pos(m-
1)};a.fancybox.pos=function(b){if(!r){b=parseInt(b,10);if(b>-1&&q.length>b){h=b;D()}if(c.cyclic&&q.length>1&&b<0){h=q.length-1;D()}if(c.cyclic&&q.length>1&&b>=q.length){h=0;D()}}};a.fancybox.cancel=function(){if(!r){r=true;a.event.trigger("fancybox-cancel");J();e&&a.isFunction(e.onCancel)&&e.onCancel(l,h,e);r=false}};a.fancybox.close=function(){function b(){o.fadeOut("fast");n.hide();a.event.trigger("fancybox-cleanup");p.empty();a.isFunction(c.onClosed)&&c.onClosed(q,m,c);q=e=[];m=h=0;c=e={};r=false}
if(!(r||n.is(":hidden"))){r=true;if(c&&a.isFunction(c.onCleanup))if(c.onCleanup(q,m,c)===false){r=false;return}J();a(B.add(f).add(g)).hide();a("#fancybox-title").remove();n.add(p).add(o).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");p.css("overflow","hidden");if(c.transitionOut=="elastic"){s=Q();var d=n.position();t={top:d.top,left:d.left,width:n.width(),height:n.height()};if(c.opacity)t.opacity=1;C.prop=1;a(C).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,
step:M,complete:b})}else n.fadeOut(c.transitionOut=="none"?0:c.speedOut,b)}};a.fancybox.resize=function(){var b,d;if(!(r||n.is(":hidden"))){r=true;b=p.wrapInner("<div style='overflow:auto'></div>").children();d=b.height();n.css({height:d+c.padding*2+z});p.css({height:d});b.replaceWith(b.children());a.fancybox.center()}};a.fancybox.center=function(){r=true;var b=K(),d=c.margin,j={};j.top=b[3]+(b[1]-(n.height()-z+40))*0.5;j.left=b[2]+(b[0]-(n.width()+40))*0.5;j.top=Math.max(b[3]+d,j.top);j.left=Math.max(b[2]+
d,j.left);n.css(j);r=false};a.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.4,overlayColor:"#000",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"elastic",transitionOut:"elastic",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",
easingIn:"easeOutBack",easingOut:"easeInBack",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};a(document).ready(function(){Y()})})(jQuery);
