(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;c={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};this.element[u]=this.id;c[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||a)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(a&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete c[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=this.element[w])!=null?o:[];i.push(this.id);this.element[w]=i}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=t[w];if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=c[i[0][u]];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke.call(this,"disable")},enable:function(){return d._invoke.call(this,"enable")},destroy:function(){return d._invoke.call(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=c[n(t)[0][u]];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);;var uagent=navigator.userAgent.toLowerCase(),is_ie=0<=uagent.indexOf("msie")?!0:!1,is_ie9=0<=uagent.indexOf("msie 9.0")?!0:!1,ie_range_cache="",list_open_tag="",list_close_tag="",listitems="",bbtags=[],rus_lr2="\u0415\u0435\u041e\u043e\u0401\u0401\u0401\u0401\u0416\u0416\u0427\u0427\u0428\u0428\u0429\u0429\u042a\u042c\u042d\u042d\u042e\u042e\u042f\u042f\u042f\u042f\u0451\u0451\u0436\u0447\u0448\u0449\u044d\u044e\u044f\u044f".split(""),lat_lr2=("/E-/e-/O-/o-\u042bO-\u042bo-\u0419O-\u0419o-\u0417H-\u0417h-\u0426H-\u0426h-\u0421H-\u0421h-\u0428H-\u0428h-\u044a"+ String.fromCharCode(35)+"-\u044c"+String.fromCharCode(39)+"-\u0419E-\u0419e-\u0419U-\u0419u-\u0419A-\u0419a-\u042bA-\u042ba-\u044bo-\u0439o-\u0437h-\u0446h-\u0441h-\u0448h-\u0439e-\u0439u-\u0439a-\u044ba").split("-"),rus_lr1="\u0410\u0411\u0412\u0413\u0414\u0415\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0425\u0426\u0429\u042b\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0445\u0446\u0449\u044a\u044b\u044c\u044c\u044f".split(""),lat_lr1=("A-B-V-G-D-E-Z-I-J-K-L-M-N-O-P-R-S-T-U-F-H-X-C-W-Y-Q-a-b-v-g-d-e-z-i-j-k-l-m-n-o-p-r-s-t-u-f-h-x-c-w-"+String.fromCharCode(35)+"-y-"+String.fromCharCode(39)+"-"+String.fromCharCode(96)+"-q").split("-");function setFieldName(a){a!=selField&&(selField=a)}function emoticon(a){doInsert(" "+a+" ","",!1)}function pagebreak(){doInsert("{PAGEBREAK}","",!1)}function simpletag(a){doInsert("["+a+"]","[/"+a+"]",!0)} function DLEimagePrompt(a,d){var c={},b="",e="";-1!=a.indexOf("http://")||-1!=a.indexOf("https://")?(b=a,e=""):(b="http://",e=a);c[dle_act_lang[3]]=function(){$(this).dialog("close")};c[dle_act_lang[2]]=function(){if(1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var a=$("#dle-promt-text").val(),b=$("#dle-image-alt").val(),c=$("#dleimagealign").val();$(this).dialog("close");$("#dlepopup").remove();d&&d(a,b,c)}};$("#dlepopup").remove();$("body").append("");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,buttons:c})} function DLEurlPrompt(a,d){var c={},b="",e="",b=-1!=a.indexOf("http://")||-1!=a.indexOf("https://")||-1!=a.indexOf("ftp://")?a:"http://",e=a;c[dle_act_lang[3]]=function(){$(this).dialog("close")};c[dle_act_lang[2]]=function(){if(1>$("#dle-promt-url").val().length)$("#dle-promt-url").addClass("ui-state-error");else if(1>$("#dle-promt-title").val().length)$("#dle-promt-title").addClass("ui-state-error");else{var a=$("#dle-promt-url").val(),b=$("#dle-promt-title").val(),c=$("#dle-promt-tooltip").val();$(this).dialog("close");$("#dlepopup").remove();d&&d(a,b,c)}};$("#dlepopup").remove();$("body").append("");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,buttons:c})}function tag_url(){var a=get_sel(eval("fombj."+selField));a||(a="My Webpage");DLEurlPrompt(a,function(a,c,b){0');$("#cp").dialog({autoOpen:!0,dialogClass:"modalfixed",resizable:!1,width:200});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#cp").dialog("option","position",["0","0"])}function setColor(a){doInsert("[color="+a+"]","[/color]",!0);$("#cp").dialog("close")} function ins_emo(a){document.getElementById(selField).focus();is_ie&&(ie_range_cache=document.selection.createRange());$("#dle_emo").remove();$("body").append("");a="300";var d="auto";450<=$("#dle_emos").width()&&($("#dle_emos").width(450),a="505");300<=$("#dle_emos").height()&&($("#dle_emos").height(300),d="340");$("#dle_emo").dialog({autoOpen:!0,dialogClass:"modalfixed",width:a,resizable:!1,height:d});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dle_emo").dialog("option","position",["0","0"])}function dle_smiley(a){doInsert(" "+a+" ","",!1);$("#dle_emo").dialog("close");ie_range_cache=null}function pagelink(){var a=get_sel(eval("fombj."+selField));a||(a=text_pages);DLEprompt(text_enter_page,"1",dle_prompt,function(d){DLEprompt(text_enter_page_name,a,dle_prompt,function(a){doInsert("[page="+d+"]"+a+"[/page]","",!1);ie_range_cache=null})})} function translit(){var a=eval("fombj."+selField);if(is_ie)if(a.isTextEdit){a.focus();var d=document.selection,c=d.createRange();c.colapse;"Text"!=d.type&&"None"!=d.type||null==c||(c.text=dotranslate(c.text))}else a.value=dotranslate(a.value);else a.value=dotranslate(a.value);a.focus()} function dotranslate(a){var d="",c=0,c="",b=1;for(kk=0;kk"==c)b=1;c=b?transsymbtocyr(d.substr(d.length-1,1),c):d.substr(d.length-1,1)+c;d=d.substr(0,d.length-1)+c}return d}function transsymbtocyr(a,d){var c=a+d,b=d.charCodeAt(0);if(!(65<=b&&123>=b||35==b||39==b))return c;for(b=0;b