jQuery.cookie=function(b,c,e){if("undefined"!=typeof c){e=e||{};if(null===c)c="",e.expires=-1;var f="";if(e.expires&&("number"==typeof e.expires||e.expires.toUTCString))"number"==typeof e.expires?(f=new Date,f.setTime(f.getTime()+864E5*e.expires)):f=e.expires,f="; expires="+f.toUTCString();var h=e.path?"; path="+e.path:"",g=e.domain?"; domain="+e.domain:"",e=e.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(c),f,h,g,e].join("")}else{c=null;if(document.cookie&&""!=document.cookie){e=
document.cookie.split(";");for(f=0;f<e.length;f++)if(h=jQuery.trim(e[f]),h.substring(0,b.length+1)==b+"="){c=decodeURIComponent(h.substring(b.length+1));break}}return c}};
jQuery(function(b){b.fn.fcbkcomplete=function(c){return this.each(function(){function e(c,e,g){var j=document.createElement("li"),m=document.createTextNode(c),p=document.createElement("a");b(j).attr({"class":"bit-box",rel:e});b(j).prepend(m);b(p).attr({"class":"closebutton",href:"#"});j.appendChild(p);t.append(j);b(p).click(function(){b(this).parent("li").fadeOut("fast",function(){f(b(this))});return!1});g||(b("#"+G+"_annoninput").remove(),h(1),F.children("option[value="+e+"]").length?(g=F.children("option[value="+
e+"]"),g.get(0).setAttribute("selected","selected"),g.hasClass("selected")||g.addClass("selected")):(g=b(document.createElement("option")),g.attr("value",e).get(0).setAttribute("selected","selected"),g.attr("value",e).addClass("selected"),g.text(c),F.append(g)),k.onselect.length&&r(k.onselect,g));t.children("li.bit-box.deleted").removeClass("deleted");o.hide();H&&D.hide()}function f(b){if(k.onremove.length){var c=F.children("option[value="+b.attr("rel")+"]");r(k.onremove,c)}F.children("option[value="+
b.attr("rel")+"]").removeAttr("selected");F.children("option[value="+b.attr("rel")+"]").removeClass("selected");b.remove();z=0}function h(c){var e=b(document.createElement("li")),j=b(document.createElement("input"));e.attr({"class":"bit-input",id:G+"_annoninput"});j.attr({type:"text","class":"maininput",size:"1"});t.append(e.append(j));j.focus(function(){v.fadeIn("fast")});j.blur(function(){v.fadeOut("fast")});t.click(function(){j.focus();o.length&&j.val().length?o.show():(o.hide(),H&&D.hide(),null!=
k.complete_text&&v.children(".default").show())});j.keypress(function(b){if(13==b.keyCode)return!1;j.attr("size",j.val().length+1)});j.keydown(function(b){if(191==b.keyCode)return b.preventDefault(),!1});j.keyup(function(c){var e=m(j.val()).toLowerCase();if(8==c.keyCode&&0==e.length){o.hide();H&&D.hide();if(0==t.children("li.bit-box.deleted").length)return t.children("li.bit-box:last").addClass("deleted"),!1;if(z)return;z=1;t.children("li.bit-box.deleted").fadeOut("fast",function(){f(b(this));return!1})}40!=
c.keyCode&&38!=c.keyCode&&0!=e.length&&(B=0,k.json_obj?k.cache&&I?g(e):(g(e,k.json_obj),I=!0):g(e),q(),null!=k.complete_text&&v.children(".default").hide(),o.show())});c&&setTimeout(function(){j.focus();null!=k.complete_text&&v.children(".default").show()},1)}function g(c,e){o.html("");k.cache||(C=[],E="");A(c);null!=e&&e.length&&b.each(e,function(b,c){C.push({caption:c.caption,value:c.value});E+=""+(C.length-1)+":"+c.caption+";"});var g=k.maxshownitems<C.length?k.maxshownitems:C.length,f="i";k.filter_case&&
(f="");var m,l;try{m=eval("/(?:^|;)\\s*(\\d+)\\s*:[^;]*?"+c+"[^;]*/g"+f),l=m.exec(E)}catch(h){}for(f="";null!=l&&0<g;){l=C[l[1]];if(!k.filter_selected||!F.children("option[value="+l.value+"]").hasClass("selected"))f+='<li rel="'+l.value+'">'+j(l.caption,c)+"</li>",B++,g--;l=m.exec(E)}o.append(f);k.firstselected&&(p=o.children("li:visible:first"),p.addClass("auto-focus"));B>k.height?(o.css({height:24*k.height+"px",overflow:"auto"}),H&&D.css({height:24*k.height+"px",width:o.width()+"px"}).show()):(o.css("height",
"auto"),H&&D.css({height:o.height()+"px",width:o.width()+"px"}).show())}function j(b,c){if(k.filter_case)try{eval("var text = text.replace(/(.*)("+c+")(.*)/gi,'$1<em>$2</em>$3');")}catch(e){}else try{eval("var text = text.replace(/(.*)("+c.toLowerCase()+")(.*)/gi,'$1<em>$2</em>$3');")}catch(g){}return b}function l(){o.children("li").mouseover(function(){o.children("li").removeClass("auto-focus");b(this).addClass("auto-focus");p=b(this)});o.children("li").mouseout(function(){b(this).removeClass("auto-focus");
p=null})}function u(){o.children("li").unbind("mouseover");o.children("li").unbind("mouseout");o.mousemove(function(){l();o.unbind("mousemove")})}function q(){var c=b("#"+G+"_annoninput").children(".maininput");l();o.children("li").unbind("mousedown");o.children("li").mousedown(function(){var c=b(this);e(c.text(),c.attr("rel"));o.hide();H&&D.hide();v.hide()});c.unbind("keydown");c.keydown(function(c){if(191==c.keyCode)return c.preventDefault(),!1;8!=c.keyCode&&t.children("li.bit-box.deleted").removeClass("deleted");
if(13==c.keyCode&&n()){var g=p;e(g.text(),g.attr("rel"));v.hide();c.preventDefault();p=null;return!1}if(13==c.keyCode&&!n())return k.newel&&(g=m(b(this).val()),e(g,g),v.hide(),c.preventDefault(),p=null),!1;if(40==c.keyCode){u();if(null==p||0==p.length)p=o.children("li:visible:first"),o.get(0).scrollTop=0;else{p.removeClass("auto-focus");p=p.nextAll("li:visible:first");var g=parseInt(p.prevAll("li:visible").length,10),f=parseInt(p.nextAll("li:visible").length,10);if((g>Math.round(k.height/2)||f<=Math.round(k.height/
2))&&"undefined"!=typeof p.get(0))o.get(0).scrollTop=parseInt(p.get(0).scrollHeight,10)*(g-Math.round(k.height/2))}o.children("li").removeClass("auto-focus");p.addClass("auto-focus")}if(38==c.keyCode){u();if(null==p||0==p.length)p=o.children("li:visible:last"),o.get(0).scrollTop=parseInt(p.get(0).scrollHeight,10)*(parseInt(o.children("li:visible").length,10)-Math.round(k.height/2));else if(p.removeClass("auto-focus"),p=p.prevAll("li:visible:first"),g=parseInt(p.prevAll("li:visible").length,10),f=
parseInt(p.nextAll("li:visible").length,10),(f>Math.round(k.height/2)||g<=Math.round(k.height/2))&&"undefined"!=typeof p.get(0))o.get(0).scrollTop=parseInt(p.get(0).scrollHeight,10)*(g-Math.round(k.height/2));o.children("li").removeClass("auto-focus");p.addClass("auto-focus")}})}function A(c){if(k.newel&&(o.children("li[fckb=1]").remove(),0!=c.length)){var e=b(document.createElement("li"));e.attr({rel:c,fckb:"1"}).html(c);o.prepend(e);B++}}function r(b,c){var e="";for(i=0;i<c.get(0).attributes.length;i++)null!=
c.get(0).attributes[i].nodeValue&&(e+='"_'+c.get(0).attributes[i].nodeName+'": "'+c.get(0).attributes[i].nodeValue+'",');try{eval(b+"("+("{"+e+" notinuse: 0}")+")")}catch(g){}}function n(){return null==p?!1:0==p.length?!1:!0}function m(b){b=b.replace(/[\"\'][\s]*javascript:(.*)[\"\']/g,'""');b=b.replace(/script(.*)/g,"");b=b.replace(/eval\((.*)\)/g,"");return b=b.replace("/([\x00-\u0008,\u000b-\u000c,\u000e-\u0019])/","")}b(this).bind("addItem",function(b,c){e(c.title,c.value)});var k=b.extend({json_obj:null,
cache:!1,height:"10",newel:!1,firstselected:!1,filter_case:!1,filter_hide:!1,complete_text:"Start to type...",maxshownitems:30,onselect:"",onremove:""},c),t=null,o=null,v=null,B=0,C=[],I=!1,E="",p=null,z=0,H=!1,D,F=b(this),G=F.attr("id");F.hide();F.attr("multiple","multiple");-1==F.attr("name").indexOf("[]")&&F.attr("name",F.attr("name")+"[]");t=b(document.createElement("ul"));t.attr("class","holder");F.after(t);v=b(document.createElement("div"));v.addClass("facebook-auto");null!=k.complete_text&&
v.append('<div class="default">'+k.complete_text+"</div>");H&&(v.append('<iframe class="ie6fix" scrolling="no" frameborder="0"></iframe>'),D=v.children(".ie6fix"));o=b(document.createElement("ul"));o.attr("id",G+"_feed");v.prepend(o);t.after(v);o.css("width",v.width());(function(){F.children("option").each(function(c,g){g=b(g);g.hasClass("selected")?(e(g.text(),g.val(),!0),g.attr("selected","selected")):g.removeAttr("selected");E+=""+(C.length-1)+":"+g.text()+";"})})();h(0);return this})}});
(function(b){b.fn.jQueryInputHints=function(c){var e=b.extend({},b.fn.jQueryInputHints.defaults,c);object=b(this);return this.each(function(){(""==object.val()||object.val()==e.hintText)&&object.val(e.hintText).addClass(e.hintClass);object.focus(function(){b(this).val()==e.hintText&&b(this).val("").removeClass(e.hintClass)});object.blur(function(){""==b(this).val()&&b(this).val(e.hintText).addClass(e.hintClass)})})};b.fn.jQueryInputHints.defaults={hintText:"Search",hintClass:"hint"}})(jQuery);
var SWFUpload,swfobject;void 0==SWFUpload&&(SWFUpload=function(b){this.initSWFUpload(b)});SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={},this.settings={},this.eventQueue=[],this.movieName="SWFUpload_"+SWFUpload.movieCount++,this.movieElement=null,SWFUpload.instances[this.movieName]=this,this.initSettings(b),this.loadSupport(),this.swfuploadPreload()&&this.loadFlash(),this.displayDebugInfo()}catch(c){throw delete SWFUpload.instances[this.movieName],c;}};
SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.5.0 2010-01-15 Beta 2";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290,RESIZE:-300};
SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.UPLOAD_TYPE={NORMAL:-1,RESIZED:-2};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120,JAVASCRIPT:-130,NONE:-130};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.RESIZE_ENCODING={JPEG:-1,PNG:-2};
SWFUpload.completeURL=function(b){try{var c="",e=-1;if("string"!==typeof b||b.match(/^https?:\/\//i)||b.match(/^\//)||""===b)return b;e=window.location.pathname.lastIndexOf("/");c=0>=e?"/":window.location.pathname.substr(0,e)+"/";return c+b}catch(f){return b}};SWFUpload.onload=function(){};
SWFUpload.prototype.initSettings=function(b){this.ensureDefault=function(c,e){var f=b[c];this.settings[c]=void 0!=f?f:e};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",!1);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",!1);this.ensureDefault("requeue_on_error",!1);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description",
"All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("flash9_url","swfupload_fp9.swf");this.ensureDefault("prevent_swf_caching",!0);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");
this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",!1);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",!1);this.settings.debug_enabled=this.settings.debug;
this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_preload_handler",null);this.ensureDefault("swfupload_load_failed_handler",null);this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_resize_start_handler",null);this.ensureDefault("upload_start_handler",
null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("mouse_click_handler",null);this.ensureDefault("mouse_out_handler",null);this.ensureDefault("mouse_over_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(this.settings.prevent_swf_caching)this.settings.flash_url=
this.settings.flash_url+(0>this.settings.flash_url.indexOf("?")?"?":"&")+"preventswfcaching="+(new Date).getTime(),this.settings.flash9_url=this.settings.flash9_url+(0>this.settings.flash9_url.indexOf("?")?"?":"&")+"preventswfcaching="+(new Date).getTime();if(!this.settings.preserve_relative_urls)this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url),this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url);delete this.ensureDefault};
SWFUpload.prototype.loadSupport=function(){this.support={loading:swfobject.hasFlashPlayerVersion("9.0.28"),imageResize:swfobject.hasFlashPlayerVersion("10.0.0")}};
SWFUpload.prototype.loadFlash=function(){var b,c,e;if(this.support.loading)if(null!==document.getElementById(this.movieName))this.support.loading=!1,this.queueEvent("swfupload_load_failed_handler",["Element ID already in use"]);else if(b=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder,void 0==b)this.support.loading=!1,this.queueEvent("swfupload_load_failed_handler",["button place holder not found"]);else{c="block"!==(b.currentStyle&&b.currentStyle.display||
window.getComputedStyle&&document.defaultView.getComputedStyle(b,null).getPropertyValue("display"))?"span":"div";c=document.createElement(c);e=this.getFlashHTML();try{c.innerHTML=e}catch(f){this.support.loading=!1;this.queueEvent("swfupload_load_failed_handler",["Exception loading Flash HTML into placeholder"]);return}e=c.getElementsByTagName("object");if(!e||1<e.length||0===e.length)this.support.loading=!1,this.queueEvent("swfupload_load_failed_handler",["Unable to find movie after adding to DOM"]);
else{if(1===e.length)this.movieElement=e[0];b.parentNode.replaceChild(c.firstChild,b);void 0==window[this.movieName]&&(window[this.movieName]=this.getMovieElement())}}else this.queueEvent("swfupload_load_failed_handler",["Flash Player doesn't support SWFUpload"])};
SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.support.imageResize?this.settings.flash_url:this.settings.flash9_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload"><param name="wmode" value="',this.settings.button_window_mode,'" /><param name="movie" value="',this.support.imageResize?this.settings.flash_url:this.settings.flash9_url,'" /><param name="quality" value="high" /><param name="allowScriptAccess" value="always" />',
'<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};
SWFUpload.prototype.getFlashVars=function(){var b,c;c=this.buildParamString();b=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(b),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),
"&amp;params=",encodeURIComponent(c),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),
"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),
"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(void 0==this.movieElement)this.movieElement=document.getElementById(this.movieName);if(null===this.movieElement)throw"Could not find Flash element";return this.movieElement};
SWFUpload.prototype.buildParamString=function(){var b,c,e=[];c=this.settings.post_params;if("object"===typeof c)for(b in c)c.hasOwnProperty(b)&&e.push(encodeURIComponent(b.toString())+"="+encodeURIComponent(c[b].toString()));return e.join("&amp;")};
SWFUpload.prototype.destroy=function(){var b;try{this.cancelUpload(null,!1);if(b=this.cleanUp())try{b.parentNode.removeChild(b)}catch(c){}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieName=this.eventQueue=this.customSettings=this.settings=this.movieElement=null;return!0}catch(e){return!1}};
SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\nVersion: ",SWFUpload.version,"\nMovie Name: ",this.movieName,"\nSettings:\n\tupload_url:               ",this.settings.upload_url,"\n\tflash_url:                ",this.settings.flash_url,"\n\tflash9_url:                ",this.settings.flash9_url,"\n\tuse_query_string:         ",this.settings.use_query_string.toString(),"\n\trequeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n\thttp_success:             ",
this.settings.http_success.join(", "),"\n\tassume_success_timeout:   ",this.settings.assume_success_timeout,"\n\tfile_post_name:           ",this.settings.file_post_name,"\n\tpost_params:              ",this.settings.post_params.toString(),"\n\tfile_types:               ",this.settings.file_types,"\n\tfile_types_description:   ",this.settings.file_types_description,"\n\tfile_size_limit:          ",this.settings.file_size_limit,"\n\tfile_upload_limit:        ",this.settings.file_upload_limit,"\n\tfile_queue_limit:         ",
this.settings.file_queue_limit,"\n\tdebug:                    ",this.settings.debug.toString(),"\n\tprevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n\tbutton_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n\tbutton_placeholder:       ",this.settings.button_placeholder?"Set":"Not Set","\n\tbutton_image_url:         ",this.settings.button_image_url.toString(),"\n\tbutton_width:             ",this.settings.button_width.toString(),"\n\tbutton_height:            ",
this.settings.button_height.toString(),"\n\tbutton_text:              ",this.settings.button_text.toString(),"\n\tbutton_text_style:        ",this.settings.button_text_style.toString(),"\n\tbutton_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n\tbutton_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n\tbutton_action:            ",this.settings.button_action.toString(),"\n\tbutton_cursor:            ",this.settings.button_cursor.toString(),"\n\tbutton_disabled:          ",
this.settings.button_disabled.toString(),"\n\tcustom_settings:          ",this.settings.custom_settings.toString(),"\nEvent Handlers:\n\tswfupload_preload_handler assigned:  ",("function"===typeof this.settings.swfupload_preload_handler).toString(),"\n\tswfupload_load_failed_handler assigned:  ",("function"===typeof this.settings.swfupload_load_failed_handler).toString(),"\n\tswfupload_loaded_handler assigned:  ",("function"===typeof this.settings.swfupload_loaded_handler).toString(),"\n\tmouse_click_handler assigned:       ",
("function"===typeof this.settings.mouse_click_handler).toString(),"\n\tmouse_over_handler assigned:        ",("function"===typeof this.settings.mouse_over_handler).toString(),"\n\tmouse_out_handler assigned:         ",("function"===typeof this.settings.mouse_out_handler).toString(),"\n\tfile_dialog_start_handler assigned: ",("function"===typeof this.settings.file_dialog_start_handler).toString(),"\n\tfile_queued_handler assigned:       ",("function"===typeof this.settings.file_queued_handler).toString(),
"\n\tfile_queue_error_handler assigned:  ",("function"===typeof this.settings.file_queue_error_handler).toString(),"\n\tupload_resize_start_handler assigned:      ",("function"===typeof this.settings.upload_resize_start_handler).toString(),"\n\tupload_start_handler assigned:      ",("function"===typeof this.settings.upload_start_handler).toString(),"\n\tupload_progress_handler assigned:   ",("function"===typeof this.settings.upload_progress_handler).toString(),"\n\tupload_error_handler assigned:      ",
("function"===typeof this.settings.upload_error_handler).toString(),"\n\tupload_success_handler assigned:    ",("function"===typeof this.settings.upload_success_handler).toString(),"\n\tupload_complete_handler assigned:   ",("function"===typeof this.settings.upload_complete_handler).toString(),"\n\tdebug_handler assigned:             ",("function"===typeof this.settings.debug_handler).toString(),"\nSupport:\n\tLoad:                     ",this.support.loading?"Yes":"No","\n\tImage Resize:             ",
this.support.imageResize?"Yes":"No","\n"].join(""))};SWFUpload.prototype.addSetting=function(b,c,e){return void 0==c?this.settings[b]=e:this.settings[b]=c};SWFUpload.prototype.getSetting=function(b){return void 0!=this.settings[b]?this.settings[b]:""};
SWFUpload.prototype.callFlash=function(b,c){var e,f,h,c=c||[];e=this.getMovieElement();try{void 0!=e?(h=e.CallFunction('<invoke name="'+b+'" returntype="javascript">'+__flash__argumentsToXML(c,0)+"</invoke>"),f=eval(h)):this.debug("Can't call flash because the movie wasn't found.")}catch(g){this.debug("Exception calling flash function '"+b+"': "+g.message)}void 0!=f&&"object"===typeof f.post&&(f=this.unescapeFilePostParams(f));return f};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};
SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(b){this.callFlash("StartUpload",[b])};SWFUpload.prototype.startResizedUpload=function(b,c,e,f,h,g){this.callFlash("StartUpload",[b,{width:c,height:e,encoding:f,quality:h,allowEnlarging:g}])};SWFUpload.prototype.cancelUpload=function(b,c){!1!==c&&(c=!0);this.callFlash("CancelUpload",[b,c])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};
SWFUpload.prototype.requeueUpload=function(b){return this.callFlash("RequeueUpload",[b])};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(b){this.callFlash("SetStats",[b])};SWFUpload.prototype.getFile=function(b){return"number"===typeof b?this.callFlash("GetFileByIndex",[b]):this.callFlash("GetFile",[b])};
SWFUpload.prototype.getQueueFile=function(b){return"number"===typeof b?this.callFlash("GetFileByQueueIndex",[b]):this.callFlash("GetFile",[b])};SWFUpload.prototype.addFileParam=function(b,c,e){return this.callFlash("AddFileParam",[b,c,e])};SWFUpload.prototype.removeFileParam=function(b,c){this.callFlash("RemoveFileParam",[b,c])};SWFUpload.prototype.setUploadURL=function(b){this.settings.upload_url=b.toString();this.callFlash("SetUploadURL",[b])};
SWFUpload.prototype.setPostParams=function(b){this.settings.post_params=b;this.callFlash("SetPostParams",[b])};SWFUpload.prototype.addPostParam=function(b,c){this.settings.post_params[b]=c;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(b){delete this.settings.post_params[b];this.callFlash("SetPostParams",[this.settings.post_params])};
SWFUpload.prototype.setFileTypes=function(b,c){this.settings.file_types=b;this.settings.file_types_description=c;this.callFlash("SetFileTypes",[b,c])};SWFUpload.prototype.setFileSizeLimit=function(b){this.settings.file_size_limit=b;this.callFlash("SetFileSizeLimit",[b])};SWFUpload.prototype.setFileUploadLimit=function(b){this.settings.file_upload_limit=b;this.callFlash("SetFileUploadLimit",[b])};
SWFUpload.prototype.setFileQueueLimit=function(b){this.settings.file_queue_limit=b;this.callFlash("SetFileQueueLimit",[b])};SWFUpload.prototype.setFilePostName=function(b){this.settings.file_post_name=b;this.callFlash("SetFilePostName",[b])};SWFUpload.prototype.setUseQueryString=function(b){this.settings.use_query_string=b;this.callFlash("SetUseQueryString",[b])};SWFUpload.prototype.setRequeueOnError=function(b){this.settings.requeue_on_error=b;this.callFlash("SetRequeueOnError",[b])};
SWFUpload.prototype.setHTTPSuccess=function(b){"string"===typeof b&&(b=b.replace(" ","").split(","));this.settings.http_success=b;this.callFlash("SetHTTPSuccess",[b])};SWFUpload.prototype.setAssumeSuccessTimeout=function(b){this.settings.assume_success_timeout=b;this.callFlash("SetAssumeSuccessTimeout",[b])};SWFUpload.prototype.setDebugEnabled=function(b){this.settings.debug_enabled=b;this.callFlash("SetDebugEnabled",[b])};
SWFUpload.prototype.setButtonImageURL=function(b){void 0==b&&(b="");this.settings.button_image_url=b;this.callFlash("SetButtonImageURL",[b])};SWFUpload.prototype.setButtonDimensions=function(b,c){this.settings.button_width=b;this.settings.button_height=c;var e=this.getMovieElement();if(void 0!=e)e.style.width=b+"px",e.style.height=c+"px";this.callFlash("SetButtonDimensions",[b,c])};SWFUpload.prototype.setButtonText=function(b){this.settings.button_text=b;this.callFlash("SetButtonText",[b])};
SWFUpload.prototype.setButtonTextPadding=function(b,c){this.settings.button_text_top_padding=c;this.settings.button_text_left_padding=b;this.callFlash("SetButtonTextPadding",[b,c])};SWFUpload.prototype.setButtonTextStyle=function(b){this.settings.button_text_style=b;this.callFlash("SetButtonTextStyle",[b])};SWFUpload.prototype.setButtonDisabled=function(b){this.settings.button_disabled=b;this.callFlash("SetButtonDisabled",[b])};
SWFUpload.prototype.setButtonAction=function(b){this.settings.button_action=b;this.callFlash("SetButtonAction",[b])};SWFUpload.prototype.setButtonCursor=function(b){this.settings.button_cursor=b;this.callFlash("SetButtonCursor",[b])};
SWFUpload.prototype.queueEvent=function(b,c){var e=this;void 0==c?c=[]:c instanceof Array||(c=[c]);if("function"===typeof this.settings[b])this.eventQueue.push(function(){this.settings[b].apply(this,c)}),setTimeout(function(){e.executeNextEvent()},0);else if(null!==this.settings[b])throw"Event handler "+b+" is unknown or is not a function";};SWFUpload.prototype.executeNextEvent=function(){var b=this.eventQueue?this.eventQueue.shift():null;"function"===typeof b&&b.apply(this)};
SWFUpload.prototype.unescapeFilePostParams=function(b){var c=/[$]([0-9a-f]{4})/i,e={},f,h,g;if(void 0!=b){for(h in b.post)if(b.post.hasOwnProperty(h)){for(f=h;null!==(g=c.exec(f));)f=f.replace(g[0],String.fromCharCode(parseInt("0x"+g[1],16)));e[f]=b.post[h]}b.post=e}return b};
SWFUpload.prototype.swfuploadPreload=function(){var b;if("function"===typeof this.settings.swfupload_preload_handler)b=this.settings.swfupload_preload_handler.call(this);else if(void 0!=this.settings.swfupload_preload_handler)throw"upload_start_handler must be a function";void 0===b&&(b=!0);return!!b};SWFUpload.prototype.flashReady=function(){this.cleanUp()?this.queueEvent("swfupload_loaded_handler"):this.debug("Flash called back ready but the flash movie can't be found.")};
SWFUpload.prototype.cleanUp=function(){var b,c=this.getMovieElement();try{if(c&&"unknown"===typeof c.CallFunction)for(b in this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)"),c)try{"function"===typeof c[b]&&(c[b]=null)}catch(e){}}catch(f){}window.__flash__removeCallback=function(b,c){try{b&&(b[c]=null)}catch(e){}};return c};SWFUpload.prototype.mouseClick=function(){this.queueEvent("mouse_click_handler")};SWFUpload.prototype.mouseOver=function(){this.queueEvent("mouse_over_handler")};
SWFUpload.prototype.mouseOut=function(){this.queueEvent("mouse_out_handler")};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("file_queued_handler",b)};SWFUpload.prototype.fileQueueError=function(b,c,e){b=this.unescapeFilePostParams(b);this.queueEvent("file_queue_error_handler",[b,c,e])};
SWFUpload.prototype.fileDialogComplete=function(b,c,e){this.queueEvent("file_dialog_complete_handler",[b,c,e])};SWFUpload.prototype.uploadResizeStart=function(b,c){b=this.unescapeFilePostParams(b);this.queueEvent("upload_resize_start_handler",[b,c.width,c.height,c.encoding,c.quality])};SWFUpload.prototype.uploadStart=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("return_upload_start_handler",b)};
SWFUpload.prototype.returnUploadStart=function(b){var c;if("function"===typeof this.settings.upload_start_handler)b=this.unescapeFilePostParams(b),c=this.settings.upload_start_handler.call(this,b);else if(void 0!=this.settings.upload_start_handler)throw"upload_start_handler must be a function";void 0===c&&(c=!0);this.callFlash("ReturnUploadStart",[!!c])};SWFUpload.prototype.uploadProgress=function(b,c,e){b=this.unescapeFilePostParams(b);this.queueEvent("upload_progress_handler",[b,c,e])};
SWFUpload.prototype.uploadError=function(b,c,e){b=this.unescapeFilePostParams(b);this.queueEvent("upload_error_handler",[b,c,e])};SWFUpload.prototype.uploadSuccess=function(b,c,e){b=this.unescapeFilePostParams(b);this.queueEvent("upload_success_handler",[b,c,e])};SWFUpload.prototype.uploadComplete=function(b){b=this.unescapeFilePostParams(b);this.queueEvent("upload_complete_handler",b)};SWFUpload.prototype.debug=function(b){this.queueEvent("debug_handler",b)};
SWFUpload.prototype.debugMessage=function(b){var c,e;if(this.settings.debug){c=[];if("object"===typeof b&&"string"===typeof b.name&&"string"===typeof b.message){for(e in b)b.hasOwnProperty(e)&&c.push(e+": "+b[e]);b=c.join("\n")||"";c=b.split("\n");b="EXCEPTION: "+c.join("\nEXCEPTION: ")}SWFUpload.Console.writeLine(b)}};SWFUpload.Console={};
SWFUpload.Console.writeLine=function(b){var c,e;try{c=document.getElementById("SWFUpload_Console");if(!c)e=document.createElement("form"),document.getElementsByTagName("body")[0].appendChild(e),c=document.createElement("textarea"),c.id="SWFUpload_Console",c.style.fontFamily="monospace",c.setAttribute("wrap","off"),c.wrap="off",c.style.overflow="auto",c.style.width="700px",c.style.height="350px",c.style.margin="5px",e.appendChild(c);c.value+=b+"\n";c.scrollTop=c.scrollHeight-c.clientHeight}catch(f){alert("Exception: "+
f.name+" Message: "+f.message)}};
swfobject=function(){function b(){if(!K){try{var b=z.getElementsByTagName("body")[0].appendChild(z.createElement("span"));b.parentNode.removeChild(b)}catch(c){return}K=!0;for(var b=F.length,e=0;e<b;e++)F[e]()}}function c(b){K?b():F[F.length]=b}function e(b){if(typeof p.addEventListener!=B)p.addEventListener("load",b,!1);else if(typeof z.addEventListener!=B)z.addEventListener("load",b,!1);else if(typeof p.attachEvent!=B)m(p,"onload",b);else if("function"==typeof p.onload){var c=p.onload;p.onload=function(){c();
b()}}else p.onload=b}function f(){var b=z.getElementsByTagName("body")[0],c=z.createElement(C);c.setAttribute("type",I);var e=b.appendChild(c);if(e){var g=0;(function(){if(typeof e.GetVariable!=B){var f=e.GetVariable("$version");if(f)f=f.split(" ")[1].split(","),w.pv=[parseInt(f[0],10),parseInt(f[1],10),parseInt(f[2],10)]}else if(10>g){g++;setTimeout(arguments.callee,10);return}b.removeChild(c);e=null;h()})()}else h()}function h(){var b=G.length;if(0<b)for(var c=0;c<b;c++){var e=G[c].id,f=G[c].callbackFn,
m={success:!1,id:e};if(0<w.pv[0]){var p=n(e);if(p)if(k(G[c].swfVersion)&&!(w.wk&&312>w.wk)){if(o(e,!0),f)m.success=!0,m.ref=g(e),f(m)}else if(G[c].expressInstall&&j()){m={};m.data=G[c].expressInstall;m.width=p.getAttribute("width")||"0";m.height=p.getAttribute("height")||"0";if(p.getAttribute("class"))m.styleclass=p.getAttribute("class");if(p.getAttribute("align"))m.align=p.getAttribute("align");for(var h={},p=p.getElementsByTagName("param"),t=p.length,q=0;q<t;q++)"movie"!=p[q].getAttribute("name").toLowerCase()&&
(h[p[q].getAttribute("name")]=p[q].getAttribute("value"));l(m,h,e,f)}else u(p),f&&f(m)}else if(o(e,!0),f){if((e=g(e))&&typeof e.SetVariable!=B)m.success=!0,m.ref=e;f(m)}}}function g(b){var c=null;if((b=n(b))&&"OBJECT"==b.nodeName)typeof b.SetVariable!=B?c=b:(b=b.getElementsByTagName(C)[0])&&(c=b);return c}function j(){return!P&&k("6.0.65")&&(w.win||w.mac)&&!(w.wk&&312>w.wk)}function l(b,c,e,g){P=!0;Q=g||null;S={success:!1,id:e};var f=n(e);if(f){"OBJECT"==f.nodeName?(M=q(f),O=null):(M=f,O=e);b.id=
E;if(typeof b.width==B||!/%$/.test(b.width)&&310>parseInt(b.width,10))b.width="310";if(typeof b.height==B||!/%$/.test(b.height)&&137>parseInt(b.height,10))b.height="137";z.title=z.title.slice(0,47)+" - Flash Player Installation";g=w.ie&&w.win?"ActiveX":"PlugIn";g="MMredirectURL="+p.location.toString().replace(/&/g,"%26")+"&MMplayerType="+g+"&MMdoctitle="+z.title;c.flashvars=typeof c.flashvars!=B?c.flashvars+("&"+g):g;if(w.ie&&w.win&&4!=f.readyState)g=z.createElement("div"),e+="SWFObjectNew",g.setAttribute("id",
e),f.parentNode.insertBefore(g,f),f.style.display="none",function(){4==f.readyState?f.parentNode.removeChild(f):setTimeout(arguments.callee,10)}();A(b,c,e)}}function u(b){if(w.ie&&w.win&&4!=b.readyState){var c=z.createElement("div");b.parentNode.insertBefore(c,b);c.parentNode.replaceChild(q(b),c);b.style.display="none";(function(){4==b.readyState?b.parentNode.removeChild(b):setTimeout(arguments.callee,10)})()}else b.parentNode.replaceChild(q(b),b)}function q(b){var c=z.createElement("div");if(w.win&&
w.ie)c.innerHTML=b.innerHTML;else if(b=b.getElementsByTagName(C)[0])if(b=b.childNodes)for(var e=b.length,g=0;g<e;g++)!(1==b[g].nodeType&&"PARAM"==b[g].nodeName)&&8!=b[g].nodeType&&c.appendChild(b[g].cloneNode(!0));return c}function A(b,c,e){var g,f=n(e);if(w.wk&&312>w.wk)return g;if(f){if(typeof b.id==B)b.id=e;if(w.ie&&w.win){var k="",j;for(j in b)if(b[j]!=Object.prototype[j])"data"==j.toLowerCase()?c.movie=b[j]:"styleclass"==j.toLowerCase()?k+=' class="'+b[j]+'"':"classid"!=j.toLowerCase()&&(k+=
" "+j+'="'+b[j]+'"');j="";for(var m in c)c[m]!=Object.prototype[m]&&(j+='<param name="'+m+'" value="'+c[m]+'" />');f.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+k+">"+j+"</object>";N[N.length]=b.id;g=n(b.id)}else{m=z.createElement(C);m.setAttribute("type",I);for(var o in b)b[o]!=Object.prototype[o]&&("styleclass"==o.toLowerCase()?m.setAttribute("class",b[o]):"classid"!=o.toLowerCase()&&m.setAttribute(o,b[o]));for(k in c)c[k]!=Object.prototype[k]&&"movie"!=k.toLowerCase()&&
(b=m,j=k,o=c[k],e=z.createElement("param"),e.setAttribute("name",j),e.setAttribute("value",o),b.appendChild(e));f.parentNode.replaceChild(m,f);g=m}}return g}function r(b){var c=n(b);if(c&&"OBJECT"==c.nodeName)w.ie&&w.win?(c.style.display="none",function(){if(4==c.readyState){var e=n(b);if(e){for(var g in e)"function"==typeof e[g]&&(e[g]=null);e.parentNode.removeChild(e)}}else setTimeout(arguments.callee,10)}()):c.parentNode.removeChild(c)}function n(b){var c=null;try{c=z.getElementById(b)}catch(e){}return c}
function m(b,c,e){b.attachEvent(c,e);L[L.length]=[b,c,e]}function k(b){var c=w.pv,b=b.split(".");b[0]=parseInt(b[0],10);b[1]=parseInt(b[1],10)||0;b[2]=parseInt(b[2],10)||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1}function t(b,c,e,g){if(!w.ie||!w.mac){var f=z.getElementsByTagName("head")[0];if(f){e=e&&"string"==typeof e?e:"screen";g&&(R=J=null);if(!J||R!=e)g=z.createElement("style"),g.setAttribute("type","text/css"),g.setAttribute("media",e),J=f.appendChild(g),
w.ie&&w.win&&typeof z.styleSheets!=B&&0<z.styleSheets.length&&(J=z.styleSheets[z.styleSheets.length-1]),R=e;w.ie&&w.win?J&&typeof J.addRule==C&&J.addRule(b,c):J&&typeof z.createTextNode!=B&&J.appendChild(z.createTextNode(b+" {"+c+"}"))}}}function o(b,c){if(T){var e=c?"visible":"hidden";K&&n(b)?n(b).style.visibility=e:t("#"+b,"visibility:"+e)}}function v(b){return null!=/[\\\"<>\.;]/.exec(b)&&typeof encodeURIComponent!=B?encodeURIComponent(b):b}var B="undefined",C="object",I="application/x-shockwave-flash",
E="SWFObjectExprInst",p=window,z=document,H=navigator,D=!1,F=[function(){D?f():h()}],G=[],N=[],L=[],M,O,Q,S,K=!1,P=!1,J,R,T=!0,w=function(){var b=typeof z.getElementById!=B&&typeof z.getElementsByTagName!=B&&typeof z.createElement!=B,c=H.userAgent.toLowerCase(),e=H.platform.toLowerCase(),g=e?/win/.test(e):/win/.test(c),e=e?/mac/.test(e):/mac/.test(c),c=/webkit/.test(c)?parseFloat(c.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,f=!+"\u000b1",k=[0,0,0],j=null;if(typeof H.plugins!=B&&typeof H.plugins["Shockwave Flash"]==
C){if((j=H.plugins["Shockwave Flash"].description)&&!(typeof H.mimeTypes!=B&&H.mimeTypes[I]&&!H.mimeTypes[I].enabledPlugin))D=!0,f=!1,j=j.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),k[0]=parseInt(j.replace(/^(.*)\..*$/,"$1"),10),k[1]=parseInt(j.replace(/^.*\.(.*)\s.*$/,"$1"),10),k[2]=/[a-zA-Z]/.test(j)?parseInt(j.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof p.ActiveXObject!=B)try{var m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(m&&(j=m.GetVariable("$version")))f=!0,j=j.split(" ")[1].split(","),
k=[parseInt(j[0],10),parseInt(j[1],10),parseInt(j[2],10)]}catch(o){}return{w3:b,pv:k,wk:c,ie:f,win:g,mac:e}}();(function(){w.w3&&((typeof z.readyState!=B&&"complete"==z.readyState||typeof z.readyState==B&&(z.getElementsByTagName("body")[0]||z.body))&&b(),K||(typeof z.addEventListener!=B&&z.addEventListener("DOMContentLoaded",b,!1),w.ie&&w.win&&(z.attachEvent("onreadystatechange",function(){"complete"==z.readyState&&(z.detachEvent("onreadystatechange",arguments.callee),b())}),p==top&&function(){if(!K){try{z.documentElement.doScroll("left")}catch(c){setTimeout(arguments.callee,
0);return}b()}}()),w.wk&&function(){K||(/loaded|complete/.test(z.readyState)?b():setTimeout(arguments.callee,0))}(),e(b)))})();(function(){w.ie&&w.win&&window.attachEvent("onunload",function(){for(var b=L.length,c=0;c<b;c++)L[c][0].detachEvent(L[c][1],L[c][2]);b=N.length;for(c=0;c<b;c++)r(N[c]);for(var e in w)w[e]=null;w=null;for(var g in swfobject)swfobject[g]=null;swfobject=null})})();return{registerObject:function(b,c,e,g){if(w.w3&&b&&c){var f={};f.id=b;f.swfVersion=c;f.expressInstall=e;f.callbackFn=
g;G[G.length]=f;o(b,!1)}else g&&g({success:!1,id:b})},getObjectById:function(b){if(w.w3)return g(b)},embedSWF:function(b,e,g,f,m,p,h,t,q,u){var E={success:!1,id:e};w.w3&&!(w.wk&&312>w.wk)&&b&&e&&g&&f&&m?(o(e,!1),c(function(){g+="";f+="";var c={};if(q&&typeof q===C)for(var n in q)c[n]=q[n];c.data=b;c.width=g;c.height=f;n={};if(t&&typeof t===C)for(var z in t)n[z]=t[z];if(h&&typeof h===C)for(var v in h)n.flashvars=typeof n.flashvars!=B?n.flashvars+("&"+v+"="+h[v]):v+"="+h[v];if(k(m))z=A(c,n,e),c.id==
e&&o(e,!0),E.success=!0,E.ref=z;else{if(p&&j()){c.data=p;l(c,n,e,u);return}o(e,!0)}u&&u(E)})):u&&u(E)},switchOffAutoHideShow:function(){T=!1},ua:w,getFlashPlayerVersion:function(){return{major:w.pv[0],minor:w.pv[1],release:w.pv[2]}},hasFlashPlayerVersion:k,createSWF:function(b,c,e){if(w.w3)return A(b,c,e)},showExpressInstall:function(b,c,e,g){w.w3&&j()&&l(b,c,e,g)},removeSWF:function(b){w.w3&&r(b)},createCSS:function(b,c,e,g){w.w3&&t(b,c,e,g)},addDomLoadEvent:c,addLoadEvent:e,getQueryParamValue:function(b){var c=
z.location.search||z.location.hash;if(c){/\?/.test(c)&&(c=c.split("?")[1]);if(null==b)return v(c);for(var c=c.split("&"),e=0;e<c.length;e++)if(c[e].substring(0,c[e].indexOf("="))==b)return v(c[e].substring(c[e].indexOf("=")+1))}return""},expressInstallCallback:function(){if(P){var b=n(E);if(b&&M){b.parentNode.replaceChild(M,b);if(O&&(o(O,!0),w.ie&&w.win))M.style.display="block";Q&&Q(S)}P=!1}}}}();swfobject.addDomLoadEvent(function(){"function"===typeof SWFUpload.onload&&SWFUpload.onload.call(window)});
window.onerror=null;
tooltip={attr_name:"tooltip",blank_text:"(\u0441\u0441\u044b\u043b\u043a\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435)",newline_entity:"~",delay:0,t:document.createElement("DIV"),c:null,g:!1,m:function(b){if(tooltip.g){oCanvas=document.getElementsByTagName(document.compatMode&&"CSS1Compat"==document.compatMode?"HTML":"BODY")[0];var c=navigator.userAgent.toLowerCase();(isIE=-1!=c.indexOf("msie")&&-1==c.indexOf("opera"))?
(x=event.clientX+oCanvas.scrollLeft,y=event.clientY+oCanvas.scrollTop):(x=b.pageX,y=b.pageY);tooltip.a(x,y)}},d:function(){tooltip.t.setAttribute("id","tooltip");document.body.appendChild(tooltip.t);a=document.all?document.all:document.getElementsByTagName("*");aLength=a.length;for(var b=0;b<aLength;b++)a[b]&&((tooltip_title=a[b].getAttribute("title"))&&"string"!=typeof tooltip_title&&(tooltip_title=""),tooltip_alt=a[b].getAttribute("alt"),tooltip_blank=a[b].getAttribute("target")&&"_blank"==a[b].getAttribute("target")&&
tooltip.blank_text,tooltip_title||tooltip_blank?(a[b].setAttribute(tooltip.attr_name,tooltip_blank?tooltip_title?tooltip_title+" "+tooltip.blank_text:tooltip.blank_text:tooltip_title),a[b].getAttribute(tooltip.attr_name)&&(a[b].removeAttribute("title"),tooltip_alt&&a[b].complete&&a[b].removeAttribute("alt"),tooltip.l(a[b],"mouseover",tooltip.s),tooltip.l(a[b],"mouseout",tooltip.h))):tooltip_alt&&a[b].complete&&(a[b].setAttribute(tooltip.attr_name,tooltip_alt),a[b].getAttribute(tooltip.attr_name)&&
(a[b].removeAttribute("alt"),tooltip.l(a[b],"mouseover",tooltip.s),tooltip.l(a[b],"mouseout",tooltip.h))),a[b].getAttribute(tooltip.attr_name));document.onmousemove=tooltip.m;window.onscroll=tooltip.h;tooltip.a(-99,-99)},s:function(b){d=window.event?window.event.srcElement:b.target;if(d.getAttribute(tooltip.attr_name))s=d.getAttribute(tooltip.attr_name),tooltip.newline_entity?(s=s.replace(/\&/g,"&amp;"),s=s.replace(/\</g,"&lt;"),s=s.replace(/\>/g,"&gt;"),s=s.replace(eval("/"+tooltip.newline_entity+
"/g"),"<br />"),tooltip.t.innerHTML=s):(tooltip.t.firstChild&&tooltip.t.removeChild(tooltip.t.firstChild),tooltip.t.appendChild(document.createTextNode(s))),tooltip.c=setTimeout("tooltip.t.style.visibility = 'visible';",tooltip.delay),tooltip.g=!0},h:function(){tooltip.t.style.visibility="hidden";!tooltip.newline_entity&&tooltip.t.firstChild&&tooltip.t.removeChild(tooltip.t.firstChild);clearTimeout(tooltip.c);tooltip.g=!1;tooltip.a(-99,-99)},l:function(b,c,e){if(b.addEventListener)b.addEventListener(c,
e,!1);else if(b.attachEvent)b.attachEvent("on"+c,e);else return null},a:function(b,c){oCanvas=document.getElementsByTagName(document.compatMode&&"CSS1Compat"==document.compatMode?"HTML":"BODY")[0];w_width=oCanvas.clientWidth?oCanvas.clientWidth+oCanvas.scrollLeft:window.innerWidth+window.pageXOffset;w_height=window.innerHeight?window.innerHeight+window.pageYOffset:oCanvas.clientHeight+oCanvas.scrollTop;t_width=tooltip.t.offsetWidth;t_height=tooltip.t.offsetHeight;tooltip.t.style.left=b+6+"px";tooltip.t.style.top=
c+16+"px";if(b+t_width>w_width-8)tooltip.t.style.left=w_width-t_width+"px";if(c+t_height>w_height-8)tooltip.t.style.top=w_height-t_height+"px"}};var root=window.addEventListener||window.attachEvent?window:document.addEventListener?document:null;root&&(root.addEventListener?root.addEventListener("load",tooltip.d,!1):root.attachEvent&&root.attachEvent("onload",tooltip.d));
(function(b){b.fn.lightBox=function(c){function e(){b("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+c.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+
c.imageBtnClose+'"></a></div></div></div></div>');var e=q();b("#jquery-overlay").css({backgroundColor:c.overlayBgColor,opacity:c.overlayOpacity,width:e[0],height:e[1]}).fadeIn();var g=A();b("#jquery-lightbox").css({top:g[1]+e[3]/10,left:g[0]}).show();b("#jquery-overlay,#jquery-lightbox").click(function(){u()});b("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){u();return!1});b(window).resize(function(){var c=q();b("#jquery-overlay").css({width:c[0],height:c[1]});var e=A();b("#jquery-lightbox").css({top:e[1]+
c[3]/10,left:e[0]})})}function f(){b("#lightbox-loading").show();c.fixedNavigation?b("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide():b("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide();var e=new Image;e.onload=function(){b("#lightbox-image").attr("src",c.imageArray[c.activeImage][0]);h(e.width,e.height);e.onload=function(){}};e.src=c.imageArray[c.activeImage][0]}
function h(e,f){var j=b("#lightbox-container-image-box").width(),o=b("#lightbox-container-image-box").height(),l=e+2*c.containerBorderSize,h=f+2*c.containerBorderSize,j=j-l,o=o-h;b("#lightbox-container-image-box").animate({width:l,height:h},c.containerResizeSpeed,function(){g()});0==j&&0==o&&(b.browser.msie?r(250):r(100));b("#lightbox-container-image-data-box").css({width:e});b("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:f+2*c.containerBorderSize})}function g(){b("#lightbox-loading").hide();
b("#lightbox-image").fadeIn(function(){b("#lightbox-container-image-data-box").slideDown("fast");b("#lightbox-image-details-caption").hide();c.imageArray[c.activeImage][1]&&b("#lightbox-image-details-caption").html(c.imageArray[c.activeImage][1]).show();1<c.imageArray.length&&b("#lightbox-image-details-currentNumber").html(c.txtImage+" "+(c.activeImage+1)+" "+c.txtOf+" "+c.imageArray.length).show();j()});if(c.imageArray.length-1>c.activeImage)objNext=new Image,objNext.src=c.imageArray[c.activeImage+
1][0];if(0<c.activeImage)objPrev=new Image,objPrev.src=c.imageArray[c.activeImage-1][0]}function j(){b("#lightbox-nav").show();b("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+c.imageBlank+") no-repeat"});0!=c.activeImage&&(c.fixedNavigation?b("#lightbox-nav-btnPrev").css({background:"url("+c.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){c.activeImage-=1;f();return!1}):b("#lightbox-nav-btnPrev").unbind().hover(function(){b(this).css({background:"url("+
c.imageBtnPrev+") left 15% no-repeat"})},function(){b(this).css({background:"transparent url("+c.imageBlank+") no-repeat"})}).show().bind("click",function(){c.activeImage-=1;f();return!1}));c.activeImage!=c.imageArray.length-1&&(c.fixedNavigation?b("#lightbox-nav-btnNext").css({background:"url("+c.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){c.activeImage+=1;f();return!1}):b("#lightbox-nav-btnNext").unbind().hover(function(){b(this).css({background:"url("+c.imageBtnNext+
") right 15% no-repeat"})},function(){b(this).css({background:"transparent url("+c.imageBlank+") no-repeat"})}).show().bind("click",function(){c.activeImage+=1;f();return!1}));l()}function l(){b(document).keydown(function(e){null==e?(keycode=event.keyCode,escapeKey=27):(keycode=e.keyCode,escapeKey=e.DOM_VK_ESCAPE);key=String.fromCharCode(keycode).toLowerCase();(key==c.keyToClose||"x"==key||keycode==escapeKey)&&u();if((key==c.keyToPrev||37==keycode)&&0!=c.activeImage)c.activeImage-=1,f(),b(document).unbind();
if((key==c.keyToNext||39==keycode)&&c.activeImage!=c.imageArray.length-1)c.activeImage+=1,f(),b(document).unbind()})}function u(){b("#jquery-lightbox").remove();b("#jquery-overlay").fadeOut(function(){b("#jquery-overlay").remove()});b("embed, object, select").css({visibility:"visible"})}function q(){var b,c;window.innerHeight&&window.scrollMaxY?(b=window.innerWidth+window.scrollMaxX,c=window.innerHeight+window.scrollMaxY):document.body.scrollHeight>document.body.offsetHeight?(b=document.body.scrollWidth,
c=document.body.scrollHeight):(b=document.body.offsetWidth,c=document.body.offsetHeight);var e,g;if(self.innerHeight)e=document.documentElement.clientWidth?document.documentElement.clientWidth:self.innerWidth,g=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)e=document.documentElement.clientWidth,g=document.documentElement.clientHeight;else if(document.body)e=document.body.clientWidth,g=document.body.clientHeight;pageHeight=c<g?g:c;pageWidth=b<e?b:e;return arrayPageSize=
[pageWidth,pageHeight,e,g]}function A(){var b,c;if(self.pageYOffset)c=self.pageYOffset,b=self.pageXOffset;else if(document.documentElement&&document.documentElement.scrollTop)c=document.documentElement.scrollTop,b=document.documentElement.scrollLeft;else if(document.body)c=document.body.scrollTop,b=document.body.scrollLeft;return arrayPageScroll=[b,c]}function r(b){var c=new Date;do var e=new Date;while(e-c<b)}var c=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:!1,imageLoading:"/img/lightbox/lightbox-ico-loading.gif",
imageBtnPrev:"/img/lightbox/lightbox-btn-prev.gif",imageBtnNext:"/img/lightbox/lightbox-btn-next.gif",imageBtnClose:"/img/lightbox/lightbox-btn-close.gif",imageBlank:"/img/lightbox/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},c),n=this;return this.unbind("click").click(function(){b("embed, object, select").css({visibility:"hidden"});e();c.imageArray.length=0;c.activeImage=0;if(1==
n.length)c.imageArray.push([this.getAttribute("href"),this.getAttribute("title")]);else for(var g=0;g<n.length;g++)c.imageArray.push([n[g].getAttribute("href"),n[g].getAttribute("title")]);for(;c.imageArray[c.activeImage][0]!=this.getAttribute("href");)c.activeImage++;f();return!1})}})(jQuery);
(function(b){var c=b.browser.msie&&6===parseInt(b.browser.version)&&"object"!==typeof window.XMLHttpRequest,e=b.browser.msie&&7===parseInt(b.browser.version),f=null,h=[];b.modal=function(c,e){return b.modal.impl.init(c,e)};b.modal.close=function(){b.modal.impl.close()};b.modal.focus=function(c){b.modal.impl.focus(c)};b.modal.setContainerDimensions=function(){b.modal.impl.setContainerDimensions()};b.modal.setPosition=function(){b.modal.impl.setPosition()};b.modal.update=function(c,e){b.modal.impl.update(c,
e)};b.fn.modal=function(c){return b.modal.impl.init(this,c)};b.modal.defaults={appendTo:"body",focus:!0,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:!1,autoPosition:!0,zIndex:1E3,close:!0,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,position:null,persist:!1,modal:!0,
onOpen:null,onShow:null,onClose:null};b.modal.impl={d:{},init:function(c,e){if(this.d.data)return!1;f=b.browser.msie&&!b.boxModel;this.o=b.extend({},b.modal.defaults,e);this.zIndex=this.o.zIndex;this.occb=!1;if("object"===typeof c){if(c=c instanceof jQuery?c:b(c),this.d.placeholder=!1,0<c.parent().parent().size()&&(c.before(b("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"})),this.d.placeholder=!0,this.display=c.css("display"),!this.o.persist))this.d.orig=c.clone(!0)}else if("string"===
typeof c||"number"===typeof c)c=b("<div></div>").html(c);else return alert("SimpleModal Error: Unsupported data type: "+typeof c),this;this.create(c);this.open();b.isFunction(this.o.onShow)&&this.o.onShow.apply(this,[this.d]);return this},create:function(e){h=this.getDimensions();if(this.o.modal&&c)this.d.iframe=b('<iframe src="javascript:false;"></iframe>').css(b.extend(this.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:h[0],width:h[1],zIndex:this.o.zIndex,top:0,left:0})).appendTo(this.o.appendTo);
this.d.overlay=b("<div></div>").attr("id",this.o.overlayId).addClass("simplemodal-overlay").css(b.extend(this.o.overlayCss,{display:"none",opacity:this.o.opacity/100,height:this.o.modal?h[0]:0,width:this.o.modal?h[1]:0,position:"fixed",left:0,top:0,zIndex:this.o.zIndex+1})).appendTo(this.o.appendTo);this.d.container=b("<div></div>").attr("id",this.o.containerId).addClass("simplemodal-container").css(b.extend(this.o.containerCss,{display:"none",position:"fixed",zIndex:this.o.zIndex+2})).append(this.o.close&&
this.o.closeHTML?b(this.o.closeHTML).addClass(this.o.closeClass):"").appendTo(this.o.appendTo);this.d.wrap=b("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(this.d.container);this.d.data=e.attr("id",e.attr("id")||this.o.dataId).addClass("simplemodal-data").css(b.extend(this.o.dataCss,{display:"none"})).appendTo("body");this.setContainerDimensions();this.d.data.appendTo(this.d.wrap);(c||f)&&this.fixIE()},bindEvents:function(){var e=
this;b("."+e.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();e.close()});e.o.modal&&e.o.close&&e.o.overlayClose&&e.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();e.close()});b(document).bind("keydown.simplemodal",function(b){e.o.modal&&9===b.keyCode?e.watchTab(b):e.o.close&&e.o.escClose&&27===b.keyCode&&(b.preventDefault(),e.close())});b(window).bind("resize.simplemodal",function(){h=e.getDimensions();e.o.autoResize?e.setContainerDimensions():e.o.autoPosition&&
e.setPosition();c||f?e.fixIE():e.o.modal&&(e.d.iframe&&e.d.iframe.css({height:h[0],width:h[1]}),e.d.overlay.css({height:h[0],width:h[1]}))})},unbindEvents:function(){b("."+this.o.closeClass).unbind("click.simplemodal");b(document).unbind("keydown.simplemodal");b(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var c=this.o.position;b.each([this.d.iframe||null,!this.o.modal?null:this.d.overlay,this.d.container],function(b,e){if(e){var f=e[0].style;f.position=
"absolute";if(2>b)f.removeExpression("height"),f.removeExpression("width"),f.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'),f.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"');else{var h;c&&c.constructor===Array?(b=c[0]?"number"===typeof c[0]?c[0].toString():c[0].replace(/px/,""):e.css("top").replace(/px/,""),
b=-1===b.indexOf("%")?b+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(b.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',c[1]&&(h="number"===typeof c[1]?c[1].toString():c[1].replace(/px/,""),h=-1===h.indexOf("%")?h+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':
parseInt(h.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"')):(b='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',h='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"');
f.removeExpression("top");f.removeExpression("left");f.setExpression("top",b);f.setExpression("left",h)}}})},focus:function(c){var e=this,c=c&&-1!==b.inArray(c,["first","last"])?c:"first",f=b(":input:enabled:visible:"+c,e.d.wrap);setTimeout(function(){0<f.length?f.focus():e.d.wrap.focus()},10)},getDimensions:function(){var c=b(window);return[b.browser.opera&&"9.5"<b.browser.version&&"1.3">b.fn.jquery||b.browser.opera&&"9.5">b.browser.version&&"1.2.6"<b.fn.jquery?c[0].innerHeight:c.height(),c.width()]},
getVal:function(b,c){return b?"number"===typeof b?b:"auto"===b?0:0<b.indexOf("%")?parseInt(b.replace(/%/,""))/100*("h"===c?h[0]:h[1]):parseInt(b.replace(/px/,"")):null},update:function(b,c){if(!this.d.data)return!1;this.d.origHeight=this.getVal(b,"h");this.d.origWidth=this.getVal(c,"w");this.d.data.hide();b&&this.d.container.css("height",b);c&&this.d.container.css("width",c);this.setContainerDimensions();this.d.data.show();this.o.focus&&this.focus();this.unbindEvents();this.bindEvents()},setContainerDimensions:function(){var g=
c||e,f=this.d.origHeight?this.d.origHeight:b.browser.opera?this.d.container.height():this.getVal(g?this.d.container[0].currentStyle.height:this.d.container.css("height"),"h"),g=this.d.origWidth?this.d.origWidth:b.browser.opera?this.d.container.width():this.getVal(g?this.d.container[0].currentStyle.width:this.d.container.css("width"),"w"),l=this.d.data.outerHeight(!0),u=this.d.data.outerWidth(!0);this.d.origHeight=this.d.origHeight||f;this.d.origWidth=this.d.origWidth||g;var q=this.o.maxHeight?this.getVal(this.o.maxHeight,
"h"):null,A=this.o.maxWidth?this.getVal(this.o.maxWidth,"w"):null,q=q&&q<h[0]?q:h[0],A=A&&A<h[1]?A:h[1],r=this.o.minHeight?this.getVal(this.o.minHeight,"h"):"auto",f=f?this.o.autoResize&&f>q?q:f<r?r:f:l?l>q?q:this.o.minHeight&&"auto"!==r&&l<r?r:l:r,q=this.o.minWidth?this.getVal(this.o.minWidth,"w"):"auto",g=g?this.o.autoResize&&g>A?A:g<q?q:g:u?u>A?A:this.o.minWidth&&"auto"!==q&&u<q?q:u:q;this.d.container.css({height:f,width:g});this.d.wrap.css({overflow:l>f||u>g?"auto":"visible"});this.o.autoPosition&&
this.setPosition()},setPosition:function(){var b,c;b=h[0]/2-this.d.container.outerHeight(!0)/2;c=h[1]/2-this.d.container.outerWidth(!0)/2;this.o.position&&"[object Array]"===Object.prototype.toString.call(this.o.position)&&(b=this.o.position[0]||b,c=this.o.position[1]||c);this.d.container.css({left:c,top:b})},watchTab:function(c){if(0<b(c.target).parents(".simplemodal-container").length){if(this.inputs=b(":input:enabled:visible:first, :input:enabled:visible:last",this.d.data[0]),!c.shiftKey&&c.target===
this.inputs[this.inputs.length-1]||c.shiftKey&&c.target===this.inputs[0]||0===this.inputs.length)c.preventDefault(),this.focus(c.shiftKey?"last":"first")}else c.preventDefault(),this.focus()},open:function(){this.d.iframe&&this.d.iframe.show();b.isFunction(this.o.onOpen)?this.o.onOpen.apply(this,[this.d]):(this.d.overlay.show(),this.d.container.show(),this.d.data.show());this.o.focus&&this.focus();this.bindEvents()},close:function(){var c=this;if(!c.d.data)return!1;c.unbindEvents();if(b.isFunction(c.o.onClose)&&
!c.occb)c.occb=!0,c.o.onClose.apply(c,[c.d]);else{if(c.d.placeholder){var e=b("#simplemodal-placeholder");c.o.persist?e.replaceWith(c.d.data.removeClass("simplemodal-data").css("display",c.display)):(c.d.data.hide().remove(),e.replaceWith(c.d.orig))}else c.d.data.hide().remove();c.d.container.hide().remove();c.d.overlay.hide();c.d.iframe&&c.d.iframe.hide().remove();setTimeout(function(){c.d.overlay.remove();c.d={}},10)}}}})(jQuery);
(function(b){b.fn.Carousel=function(c){var e=b.extend({speed:20,rewSpeed:400,start:0,hPics:[],hPicsSt:[],pics:[],margin:33,height:60},c||{});e.speed=1E5/e.speed;e.rewSpeed=1E5/e.rewSpeed;return this.each(function(){function c(b,g,k,h){b=null==b?B:b;g=null==g?function(){c(b,g,k,h)}:g;j.animate({scrollLeft:- -(v+b)},null==k?e.speed:k,null==h?"linear":h,function(){v+=b;v+C+o>=n&&(j.scrollLeft(v-n/3),v-=n/3);g()})}function h(b,c,f,g){b=null==b?B:b;c=null==c?function(){h(b,c,f,g)}:c;j.animate({scrollLeft:v-
b},null==f?e.speed:f,null==g?"linear":g,function(){v-=b;200>=v&&(j.scrollLeft(v+n/3),v+=n/3);c()})}function g(){j.stop();v=0+parseInt(j.scrollLeft())}var j=b(this),l=b("ul",j),u=b("li",l),q=u.size();if(e.hPics.length)var A=b("img",j).each(function(c){e.pics.push(b(this).attr("src"));e.hPicsSt.push(0);var f=new Image;f.key=c;f.onload=function(){e.hPicsSt[this.key]=1};f.src=e.hPics[c]}).size();var r=u.clone(),n=0,m=0,k=!1;u.each(function(c,e){n+=b(e).width()});m=n+(q+1)*e.margin;m+300>j.width()&&(k=
!0);k&&l.prepend(r).append(r.clone());!k&&(e.margin=parseInt((j.width()-n)/(q+1)));60<e.margin&&(e.margin=60);if(e.hPics.length){var t=0;b("img",j).each(function(){b(this).parent().css({"margin-top":(e.height-b(this).height())/2,"margin-left":e.margin});this.key=t;t=t+1==A?0:t+1})}e.hPics.length&&b("img",this).bind("mouseout",function(){e.hPicsSt[this.key]&&b(this).animate({opacity:0.6},120,"linear",function(){b(this).attr("src",e.pics[this.key]).css({opacity:1})})}).bind("mouseover",function(){e.hPicsSt[this.key]&&
b(this).attr("src",e.hPics[this.key]).css({opacity:1}).animate({opacity:1},170,"linear")});!k&&b(".but_left, .but_right",j).css("display","none");k&&b(".but_left",j).bind("mousedown",function(){b(this).css("border-top-width",1);h(null,null,e.rewSpeed)}).bind("mouseup mouseout",function(){b(this).css("border-top-width",0);return g()});k&&b(".but_right",j).bind("mousedown",function(){b(this).css("border-top-width",1);c(null,null,e.rewSpeed)}).bind("mouseup mouseout",function(){b(this).css("border-top-width",
0);return g()});var u=b("li",l),o=80,v=e.start,B=100,n=0;u.each(function(c,e){n+=b(e).width();tooltip.l(b(e).children("a").children("img")[0],"mouseover",tooltip.s);tooltip.l(b(e).children("a").children("img")[0],"mouseout",tooltip.h)});e.start+=n/3;v+=n/3;l.css({width:n+"px"});var C=j.width(),I=!0;j.bind("mouseleave",function(){if(!I)return c()}).bind("mouseenter",function(){I=!1;return g()}).bind("mousemove",function(){if(I)return I=!1,g()});j.scrollLeft(e.start);k&&c();return!0})}})(jQuery);
var do_linked_resize=1,resize_percent=50;add_onload_event(fix_linked_image_sizes);
function fix_linked_image_sizes(){if(1!=do_linked_resize)return!0;for(var b=document.getElementsByTagName("IMG"),c=0,e=screen.width*(parseInt(resize_percent)/100),f=0;f<b.length;f++)if("linked-image"==b[f].className&&(c++,b[f].width>e)){var h=b[f].width,g=b[f].height,j=0;b[f].width=e;b[f].width<h&&0<h&&0<b[f].width&&(j=Math.ceil(parseInt(100*(b[f].width/h))));b[f].id="--ipb-img-resizer-"+c;b[f]._resized=1;b[f]._width=h;var l=document.createElement("div");l.innerHTML='<img src="/img/img-resized.png" style="vertical-align:middle" border="0" alt="" />&nbsp;\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043e: '+
j+"% \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 [ "+h+" x "+g+" ] - \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f";l.style.width=b[f].width-4+"px";l.className="resized-linked-image";l.style.textAlign="left";l.style.fontWeight="normal";l.style.paddingTop="2px";l.style.paddingBottom="2px";l.style.paddingLeft=
"2px";l.style.paddingRight="2px";l._is_div=1;l._resize_id=c;l.onclick=fix_linked_images_onclick;l.onmouseover=fix_linked_images_mouseover;l.title="\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f";l._src=b[f].src;b[f].parentNode.insertBefore(l,b[f])}}
function fix_linked_images_onclick(){PopUp(this._src,"popup",screen.width,screen.height,1,1,1);return!1}function fix_attach_images_mouseover(){try{this.style.cursor="pointer"}catch(b){}}function fix_linked_images_mouseover(){try{this.style.cursor="pointer"}catch(b){}}function PopUp(b,c,e,f,h,g,j,l,u){showy=showx="";0!=l&&(X=l);0!=u&&(Y=u);4<=parseInt(navigator.appVersion)&&h&&(X=(screen.width-e)/2,Y=(screen.height-f)/2);0<X&&(showx=",left="+X);0<Y&&(showy=",top="+Y);window.location=b}
function add_onload_event(b){var c=window.onload;window.onload="function"!=typeof window.onload?b:function(){c&&c();b()}}
(function(b){b.fn.validationEngineLanguage=function(){};b.validationEngineLanguage={newLang:function(){b.validationEngineLanguage.allRules={required:{regex:"none",alertText:"* \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435",alertTextCheckboxMultiple:"* \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435",alertTextCheckboxe:"* \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u043a\u0431\u043e\u043a\u0441"},
length:{regex:"none",alertText:"* \u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 ",alertText2:" \u0438 ",alertText3:" \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432"},maxCheckbox:{regex:"none",alertText:"* Checks allowed Exceeded"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},confirm:{regex:"none",alertText:"* \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442"},
telephone:{regex:/^[0-9\-\(\)\ ]+$/,alertText:"* Invalid phone number"},time:{regex:/^[0-9]+:[0-9]+:[0-9]+$/,alertText:"* \u041d\u0435 \u0432\u0435\u0440\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u0440\u0435\u043c\u044f - \u0447\u0447:\u043c\u043c:\u0441\u0441"},resolution:{regex:/^[0-9]+[x\u0445]+[0-9]+$/,alertText:"* \u041d\u0435 \u0432\u0435\u0440\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 - \u0428x\u0412."},
email:{regex:/^[a-z0-9_\-]+(?:\.)*[a-z0-9_\-]+@[a-z0-9\-]+(?:\.)*[a-z0-9\-]*(?:\.)+[a-z]{2,}$/i,alertText:"* \u041d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 email"},date:{regex:/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/,alertText:"* Invalid date, must be in YYYY-MM-DD format"},torrent:{regex:/^[a-z0-9_\.\-\[\]\(\) ]+$/i,alertText:"* \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u0432\u043e\u043b\u044b: A-z0-9_.-[]() \u0438 \u043f\u0440\u043e\u0431\u0435\u043b"},
onlyNumber:{regex:/^[0-9]*$/,alertText:"* \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0438\u0444\u0440\u044b"},noSpecialCaracters:{regex:/^[\a-zA-Z0-9\u0430-\u044f\u0410-\u042f\u0451\u0401_]*$/,alertText:"* \u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b"},skype:{regex:/^[a-zA-Z0-9\-\.\_]*$/,alertText:"* \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b: A-z0-9-_."},
money:{regex:/^[0-9\.,]*$/,alertText:"* \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0438\u0444\u0440\u044b, \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u0437\u0430\u043f\u044f\u0442\u0430\u044f"},ajaxUser:{file:"ajax.php?func=registry",extraData:"",alertTextLoad:"* \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435",alertText:"* \u0414\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0443\u0436\u0435 \u0437\u0430\u043d\u044f\u0442\u043e"},
ajaxEmail:{file:"ajax.php?func=registry",extraData:"",alertTextLoad:"* \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435",alertText:"* \u0414\u0430\u043d\u043d\u044b\u0439 email \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d"},onlyLetter:{regex:/^[a-zA-Z\u0430-\u044f\u0410-\u042f\u0451\u0401\ \',&\.\-`]*$/,alertText:"* \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u043a\u0432\u044b"}}}}})(jQuery);
$(document).ready(function(){$.validationEngineLanguage.newLang()});
(function(b){function c(c,e){var f=(b(window).width()-c)/2+b(window).scrollLeft(),g=(b(window).height()-e)/2+b(window).scrollTop();return{left:0>f?0:f,top:0>g?0:g}}function e(e){j||(j=b("<div></div>").css({width:50,height:50,position:"absolute",background:"transparent",opacity:0.8,color:"#FFF",padding:"5px","font-size":"10px"}));j.css(c(50,50)).html('<img src="'+e.imgDir+'blank.gif" />').click(function(){l=!0;f()}).appendTo("body").show();u=setTimeout(function(){h(e)},400)}function f(){j.hide().remove();
u&&(clearTimeout(u),u=null)}function h(e){if(j&&!j.is(":visible"))u=null;else{var f=b("img",j);!f.attr("src")||/blank\.gif/.test(f.attr("src"))?strImgSrc=e.imgDir+"spin-1.png":(tab=f.attr("src").split(/[- .]+/),iImg=parseInt(tab[2]),iImg=12>iImg?iImg+1:1,strImgSrc=tab[0]+"-"+tab[1]+"-"+iImg+"."+tab[3]);e=new Image;e.src=strImgSrc;var g=function(){j&&j.css(c(50,50));f.attr("src",strImgSrc);u=setTimeout(h,100)};e.complete?g():e.onload=g}}function g(b){if(!b)return!1;var c=b.split("/");return 1>c.length?
b:c[c.length-1]}b.fn.fancyzoom=function(h){function u(e,f){f.showoverlay&&(n.appendTo("body").click(function(){r(f)}),b.browser.msie&&7>b.browser.version&&n.css({position:"absolute",height:b(document).height(),width:b(document).width()}));var g=f.oImgZoomBox;pos=e.offset();f=b.extend(f,{imgSrc:e,dimOri:{width:e.outerWidth(),height:e.outerHeight(),left:pos.left,top:pos.top,opacity:1}});if(!e.is("img"))f.dimOri=b.extend(f.dimOri,{width:0,height:0});g.css({"text-align":"center",border:"0px solid red"}).appendTo("body");
var h=g.outerWidth(),j=g.outerHeight();dimBoxTarget=b.extend({},{width:h,height:j,opacity:1},c(h,j+30));f.oImgClose.css({left:dimBoxTarget.left+dimBoxTarget.width-15,top:dimBoxTarget.top-15});h=function(){b.fn.shadow&&f.shadow&&!b.browser.msie&&b("img:first",g).shadow(f.shadowOpts);0<f.Speed&&!b.browser.msie?(f.oImgClose.fadeIn("slow"),b("div",g).fadeIn("slow")):(f.oImgClose.show(),b("div",g).show())};b("div",g).hide();f.imgSrc.is("img")&&f.imgSrc.css({opacity:0});b("img:first",g).css({width:"100%",
height:"auto"});0<f.Speed?g.css(f.dimOri).animate(dimBoxTarget,f.Speed,h):(g.css(dimBoxTarget),h())}function r(c){var e=c.oImgZoomBox;c.oImgClose.remove();b("div",e).remove();var f=function(){e.empty().remove();c.imgSrc.css("opacity",1)};if(0<c.Speed){var g=e.offset(),g={width:1.15*e.width(),height:1.15*e.height(),left:g.left-0.075*e.width(),top:g.top-0.075*e.height()};e.animate(g,0.2*c.Speed,function(){e.animate(c.dimOri,c.Speed,function(){f()});c.showoverlay&&n.animate({opacity:0},c.Speed,function(){b(this).remove()})})}else f(),
c.showoverlay&&n.remove()}var n=b("<div>").css({height:"100%",width:"100%",position:"fixed",zIndex:100,left:0,top:0,cursor:"wait"});return this.each(function(){var c=b(this),k=c.is("img")?c:0==b("img:first",c).length?c:b("img:first",c),t=null;c.attr("href")&&(t=c.attr("href"));var o=b('<img class="jqfancyzoomclosebox">').css({position:"absolute",top:0,left:0,cursor:"pointer"}),v=b.extend({},b.fn.fancyzoom.defaultsOptions,h||{},{dimOri:{},oImgZoomBoxProp:{position:"absolute",left:0,top:0},oImgClose:o});
if(k.is("img")){var B=b("<img src='"+v.imgDir+"zoom.png'>").css({position:"absolute",top:0,left:0});k.hover(function(){if(0!=k.css("opacity")){B.appendTo(k.parent()).hide();var c=k.position(),e=parseInt(k.css("margin-left").replace(/px/,"")),f=parseInt(k.css("margin-top").replace(/px/,""));B.css({left:c.left+(e?e:0)-12,top:c.top+(f?f:0)-12}).show();b.fn.ifixpng&&B.ifixpng(v.imgDir+"blank.gif")}},function(){B.remove()})}c.is("img")&&(t=c.css("cursor","pointer").attr("src"),v.imgResizeScript&&t.match(RegExp("^"+
v.imgResizeScript,"g"))&&(t=t.replace(/.*img=([^&]*).*/gi,"$1")));n.css({opacity:v.overlay,background:v.overlayColor});if(!/\.jpg|\.jpeg|\.png|\.gif/i.test(t))return!0;c.click(function(){var c=b("div.jqfancyzoombox");if(0<c.length)if(b("img:first",c).attr("src")!=t)j&&j.is(":visible")&&(l=!0,f());else return!1;var m=b.extend({},v,h),E=b("img.jqfancyzoomclosebox");if(0<E.length){c=b("img:first",c);if(t==c.attr("src"))return pos=k.offset(),m=b.extend(m,{dimOri:{width:k.outerWidth(),height:k.outerHeight(),
left:pos.left,top:pos.top,opacity:0}}),r(m),!1;E.trigger("click")}m.showoverlay&&n&&n.empty().remove().css({opacity:m.overlay});o.attr("src",m.imgDir+"closebox.png").appendTo("body").hide();b.fn.ifixpng&&(b.ifixpng(m.imgDir+"blank.gif"),o.ifixpng(m.imgDir+"blank.gif"));o.unbind("click").click(function(){r(m)});var p=b('<div class="jqfancyzoombox"></div>').css(m.oImgZoomBoxProp),m=b.extend(m,{oImgZoomBox:p});if(E=k.attr("alt")){var E=b('<div><center><table height=0 border="0" cellspacing=0 cellpadding=0><tr><td></td><td class="fancyTitle">'+
E+"</td><td></td></table></center></div>").css({marginTop:10,marginRight:15}),c=E.find("td:first").css({background:"url("+m.imgDir+"caption-l.png)",width:"13px",height:"26px"}),z=E.find("td:last").css({background:"url("+m.imgDir+"caption-r.png)",width:"13px",height:"26px"}),B=b(".fancyTitle",E).css({background:"url("+m.imgDir+"caption-fill.png)",padding:"0px 20px",color:"#FFF","font-size":"14px"});b.fn.ifixpng&&(c.ifixpng(m.imgDir+"blank.gif"),z.ifixpng(m.imgDir+"blank.gif"),B.ifixpng(m.imgDir+"blank.gif"));
E.appendTo(p)}var D=b("<img />").attr("src",t).click(function(){r(m)}).prependTo(p),E=v.imagezindex;n.css("zIndex",E-1);p.css("zIndex",E);o.css("zIndex",E+10);var F=new Image;F.src=t;var G=function(c){if(c){var c=b("<div></div>").css({position:"absolute",top:0,left:0,opacity:0,border:"0px solid red"}),e=!1;D.appendTo(c);c.appendTo("body");imWidth=D.width();imHeight=D.height();maxWidth=0.9*b(window).width();maxHeight=b(window).height()-100;maxHeight<imHeight?(e=!0,D.height(maxHeight),imWidth=imWidth*
maxHeight/imHeight,D.width(imWidth),maxWidth<imWidth&&(D.width(maxWidth),D.height(imHeight*maxWidth/imWidth))):maxWidth<imWidth&&(e=!0,D.width(maxWidth),D.height(imHeight*maxWidth/imWidth));if(e&&m.imgResizeScript){var e=D.width(),f=D.height(),g=e,h=[1440,1280,1024,800,640,480,360];for(i=0;i<h.length;i++)if(e>h[i]){g=h[i];break}D.width(g);D.height(parseInt(f*g/e));e="img="+encodeURI(D.attr("src"));e+="&width="+D.width();e+="&height="+D.height();D.attr("src",m.imgResizeScript+"?"+e)}c.remove()}D.prependTo(p)};
F.complete?(G(m.autoresize),u(k,m)):(e(m),F.onload=function(){l?l=!1:g(F.src)==g(b("img:first",p).attr("src"))&&(G(m.autoresize),u(k,m),f())});return!1})})};b.fn.fancyzoom.defaultsOptions={overlayColor:"#000",overlay:0.6,imagezindex:100,showoverlay:!0,Speed:400,shadow:!0,shadowOpts:{color:"#000",offset:4,opacity:0.2},imgDir:"/img/fancyzoom/",imgResizeScript:null,autoresize:!0};var j=null,l=!1,u=null})(jQuery);error=!1;
function preLoad(){if(!this.support.loading||!this.support.imageResize)return error||($("#flash_player").show("middle"),error=!0),!1}function loadFailed(){alert("Something went wrong while loading SWFUpload. If this were a real application we'd clean up and then give you an alternative")}
function fileQueued(b){"avatar"==this.customSettings.type?(height=$("#content .avatar_img").height()/2-33,$("#avatar_loader").css("top",height+"px"),$("#avatar_loader").show()):"torrent_file"==this.customSettings.type?($("#loader_torrent").show(),$("#tfile").val(b.name),$("#tfile").focusout()):"torrent_poster"==this.customSettings.type?($("#loader_poster").show(),$("#image").val(b.name)):"torrent_screenshot"==this.customSettings.type&&$("#loader_screenshot").show()}
function fileQueueError(b,c,e){b="";c===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED&&(b="\u0412\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432.\n"+(0===e?"\u0412\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c "+
(1<e?"\u0434\u043e "+e+" \u0444\u0430\u0439\u043b\u043e\u0432.":"\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b.")));if(""!==b)alert(b);else switch(c){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("\u0424\u0430\u0439\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 1 \u041c\u0431");break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:break;
default:alert(e)}}function fileDialogComplete(b,c){0<c&&(!0==this.customSettings.resize?this.startResizedUpload(this.getFile(0).ID,this.customSettings.thumbnail_width,this.customSettings.thumbnail_height,SWFUpload.RESIZE_ENCODING.JPEG,this.customSettings.thumbnail_quality,!1):this.startUpload(this.getFile(0).ID))}
function uploadProgress(b,c){var e=Math.ceil(100*(c/b.size)),f=new FileProgress(b,this.customSettings.upload_target);f.setProgress(e);f.setStatus("Uploading...");f.toggleCancel(!0,this)}
function uploadSuccess(b,c){new FileProgress(b,this.customSettings.upload_target);"ERROR:"===c.substring(0,6)?alert(c):"OK:"===c.substring(0,3)&&"torrent_screenshot"==this.customSettings.type&&($("#thumbnails").show(),3<$("#thumbnails .inline_block").length&&$("#thumbnails .inline_block").eq(0).remove(),$("#thumbnails").append('<div class="inline_block"><a class="light_box" href="'+c.substring(3)+'.jpg"><img src="'+c.substring(3)+'_thumb.jpg" /></a><br /><a class="del_screenshot" href="javascript:void(0);">\u0443\u0434\u0430\u043b\u0438\u0442\u044c</a></div>'),
$("a.light_box").lightBox())}
function uploadComplete(){if(0<this.getStats().files_queued)this.startResizedUpload(this.getFile(0).ID,this.customSettings.thumbnail_width,this.customSettings.thumbnail_height,SWFUpload.RESIZE_ENCODING.JPEG,this.customSettings.thumbnail_quality,!1);else{var b=new Date;"avatar"==this.customSettings.type?($("#avatar_loader").hide(),$("#content .avatar_img").attr("src",this.customSettings.image_new_url+"?"+b.getTime()),!1==this.customSettings.foreigner_avatar&&$("#left_menu .avatar_img").attr("src",this.customSettings.thumb_new_url+
"?"+b.getTime()),$("#content .avatar_img").hasClass("default")&&$("#content .avatar_img").removeClass("default")):"torrent_file"==this.customSettings.type?$("#loader_torrent").hide():"torrent_poster"==this.customSettings.type?($("#loader_poster").hide(),url="torrents/cache/"+this.customSettings.user_id+"_poster",$(".poster img").attr("src",url+".jpg?"+b.getTime()),$(".poster a.poster_link").attr("href",url+".jpg?"+b.getTime()),$(".poster_link").addClass("light_box"),$("a.light_box").lightBox(),$(".poster").show(),
$("#del_poster").val("0")):"torrent_screenshot"==this.customSettings.type&&$("#loader_screenshot").hide()}}
function uploadError(b,c,e){var f;switch(c){case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:try{f=new FileProgress(b,this.customSettings.upload_target),f.setCancelled(),f.setStatus("Cancelled"),f.toggleCancel(!1)}catch(h){this.debug(h)}break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:try{f=new FileProgress(b,this.customSettings.upload_target),f.setCancelled(),f.setStatus("Stopped"),f.toggleCancel(!0)}catch(g){this.debug(g)}case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:break;default:alert(e)}}
function addImage(b){var c=document.createElement("img");c.style.margin="5px";c.style.verticalAlign="middle";var e=document.getElementById("thumbnails");e.insertBefore(c,e.firstChild);if(c.filters)try{c.filters.item("DXImageTransform.Microsoft.Alpha").opacity=0}catch(f){c.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}else c.style.opacity=0;c.onload=function(){fadeIn(c,0)};c.src=b}
function fadeIn(b,c){if(100>c)if(c+=5,100<c&&(c=100),b.filters)try{b.filters.item("DXImageTransform.Microsoft.Alpha").opacity=c}catch(e){b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+c+")"}else b.style.opacity=c/100;100>c&&setTimeout(function(){fadeIn(b,c)},30)}
function FileProgress(b,c){this.fileProgressID="divFileProgress";if(this.fileProgressWrapper=document.getElementById(this.fileProgressID))this.fileProgressElement=this.fileProgressWrapper.firstChild,this.fileProgressElement.childNodes[1].firstChild.nodeValue=b.name;else{this.fileProgressWrapper=document.createElement("div");this.fileProgressWrapper.className="progressWrapper";this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement("div");this.fileProgressElement.className=
"progressContainer";var e=document.createElement("a");e.className="progressCancel";e.href="#";e.style.visibility="hidden";e.appendChild(document.createTextNode(" "));var f=document.createElement("div");f.className="progressName";f.appendChild(document.createTextNode(b.name));var h=document.createElement("div");h.className="progressBarInProgress";var g=document.createElement("div");g.className="progressBarStatus";g.innerHTML="&nbsp;";this.fileProgressElement.appendChild(e);this.fileProgressElement.appendChild(f);
this.fileProgressElement.appendChild(g);this.fileProgressElement.appendChild(h);this.fileProgressWrapper.appendChild(this.fileProgressElement);""!=c&&void 0!=c&&null!=c&&document.getElementById(c).appendChild(this.fileProgressWrapper);fadeIn(this.fileProgressWrapper,0)}this.height=this.fileProgressWrapper.offsetHeight}
FileProgress.prototype.setProgress=function(b){this.fileProgressElement.className="progressContainer green";this.fileProgressElement.childNodes[3].className="progressBarInProgress";this.fileProgressElement.childNodes[3].style.width=b+"%"};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className="progressContainer blue";this.fileProgressElement.childNodes[3].className="progressBarComplete";this.fileProgressElement.childNodes[3].style.width=""};
FileProgress.prototype.setError=function(){this.fileProgressElement.className="progressContainer red";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width=""};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className="progressContainer";this.fileProgressElement.childNodes[3].className="progressBarError";this.fileProgressElement.childNodes[3].style.width=""};
FileProgress.prototype.setStatus=function(b){this.fileProgressElement.childNodes[2].innerHTML=b};FileProgress.prototype.toggleCancel=function(b,c){this.fileProgressElement.childNodes[0].style.visibility=b?"visible":"hidden";if(c){var e=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){c.cancelUpload(e);return!1}}};
(function(b){b.fn.extend({autocomplete:function(c,e){var f="string"==typeof c,e=b.extend({},b.Autocompleter.defaults,{url:f?c:null,data:f?null:c,delay:f?b.Autocompleter.defaults.delay:10,max:e&&!e.scroll?10:150},e);e.highlight=e.highlight||function(b){return b};e.formatMatch=e.formatMatch||e.formatItem;return this.each(function(){new b.Autocompleter(this,e)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});b.Autocompleter=function(c,e){var f,h;function g(){var f=C.selected();if(!f)return!1;var g=f.result;k=g;if(e.multiple){var h=l(n.val());if(1<h.length){var j=e.multipleSeparator.length,o=b(c).selection().start,m,u=0;b.each(h,function(b,c){u+=c.length;if(o<=u)return m=b,!1;u+=j});h[m]=g;g=h.join(e.multipleSeparator)}g+=e.multipleSeparator}g=unescapeHtml(g);n.val(g);q();n.trigger("result",
[f.data,f.value]);return!0}function j(b,c){if(v==f)C.hide();else{var g=n.val();if(c||g!=k)k=g,g=u(g),g.length>=e.minChars?(n.addClass(e.loadingClass),e.matchCase||(g=g.toLowerCase()),r(g,A,q)):(n.removeClass(e.loadingClass),C.hide())}}function l(c){return!c?[""]:!e.multiple?[b.trim(c)]:b.map(c.split(e.multipleSeparator),function(e){return b.trim(c).length?b.trim(e):null})}function u(f){if(!e.multiple)return f;var g=l(f);if(1==g.length)return g[0];g=b(c).selection().start;g=g==f.length?l(f):l(f.replace(f.substring(g),
""));return g[g.length-1]}function q(){C.visible();C.hide();clearTimeout(m);n.removeClass(e.loadingClass);e.mustMatch&&n.search(function(b){b||(e.multiple?(b=l(n.val()).slice(0,-1),n.val(b.join(e.multipleSeparator)+(b.length?e.multipleSeparator:""))):(n.val(""),n.trigger("result",null)))})}function A(f,g){if(g&&g.length&&o){n.removeClass(e.loadingClass);C.display(g,f);var j=g[0].value;e.autoFill&&u(n.val()).toLowerCase()==f.toLowerCase()&&v!=h&&(n.val(n.val()+j.substring(u(k).length)),b(c).selection(k.length,
k.length+j.length));C.show()}else q()}function r(f,g,h){e.matchCase||(f=f.toLowerCase());var j=t.load(f);if(j&&j.length)g(f,j);else if("string"==typeof e.url&&0<e.url.length){var k={timestamp:+new Date};b.each(e.extraParams,function(b,c){k[b]="function"==typeof c?c():c});b.ajax({mode:"abort",port:"autocomplete"+c.name,dataType:e.dataType,url:e.url,data:b.extend({q:u(f),limit:e.max},k),success:function(c){var h;if(!(h=e.parse&&e.parse(c))){h=[];for(var c=c.split("\n"),j=0;j<c.length;j++){var k=b.trim(c[j]);
k&&(k=k.split("|"),h[h.length]={data:k,value:k[0],result:e.formatResult&&e.formatResult(k,k[0])||k[0]})}}t.add(f,h);g(f,h)}})}else C.emptyList(),h(f)}f=46;h=8;var n=b(c).attr("autocomplete","off").addClass(e.inputClass),m,k="",t=b.Autocompleter.Cache(e),o=0,v,B={mouseDownOnSelect:!1},C=b.Autocompleter.Select(e,c,g,B),I;b.browser.opera&&b(c.form).bind("submit.autocomplete",function(){if(I)return I=!1});n.bind((b.browser.opera?"keypress":"keydown")+".autocomplete",function(c){o=1;v=c.keyCode;switch(c.keyCode){case 38:c.preventDefault();
C.visible()?C.prev():j(0,!0);break;case 40:c.preventDefault();C.visible()?C.next():j(0,!0);break;case 33:c.preventDefault();C.visible()?C.pageUp():j(0,!0);break;case 34:c.preventDefault();C.visible()?C.pageDown():j(0,!0);break;case e.multiple&&","==b.trim(e.multipleSeparator)&&188:case 9:case 13:if(g())return c.preventDefault(),I=!0,!1;break;case 27:C.hide();break;default:clearTimeout(m),m=setTimeout(j,e.delay)}}).focus(function(){o++}).blur(function(){o=0;B.mouseDownOnSelect||(clearTimeout(m),m=
setTimeout(q,200))}).click(function(){1<o++&&!C.visible()&&j(0,!0)}).bind("search",function(){function c(b,f){var g;if(f&&f.length)for(var h=0;h<f.length;h++)if(f[h].result.toLowerCase()==b.toLowerCase()){g=f[h];break}"function"==typeof e?e(g):n.trigger("result",g&&[g.data,g.value])}var e=1<arguments.length?arguments[1]:null;b.each(l(n.val()),function(b,e){r(e,c,c)})}).bind("flushCache",function(){t.flush()}).bind("setOptions",function(c,f){b.extend(e,f);"data"in f&&t.populate()}).bind("unautocomplete",
function(){C.unbind();n.unbind();b(c.form).unbind(".autocomplete")})};b.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(b){return b[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(b,e){return b.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+e.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,
"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180};b.Autocompleter.Cache=function(c){function e(b,e){c.matchCase||(b=b.toLowerCase());var f=b.indexOf(e);"word"==c.matchContains&&(f=b.toLowerCase().search("\\b"+e.toLowerCase()));return-1==f?!1:0==f||c.matchContains}function f(b,e){l>c.cacheLength&&g();j[b]||l++;j[b]=e}function h(){if(!c.data)return!1;var e={},g=0;if(!c.url)c.cacheLength=1;e[""]=[];for(var h=0,j=c.data.length;h<j;h++){var l=c.data[h],l="string"==
typeof l?[l]:l,m=c.formatMatch(l,h+1,c.data.length);if(!1!==m){var k=m.charAt(0).toLowerCase();e[k]||(e[k]=[]);l={value:m,data:l,result:c.formatResult&&c.formatResult(l)||m};e[k].push(l);g++<c.max&&e[""].push(l)}}b.each(e,function(b,e){c.cacheLength++;f(b,e)})}function g(){j={};l=0}var j={},l=0;setTimeout(h,25);return{flush:g,add:f,populate:h,load:function(f){if(!c.cacheLength||!l)return null;if(!c.url&&c.matchContains){var g=[],h;for(h in j)if(0<h.length){var r=j[h];b.each(r,function(b,c){e(c.value,
f)&&g.push(c)})}return g}if(j[f])return j[f];if(c.matchSubset)for(h=f.length-1;h>=c.minChars;h--)if(r=j[f.substr(0,h)])return g=[],b.each(r,function(b,c){e(c.value,f)&&(g[g.length]=c)}),g;return null}}};b.Autocompleter.Select=function(c,e,f,h){var g;function j(){m&&(k=b("<div/>").hide().addClass(c.resultsClass).css("position","absolute").appendTo(document.body),t=b("<ul/>").appendTo(k).mouseover(function(c){l(c).nodeName&&"LI"==l(c).nodeName.toUpperCase()&&(A=b("li",t).removeClass(g).index(l(c)),
b(l(c)).addClass(g))}).click(function(c){b(l(c)).addClass(g);f();e.focus();return!1}).mousedown(function(){h.mouseDownOnSelect=!0}).mouseup(function(){h.mouseDownOnSelect=!1}),0<c.width&&k.css("width",c.width),m=!1)}function l(b){for(b=b.target;b&&"LI"!=b.tagName;)b=b.parentNode;return!b?[]:b}function u(b){q.slice(A,A+1).removeClass(g);A+=b;0>A?A=q.size()-1:A>=q.size()&&(A=0);b=q.slice(A,A+1).addClass(g);if(c.scroll){var e=0;q.slice(0,A).each(function(){e+=this.offsetHeight});e+b[0].offsetHeight-
t.scrollTop()>t[0].clientHeight?t.scrollTop(e+b[0].offsetHeight-t.innerHeight()):e<t.scrollTop()&&t.scrollTop(e)}}g="ac_over";var q,A=-1,r,n="",m=!0,k,t;return{display:function(e,f){j();r=e;n=f;t.empty();for(var h=c.max&&c.max<r.length?c.max:r.length,k=0;k<h;k++)if(r[k]){var l=c.formatItem(r[k].data,k+1,h,r[k].value,n);!1!==l&&(l=b("<li/>").html(c.highlight(l,n)).addClass(0==k%2?"ac_even":"ac_odd").appendTo(t)[0],b.data(l,"ac_data",r[k]))}q=t.find("li");c.selectFirst&&(q.slice(0,1).addClass(g),A=
0);b.fn.bgiframe&&t.bgiframe()},next:function(){u(1)},prev:function(){u(-1)},pageUp:function(){0!=A&&0>A-8?u(-A):u(-8)},pageDown:function(){A!=q.size()-1&&A+8>q.size()?u(q.size()-1-A):u(8)},hide:function(){k&&k.hide();q&&q.removeClass(g);A=-1},visible:function(){return k&&k.is(":visible")},current:function(){return this.visible()&&(q.filter("."+g)[0]||c.selectFirst&&q[0])},show:function(){var f=b(e).offset();k.css({width:"string"==typeof c.width||0<c.width?c.width:b(e).width(),top:f.top+e.offsetHeight,
left:f.left}).show();if(c.scroll&&(t.scrollTop(0),t.css({maxHeight:c.scrollHeight,overflow:"auto"}),b.browser.msie&&"undefined"===typeof document.body.style.maxHeight)){var g=0;q.each(function(){g+=this.offsetHeight});f=g>c.scrollHeight;t.css("height",f?c.scrollHeight:g);f||q.width(t.width()-parseInt(q.css("padding-left"))-parseInt(q.css("padding-right")))}},selected:function(){var c=q&&q.filter("."+g).removeClass(g);return c&&c.length&&b.data(c[0],"ac_data")},emptyList:function(){t&&t.empty()},unbind:function(){k&&
k.remove()}}};b.fn.selection=function(b,e){if(void 0!==b)return this.each(function(){if(this.createTextRange){var f=this.createTextRange();void 0===e||b==e?f.move("character",b):(f.collapse(!0),f.moveStart("character",b),f.moveEnd("character",e));f.select()}else if(this.setSelectionRange)this.setSelectionRange(b,e);else if(this.selectionStart)this.selectionStart=b,this.selectionEnd=e});var f=this[0];if(f.createTextRange){var h=document.selection.createRange(),g=f.value,j=h.text.length;h.text="<->";
h=f.value.indexOf("<->");f.value=g;this.selection(h,h+j);return{start:h,end:h+j}}if(void 0!==f.selectionStart)return{start:f.selectionStart,end:f.selectionEnd}}})(jQuery);
$(function(b){shoutbox=function(c){function e(c){if("empty"==c.status)return b("#shoutbox").html("<i>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0435\u0442...</i>"),!1;"reloadMsgList"==c.status&&b("#shoutbox").html("");for(var e=0;e<c.msg_list.length;e++)if(g=c.msg_list[e].msg_id,"delMsg"==c.msg_list[e].event)b("#msg_"+c.msg_list[e].id).length&&b("#msg_"+c.msg_list[e].id).remove();else if("reloadMsgList"==c.msg_list[e].event)b("#shoutbox").html("");else if("clear"==c.msg_list[e].event)b("#shoutbox").prepend('<div id="msg_'+
c.msg_list[e].msg_id+'" class="msg_wrap"><b>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435</b>: \u041e\u043a\u043d\u043e \u0447\u0430\u0442\u0430 \u0431\u044b\u043b\u043e \u043e\u0447\u0438\u0449\u0435\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c '+c.msg_list[e].username+"</div>");else if(!b("#msg_"+c.msg_list[e].msg_id).length)""!=c.msg_list[e]["private"]&&(c.msg_list[e].msg=c.msg_list[e].msg.replace(/privat\(([a-zA-Z0-9\u0430-\u044f\u0410-\u042f\u0451\u0401_]+)\)/g,
'<i class="privat">\u041f\u0440\u0438\u0432\u0430\u0442: $1</i>')),-1!=c.msg_list[e].msg.indexOf(h.username)&&(c.msg_list[e].msg=c.msg_list[e].msg.replace(RegExp(h.username,"g"),'<b class="me">'+h.username+"</b>")),b("#shoutbox").prepend('<div id="msg_'+c.msg_list[e].msg_id+'" class="msg_wrap'+(c.msg_list[e]["private"]==h.username?" privat_wrap":"")+'">'+(h.admin?'<a class="delMsg" href="#">X</a> ':"")+'<a class="privatMsg" href="#">P</a> '+c.msg_list[e].u_link+": "+c.msg_list[e].msg+"</div>");"undefined"!=
typeof localStorage&&(localStorage.chat_html=b("#shoutbox").html());return!1}function f(){"undefined"!=typeof localStorage&&!b("#shoutbox .msg_wrap").length&&(b("#shoutbox").html(localStorage.chat_html),b("#shoutbox .msg_wrap").length&&(g=b("#shoutbox .msg_wrap").attr("id").substr(4)));(-1==g||!j)&&b.post("/shoutbox.php",{act:"get_msg_list",last_id:g},function(c){result=b.parseJSON(c);e(result)});j=!1;setTimeout(f,15E3);return!1}b(document).ready(function(){b("#smileWin").click(function(){windop=
window.open("/moresmiles.php?form=shoutform&text=shout","mywin","height=500,width=450,resizable=no,scrollbars=yes");return!1});b("#sendShout").click(function(){"yes"==h.warned?alert("\u0423 \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0447\u0430\u0442\u0435."):(b("#shoutform .loader").show(),Shout=b("#shoutform .input_shout").val(),
""==Shout.replace(/ /g,"")?b("#shoutform .loader").hide():(b("#shoutform .input_shout").val(""),b.post("/shoutbox.php",{act:"shout",msg:escape(Shout),last_id:g},function(c){b("#shoutform .loader").hide();result=b.parseJSON(c);e(result)})));return!1});b("#shoutbox .delMsg").live("click",function(){var c=b(this).parent().attr("id").substr(4);b("#shoutform .loader").show();b.post("/shoutbox.php",{act:"delete",id:c},function(f){result=b.parseJSON(f);"success"==result.status?b("#msg_"+c).remove():"reloadMsgList"==
result.status&&e(result);b("#shoutform .loader").hide()});return!1});b("#shoutbox .u_name").live("click",function(){b("#shoutform .input_shout").val(b(this).text()+", "+b("#shoutform .input_shout").val());b("#shoutform .input_shout").focus();return!1});b("#shoutbox .privatMsg").live("click",function(){var c=b(this).parent().children(".u_name").text();b("#shoutform .input_shout").val("privat("+c+"): "+b("#shoutform .input_shout").val());b("#shoutform .input_shout").focus();return!1});b("#clearChat").click(function(){if(!confirm("\u041e\u0442\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0447\u0430\u0442?"))return!1;
b("#shoutform .loader").show();b.post("/shoutbox.php",{act:"clear"},function(){b("#shoutbox").html("<i>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0435\u0442...</i>");b("#shoutform .loader").hide()});return!1})});var h=b.extend({username:"",admin:!1,warned:"no"},c),g=-1,j=!0;f()}});
(function(b){b.fn.validationEngine=function(c){b.validationEngineLanguage?allRules=b.validationEngineLanguage.allRules:b.validationEngine.debug("Validation engine rules are not loaded check your external file");c=jQuery.extend({allrules:allRules,validationEventTriggers:"focusout",inlineValidation:!0,returnIsValid:!1,liveEvent:!1,unbindEngine:!0,ajaxSubmit:!1,scroll:!0,promptPosition:"topRight",success:!1,beforeSuccess:function(){},failure:function(){}},c);b.validationEngine.settings=c;b.validationEngine.ajaxValidArray=
[];if(!0==c.inlineValidation){c.returnIsValid||(allowReturnIsvalid=!1,c.liveEvent?(b(this).find("[class*=validate][type!=checkbox]").live(c.validationEventTriggers,function(){e(this)}),b(this).find("[class*=validate][type=checkbox]").live("click",function(){e(this)})):(b(this).find("[class*=validate]").not("[type=checkbox]").bind(c.validationEventTriggers,function(){e(this)}),b(this).find("[class*=validate][type=checkbox]").bind("click",function(){e(this)})),firstvalid=!1);var e=function(e){b.validationEngine.settings=
c;!1==b.validationEngine.intercept||!b.validationEngine.intercept?(b.validationEngine.onSubmitValid=!1,b.validationEngine.loadValidation(e)):b.validationEngine.intercept=!1}}if(c.returnIsValid)return b.validationEngine.submitValidation(this,c)?!1:!0;b(this).bind("submit",function(){b.validationEngine.onSubmitValid=!0;b.validationEngine.settings=c;if(!1==b.validationEngine.submitValidation(this,c)){if(!0==b.validationEngine.submitForm(this,c))return!1}else return c.failure&&c.failure(),!1})};b.validationEngine=
{defaultSetting:function(){b.validationEngineLanguage?allRules=b.validationEngineLanguage.allRules:b.validationEngine.debug("Validation engine rules are not loaded check your external file");settings={allrules:allRules,validationEventTriggers:"blur",inlineValidation:!0,returnIsValid:!1,scroll:!0,unbindEngine:!0,ajaxSubmit:!1,promptPosition:"topRight",success:!1,failure:function(){}};b.validationEngine.settings=settings},loadValidation:function(c){b.validationEngine.settings||b.validationEngine.defaultSetting();
rulesParsing=b(c).attr("class");rulesRegExp=/\[(.*)\]/;getRules=rulesRegExp.exec(rulesParsing);str=getRules[1];pattern=/\[|,|\]/;result=str.split(pattern);return b.validationEngine.validateCall(c,result)},validateCall:function(c,e){function f(c,e){callerType=b(c).attr("type");if(("text"==callerType||"password"==callerType||"textarea"==callerType||"file"==callerType)&&!b(c).val())b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules[e[i]].alertText+"<br />";if("radio"==callerType||
"checkbox"==callerType)if(n=b(c).attr("name"),0==b("input[name='"+n+"']:checked").size())b.validationEngine.isError=!0,r=1==b("input[name='"+n+"']").size()?r+(b.validationEngine.settings.allrules[e[i]].alertTextCheckboxe+"<br />"):r+(b.validationEngine.settings.allrules[e[i]].alertTextCheckboxMultiple+"<br />");if("select-one"==callerType&&!b(c).val())b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules[e[i]].alertText+"<br />";if("select-multiple"==callerType&&!b(c).find("option:selected").val())b.validationEngine.isError=
!0,r+=b.validationEngine.settings.allrules[e[i]].alertText+"<br />"}function h(c,e,f){customRule=e[f+1];pattern=b.validationEngine.settings.allrules[customRule].regex;if(!pattern.test(b(c).attr("value")))b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules[customRule].alertText+"<br />"}function g(c,e,f){customString=e[f+1];if(customString==b(c).attr("value"))b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules.required.alertText+"<br />"}function j(c,e,f){customAjaxRule=
e[f+1];postfile=b.validationEngine.settings.allrules[customAjaxRule].file;fieldValue=b(c).val();ajaxCaller=c;fieldId=b(c).attr("id");ajaxValidate=!0;ajaxisError=b.validationEngine.isError;extraData=b.validationEngine.settings.allrules[customAjaxRule].extraData?"":b.validationEngine.settings.allrules[customAjaxRule].extraData;ajaxisError||b.ajax({type:"POST",url:postfile,async:!0,data:"validateValue="+fieldValue+"&validateId="+fieldId+"&validateError="+customAjaxRule+extraData,beforeSend:function(){if(b.validationEngine.settings.allrules[customAjaxRule].alertTextLoad)if(b("div."+
fieldId+"formError")[0])b.validationEngine.updatePromptText(ajaxCaller,b.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load");else return b.validationEngine.buildPrompt(ajaxCaller,b.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load")},error:function(c,e){b.validationEngine.debug("error in the ajax: "+c.status+" "+e)},success:function(c){function e(c){for(x=0;x<ajaxErrorLength;x++)b.validationEngine.ajaxValidArray[x][0]==fieldId&&(b.validationEngine.ajaxValidArray[x][1]=
c,existInarray=!0)}c=eval("("+c+")");ajaxisError=c.jsonValidateReturn[2];customAjaxRule=c.jsonValidateReturn[1];fieldId=ajaxCaller=b("#"+c.jsonValidateReturn[0])[0];ajaxErrorLength=b.validationEngine.ajaxValidArray.length;existInarray=!1;"false"==ajaxisError?(e(!1),existInarray||(b.validationEngine.ajaxValidArray[ajaxErrorLength]=Array(2),b.validationEngine.ajaxValidArray[ajaxErrorLength][0]=fieldId,existInarray=b.validationEngine.ajaxValidArray[ajaxErrorLength][1]=!1),b.validationEngine.ajaxValid=
!1,r+=b.validationEngine.settings.allrules[customAjaxRule].alertText+"<br />",b.validationEngine.updatePromptText(ajaxCaller,r,"",!0)):(e(!0),b.validationEngine.ajaxValid=!0,b.validationEngine.settings.allrules[customAjaxRule].alertTextOk?b.validationEngine.updatePromptText(ajaxCaller,b.validationEngine.settings.allrules[customAjaxRule].alertTextOk,"pass",!0):(ajaxValidate=!1,b.validationEngine.closePrompt(ajaxCaller)))}})}function l(c,e,f){confirmField=e[f+1];if(b(c).attr("value")!=b("#"+confirmField).attr("value"))b.validationEngine.isError=
!0,r+=b.validationEngine.settings.allrules.confirm.alertText+"<br />"}function u(c,e,f){startLength=eval(e[f+1]);endLength=eval(e[f+2]);feildLength=b(c).attr("value").length;if((feildLength<startLength||feildLength>endLength)&&0<feildLength)b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules.length.alertText+startLength+b.validationEngine.settings.allrules.length.alertText2+endLength+b.validationEngine.settings.allrules.length.alertText3+"<br />"}function q(c,e,f){nbCheck=eval(e[f+
1]);groupname=b(c).attr("name");groupSize=b("input[name='"+groupname+"']:checked").size();if(groupSize>nbCheck)b.validationEngine.showTriangle=!1,b.validationEngine.isError=!0,r+=b.validationEngine.settings.allrules.maxCheckbox.alertText+"<br />"}function A(c,e,f){nbCheck=eval(e[f+1]);groupname=b(c).attr("name");groupSize=b("input[name='"+groupname+"']:checked").size();if(groupSize<nbCheck)b.validationEngine.isError=!0,b.validationEngine.showTriangle=!1,r+=b.validationEngine.settings.allrules.minCheckbox.alertText+
" "+nbCheck+" "+b.validationEngine.settings.allrules.minCheckbox.alertText2+"<br />"}var r="";b(c).attr("id")||b.validationEngine.debug("This field have no ID attribut( name & class displayed): "+b(c).attr("name")+" "+b(c).attr("class"));ajaxValidate=!1;var n=b(c).attr("name");b.validationEngine.isError=!1;b.validationEngine.showTriangle=!0;callerType=b(c).attr("type");for(i=0;i<e.length;i++)switch(e[i]){case "optional":if(!b(c).val())return b.validationEngine.closePrompt(c),b.validationEngine.isError;
break;case "required":f(c,e);break;case "custom":h(c,e,i);break;case "exemptString":g(c,e,i);break;case "ajax":b.validationEngine.onSubmitValid||j(c,e,i);break;case "length":u(c,e,i);break;case "maxCheckbox":q(c,e,i);groupname=b(c).attr("name");c=b("input[name='"+groupname+"']");break;case "minCheckbox":A(c,e,i);groupname=b(c).attr("name");c=b("input[name='"+groupname+"']");break;case "confirm":l(c,e,i)}if(1<b("input[name='"+n+"']").size()&&("radio"==callerType||"checkbox"==callerType))c=b("input[name='"+
n+"'][type!=hidden]:first"),b.validationEngine.showTriangle=!1;!0==b.validationEngine.isError?(linkTofield=b.validationEngine.linkTofield(c),0==b("div."+linkTofield).size()?b.validationEngine.buildPrompt(c,r,"error"):b.validationEngine.updatePromptText(c,r)):b.validationEngine.closePrompt(c);return b.validationEngine.isError?b.validationEngine.isError:!1},submitForm:function(c){if(b.validationEngine.settings.ajaxSubmit)return extraData=b.validationEngine.settings.ajaxSubmitExtraData?b.validationEngine.settings.ajaxSubmitExtraData:
"",b.ajax({type:"POST",url:b.validationEngine.settings.ajaxSubmitFile,async:!0,data:b(c).serialize()+"&"+extraData,error:function(c,f){b.validationEngine.debug("error in the ajax: "+c.status+" "+f)},success:function(e){if("true"==e)b(c).css("opacity",1),b(c).animate({opacity:0,height:0},function(){b(c).css("display","none");b(c).before("<div class='ajaxSubmit'>"+b.validationEngine.settings.ajaxSubmitMessage+"</div>");b.validationEngine.closePrompt(".formError",!0);b(".ajaxSubmit").show("slow");if(b.validationEngine.settings.success)return b.validationEngine.settings.success&&
b.validationEngine.settings.success(),!1});else{e=eval("("+e+")");e.jsonValidateReturn||b.validationEngine.debug("you are not going into the success fonction and jsonValidateReturn return nothing");errorNumber=e.jsonValidateReturn.length;for(index=0;index<errorNumber;index++)fieldId=e.jsonValidateReturn[index][0],promptError=e.jsonValidateReturn[index][1],type=e.jsonValidateReturn[index][2],b.validationEngine.buildPrompt(fieldId,promptError,type)}}}),!0;if(b.validationEngine.settings.beforeSuccess())return!0;
return b.validationEngine.settings.success?(b.validationEngine.settings.unbindEngine&&b(c).unbind("submit"),b.validationEngine.settings.success&&b.validationEngine.settings.success(),!0):!1},buildPrompt:function(c,e,f,h){b.validationEngine.settings||b.validationEngine.defaultSetting();deleteItself="."+b(c).attr("id")+"formError";b(deleteItself)[0]&&(b(deleteItself).stop(),b(deleteItself).remove());var g=document.createElement("div"),j=document.createElement("div");linkTofield=b.validationEngine.linkTofield(c);
b(g).addClass("formError");"pass"==f&&b(g).addClass("greenPopup");"load"==f&&b(g).addClass("blackPopup");h&&b(g).addClass("ajaxed");b(g).addClass(linkTofield);b(j).addClass("formErrorContent");b("body").append(g);b(g).append(j);if(!1!=b.validationEngine.showTriangle){f=document.createElement("div");b(f).addClass("formErrorArrow");b(g).append(f);if("bottomLeft"==b.validationEngine.settings.promptPosition||"bottomRight"==b.validationEngine.settings.promptPosition)b(f).addClass("formErrorArrowBottom"),
b(f).html('<div class="line1"><\!-- --\></div><div class="line2"><\!-- --\></div><div class="line3"><\!-- --\></div><div class="line4"><\!-- --\></div><div class="line5"><\!-- --\></div><div class="line6"><\!-- --\></div><div class="line7"><\!-- --\></div><div class="line8"><\!-- --\></div><div class="line9"><\!-- --\></div><div class="line10"><\!-- --\></div>');if("topLeft"==b.validationEngine.settings.promptPosition||"topRight"==b.validationEngine.settings.promptPosition)b(g).append(f),b(f).html('<div class="line10"><\!-- --\></div><div class="line9"><\!-- --\></div><div class="line8"><\!-- --\></div><div class="line7"><\!-- --\></div><div class="line6"><\!-- --\></div><div class="line5"><\!-- --\></div><div class="line4"><\!-- --\></div><div class="line3"><\!-- --\></div><div class="line2"><\!-- --\></div><div class="line1"><\!-- --\></div>')}b(j).html(e);
callerTopPosition=b(c).offset().top;callerleftPosition=b(c).offset().left;callerWidth=b(c).width();inputHeight=b(g).height();"topRight"==b.validationEngine.settings.promptPosition&&(callerleftPosition+=callerWidth-30,callerTopPosition+=-inputHeight-10);"topLeft"==b.validationEngine.settings.promptPosition&&(callerTopPosition+=-inputHeight-10);"centerRight"==b.validationEngine.settings.promptPosition&&(callerleftPosition+=callerWidth+13);"bottomLeft"==b.validationEngine.settings.promptPosition&&(callerHeight=
b(c).height(),callerTopPosition=callerTopPosition+callerHeight+15);"bottomRight"==b.validationEngine.settings.promptPosition&&(callerHeight=b(c).height(),callerleftPosition+=callerWidth-30,callerTopPosition+=callerHeight+15);b(g).css({top:callerTopPosition,left:callerleftPosition,opacity:0});return b(g).animate({opacity:0.87},function(){return!0})},updatePromptText:function(c,e,f,h){linkTofield=b.validationEngine.linkTofield(c);var g="."+linkTofield;"pass"==f?b(g).addClass("greenPopup"):b(g).removeClass("greenPopup");
"load"==f?b(g).addClass("blackPopup"):b(g).removeClass("blackPopup");h?b(g).addClass("ajaxed"):b(g).removeClass("ajaxed");b(g).find(".formErrorContent").html(e);callerTopPosition=b(c).offset().top;inputHeight=b(g).height();if("bottomLeft"==b.validationEngine.settings.promptPosition||"bottomRight"==b.validationEngine.settings.promptPosition)callerHeight=b(c).height(),callerTopPosition=callerTopPosition+callerHeight+15;"centerRight"==b.validationEngine.settings.promptPosition&&(callerleftPosition+=
callerWidth+13);if("topLeft"==b.validationEngine.settings.promptPosition||"topRight"==b.validationEngine.settings.promptPosition)callerTopPosition=callerTopPosition-inputHeight-10;b(g).animate({top:callerTopPosition})},linkTofield:function(c){linkTofield=b(c).attr("id")+"formError";linkTofield=linkTofield.replace(/\[/g,"");return linkTofield=linkTofield.replace(/\]/g,"")},closePrompt:function(c,e){b.validationEngine.settings||b.validationEngine.defaultSetting();if(e)return b(c).fadeTo("fast",0,function(){b(c).remove()}),
!1;"undefined"==typeof ajaxValidate&&(ajaxValidate=!1);ajaxValidate||(linkTofield=b.validationEngine.linkTofield(c),closingPrompt="."+linkTofield,b(closingPrompt).fadeTo("fast",0,function(){b(closingPrompt).remove()}))},debug:function(c){b("#debugMode")[0]||b("body").append("<div id='debugMode'><div class='debugError'><strong>This is a debug mode, you got a problem with your form, it will try to help you, refresh when you think you nailed down the problem</strong></div></div>");b(".debugError").append("<div class='debugerror'>"+
c+"</div>")},submitValidation:function(c){var e=!1;b.validationEngine.ajaxValid=!0;b(c).find(".formError").remove();b(c).find("[class*=validate]").size();b(c).find("[class*=validate]").each(function(){linkTofield=b.validationEngine.linkTofield(this);if(!b("."+linkTofield).hasClass("ajaxed"))return b.validationEngine.loadValidation(this)?e=!0:""});ajaxErrorLength=b.validationEngine.ajaxValidArray.length;for(x=0;x<ajaxErrorLength;x++)if(!1==b.validationEngine.ajaxValidArray[x][1])b.validationEngine.ajaxValid=
!1;if(e||!b.validationEngine.ajaxValid){if(b.validationEngine.settings.scroll)destination=b(".formError:not('.greenPopup'):first").offset().top,b(".formError:not('.greenPopup')").each(function(){testDestination=b(this).offset().top;if(destination>testDestination)destination=b(this).offset().top}),b("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1100);return!0}return!1}}})(jQuery);
function show_hide_no_img(b){b=document.getElementById(b);"none"==$(b).css("display")?$(b).slideDown("normal"):$(b).slideUp("normal")}function show_hide(b){var c=document.getElementById("s"+b),b=document.getElementById("pic"+b);"none"==$(c).css("display")?($(c).slideDown("normal"),$(b).attr("class","icon_minus"),b.title="\u0421\u043a\u0440\u044b\u0442\u044c"):($(c).slideUp("normal"),$(b).attr("class","icon_plus"),b.title="\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c")}prev_cat_id=0;
function show_tags(b){prev_cat_id!=b?(prev_cat_id=b,"none"!=$("#cat_tags").css("display")&&$("#cat_tags").slideUp("fast"),$.post("/ajax.php",{func:"show_tags",cat_id:b},function(b){$("#cat_tags").html(b);$("#cat_tags").slideDown("fast")})):"none"==$("#cat_tags").css("display")?$("#cat_tags").slideDown("fast"):$("#cat_tags").slideUp("fast")}function browse_switch(b){$.cookie("browse_type",b,{expires:30});window.location.reload()}function formSubmit(b){$("#"+b).submit()}
function voteMoimir(){var b="http://connect.mail.ru/share?url="+encodeURIComponent(texts.url)+"&title="+encodeURIComponent(texts.title)+"&description="+encodeURIComponent(texts.descr)+"&imageurl="+encodeURIComponent(texts.image);window.open(b,"","toolbar=0,status=0,width=626,height=436");$.modal.close();return!1}
function voteFacebook(){var b="http://www.facebook.com/sharer.php?s=100&p[title]="+encodeURIComponent(texts.title)+"&p[summary]="+encodeURIComponent(texts.descr)+"&p[url]="+encodeURIComponent(texts.url)+"&p[images][0]="+encodeURIComponent(texts.image);window.open(b,"","toolbar=0,status=0,width=626,height=436");$.modal.close();return!1}
function voteVkontakte(){var b="http://vkontakte.ru/share.php?title="+encodeURIComponent(texts.title)+"&description="+encodeURIComponent(texts.descr)+"&url="+encodeURIComponent(texts.url)+"&image="+encodeURIComponent(texts.image);window.open(b,"","toolbar=0,status=0,width=626,height=436");$.modal.close();return!1}
function voteTwitter(){var b="http://twitter.com/share?text="+encodeURIComponent(texts.title)+"&url="+encodeURIComponent(texts.url);window.open(b,"","toolbar=0,status=0,width=626,height=436");$.modal.close();return!1}
function vote(b,c,e){$.post("/reputation.php",{action:"add",targetid:b,type:c,vote:e},function(e){result=$.parseJSON(e);if("error"==result.status)alert(result.msg);else if("comment"==c){$("#comment"+b+" .reputation .btn").hide();var e=$("#comment"+b+" .reputation .value"),h=parseInt($(e).html())+parseInt(result.value);0<h?(h="+"+h,$(e).hasClass("up")||$(e).addClass("up").removeClass("down")):0>h?(h="-"+h,$(e).hasClass("down")||$(e).addClass("down").removeClass("up")):0==h&&$(e).attr("class","");$("#comment"+
b+" .reputation .value").html(h)}})}function support_localStorage(){try{return"localStorage"in window&&null!==window.localStorage}catch(b){return!1}}function unescapeHtml(b){var c=document.createElement("div");c.innerHTML=b;b=c.childNodes[0].nodeValue;c.removeChild(c.firstChild);return b};
