text: (function(e,t){"use strict";e.extend(t,{imAccess:{showLogout:function(){var n=e(".imLogout");n.length!==0&&(n.empty(),t.utils.isOnline()?e.imCookie("im_access_cookie_uid")!==null&&e.imCookie("im_access_cookie_uid")!==""&&n.append('<a class="imLogoutLink" href="'+t.settings.currentPath+'res/imlogout.php">'+t.l10n.get("private_area_logout")+"<\/a>"):n.append('<a class="imLogoutLink" href="#">'+t.l10n.get("private_area_logout")+"<\/a>"))}}})})(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imAdv:{showAdv:function(t){var n=new Date,r=new Date(n.getTime()+n.getTimezoneOffset()*6e4),i=e.extend(!0,{start:new Date(r.getTime()-1),end:new Date(r.getTime()+1),delay:0,callback:null},t);return r>t.start&&r<t.end&&e.isFunction(t.callback)?setTimeout(t.callback,t.delay):-1},showCorner:function(n){var r=e.extend(!0,{position:"right-top",attentionSeeker:{media:null,effect:"",interval:1e3},sound:null,message:{media:null,effect:""},margin:20},t.settings.imAdv,n),i=null,u=null,a=t.responsive,f=r.attentionSeeker.media.load,l=e("body"),c=e(window);i=new t.mediaObject(e.extend(r.attentionSeeker.media,{load:function(n){var s=e('<div id="adv-attention-seeker" style="overflow: hidden; cursor: pointer;"/>'),o=!1,h;switch(r.position){case"right-top":s.css({position:"absolute",top:r.margin,right:r.margin});break;case"right-bottom":s.css({position:"absolute",bottom:r.margin,right:r.margin});break;case"left-top":s.css({position:"absolute",top:r.margin,left:r.margin});break;case"left-bottom":s.css({position:"absolute",bottom:r.margin,left:r.margin})}l.append(s);s.width(n.Width()).height(n.Height());n.AppendTo(s,function(){s.add(n.DOMObject()).css("zIndex",t.settings.zIndex.popup);n.DOMObject().height(n.Height()).width(n.Width());s.addClass(r.attentionSeeker.effect);s.on("mouseenter",function(){o||(u=setTimeout(function(){o=!0;s.fadeOut();t.imShowBox({media:[r.message.media],effect:"custom",customEffect:r.message.effect,sound:r.sound,fullScreenEnabled:!1,zoomEnabled:!1,showThumbs:!1,onClose:function(){s.fadeIn(250,function(){o=!1})}})},250))}).on("mouseleave",function(){clearTimeout(u)});e.isFunction(f)&&f(n)});h=function(){var e=a.getCurrentBreakPoint();!a.isDesktopMode()&&!!e&&e.start<i.Width()?s.hide(0):s.show(0)};h();c.on("resize",h)}}))}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imAdvertising:{cookieId:"",clUnroll:"",clClose:"",delay:0,timerClose:null,showPopup:function(n){var r,i,u,a,f;n=e.extend({id:"imAdvertisingPopup",offlineTimeStamp:0,delay:5e3,position:"right",priority:0,text:"",acceptButton:!1,textButton:"",actionButton:"",effect:"bounce",margin:10,backgroundColor:"#37474f",textColor:"#fff"},n);t.imAdvertising.clUnroll="unroll-"+n.position;t.imAdvertising.clClose="close-"+n.position;t.imAdvertising.delay=n.delay;t.imAdvertising.cookieId="imAdvertising_pop_up_yes"+(t.utils.isOnline()?"":"_"+n.offlineTimeStamp);t.imAdvertising.createContainer(n);r=e("#"+n.id+"");i=e("#"+n.id+" #"+n.id+"-child");r.addClass(t.imAdvertising.clClose);r.css({zIndex:t.settings.zIndex.advertising+n.priority,transition:n.position+" .3s cubic-bezier(.4,0,.2,1)"});var s=Math.min(i.outerWidth()+n.margin*2,e(window).width()),o=60,s=Math.min(i.outerWidth()+n.margin*2,e(window).width()-o);r.css("width",o);i.css({width:s,color:n.textColor,background:n.backgroundColor});u=document.createElement("style");u.innerHTML="#"+n.id+"."+t.imAdvertising.clUnroll+" { "+n.position+": "+(s-o)+"px; }";document.getElementsByTagName("head")[0].appendChild(u);a=function(t){t?setTimeout(function(){t?e("#"+n.id+" #"+n.id+"-child .contText span").addClass("hid"):e("#"+n.id+" #"+n.id+"-child .contText span").removeClass("hid")},100):e("#"+n.id+" #"+n.id+"-child .contText span").removeClass("hid")};f=function(){r.removeClass(t.imAdvertising.clUnroll).addClass(n.effect);a(!0)};r.mouseenter(function(){a(!1);e(this).addClass(t.imAdvertising.clUnroll).removeClass(n.effect);window.clearTimeout(t.imAdvertising.timerClose)});r.mouseleave(function(){t.imAdvertising.timerClose=window.setTimeout(f,t.imAdvertising.delay)});setTimeout(function(){var i=t.imAdvertising.alreadyVisited();i||(e("#"+n.id+" #"+n.id+"-child .contText span").removeClass("hid"),r.addClass("unroll-"+n.position),e.imCookie(t.imAdvertising.cookieId,1,{expires:365}),t.imAdvertising.activateScripts());t.imAdvertising.timerClose=window.setTimeout(f,i?0:5e3)},5e3)},createContainer:function(t){var n=e('<div id="'+t.id+'">'),r=e('<div id="'+t.id+'-child"><\/div>'),i=e('<div class="contIcon"><\/div>'),s=e('<svg xmlns="http://www.w3.org/2000/svg" width="30px" height="30px" viewBox="0 0 114.98 114.98">            <defs>                <style>                    .a {                        fill: #f1f1f1;                    }                                        .b {                        fill: #232323;                    }                <\/style>            <\/defs>            <circle class="a" cx="57.49" cy="57.49" r="57.49" />            <path class="b" d="M96.34,38.74a3.29,3.29,0,0,0,0-6.58H80.7a3,3,0,0,0-.67.07l-.16,0-.14,0-.21.08-.09,0-.2.09-.09,0-.16.09-.11.07-.13.09-.13.1a.39.39,0,0,1-.1.08l-.14.14a.46.46,0,0,0-.07.07l-.15.16a.56.56,0,0,0-.05.08,1.15,1.15,0,0,0-.14.17.75.75,0,0,1-.07.12l-.09.15a3.38,3.38,0,0,0-.26.62L73.33,48.05a3.29,3.29,0,0,0,2.17,4.12l.08,0a3.49,3.49,0,0,0,1.08.17h.21a13.11,13.11,0,0,1,12.64,9.76,13.31,13.31,0,0,1,.43,3.34,13.09,13.09,0,0,1-9.75,12.64,13.06,13.06,0,0,1-15.76-8.58c0-.15-11.7-35.1-11.7-35.1l0-.07-.06-.16L52.57,34a.91.91,0,0,0-.07-.14l-.08-.15a1,1,0,0,0-.08-.11,1,1,0,0,0-.1-.15l-.09-.11L52,33.23a1.14,1.14,0,0,1-.11-.11L51.81,33l-.13-.11-.11-.09-.15-.1-.11-.07-.15-.09L51,32.48l-.15-.06-.16-.07-.07,0-.07,0-.18-.05-.14,0-.17,0-.15,0h-.65l-.15,0-.18,0-.14,0-.18.05-.07,0-.06,0-.17.06-.14.06-.14.08-.15.08-.12.08-.15.1-.11.09-.13.11-.11.11-.11.11-.11.13-.09.11-.1.15-.08.12-.08.15a.91.91,0,0,0-.07.14.61.61,0,0,1-.07.14l-.06.17a.14.14,0,0,0,0,.07L34.17,71.63,21.77,34.41a3.29,3.29,0,0,0-6.24,2.08L31.06,83.1l0,.07a1.22,1.22,0,0,0,.07.17l.06.14s.05.09.07.14l.09.15.07.12.1.15.09.11.11.13a1.14,1.14,0,0,1,.11.11l.12.11.13.11.11.09.15.1.11.08a.8.8,0,0,0,.16.08l.13.07.15.07.16.06.07,0,.07,0,.18.05.14,0,.17,0,.15,0h.65l.15,0,.18,0,.14,0,.18,0,.06,0,.07,0,.17-.07L35.6,85l.14-.07.15-.09L36,84.8l.15-.1.11-.09.13-.12a1.14,1.14,0,0,0,.11-.11l.11-.11.11-.13.09-.11.1-.15.08-.11a1.19,1.19,0,0,0,.08-.16.83.83,0,0,0,.07-.13l.07-.15.06-.16,0-.07L49.62,45.87l8.22,24.58h0a19.66,19.66,0,0,0,38.68-5,19.77,19.77,0,0,0-.65-5A19.7,19.7,0,0,0,80.8,46.18l2.31-7.44Z" />        <\/svg>'),o=e('<div class="contText"><\/div>'),u=e('<span class="hid">'+t.text+"<\/span>");r.append(i.append(s)).append(o.append(u));t.acceptButton==1&&o.append(e("<button onclick=\"window.open('"+t.actionButton+"','_blank');\" >"+t.textButton+"<\/button>"));n.append(r).appendTo("body")},activateScripts:function(){e("#imContent").trigger("x5ActivateCookieScripts")},alreadyVisited:function(){return!!e.imCookie(t.imAdvertising.cookieId)}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{alertBox:function(n){var r='<img class="imCloseInn" src=\''+t.settings.currentPath+"res/imClose.png' style='width: 20px;' />",S,C,k,L;n=e.extend(!0,{id:"",effect:"",link:"",priority:0,cookie:!1,position:"top",text:"",image:"",media:null,sound:"",acceptButton:!1,elementClose:r,onClose:null,offlineTimeStamp:0},n);var i=n.id,s=null,o=null,u=null,a=e("body"),f=null,l=null,c=null,h=null,p=0,d=500,v=null,m=null,g="cookie-"+n.id+(!t.utils.isOnline()&&!!n.offlineTimeStamp?"_"+n.offlineTimeStamp:""),y=function(){if(!!n.sound&&!!n.sound){var e=new Audio(n.sound);e.play()}},b=function(){n.link&&s.find(".target-image, .mediaTarget").click(function(){e.isFunction(n.link)?n.link.call(this):location.href=n.link}).css("cursor","pointer")},w=function(){n.cookie&&e.imCookie(g,"true",{expires:0,path:"/"})},E='<div id="'+i+'" class="alertbox" data-position="'+n.position+'" data-priority="'+n.priority+'"><div class="message-container"><div class="wrapper-content">'+n.text+(n.image?'<img class="target-image"/>':"")+(n.media?'<div class="mediaTarget" />':"")+"<\/div><\/div>";if(n.elementClose!==""&&(E+='<div class="close-button close">'+n.elementClose+"<\/div>"),E+="<\/div>",S=function(e){e.keyCode==27&&u()},a.keydown(S),n.cookie&&e.imCookie(g)=="true")return!1;if(n.position=="top"){if(p=1e6,e('[data-priority][data-position="top"]').each(function(){var t=e(this).attr("data-priority")*1;!isNaN(t)&&t>n.priority&&t<p&&(h=e(this),p=t)}),h?h.after(E):a.prepend(E),f=e("#"+i+" .target-image"),s=e("#"+i),s.length>0){s.slideUp(0);var x=e("#imHeaderBg"),T=0,N=function(){};u=function(){w();a.off("keydown",S);e.isFunction(n.onClose)&&n.onClose();!c||c.Stop();s.slideUp({duration:d,step:N,complete:function(){s.remove();T=0;x.css("margin-top").replace(/px/g,"")*1<2&&x.css("margin-top",0)}})};o=function(r){if(s.css({position:"fixed",top:0,left:0,right:0,"border-top-width":0,zIndex:t.settings.zIndex.popup}),n.effect&&n.effect=="fromtop"){var i="";i={left:0,top:0};s.css({top:-e(window).height()+s.height()});s.fadeIn(0);s.animate(i,{duration:d,complete:r})}y();b();s.slideDown({duration:d,step:N,complete:function(){T=s.outerHeight(!0);e.isFunction(r)&&r()}})};!!f&&f.length?(f.one("load",o),f.mouseenter(function(){f.attr("src",n.image).mouseleave(function(){f.attr("src",n.image).off("mouseleave")})}).attr("src",n.image)):n.media?(m=n.media.load,v=new t.mediaObject(e.extend(n.media,{load:function(t){t.AppendTo(e(".mediaTarget"));t.DOMObject().css("position","").height(t.Height());o(function(){e.isFunction(m)&&m(t)})}}))):o();s.find(".close").click(u)}}else n.position=="bottom"&&(C=e("#bottom-alertbox-container"),C.length||(C=e('<div id="bottom-alertbox-container" />').css({position:"fixed",bottom:0,left:0,right:0,"z-index":t.settings.zIndex.popup}),a.append(C)),p=0,C.find("[data-priority]").each(function(){var t=e(this).attr("data-priority")*1;!isNaN(t)&&t<n.priority&&t>=p&&(h=e(this),p=t)}),h?h.before(E):C.append(E),s=e("#"+i),f=s.find(".target-image"),l=s.find(".message-container"),s.length>0&&(s.css({position:"relative",zIndex:t.settings.zIndex.splashBox}),o=function(r){var o,u;n.sound&&(c=t.mediaPlayer({url:n.sound,target:s.find(".alertbox-mediaplayer"),type:"audio",width:1,height:1,loop:!0,autoplay:!0}));s.css({bottom:n.image?-e("#"+i+" img").outerHeight():v?-v.Height():"auto","border-bottom-width":0});o=f.length>0?f.outerHeight():v?v.Height():"auto";l.css({height:o});s.stop(!0,!0).animate({bottom:0,height:o},{duration:d,complete:r});n.effect&&n.effect=="frombottom"&&(u="",u={left:0,top:0},s.css({top:e(window).height()-s.height()}),s.fadeIn(0),s.animate(u,{duration:d,complete:r}));y();b();w()},u=function(){e.isFunction(n.onClose)&&n.onClose();!c||c.Stop();s.slideUp(d,function(){s.remove()});w()},k=function(){f.one("load",function(){e([l,s]).stop(!1,!1).animate({height:f.outerHeight()});f.mouseleave(L)}).attr("src",n.img_big)},L=function(){f.off("load mouseleave").attr("src",n.image);e([l,s]).animate({height:f.outerHeight()})},!!f&&f.length?(f.one("load",o),n.img_big&&f.mouseenter(k),f.attr("src",n.image)):n.media?(m=n.media.load,v=new t.mediaObject(e.extend(n.media,{load:function(t){t.AppendTo(e(".mediaTarget"));t.DOMObject().css("position","").width("auto").height("auto").fadeIn(0);o(function(){e.isFunction(m)&&m(t)})}}))):o(),s.find(".close").click(u)));return{close:function(){e.isFunction(u)&&u()}}}})}(_jq,x5engine),function(e,t,n){"use strict";e.extend(t,{analytics:{setPageView:function(t){t=e.extend(!0,{cookie:{name:"wsx5analytics",expiration:1800},postUrl:"analytics/wsx5analytics.php"},t);var r,i,s,o,u=n.imStorage,a=t.cookie.name,f=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})};r=u.getItem(a);s=u.getItem(a+"ex")*1;o=new Date;(!r||s<o.getTime())&&(r=f());u.setItem(a,r);u.setItem(a+"ex",o.setTime(o.getTime()+t.cookie.expiration*1e3));i=location.pathname;i.charAt(i.length-1)=="/"&&i.indexOf("/index.html")==-1&&(i+="index.html");e.ajax({url:t.postUrl,type:"POST",data:{uid:r,url:i,lang:navigator.language||navigator.userLanguage}})}}})}(_jq,x5engine,window),function(e){"use strict";function s(){return(new Date).getTime()}var t="x5enginepause",n=1,r={},i=e.fn.animate;e.fn.animate=function(o,u,a,f){var l=e.speed(u,a,f);return l.complete=l.old,this.each(function(){this[t]||(this[t]=n++);var u=e.extend({},l);i.apply(e(this),[o,u]);r[this[t]]={start:s(),run:!0,opt:u,prop:o,done:0}})};e.fn.pauseAnim=function(){return this.each(function(){this[t]||(this[t]=n++);var i=r[this[t]];i&&i.run&&(i.done+=s()-i.start,i.done>i.opt.duration?delete r[this[t]]:(e(this).stop(),i.run=!1))})};e.fn.resAnim=function(){return this.each(function(){this[t]||(this[t]=n++);var o=r[this[t]];o&&!o.run&&(o.opt.duration-=o.done,o.done=0,o.run=!0,o.start=s(),i.apply(e(this),[o.prop,o.opt]))})}}(_jq),function(e,t){"use strict";e.extend(t,{bgStretch:function(n,r,i){var s=e('<div id="imFixedDivBg" />').css({position:"fixed",top:0,left:0,bottom:0,right:0,"z-index":i});e("body").prepend(s);t.divBgStretch(s,n,!1,"top")},divBgStretch:function(n,r,i,s){var o,u,a,f=0,l=0,c=0,h=0,p=0,d=0,v=0;i=i===undefined||i===null?!0:i;s=s?s:"center";(o=t.utils.supportsCSS("backgroundSize"))&&!/(iPad|iPhone|android)/i.test(navigator.userAgent)||(n=e(n),u=e("<div />").css("overflow","hidden"),u.css("display",t.responsive.isDesktopMode()?"block":"none"),e("#imContent").on("breakpointChanged",function(){u.css("display",t.responsive.isDesktopMode()?"block":"none")}),a=e("<img />").css({position:"absolute",top:-1e4}),e("body").append(a),a.one("load",function(){c=n.width();h=n.height();v=c;d=h;p=a.height()/a.width();a.detach();n.prepend(u);u.append(a),function t(){n.css("position")=="static"&&n.css("position","relative");n.children().each(function(){var t=e(this);t.css("position")=="static"&&t.css("position","relative")});u.width(v).height(d).css({position:"absolute",top:0,left:0});i?a.css({top:0,left:0}).width(v).height(d):(f=v,l=v*p,d>l&&(l=d,f=d/p),a.width(f).height(l).css({top:s=="top"?0:(d-l)/2,left:(v-f)/2}),setTimeout(function(){v=n.width();d=n.height();(v!=c||d!=h)&&(t(),c=v,h=d)},250))}()}).attr("src",r))},eventBinder:function(t,n,r,i,s){var o=!1;e(t).each(function(){var u=e(this),a=function(r){if(isNaN(r.clientX)||isNaN(r.clientY)||r.clientX===0&&r.clientY===0)return!1;for(var i=document.elementsFromPoint(r.clientX,r.clientY),s=!1,o=!1,u=0;u<i.length&&!s&&!o;u++)e(i[u]).is(t)&&(s=!0),!!n&&(e(i[u]).is(n)||e(r.target).is(n))&&(o=!0);return s&&!o},f=function(t){a(t)&&(e.isFunction(r)?r.apply(u):typeof r=="string"&&r.indexOf("http")===0&&(location.href=r))},l=function(t){a(t)?o||(o=!0,e.isFunction(i)?i.apply(u):typeof i=="string"&&i.indexOf("http")===0&&(location.href=i)):o&&(o=!1,e.isFunction(s)&&s())};r&&u.on("click",f);!i&&!s||e("body").on("mousemove",l)})}})}(_jq,x5engine),function(e,t,n){"use strict";e.extend(t,{blogHighlightedSlideshow:function(){function u(){t=[];e(".imBlogHighlightedCards").each(function(){var n=e(this),r=n.find(".imBlogPostCard"),i=r.length||0,s,o;i!=0&&(s=n.width(),o=n.width()*(i-1),t.push({cards:r,current:0,step:s,end:o}),e.each(r,function(t,n){e(n).css("transform","translateX(0px)")}))})}function a(){e.each(t,function(t,n){n.current==n.end?n.current=0:n.current+=n.step;e.each(n.cards,function(t,r){e(r).css("transform","translateX(-"+n.current+"px)")})});p()}function f(){e.each(t,function(t,n){n.current==0?n.current=n.end:n.current-=n.step;e.each(n.cards,function(t,r){e(r).css("transform","translateX(-"+n.current+"px)")})});p()}function l(e){(s=!1,e.touches.length==1)&&(s=o={x:e.touches[0].pageX,y:e.touches[0].pageY})}function c(e){if(e.touches.length==1){var t=e.touches[0].pageX-s.x,n=e.touches[0].pageY-s.y;if(Math.abs(n)>Math.abs(t)){s=!1;o=!1;return}o={x:e.touches[0].pageX,y:e.touches[0].pageY}}}function h(e){if(s&&o){var t=o.x-s.x,n=o.y-s.y;t!=0&&Math.abs(n)<Math.abs(t)&&(e.preventDefault(),t>0?f():a());s=o=!1}}function p(){r&&clearTimeout(r);r=setTimeout(function(){a()},i)}var t=[],r=null,i=5e3,s=!1,o=!1;return{start:function(r){i=r||5e3;u();t.length>0&&(e(n).resize(u),e("html").hasClass("touchevents")?(e(".imBlogHighlightedCards").on("touchstart",l),e(".imBlogHighlightedCards").on("touchmove",c),e(".imBlogHighlightedCards").on("touchend",h),e(".imBlogHighlightedBefore").css("display","none"),e(".imBlogHighlightedAfter").css("display","none")):(e(".imBlogHighlightedBefore").click(f),e(".imBlogHighlightedAfter").click(a)),p())}}}()})}(_jq,x5engine,window),function(e,t){"use strict";e.extend(t,{captcha:{instance:null}})}(_jq,x5engine),function(e,t){"use strict";e.extend(!0,t,{captcha:{recaptcha:function(t){t=e.extend({sitekey:""},t);this.create=function(n){var r=e(n).find(".recaptcha"),i=-1,s;return r.length?(function o(){"undefined"==typeof grecaptcha?setTimeout(o,50):i=grecaptcha.render(r[0],{sitekey:t.sitekey})}(),s=function(e){"console"in window&&console.log(e)},{remove:function(){r.empty()},reset:function(){"number"==typeof i&&grecaptcha.reset(i)},check:function(){var n,r;return"number"==typeof i?(n=grecaptcha.getResponse(i),!n)?!1:x5engine.utils.isOnline()?(r=!1,e.ajax({url:x5engine.settings.currentPath+t.phpfile,async:!1,type:"POST",data:{rsp:n},dataType:"json",success:function(e){r=e.success;e.success||!e["error-codes"]||!e["error-codes"].length||s("reCaptcha error: "+e["error-codes"][0])},error:function(e,t,n){s("reCatpcha error: "+t+n)}}),r):!0:!1},getCaptchaField:function(){return r}}):!1}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(!0,t,{captcha:{x5captcha:function(t){var n=this;t=e.extend({length:5,phpfile:"captcha/5captcha.php",offlineCodes:[]},t);this.create=function(n){var r,i,s,o=x5engine.settings.currentPath,u=t.length,a=null,f=e(n).find(".imCpt"),l=function(){var n,l;for(f.val(""),r="",i="",s=0;s<u;s++){do n=parseInt(Math.random()*9,10);while(r.indexOf(n)>-1);r+=n}if(x5engine.utils.isOnline())a=e('<iframe class="captcha-container" src="'+o+t.phpfile+"?action=show&code="+r+'" frameborder="0" marginwidth="0" marginheight="0" width="120" height="24" scrolling="no"><\/iframe>'),f.before(a);else{for(l='<div class="captcha-container">',s=0;s<r.length;s++)l+='<img src="'+o+t.offlineCodes[parseInt(r.charAt(s),10)].path+'" />';for(l+="<\/div>",a=e(l),f.before(a),s=0;s<r.length;s++)i+=t.offlineCodes[parseInt(r.charAt(s),10)].letter}e("#imContent").change()},c=function(){a&&a.remove()};return f.length?(l(),{remove:c,reset:function(){c();l()},check:function(){var n=f.val(),s=!1;return x5engine.utils.isOnline()?e.ajax({url:o+t.phpfile+"?action=check&code="+r+"&ans="+n,async:!1,cache:!1,success:function(e){s=e!="-1"}}):s=n.toLowerCase()==i.toLowerCase(),s},getCaptchaField:function(){return f}}):!1}}}})}(_jq,x5engine),function(e,t){"use strict";function f(){this.controls={bold:{groupIndex:1,visible:!0,tags:["b","strong"],css:{fontWeight:"bold"},tooltip:i("wysiwyg_bold","Bold"),hotkey:{ctrl:1,key:66}},copy:{groupIndex:0,visible:!1,hasState:!1,tooltip:i("wysiwyg_copy","Copy")},createLink:{groupIndex:6,visible:!0,exec:function(){var t=this;e.wysiwyg.controls&&e.wysiwyg.controls.link?e.wysiwyg.controls.link.init(this):e.wysiwyg.autoload?e.wysiwyg.autoload.control("wysiwyg.link.js",function(){t.controls.createLink.exec.apply(t)}):n.error("$.wysiwyg.controls.link not defined. You need to include wysiwyg.link.js file")},tags:["a"],tooltip:i("wysiwyg_add_link","Create link")},unLink:{groupIndex:6,hasState:!1,visible:!0,exec:function(){this.editorDoc.execCommand("unlink",!1,null)},tooltip:i("wysiwyg_remove_link","Remove link")},cut:{groupIndex:0,visible:!1,hasState:!1,tooltip:i("wysiwyg_cut","Cut")},decreaseFontSize:{groupIndex:9,visible:!1,hasState:!1,tags:["small"],tooltip:"Decrease font size",exec:function(){this.decreaseFontSize()}},h1:{groupIndex:7,visible:!1,className:"h1",command:s||a?"FormatBlock":"heading",arguments:s||a?"<h1>":"h1",tags:["h1"],tooltip:"Header 1"},h2:{groupIndex:7,visible:!1,className:"h2",command:s||a?"FormatBlock":"heading",arguments:s||a?"<h2>":"h2",tags:["h2"],tooltip:"Header 2"},h3:{groupIndex:7,visible:!1,className:"h3",command:s||a?"FormatBlock":"heading",arguments:s||a?"<h3>":"h3",tags:["h3"],tooltip:"Header 3"},highlight:{tooltip:"Highlight",className:"highlight",groupIndex:1,visible:!1,css:{backgroundColor:"rgb(255, 255, 102)"},exec:function(){var e,t,n,r;if(e=s||a?"backcolor":"hilitecolor",s)t=this.getInternalRange().parentElement();else for(n=this.getInternalSelection(),t=n.extentNode||n.focusNode;t.style===undefined;)if(t=t.parentNode,t.tagName&&t.tagName.toLowerCase()==="body")return;r=t.style.backgroundColor==="rgb(255, 255, 102)"||t.style.backgroundColor==="#ffff66"?"#ffffff":"#ffff66";this.editorDoc.execCommand(e,!1,r)}},html:{groupIndex:10,visible:!0,exec:function(){var t;this.options.resizeOptions&&e.fn.resizable&&(t=this.element.height());this.viewHTML?(this.setContent(this.original.value),e(this.original).hide(),this.editor.show(),this.options.resizeOptions&&e.fn.resizable&&(t===this.element.height()&&this.element.height(t+this.editor.height()),this.element.resizable(e.extend(!0,{alsoResize:this.editor},this.options.resizeOptions))),this.ui.toolbar.find("li").each(function(){var t=e(this);t.hasClass("html")||t.removeClass("disabled")})):(this.saveContent(),e(this.original).css({width:this.element.outerWidth()-6,height:this.element.height()-this.ui.toolbar.height()-10,resize:"none"}).show(),this.editor.hide(),this.options.resizeOptions&&e.fn.resizable&&(t===this.element.height()&&this.element.height(this.ui.toolbar.height()),this.element.resizable("destroy")),this.ui.toolbar.find("li").each(function(){var t=e(this);t.hasClass("html")||!1!==t.hasClass("fullscreen")||t.removeClass("active").addClass("disabled")}));this.viewHTML=!this.viewHTML},tooltip:"View source code"},increaseFontSize:{groupIndex:9,visible:!1,hasState:!1,tags:["big"],tooltip:"Increase font size",exec:function(){this.increaseFontSize()}},indent:{groupIndex:2,hasState:!1,visible:!1,tooltip:"Indent"},insertHorizontalRule:{groupIndex:6,visible:!1,hasState:!1,tags:["hr"],tooltip:"Insert Horizontal Rule"},insertImage:{groupIndex:6,hasState:!1,visible:!0,exec:function(){var t=this;e.wysiwyg.controls&&e.wysiwyg.controls.image?e.wysiwyg.controls.image.init(this):e.wysiwyg.autoload?e.wysiwyg.autoload.control("wysiwyg.image.js",function(){t.controls.insertImage.exec.apply(t)}):n.error("$.wysiwyg.controls.image not defined. You need to include wysiwyg.image.js file")},tags:["img"],tooltip:i("wysiwyg_image","Insert image")},insertOrderedList:{groupIndex:5,visible:!0,tags:["ol"],tooltip:i("wysiwyg_ol","Insert Ordered List")},insertTable:{groupIndex:6,hasState:!1,visible:!1,exec:function(){var t=this;e.wysiwyg.controls&&e.wysiwyg.controls.table?e.wysiwyg.controls.table(this):e.wysiwyg.autoload?e.wysiwyg.autoload.control("wysiwyg.table.js",function(){t.controls.insertTable.exec.apply(t)}):n.error("$.wysiwyg.controls.table not defined. You need to include wysiwyg.table.js file")},tags:["table"],tooltip:"Insert table"},insertUnorderedList:{groupIndex:5,visible:!0,tags:["ul"],tooltip:i("wysiwyg_ul","Insert Unordered List")},italic:{groupIndex:1,visible:!0,tags:["i","em"],css:{fontStyle:"italic"},tooltip:i("wysiwyg_italic","Italic"),hotkey:{ctrl:1,key:73}},justifyCenter:{groupIndex:2,visible:!0,exclusive:!0,tags:["center"],css:{textAlign:"center"},tooltip:i("wysiwyg_justify_center","Justify Center")},justifyFull:{groupIndex:2,visible:!0,exclusive:!0,css:{textAlign:"justify"},tooltip:i("wysiwyg_justify_full","Justify Full")},justifyLeft:{visible:!0,groupIndex:2,exclusive:!0,css:{textAlign:"left"},tooltip:i("wysiwyg_justify_left","Justify Left")},justifyRight:{groupIndex:2,visible:!0,exclusive:!0,css:{textAlign:"right"},tooltip:i("wysiwyg_justify_right","Justify Right")},ltr:{groupIndex:10,visible:!1,exec:function(){var t=this.dom.getElement("p");return t?(e(t).attr("dir","ltr"),!0):!1},tooltip:"Left to Right"},outdent:{groupIndex:2,visible:!1,tooltip:"Outdent"},paragraph:{groupIndex:7,visible:!1,className:"paragraph",command:"FormatBlock",arguments:s||a?"<p>":"p",tags:["p"],tooltip:"Paragraph"},paste:{groupIndex:0,hasState:!1,visible:!1,tooltip:i("wysiwyg_paste","Paste")},undo:{groupIndex:3,hasState:!1,visible:!0,tooltip:i("wysiwyg_undo","Undo")},redo:{groupIndex:3,hasState:!1,visible:!0,tooltip:i("wysiwyg_redo","Redo")},removeFormat:{groupIndex:10,visible:!0,exec:function(){this.removeFormat()},tooltip:i("wysiwyg_reset","Remove formatting")},rtl:{groupIndex:10,visible:!1,exec:function(){var t=this.dom.getElement("p");return t?(e(t).attr("dir","rtl"),!0):!1},tooltip:"Right to Left"},strikeThrough:{groupIndex:1,visible:!0,tags:["s","strike"],css:{textDecoration:"line-through"},tooltip:i("wysiwyg_strike","Strike-through")},subscript:{groupIndex:3,visible:!1,tags:["sub"],tooltip:"Subscript"},superscript:{groupIndex:3,visible:!1,tags:["sup"],tooltip:"Superscript"},underline:{groupIndex:1,visible:!0,tags:["u"],css:{textDecoration:"underline"},tooltip:i("wysiwyg_underline","Underline"),hotkey:{ctrl:1,key:85}},code:{visible:!1,groupIndex:6,tooltip:"Code snippet",exec:function(){var t=this.getInternalRange(),n=e(t.commonAncestorContainer),r=t.commonAncestorContainer.nodeName.toLowerCase();n.parent("code").length?n.unwrap():r!=="body"&&n.wrap("<code/>")}},cssWrap:{visible:!1,groupIndex:6,tooltip:"CSS Wrapper",exec:function(){e.wysiwyg.controls.cssWrap.init(this)}}};this.defaults={html:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="margin:0;background-image:none;"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><\/head><body style="margin:0;">INITIAL_CONTENT<\/body><\/html>',debug:!1,controls:{},availableFonts:[],defaultFontFamily:"Tahoma",defaultFontSize:10,css:{},events:{},autoGrow:!1,autoSave:!0,brIE:!1,formHeight:270,formWidth:440,iFrameClass:null,initialContent:"<p>"+i("wysiwyg_default_text","Click here to edit this text!")+"<\/p>",maxHeight:1e4,maxLength:0,messages:{nonSelection:"Select the text you wish to link"},toolbarHtml:'<ul role="menu" class="toolbar"><\/ul>',removeHeadings:!1,replaceDivWithP:!1,resizeOptions:!1,rmUnusedControls:!1,rmUnwantedBr:!0,tableFiller:"Lorem ipsum",initialMinHeight:null,controlImage:{forceRelativeUrls:!1},controlLink:{forceRelativeUrls:!1},plugins:{autoload:!1,i18n:!1,rmFormat:{rmMsWordMarkup:!1}},dialog:"default"};this.availableControlProperties=["arguments","callback","className","command","hasState","exclusive","css","custom","exec","groupIndex","hotkey","icon","tags","tooltip","visible"];this.editor=null;this.editorDoc=null;this.element=null;this.options={};this.original=null;this.savedRange=null;this.timers=[];this.validKeyCodes=[8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46];this.isDestroyed=!1;this.dom={ie:{parent:null},w3c:{parent:null}};this.dom.parent=this;this.dom.ie.parent=this.dom;this.dom.w3c.parent=this.dom;this.ui={};this.ui.self=this;this.ui.toolbar=null;this.ui.initialHeight=null;var r,f,l=null;window.getSelection?(r=function(e){var t=e.getSelection(),n=[],r,i;if(t.rangeCount)for(r=0,i=t.rangeCount;r<i;++r)n.push(t.getRangeAt(r));return n},f=function(e,t){var n=e.getSelection(),r,i;for(n.removeAllRanges(),r=0,i=t.length;r<i;++r)n.addRange(t[r])}):document.selection&&document.selection.createRange&&(r=function(e){var t=e.document.selection;return t.type!="None"?t.createRange():null},f=function(e,t){t&&t.select()});this.saveSelection=function(){l=r(this.editor[0].contentWindow)};this.restoreSelection=function(){l&&f(this.editor[0].contentWindow,l)};this.dom.getAncestor=function(e,t){for(t=t.toLowerCase();e&&typeof e.tagName!="undefined"&&"body"!==e.tagName.toLowerCase();){if(t===e.tagName.toLowerCase())return e;e=e.parentNode}if(!e.tagName&&(e.previousSibling||e.nextSibling)){if(e.previousSibling&&e.previousSibling.tagName.toLowerCase()==t)return e.previousSibling;if(e.nextSibling&&e.nextSibling.tagName.toLowerCase()==t)return e.nextSibling}return null};this.dom.getElement=function(e){var t=this;return e=e.toLowerCase(),window.getSelection?t.w3c.getElement(e):t.ie.getElement(e)};this.dom.ie.getElement=function(e){var t=this.parent,n=t.parent.getInternalSelection(),r=n.createRange(),i;if("Control"===n.type){if(1!==r.length)return null;i=r.item(0)}else i=r.parentElement();return t.getAncestor(i,e)};this.dom.w3c.getElement=function(e){var t=this.parent,n=t.parent.getInternalRange(),r;if(!n||(r=n.commonAncestorContainer,3===r.nodeType&&(r=r.parentNode),!r)||(r===n.startContainer&&(r=r.childNodes[n.startOffset]),!r))return null;if(!r.tagName&&(r.previousSibling||r.nextSibling)){if(r.previousSibling&&r.previousSibling.tagName.toLowerCase()==e)return r.previousSibling;if(r.nextSibling&&r.nextSibling.tagName.toLowerCase()==e)return r.nextSibling}return t.getAncestor(r,e)};this.ui.addHoverClass=function(){e(this).addClass("wysiwyg-button-hover")};this.ui.appendControls=function(){var n=this,r=this.self,i=r.parseControls(),o=[],u={},f,l=!1,c=-1,h=function(e,t){t.visible&&(c!=t.groupIndex&&l&&(n.appendItemSeparator(),l=!1),c=t.groupIndex,l=!0,t.custom?n.appendItemCustom(e,t):n.appendItem(e,t))},g,y,b,w,E,S,x;for(e.each(i,function(e,t){var n="empty";undefined!==t.groupIndex&&(n=""===t.groupIndex?"empty":t.groupIndex);undefined===u[n]&&(o.push(n),u[n]={});u[n][e]=t}),o.sort(function(e,t){return"number"==typeof e&&typeof e==typeof t?e-t:(e=e.toString(),t=t.toString(),e>t?1:e===t?0:-1)}),0<o.length&&(c=o[0]),f=0;f<o.length;f+=1)e.each(u[o[f]],h);l&&n.appendItemSeparator();var p=function(n,i,s){var o=function(){a&&a.hidePicker();u&&u.remove()},u=e('<input id="colorPickerInput" style="visibility: hidden; width: 1px; height: 100%;"/>').appendTo(n),a;t.jscolor.dir="images/";a=new t.jscolor.color(document.getElementById("colorPickerInput"),{});(typeof i).toLowerCase()=="string"?a.fromString(i):(typeof i).toLowerCase()=="object"&&a.fromRGB(i.r,i.g,i.b);a.showPicker();setTimeout(function(){e(t.jscolor.picker.box).on("click",function(e){e.stopPropagation()});e("body").add(r.editorDoc).one("click",function(){a&&o()}).one("keydown",function(e){a&&(e.keyCode==27||e.keyCode==13)&&(e.preventDefault(),e.stopPropagation(),o())})},100);s&&e.isFunction(s)&&u.on("change",function(){s(u.val())})},d=function(e){return e?e.indexOf("#")===0?e.substring(1):e.indexOf("rgb(")===0?(e=e.substring(4),e=e.substring(0,e.length-1),e=e.split(","),{r:e[0].trim()/255,g:e[1].trim()/255,b:e[2].trim()/255}):void 0:"000000"},v,m=n.appendItemCustom("fontFamily",{event:"change",onControlAppended:function(e){e.parent("ul").find("li.bold").before(e.detach())},exec:function(){v=m.find("select").val();r.editorDoc.execCommand("fontname",!1,v)}});if(m.append('<select unselectable="on" id="font-family" style="width:100px;" />').css("text-indent",0).width(100).parent("li").width("auto"),r.options.availableFonts.length)for(g=m.find("select"),f=0;f<r.options.availableFonts.length;f++)g.append('<option value="'+r.options.availableFonts[f]+'">'+r.options.availableFonts[f]+"<\/option>");for(b=n.appendItemCustom("fontSize",{event:"change",onControlAppended:function(e){e.parent("ul").find("li.bold").before(e.detach())},exec:function(){y=b.find("select").val();s||r.editorDoc.execCommand("styleWithCSS",!1,!0);r.editorDoc.execCommand("fontSize",!1,1);s||r.editorDoc.execCommand("styleWithCSS",!1,!1);e(r.editorDoc).find("[style*=small] span, [size=1] span").css("font-size","");e(r.editorDoc).find("[style*=small]").css("font-size",y+"pt");e(r.editorDoc).triggerHandler("mouseup")}}),b.after('<li role="separator" class="separator"><\/li>'),b.append('<select id="font-family" style="width:40px;" />').css("text-indent",0).width(40).parent("li").width("auto"),w=b.find("select"),E=[8,9,10,12,14,16,18,20,22,24,26,28,36,42,48,54,60,66,72],f=0;f<E.length;f++)w.append('<option value="'+E[f]+'">'+E[f]+"<\/option>");S=n.appendItemCustom("colorpicker",{onControlAppended:function(e){e.parent("ul").find("li.underline").after(e.detach())},exec:function(){S.css("text-indent",0);var t=r.getInternalSelection(),n="000000";t.focusNode&&t.focusNode.parentNode&&(n=d(e(t.focusNode.parentNode).css("color")));p(S,n,function(e){s||r.editorDoc.execCommand("styleWithCSS",!1,!0);r.editorDoc.execCommand("foreColor",!1,"#"+e);s||r.editorDoc.execCommand("styleWithCSS",!1,!1)})}});x=n.appendItemCustom("highlight",{onControlAppended:function(e){e.parent("ul").find("li.colorpicker").after(e.detach())},exec:function(){x.css("text-indent",0);var t=r.getInternalSelection(),n="000000";t.focusNode&&t.focusNode.parentNode&&(n=d(e(t.focusNode.parentNode).css("background-color")));p(x,n,function(e){var t;t=s||a?"backcolor":"hilitecolor";s||r.editorDoc.execCommand("styleWithCSS",!1,!0);r.editorDoc.execCommand(t,!1,"#"+e);s||r.editorDoc.execCommand("styleWithCSS",!1,!1)})}});e(r.element).on("initFrame.wysiwyg",function(){e(r.editorDoc).on("keydown mouseout mouseup",function(){var t,n,i;r.editorDoc.queryCommandValue&&(t=e(r.editorDoc),t.find("font").each(function(){var t=e(this),n=t.attr("style")||"";t.attr("face")&&(n+="font-family: '"+t.attr("face")+"';");t.attr("color")&&(n+="color: "+t.attr("color")+";");t.attr("size")&&!!y&&(n+="font-size: "+y+"pt;");t.wrap('<span style="'+n+'" />');t.contents().unwrap()}),r.options.availableFonts.length&&(n=r.getInternalSelection(),n&&(n=e(n.focusNode),n.is("span")||(n=n.parent("span")),n.length>0?g.val(n.css("font-family").replace(/['"]/g,"")):g.val(r.options.defaultFontFamily))),i=r.getInternalSelection(),i&&(i=e(i.focusNode),i.is("span")||(i=i.parent("span")),i.length>0?w.val((parseFloat(i.css("font-size").replace("pt","").replace("px",""))/1.3333).toFixed(0)):w.val(r.options.defaultFontSize)))})})};this.ui.appendItem=function(t,n){var r=this.self,i=n.className||n.command||t||"empty",s="hasState"in n?n.hasState:!0,o="exclusive"in n?n.exclusive:!1,u=n.tooltip||n.command||t||"";return e('<li role="menuitem" unselectable="on">'+i+"<\/li>").addClass(i).attr("title",u).hover(this.addHoverClass,this.removeHoverClass).on("click",function(i){var u,a;if(e(this).hasClass("disabled"))return!1;r.triggerControl.apply(r,[t,n]);u=e(i.target);for(a in r.controls)o&&s&&r.controls[a].groupIndex==n.groupIndex&&r.ui.toolbar.find("."+a).removeClass("active"),u.hasClass(a)&&(s&&r.ui.toolbar.find("."+a).toggleClass("active"),r.editorDoc.rememberCommand=!0);return this.blur(),r.ui.returnRange(),r.ui.focus(),!0}).on("selectstart mousedown",function(){return!1}).appendTo(r.ui.toolbar)};this.ui.appendItemCustom=function(t,n){var r=this.self,i=n.tooltip||n.command||t||"",o;return n.event||(n.event="click"),n.callback&&e(window).on("trigger-"+t+".wysiwyg",n.callback),o=e('<li role="menuitem" unselectable="on" '+(n.icon?"style=\"background: url('"+n.icon+"') no-repeat;\")":"")+"><\/li>").addClass("custom-command-"+t).addClass("wysiwyg-custom-command").addClass(t).attr("title",i).hover(this.addHoverClass,this.removeHoverClass).on(n.event,function(){return e(this).hasClass("disabled")?!1:(r.triggerControl.apply(r,[t,n]),s||(this.blur(),r.ui.returnRange(),r.ui.focus()),r.triggerControlCallback(t),!0)}).appendTo(r.ui.toolbar),n.onControlAppended&&e.isFunction(n.onControlAppended)&&n.onControlAppended(o),o};this.ui.appendItemSeparator=function(){var t=this.self;return e('<li role="separator" class="separator"><\/li>').appendTo(t.ui.toolbar)};this.autoSaveFunction=function(){this.saveContent()};this.ui.checkTargets=function(t){var n=this.self;e.each(n.options.controls,function(r,i){var s=i.className||i.command||r||"empty",o,u,a,f,l=function(t){var r=0,i=0;e.each(t,function(e,t){"function"==typeof t?t.apply(n,[f.css(e).toString().toLowerCase(),n])&&(r+=1):f.css(e).toString().toLowerCase()===t&&(r+=1);i+=1});i===r&&n.ui.toolbar.find("."+s).addClass("active")};if("fullscreen"!==s&&n.ui.toolbar.find("."+s).removeClass("active"),i.tags||i.options&&i.options.tags)for(o=i.tags||i.options&&i.options.tags,u=t;u;){if(u.nodeType!==1)break;e.inArray(u.tagName.toLowerCase(),o)!==-1&&n.ui.toolbar.find("."+s).addClass("active");u=u.parentNode}if(i.css||i.options&&i.options.css)for(a=i.css||i.options&&i.options.css,f=e(t);f;){if(f[0].nodeType!==1)break;l(a);f=f.parent()}})};this.ui.designMode=function(){var t=this.self,n;n=function(e){if("on"===t.editorDoc.designMode){t.timers.designMode&&window.clearTimeout(t.timers.designMode);t.innerDocument()!==t.editorDoc&&t.ui.initFrame();return}try{t.editorDoc.designMode="on"}catch(r){}e-=1;e>0&&(t.timers.designMode=window.setTimeout(function(){n(e)},100))};n(3)};this.destroy=function(){this.isDestroyed=!0;for(var n=this.element.closest("form"),t=0;t<this.timers.length;t+=1)window.clearTimeout(this.timers[t]);return n.off(".wysiwyg"),this.element.remove(),e.removeData(this.original,"wysiwyg"),e(this.original).show(),this};this.getRangeText=function(){var e=this.getInternalRange();if(e)return e.toString?e=e.toString():e.text&&(e=e.text),e};this.execute=function(e,t){typeof t=="undefined"&&(t=null);this.editorDoc.execCommand(e,!1,t)};this.extendOptions=function(t){var n={};return"object"==typeof t.controls&&(n=t.controls,delete t.controls),t=e.extend(!0,{},this.defaults,t),t.controls=e.extend(!0,{},n,this.controls,n),t.rmUnusedControls&&e.each(t.controls,function(e){n[e]||delete t.controls[e]}),t};this.ui.focus=function(){var e=this.self;return e.editor.get(0).contentWindow.focus(),e};this.ui.returnRange=function(){var e=this.self,t;if(e.savedRange!==null){if(window.getSelection){t=window.getSelection();t.rangeCount>0&&t.removeAllRanges();try{t.addRange(e.savedRange)}catch(r){n.error(r)}}else window.document.createRange?window.getSelection().addRange(e.savedRange):window.document.selection&&e.savedRange.select();e.savedRange=null}};this.increaseFontSize=function(){if(u||o)this.editorDoc.execCommand("increaseFontSize",!1,null);else if(a){var e=this.getInternalRange(),t=this.getInternalSelection(),r=this.editorDoc.createElement("big");if(!0===e.collapsed&&3===e.commonAncestorContainer.nodeType){var i=e.commonAncestorContainer.nodeValue.toString(),s=i.lastIndexOf(" ",e.startOffset)+1,f=-1===i.indexOf(" ",e.startOffset)?i:i.indexOf(" ",e.startOffset);e.setStart(e.commonAncestorContainer,s);e.setEnd(e.commonAncestorContainer,f);e.surroundContents(r);t.addRange(e)}else e.surroundContents(r),t.removeAllRanges(),t.addRange(e)}else n.error("Internet Explorer?")};this.decreaseFontSize=function(){if(u||o)this.editorDoc.execCommand("decreaseFontSize",!1,null);else if(a){var e=this.getInternalRange(),t=this.getInternalSelection(),r=this.editorDoc.createElement("small");if(!0===e.collapsed&&3===e.commonAncestorContainer.nodeType){var i=e.commonAncestorContainer.nodeValue.toString(),s=i.lastIndexOf(" ",e.startOffset)+1,f=-1===i.indexOf(" ",e.startOffset)?i:i.indexOf(" ",e.startOffset);e.setStart(e.commonAncestorContainer,s);e.setEnd(e.commonAncestorContainer,f);e.surroundContents(r);t.addRange(e)}else e.surroundContents(r),t.removeAllRanges(),t.addRange(e)}else n.error("Internet Explorer?")};this.getContent=function(){return this.viewHTML&&this.setContent(this.original.value),this.events.filter("getContent",this.editorDoc.body.innerHTML)};this.events={_events:{},bind:function(e,t){typeof this._events.eventName!="object"&&(this._events[e]=[]);this._events[e].push(t)},trigger:function(t,n){if(typeof this._events.eventName=="object"){var r=this.editor;e.each(this._events[t],function(e,t){typeof t=="function"&&t.apply(r,n)})}},filter:function(t,n){if(typeof this._events[t]=="object"){var r=this.editor,i=Array.prototype.slice.call(arguments,1);e.each(this._events[t],function(e,t){typeof t=="function"&&(n=t.apply(r,i))})}return n}};this.getElementByAttributeValue=function(e,t,n){for(var i,o=this.editorDoc.getElementsByTagName(e),r=0;r<o.length;r+=1)if(i=o[r].getAttribute(t),s&&(i=i.substr(i.length-n.length)),i===n)return o[r];return!1};this.getInternalRange=function(){var e=this.getInternalSelection();return e?e.rangeCount&&e.rangeCount>0?e.getRangeAt(0):e.createRange?e.createRange():null:null};this.getInternalSelection=function(){if(this.editor.get(0).contentWindow){if(this.editor.get(0).contentWindow.getSelection)return this.editor.get(0).contentWindow.getSelection();if(this.editor.get(0).contentWindow.selection)return this.editor.get(0).contentWindow.selection}return this.editorDoc.getSelection?this.editorDoc.getSelection():this.editorDoc.selection?this.editorDoc.selection:null};this.getRange=function(){var e=this.getSelection();if(!e)return null;if(e.rangeCount&&e.rangeCount>0)e.getRangeAt(0);else if(e.createRange)return e.createRange();return null};this.getSelection=function(){return window.getSelection?window.getSelection():window.document.selection};this.ui.grow=function(){var t=this.self,n=e(t.editorDoc.body),r=s?n[0].scrollHeight:n.height()+2+20,i=t.ui.initialHeight,o=Math.max(r,i);return o=Math.min(o,t.options.maxHeight),t.editor.attr("scrolling",o<t.options.maxHeight?"no":"auto"),n.css("overflow",o<t.options.maxHeight?"hidden":""),t.editor.get(0).height=o,t};this.init=function(t,n){var r=this,i=e(t).closest("form"),s=t.width||t.clientWidth||0,o=t.height||t.clientHeight||0,u;this.options=this.extendOptions(n);this.original=t;this.ui.toolbar=e(this.options.toolbarHtml);s===0&&t.cols&&(s=t.cols*8+21);o===0&&t.rows&&(o=t.rows*16+16);this.editor=e(window.location.protocol==="https:"?'<iframe src="javascript:false;"><\/iframe>':"<iframe><\/iframe>").attr("frameborder","0");this.options.iFrameClass?this.editor.addClass(this.options.iFrameClass):this.editor.css({minHeight:(o-6).toString()+"px"});t.id&&(u=t.id+"-wysiwyg-iframe",document.getElementById(u)||this.editor.attr("id",u));this.editor.attr("tabindex",e(t).attr("tabindex"));this.element=e("<div/>").addClass("wysiwyg");e(t).hide().before(this.element);this.viewHTML=!1;this.initialContent=e(t).val();this.ui.initFrame();this.options.resizeOptions&&e.fn.resizable&&this.element.resizable(e.extend(!0,{alsoResize:this.editor},this.options.resizeOptions));this.options.autoSave&&i.on("submit.wysiwyg",function(){r.autoSaveFunction()});i.on("reset.wysiwyg",function(){r.resetFunction()})};this.ui.initFrame=function(){var t=this.self,r,i,u,c,h,p;if(t.ui.appendControls(),t.element.append(t.ui.toolbar).append(e("<div><!-- --><\/div>").css({clear:"both"})).append(t.editor),t.editorDoc=t.innerDocument(),t.isDestroyed)return null;if(t.ui.designMode(),t.editorDoc.open(),t.editorDoc.write(t.options.html.replace(/INITIAL_CONTENT/,function(){return t.wrapInitialContent()})),t.editorDoc.close(),e.wysiwyg.plugin.bind(t),e(t.editorDoc).add(t.element).trigger("initFrame.wysiwyg"),e(t.editorDoc).on("click.wysiwyg",function(e){t.ui.checkTargets(e.target?e.target:e.srcElement)}),setInterval(function(){var e=null,r;try{r=t.getInternalRange();r&&(e={range:r,parent:"endContainer"in r?r.endContainer.parentNode:r.parentElement(),width:("startOffset"in r?r.startOffset-r.endOffset:r.boundingWidth)||0})}catch(i){n.error(i)}e&&e.width===0&&!t.editorDoc.rememberCommand&&t.ui.checkTargets(e.parent)},400),e(t.original).focus(function(){e(this).filter(":visible").length===0||o||t.ui.focus()}),e(t.editorDoc).keydown(function(e){var n;return e.keyCode===8&&(n=/^<([\w]+)[^>]*>(<br\/?>)?<\/\1>$/,n.test(t.getContent()))?(e.stopPropagation(),!1):(t.editorDoc.rememberCommand=!1,!0)}),s||e(t.editorDoc).keydown(function(e){var n,r;if(e.ctrlKey||e.metaKey)for(n in t.options.controls)if(r=t.options.controls[n],r.hotkey&&r.hotkey.ctrl&&e.keyCode===r.hotkey.key)return t.triggerControl.apply(t,[n,r]),!1;return!0}),t.options.brIE&&e(t.editorDoc).keydown(function(e){var n,r,i,u,a,f,l;if(e.keyCode===13){if(s||o)n=t.getRange(),n?(n.pasteHTML("<br/>"),n.collapse(!1),n.select()):t.insertHtml("<br/>");else{if((r=t.editorDoc.getSelection(),!(r&&r.getRangeAt&&r.rangeCount))||(i=r.getRangeAt(0),!i))return!0;for(i.deleteContents(),u=document.createElement("div"),u.innerHTML="<br/>",a=document.createDocumentFragment();f=u.firstChild;)l=a.appendChild(f);i.insertNode(a);l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),r.removeAllRanges(),r.addRange(i))}return!1}return!0}),t.options.plugins.rmFormat.rmMsWordMarkup&&e(t.editorDoc).on("keyup.wysiwyg",function(n){(n.ctrlKey||n.metaKey)&&86===n.keyCode&&e.wysiwyg.rmFormat&&("object"==typeof t.options.plugins.rmFormat.rmMsWordMarkup?e.wysiwyg.rmFormat.run(t,{rules:{msWordMarkup:t.options.plugins.rmFormat.rmMsWordMarkup}}):e.wysiwyg.rmFormat.run(t,{rules:{msWordMarkup:{enabled:!0}}}))}),t.options.autoSave&&e(t.editorDoc).keydown(function(){t.autoSaveFunction()}).keyup(function(){t.autoSaveFunction()}).mousedown(function(){t.autoSaveFunction()}).on(e.support.noCloneEvent?"input.wysiwyg":"paste.wysiwyg",function(){t.autoSaveFunction()}),t.options.autoGrow)t.ui.initialHeight=t.options.initialMinHeight!==null?t.options.initialMinHeight:e(t.editorDoc).height(),e(t.editorDoc.body).css("border","1px solid white"),i=function(){t.ui.grow()},e(t.editorDoc).keyup(i),e(t.editorDoc).on("editorRefresh.wysiwyg",i),t.ui.grow();else{var a=e(t.editor).parents(".dynamicText").parent(),l=e(t.editor).height()-(a.find(".toolbar").outerHeight(!0)-21);e(t.editor).css("min-height",l+"px").height(l)}if(c=function(n){if(s)try{r=t.editorDoc.createStyleSheet(n);e(r).attr({media:"all"})}catch(i){}else r=e("<link/>").attr({href:n,media:"all",rel:"stylesheet"}),e(t.editorDoc).find("head").append(r)},t.options.css)if(String===t.options.css.constructor)c(t.options.css);else if(Object.prototype.toString.call(t.options.css)==="[object Array]")for(h=0;h<t.options.css.length;h++)c(t.options.css[h]);else t.timers.initFrame_Css=window.setTimeout(function(){e(t.editorDoc.body).css(t.options.css)},0);if(t.initialContent.length===0&&("function"==typeof t.options.initialContent?t.setContent(t.options.initialContent()):t.setContent(t.options.initialContent)),t.options.maxLength>0&&e(t.editorDoc).keydown(function(n){e(t.editorDoc).text().length>=t.options.maxLength&&e.inArray(n.which,t.validKeyCodes)===-1&&n.preventDefault()}),e.each(t.options.events,function(n,r){e(t.editorDoc).on(n+".wysiwyg",function(e){r.apply(t.editorDoc,[e,t])})}),s?e(t.editorDoc).on("beforedeactivate.wysiwyg",function(){t.savedRange=t.getInternalRange()}):e(t.editorDoc).on("blur.wysiwyg",function(){t.savedRange=t.getInternalRange()}),e(t.editorDoc.body).addClass("wysiwyg"),t.options.events&&t.options.events.save&&(u=t.options.events.save,e(t.editorDoc).on("keyup.wysiwyg",u),e(t.editorDoc).on("change.wysiwyg",u),e.support.noCloneEvent?e(t.editorDoc).on("input.wysiwyg",u):(e(t.editorDoc).on("paste.wysiwyg",u),e(t.editorDoc).on("cut.wysiwyg",u))),t.options.xhtml5&&t.options.unicode){p={ne:8800,le:8804,para:182,xi:958,darr:8595,nu:957,oacute:243,Uacute:218,omega:969,prime:8242,pound:163,igrave:236,thorn:254,forall:8704,emsp:8195,lowast:8727,brvbar:166,alefsym:8501,nbsp:160,delta:948,clubs:9827,lArr:8656,Omega:937,Auml:196,cedil:184,and:8743,plusmn:177,ge:8805,raquo:187,uml:168,equiv:8801,laquo:171,rdquo:8221,Epsilon:917,divide:247,fnof:402,chi:967,Dagger:8225,iacute:237,rceil:8969,sigma:963,Oslash:216,acute:180,frac34:190,lrm:8206,upsih:978,Scaron:352,part:8706,exist:8707,nabla:8711,image:8465,prop:8733,zwj:8205,omicron:959,aacute:225,Yuml:376,Yacute:221,weierp:8472,rsquo:8217,otimes:8855,kappa:954,thetasym:977,harr:8596,Ouml:214,Iota:921,ograve:242,sdot:8901,copy:169,oplus:8853,acirc:226,sup:8835,zeta:950,Iacute:205,Oacute:211,crarr:8629,Nu:925,bdquo:8222,lsquo:8216,apos:39,Beta:914,eacute:233,egrave:232,lceil:8968,Kappa:922,piv:982,Ccedil:199,ldquo:8220,Xi:926,cent:162,uarr:8593,hellip:8230,Aacute:193,ensp:8194,sect:167,Ugrave:217,aelig:230,ordf:170,curren:164,sbquo:8218,macr:175,Phi:934,Eta:919,rho:961,Omicron:927,sup2:178,euro:8364,aring:229,Theta:920,mdash:8212,uuml:252,otilde:245,eta:951,uacute:250,rArr:8658,nsub:8836,agrave:224,notin:8713,ndash:8211,Psi:936,Ocirc:212,sube:8838,szlig:223,micro:181,not:172,sup1:185,middot:183,iota:953,ecirc:234,lsaquo:8249,thinsp:8201,sum:8721,ntilde:241,scaron:353,cap:8745,atilde:227,lang:10216,__replacement:65533,isin:8712,gamma:947,Euml:203,ang:8736,upsilon:965,Ntilde:209,hearts:9829,Alpha:913,Tau:932,spades:9824,dagger:8224,THORN:222,int:8747,lambda:955,Eacute:201,Uuml:220,infin:8734,rlm:8207,Aring:197,ugrave:249,Egrave:200,Acirc:194,rsaquo:8250,ETH:208,oslash:248,alpha:945,Ograve:210,Prime:8243,mu:956,ni:8715,real:8476,bull:8226,beta:946,icirc:238,eth:240,prod:8719,larr:8592,ordm:186,perp:8869,Gamma:915,reg:174,ucirc:251,Pi:928,psi:968,tilde:732,asymp:8776,zwnj:8204,Agrave:192,deg:176,AElig:198,times:215,Delta:916,sim:8764,Otilde:213,Mu:924,uArr:8657,circ:710,theta:952,Rho:929,sup3:179,diams:9830,tau:964,Chi:935,frac14:188,oelig:339,shy:173,or:8744,dArr:8659,phi:966,iuml:239,Lambda:923,rfloor:8971,iexcl:161,cong:8773,ccedil:231,Icirc:206,frac12:189,loz:9674,rarr:8594,cup:8746,radic:8730,frasl:8260,euml:235,OElig:338,hArr:8660,Atilde:195,Upsilon:933,there4:8756,ouml:246,oline:8254,Ecirc:202,yacute:253,auml:228,permil:8240,sigmaf:962,iquest:191,empty:8709,pi:960,Ucirc:219,supe:8839,Igrave:204,yen:165,rang:10217,trade:8482,lfloor:8970,minus:8722,Zeta:918,sub:8834,epsilon:949,yuml:255,Sigma:931,Iuml:207,ocirc:244};t.events.on("getContent",function(e){return e.replace(/&(?:amp;)?(?!amp|lt|gt|quot)([a-z][a-z0-9]*);/gi,function(e,t){p[t]||(t=t.toLowerCase(),p[t]||(t="__replacement"));var n=p[t];return String.fromCharCode(n)})})}e(t.original).trigger("ready.jwysiwyg",[t.editorDoc,t])};this.innerDocument=function(){var e=this.editor.get(0);if(e.nodeName.toLowerCase()==="iframe"){if(e.contentDocument)return e.contentDocument;if(e.contentWindow)return e.contentWindow.document;if(this.isDestroyed)return null;n.error("Unexpected error in innerDocument")}return e};this.insertHtml=function(t){var n,r;return!t||t.length===0?this:(s?(this.ui.focus(),this.editorDoc.execCommand("insertImage",!1,"http://images.com/image.jpg"),n=this.getElementByAttributeValue("img","src","http://images.com/image.jpg"),n&&e(n).replaceWith(t)):u?1===e(t).length?(r=this.getInternalRange(),r.deleteContents(),r.insertNode(e(t).get(0))):this.editorDoc.execCommand("insertHTML",!1,t):this.editorDoc.execCommand("insertHTML",!1,t)||(this.editor.focus(),this.editorDoc.execCommand("insertHTML",!1,t)),this.saveContent(),this)};this.parseControls=function(){var t=this;return e.each(this.options.controls,function(n,r){e.each(r,function(r){if(-1===e.inArray(r,t.availableControlProperties))throw n+'["'+r+'"]: property "'+r+'" not exists in Wysiwyg.availableControlProperties';})}),this.options.parseControls?this.options.parseControls.call(this):this.options.controls};this.removeFormat=function(){return s&&this.ui.focus(),this.options.removeHeadings&&this.editorDoc.execCommand("formatBlock",!1,"<p>"),this.editorDoc.execCommand("removeFormat",!1,null),this.editorDoc.execCommand("unlink",!1,null),e.wysiwyg.rmFormat&&e.wysiwyg.rmFormat.enabled&&("object"==typeof this.options.plugins.rmFormat.rmMsWordMarkup?e.wysiwyg.rmFormat.run(this,{rules:{msWordMarkup:this.options.plugins.rmFormat.rmMsWordMarkup}}):e.wysiwyg.rmFormat.run(this,{rules:{msWordMarkup:{enabled:!0}}})),this};this.ui.removeHoverClass=function(){e(this).removeClass("wysiwyg-button-hover")};this.resetFunction=function(){this.setContent(this.initialContent)};this.saveContent=function(){if(!this.viewHTML){if(this.original){var t,n;t=this.getContent();this.options.rmUnwantedBr&&(t=t.replace(/<br\/?>$/,""));this.options.replaceDivWithP&&(n=e("<div/>").addClass("temp").append(t),n.children("div").each(function(){var t=e(this),n=t.find("p"),r;if(0===n.length){if(n=e("<p><\/p>"),this.attributes.length>0)for(r=0;r<this.attributes.length;r+=1)n.attr(this.attributes[r].name,t.attr(this.attributes[r].name));n.append(t.html());t.replaceWith(n)}}),t=n.html());e(this.original).val(t).change();this.options.events&&this.options.events.save&&this.options.events.save.call(this)}return this}};this.setContent=function(e){return this.editorDoc.body.innerHTML=e,this.saveContent(),this};this.triggerControl=function(e,t){var r=t.command||e,i=t.arguments||[];if(t.exec)t.exec.apply(this);else{this.ui.focus();this.ui.withoutCss();try{this.editorDoc.execCommand(r,!1,i)}catch(s){n.error(s)}}this.options.autoSave&&this.autoSaveFunction()};this.triggerControlCallback=function(t){e(window).trigger("trigger-"+t+".wysiwyg",[this])};this.ui.withoutCss=function(){var e=this.self;if(u)try{e.editorDoc.execCommand("styleWithCSS",!1,!1)}catch(t){try{e.editorDoc.execCommand("useCSS",!1,!0)}catch(n){}}return e};this.wrapInitialContent=function(){return this.initialContent}}e.extend(t,{cms:{initialize:function(n,r){var i=e(n);r=e.extend({autoGrow:!1,css:"style/style.css",imageuploadurl:"res/imageupload.php"},r);i.css("cursor","pointer").one("click",function(i){e(i.target).is("a")||t.cms.edit(n,r)}).hover(function(){i.css({border:"1px dashed gray",overflow:t.utils.imHasScrollBar(i)?"auto":"hidden"}).width(i.width()-2).height(i.height()-2)},function(){i.css({border:"none",overflow:"auto"}).width("auto").height(r.autoGrow?"auto":i.height()+2)})},edit:function(t,n){var r=e(t),i=r.find("form"),s=r.find(".dynamicText"),o=r.find(".staticText"),u=s.find("textarea");r.css({border:"none",cursor:"auto",overflow:""}).off("mouseenter mouseleave");n.autoGrow&&(r.height("auto"),u.height(Math.max(r.height(),200)));o.hide(0);s.show(0);n.autoGrow=!1;u.html(u.html().replace(/imCssLink/g,""));i.one("submit",function(t){t.preventDefault();var n=u.wysiwyg("getContent"),r=e("<div />").html(n);r.find("a").addClass("imCssLink");u.after('<textarea name="'+u.attr("name")+'" style="display:none;">'+r.html()+"<\/textarea>");u.attr("name","donotuse");i.submit()});n.autoGrow||r.on("ready.jwysiwyg",function(){var e=r.find(".wysiwyg").find(".toolbar").outerHeight();e+=r.find(".wysiwyg-buttons").outerHeight();e+=r.find(".wysiwyg").css("margin-bottom").replace(/px/g,"")*1;e+=2;r.find(".wysiwyg").find("iframe").height(r.height()-e);r.css("width","100%")});u.wysiwyg(n)}}});var n=window.console?window.console:{log:e.noop,error:function(t){e.error(t)}},r="prop"in e.fn&&"removeProp"in e.fn,i=t.l10n.get,s=/MSIE/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/MSHTML/i.test(navigator.userAgent),o=/opera/i.test(navigator.userAgent),u=/firefox/i.test(navigator.userAgent),a=/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent);e.wysiwyg={messages:{noObject:"Something goes wrong, check object"},addControl:function(t,n,r){return t.each(function(){var t=e(this).data("wysiwyg"),i={},s;if(!t)return this;i[n]=e.extend(!0,{visible:!0,custom:!0},r);e.extend(!0,t.options.controls,i);s=e(t.options.toolbarHtml);t.ui.toolbar.replaceWith(s);t.ui.toolbar=s;t.ui.appendControls()})},clear:function(t){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.setContent("")})},console:n,destroy:function(t){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.destroy()})},document:function(t){var n=t.data("wysiwyg");return n?e(n.editorDoc):undefined},focus:function(e){var t=e.data("wysiwyg");return t?(t.ui.focus(),e):undefined},getContent:function(e){var t=e.data("wysiwyg");return t?t.getContent():undefined},getSelection:function(e){var t=e.data("wysiwyg");return t?t.getRangeText():undefined},init:function(t,n){return t.each(function(){var t=e.extend(!0,{},n),r;"textarea"!==this.nodeName.toLowerCase()||e(this).data("wysiwyg")||(r=new f,r.init(this,t),e.data(this,"wysiwyg",r),e(r.editorDoc).trigger("afterInit.wysiwyg"))})},insertHtml:function(t,n){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.insertHtml(n)})},plugin:{listeners:{},bind:function(t){var n=this;e.each(this.listeners,function(r,i){for(var o,s=0;s<i.length;s+=1)o=n.parseName(i[s]),e(t.editorDoc).on(r+".wysiwyg",{plugin:o},function(n){e.wysiwyg[n.data.plugin.name][n.data.plugin.method].apply(e.wysiwyg[n.data.plugin.name],[t])})})},exists:function(t){var n;return"string"!=typeof t?!1:(n=this.parseName(t),!e.wysiwyg[n.name]||!e.wysiwyg[n.name][n.method]?!1:!0)},listen:function(t,n){var r;return r=this.parseName(n),!e.wysiwyg[r.name]||!e.wysiwyg[r.name][r.method]?!1:(this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),!0)},parseName:function(e){var t;return"string"!=typeof e?!1:(t=e.split("."),2>t.length?!1:{name:t[0],method:t[1]})},register:function(t){return t.name||n.error("Plugin name missing"),e.each(e.wysiwyg,function(e){e===t.name&&n.error("Plugin with name '"+t.name+"' was already registered")}),e.wysiwyg[t.name]=t,!0}},removeFormat:function(t){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.removeFormat()})},save:function(t){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.saveContent()})},selectAll:function(e){var t=e.data("wysiwyg"),n,r,i;if(!t)return this;n=t.editorDoc.body;window.getSelection?(i=t.getInternalSelection(),i.selectAllChildren(n)):(r=n.createTextRange(),r.moveToElementText(n),r.select())},setContent:function(t,n){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.setContent(n)})},triggerControl:function(t,r){return t.each(function(){var t=e(this).data("wysiwyg");if(!t)return this;t.controls[r]||n.error("Control '"+r+"' not exists");t.triggerControl.apply(t,[r,t.controls[r]])})},support:{prop:r},utils:{extraSafeEntities:[["<",">","'",'"'," "],[32]],encodeEntities:function(t){var n=this,r,i=[];return this.extraSafeEntities[1].length===0&&e.each(this.extraSafeEntities[0],function(e,t){n.extraSafeEntities[1].push(t.charCodeAt(0))}),r=t.split(""),e.each(r,function(t){var s=r[t].charCodeAt(0);e.inArray(s,n.extraSafeEntities[1])&&(s<65||s>127||s>90&&s<97)?i.push("&#"+s+";"):i.push(r[t])}),i.join("")}}};e.wysiwyg.dialog=function(n,r){var i=n&&n.options&&n.options.dialog?n.options.dialog:r.theme?r.theme:"default",s=new e.wysiwyg.dialog.createDialog(i),o=this,u=e(o);return this.options={modal:!0,draggable:!0,title:"Title",content:"Content",width:"auto",height:"auto",zIndex:t.settings.zIndex.popup,open:!1,close:!1},this.isOpen=!1,e.extend(this.options,r),this.object=s,this.open=function(){this.isOpen=!0;s.init.apply(o,[]);var e=s.show.apply(o,[]);u.trigger("afterOpen",[e])},this.show=function(){this.isOpen=!0;u.trigger("beforeShow");var e=s.show.apply(o,[]);u.trigger("afterShow")},this.hide=function(){this.isOpen=!1;u.trigger("beforeHide");var e=s.hide.apply(o,[]);u.trigger("afterHide",[e])},this.close=function(){this.isOpen=!1;var e=s.hide.apply(o,[]);u.trigger("beforeClose",[e]);s.destroy.apply(o,[]);u.trigger("afterClose",[e]);n.ui.focus()},this.options.open&&u.on("afterOpen",this.options.open),this.options.close&&u.on("afterClose",this.options.close),this};e.extend(!0,e.wysiwyg.dialog,{_themes:{},_theme:"",register:function(t,n){e.wysiwyg.dialog._themes[t]=n},deregister:function(t){delete e.wysiwyg.dialog._themes[t]},createDialog:function(t){return new e.wysiwyg.dialog._themes[t]},getDimensions:function(){var t=document.body.scrollWidth,n=document.body.scrollHeight;return o&&(n=Math.max(e(document).height(),e(window).height(),document.documentElement.clientHeight)),[t,n]}});e(function(){e.ui&&e.wysiwyg.dialog.register("jqueryui",function(){var t=this;this._$dialog=null;this.init=function(){var n=this,r=this.options.content,i,s;return typeof r=="object"&&(typeof r.html=="function"?r=r.html():typeof r.toString=="function"&&(r=r.toString())),t._$dialog=e("<div><\/div>").attr("title",this.options.title).html(r),i=this.options.height=="auto"?300:this.options.height,s=this.options.width=="auto"?450:this.options.width,t._$dialog.dialog({modal:this.options.modal,draggable:this.options.draggable,height:i,width:s}),t._$dialog};this.show=function(){return t._$dialog.dialog("open"),t._$dialog};this.hide=function(){return t._$dialog.dialog("close"),t._$dialog};this.destroy=function(){return t._$dialog.dialog("destroy"),t._$dialog}});e.wysiwyg.dialog.register("default",function(){var t=this;this._$dialog=null;this.init=function(){var n=this,r=this.options.content,i,s,o,u,a;return typeof r=="object"&&(typeof r.html=="function"?r=r.html():typeof r.toString=="function"&&(r=r.toString())),t._$dialog=e('<div class="wysiwyg-dialog"><\/div>').css({"z-index":this.options.zIndex}),i=e('<div class="wysiwyg-dialog-topbar"><div class="wysiwyg-dialog-close-wrapper"><\/div><div class="wysiwyg-dialog-title">'+this.options.title+"<\/div><\/div>"),s=e('<a href="#" class="wysiwyg-dialog-close-button">X<\/a>'),s.click(function(){n.close()}),i.find(".wysiwyg-dialog-close-wrapper").prepend(s),o=e('<div class="wysiwyg-dialog-content">'+r+"<\/div>"),t._$dialog.append(i).append(o),u=this.options.height=="auto"?300:this.options.height,a=this.options.width=="auto"?450:this.options.width,t._$dialog.hide().css({width:a,height:u,left:(e(window).width()-a)/2,top:(e(window).height()-u)/3}),e("body").append(t._$dialog),t._$dialog};this.show=function(){var n,r,i;if(this.options.modal&&(n=e.wysiwyg.dialog.getDimensions(),r=e('<div class="wysiwyg-dialog-modal-div"><\/div>').css({width:n[0],height:n[1]}),t._$dialog.wrap(r)),this.options.draggable){i=!1;t._$dialog.find("div.wysiwyg-dialog-topbar").on("mousedown",function(t){t.preventDefault();e(this).css({cursor:"move"});var n=e(this),r=e(this).parents(".wysiwyg-dialog"),s=t.pageX-parseInt(r.css("left"),10),o=t.pageY-parseInt(r.css("top"),10);i=!0;e(this).css({cursor:"move"});e(document).on("mousemove",function(e){e.preventDefault();i&&r.css({top:e.pageY-o,left:e.pageX-s})}).on("mouseup",function(t){t.preventDefault();i=!1;n.css({cursor:"auto"});e(document).off("mousemove").off("mouseup")})})}return t._$dialog.show(),t._$dialog};this.hide=function(){return t._$dialog.hide(),t._$dialog};this.destroy=function(){return this.options.modal&&t._$dialog.unwrap(),this.options.draggable&&t._$dialog.find("div.wysiwyg-dialog-topbar").off("mousedown"),t._$dialog.remove(),t._$dialog}})});e.fn.wysiwyg=function(t){var r=arguments,i;if("undefined"!=typeof e.wysiwyg[t])return r=Array.prototype.concat.call([r[0]],[this],Array.prototype.slice.call(r,1)),e.wysiwyg[t].apply(e.wysiwyg,Array.prototype.slice.call(r,1));if("object"==typeof t||!t)return Array.prototype.unshift.call(r,this),e.wysiwyg.init.apply(e.wysiwyg,r);if(e.wysiwyg.plugin.exists(t))return i=e.wysiwyg.plugin.parseName(t),r=Array.prototype.concat.call([r[0]],[this],Array.prototype.slice.call(r,1)),e.wysiwyg[i.name][i.method].apply(e.wysiwyg[i.name],Array.prototype.slice.call(r,1));n.error("Method '"+t+"' does not exist on jQuery.wysiwyg.\nTry to include some extra controls or plugins")};e.fn.getWysiwyg=function(){return this.data("wysiwyg")}}(_jq,x5engine),function(e){"use strict";if(undefined===e.wysiwyg)throw"wysiwyg.link.js depends on $.wysiwyg";e.wysiwyg.controls||(e.wysiwyg.controls={});var t=x5engine.l10n.get,n=/MSIE/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/MSHTML/i.test(navigator.userAgent),r=/opera/i.test(navigator.userAgent),i=/firefox/i.test(navigator.userAgent),s=/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent);e.wysiwyg.controls.link={init:function(r){var i=this,u,a,f,l=x5engine.utils.trim,c,h,p,d,v,m,g,y;h={legend:l(t("wysiwyg_add_link","Insert Link")," :"),url:"URL",title:l(t("wysiwyg_image_title","Title")," :"),target:"Target",submit:l(t("wysiwyg_add_link","Insert Link")," :"),reset:l(t("dynamicobj_cancel","Cancel")," :")};c='<form class="wysiwyg"><fieldset><div class="form-row"><label for="linkhref">{url}:<\/label><div class="form-row-value"><input type="text" name="linkhref" value=""/><\/div><\/div><div class="form-row"><label for="linkhref">{title}:<\/label><div class="form-row-value"><input type="text" name="linktitle" value=""/><\/div><\/div><div class="form-row"><label for="linkhref">{target}:<\/label><div class="form-row-value"><input type="text" name="linktarget" value=""/><\/div><\/div><div class="form-row" style="text-align: center;"><input type="submit" class="button" value="{submit}"/> <input type="reset" value="{reset}"/><\/fieldset><\/form><\/div>';for(p in h)e.wysiwyg.i18n&&(d=e.wysiwyg.i18n.t(h[p],"dialogs.link"),d===h[p]&&(d=e.wysiwyg.i18n.t(h[p],"dialogs")),h[p]=d),v=new RegExp("{"+p+"}","g"),c=c.replace(v,h[p]);a={self:r.dom.getElement("a"),href:"http://",title:"",target:""};a.self&&(a.href=a.self.href?a.self.href:a.href,a.title=a.self.title?a.self.title:"",a.target=a.self.target?a.self.target:"");e.wysiwyg.dialog?(y=new e.wysiwyg.dialog(r,{title:h.legend,content:c}),n&&r.saveSelection(),e(y).on("afterOpen",function(){var s=e("form.wysiwyg");s.find("input[name=linkhref]").val(a.href);s.find("input[name=linktitle]").val(a.title);s.find("input[name=linktarget]").val(a.target);s.find("[type=submit]").click(function(t){n&&r.restoreSelection();t.preventDefault();var i=e('form.wysiwyg input[name="linkhref"]').val(),s=e('form.wysiwyg input[name="linktitle"]').val(),o=e('form.wysiwyg input[name="linktarget"]').val(),u,l;return r.options.controlLink.forceRelativeUrls&&(u=window.location.protocol+"//"+window.location.hostname,0===i.indexOf(u)&&(i=i.substr(u.length))),a.self?"string"==typeof i&&(i.length>0?e(a.self).attr("href",i).attr("title",s).attr("target",o):e(a.self).replaceWith(a.self.innerHTML)):(n&&r.ui.returnRange(),f=r.getRangeText(),l=r.dom.getElement("img"),f&&f.length>0||l?(n&&r.ui.focus(),"string"==typeof i&&(i.length>0?r.editorDoc.execCommand("createLink",!1,i):r.editorDoc.execCommand("unlink",!1,null)),a.self=r.dom.getElement("a"),e(a.self).attr("href",i).attr("title",s),e(a.self).attr("target",o)):r.options.messages.nonSelection&&window.alert(r.options.messages.nonSelection)),r.saveContent(),y.close(),!1});e("form.wysiwyg").find("[type=reset]").click(function(){y.close()})}),y.open()):(a.self?(u=window.prompt("URL",a.href),r.options.controlLink.forceRelativeUrls&&(m=window.location.protocol+"//"+window.location.hostname,0===u.indexOf(m)&&(u=u.substr(m.length))),"string"==typeof u&&(u.length>0?e(a.self).attr("href",u):e(a.self).replaceWith(a.self.innerHTML))):(f=r.getRangeText(),g=r.dom.getElement("img"),f&&f.length>0||g?n?(r.ui.focus(),r.editorDoc.execCommand("createLink",!0,null)):(u=window.prompt(h.url,a.href),r.options.controlLink.forceRelativeUrls&&(m=window.location.protocol+"//"+window.location.hostname,0===u.indexOf(m)&&(u=u.substr(m.length))),"string"==typeof u&&(u.length>0?r.editorDoc.execCommand("createLink",!1,u):r.editorDoc.execCommand("unlink",!1,null))):r.options.messages.nonSelection&&window.alert(r.options.messages.nonSelection)),r.saveContent());e(r.editorDoc).trigger("editorRefresh.wysiwyg")}};e.wysiwyg.createLink=function(t,r,i){return t.each(function(){var t=e(this).data("wysiwyg"),s,o,u,a;return t?!r||r.length===0?this:(s=t.getRangeText(),o=t.getInternalRange(),u=!1,o&&o.extractContents&&(a=o.cloneContents(),a!==null&&a.childNodes&&a.childNodes.length>0&&(u=!0)),s&&s.length>0||u?(n&&t.ui.focus(),t.editorDoc.execCommand("unlink",!1,null),t.editorDoc.execCommand("createLink",!1,r)):i?t.insertHtml('<a href="'+r+'">'+i+"<\/a>"):t.options.messages.nonSelection&&window.alert(t.options.messages.nonSelection),this):this})}}(_jq),function(e,t){"use strict";if(undefined===e.wysiwyg)throw"wysiwyg.image.js depends on $.wysiwyg";e.wysiwyg.controls||(e.wysiwyg.controls={});var n=t.l10n.get,r=/MSIE/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/MSHTML/i.test(navigator.userAgent),i=/opera/i.test(navigator.userAgent),s=/firefox/i.test(navigator.userAgent),o=/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent);e.wysiwyg.controls.image={groupIndex:6,visible:!0,exec:function(){e.wysiwyg.controls.image.init(this)},tags:["img"],tooltip:"Insert image",init:function(i){var s=this,u,f,l,c,h,p,d=t.utils.trim,v={alt:"",self:i.dom?i.dom.getElement("img"):null,src:"http://",title:""};c={legend:d(n("wysiwyg_image","Insert Image")," :"),preview:d(n("wysiwyg_preview","Preview")," :"),url:d(n("wysiwyg_image_url","URL")," :"),local_file:d(n("wysiwyg_local_file","Local file")," :"),title:d(n("wysiwyg_image_title","Title")," :"),description:d(n("wysiwyg_image_description","Description")," :"),width:d(n("wysiwyg_image_width","Width")," :"),height:d(n("wysiwyg_image_height","Height")," :"),original:d(n("wysiwyg_image_original","Original W x H")," :"),float:d(n("wysiwyg_image_float","Float")," :"),floatNone:d(n("wysiwyg_image_float_none","None")," :"),floatLeft:d(n("wysiwyg_image_float_left","Left")," :"),floatRight:d(n("wysiwyg_image_float_right","Right")," :"),submit:d(n("form_submit")," :"),reset:d(n("form_reset")," :"),fileManagerIcon:"Select file from server"};f='<form class="wysiwyg" id="wysiwyg-addImage"><fieldset><div class="form-row"><label for="file_type_local"><input type="radio" name="file_type" id="file_type_local" value="local" checked/>{local_file}:<\/label><div class="form-row-value"><input type="file" name="file" id="file"/><\/div><\/div><div class="form-row"><label for="file_type_remote"><input type="radio" name="file_type" id="file_type_remote" value="remote" />{url}:<\/label><div class="form-row-value"><input type="text" name="src" value="" disabled/><\/div><\/div><div class="form-row"><label for="name">{title}:<\/label><div class="form-row-value"><input type="text" name="imgtitle" value=""/><\/div><\/div><div class="form-row"><label for="description">{description}:<\/label><div class="form-row-value"><input type="text" name="description" value=""/><\/div><\/div><div class="form-row"><label for="width">{width} x {height}:<\/label><div class="form-row-value"><input type="text" name="width" value="" class="width-small"/> x <input type="text" name="height" value="" class="width-small"/><\/div><\/div><div class="form-row"><label for="name">{float}:<\/label><div class="form-row-value"><select name="float"><option value="">{floatNone}<\/option><option value="left">{floatLeft}<\/option><option value="right">{floatRight}<\/option><\/select><\/div><\/div><div class="form-row form-row-last"><label for="name"><\/label><div class="form-row-value"><input type="submit" class="button" value="{submit}"/> <input type="reset" value="{reset}"/><\/div><\/div><\/fieldset><\/form>';for(h in c)e.wysiwyg.i18n&&(p=e.wysiwyg.i18n.t(c[h],"dialogs.image"),p===c[h]&&(p=e.wysiwyg.i18n.t(c[h],"dialogs")),c[h]=p),l=new RegExp("{"+h+"}","g"),f=f.replace(l,c[h]);v.self&&(v.src=v.self.src?v.self.src:"",v.alt=v.self.alt?v.self.alt:"",v.title=v.self.title?v.self.title:"",v.width=v.self.width?v.self.width:"",v.height=v.self.height?v.self.height:"",v.styleFloat=e(v.self).css("float"));u=new e.wysiwyg.dialog(i,{title:c.legend,content:f,width:650});r&&i.saveSelection();e(u).on("afterOpen",function(t,n){n.find("form#wysiwyg-addImage").submit(function(e){return r&&i.restoreSelection(),e.preventDefault(),s.processInsert(n.container,i,v),u.close(),!1});e.wysiwyg.fileManager&&e("div.wysiwyg-fileManager").on("click",function(){e.wysiwyg.fileManager.init(function(e){n.find("input[name=src]").val(e);n.find("input[name=src]").trigger("change")})});e("input:reset",n).click(function(){return u.close(),!1});e("fieldset",n).click(function(e){e.stopPropagation()});s.makeForm(n,v)});u.open();e(i.editorDoc).trigger("editorRefresh.wysiwyg")},processInsert:function(n,r,i){var s,o=e('input[name="src"]',n).val(),u=e('input[name="imgtitle"]',n).val(),a=e('input[name="description"]',n).val(),f=e('input[name="width"]',n).val(),l=e('input[name="height"]',n).val(),c=e('select[name="float"]',n).val(),h=e('input[name="file"]',n),p=[],v="",m,y=function(t){i.self?(e(i.self).attr("src",t).attr("title",u).attr("alt",a).css("float",c),f.toString().match(/^[0-9]+(px|%)?$/)?e(i.self).css("width",f):e(i.self).css("width",""),l.toString().match(/^[0-9]+(px|%)?$/)?e(i.self).css("height",l):e(i.self).css("height",""),r.saveContent()):(m=f.toString().match(/^[0-9]+(px|%)?$/),m&&(m[1]?p.push("width: "+f+";"):p.push("width: "+f+"px;")),m=l.toString().match(/^[0-9]+(px|%)?$/),m&&(m[1]?p.push("height: "+l+";"):p.push("height: "+l+"px;")),c.length>0&&p.push("float: "+c+";"),p.length>0&&(v=' style="'+p.join(" ")+'"'),s="<img src='"+t+"' title='"+u+"' alt='"+a+"'"+v+"/>",r.insertHtml(s))},b;if(e("#file_type_local",n).prop("checked")){if(!r.options.imageuploadurl){alert("Cannot upload the image: upload url not found.");return}if(window.FileReader)b=new FileReader,b.onload=function(){y(b.result)},b.readAsDataURL(h.get(0).files[0]);else if(t.settings.islocal)alert(t.l10n.get("blog_offline_message"));else{var w=h.val(),E=e('<iframe id="upload_iframe" />'),S=!1;if(w=w.substr(w.lastIndexOf(".")+1),w=="jpg"&&(w="jpeg"),w!="jpeg"&&w!="png"&&w!="gif"&&w!="bmp"){alert("Cannot upload the image: unsupported format.");return}w="image/"+w;E.load(function(){var t,n;S?(n=E.contents().find("body").text(),n.length&&y("data:"+w+";base64,"+n),E.remove()):(t=e('<form enctype="multipart/form-data" method="post" action="'+r.options.imageuploadurl+'" />'),E.contents().find("body").append(t),t.append(h).submit(function(){S=!0}).submit())});e("body").append(E);E.attr("src","#")}}else e("#file_type_remote",n).prop("checked")&&y(o)},makeForm:function(t,n){return t.find("input[name=src]").val(n.src),t.find("input[name=imgtitle]").val(n.title),t.find("input[name=description]").val(n.alt),t.find('input[name="width"]').val(n.width),t.find('input[name="height"]').val(n.height),t.find('select[name="float"]').val(n.styleFloat),t.find("img").attr("src",n.src),t.find("input[type=radio]").click(function(){var n=e(this).attr("value");n=="local"?(t.find('[name="file"]').removeAttr("disabled"),t.find('[name="src"]').attr("disabled","true")):(t.find('[name="src"]').removeAttr("disabled").focus(),t.find('[name="file"]').attr("disabled","true"))}),t}};e.wysiwyg.insertImage=function(t,n,i){return t.each(function(){var t=e(this).data("wysiwyg"),s,o;if(!t||!n||n.length===0)return this;if(r&&t.ui.focus(),i){if(t.editorDoc.execCommand("insertImage",!1,"http://emptyvalue"),s=t.getElementByAttributeValue("img","src","http://emptyvalue"),s){s.src=n;for(o in i)i.hasOwnProperty(o)&&s.setAttribute(o,i[o])}}else t.editorDoc.execCommand("insertImage",!1,n);return t.saveContent(),e(t.editorDoc).trigger("editorRefresh.wysiwyg"),this})}}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{contentSlider:function(){function u(e){var t=e.getElementsByClassName(n.classes.slide),u=e.getElementsByClassName(n.classes.ctrlContainer)[0],a=u?u.getElementsByClassName(n.classes.radioBar)[0]:!1,f=u?u.getElementsByClassName(n.classes.radioBarNext)[0]:!1,l=u?u.getElementsByClassName(n.classes.radioBarPrev)[0]:!1,c=(n.radio.visibleNumber-1)/2,h=t.length-c-1,p=!!e.getElementsByClassName(n.classes.noElementEffect).length,d=function(e,r){var i=r-e,s=i>0,o=Math.abs(i)>t.length/2;return s^o?n.classes.next:n.classes.prev},v=function(e,r,i){o(t[e.last],[n.classes.slideOut,n.classes.slideOut+n.classes.prev,n.classes.slideOut+n.classes.next]);o(t[e.current],[n.classes.defaultSlide,n.classes.slideIn,n.classes.slideIn+n.classes.prev,n.classes.slideIn+n.classes.next]);e.last=e.current;e.current=r;i||(i=d(e.last,e.current));s(t[e.last],[n.classes.slideOut,n.classes.slideOut+i]);s(t[e.current],[n.classes.slideIn,n.classes.slideIn+i])},m=function(t){return e.id+n.classes.radioIdSeparator+t},g=function(e){document.getElementById(m(e.current)).checked=!0;y(e,e.current)},y=function(e,r){if(n.config.radioSliding&&n.config.radioSliding.enabled&&t.length>n.radio.visibleNumber){var i=w(r);i!==e.radioBarIndex&&(e.radioBarIndex=i,b(e))}},b=function(e){a&&(e.vertical?(a.style.top=E(e.radioBarIndex),a.style.left=0):(a.style.top=0,a.style.left=E(e.radioBarIndex)));S(f,e.radioBarIndex<h);S(l,e.radioBarIndex>c)},w=function(e){return Math.max(c,Math.min(h,e))},E=function(e){var t=(c-e)*n.radio.size;return t===0?t:t+"px"},S=function(e,t){t?T(e):x(e)},x=function(e){e&&e.classList.remove(n.classes.ctrlVisible)},T=function(e){e&&e.classList.add(n.classes.ctrlVisible)},N=function(){return n.config.ctrlHidingDuringAnimations&&n.config.ctrlHidingDuringAnimations.enabled?n.config.ctrlHidingDuringAnimations.animations&&n.config.ctrlHidingDuringAnimations.animations.length?C(n.config.ctrlHidingDuringAnimations.animations):!0:!1},C=function(t){for(var i,n=!1,r=0;!n&&r<t.length;r++)i=e.getElementsByClassName(t[r]),n=i&&i.length;return!!n},k=!1,L=0,A=null,O=function(e){M();L>0&&(A=setTimeout(e,L));T(u);k=!1},M=function(){k||(A&&(clearTimeout(A),A=null),N()&&x(u),k=!0)},_=function(){O(H.next)},D=function(e){if(p)return e;var t=e.getElementsByClassName(n.classes.animated);return t.length>0?t[t.length-1]:e},P=function(e){D(t[e.last]).removeEventListener("animationend",_);D(t[e.current]).addEventListener("animationend",_)},H;return r(e,function(e){e>0?H.prev():H.next()}),H={current:0,last:0,vertical:!1,radioBarIndex:c,goTo:function(e,n){var r=i(e,t.length);r!=H.current&&(M(),v(H,r,n),P(H),g(H))},next:function(){return H.goTo(H.current+1,n.classes.next)},prev:function(){return H.goTo(H.current-1,n.classes.prev)},autoplay:function(e){L=e;O(H.next)},radioBarNext:function(){y(H,H.radioBarIndex+n.radio.slideBarGap)},radioBarPrev:function(){y(H,H.radioBarIndex-n.radio.slideBarGap)}}}var n={swipe:{requiredDistance:150,maxTime:300}},r=function(e,t){var r,i;e.addEventListener("touchstart",function(e){r=e.changedTouches[0].pageX;i=(new Date).getTime()},!1);e.addEventListener("touchend",function(e){var s=e.changedTouches[0].pageX-r;(new Date).getTime()-i<=n.swipe.maxTime&&Math.abs(s)>=n.swipe.requiredDistance&&t(s)},!1)},i=function(e,t){while(e<0)e+=t;return e%t},s=function(e,t){for(var n=e.classList,r=0;r<t.length;r++)n.add(t[r])},o=function(e,t){for(var n=e.classList,r=0;r<t.length;r++)n.remove(t[r])},a={init:function(r){var i,s,o;for(e.extend(!0,n,r||{}),i=t.responsive.isMobileDevice(),s=document.getElementsByClassName(n.classes.root),o=0;o<s.length;o++)a[s[o].id]=u(s[o]),i&&s[o].classList.add(n.classes.ctrlVisibleOnMobile);return s.length>0}};return a}()})}(_jq,x5engine,window),function(e,t){"use strict";var n=e(".imMnMnTxt img").css("position"),r=null,i=e(window),s=e("#imContent"),o=e("#imFooPad"),u=s.css("padding-bottom"),a=u?u.replace(/px/g,"")*1:0;e.extend(t,{content:{getContentHeight:function(){r=o.length?o.height():s.height()},setNewHeight:function(){var n=e("#imContentContainer"),u=e("#imMnMn"),f=e("#imPgMn"),l=e("#imBtMnContainer"),c=0,h=0,p=0,d=!1,v;u.attr("data-verticalscroll")&&(c+=u.children("ul").css("margin-top").replace(/px/g,"")*1,i.one("scroll",t.content.setNewHeight));!!u.find("ul").length&&u.children("ul").css("position")!="fixed"&&(h=c+u.outerHeight());f.length&&(p=f.outerHeight(!0),p+=f.css("padding-top").replace(/px/g,"")*1,p+=f.css("margin-top").replace(/px/g,"")*1);v=Math.max(r,h,p,s.outerHeight(!0));d=!!o.length&&!!l.length&&h>s.outerHeight(!0);n.css("min-height",v+"px");d&&o.height(v-l.outerHeight(!0)-a*2)}}});t.settings.autoHeight.enabled&&(s.on("change breakpointChangedOrFluid",function(){s.add(o).height("");e("#imContentContainer").css("min-height","");setTimeout(function(){t.content.getContentHeight();t.content.setNewHeight()},200)}),s.trigger("change"))}(_jq,x5engine),function(e,t){"use strict";e.imCookie=function(n,r,i){var s=t.settings.siteId+"_"+n,c,h,p,d,o,u;if(r===null||r===undefined){if(c=null,document.cookie&&document.cookie!=="")for(h=document.cookie.split(";"),p=0;p<h.length;p++)if(d=e.trim(h[p]),d.substring(0,s.length+1)==s+"="){c=decodeURIComponent(d.substring(s.length+1));break}return c}i=i||{};(i.expires===null||i.expires===undefined)&&(i.expires=60);r===null&&(r="",i.expires=-1);o="";i.expires&&(typeof i.expires=="number"||i.expires.toUTCString)&&(typeof i.expires=="number"?(u=new Date,u.setTime(u.getTime()+i.expires*864e5)):u=i.expires,o="; expires="+u.toUTCString());var a=i.path?"; path="+i.path:"",f=i.domain?"; domain="+i.domain:";",l=i.secure?"; secure":"";document.cookie=[s,"=",encodeURIComponent(r),o,a,f,l].join("")}}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{cookielaw:{cookieId:"",showBanner:function(n){var i,s;if(n=e.extend({id:"cookiebanner",offlineTimeStamp:0,bannerStyle:"bar",position:"top",texts:[],acceptButton:!1,priority:2,acceptOnScroll:!1,elementClose:'<svg class="svgClose imCloseInn" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/><\/svg>',effect:"fade",margin:10},n),t.cookielaw.cookieId="cookie_law_yes"+(t.utils.isOnline()?"":"_"+n.offlineTimeStamp),n.onClose=function(){e.imCookie(t.cookielaw.cookieId,1,{expires:365});t.cookielaw.activateScripts()},t.cookielaw.accepted())t.cookielaw.activateScripts();else{switch(n.position){case"bottom":n.effect="frombottom";break;case"center":case"top":n.effect="fromtop";break;case"center-right":case"bottom-right":case"top-right":n.effect="fromright";break;case"center-left":case"bottom-left":case"top-left":n.effect="fromleft"}for(n.text="",s=0;s<n.texts.length&&!n.text;s++)n.texts[s].basepath==t.settings.currentPath&&(n.text=n.texts[s].text);n.acceptButton&&(n.text=n.bannerStyle=="box"?n.text+="<\/br>":n.text,n.text+='<div class="imClose close"><div class="imCloseInn">'+t.l10n.get("privacy_button_agree")+"<\/div><\/div>",n.elementClose="");i=n.bannerStyle=="box"?t.imSplashBox(n):t.alertBox(n);n.acceptOnScroll&&e(window).one("scroll",function(){i.close()})}},activateScripts:function(){e("#imContent").trigger("x5ActivateCookieScripts")},accepted:function(){return!!e.imCookie(t.cookielaw.cookieId)}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imCover:function(n){var c,h,p,d;n=e.extend(!0,{id:"cover",cookie:!1,priority:0,link:"",scrollImage:"",onClose:null,offlineTimeStamp:0},n);var r=500,i=1e3,s,o,u,a,f="cookie-"+n.id+(!t.utils.isOnline()&&!!n.offlineTimeStamp?"_"+n.offlineTimeStamp:""),l=e(window);return n.cookie&&e.imCookie(f)=="true"?!1:(c=function(t){e.isFunction(n.onClose)&&n.onClose();u.animate({top:"-100%"},i,function(){u.remove()});o.animate({opacity:"0"},i,function(){o.remove()});!t||t.stopPropagation()},o=e('<div id="im-cover-overlay"><\/div>'),e("body").append(o),h='<div id="'+n.id+'" class="im-cover '+(n.link!==""?"im-cover-clickable":"")+'" style="">',h+=t.settings.imLoadingAnimation,h+=n.scrollImage?'<img class="scroll-image close-element" alt="scroll down" src="'+n.scrollImage+'"><\/div>':"",h+="<\/div>\n",e("body").append(h),u=e("#"+n.id).css({zIndex:t.settings.zIndex.cover+n.priority}),p=function(){n.media.type=="image"&&(a=e('<div class="cover-bg" style="background: url(\''+n.media.url+"') center center/cover no-repeat; filter: blur(10px); transition: filter "+r+'ms ease-out;"><\/div>'));u.find(".imLoadAnim").remove();a.appendTo(u);setTimeout(function(){a.css({filter:"blur(0)"})},50);u.find(".close-element").click(function(e){e.stopPropagation();c()});l.one("scroll",c);u.one("mousewheel touchmove",c);u.click(function(){e.isFunction(n.link)?n.link.call(u):n.link!==""&&(location.href=n.link)});n.cookie&&e.imCookie(f,"true",{expires:0})},n.media?(d=n.media.load,s=new t.mediaObject(e.extend(n.media,{load:function(t){setTimeout(function(){p(function(){e.isFunction(d)&&d(t)})},100)}}))):c(),{close:function(){e.isFunction(c)&&c()}})}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imDatePicker:function(n,r){var i,s=e(),o=e(),u=e(n),a=t.l10n.get("date_months"),f=t.l10n.get("date_full_months"),l=t.l10n.get("date_days"),c=t.l10n.get("date_full_days"),h=function(e,t){for(var n=[],r=!1,i=0,s;!r&&i<t.length;)e.indexOf(t.charAt(i))!=-1&&(r=!0),i++;if(!r||t.length===0)return[e];for(s=e.split(t.charAt(0)),i=0;i<s.length;i++)n=n.concat(h(s[i],t.substring(1)));return n},p=function(){var e=u.val(),n=r.format,i=null,s;if(e!==""){if(i=n.replace(/\//g,"\\/").replace(/\s/g,"\\s+").replace(/\-/g,"\\-").replace(/\./g,"\\.").replace(/\[dd\]/g,"\\d{1,2}").replace(/\[mm\]/g,"\\d{1,2}").replace(/\[yy\]/g,"\\d{2}").replace(/\[yyyy\]/g,"\\d{4}").replace(/\[DD\]/g,"[\\wìòàùèé']+").replace(/\[MM\]/g,"[\\wìòàùèé']+").replace(/\[D\]/g,"[\\wìòàùèé']+").replace(/\[M\]/g,"[\\wìòàùèé']+"),i="^"+i+"$",s=new RegExp(i),!s.test(e))return!1;n=n.replace("[M]","").replace("[D]","").replace("[MM]","").replace("[DD]","").replace("[yy]","").replace("[yyyy]","").replace("[mm]","").replace("[dd]","");for(var o=h(r.format,n),a=h(e,n),f="",l="",c="",p,d,v=0;v<o.length;v++)switch(o[v]){case"[M]":for(p=t.l10n.get("date_months"),d=0;d<p.length;d++)p[d].toLowerCase()==a[v].toLowerCase()&&(f=d+1);break;case"[MM]":for(p=t.l10n.get("date_full_months"),d=0;d<p.length;d++)p[d].toLowerCase()==a[v].toLowerCase()&&(f=d+1);break;case"[D]":for(p=t.l10n.get("date_days"),d=0;d<p.length;d++)p[d].toLowerCase()==a[v].toLowerCase()&&(l=d+1);break;case"[DD]":for(p=t.l10n.get("date_full_days"),d=0;d<p.length;d++)p[d].toLowerCase()==a[v].toLowerCase()&&(l=d+1);break;case"[yy]":c="20"+a[v];break;case"[yyyy]":c=a[v];break;case"[mm]":f=a[v];break;case"[dd]":l=a[v]}return new Date(c,f-1,l)}return!1},d=function(){var e="<table>",t,n,s,o,u,a,f,c;for(e+="<tr>",n=0;n<l.length;n++)t=n+r.start,t>6&&(t-=7),e+='<td class="table-header">'+l[t]+"<\/td>";for(e+="<\/tr>",s=new Date(r.date.getYear(),r.date.getMonth(),r.date.getDate()),s.setFullYear(r.date.getFullYear()),s.setDate(1),o=parseInt(s.getDay(),10),o-=r.start,o<=0&&(o+=7),u=parseInt(s.getMonth(),10),a=0;s.getMonth()==u;){for(e+="<tr>",n=1;n<=7;n++)f="day",n+7*a>=o&&s.getMonth()==u?(c=n-o+1+7*a,c==i.getDate()&&s.getMonth()==i.getMonth()&&(f+=" selDay"),e+='<td class="'+f+'">'+c+"<\/td>",s.setDate(s.getDate()+1)):e+="<td><\/td>";e+="<\/tr>";a++}return e+="<\/table>",e},v=function(n,s,o){typeof o!="boolean"&&(o=!0);s?(r.date.setFullYear(s.getFullYear()),r.date.setMonth(s.getMonth()),r.date.setDate(s.getDate()),i.setFullYear(s.getFullYear()),i.setMonth(s.getMonth()),i.setDate(s.getDate())):(r.date.setDate(e(this).html()),i.setFullYear(r.date.getFullYear()),i.setMonth(r.date.getMonth()),i.setDate(e(this).html()));var h=r.date.getFullYear().toString(),p=t.utils.imFormatInt(parseInt(r.date.getDate(),10)),d=t.utils.imFormatInt(parseInt(r.date.getMonth(),10)+1),v=r.format.replace(/\[yyyy\]/g,h);v=v.replace(/\[yy\]/g,h.substring(2)).replace(/\[mm\]/g,d).replace(/\[dd\]/g,p).replace(/\[D\]/g,parseInt(i.getDay(),10)-1>=0?l[parseInt(i.getDay(),10)-1]:l[6]).replace(/\[DD\]/g,parseInt(i.getDay(),10)-1>=0?c[parseInt(i.getDay(),10)-1]:c[6]).replace(/\[M\]/g,a[parseInt(i.getMonth(),10)]).replace(/\[MM\]/g,f[parseInt(i.getMonth(),10)]);u.val(v);u.data("data-was-set",!0);E();o&&e.isFunction(r.onChange)&&r.onChange()},m=function(e){r.date.setDate(1);r.date.setMonth(r.date.getMonth()+e);y()},g=function(e){r.date.setFullYear(r.date.getFullYear()+e);y()},y=function(){if(o.find(".calendar").empty().append(d()),o.find(".month-text").empty().append(f[parseInt(r.date.getMonth(),10)]),o.find(".year-text").empty().append(r.date.getFullYear().toString()),o.find(".header .year").html(r.date.getFullYear().toString()),"toLocaleDateString"in r.date){var e=r.date.toLocaleDateString(t.l10n.get("lang_code"),{weekday:"long",month:"short",day:"numeric"});o.find(".header .date").html(e)}else o.find(".header .date").html(r.date.toDateString().replace(r.date.getFullYear().toString(),""));o.find(".day").click(v)},b=function(n,u){var a=p();a&&(r.date.setFullYear(a.getFullYear()),r.date.setMonth(a.getMonth()),r.date.setDate(a.getDate()),i.setFullYear(a.getFullYear()),i.setMonth(a.getMonth()),i.setDate(a.getDate()));var f='<div class="date-picker">',l=r.vDay,c=r.vMonths;f+='<div class="header"><div class="year"><\/div><div class="date"><\/div><\/div>';f+='<div class="container month-container"><span class="arrow">&lang;<\/span><span class="month-text"><\/span><span class="arrow">&rang;<\/span><\/div>';f+='<div class="container year-container"><span class="arrow">&lang;<\/span><span class="year-text"><\/span><span class="arrow">&rang;<\/span><\/div>';f+='<div class="calendar">'+d()+"<\/div>";f+="<\/div>";e("body").append('<div class="date-picker-background"><\/div>');s=e(".date-picker-background");s.css({position:"fixed",width:e(window).width(),height:e(window).height(),top:0,left:0,zIndex:t.settings.zIndex.datePicker+1}).on("click",E);e("body").append(f);o=e(".date-picker");y();o.find(".month-container .arrow").first().on("click",function(){m(-1)});o.find(".month-container .arrow").last().on("click",function(){m(1)});o.find(".year-container .arrow").first().on("click",function(){g(-1)});o.find(".year-container .arrow").last().on("click",function(){g(1)});e(".day").on("click",v);n+o.width()>e(window).width()+e(window).scrollLeft()&&(n=e(window).width()-o.outerWidth()-5+e(window).scrollLeft());u+o.height()>e(window).height()+e(window).scrollTop()&&(u=e(window).height()-o.outerHeight()-5+e(window).scrollTop());o.fadeOut(0).css({top:u,left:n,zIndex:t.settings.zIndex.datePicker+2}).fadeIn(200)},w=function(e){o.length>0?o.fadeOut(200,function(){o.remove();b(e.pageX,e.pageY)}):b(e.pageX,e.pageY)},E=function(){s.remove();o.fadeOut(200,function(){o.remove()})};return r=e.extend({icon:!0,start:0,float:"left",format:t.l10n.get("date_format"),date:null,setInitial:!1,onChange:null},r),r.start<0&&(r.start=Math.abs(r.start)%7),r.date?typeof r.date=="string"&&(r.date=new Date(r.date.substring(6),parseInt(r.date.substring(3,5),10)-1,r.date.substring(0,2))):r.date=new Date,i=new Date(r.date.getFullYear(),r.date.getMonth(),r.date.getDate()),r.icon?u.next(".imDatePickerIcon").click(w):u.click(w),u.on("change",function(){var t=p();t!==!1&&(v(null,t),e.isFunction(r.onChange)&&r.onChange())}),u.click(function(){e(this).removeClass(t.imForm.constants.mark)}),r.setInitial&&v(null,r.date,!1),{date:function(){return r.date}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{setupDateTime:function(){var n=t.dateTime;n(e(".imHour"),"hour");n(e(".imNow"),"now")},dateTime:function(n,r){n=e(n);var i=t.l10n.get,s=i("date_days"),o=i("date_months"),u=i("date_full_months"),a=i("date_full_days"),f=i("date_format"),l=t.utils.imFormatInt,c="";if(r!="hour"&&r!="now"){n.html(r);return}switch(r){case"hour":(function h(){var e=new Date;n.html(l(e.getHours())+":"+l(e.getMinutes())+":"+l(e.getSeconds())+" ");setTimeout(h,1e3)})();break;case"now":(function p(){var e=new Date,r=e.getFullYear().toString(),i=t.utils.imFormatInt(parseInt(e.getDate(),10)),l=t.utils.imFormatInt(parseInt(e.getMonth(),10)+1);c=f.replace(/\[yyyy\]/g,r).replace(/\[yy\]/g,r.substring(2)).replace(/\[aaaa\]/g,r).replace(/\[aa\]/g,r.substring(2)).replace(/\[mm\]/g,l).replace(/\[dd\]/g,i).replace(/\[D\]/g,parseInt(e.getDay(),10)-1>=0?s[parseInt(e.getDay(),10)-1]:s[6]).replace(/\[DD\]/g,parseInt(e.getDay(),10)-1>=0?a[parseInt(e.getDay(),10)-1]:a[6]).replace(/\[M\]/g,o[parseInt(e.getMonth(),10)]).replace(/\[MM\]/g,u[parseInt(e.getMonth(),10)]);n.html(c);setTimeout(p,6e4)})()}}})}(_jq,x5engine),function(e,t){"use strict";e.fn.loudStop=function(t,n){return e(this).trigger("loudStop").stop(t,n),this};e.extend(e.easing,{iOsSwing:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},elasticIn:function(e,t,n,r,i){var s=1.70158,o=0,u=r;return t===0?n:(t/=i)==1?n+r:(o||(o=i*.3),u<Math.abs(r)?(u=r,s=o/4):s=o/(2*Math.PI)*Math.asin(r/u),u*Math.pow(2,-11*t)*Math.sin((t*i-s)*2*Math.PI/o)+r+n)},elasticOut:function(e,t,n,r,i){var s=1.70158,o=0,u=r;return t===0?n:(t/=i)==1?n+r:(o||(o=i*.3),u<Math.abs(r)?(u=r,s=o/4):s=o/(2*Math.PI)*Math.asin(r/u),-(u*Math.pow(2,11*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o))+n)},bounceIn:function(t,n,r,i,s){return i-e.easing.bounceOut(t,s-n,0,i,s)+r},bounceOut:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutSwing:function(e,t,n,r,i){return t===0?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(-Math.pow(2,-10*--t)+2)+n},imBounce:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n}});e.extend(!0,t,{effects:{none:{animateIn:function(t,n,r,i){t.DOMObject().width(n.width).height(n.height).css({position:"absolute",top:n.y,left:n.x}).loudStop(!1,!1).show(0);e.isFunction(i)&&i(t)},animateOut:function(t,n,r){t.DOMObject().loudStop(!1,!1).hide(0);e.isFunction(r)&&r(t)}},fade:{animateIn:function(t,n,r,i){r=e(r);t.DOMObject().width(n.width).height(n.height).css({position:"absolute",top:n.y,left:n.x,display:"none"}).loudStop(!1,!1).fadeIn(500,function(){e.isFunction(i)&&i(t)})},animateOut:function(t,n,r){t.DOMObject().loudStop(!1,!1).fadeOut(500,function(){e.isFunction(r)&&r(t)})}},horizontalSlide:{animateIn:function(t,n,r,i,s){r=e(r);t.DOMObject().width(n.width).height(n.height).css({position:"absolute",top:n.y,left:s?-n.width:r.width()}).show(0).loudStop(!1,!1).animate({left:n.x},{duration:500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?n.width():-s.width()},{duration:500,complete:function(){e.isFunction(r)&&r(t)}})}},horizontalSlideSwing:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);t.DOMObject().width(n.width).height(n.height).css({position:"absolute",top:n.y,left:s?-n.width:r.width()}).show(0).loudStop(!1,!1).animate({left:n.x},{duration:2e3,easing:"easeInOutSwing",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?n.width():-s.width()},{duration:2e3,easing:"easeInOutSwing",complete:function(){e.isFunction(r)&&r(t)}})}},verticalSlide:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?r.height():-n.height});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{duration:500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({top:i?-t.Height():n.height()},{duration:500,complete:function(){e.isFunction(r)&&r(t)}})}},verticalSlideSwing:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?r.height():-n.height});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{duration:2e3,easing:"easeInOutSwing",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({top:i?-t.Height():n.height()},{duration:2e3,easing:"easeInOutSwing",complete:function(){e.isFunction(r)&&r(t)}})}},zoom:{animateIn:function(t,n,r,i){var o=t.DOMObject();r=e(r);o.css({position:"absolute",top:r.height()/2,left:r.width()/2}).width(10).height(10);o.fadeIn(0);o.loudStop(!1,!1).animate({top:n.y,left:n.x,width:n.width,height:n.height},{duration:500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({top:n.height()/2,left:n.width()/2,width:1,height:1},{duration:500,complete:function(){e.isFunction(r)&&r(t)}})}},elasticFromTop:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?r.height():-n.height});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{easing:"elasticIn",duration:1500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).fadeOut(500,function(){e.isFunction(r)&&r(t)})}},elasticFromBottom:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?-n.height:r.height()});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{easing:"elasticIn",duration:500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).fadeOut(500,function(){e.isFunction(r)&&r(t)})}},elasticFromLeft:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",top:n.y,left:s?r.width():-n.width});o.show(0);o.loudStop(!1,!1).animate({left:n.x},{duration:1500,easing:"elasticIn",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?-s.width():n.width()},{duration:1500,easing:"elasticIn",complete:function(){e.isFunction(r)&&r(t)}})}},elasticFromRight:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",top:n.y,left:s?-n.width:r.width()});o.show(0);o.loudStop(!1,!1).animate({left:n.x},{duration:1500,easing:"elasticIn",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?n.width():-s.width()},{duration:1500,easing:"elasticIn",complete:function(){e.isFunction(r)&&r(t)}})}},bounceFromRight:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",top:n.y,left:s?-n.width:r.width()});o.show(0);o.loudStop(!1,!1).animate({left:n.x},{duration:1e3,easing:"bounceOut",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?n.width():-s.width()},{duration:1e3,easing:"bounceOut",complete:function(){e.isFunction(r)&&r(t)}})}},bounceFromLeft:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",top:n.y,left:s?r.width():-n.width});o.show(0);o.loudStop(!1,!1).animate({left:n.x},{duration:1e3,easing:"bounceOut",complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({left:i?-s.width():n.width()},{duration:1e3,easing:"bounceOut",complete:function(){e.isFunction(r)&&r(t)}})}},bounceFromTop:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?r.height():-n.height});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{easing:"bounceOut",duration:1500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({top:i?-s.height():n.height()},{duration:1500,easing:"bounceOut",complete:function(){e.isFunction(r)&&r(t)}})}},bounceFromBottom:{animateIn:function(t,n,r,i,s){var o=t.DOMObject();r=e(r);o.width(n.width).height(n.height);o.css({position:"absolute",left:n.x,top:s?-n.height:r.height()});o.show(0);o.loudStop(!1,!1).animate({top:n.y},{easing:"bounceOut",duration:1500,complete:function(){e.isFunction(i)&&i(t)}})},animateOut:function(t,n,r,i){var s=t.DOMObject();n=e(n);s.loudStop(!1,!1).animate({top:i?n.height():-s.height()},{duration:1500,easing:"bounceOut",complete:function(){e.isFunction(r)&&r(t)}})}},rotateLinear:{animateIn:function(n,r,i,s,o){var u=n.DOMObject(),a=t.utils.supportsCSS("transform"),f=t.utils.supportsCSS("transformOrigin"),l;a&&f?(u.loudStop(!1,!1).css({top:r.y,left:r.x,"-my-anim-step":0}).width(r.width).height(r.height),l=o?-90:90,u.css(f,"0% 0%").fadeIn(0),u.animate({"-my-anim-step":100},{step:function(e){u.css(a,"rotate("+Math.floor(l-l*e/100)+"deg)")},complete:function(){e.isFunction(s)&&s(n)}})):t.effects.fade.animateIn(n,r,i,s,o)},animateOut:function(n,r,i,s){var o=n.DOMObject(),u=t.utils.supportsCSS("transform"),a=t.utils.supportsCSS("transformOrigin"),f;u&&a?(o.loudStop(!1,!1).css("-my-anim-step",0),f=s?90:-90,o.css(a,"0% 0%").fadeIn(0),o.animate({"-my-anim-step":100},{step:function(e){o.css(u,"rotate("+Math.floor(f*e/100)+"deg)")},complete:function(){e.isFunction(i)&&i(n)}})):t.effects.fade.animateOut(n,r,i,s)}},rotateZoom:{animateIn:function(n,r,i,s,o){var u=n.DOMObject(),a=t.utils.supportsCSS("transform"),f;a?(f=-1e3,u.css({position:"absolute",top:i.height()/2,left:i.width()/2,"-my-anim-step":0}).width(10).height(10).fadeIn(0),u.loudStop(!1,!1).animate({top:r.y,left:r.x,width:r.width,height:r.height,"-my-anim-step":100},{duration:500,step:function(e){u.css(a,"rotate("+Math.floor(f%360-f%360*e/100)+"deg)")},complete:function(){e.isFunction(s)&&s(n)}})):t.effects.zoom.animateIn(n,r,i,s,o)},animateOut:function(n,r,i,s){var o=n.DOMObject(),u=t.utils.supportsCSS("transform"),a;u?(a=1e3,o.css("-my-anim-step",0),o.loudStop(!1,!1).animate({top:r.height()/2,left:r.width()/2,width:1,height:1,"-my-anim-step":100},{duration:500,step:function(e){o.css(u,"rotate("+Math.floor(a%360*e/100)+"deg)")},complete:function(){e.isFunction(i)&&i(n)}})):t.effects.zoom.animateOut(n,r,i,s)}},carousel:{animateIn:function(n,r,i,s,o){var u=n.DOMObject(),a=t.utils.supportsCSS("transform"),f=t.utils.supportsCSS("transformOrigin"),l;a&&f?(u.loudStop(!1,!1).css({top:r.y,left:r.x,"-my-anim-step":0}).width(r.width).height(r.height),l=o?90:-90,u.fadeIn(0),u.css(f,(u.width()-i.width())/2+"px 50%"),u.animate({"-my-anim-step":100},{step:function(e){u.css(a,"perspective(600px) rotateY("+Math.floor(l-l*e/100)+"deg)")},complete:function(){e.isFunction(s)&&s(n)}})):t.effects.fade.animateIn(n,r,i,s,o)},animateOut:function(n,r,i,s){var o=n.DOMObject(),u=t.utils.supportsCSS("transform"),a=t.utils.supportsCSS("transformOrigin"),f;u&&a?(o.loudStop(!1,!1).css("-my-anim-step",0),f=s?-90:90,o.fadeIn(0),o.css(a,(o.width()-r.width())/2+"px 50%"),o.animate({"-my-anim-step":100},{step:function(e){o.css(u,"perspective(600px) rotateY("+Math.floor(f*e/100)+"deg)")},complete:function(){e.isFunction(i)&&i(n)}})):t.effects.fade.animateOut(n,r,i,s)}},verticalSlices:{animateIn:function(n,r,i,s,o){var p;if(n.Type()!="image"){t.effects.fade.animateIn(n,r,i,s,o);return}var u=n.DOMObject(),a=e(null),f=5,l=80,c=n.Width()/f,h=u.attr("src");u.loudStop(!1,!1).one("loudStop",function(){a.stop(!1,!1).remove();a=e(null)});for(p=0;p<f;p++)a=a.add(e("<div />").css({position:"absolute",top:r.y+i.height()*(o?1:-1),left:r.x+c*p,"background-image":'url("'+h+'")',"background-position":-(c*p)+"px 0px","background-size":c*f+"px "+n.Height()+"px",opacity:0}).width(c).height(n.Height()));u.hide(0).after(a);a.each(function(t){e(this).delay(t*l).animate({top:r.y},{duration:f*l,step:function(t,n){n.prop=="top"&&e(this).css("opacity",1+t/i.height()*(o?-1:1))},complete:function(){t==f-1&&a.length>0&&(u.css({position:"absolute",top:r.y,left:r.x}).width(r.width).height(r.height).show(0),a.remove(),s(n))}})})},animateOut:function(n,r,i,s){var p;if(n.Type()!="image"){t.effects.fade.animateOut(n,r,i,s);return}var o=n.DOMObject(),u=e(null),a=5,f=80,l=n.Width()/a,c={x:o.css("left").replace(/px/,"")*1,y:o.css("top").replace(/px/,"")*1},h=o.attr("src");o.loudStop(!1,!1).hide(0).one("loudStop",function(){u.stop(!1,!1).remove();u=e(null)});for(p=0;p<a;p++)u=u.add(e("<div />").css({position:"absolute",top:c.y,left:c.x+l*p,"background-image":'url("'+h+'")',"background-position":-(l*p)+"px 0px","background-size":l*a+"px "+n.Height()+"px"}).width(l).height(n.Height()));o.after(u);u.each(function(t){e(this).delay(t*f).animate({top:c.y+r.height()*(s?-1:1)},{duration:a*f,step:function(t,n){n.prop=="top"&&e(this).css("opacity",1-t/r.height()*(s?-1:1))},complete:function(){t==a-1&&u.length>0&&(u.remove(),i(n))}})});i(n)}},scramble:{animateIn:function(n,r,i,s,o){var h,p,d,v,m;if(n.Type()!="image"){t.effects.fade.animateIn(n,r,i,s,o);return}var u=n.DOMObject(),a=4,f=n.Width()/a,l=n.Height()/a,c=u.attr("src");u.loudStop(!1,!1).css({position:"absolute",top:r.y,left:r.x}).width(r.width).height(r.height).hide(0).one("loudStop",function(){h.stop(!1,!1).remove();h=e(null)});for(h=e(null),p=0;p<a;p++)for(d=0;d<a;d++)v=Math.random()-.5>=0?i.width()+Math.random()*f:-Math.random()*f-f,m=Math.random()-.5>=0?i.height()+Math.random()*f:-Math.random()*l-l,h=h.add(e("<div />").css({position:"absolute",top:m,left:v,"background-image":'url("'+c+'")',"background-position":-f*d+"px -"+l*p+"px","background-size":f*a+"px "+l*a+"px"}).width(f).height(l).data("endposx",r.x+f*d).data("endposy",r.y+l*p));u.after(h);h.each(function(t){var i=e(this);i.animate({top:i.data("endposy")*1,left:i.data("endposx")*1},{duration:1e3,complete:function(){t==h.length-1&&h.length>0&&(u.show(0),h.remove(),s(n))}})})},animateOut:function(n,r,i,s){var h,p,d;if(n.Type()!="image"){t.effects.fade.animateOut(n,r,i,s);return}var o=n.DOMObject(),u=4,a=n.Width()/u,f=n.Height()/u,l=o.attr("src"),c={x:o.css("left").replace(/px/,"")*1,y:o.css("top").replace(/px/,"")*1};o.loudStop(!1,!1).hide(0).one("loudStop",function(){h.stop(!1,!1).remove();h=e(null)});for(h=e(null),p=0;p<u;p++)for(d=0;d<u;d++)h=h.add(e("<div />").css({position:"absolute",top:c.y+f*p,left:c.x+a*d,"background-image":'url("'+l+'")',"background-position":-a*d+"px -"+f*p+"px","background-size":a*u+"px "+f*u+"px"}).width(a).height(f));o.after(h);h.each(function(t){var u=Math.random()-.5>=0?r.width()+Math.random()*a:-Math.random()*a-a,l=Math.random()-.5>=0?r.height()+Math.random()*a:-Math.random()*f-f;e(this).animate({top:u,left:l},{duration:800,complete:function(){t==h.length-1&&h.length>0&&(o.hide(0),h.remove(),i(n))}})})}},squares:{animateIn:function(n,r,i,s,o){var p,d;if(n.Type()!="image"){t.effects.fade.animateIn(n,r,i,s,o);return}var u=n.DOMObject(),a=4,f=n.Width()/a,l=n.Height()/a,c=u.attr("src"),h=e(null);u.loudStop(!1,!1).css({position:"absolute",top:r.y,left:r.x}).width(r.width).height(r.height).hide(0).one("loudStop",function(){h.stop(!1,!1).remove();h=e(null)});for(p=0;p<a;p++)for(d=0;d<a;d++)h=h.add(e("<div />").css({position:"absolute",top:r.y+l*p,left:r.x+f*d,"background-image":'url("'+c+'")',"background-position":-f*d+"px -"+l*p+"px","background-size":f*a+"px "+l*a+"px",display:"none"}).width(f).height(l));u.after(h);h.each(function(t){e(this).delay(t*50).fadeIn(150,function(){t==h.length-1&&h.length>0&&(u.fadeIn(0),h.remove(),s(n))})})},animateOut:function(n,r,i,s){var p,d;if(n.Type()!="image"){t.effects.fade.animateOut(n,r,i,s);return}var o=n.DOMObject(),u=4,a=n.Width()/u,f=n.Height()/u,l=o.attr("src"),c={x:o.css("left").replace(/px/,"")*1,y:o.css("top").replace(/px/,"")*1},h=e(null);o.loudStop(!1,!1).one("loudStop",function(){h.stop(!1,!1).remove();h=e(null)});for(p=0;p<u;p++)for(d=0;d<u;d++)h=h.add(e("<div />").css({position:"absolute",top:c.y+f*p,left:c.x+a*d,"background-image":'url("'+l+'")',"background-position":-a*d+"px -"+f*p+"px","background-size":a*u+"px "+f*u+"px"}).width(a).height(f));o.after(h).hide(0);h.each(function(t){e(this).delay(t*50).fadeOut(150,function(){t==h.length-1&&h.length>0&&(h.remove(),i(n))})})}},flip:{animateIn:function(n,r,i,s,o){var u=n.DOMObject(),a=t.utils.supportsCSS("transform"),f=t.utils.supportsCSS("transformOrigin"),l;a&&f&&n.Type()=="image"?(u.loudStop(!1,!1).css({top:r.y,left:r.x,"-my-anim-step":0}).width(r.width).height(r.height),l=o?180:-180,u.fadeIn(0).css(f,"50% 50%"),u.animate({"-my-anim-step":100},{step:function(e){u.css(a,"perspective(600px) rotateY("+Math.floor(l-l*e/100)+"deg)");u.css("opacity",e>50?(e-50)/50:0)},complete:function(){e.isFunction(s)&&s(n)}})):t.effects.fade.animateIn(n,r,i,s,o)},animateOut:function(n,r,i,s){var o=n.DOMObject(),u=t.utils.supportsCSS("transform"),a=t.utils.supportsCSS("transformOrigin"),f;u&&a&&n.Type()=="image"?(o.loudStop(!1,!1).css("-my-anim-step",0),f=s?-180:180,o.fadeIn(0).css(a,"50% 50%"),o.animate({"-my-anim-step":100},{step:function(e){o.css(u,"perspective(600px) rotateY("+Math.floor(f*e/100)+"deg)");o.css("opacity",e>50?0:(50-e)/50)},complete:function(){e.isFunction(i)&&i(n)}})):t.effects.fade.animateOut(n,r,i,s)}}}})}(_jq,x5engine),function(e,t,n,r){"use strict";function i(){if(!("localStorage"in t)||!t.localStorage)return!1;var e="test",n=t.sessionStorage;try{return n.setItem(e,"1"),n.removeItem(e),!0}catch(r){return!1}}r.settings.fallback.animFrame&&(t.requestAnimFrame=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return t.setTimeout(function(){e((new Date).getTime())},1e3/60)}}(),t.cancelAnimFrame=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||function(e){t.clearTimeout(e)}}());!("onhashchange"in t)&&r.settings.fallback.onhashchange&&function s(e){var r=t.top.location.hash;r!=e&&n(t).triggerHandler("hashchange");t.setTimeout(function(){s(r)},200)}(t.top.location.hash);r.settings.fallback.json&&(typeof JSON=="undefined"&&(this.JSON={}),typeof JSON.stringify!="function"&&(JSON.stringify=function(e){var t=typeof e,n,r,i,s;if(t!="object"||e===null)return t=="string"&&(e='"'+e+'"'),String(e);i=[];s=e&&e.constructor==Array;for(n in e)r=e[n],t=typeof r,t=="string"?r='"'+r+'"':t=="object"&&r!==null&&(r=JSON.stringify(r)),i.push((s?"":'"'+n+'":')+String(r));return(s?"[":"{")+String(i)+(s?"]":"}")}),typeof JSON.parse!="function"&&(JSON.parse=function(e){if(e===null)return null;if(typeof e=="string"&&(e=n.trim(e),e&&/^[\],:{}\s]*$/.test(e.replace(/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,"@").replace(/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))))return new Function("return "+e)();throw"Invalid JSON: "+e;}));t.imStorage=i()?{setItem:function(e,n){t.localStorage.setItem(r.settings.siteId+"_"+e,n)},getItem:function(e){return t.localStorage.getItem(r.settings.siteId+"_"+e)},removeItem:function(e){t.localStorage.removeItem(r.settings.siteId+"_"+e)},clear:function(){t.localStorage.clear()}}:{setItem:function(e,t){n.imCookie(e,t,{path:"/"})},getItem:function(e){var t=n.imCookie(e);return t?t:null},removeItem:function(e){n.imCookie(e,"",{path:"/"})},clear:function(){}};typeof e.elementsFromPoint!="function"&&(e.elementsFromPoint=function(t,n){for(var r=[],i=[],s,o,u;(s=e.elementFromPoint(t,n))&&r.indexOf(s)===-1&&s!==null;)r.push(s),i.push({value:s.style.getPropertyValue("pointer-events"),priority:s.style.getPropertyPriority("pointer-events")}),s.style.setProperty("pointer-events","none","important");for(o=i.length-1;o>=0;o--)u=i[o],r[o].style.setProperty("pointer-events",u.value?u.value:"",u.priority);return r})}(document,window,$,x5engine),function(e,t){"use strict";e.extend(t,{imForm:{constants:{mark:"imFormMark"},initForm:function(n,r,i){r=r||!1;i=e.extend(!0,{base:"",offlineMessage:"",jsid:""},i);var s=e(n);s.append('<input type="hidden" value="'+i.jsid+'" name="imJsCheck" />');s.find("img").not(".imDatePickerIcon").each(function(){e(this).on("mouseover",function(){t.imTip.Show(e(this),{position:"top"})})});r&&s.find(":input").each(function(){var t=e(this),n=e("#"+t.attr("id")+"_tip");n.length>0&&t.on("focus click",function(){n.triggerHandler("mouseover");t.one("blur",function(){n.triggerHandler("mouseout")})})});s.find(".datepicker").each(function(){var n=e(this).attr("data-format");n&&t.imDatePicker(e(this),{format:n,icon:e(this).attr("data-showicon")=="true"})});e("[class*=valMaxLength], [class*=valLength]").each(function(){e(this).attr("class").match(/Length\[([0-9]+)\]/g);var t=RegExp.$1;e(this).keyup(function(){e(this).val(e(this).val().substring(0,t))})});e("[class*=valDate]").keypress(function(t){var n=t.charCode?t.charCode:t.keyCode;return n==8||n==37||n==39||n==46||n==9?!0:/^[0-9\/\.]+$/g.test(e(this).val()+String.fromCharCode(n))});e("[class*=valTelephone]").keypress(function(t){var n=t.charCode?t.charCode:t.keyCode;return n==8||n==37||n==39||n==46||n==9?!0:/^[0-9\s\-\(\)]+$/g.test(e(this).val()+String.fromCharCode(n))});t.imForm.setPagination(n,i);t.imForm.lockCopyPaste(n);t.utils.switchFocus(n);t.imForm.showCaptcha(n)},activeFocusPasswordPolicy:function(n){e("input[type=password].requirePolicy").each(function(){var r=e(this);r.on("focus",function(){t.imForm.showPasswordPolicy(r,n)})})},showPasswordPolicy:function(n,r){var i=e(n),s,o,u;if(i.addClass(t.imForm.constants.mark),r!=null){if(s="",Array.isArray(r)){for(o=0;o<=r.length;o++)u=t.l10n.get(r[o]),r[o]=="form_password_length"&&u.indexOf("{0}")!==-1&&(u=u.replace("{0}",t.passwordpolicy.getMinimumCharacters())),s=s+u+"<br>";s.substring(s.length-8)=="<br><br>"&&(s=s.substring(0,s.length-8))}else s=t.l10n.get(r);i!=null&&(i.removeClass(t.imTip.constants.locked),t.imTip.Show(i,{position:"right",text:s,unique:!1,classes:"textLeft",persistant:!0,hideOnFocus:!1,hideOnBlur:!0}))}},showCaptcha:function(n){if(n=e(n),n.length){var r=t.captcha.instance.create(n);r!==!1?n.data("cpt-res",r):n.removeData("cpt-res")}},resetCaptcha:function(e){var t=e.data("cpt-res");t&&t.reset()},checkCaptcha:function(t){if(t=e(t),!t.length)return!1;var n=t.data("cpt-res");return n?n.check():!0},getCaptchaField:function(t){if(t=e(t),t.length){var n=t.data("cpt-res");if(!!n)return n.getCaptchaField()}return e()},setPagination:function(n,r){var i=0,h,p;r=r||{};var s=r.type||"tip",o=e(n),u=!1,a="",f=function(r,i){var s=e(n+"_next"),u=e(n+"_prev"),a=e(n+"_submit");i=i||400;s.add(u).attr("disabled",!1);e("."+t.imTip.constants.classId).remove();e("."+t.imForm.constants.mark).removeClass(t.imForm.constants.mark);r==1?(u.add(a).hide(0),s.show(0)):o.find("[pageCount="+(r+1)+"]").length===0?(u.add(a).show(0),s.hide(0)):(u.add(a).hide(0),u.add(s).show(0));o.find("fieldset").each(function(){var t=e(this);parseInt(t.attr("pageCount"),10)==r?t.css({display:"block",height:"auto"}).children("div").slideDown(i):t.children("div").slideUp(i,function(){t.height(0).css("display","none")})});e(n+"_pageCounter").val(r)},l=function(){var i=parseInt(e(n+"_pageCounter").val(),10);t.imForm.validate(o.find("fieldset[pageCount="+i+"]"),{showAll:!0,paginate:!0,type:s})===!0&&(i++,o.find("[pageCount="+i+"]").length>0?f(i):t.imForm.submit(n,r))},c=function(){var t=parseInt(e(n+"_pageCounter").val(),10);--t>0&&(e(n+"_pageCounter").attr("value",t),f(t))};o.find("fieldset").each(function(){var t=e(this);(t.hasClass("newPage")||i===0)&&i++;t.attr("pageCount",i)});i>1?(o.append('<input type="hidden" name="'+n.replace("#","")+'_pageCounter" id="'+n.replace("#","")+'_pageCounter" value="1" />'),o.children("div:last").append('<input type="button" id="'+n.replace("#","")+'_prev" value="'+t.l10n.get("cart_goback")+'"/>'),o.children("div:last").append('<input type="button" id="'+n.replace("#","")+'_next" value="'+t.l10n.get("cart_gonext")+'"/>'),a=t.l10n.get("form_submit"),p=o.find("input[type=submit]"),p&&(p.data("submitValue")&&(a=p.data("submitValue")),p.remove()),o.children("div:last").append('<input type="button" id="'+n.replace("#","")+'_submit" value="'+a+'"/>'),o.find(n+"_submit").fadeOut(0).css("margin-right","4px"),e(n+"_prev").click(c).css("margin-right","4px"),e(n+"_next").click(l).css("margin-right","4px"),f(1,1),h=function(){l()}):(a=o.find("input[type=submit]").attr("value"),o.find("input[type=submit]").after('<input type="button" id="'+n.replace("#","")+'_submit" value="'+a+'"/>'),o.find("input[type=submit]").remove(),h=function(){t.imForm.submit(n,r)});e(n+"_submit").click(function(){t.imForm.submit(n,r)});o.submit(function(){return u=!1,h(),!1});o.find("input").keypress(function(e){e.keyCode==40?u=!0:e.which==13&&(u||h(),u=!1)}).focus(function(){u=!1})},lockCopyPaste:function(t){e(t).find("input[class*=equalTo]").each(function(){for(var i,t=e(this).attr("class").split(" "),n=function(e){return e.preventDefault(),!1},r=0;r<t.length;r++)if(t[r].substring(0,7)=="equalTo"){i=t[r].substring(8,t[r].length-1);e("#"+i).on("contextmenu cut copy paste",n)}});e(t).find("input[class*=equalTo]").on("contextmenu cut copy paste",function(e){return e.preventDefault(),!1})},validate:function(n,r){var i=!0,s=!1,o,u,a=e(n).attr("id");r=e.extend(!0,{type:"tip",showAll:!1,paginate:!1},r);(r.type=="popup"||r.type=="alert")&&(r.showAll=!1);n=e(n);n.find("*").removeClass(t.imForm.constants.mark);var f=function(n,o){var u=function(){e(this).removeClass(t.imForm.constants.mark);e("[tiptarget="+e(this).attr("id")+"]").remove()},a,f,l,c,h,d,v;if(a=e(n).is("input[type=radio]")?e(n).parent().parent().parent().parent().find("label").find("span").html():e("label[for="+e(n).attr("id")+"] span").length>0?e("label[for="+e(n).attr("id")+"] span").html():e("label[for="+e(n).attr("id")+"]").length>0?e("label[for="+e(n).attr("id")+"]").html():e(n).attr("placeholder"),e(n).addClass(t.imForm.constants.mark),e(n).is(":radio")&&e(n).css("border","none"),o!=null&&o=="form_mandatory"&&e(n).addClass("mandatoryInvalid"),o!=null&&(!s||r.showAll)){if(s=!0,f="",Array.isArray(o)){for(o[0]=="form_password"&&(r.classes=r.classes==undefined?"textLeft":r.classes+=" textLeft"),l=0;l<=o.length;l++)c=t.l10n.get(o[l]),o[l]=="form_password_length"&&c.indexOf("{0}")!==-1&&(c=c.replace("{0}",t.passwordpolicy.getMinimumCharacters())),f=f+c+"<br>";f.substring(f.length-8)=="<br><br>"&&(f=f.substring(0,f.length-8))}else f=t.l10n.get(o);if(a!=null){for(h=!0;a.charAt(a.length-1)==":"||a.charAt(a.length-1)=="*"||a.charAt(a.length-1)==" ";)a=a.substr(0,a.length-1);try{f=f.replace(/\[FIELD\]/g,"'"+a+"'")}catch(p){}switch(r.type){case"alert":alert(f);break;case"popup":d=new t.utils.Gui;d.showPopUp({text:f});break;default:!!e(n).attr("class")&&e(n).attr("class").match(/datePicker\[(.*),([\d]{1})\]/)&&e(n).next("span").find("img.imDatePickerIcon").is("img")!=0?v=e(n).next("span").find(".imDatePickerIcon"):e(n).is("input[type=radio]")?(e(n).one("click",function(){e("[tiptarget="+e(this).attr("id").substring(0,e(this).attr("id").lastIndexOf("_"))+"_target]").remove();e("label[for="+e(n).attr("id").substring(0,e(n).attr("id").lastIndexOf("_"))+"] span").removeClass(t.imTip.constants.locked).attr("id","")}),v=e(n).parent().parent().parent(),v.attr("id",e(n).attr("id").substring(0,e(n).attr("id").lastIndexOf("_"))+"_target"),e("[tiptarget="+e(n).attr("id").substring(0,e(n).attr("id").lastIndexOf("_"))+"_target]").length>0&&(v=null)):e(n).next("img").is("img")?(h=e(n),v=e(n).next("img")):e(n).nextAll("iframe.imFrame\\["+e(n).attr("id")+"\\]").is("iframe")?(h=e(n),v=e(n).nextAll("iframe.imFrame\\["+e(n).attr("id")+"\\]")):v=e(n);v!=null&&(v.removeClass(t.imTip.constants.locked),t.imTip.Show(v,{position:"right",text:f,unique:!1,classes:r.classes,persistant:!0,hideOnFocus:h}))}}}i=!1},l=function(e){for(var t="",r=0;r<e.length;r++)switch(e.charAt(r)){case"N":t+="[0-9]{1}";break;case"F":t+="[0-9]{0,1}";break;case"A":t+="[a-zA-Z]{1}";break;case"Z":t+="[a-zA-Z]{0,1}";break;default:t+=("[]_\\(){}-.+*?".indexOf(e.charAt(r))?"\\":"")+e.charAt(r)}return t="^"+t+"$",new RegExp(t)},c=function(){n.find("input.mandatory").removeClass("mandatoryInvalid");n.find(".mandatory").not(":checkbox").not(":radio").each(function(){var t=e(this).val();t||t===0||f(this,"form_mandatory")});n.find(".mandatory:checkbox").each(function(){this.checked==0&&f(this,"form_mandatory")});n.find(".mandatory:radio").each(function(){e(".mandatory[name="+e(this).attr("name")+"]:checked").length==0&&f(this,"form_mandatory")});n.find("[class*=equalTo]").each(function(){for(var r,t=e(this).attr("class").split(" "),n=0;n<t.length;n++)t[n].substring(0,7)=="equalTo"&&(r=t[n].substring(8,t[n].length-1),e(this).val()!=e("#"+r).val()&&f(this,"form_equal"))});n.find("[class*=valMinLength]").each(function(){for(var r,t=e(this).attr("class").split(" "),n=0;n<t.length;n++)t[n].substring(0,12)=="valMinLength"&&(r=parseInt(t[n].substring(13,t[n].length-1)),e(this).val().length<r&&f(this,"form_length"))});n.find("[class*=valLength]").each(function(){for(var r,t=e(this).attr("class").split(" "),n=0;n<t.length;n++)t[n].substring(0,9)=="valLength"&&(r=parseInt(t[n].substring(10,t[n].length-1)),e(this).val().length!=r&&f(this,"form_length"))});n.find(".valChars").each(function(){e(this).val()!=""&&/^\D*$/.test(e(this).val())==0&&f(this,"form_characters")});n.find(".valGenTelephone").each(function(){e(this).val()!=""&&/^[0-9\-\.\/\(\)\s]*$/.test(e(this).val())==0&&f(this,"form_telephone")});n.find(".valTelephone").each(function(){e(this).val()!=""&&/^[0-9 \-\.\/]*$/.test(e(this).val())==0&&f(this,"form_telephone")});n.find(".valUSTelephone").each(function(){e(this).val()!=""&&/^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/.test(e(this).val())==0&&f(this,"form_telephone")});n.find(".valDate").each(function(){e(this).val()!=""&&/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/.test(e(this).val())==0&&f(this,"form_date")});n.find(".valDate2").each(function(){e(this).val()!=""&&/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2,4}$/.test(e(this).val())==0&&f(this,"form_date")});n.find(".valUSDate").each(function(){e(this).val()!=""&&/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/.test(e(this).val())==0&&f(this,"form_date")});n.find("[class*=datePicker]").each(function(){var t=e(this),n,r;t.attr("class").match(/datePicker\[(.*),([\d]{1})\]/);t.val()!=""&&RegExp.$1!=""&&RegExp.$2!=""&&(n=RegExp.$1,n=n.replace(/\//g,"\\/").replace(/\s/g,"\\s+").replace(/\-/g,"\\-").replace(/\./g,"\\.").replace(/\[dd\]/g,"\\d{1,2}").replace(/\[mm\]/g,"\\d{1,2}").replace(/\[yy\]/g,"\\d{2}").replace(/\[yyyy\]/g,"\\d{4}").replace(/\[DD\]/g,"[^\\d]+").replace(/\[MM\]/g,"[^\\d]+").replace(/\[D\]/g,"[^\\d]+").replace(/\[M\]/g,"[^\\d]+"),n="^"+n+"$",r=new RegExp(n),r.test(e(this).val())||f(this,"form_date"))});n.find("[class*=valCDate]").each(function(){for(var r,i,t=e(this).attr("class").split(" "),n=0;n<t.length;n++)e(this).val()!=""&&t[n].substring(0,8)=="valCDate"&&(r=t[n].substring(9,t[n].length-1),r=r.replace(/\_/g,"\\s").replace(/\//g,"\\/").replace(/\-/g,"\\-").replace(/\./g,"\\.").replace(/\[dd\]/g,"\\d{1,2}").replace(/\[mm\]/g,"\\d{1,2}").replace(/\[yy\]/g,"\\d{2}").replace(/\[yyyy\]/g,"\\d{4}").replace(/\[DD\]/g,"[\\wìòàùèé']+").replace(/\[MM\]/g,"[\\wìòàùèé']+").replace(/\[D\]/g,"[\\wìòàùèé']+"),r=r.replace(/\[M\]/g,"[\\wìòàùèé']+"),r="^"+r+"$",i=new RegExp(r),i.test(e(this).val())||f(this,"form_date"))});n.find(".valEmail").each(function(){var n=e(this),r=n.val();r.length>0&&!t.utils.isValidEmail(r)&&f(this,"form_email")});n.find(".valPassword").each(function(){var n=e(this),r=n.val();r.length>0&&n.hasClass("requirePolicy")&&!t.passwordpolicy.isValidPassword(r)&&f(this,t.passwordpolicy.getPolicy())});n.find(".valCF").each(function(){e(this).val(e(this).val().toUpperCase());e(this).val()!=""&&/^[A-Z]{6}\d{2}[A-Z]\d{2}[A-Z]\d{3}[A-Z]$/.test(e(this).val())==0&&/^[0-9]+$/.test(e(this).val())==0&&f(this,"form_CF")});n.find(".valURL").each(function(){e(this).val()!=""&&/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e(this).val())==0&&f(this,"form_URL")});n.find(".valUSZIP").each(function(){e(this).val(e(this).val().toUpperCase());e(this).val()!=""&&/(^\d{5}$)|(^\d{5}-\d{4}$)/.test(e(this).val())==0&&f(this,"form_format")});n.find("[class*=valCustom]").each(function(){for(var r,t=e(this).attr("class").split(" "),n=0;n<t.length;n++)e(this).val()!=""&&t[n].substring(0,9)=="valCustom"&&(r=t[n].substring(10,t[n].length-1),r=l(r),e(this).val()!=""&&e(this).val()!=""&&r.test(e(this).val())==0&&f(this,"form_format"))});n.find("[class*=valVAT]").each(function(){return!0});n.find("input.valDisclaimer").each(function(){this.checked||f(e(this),"form_err_disclaimer")});n.find("input[data-extensions]").each(function(){var t=e(this),n=[],r,i=!1,s=t.val(),o=s.lastIndexOf("."),u=t.attr("data-extensions");if(!!u&&!!s&&o>-1){for(s=s.substring(o+1),n=u.split(","),r=0;r<n.length;r++)s==n[r]&&(i=!0);i||f(e(this),"form_format")}});t.imForm.checkCaptcha(n)||(t.imForm.resetCaptcha(n),f(t.imForm.getCaptchaField(n),"form_captcha"));n.find("input[type=submit]").attr("disabled",!1).attr("value",o);n.find(a+"_fakebutton2").attr("disabled",!1).attr("value",u);n.find("[class*=valQuestion]").each(function(){var r=e(this),i=r.attr("class"),s=e(n).attr("action"),o,u,a;i.match(/valQuestion\[([A-Za-z0-9]+)\]/);t.utils.isOnline()?RegExp.$1!=""&&(o=r,e.ajax({type:"POST",url:s,data:{action:"check_answer",id:RegExp.$1,answer:o.val()},async:!1,cache:!1,success:function(t){t==="0"&&f(e(o),"form_question")}})):(u=r.attr("data-answer").replace(/\"/g,"'").replace(/\</g,"&lt;").replace(/\>/g,"&gt;"),a=r.val().replace(/\"/g,"'").replace(/\</g,"&lt;").replace(/\>/g,"&gt;"),u!=a&&f(r,"form_question"))})};return r.type=="tip"&&e("."+t.imTip.constants.classId).remove(),n.find("[type=submit]").length>0&&(o=e(n).find("[type=submit]").attr("value"),n.find("input[type=submit]").attr("disabled",!0).attr("value",t.l10n.get("form_validating"))),n.find(a+"_fakebutton2").length>0&&(u=n.find(id+"_fakebutton2").attr("value"),n.find(a+"_fakebutton2").attr("disabled",!0).attr("value",t.l10n.get("form_validating"))),c(),i},submit:function(n,r){n=e(n);t.imForm.validate(n,r)&&(t.utils.isOnline()?n.off("submit").submit():t.utils.showOfflineMessage(r.offlineMessage))}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{fullHeightRows:function(){var n,r,i=[],s=[],o,u,a=!1,f=!1,l=!1,c=!1,h,p,d,v,m,g,y,b=-1,w=function(){e.each(i,function(){var t=e(this);t.on("rowEntersInViewport",function(){C(t[0])})});e("body").on("touchstart",function(){f=!0});e("body").on("touchend",function(){f=!1;p&&C(p)});var n=function(e){l&&e.preventDefault()},r=t.utils.isAddEventListenerPassiveOptionSupported()?{passive:!1}:!1;window.addEventListener("wheel",n,r);window.addEventListener("mousewheel",n,r);window.addEventListener("DOMMouseScroll",n,r);window.addEventListener("MozMousePixelScroll",n,r)},E=function(){var t=e("<div />"),i=n.scrollButton,s=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;e("#imPageRowScrollButton").length==0&&(t.attr("id","imPageRowScrollButton").width(i.width).height(i.height).css({position:"fixed","z-index":5e3,bottom:i.distanceBottom,left:"calc(50% - "+i.width/2+"px)","background-image":'url("'+i.url+'")',"background-repeat":"no-repeat",cursor:"pointer","background-position":"0 0",display:"none"}),r.append(t));t.click(function(){b=-1;var e=o.nextAll(".imPageRow:first").length>0?o.nextAll(".imPageRow:first"):null,t=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset,n=o.offset().top;Math.round(n-t)>1?C(o[0],!0):e!=null&&(C(e[0],!0),o=e)});n.scrollButton.type!="visibleonmousemove"&&(u-s>0&&(a=!0,e("#imPageRowScrollButton").fadeIn()),e(".imPageRow:last").on("rowFillsViewport",function(){a=!1;e("#imPageRowScrollButton").fadeOut()}))},S=function(){e(window).mousemove(function(t){a&&(v!==t.clientX||m!==t.clientY)&&(clearInterval(d),d=setInterval(T,500),e("#imPageRowScrollButton").is(":hidden")&&e("#imPageRowScrollButton").fadeIn());v=t.clientX;m=t.clientY})},x=function(){typeof d!="undefined"&&clearInterval(d);d=setInterval(T,500);a||e("#imPageRowScrollButton").fadeOut()},T=function(){e("#imPageRowScrollButton").is(":hover")||e("#imPageRowScrollButton").fadeOut()},N=function(){var t=i.length,s=e("<div />"),o="",u=n.bullets,a=u.position,f;for(s.attr("id","imPageRowBullets").width(u.size).height(u.size*t).css({position:"fixed","z-index":5e3,top:"calc(50% - "+u.size*t/2+"px)",left:a=="right"?"auto":u.distanceLeft,right:a=="left"?"auto":u.distanceRight,display:"none"}),r.append(s),f=0;f<t;f++)o+='<div data-row="'+i[f].attr("id")+'"><\/div>';s.html(o).find("div").css({display:"block","background-image":'url("'+u.url+'")',"background-repeat":"no-repeat",cursor:"pointer","background-position":"0 0"}).width(u.size).height(u.size).click(function(t){var n=e("#"+e(t.target).data("row"));C(n[0],!0)});s.fadeIn();e.each(i,function(){var t=e(this);t.on("rowFillsHalfViewport",function(){s.find("div").css("background-position","0 0");s.find('[data-row="'+t.attr("id")+'"]').css("background-position",-u.size+"px 0")})})},C=function(r,i){var v;if(i=i||!1,f){p=r;return}if(typeof p!="undefined"&&h===p){p=undefined;return}var s=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset,o=window.innerHeight,u=r.offsetHeight,a=e(r).offset().top,l=a+u,d=s;if(c||Math.round(a-s)<-1&&Math.round(l-(s+o))>1)return!1;if(s>0||i){if(d=Math.round(s-a)<-1?a:Math.round(u-o)>1?u+a-o:a,Math.abs(b-d)<1||g!=undefined&&g!=r)return y=r,!1;g=r;b=d;v={duration:n.autoscroll.autoscrollDuration,start:function(){e("body").trigger("fullHeightRowsAutoscrollAnimationInProgress",r)},complete:function(){e("body").trigger("fullHeightRowsAutoscrollAnimationCompleted",r)}};t.utils.scrollTo(d,v)}};return{start:function(f){n=e.extend(!0,{scrollingEffect:"none",autoscroll:{active:!1,autoscrollDuration:1e3},scrollButton:{show:!1,url:null,type:"visible",width:20,height:20,distanceBottom:10},bullets:{show:!1,url:null,size:22,position:"right",distanceLeft:10,distanceRight:10}},f);r=e("#imContent");u=e(".imPageRow:last").offset().top;e(".imPageRow").each(function(){var t=e(this);t.on("rowEntersInViewport",function(){o=t;n.scrollButton.show&&(E(),a=!t.is(e(".imPageRow:last"))||s.length!=0,n.scrollButton.type=="visibleonmousemove"&&x());s.indexOf(t)==-1&&s.push(t)});i.push(t)});e(".imPageRow:last").on("rowFillsViewport",function(){n.scrollButton.show&&(a=!1,n.scrollButton.type=="visibleonmousemove"&&x())});e("body").on("fullHeightRowsAutoscrollAnimationInProgress",function(){l=!0});e("body").on("fullHeightRowsAutoscrollAnimationCompleted",function(e,t){h=t;g=undefined;l=!1;y==t?y=undefined:y!=undefined&&C(y)});e("body").on("pageToTopAnimationInProgress scrollToAnchorAnimationInProgress",function(){b=-1;c=!0});e("body").on("pageToTopAnimationCompleted scrollToAnchorAnimationCompleted",function(){c=!1});!t.responsive.isMobileDevice()&&n.autoscroll.active&&w();n.scrollButton.show&&n.scrollButton.type=="visibleonmousemove"&&S();n.bullets.show&&N();t.pageRowsObserver.start()}}}()})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{gallery:function(n){var r=e.extend(!0,{target:"",media:[],startFrom:0,width:400,height:400,backgroundColor:"#f7f7f7",helperBg:"black",swipeImage:"res/imSwipe.png",thumbsArrowLImage:"res/imArrL.png",thumbsArrowRImage:"res/imArrR.png",thumbsArrowUImage:"res/imArrT.png",thumbsArrowDImage:"res/imArrB.png",description:{backgroundColor:"#444",color:"white",alpha:.8,alignment:"center",fontFamily:"Arial",fontSize:14,fontStyle:"normal",fontWeight:"normal"},thumbs:{position:"none",number:4,size:20},disableTouch:!1,autoplay:!1,music:null,controlBar:{show:!1,height:28,color:"#f7f7f7",alpha:1,image:null},buttons:{playImage:"",pauseImage:"",nextImage:"",prevImage:""},random:!1,fullScreen:!1,slideshow:{active:!1,nextPrevMode:"hover",buttonPrev:{url:"",x:0,y:0,width:0,height:0},buttonNext:{url:"",x:0,y:0,width:0,height:0}},bullets:{show:!1,url:null,size:22,positionX:"center",positionY:"bottom",distanceTop:30,distanceBottom:30,distanceLeft:10,distanceRight:10}},n),i=e(r.target),s=[],o=null,u=null,a=navigator.userAgent.toLowerCase(),f=e("html").hasClass("touchevents"),l=null,c=!1,h=null,p=0,d=0,v=null,m=0,g=null,y=0,b=0,w=null,E=null,S=null,x=null,T=null,N=null,C=null,k=null,L=t.utils.hex2rgb(r.controlBar.color,-50,-50,-50),A=t.utils.hex2rgb(r.controlBar.color,-20,-20,-20,!0),O=e.Callbacks(),M=e(document),_=e("body"),D=e(window),P=null,H=null,B="autoplay_start",j="autoplay_stop",Z,et,ut,vt,mt,gt,Nt,Ct,kt,Dt,Pt,Ht,Bt,jt,Ft;r.thumbs.number=r.thumbs.position==="top"||r.thumbs.position==="bottom"?Math.floor(r.width/r.thumbs.size):Math.floor(r.height/r.thumbs.size);r.thumbs.number=Math.min(r.thumbs.number,r.media.length);p=(r.thumbs.position=="bottom"||r.thumbs.position=="top"?r.width:r.height)%(r.thumbs.number*r.thumbs.size);p=Math.round(p/r.thumbs.number/2);d=r.thumbs.size+2*p;var F=function(t,n,u,a){if(o===t||t===null||t===undefined||s[t]===null||s[t]===undefined)return!1;(n===null||n===undefined)&&(n=!0);(u===null||u===undefined)&&(u=!1);(a===null||a===undefined)&&(a=!1);s[t].DOMObject().css("display","none");o!==null&&o!==undefined?(s[o].DOMObject().after(s[t].DOMObject()),s[o].AnimateOut(G,function(e){e.DOMObject().detach()},u)):G.prepend(s[t].DOMObject());o=t;s[o].AnimateIn(G,function(){a&&R(o);O.fire(o)},u);w!==null&&w.html(o+1+"/"+s.length);var c=s[o].GetDescription();c!==null&&c!==undefined&&c!==""?(l===null&&(l=e("<div />").attr("id",i.attr("id")+"_description").css({position:"absolute",left:0,right:0,bottom:0,"background-color":r.description.backgroundColor,display:"none",color:r.description.color,"text-align":r.description.alignment,padding:2,"font-family":r.description.fontFamily,"font-size":r.description.fontSize,"font-style":r.description.fontStyle,"font-weight":r.description.fontWeight}),G.append(l)),l.stop(!1,!1).fadeOut(250,function(){l.html(c.replace(/\n/g,"<br />"));n&&l.stop(!1,!1).fadeTo(250,r.description.alpha)}),f||i.mouseenter(function(){l!==null&&l.stop(!1,!1).fadeOut(250)}).mouseleave(function(){l!==null&&l.stop(!1,!1).fadeTo(250,r.description.alpha)})):l!==null&&l.stop(!1,!1).fadeOut(250,function(){l.detach();l=null})},I=function(){var e=o;(++e>=s.length||s[e]===null||s[e]===undefined)&&(e=0);F(e,(f||c)&&(E===null||E===undefined||E.css("display")=="none"),!1,!0)},q=function(){var e=o;(--e<0||s[e]===null||s[e]===undefined)&&(e=s.length-1);F(e,(f||c)&&(E===null||E===undefined||E.css("display")=="none"),!0,!0)},R=function(e){if(r.thumbs.position!="embed"&&r.thumbs.position!="none"&&r.thumbs.number>=s.length||r.thumbs.position=="embed"&&b/r.thumbs.size>=s.length)return!1;if(e=Math.max(0,Math.min(e,s.length)),ut!==null&&ut!==undefined){var t=e,n;r.thumbs.position!="embed"?(t=r.thumbs.position=="top"||r.thumbs.position=="bottom"?d*(t+1)-Y.width()/2:d*(t+1)-Y.height()/2,n=Math.abs(t%d)):(t=r.thumbs.size*(t+1)-Y.width()/2,n=Math.abs(t%r.thumbs.size));n>d/2?t-=n:t+=n;r.thumbs.position=="top"||r.thumbs.position=="bottom"||r.thumbs.position=="embed"?ut.stop(!1,!1).animate({left:Math.min(0,Math.max(-t,-ut.width()+Y.width()))}):ut.stop(!1,!1).animate({top:Math.min(0,Math.max(-t,-ut.height()+Y.height()))})}},U=function(){return c||(c=!0,V(),K.trigger(B)),h=setTimeout(function(){I();h!==null&&(clearTimeout(h),h=null);U()},s[o].AutoplayTime()),!0},z=function(){var n=r.thumbs.position,i=r.media,u,a,f,l;for(W(),u=[],a=0;a<i.length;a++)f=s[a].GetDescription(),u[a]={url:i[a].hiresUrl!==null&&i[a].hiresUrl!==""&&i[a].hiresUrl!==undefined?i[a].hiresUrl:i[a].url,type:i[a].type,width:i[a].hiresWidth,height:i[a].hiresHeight,thumbUrl:i[a].thumbUrl,description:f!==null&&f!==undefined?f:""};l={showThumbs:n!="none",media:u};t.imShowBox(l,o,e(r.target))},W=function(){return J(),h!==null&&(clearTimeout(h),h=null,s[o].Stop()),c=!1,K.trigger(j),!0},X=function(n){var c;if(r.media[n]===undefined||r.media[n]===null){u!==null&&(u.remove(),u=null);r.thumbs.position==="bottom"||r.thumbs.position==="top"?ut.width(s.length*d):r.thumbs.position!=="embed"&&r.thumbs.position!=="none"&&ut.height(s.length*d);return}n===0&&G.prepend(t.settings.imLoadingAnimation);var i=s.length,a=r.media[n].width,l=r.media[n].height;a>r.width&&(l=r.width/a*l,a=r.width);l>r.height&&(a=r.height/l*a,l=r.height);c=new t.mediaObject(e.extend(r.media[n],{showControls:r.media[n].showControls||f,touchDevice:f,contentWidth:Q().width,contentHeight:Q().height,width:a,height:l,load:function(a){s[i]=a;i===r.startFrom&&(G.find(".imLoadAnim").remove(),u===null&&ut!==null&&ut!==undefined&&(u=e("<div />").css({float:"left"}).width(r.thumbs.size).height(r.thumbs.size).prepend(t.settings.imLoadingAnimation),ut.append(u)),F(r.startFrom),r.autoplay===!0&&U());var l=a.GetThumb();l.click(function(){W();F(i,(r.thumbs.position!=="embed"||f)&&(!E||E.css("display")=="none"))}).css({float:"left",display:"none",cursor:"pointer"}).width(r.thumbs.size).height(r.thumbs.size);r.thumbs.position=="bottom"||r.thumbs.position=="top"?l.css("margin","0 "+Math.ceil(p)+"px 0 "+Math.floor(p)+"px"):(r.thumbs.position=="left"||r.thumbs.position=="right")&&l.css("margin",Math.ceil(p)+"px 0 "+Math.floor(p)+"px 0");r.thumbs.position=="embed"&&l.mouseenter(function(){e(".im-big-thumb").remove();var t=l.offset().left-G.offset().left,n=e("<img />").addClass("im-big-thumb");G.append(n);n.one("load",function(){var e=Math.min(Q().width-n.width(),Math.max(0,t+(r.thumbs.size-n.width())/2));n.css("left",e).fadeIn(250)}).css({position:"absolute",display:"none",bottom:r.controlBar.height}).attr("src",l.attr("src")).attr("alt","");l.off("mouseleave").mouseleave(function(){n!==null&&n.stop(!1,!1).fadeOut(250,function(){n.remove()})})});(r.thumbs.position==="bottom"||r.thumbs.position==="top")&&ut.width((s.length+1)*d);u?u.before(l):!ut||ut.append(l);l.fadeIn();f&&!r.disableTouch&&s[i].AfterMove(function(e,t){e.preventDefault();r.controlBar.show&&r.media.length>1&&(w.html(o+1+"/"+s.length),v.stop(!1,!1).fadeIn(),!g||(clearTimeout(g),g=null),g=setTimeout(function(){v.fadeOut()},2e3));!P||(P.attr("data-hide")=="false"?P.attr("data-hide","true"):P.stop(!1,!1).fadeOut(),!H||(clearTimeout(H),H=null),H=setTimeout(function(){P.stop(!1,!1).fadeIn()},7e3));W();(Math.abs(t.offsetX)>Math.abs(t.offsetY)?t.offsetX:t.offsetY)<0?I():q()});w!==null&&w.html(o+1+"/"+s.length);X(n+1)},error:function(e){c=null;e=null;X(n+1)}}))},V=function(){kt!==null&&kt.Play()},J=function(){kt!==null&&kt.Pause()},K=e("<div />").css({position:"relative","background-color":r.backgroundColor,margin:"0 auto"}).width(r.width).height(r.height),Q=function(){return{width:r.thumbs.position=="right"||r.thumbs.position=="left"?r.width-r.thumbs.size:r.width,height:r.thumbs.position=="top"||r.thumbs.position=="bottom"?r.height-r.thumbs.size:r.height}},G=e("<div />").css({overflow:"hidden",position:"absolute",top:r.thumbs.position!=="top"?"0":"auto",bottom:r.thumbs.position!=="bottom"?"0":"auto",left:r.thumbs.position!=="left"?"0":"auto",right:r.thumbs.position!=="right"?"0":"auto",margin:"0 auto"}).width(Q().width).height(Q().height),Y=e("<div />");if(K.append(G),r.thumbs.position!=="embed"&&K.append(Y),i.empty().append(K),i.css("position")=="static"&&i.css("position","relative"),(r.controlBar.show===!0||r.controlBar.show==="outside")&&!f){if(E=e("<div />").css({position:"absolute",top:r.controlBar.show==="outside"?Q().height:"auto",bottom:r.controlBar.show==="outside"?"auto":0,left:0,right:0,"background-color":r.controlBar.color}).height(r.controlBar.height),r.controlBar.image===null||r.controlBar.image===undefined||r.controlBar.image===""?E.css("background-image",t.utils.cssPropertyPrefix("linear-gradient(bottom, "+t.utils.hex2rgb(r.controlBar.color,-50,-50,-50,!0)+" 0%, "+r.controlBar.color+" 50%, "+t.utils.hex2rgb(r.controlBar.color,50,50,50,!0)+" 100%)")):E.css("background-image",r.controlBar.image!==""&&r.controlBar.image!==undefined&&r.controlBar.image!==null?"url('"+r.controlBar.image+"')":"none"),r.controlBar.show==="outside"?G.after(E):G.append(E),Z=function(){var t=null;r.buttons.playImage===""||r.buttons.playImage===undefined||r.buttons.playImage===null?(t=e("<div />").css({"background-color":"transparent","border-style":"solid"}),c?t.css({position:"static",margin:(C.height()-16)/2+"px "+C.height()/3+"px","border-width":"0 3px 0 3px","border-color":L,"border-radius":0}).width(4).height(16):t.css({margin:(C.height()-20)/2+"px "+C.height()/3+"px","border-width":10,"border-color":"transparent transparent transparent "+L,"border-radius":3}).width(1).height(1)):t=e("<img />").attr("src",c?r.buttons.pauseImage:r.buttons.playImage).attr("alt",c?"pause":"play");C.empty().append(t)},C=r.buttons.playImage===null||r.buttons.playImage===undefined||r.buttons.playImage===""?e("<div />").css({float:"left",cursor:"pointer","border-right":"1px solid "+A}).width(r.controlBar.height-1).height(r.controlBar.height):e("<div />").attr("src",r.buttons.playImage).css({float:"left",cursor:"pointer"}),C.click(function(e){e.preventDefault();c?W():U()}),Z(),K.on(B,Z).on(j,Z),E.append(C),et=e("<span />").html(r.media.length+"/"+r.media.length),E.append(et),m=et.width()+(r.slideshow.active?14:54),et.remove(),et=null,v=e("<div />").css({position:"absolute",right:0,top:0,"border-left":"1px solid "+A,"text-align":"center",overflow:"hidden"}).height(r.controlBar.height).width(m),E.append(v),v.append(w=e("<span />").css({color:L,"font-family":"arial","font-size":"11pt","line-height":r.controlBar.height+"px",padding:"0 5px"}).html(r.media.length+"/"+r.media.length)),r.slideshow.active||(T=r.buttons.prevImage===""||r.buttons.prevImage===null||r.buttons.prevImage===undefined?e("<div />").css({color:L,cursor:"pointer","line-height":r.controlBar.height+"px","font-size":r.controlBar.height-5,"font-family":"Arial",float:"left",padding:"0 0 0 5px"}).html("&lt;"):e("<img />").attr("src",r.buttons.prevImage).attr("alt",t.l10n.get("common_prev")).css({cursor:"pointer"}),v.prepend(T.click(function(e){return e.preventDefault(),W(),q(),!1}).on("selectstart mousedown",function(){return!1})),N=r.buttons.nextImage===""||r.buttons.nextImage===null||r.buttons.nextImage===undefined?e("<div />").css({color:L,cursor:"pointer","line-height":r.controlBar.height+"px","font-size":r.controlBar.height-5,"font-family":"Arial",float:"right",padding:"0 5px 0 0"}).html("&gt;"):e("<img />").attr("src",r.buttons.nextImage).attr("alt",t.l10n.get("common_next")).css({cursor:"pointer"}),v.append(N.click(function(e){return e.preventDefault(),W(),I(),!1}).on("selectstart mousedown",function(){return!1}))),r.fullScreen){k=e("<div />").css({position:"absolute",top:0,right:m,"border-left":"1px solid "+A,cursor:"pointer"}).width(r.controlBar.height).height(r.controlBar.height).attr("title","Full Screen").click(function(){z()});E.append(k);var tt=6,nt=3,rt=e("<div />"),it=e("<div />"),st=e("<div />"),ot=e("<div />");k.append(rt.add(it).add(st).add(ot).css({"border-color":L,"border-style":"solid",position:"absolute"}).width(nt).height(nt));rt.css({top:tt,left:tt,"border-width":"2px 0 0 2px"});it.css({top:tt,right:tt,"border-width":"2px 2px 0 0"});st.css({bottom:tt,right:tt,"border-width":"0 2px 2px 0"});ot.css({bottom:tt,left:tt,"border-width":"0 0 2px 2px"})}y=E.width()-C.outerWidth()-v.outerWidth()-(k?k.outerWidth():0);r.controlBar.show!=="outside"&&(E.hide(0),i.mouseenter(function(){E.stop(!1,!1).fadeTo(250,r.controlBar.alpha)}).mouseleave(function(){E.stop(!1,!1).fadeOut(250)}))}ut=null;switch(r.thumbs.position){case"top":case"bottom":case"left":case"right":Y.css({overflow:"hidden",position:"absolute",top:r.thumbs.position!=="bottom"?0:"auto",bottom:r.thumbs.position!=="top"?0:"auto",left:r.thumbs.position!=="right"?0:"auto",right:r.thumbs.position!=="left"?0:"auto"});Y.width(r.thumbs.position==="bottom"||r.thumbs.position==="top"?r.width:r.thumbs.size);Y.height(r.thumbs.position==="bottom"||r.thumbs.position==="top"?r.thumbs.size:r.height);ut=e("<div />");Y.append(ut);r.thumbs.position!=="bottom"&&r.thumbs.position!=="top"?ut.width(r.thumbs.size):(r.thumbs.position==="bottom"||r.thumbs.position==="top")&&ut.height(r.thumbs.size);ut.css({position:"absolute",top:0,left:0});var at=Y.offset(),ft=Y.width(),lt=Y.height(),ct=r.thumbs.number*d;if(f){if(!r.disableTouch){var yt=null,bt=null,wt=!1,Et=null,St=0,xt,Tt;Y[0].addEventListener("touchstart",function(e){ut.stop(!0,!1);e.touches.length==1&&(e.preventDefault(),Et=e.target,xt=Math.round(ut.css("left").replace(/px/g,"")*1),Tt=Math.round(ut.css("top").replace(/px/g,"")*1),yt=e.touches[0].pageX,bt=e.touches[0].pageY);wt=!1});Y[0].addEventListener("touchmove",function(e){var t,n;e.preventDefault();t=null;e.touches.length==1&&(n=e.touches[0],wt=!0,ut.stop(!0,!1),r.thumbs.position=="top"||r.thumbs.position=="bottom"?(St=yt-n.pageX,(xt-St>0||xt-St<-ut.width()+ft)&&(St/=2),window.cancelAnimFrame(t),xt-=St,t=window.requestAnimFrame(function(){ut.css({left:xt})}),yt=n.pageX):(St=bt-n.pageY,(Tt-St>0||Tt-St<-ut.height()+lt)&&(St/=2),window.cancelAnimFrame(t),Tt-=St,t=window.requestAnimFrame(function(){ut.css({top:Tt})}),bt=n.pageY))});Y[0].addEventListener("touchend",function(){var n,i,o;wt?(ut.stop(!0,!1),r.thumbs.position==="top"||r.thumbs.position==="bottom"?(i=0,s.length>r.thumbs.number&&(i=ut.css("left").replace(/px/g,"")*1,i=Math.max(-ut.width()+ft,Math.min(0,i-St*10))),i!==-ut.width()+ft&&i!==0&&(n=Math.abs(i%d),n>d/2?i-=d-n:i+=n),ut.animate({left:i},{duration:1e3,easing:"iOsSwing"})):(o=0,s.length>r.thumbs.number&&(o=ut.css("top").replace(/px/g,"")*1,o=Math.max(-ut.height()+lt,Math.min(0,o-St*10))),o!==-ut.height()+lt&&o!==0&&(n=Math.abs(o%d),n>d/2?o-=d-n:o+=n),ut.animate({top:o},{duration:1e3,easing:"iOsSwing"})),St=0):Et!==null&&(e(Et).click(),Et=null)})}}else if(r.media.length>r.thumbs.number)if(r.thumbs.position==="top"||r.thumbs.position==="bottom"){var ht=Y.height(),pt=e("<img />").css({cursor:"pointer",left:0,position:"absolute",display:"none"}).click(function(){var e=ut.css("left").replace(/px/g,"")*1;e-=e%d;ut.stop(!1,!1).animate({left:Math.min(0,e+ct)})}).one("load",function(){Y.append(pt);pt.css("top",(ht-pt.height())/2)}).attr("src",r.thumbsArrowLImage).attr("alt",t.l10n.get("common_prev")),dt=e("<img />").width(22).css({cursor:"pointer",right:0,position:"absolute",display:"none"}).click(function(){var e=ut.css("left").replace(/px/g,"")*1;e-=e%d;ut.stop(!1,!1).animate({left:Math.max(-ut.width()+ft,e-ct)})}).one("load",function(){Y.append(dt);dt.css("top",(ht-dt.height())/2)}).attr("src",r.thumbsArrowRImage).attr("alt",t.l10n.get("common_next"));Y.mouseenter(function(){pt.add(dt).stop(!1,!1).fadeTo(250,.925)}).mouseleave(function(){pt.add(dt).stop(!1,!1).fadeOut(250)})}else vt=e("<img />"),mt=Y.width(),Y.append(vt),vt.height(22).css({cursor:"pointer",top:0,position:"absolute",display:"none"}).click(function(){var e=ut.css("top").replace(/px/g,"")*1;e-=e%d;ut.animate({top:Math.min(0,e+ct)})}).one("load",function(){Y.append(vt);vt.css("left",(mt-vt.width())/2)}).attr("src",r.thumbsArrowUImage).attr("alt",t.l10n.get("common_prev")),gt=e("<img />"),Y.append(gt),gt.height(22).css({cursor:"pointer",bottom:0,position:"absolute",display:"none"}).click(function(){var e=ut.css("top").replace(/px/g,"")*1;e-=e%d;ut.animate({top:Math.max(-ut.height()+lt,e-ct)})}).one("load",function(){Y.append(gt);gt.css("left",(mt-gt.width())/2)}).attr("src",r.thumbsArrowDImage).attr("alt",t.l10n.get("common_next")),Y.mouseenter(function(){vt.add(gt).stop(!1,!1).fadeTo(250,.925)}).mouseleave(function(){vt.add(gt).stop(!1,!1).fadeOut(250)});break;case"embed":r.controlBar.show&&!f&&(Nt=!1,Ct=0,b=r.width-(r.slideshow.active?110:180),b-=b%r.thumbs.size,Nt=b/r.thumbs.size<r.media.length&&!f,Nt&&(y-=46),y-=y%r.thumbs.size,Ct=r.width-y-(Nt?46:0)-(C!==null?C.width():0)-(k!==null?k.width():0)-(v!==null?v.width():0),Ct/=2,b>0&&(Y.css({position:"relative",float:"left",overflow:"hidden","margin-top":(r.controlBar.height-r.thumbs.size)/2,"background-color":"#444"}).width(y).height(r.thumbs.size),C.after(Y),ut=e("<div />").css({position:"absolute",top:0,left:0}).width(r.thumbs.size*r.media.length),Y.append(ut),Nt?(Y.before(S=e("<div />")),S.css({"margin-top":(r.controlBar.height-r.thumbs.size)/2+2,"margin-right":3,"margin-left":Ct,height:0,"border-width":r.thumbs.size/2-2,"border-color":"transparent "+L+" transparent transparent","border-style":"solid",width:0,cursor:"pointer",float:"left","border-radius":3}).click(function(){var e=ut.css("left").replace(/px/g,"")*1;ut.animate({left:Math.min(0,e+Y.width())})}),Y.after(x=e("<div />")),x.css({"margin-top":(r.controlBar.height-r.thumbs.size)/2+2,"margin-left":3,height:0,"border-width":r.thumbs.size/2-2,"border-color":"transparent transparent transparent "+L,"border-style":"solid",width:0,cursor:"pointer",float:"left","border-radius":3}).click(function(){var e=ut.css("left").replace(/px/g,"")*1;ut.animate({left:Math.max(-ut.width()+Y.width(),e-Y.width())})})):Y.css("margin-left",Ct)))}if(r.slideshow.active&&r.slideshow.nextPrevMode!="none"&&!f&&(e("<img />").one("load",function(){var t=e(this);K.append(T=t.css("display","none"));T.css({position:"absolute",top:(Q().height-r.slideshow.buttonPrev.height)/2+r.slideshow.buttonPrev.y,left:r.slideshow.buttonPrev.x,display:r.slideshow.nextPrevMode=="visible"?"block":"none",cursor:"pointer"}).click(function(e){e.preventDefault();W();q()})}).attr("src",r.slideshow.buttonPrev.url).attr("alt",t.l10n.get("common_prev")),e("<img />").one("load",function(){var t=e(this);K.append(N=t.css("display","none"));N.css({position:"absolute",top:(Q().height-r.slideshow.buttonNext.height)/2+r.slideshow.buttonNext.y,right:r.slideshow.buttonNext.x,display:r.slideshow.nextPrevMode=="visible"?"block":"none",cursor:"pointer"}).click(function(e){e.preventDefault();W();I()})}).attr("src",r.slideshow.buttonNext.url).attr("alt",t.l10n.get("common_next")),r.slideshow.nextPrevMode=="hover"&&i.mouseenter(function(){T.add(N).stop(!1,!1).fadeTo(250,.999)}).mouseleave(function(){T.add(N).stop(!1,!1).fadeOut(250)})),!r.disableTouch&&f&&r.media.length>1&&(P=e('<div data-hide="false" />').css({position:"absolute",bottom:0,right:0}).width(30).height(30).append(e("<div />").css({background:r.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0,"z-index":10}).fadeTo(0,.75)).append(e("<div />").css({background:"transparent url('"+r.swipeImage+"') no-repeat center center",position:"absolute",top:0,bottom:0,left:0,right:0,"z-index":10})).attr("data-hide","true"),G.append(P),w=e("<div />").css({position:"absolute",color:"white","line-height":"30px",top:0,bottom:0,left:0,right:0,"z-index":10}),v=e("<div />").css({position:"absolute",bottom:0,right:0,display:"none","z-index":10}).width(30).height(30).append(e("<div />").css({background:r.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0,"z-index":10}).fadeTo(0,.75)).append(w),G.append(v)),kt=null,r.music!==null&&r.music!==undefined&&(kt=new t.mediaObject({type:"audio",url:r.music})),r.bullets.show&&!!r.bullets.url&&r.media.length>1){var Lt=e("<div />"),At=r.bullets,Ot=At.positionX,Mt=At.positionY,_t=r.media.length*At.size;if(t.responsive.isDesktopMode()||_t<Q().width){for(Lt.width(_t).height(At.size).css({position:"absolute",top:Mt=="top"?r.bullets.distanceTop:Mt=="center"?Q().height/2-At.size/2:"auto",bottom:Mt=="bottom"?r.bullets.distanceBottom:"auto",left:Ot=="left"?r.bullets.distanceLeft:Ot=="center"?Q().width/2-_t/2:"auto",right:Ot=="right"?r.bullets.distanceRight:"auto"}),G.append(Lt),Dt="",Pt=0;Pt<r.media.length;Pt++)Dt+='<div data-num="'+Pt+'"><\/div>';Lt.html(Dt).find("div").css({display:"inline-block","background-image":"url('"+At.url+"')","background-repeat":"no-repeat",cursor:"pointer","background-position":"0 0"}).width(At.size).height(At.size).click(function(){F(e(this).attr("data-num")*1)});O.add(function(e){Lt.find("div").css("background-position","0 0").eq(e).css("background-position",-At.size+"px 0")})}}if(r.random){for(Ht=r.media,Ft=Ht.length;Ft;Bt=Math.round(Math.random()*Ft),jt=Ht[--Ft],Ht[Ft]=Ht[Bt],Ht[Bt]=jt);r.medias=Ht}return X(0),{currentItemIndex:function(){return o},onShowMedia:function(e){return O.add(e),this},showNext:function(){return I(),this},showPrev:function(){return q(),this},stopAutoplay:function(){return W(),this},showMedia:function(e){return F(e,!0,!1,!0),this}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imGrid:{cell:function(t){var n,r,i,s,o,u,a=!1;t=e(t);var f=function(){var e=t.css("height"),n;return t.css("height","auto"),n=t.height(),t.find("[class*=imCpt]").not("iframe").length>0&&(n+=30),t.css("height",e),n},l=function(){var e=t.offset();n=e.top;r=n+t.outerHeight()},c=function(){var e=t.offset();i=e.left;s=i+t.outerWidth()};this.height=function(e){if(e===null||e===undefined)return t.height();t.height(e-(t.outerHeight()-t.height()))};this.pushY=function(e){t.css("top").match(/^([0-9]+)[a-z]*$/);var n=RegExp.$1*1;n+=e;t.css("top",n+"px")};this.html=function(e){if(e===null||e===undefined)return t.html();t.html(e)};this.isAbsolute=function(e){if(e===null||e===undefined)return a;a=e};this.sy=function(){return l(),n};this.ey=function(){return l(),r};this.sx=function(){return c(),i};this.ex=function(){return c(),s};u=t.offset().top;o=f();t.height()<o&&t.height(o)},init:function(){var c,h,p;if(t.settings.imGrid.enabled){var n=[],r=[],i,s,u=e("#imFooPad"),a,f,l=0;for(u.length>0&&(f=u.offset().top,a=f+u.innerHeight()),e("[class*=imGrid]").each(function(){var i=e(this).attr("class"),s,o,u;/imGrid\[[0-9]+,\s*[0-9]+[,]*\s*[0-9]*\]/.test(i)&&(i.match(/imGrid\[([0-9]+),\s*([0-9]+)[,]?\s*([0-9]*)\]/),s=RegExp.$1*1,o=RegExp.$2*1,(n[o]===null||n[o]===undefined)&&(n[o]=[]),(r[s]===null||r[s]===undefined)&&(r[s]=[]),u=new t.imGrid.cell(this),u.isAbsolute(RegExp.$3*1==1),n[o][n[o].length]=u,r[s][r[s].length]=u)}),i=0;i<n.length;i++)if(n[i]!==null&&n[i]!==undefined){for(l=0,s=0;s<n[i].length;s++){if(n[i][s].isAbsolute()&&i!==0)for(c=0;c<n[i-1].length;c++)h=n[i-1][c],p=n[i][s],h.ey()>p.sy()&&(h.sx()<p.ex()||h.ex()>p.sx())&&p.pushY(h.ey()-p.sy());n[i][s].ey()>l&&(l=n[i][s].ey())}for(s=0;s<n[i].length;s++)n[i][s].height(l-n[i][s].sy())}u.length>0&&(l>a?u.remove():u.height(a-f-l-(e("#imBtMn").length>0?e("#imBtMn").outerHeight():0)))}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{image:{activateLazyLoading:function(){e(".imlazyloading[data-src]").each(function(){var n=e(this),r=n.prev("div"),i=n.attr("id"),s=e("<img />").attr("title",n.attr("data-title")).attr("alt",n.attr("data-alt")).addClass("imlazyloading");n.after(s);n.remove();s.attr("id",i);s.fadeOut(0).one("load",function(){r.remove();s.show();s.trigger("imLazyLoadingEnd")});t.utils.onElementInViewPort(r[0],function(){s.attr("src",n.attr("data-src"));s.trigger("imLazyLoadingStart")})})}}})}(_jq,x5engine),function(e,t,n){"use strict";e.extend(t,{imageSequence:function(){function s(){t=[];var r=e(n).height(),i=e("#imPageExtContainer").height();e(".imImageSequence").each(function(){var n=e(this),s=n.data("sequenceType")||"time",f;if(s=="scroll"){var o=n.data("sequencePosition")||0,u=n.data("sequenceCount")||1,a=n.offset().top-r;a<0&&(a=0);f=n.offset().top+n.height();f>i-r&&(f=i-r);var l=Math.abs(f-a)/u,c=a+l*o,h=a+l*(o+1);o==u-1&&(h=i);t.push({image:n,begin:c,end:h})}});u()}function o(){r=[];e(".imImageSequence").each(function(){var t=e(this),n=t.data("sequenceType")||"time",i,s;n=="time"&&(i=t.data("sequencePosition")||0,s=t.data("sequenceCount")||1,r.push({image:t,position:i,count:s,current:0}))})}function u(){n.requestAnimationFrame(function(){var r=e(n).scrollTop();e.each(t,function(e,t){t.begin<=r&&t.end>=r?t.image.css("opacity",""):t.image.css("opacity","0")})})}function a(){n.requestAnimationFrame(function(){e.each(r,function(e,t){t.position==t.current?t.image.css("opacity",""):t.image.css("opacity","0")})})}function f(){e.each(r,function(e,t){t.current++;t.current>=t.count&&(t.current=0)})}var t=[],r=[],i=null;return{start:function(l){s();t.length>0&&(e(n).resize(s),e(n).scroll(u));o();r.length>0&&(a(),i=setInterval(function(){f();a()},l||6e3))}}}()})}(_jq,x5engine,window),function(e,t){"use strict";var n=window.requestAnimFrame,r=window.cancelAnimFrame,i=t.utils,s=t.settings;e.extend(t,{imagefx:{opacityIn:function(t,n){e(t).mouseenter(function(){e(this).stop(!1,!1).fadeTo(null,1)}).mouseleave(function(){e(this).stop(!1,!1).fadeTo(null,n)}).fadeTo(0,n)},opacityOut:function(t,n){e(t).mouseleave(function(){e(this).stop(!1,!1).fadeTo(null,1)}).mouseenter(function(){e(this).stop(!1,!1).fadeTo(null,n)})},border:function(t,n,r){var s=e(t),o=i.supportsCSS("boxShadow"),u=function(e){s.css(o,"0 0 0 "+e+"px "+n)};s.parents(".template-object-wrapper").length&&(s=s.parents(".template-object-wrapper").first());s.on("mouseenter",function(){s.stop(!1,!1).animate({"fake-property":r},{step:u})}).on("mouseleave",function(){s.stop(!1,!1).animate({"fake-property":0},{step:u})})},glow:function(t,n,r){r=r||"#FF9900";n=n||5;var s=e(t),o=i.supportsCSS("boxShadow"),u=function(e){s.css(o,"0 0 "+e+"px 0 "+r)};s.parents(".template-object-wrapper").length&&(s=s.parents(".template-object-wrapper").first());s.on("mouseenter",function(){s.stop(!1,!1).animate({"fake-property":n},{step:u})}).on("mouseleave",function(){s.stop(!1,!1).animate({"fake-property":0},{step:u})})},jump:function(n,r,i,o){o=!!o;n=e(n);r=e(r);var u={top:0,left:0},a=!1,f,l,c=function(){!a&&n.is(":visible")&&(u=n.position(),n.css({position:"absolute",top:u.top,left:u.left,width:n.width(),height:n.height()}),a=!0);f=n.height();l=f+r.css("padding-top").replace(/px/g,"")*1+r.css("padding-bottom").replace(/px/g,"")*1;r.css("min-height",l+"px")},h=function(){n.stop(!1,!1).animate({top:u.top,left:u.left},{duration:100,complete:function(){v.css({overflow:"hidden","z-index":d})}})},p=function(){a=!1;n.css({position:"",top:"",left:"",width:"",height:""})},d,v;n.one("load",c);n.parents("[id*=imCell_]").on("imObjectAnimationEnd",c);var m=null,g=0,y=!0;t.utils.onElementResize(r.parent()[0],function(e){if(y||g==e.width){y&&(y=!1);return}g=e.width;!m||clearTimeout(m);m=setTimeout(function(){p();c()},50)});n.parents("[id*=imCell_]").hasClass("animable")||c();v=n.parents("[id*='imCell']");d=v.css("z-index");n.mouseover(function(){v.css({overflow:"visible","z-index":s.zIndex.menuCell+1});n.stop(!1,!1).animate({top:u.top-f*i/100},{duration:100,complete:function(){o||h()}})}).mouseleave(function(){o&&h()})},rotate:function(t,n,r,o){o||(o=.25);var n=e(n),u=i.supportsCSS("transform"),a=i.supportsCSS("transition"),f,l,c=null;t=e(t).css(a,"all "+o+"s ease-in-out 0s").css(u,"none");u&&a&&(l=t.parents("[id*='imCell']"),f=l.css("z-index"),n.mouseover(function(){l.css({overflow:"visible","z-index":s.zIndex.menuCell+1});c&&clearTimeout(c);c=setTimeout(function(){t.css(u,"rotate("+r+"deg)")},10)}).mouseleave(function(){t.css(u,"rotate(0deg)");c&&clearTimeout(c);c=setTimeout(function(){l.css({overflow:"hidden","z-index":f})},o*1e3)}))},overlay:function(n,r,i,s){var o=e(n),r=e(r),u,a,f,l,c,h,p,d,v,m,g=function(){a=o.position();f=o.height();l=o.width();c=s.substring(s.indexOf("-")+1);h=s.substring(0,s.indexOf("-"));u.css({width:"",height:""});p=u[0].width;d=u[0].height;p>l&&(d=Math.ceil(l/p*d),p=l);d>f&&(p=Math.ceil(f/d*p),d=f);v=a.left+(c=="center"?(l-p)/2:c=="right"?l-p:0);m=a.top+(h=="center"?(f-d)/2:h=="bottom"?f-d:0);u.css({position:"absolute",top:m,left:v,"z-index":3}).width(p).height(d)};e("<img />").one("load",function(){u=e("<img />").css("display","none").one("load",function(){o.after(u);g();u.on("mouseenter",function(){o.triggerHandler("mouseenter")}).on("mouseleave",function(){o.triggerHandler("mouseleave")});r.on("mouseenter",function(){u.stop(!1,!0).fadeIn(250)}).on("mouseleave",function(){u.stop(!1,!0).fadeOut(250)})}).attr("src",t.settings.currentPath+i)}).attr("src",o.attr("src"));o.parents("[id*=imCell_]").on("imObjectAnimationEnd",g);var y=null,b=0,w=!0;t.utils.onElementResize(r[0],function(e){if(w||b==e.width){w&&(w=!1);return}b=e.width;!y||clearTimeout(y);y=setTimeout(function(){g()},50)})},innerZoom:function(n,r,s,o,u){(u===null||u===undefined)&&(u=!0);o=e.extend({family:"tahoma",size:"8pt",color:"black",style:"normal",weight:"normal"},o);n=e(n);r=e(r);var a=i.supportsCSS("opacity"),f=null,l=null,c=null,h,p=n.parents("[id*='imCell_']"),d=n.parents(".template-object-wrapper"),v,m,g=e("body"),y=function(){h=n.width();v=n.height();c=n.attr("style")},b=function(){u||(p.css("overflow","visible"),p.parent().css("overflow-y","visible"))},w=function(){u||(p.css("overflow",""),p.parent().css("overflow-y",""))},E=function(){n.stop(!1,!1).animate({width:h*(u?2:1.5),height:v*(u?2:1.5),top:-v/(u?2:3),left:-h/(u?2:3),opacity:0},{complete:function(){w();n.css("display","none")}})},S=function(){n.css("display","block");n.stop(!1,!1).animate({width:h,height:v,top:0,left:0,opacity:1},{complete:function(){w()}})},x=function(){var r;if(n.parent().is("a")||n.wrap("<div />"),f=n.parent().css({display:"inline-block",position:"relative"}).width(n.width()).height(n.height()-4),l=f.attr("style"),m=e("<span />").css({position:"absolute",top:0,left:0,"font-family":o.family,color:o.color,"font-style":o.style,"font-weight":o.weight,"font-size":o.size,overflow:u?"hidden":"visible","text-align":"center",display:"block",width:"100%"}).html(i.htmlspecialchars_decode(s)),f.prepend(m),n.css({position:"absolute",top:0,left:0,"max-width":"none"}),f.is("a")&&f.find("a").length&&f.find("a").click(function(e){e.stopImmediatePropagation()}),"touchstart"in document||"ontouchstart"in document)(function v(){f.one("click",function(){return E(),!1}).one("mouseleave.innerZoom",function(){b();S();v()})})();else if(r=n.css(t.utils.cssPropertyPrefix("clip-path")),!!r&&r.indexOf("inset")===0&&!!r.match(/([\-0-9\.]+)%/g)&&RegExp.$1*1>0){var a=(100-RegExp.$1*1)/100*Math.max(d.height(),n.height()),c=p.offset(),h=!1;p.on("mousemove.pathInnerZoom",function(e){!h&&e.clientY-c.top<a?(b(),E(),h=!0):h&&e.clientY-c.top>a&&(b(),S(),h=!1)}).on("mouseleave.pathInnerZoom",function(){b();S();h=!1})}else f.on("mouseenter.normalInnerZoom",function(){b();E()}).on("mouseleave.normalInnerZoom",function(){b();S()})},T=function(){f.off("click.normalInnerZoom mouseleave.normalInnerZoom");p.off("mousemove.pathInnerZoom mouseleave.pathInnerZoom");f.is("a")||n.unwrap();!m||(m.remove(),m=null);n.add(f).removeAttr("style");!c||n.attr("style",c);!!l&&!!f&&(f.attr("style",l),f.is("a")&&f.css({width:"100%"}))};n.parents("[id*=imCell_]").hasClass("animable")||y();var N=null,C=0,k=!0;t.utils.onElementResize(r[0],function(e){if(k||C==e.width){k&&(k=!1);return}C=e.width;!N||clearTimeout(N);N=setTimeout(function(){T();y();x()},50)});n.parents("[id*=imCell_]").on("imObjectAnimationEnd",function(){y();x()});u&&n.parent().css("overflow","hidden");!h||!v?n.one("load",function(){y();x()}):x()},pulse:function(n,r,i,s){(s===null||s===undefined)&&(s=!0);n=e(n);r=e(r);var u,a=!1,f,l,c=n.is("img")?n:n.find("img").first(),h=n.parents("[id*='imCell_'], [id*='imHeader_imCell_'], [id*='imFooter_imCell_'], .template-object-wrapper"),p=e("body"),d=function(){s&&h.css("overflow","hidden")},v=function(){h.css("overflow","visible")},m=function(){c.css("height","");c.css("width","");r.css("min-height","");u=r.innerWidth()-r.css("padding-left").replace(/px/g,"")*1-r.css("padding-right").replace(/px/g,"")*1;f=r.innerHeight()-r.css("padding-top").replace(/px/g,"")*1-r.css("padding-bottom").replace(/px/g,"")*1;l=n.position();c.innerWidth(u);f<=0&&(f=c.height());r.css("min-height",r.innerHeight()+"px")},g=function(){n.off("mouseover").on("mouseover",function(){a||(a=!0,n.css({position:"absolute",top:l.top,left:l.left}),d(),n.stop(!1,!1).animate({width:Math.round(u*(1+i)),height:Math.round(f*(1+i)),top:l.top-f*(i/2),left:l.left-u*(i/2)},{duration:100,complete:function(){n.stop(!1,!1).animate({width:u,height:f,top:l.top,left:l.left},{duration:100,complete:function(){a=!1;v();n.css({position:"",top:"",left:"",height:"",width:""})}})}}))})};c.width()>0&&c.height()>0&&!!c.attr("src")&&!n.parents("[id*=imCell_]").hasClass("animable")?(m(),g()):c.one("load",function(){m();g()});n.parents("[id*=imCell_]").on("imObjectAnimationEnd",function(){m();g()});var y=null,b=0,w=!0;t.utils.onElementResize(r[0],function(e){if(w||b==e.width){w&&(w=!1);return}b=e.width;!y||clearTimeout(y);y=setTimeout(function(){m()},50)})}}})}(_jq,x5engine),function(){"use strict";function n(e){this.time=e.time;this.target=e.target;this.rootBounds=e.rootBounds;this.boundingClientRect=e.boundingClientRect;this.intersectionRect=e.intersectionRect||l();this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function r(e,t){var n=t||{};if(typeof e!="function")throw new Error("callback must be a function");if(n.root&&n.root.nodeType!=1)throw new Error("root must be an Element");this._checkForIntersections=s(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=e;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(n.rootMargin);this.thresholds=this._initThresholds(n.threshold);this.root=n.root||null;this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function i(){return window.performance&&performance.now&&performance.now()}function s(e,t){var n=null;return function(){n||(n=setTimeout(function(){e();n=null},t))}}function o(e,t,n,r){typeof e.addEventListener=="function"?e.addEventListener(t,n,r||!1):typeof e.attachEvent=="function"&&e.attachEvent("on"+t,n)}function u(e,t,n,r){typeof e.removeEventListener=="function"?e.removeEventListener(t,n,r||!1):typeof e.detatchEvent=="function"&&e.detatchEvent("on"+t,n)}function a(e,t){var n=Math.max(e.top,t.top),r=Math.min(e.bottom,t.bottom),i=Math.max(e.left,t.left),s=Math.min(e.right,t.right),o=s-i,u=r-n;return o>=0&&u>=0&&{top:n,bottom:r,left:i,right:s,width:o,height:u}}function f(e){var t;try{t=e.getBoundingClientRect()}catch(n){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):l()}function l(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(e,t){for(var n=t;n;){if(n==e)return!0;n=h(n)}return!1}function h(e){var t=e.parentNode;return t&&t.nodeType==11&&t.host?t.host:t&&t.assignedSlot?t.assignedSlot.parentNode:t}if(typeof window=="object"){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var e=window.document,t=[];r.prototype.THROTTLE_TIMEOUT=100;r.prototype.POLL_INTERVAL=null;r.prototype.USE_MUTATION_OBSERVER=!0;r.prototype.observe=function(e){var t=this._observationTargets.some(function(t){return t.element==e});if(!t){if(!e||e.nodeType!=1)throw new Error("target must be an Element");this._registerInstance();this._observationTargets.push({element:e,entry:null});this._monitorIntersections();this._checkForIntersections()}};r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e});this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())};r.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorIntersections();this._unregisterInstance()};r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e};r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if(typeof e!="number"||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})};r.prototype._parseRootMargin=function(e){var t=e||"0px",n=t.split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n};r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(o(window,"resize",this._checkForIntersections,!0),o(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))};r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,u(window,"resize",this._checkForIntersections,!0),u(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))};r.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():l();this._observationTargets.forEach(function(r){var s=r.element,o=f(s),u=this._rootContainsTarget(s),a=r.entry,l=e&&u&&this._computeTargetAndRootIntersection(s,t),c=r.entry=new n({time:i(),target:s,boundingClientRect:o,rootBounds:t,intersectionRect:l});a?e&&u?this._hasCrossedThreshold(a,c)&&this._queuedEntries.push(c):a&&a.isIntersecting&&this._queuedEntries.push(c):this._queuedEntries.push(c)},this);this._queuedEntries.length&&this._callback(this.takeRecords(),this)};r.prototype._computeTargetAndRootIntersection=function(t,n){var u,l;if(window.getComputedStyle(t).display!="none"){for(var r=f(t),i=r,s=h(t),o=!1;!o;){if(u=null,l=s.nodeType==1?window.getComputedStyle(s):{},l.display=="none")return;if(s==this.root||s==e?(o=!0,u=n):s!=e.body&&s!=e.documentElement&&l.overflow!="visible"&&(u=f(s)),u&&(i=a(u,i),!i))break;s=h(s)}return i}};r.prototype._getRootRect=function(){var t,n,r;return this.root?t=f(this.root):(n=e.documentElement,r=e.body,t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}),this._expandRectByRootMargin(t)};r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return t.unit=="px"?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n};r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1,i,s;if(n!==r)for(i=0;i<this.thresholds.length;i++)if(s=this.thresholds[i],s==n||s==r||s<n!=s<r)return!0};r.prototype._rootIsInDom=function(){return!this.root||c(e,this.root)};r.prototype._rootContainsTarget=function(t){return c(this.root||e,t)};r.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)};r.prototype._unregisterInstance=function(){var e=t.indexOf(this);e!=-1&&t.splice(e,1)};window.IntersectionObserver=r;window.IntersectionObserverEntry=n}}(),function(e,t){var n={dir:"",bindClass:"color",binding:!0,preloading:!0,install:function(){n.addEvent(window,"load",n.init)},init:function(){n.binding&&n.bind();n.preloading&&n.preload()},getDir:function(){if(!n.dir){var e=n.detectDir();n.dir=e!==!1?e:"jscolor/"}return n.dir},detectDir:function(){for(var e=location.href,r=document.getElementsByTagName("base"),i,s,t=0;t<r.length;t+=1)r[t].href&&(e=r[t].href);for(r=document.getElementsByTagName("script"),t=0;t<r.length;t+=1)if(r[t].src&&/(^|\/)jscolor\.js([?#].*)?$/i.test(r[t].src))return i=new n.URI(r[t].src),s=i.toAbsolute(e),s.path=s.path.replace(/[^\/]+$/,""),s.query=null,s.fragment=null,s.toString();return!1},bind:function(){for(var i,s,e=new RegExp("(^|\\s)("+n.bindClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),t=document.getElementsByTagName("input"),r=0;r<t.length;r+=1)if(!t[r].color&&t[r].className&&(i=t[r].className.match(e))){if(s={},i[4])try{s=new Function("return ("+i[4]+")")()}catch(o){}t[r].color=new n.color(t[r],s)}},preload:function(){for(var e in n.imgRequire)n.imgRequire.hasOwnProperty(e)&&n.loadImage(e)},images:{pad:[181,101],sld:[16,101],cross:[15,15],arrow:[7,11]},imgRequire:{},imgLoaded:{},requireImage:function(e){n.imgRequire[e]=!0},loadImage:function(e){n.imgLoaded[e]||(n.imgLoaded[e]=new Image,n.imgLoaded[e].src=n.getDir()+e)},fetchElement:function(e){return typeof e=="string"?document.getElementById(e):e},addEvent:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},fireEvent:function(e,t){var n;e&&(document.createEvent?(n=document.createEvent("HTMLEvents"),n.initEvent(t,!0,!0),e.dispatchEvent(n)):document.createEventObject?(n=document.createEventObject(),e.fireEvent("on"+t,n)):e["on"+t]&&e["on"+t]())},getElementPos:function(e){var t=e,n=e,r=0,i=0;if(t.offsetParent)do r+=t.offsetLeft,i+=t.offsetTop;while(t=t.offsetParent);while((n=n.parentNode)&&n.nodeName.toUpperCase()!=="BODY")r-=n.scrollLeft,i-=n.scrollTop;return[r,i]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getRelMousePos:function(e){var t=0,n=0;return e||(e=window.event),typeof e.offsetX=="number"?(t=e.offsetX,n=e.offsetY):typeof e.layerX=="number"&&(t=e.layerX,n=e.layerY),{x:t,y:n}},getViewPos:function(){return typeof pageYOffset=="number"?[window.pageXOffset,window.pageYOffset]:document.body&&(document.body.scrollLeft||document.body.scrollTop)?[document.body.scrollLeft,document.body.scrollTop]:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[0,0]},getViewSize:function(){return typeof innerWidth=="number"?[window.innerWidth,window.innerHeight]:document.body&&(document.body.clientWidth||document.body.clientHeight)?[document.body.clientWidth,document.body.clientHeight]:document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?[document.documentElement.clientWidth,document.documentElement.clientHeight]:[0,0]},URI:function(e){function t(e){for(var t="",n;e;)e.substr(0,3)==="../"||e.substr(0,2)==="./"?e=e.replace(/^\.+/,"").substr(1):e.substr(0,3)==="/./"||e==="/."?e="/"+e.substr(3):e.substr(0,4)==="/../"||e==="/.."?(e="/"+e.substr(4),t=t.replace(/\/?[^\/]*$/,"")):e==="."||e===".."?e="":(n=e.match(/^\/?[^\/]*/)[0],e=e.substr(n.length),t+=n);return t}this.scheme=null;this.authority=null;this.path="";this.query=null;this.fragment=null;this.parse=function(e){var t=e.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);return this.scheme=t[3]?t[2]:null,this.authority=t[5]?t[6]:null,this.path=t[7],this.query=t[9]?t[10]:null,this.fragment=t[12]?t[13]:null,this};this.toString=function(){var e="";return this.scheme!==null&&(e=e+this.scheme+":"),this.authority!==null&&(e=e+"//"+this.authority),this.path!==null&&(e+=this.path),this.query!==null&&(e=e+"?"+this.query),this.fragment!==null&&(e=e+"#"+this.fragment),e};this.toAbsolute=function(e){var e=new n.URI(e),r=this,i=new n.URI;return e.scheme===null?!1:(r.scheme!==null&&r.scheme.toLowerCase()===e.scheme.toLowerCase()&&(r.scheme=null),r.scheme!==null?(i.scheme=r.scheme,i.authority=r.authority,i.path=t(r.path),i.query=r.query):(r.authority!==null?(i.authority=r.authority,i.path=t(r.path),i.query=r.query):(r.path===""?(i.path=e.path,i.query=r.query!==null?r.query:e.query):(r.path.substr(0,1)==="/"?i.path=t(r.path):(i.path=e.authority!==null&&e.path===""?"/"+r.path:e.path.replace(/[^\/]+$/,"")+r.path,i.path=t(i.path)),i.query=r.query),i.authority=e.authority),i.scheme=e.scheme),i.fragment=r.fragment,i)};e&&this.parse(e)},color:function(t,r){function s(e,t,n){var r=Math.min(Math.min(e,t),n),i=Math.max(Math.max(e,t),n),s=i-r,o;return s===0?[null,0,i]:(o=e===r?3+(n-t)/s:t===r?5+(e-n)/s:1+(t-e)/s,[o===6?0:o,s/i,i])}function o(e,t,n){if(e===null)return[n,n,n];var r=Math.floor(e),i=r%2?e-r:1-(e-r),s=n*(1-t),o=n*(1-t*i);switch(r){case 6:case 0:return[n,o,s];case 1:return[o,n,s];case 2:return[s,n,o];case 3:return[s,o,n];case 4:return[o,s,n];case 5:return[n,s,o]}}function u(){delete n.picker.owner;document.getElementsByTagName("body")[0].removeChild(n.picker.boxB)}function a(e,r){function d(){var e=y.pickerInsetColor.split(/\s+/),t=e.length<2?e[0]:e[1]+" "+e[0]+" "+e[0]+" "+e[1];u.btn.style.borderColor=t}var i,s,o,u,a,h,S;if(!n.picker){for(n.picker={box:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),btn:document.createElement("div"),btnS:document.createElement("span"),btnT:document.createTextNode(y.pickerCloseText)},i=0,s=4;i<n.images.sld[1];i+=s)o=document.createElement("div"),o.style.height=s+"px",o.style.fontSize="1px",o.style.lineHeight="0",n.picker.sld.appendChild(o);n.picker.sldB.appendChild(n.picker.sld);n.picker.box.appendChild(n.picker.sldB);n.picker.box.appendChild(n.picker.sldM);n.picker.padB.appendChild(n.picker.pad);n.picker.box.appendChild(n.picker.padB);n.picker.box.appendChild(n.picker.padM);n.picker.btnS.appendChild(n.picker.btnT);n.picker.btn.appendChild(n.picker.btnS);n.picker.box.appendChild(n.picker.btn);n.picker.boxB.appendChild(n.picker.box)}u=n.picker;u.box.onmouseup=u.box.onmouseout=function(){t.focus()};u.box.onmousedown=function(){w=!0};u.box.onmousemove=function(e){(x||T)&&(x&&v(e),T&&m(e),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),g())};"ontouchstart"in window&&(a=function(e){var t={offsetX:e.touches[0].pageX-N.X,offsetY:e.touches[0].pageY-N.Y};(x||T)&&(x&&v(t),T&&m(t),g());e.stopPropagation();e.preventDefault()},u.box.removeEventListener("touchmove",a,!1),u.box.addEventListener("touchmove",a,!1));u.padM.onmouseup=u.padM.onmouseout=function(){x&&(x=!1,n.fireEvent(E,"change"))};u.padM.onmousedown=function(e){switch(b){case 0:y.hsv[2]===0&&y.fromHSV(null,null,1);break;case 1:y.hsv[1]===0&&y.fromHSV(null,1,null)}T=!1;x=!0;v(e);g()};"ontouchstart"in window&&u.padM.addEventListener("touchstart",function(e){N={X:e.target.offsetParent.offsetLeft,Y:e.target.offsetParent.offsetTop};this.onmousedown({offsetX:e.touches[0].pageX-N.X,offsetY:e.touches[0].pageY-N.Y})});u.sldM.onmouseup=u.sldM.onmouseout=function(){T&&(T=!1,n.fireEvent(E,"change"))};u.sldM.onmousedown=function(e){x=!1;T=!0;m(e);g()};"ontouchstart"in window&&u.sldM.addEventListener("touchstart",function(e){N={X:e.target.offsetParent.offsetLeft,Y:e.target.offsetParent.offsetTop};this.onmousedown({offsetX:e.touches[0].pageX-N.X,offsetY:e.touches[0].pageY-N.Y})});h=f(y);u.box.style.width=h[0]+"px";u.box.style.height=h[1]+"px";u.boxB.style.position="absolute";u.boxB.style.clear="both";u.boxB.style.left=e+"px";u.boxB.style.top=r+"px";u.boxB.style.zIndex=y.pickerZIndex;u.boxB.style.border=y.pickerBorder+"px solid";u.boxB.style.borderColor=y.pickerBorderColor;u.boxB.style.background=y.pickerFaceColor;u.pad.style.width=n.images.pad[0]+"px";u.pad.style.height=n.images.pad[1]+"px";u.padB.style.position="absolute";u.padB.style.left=y.pickerFace+"px";u.padB.style.top=y.pickerFace+"px";u.padB.style.border=y.pickerInset+"px solid";u.padB.style.borderColor=y.pickerInsetColor;u.padM.style.position="absolute";u.padM.style.left="0";u.padM.style.top="0";u.padM.style.width=y.pickerFace+2*y.pickerInset+n.images.pad[0]+n.images.arrow[0]+"px";u.padM.style.height=u.box.style.height;u.padM.style.cursor="crosshair";u.sld.style.overflow="hidden";u.sld.style.width=n.images.sld[0]+"px";u.sld.style.height=n.images.sld[1]+"px";u.sldB.style.display=y.slider?"block":"none";u.sldB.style.position="absolute";u.sldB.style.right=y.pickerFace+"px";u.sldB.style.top=y.pickerFace+"px";u.sldB.style.border=y.pickerInset+"px solid";u.sldB.style.borderColor=y.pickerInsetColor;u.sldM.style.display=y.slider?"block":"none";u.sldM.style.position="absolute";u.sldM.style.right="0";u.sldM.style.top="0";u.sldM.style.width=n.images.sld[0]+n.images.arrow[0]+y.pickerFace+2*y.pickerInset+"px";u.sldM.style.height=u.box.style.height;try{u.sldM.style.cursor="pointer"}catch(p){u.sldM.style.cursor="hand"}u.btn.style.display=y.pickerClosable?"block":"none";u.btn.style.position="absolute";u.btn.style.left=y.pickerFace+"px";u.btn.style.bottom=y.pickerFace+"px";u.btn.style.padding="0 15px";u.btn.style.height="18px";u.btn.style.border=y.pickerInset+"px solid";d();u.btn.style.color=y.pickerButtonColor;u.btn.style.font="12px sans-serif";u.btn.style.textAlign="center";try{u.btn.style.cursor="pointer"}catch(p){u.btn.style.cursor="hand"}u.btn.onmousedown=function(){y.hidePicker()};u.btnS.style.lineHeight=u.btn.style.height;switch(b){case 0:S="hs.png";break;case 1:S="hv.png"}u.padM.style.backgroundImage="url('"+n.getDir()+"cross.gif')";u.padM.style.backgroundRepeat="no-repeat";u.sldM.style.backgroundImage="url('"+n.getDir()+"arrow.gif')";u.sldM.style.backgroundRepeat="no-repeat";u.pad.style.backgroundImage="url('"+n.getDir()+S+"')";u.pad.style.backgroundRepeat="no-repeat";u.pad.style.backgroundPosition="0 0";l();c();n.picker.owner=y;document.getElementsByTagName("body")[0].appendChild(u.boxB)}function f(e){return[2*e.pickerInset+2*e.pickerFace+n.images.pad[0]+(e.slider?2*e.pickerInset+2*n.images.arrow[0]+n.images.sld[0]:0),e.pickerClosable?4*e.pickerInset+3*e.pickerFace+n.images.pad[1]+e.pickerButtonHeight:2*e.pickerInset+2*e.pickerFace+n.images.pad[1]]}function l(){var e,t,r,i,s,u;switch(b){case 0:e=1;break;case 1:e=2}t=Math.round(y.hsv[0]/6*(n.images.pad[0]-1));r=Math.round((1-y.hsv[e])*(n.images.pad[1]-1));n.picker.padM.style.backgroundPosition=y.pickerFace+y.pickerInset+t-Math.floor(n.images.cross[0]/2)+"px "+(y.pickerFace+y.pickerInset+r-Math.floor(n.images.cross[1]/2))+"px";i=n.picker.sld.childNodes;switch(b){case 0:for(s=o(y.hsv[0],y.hsv[1],1),u=0;u<i.length;u+=1)i[u].style.backgroundColor="rgb("+s[0]*(1-u/i.length)*100+"%,"+s[1]*(1-u/i.length)*100+"%,"+s[2]*(1-u/i.length)*100+"%)";break;case 1:var s,a,f=[y.hsv[2],0,0],u=Math.floor(y.hsv[0]),l=u%2?y.hsv[0]-u:1-(y.hsv[0]-u);switch(u){case 6:case 0:s=[0,1,2];break;case 1:s=[1,0,2];break;case 2:s=[2,0,1];break;case 3:s=[2,1,0];break;case 4:s=[1,2,0];break;case 5:s=[0,2,1]}for(u=0;u<i.length;u+=1)a=1-1/(i.length-1)*u,f[1]=f[0]*(1-a*l),f[2]=f[0]*(1-a),i[u].style.backgroundColor="rgb("+f[s[0]]*100+"%,"+f[s[1]]*100+"%,"+f[s[2]]*100+"%)"}}function c(){var e,t;switch(b){case 0:e=2;break;case 1:e=1}t=Math.round((1-y.hsv[e])*(n.images.sld[1]-1));n.picker.sldM.style.backgroundPosition="0 "+(y.pickerFace+y.pickerInset+t-Math.floor(n.images.arrow[1]/2))+"px"}function h(){return n.picker&&n.picker.owner===y}function p(){E===t&&y.importColor();y.pickerOnfocus&&y.hidePicker()}function d(){E!==t&&y.importColor()}function v(e){var t=n.getRelMousePos(e),r=t.x-y.pickerFace-y.pickerInset,i=t.y-y.pickerFace-y.pickerInset;switch(b){case 0:y.fromHSV(r*(6/(n.images.pad[0]-1)),1-i/(n.images.pad[1]-1),null,A);break;case 1:y.fromHSV(r*(6/(n.images.pad[0]-1)),null,1-i/(n.images.pad[1]-1),A)}}function m(e){var t=n.getRelMousePos(e),r=t.y-y.pickerFace-y.pickerInset;switch(b){case 0:y.fromHSV(null,null,1-r/(n.images.sld[1]-1),L);break;case 1:y.fromHSV(null,1-r/(n.images.sld[1]-1),null,L)}}function g(){if(y.onImmediateChange){var e;e=typeof y.onImmediateChange=="string"?new Function(y.onImmediateChange):y.onImmediateChange;e.call(y)}}var i,O;this.required=!0;this.adjust=!0;this.hash=!1;this.caps=!0;this.slider=!0;this.valueElement=t;this.styleElement=t;this.onImmediateChange=null;this.hsv=[0,0,1];this.rgb=[1,1,1];this.minH=0;this.maxH=6;this.minS=0;this.maxS=1;this.minV=0;this.maxV=1;this.pickerOnfocus=!0;this.pickerMode="HSV";this.pickerPosition="bottom";this.pickerSmartPosition=!0;this.pickerButtonHeight=20;this.pickerClosable=!1;this.pickerCloseText="Close";this.pickerButtonColor="ButtonText";this.pickerFace=10;this.pickerFaceColor="ThreeDFace";this.pickerBorder=1;this.pickerBorderColor="ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight";this.pickerInset=1;this.pickerInsetColor="ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow";this.pickerZIndex=1e4;for(i in r)r.hasOwnProperty(i)&&(this[i]=r[i]);this.hidePicker=function(){h()&&u()};this.showPicker=function(){var p,d;if(!h()){var e=n.getElementPos(t),r=n.getElementSize(t),i=n.getViewPos(),s=n.getViewSize(),o=f(this),u,l,c;switch(this.pickerPosition.toLowerCase()){case"left":u=1;l=0;c=-1;break;case"right":u=1;l=0;c=1;break;case"top":u=0;l=1;c=-1;break;default:u=0;l=1;c=1}p=(r[l]+o[l])/2;d=this.pickerSmartPosition?[-i[u]+e[u]+o[u]>s[u]?-i[u]+e[u]+r[u]/2>s[u]/2&&e[u]+r[u]-o[u]>=0?e[u]+r[u]-o[u]:e[u]:e[u],-i[l]+e[l]+r[l]+o[l]-p+p*c>s[l]?-i[l]+e[l]+r[l]/2>s[l]/2&&e[l]+r[l]-p-p*c>=0?e[l]+r[l]-p-p*c:e[l]+r[l]-p+p*c:e[l]+r[l]-p+p*c>=0?e[l]+r[l]-p+p*c:e[l]+r[l]-p-p*c]:[e[u],e[l]+r[l]-p+p*c];a(d[u],d[l]);n.fireEvent(t,"pickerReady")}};this.importColor=function(){E?this.adjust?!this.required&&/^\s*$/.test(E.value)?(E.value="",S.style.backgroundImage=S.jscStyle.backgroundImage,S.style.backgroundColor=S.jscStyle.backgroundColor,S.style.color=S.jscStyle.color,this.exportColor(C|k)):this.fromString(E.value)||this.exportColor():this.fromString(E.value,C)||(S.style.backgroundImage=S.jscStyle.backgroundImage,S.style.backgroundColor=S.jscStyle.backgroundColor,S.style.color=S.jscStyle.color,this.exportColor(C|k)):this.exportColor()};this.exportColor=function(t){if(!(t&C)&&E){var n=this.toString();this.caps&&(n=n.toUpperCase());this.hash&&(n="#"+n);E.value=n;e(E).triggerHandler("change")}t&k||!S||(S.style.backgroundImage="none",S.style.backgroundColor="#"+this.toString(),S.style.color=.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]<.5?"#FFF":"#000");!(t&L)&&h()&&l();!(t&A)&&h()&&c()};this.fromHSV=function(e,t,n,r){e!==null&&(e=Math.max(0,this.minH,Math.min(6,this.maxH,e)));t!==null&&(t=Math.max(0,this.minS,Math.min(1,this.maxS,t)));n!==null&&(n=Math.max(0,this.minV,Math.min(1,this.maxV,n)));this.rgb=o(e===null?this.hsv[0]:this.hsv[0]=e,t===null?this.hsv[1]:this.hsv[1]=t,n===null?this.hsv[2]:this.hsv[2]=n);this.exportColor(r)};this.fromRGB=function(e,t,n,r){var i,u;e!==null&&(e=Math.max(0,Math.min(1,e)));t!==null&&(t=Math.max(0,Math.min(1,t)));n!==null&&(n=Math.max(0,Math.min(1,n)));i=s(e===null?this.rgb[0]:e,t===null?this.rgb[1]:t,n===null?this.rgb[2]:n);i[0]!==null&&(this.hsv[0]=Math.max(0,this.minH,Math.min(6,this.maxH,i[0])));i[2]!==0&&(this.hsv[1]=i[1]===null?null:Math.max(0,this.minS,Math.min(1,this.maxS,i[1])));this.hsv[2]=i[2]===null?null:Math.max(0,this.minV,Math.min(1,this.maxV,i[2]));u=o(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=u[0];this.rgb[1]=u[1];this.rgb[2]=u[2];this.exportColor(r)};this.fromString=function(e,t){var n=e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return n?(n[1].length===6?this.fromRGB(parseInt(n[1].substr(0,2),16)/255,parseInt(n[1].substr(2,2),16)/255,parseInt(n[1].substr(4,2),16)/255,t):this.fromRGB(parseInt(n[1].charAt(0)+n[1].charAt(0),16)/255,parseInt(n[1].charAt(1)+n[1].charAt(1),16)/255,parseInt(n[1].charAt(2)+n[1].charAt(2),16)/255,t),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var y=this,b=this.pickerMode.toLowerCase()==="hvs"?1:0,w=!1,E=n.fetchElement(this.valueElement),S=n.fetchElement(this.styleElement),x=!1,T=!1,N={},C=1,k=2,L=4,A=8;n.addEvent(t,"focus",function(){y.pickerOnfocus&&y.showPicker()});n.addEvent(t,"blur",function(){w?w=!1:window.setTimeout(function(){w||p();w=!1},0)});E&&(O=function(){y.fromString(E.value,C);g()},n.addEvent(E,"keyup",O),n.addEvent(E,"input",O),n.addEvent(E,"blur",d),E.setAttribute("autocomplete","off"));S&&(S.jscStyle={backgroundImage:S.style.backgroundImage,backgroundColor:S.style.backgroundColor,color:S.style.color});switch(b){case 0:n.requireImage("hs.png");break;case 1:n.requireImage("hv.png")}n.requireImage("cross.gif");n.requireImage("arrow.gif");this.importColor()}};e.extend(t,{jscolor:n});n.install()}(_jq,x5engine),function(e,t,n){"use strict";e.extend(t,{mediaObject:function(r){var i=e.extend({width:null,height:null,contentWidth:null,contentHeight:null,type:"image",url:null,thumbUrl:null,html:"",effect:"fade",onclick:null,description:"",thumb:null,moves:[],autoplayTime:5e3,loop:!1,touchDevice:!1,selectable:!1,allowFrameTransparency:!1,protect:!1,deferredCaching:!1,load:null,attached:null,error:null,baseUrl:""},r),s=e(n),o=e(document),u=null,a=null,f=this,h=null,p="id"+Math.round(Math.random()*1e8),d=/(iPad|iPhone)/i.test(navigator.userAgent);s.imageCache=[];var v=s.imageCache[p]=[],m=!0,g=null,y=null,b=null,w=null,E=null,S=null,x=null,T=null,N=!1,C=!1,k=!1,L=null,A=function(r){var E,S,I,q,R,U,z,W,X,V,J,K;u&&(u.remove(),u=null);var s="",o=null,l=0,c={},p=!1,v="",g="",y=function(){a=e("<img />");i.thumb?a.attr("src",i.thumb):typeof i.url=="string"&&i.url!==null&&(i.url.indexOf(".gif")!=-1||i.url.indexOf(".png")!=-1||i.url.indexOf(".jpg")!=-1||i.url.indexOf(".jpeg")!=-1)&&a.attr("src",i.url);a.css("cursor","pointer");i.effect!="random"&&(h=t.effects[i.effect]?t.effects[i.effect]:!t.effects[i.effect]&&!!t.effects.fade?t.effects.fade:{animateIn:function(t,n,r,i){var o=t.DOMObject();r=e(r);o.css({position:"absolute",top:0,left:0});r.append(o);o.show(0);e.isFunction(i)&&i()},animateOut:function(t,n,r){e(t.DOMObject()).detach();e.isFunction(r)&&r()}});i.touchDevice&&i.type!="html"&&u.on("animate_in_start",function(){u.off("touchstart").on("touchstart",D);u.parent().off("touchmove").on("touchmove",P);u.parent().off("touchend").on("touchend",H);u.off("gesturestart").on("gesturestart",B);u.off("gesturechange").on("gesturechange",j);u.off("gestureend").on("gestureend",F)});e.isFunction(r)&&r(f)},b=function(e){switch(e){case"video/mp4":return"avc1.42E01E, mp4a.40.2, avc1.4D401E, mp4a.40.2";case"video/ogv":case"video/ogg":return"theora, vorbis";case"video/webm":return"vp8.0, vorbis";case"audio/ogg":return"vorbis";case"audio/mp4":return"mp4a.40.5";default:return""}},w=function(e){switch(e.toLowerCase()){case"mp3":return"mpeg";case"mp4":return"mpeg"}return e};switch(i.type){case"video":if(S="",p=!1,typeof i.url=="string"&&(i.url=[{src:i.url}]),typeof i.url=="object")for(l=0;l<i.url.length&&!p;l++)p|=i.url[l].src.search(/\.(mp4|webm|ogg|flac)/ig)>0;if(u=e("<div />").width("100%").attr({"data-width":i.width,"data-height":i.height}),p){var x=null,N=function(){_("play")},C=function(){_("pause")};u.on("animate_out_start",function(){x!==null&&x.paused!==!0&&x.pause();x.removeEventListener("play",N);x.removeEventListener("pause",C)});u.on("animate_in_end",function(){var n,r,s;if(u.empty(),E=e("<video />").width("100%").attr({width:"100%",controls:!0,controlsList:"nodownload"}),t.utils.isOnline()&&E.attr("preload","metadata"),i.url.length>1)for(n in i.url)E.append(e("<source />").attr("src",i.url[n].src));else{for(r in i.url)E.attr("src",i.url[r].src);E.on("error",function(){var r=e('<div class="object-generic-error"><div><div>'+t.l10n.get("error_notsupported_video")+"<\/div><\/div><\/div>");r.width(u.parent().width()).height(u.parent().height());E.replaceWith(r)})}u.css({height:i.height,"max-height":"100%"}).width("100%").attr({cursor:"pointer"}).append(E);x=E.get(0);s=function(){var e=(u.width()-E.outerWidth())/2,t=(u.height()-E.outerHeight())/2;E.css({"margin-top":t+"px","margin-bottom":t+"px","margin-left":e+"px","margin-right":e+"px"})};x.addEventListener("loadeddata",s);x.addEventListener("play",function(){s();N()});x.addEventListener("pause",C)});var k=function(){x.readyState!=4&&(x.removeEventListener("load",f.Play,!1),x.addEventListener("load",f.Play,!1),x.removeEventListener("canplaythrough",f.Play,!1),x.addEventListener("canplaythrough",f.Play,!1))},A="pause",M=null,_=function(e){e!=A&&(A=e,u.triggerHandler("status_change",[A]),M!==null&&clearInterval(M),e=="play"&&(M=setInterval(function(){u.triggerHandler("playing",[x.currentTime])},500)))};f.Play=function(){return x.play!==undefined?(x.removeEventListener("onreadystatechange",k,!1),x.addEventListener("onreadystatechange",k,!1),x.play(),k(),_("play"),!0):!1};f.Pause=function(){return x.pause?(x.pause(),_("pause"),!0):!1};f.Stop=function(){return f.Pause()};f.Volume=function(e){return e!==null&&e!==undefined?x.volume=e:x.volume};f.CurrentPosition=function(e){return e!==null&&e!==undefined?x.currentTime=e:x.currentTime};f.Duration=function(){return x.duration};f.Progress=function(){return x.buffered?x.buffered.length:0};f.FullScreen=function(){}}else c["video/mov"]!==undefined||c["video/aiff"]!==undefined||c["video/m4a"]!==undefined?(I=c["video/mov"]?c["video/mov"]:c["video/aiff"]?c["video/aiff"]:c["video/m4a"],q='<object width="'+i.width+'" height="'+i.height+'" type="application/quicktime">\n',q+='\t<param name="codebase" value="http://www.apple.com/qtactivex/qtplugin.cab">\n',q+='\t<param name="src" value="'+I+'">\n',q+='\t<param name="autoplay" value="'+(i.autoPlay?"true":"false")+'">\n',q+='\t<param name="controller" value="'+(i.showVideoControls?"true":"false")+'">\n',q+='\t<embed src="'+I+'" width="'+i.width+'" height="'+i.height+'" autoplay="'+(i.autoPlay?"true":"false")+'" controller="'+(i.showVideoControls?"true":"false")+'" pluginspage="http://www.apple.com/quicktime/download/" />',q+="<\/object>",u=e(q)):(R="",/MSIE/.test(navigator.userAgent)&&(R+='\t<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+i.width+'" height="'+i.height+'">\n',R+='\t\t<param name="url" value="'+c[0]+'" />\n',R+='\t\t<param name="ShowControls" value="'+(i.showVideoControls?"1":"0")+'" />\n',R+='\t\t<param name="uiMode" value="'+(i.showVideoControls?"full":"none")+'" />\n',R+='\t\t<param name="autostart" value="'+(i.autoPlay?"true":"false")+'" />\n',R+='\t\t<param name="ShowDisplay" value="false">\n',R+='\t\t<param name="ShowStatusBar" value="false">\n',R+='\t\t<param name="ShowDisplay" value="false">\n'),R+='<object  width="'+i.width+'" height="'+i.height+'" type="application/x-mplayer2">\n',R+='\t<param name="url" value="'+c[0]+'" />\n',R+='\t<param name="ShowControls" value="'+(i.showVideoControls?"1":"0")+'" />\n',R+='\t<param name="uiMode" value="'+(i.showVideoControls?"full":"none")+'" />\n',R+='\t<param name="autostart" value="'+(i.autoPlay?"true":"false")+'" />\n',R+='\t<param name="ShowDisplay" value="false">\n',R+='\t<param name="ShowStatusBar" value="false">\n',R+='\t<param name="ShowDisplay" value="false">\n',R+='\t<embed type="application/x-mplayer2" src="'+c[0]+'" id="MediaPlayer" width="'+i.width+'" height="'+i.height+'" ShowControls="'+(i.showVideoControls?"1":"0")+'" ShowStatusBar="0" ShowDisplay="0" autostart="0" />\n',R+="<\/object>\n",R+='<div style="position: absolute; width: 100%; top: '+(i.height/2+20)+'px; text-align: center;"><a target="_blank" style="color: black; text-decoration: none; font-family: Arial, sans;" href="http://windows.microsoft.com/en-US/windows/downloads/windows-media-player">Install Media Player Plugin<\/a><\/div>\n',/MSIE/.test(navigator.userAgent)&&(R+="\t<\/object>\n"),u=e(R));y();break;case"audio":case"sound":if(s="imaudioplayer_"+Math.round(Math.random()*1e8),u=e('<audio controls controlsList="nodownload" id="'+s+'"/>').attr({"data-width":i.width}),p=!1,typeof i.url=="string"&&(i.url=[{src:i.url}]),typeof i.url=="object")for(l=0;l<i.url.length&&!p;l++)p|=i.url[l].src.search(/\.(mp3|aac|wav)/ig)>0;if(p){t.utils.isOnline()&&u.attr("preload","metadata");i.loop&&u.prop("loop",!0);for(v in i.url)u.append(e("<source />").attr("src",i.url[v].src));U=!1;setInterval(function(){U&&u.triggerHandler("playing",[f.CurrentPosition()])},200);f.Play=function(){u.get(0).play();U=!0;u.triggerHandler("status_change",["play"])};f.Pause=function(){u.get(0).pause();U=!1;u.triggerHandler("status_change",["pause"])};f.Stop=function(){return f.Pause()};f.Volume=function(e){return typeof e=="number"?u.get(0).volume=e:u.get(0).volume};f.CurrentPosition=function(e){return typeof e=="number"?u.get(0).currentTime=e:u.get(0).currentTime};f.Duration=function(){return u.get(0).duration};f.Progress=function(){return u.get(0).buffered?1:0}}y();break;case"youtube":m=!1;u=e("<div />").css({"background-color":"black"});o=null;s="imytplayer_"+Math.round(Math.random()*1e8,10);u.append(e("<div />").attr("id",s));g=i.url.replace(/https?\:\/\/[w]*\.?youtube\.com\/watch\?v=/g,"");g=g.replace(/https?\:\/\/youtu\.be\/?/g,"");g.indexOf("&")!=-1&&(g=g.substring(0,g.indexOf("&")));z=null;e("#ytjsapi").length===0&&(z=e("<script />").attr({id:"ytjsapi",src:"//www.youtube.com/iframe_api"}),e("head").append(z),n.onYouTubeIframeAPIReady=function(){t.youtube.jsApiIsLoaded=!0;e("body").triggerHandler(t.youtube.apiLoadedEventName)});W=!1;X=function(){var r,a;r=!i.width||!i.contentWidth?Math.max(i.width,i.contentWidth):Math.min(i.width,i.contentWidth);a=!i.height||!i.contentHeight?Math.max(i.height,i.contentHeight):Math.min(i.height,i.contentHeight);u.width(r).height(a);u.children("div").attr({"data-width":r,"data-height":a});u.find("#"+s).width(r).height(a);t.youtube.jsApiIsLoaded?o=new n.YT.Player(s,{height:a,width:r,videoId:g,events:{onReady:function(){W=!0},onError:function(e){var t="";switch(e.data){case 2:t="The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.";break;case 100:t="The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.";break;case 101:case 150:t="The owner of the requested video does not allow it to be played in embedded players."}u.empty().append(t)}},playerVars:{controls:i.showVideoControls?"1":"0",wmode:"opaque",modestbranding:"1",rel:0}}):e("body").one(t.youtube.apiLoadedEventName,X)};f.Play=function(){W?"playVideo"in o&&o.playVideo():(!L||clearTimeout(L),L=setTimeout(f.Play,1e3))};f.Pause=function(){W?"pauseVideo"in o&&o.pauseVideo():(!L||clearTimeout(L),L=setTimeout(f.Pause,1e3))};f.Stop=function(){W?!!o.stopVideo&&"stopVideo"in o?o.stopVideo():"pauseVideo"in o&&o.pauseVideo():(!L||clearTimeout(L),L=setTimeout(f.Stop,1e3))};u.on("animate_in_end",X);y();break;case"vimeo":m=!1;s="imvimeoplayer_"+Math.round(Math.random()*1e8,10);u=e("<div />").css("background-color","black").width(i.width).height(i.height);o=e("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen/>");u.append(o).attr({"data-width":i.width,"data-height":i.height});g=i.url.replace(/[w\.]*vimeo\.com\/?/g,"").replace(/https?\:\/\//g,"").replace(/http?\:\/\//g,"");o.attr({src:"//player.vimeo.com/video/"+g+"?player_id="+s,width:"100%",height:"100%",frameborder:0});o.css({"min-width":i.width,"min-height":i.height});y();break;case"code":case"html":u=e("<div />");u.html(t.utils.htmlspecialchars_decode(i.html)).width(i.width).height(i.height);y();break;case"base64html":u=e("<div />");u.html(atob(i.html)).width(i.width).height(i.height);y();break;case"swf":V="swfplayer_"+Math.round(Math.random()*1e3);u=e("<div />").html('<div id="'+V+'"><\/div>');u.on("animate_in_end",function(){var e={},r={quality:"high",bgcolor:"#ffffff",play:"true",loop:"false",wmode:"transparent",scale:"noscale",menu:"true",devicefont:"false",salign:"lt",allowscriptaccess:"always",allowFullScreen:"true"},s={id:V,name:V,align:"middle",allowscriptaccess:"always"};t.utils.loadSwfObject(function(){n.swfobject.embedSWF(i.url,V,i.width,i.height,"10.0.0","res/expressInstall.swf",e,r,s)})});y();break;case"dom":u=e(i.url).width(i.width).height(i.height).attr({"data-width":i.width,"data-height":i.height});y();break;case"iframe":case"url":u=e("<iframe />",{allowFrameTransparency:i.allowFrameTransparency?"true":"false",src:i.url,border:"0",frameborder:"0",marginwidth:"0",marginheight:"0","data-width":i.width,"data-height":i.height}).width(i.width).height(i.height);y();break;default:J=function(){var t=O(i.width,i.height,i.contentWidth,i.contentHeight,!0),r,s,o;if(u.css({position:"absolute",left:t.x,top:t.y}),i.touchDevice&&u.css("-webkit-backface-visibility","hidden"),u.width(t.width).height(t.height),!i.onclick||(e.isFunction(i.onclick)?u.click(i.onclick).css("cursor","pointer"):i.onclick.indexOf("http")===0&&(u.css("cursor","pointer"),n.location.href=i.onclick)),i.protect){r=u;u=e("<canvas />");try{u.get(0).getContext&&u.get(0).getContext("2d")?(r.removeAttr("style"),e("body").append(r),s={width:r.width(),height:r.height()},r.detach(),u.attr({"data-width":i.width,"data-height":i.height}).width("100%").height("100%").on("dragstart",function(e){return e.preventDefault(),!1}),o=u.get(0).getContext("2d"),function f(){if(!u.parent().length){setTimeout(f,100);return}var t=s.width,n=s.height;t>i.width&&(n=i.width/t*n,t=i.width,n*=1.2,t*=1.2);o.canvas.width=t;o.canvas.height=n;o.clearRect(0,0,t,n);o.drawImage(r[0],0,0,t,n);e("#imContent").one("breakpointChangedOrFluid",f);u.one("image.change",f)}()):u=r}catch(a){u=r}u.on("contextmenu",function(){return!1})}y()};u=e("<img />").attr("src",i.url);i.width&&i.height?(u.attr({"data-width":i.width,"data-height":i.height}),J()):(K=e("<img />").css({position:"absolute",top:-1e4,left:-1e4}).one("load",function(){var t=e(this);i.width=t.width();i.height=t.height();u.attr({"data-width":i.width,"data-height":i.height});t.remove();J()}),e("body").prepend(K),K.attr("src",u.attr("src")))}i.selectable||u.attr("unselectable","on").css("user-select","none")},O=function(e,t,n,r,s){return s=!!s,s&&i.type!="dom"&&i.type!="html"&&(n<e&&(t=n/e*t,e=n),r<t&&(e=r/t*e,t=r)),{x:(n-e)/2,y:(r-t)/2,width:e,height:t}},M=function(e,t){var n=i.width,r=i.height,s=t.parent().width(),o=t.parent().height();return{x:(-s*e.x+(s-n)/2)*e.z+s/2,y:(-o*e.y+(o-r)/2)*e.z+o/2,z:e.z}},_=function(e,t){if(!(t>i.moves.length-1)&&i.moves[t]!==undefined){var n=O(i.width*i.moves[t].z,i.height*i.moves[t].z,i.contentWidth,i.contentHeight,!0),r=M(i.moves[t],e);e.animate({left:i.moves[t].z<=1?n.x:r.x,top:i.moves[t].z<=1?n.y:r.y,width:Math.round(i.width*r.z),height:Math.round(i.height*r.z)},{duration:i.autoplayTime/(i.moves.length-1),complete:function(){_(e,t+1)}});u.on("animate_out_start",function(){e.stop(!1,!1)})}},D=function(t){e.isFunction(E)&&t.touches.length==1&&E(t);x=t;N=!1;C=t.touches.length==2;k=t.touches.length>2},P=function(t){if(w||(!g||t.touches.length!=1)&&(!y||t.touches.length!=2)&&(!b||!(t.touches.length>2))||t.preventDefault(),e.isFunction(w)&&t.touches.length==1){var n=d?x:x.touches[0],r=d?t:t.touches[0];w(t,{startX:n.pageX,startY:n.pageY,offsetX:r.pageX-n.pageX,offsetY:r.pageY-n.pageY})}N=!0;T=t},H=function(t){if(N){if(e.isFunction(g)&&!!T&&x.touches.length==1){var n=d?x:x.touches[0],r=d?T:T.touches[0];g(t,{startX:n.pageX,startY:n.pageY,offsetX:r.pageX-n.pageX,offsetY:r.pageY-n.pageY})}}else u.click()},B=function(e){(k&&!!b||C&&!!y)&&e.preventDefault()},j=function(t){k&&!!b&&t.preventDefault();C&&!!y&&!S&&t.preventDefault();!!S&&e.isFunction(S)&&S(t)},F=function(t){k&&e.isFunction(b)?b(t):C&&e.isFunction(y)&&y(t)};this.Cache=function(n){e.extend({load:null,error:null},n);switch(i.type){case"image":/^[0-9]+$/.test(i.url)&&(i.url=t.utils.yaKnowWhatToDo(i.url));v[v.length]=new Image;var r=e(v[v.length-1]);r.one("load",function(){if(!i.width&&!i.height){var t=r.clone();e("body").append(t);t.css({width:"auto",height:"auto",position:"absolute",top:-1e4,left:-1e4});i.width=t.width();i.height=t.height();t.remove()}i.thumb?(v[v.length]=new Image,r=e(v[v.length-1]),r.one("load",function(){A(n.load)}).on("error",function(){i.thumb=null;A(n.load)}),r.attr("src",i.thumb)):A(n.load)}).on("error",function(){e.isFunction(n.error)&&n.error(f,404)});r.attr("src",i.url);break;case"video":case"youtube":case"vimeo":i.thumb?(v[v.length]=new Image,r=e(v[v.length-1]),r.one("load",function(){A(n.load)}).on("error",function(){i.thumb=null;A(n.load)}),r.attr("src",i.thumb)):A(n.load);break;default:A(n.load)}};this.TriggerAnimationInStart=function(){return u.triggerHandler("animate_in_start"),f};this.TriggerAnimationInEnd=function(){return u.triggerHandler("animate_in_end"),f};this.TriggerAnimationOutStart=function(){return u.triggerHandler("animate_out_start"),f};this.TriggerAnimationOutEnd=function(){return u.triggerHandler("animate_out_end"),f};this.AnimateIn=function(n,r,s){var c,p,d,v,m;u.find("embed, object, iframe").css("display","none");var o=function(t){var n=t.DOMObject();n.find("embed, object, iframe").css("display","block");n.trigger("animate_in_end");i.moves.length>1&&i.type==="image"&&_(u,1);e.isFunction(r)&&r(t)},a=null,l=O(u.attr("data-width"),u.attr("data-height"),i.contentWidth,i.contentHeight,!0);u.css("position","absolute");i.moves.length>0&&i.type==="image"?(c=M(i.moves[0],u),a={y:c.y,x:c.x,width:Math.round(l.width*c.z),height:Math.round(l.height*c.z)}):a=i.type!="dom"&&i.type!="html"?{y:l.y,x:l.x,width:l.width,height:l.height}:{y:0,x:0,width:l.width,height:l.height};u.trigger("animate_in_start");i.effect=="random"&&(p=["fade","horizontalSlide","verticalSlide","zoom","elasticFromTop","elasticFromBottom","elasticFromRight","elasticFromLeft","bounceFromTop","bounceFromBottom","bounceFromLeft","bounceFromRight","rotateLinear"],d=Math.max(0,Math.floor(Math.random()*p.length)),h=t.effects[p[d]]?t.effects[p[d]]:t.effects.fade);h?(v=t.utils.supportsCSS("transformOrigin"),m=t.utils.supportsCSS("transform"),v&&u.css(v,"50% 50%"),m&&u.css(m,"none"),h.animateIn(f,a,n,o,s)):u.trigger("animate_in_end")};this.AnimateOut=function(n,r,s){var o,a,l;u.find("embed, object, iframe").css("display","none");o=function(t){var n=t.DOMObject();n.trigger("animate_out_end");e.isFunction(r)&&r(t)};i.effect=="random"&&(a=["fade","horizontalSlide","verticalSlide","zoom","elasticFromTop","elasticFromBottom","elasticFromRight","elasticFromLeft","bounceFromTop","bounceFromBottom","bounceFromLeft","bounceFromRight","rotateLinear"],l=Math.max(0,Math.floor(Math.random()*a.length)),h=t.effects[a[l]]);u.trigger("animate_out_start");h!==null&&h!==undefined?h.animateOut(f,n,o,s):u.trigger("animate_out_end")};this.ChangeAnimation=function(e){t.effects[e]&&(h=t.effects[e])};this.DOMObject=function(){return u};this.GetThumb=function(){return a};this.Type=function(){return i.type};this.Play=function(){return!1};this.Pause=function(){return!1};this.Stop=function(){return!1};this.Volume=function(){return 0};this.CurrentPosition=function(){return 0};this.Duration=function(){return 0};this.GetDescription=function(){return t.utils.htmlspecialchars_decode(i.description)};this.AutoplayTime=function(){return i.autoplayTime};this.OnPlaying=function(e){u.on("playing",e)};this.OnStatusChange=function(e){u.on("status_change",e)};this.Width=function(){return i.moves.length===0?i.width!==null?i.width:u.attr("data-width"):i.moves[0].z*i.width};this.Height=function(){return i.moves.length===0?i.height!==null?i.height:u.attr("data-height"):i.moves[0].z*i.height};this.ContentHeight=function(e){if(e===null||e===undefined)return i.contentHeight;i.contentHeight=e};this.ContentWidth=function(e){if(e===null||e===undefined)return i.contentWidth;i.contentWidth=e};this.Overlay=function(){return m};this.AfterPinch=function(e){return y=e,f};this.Pinch=function(e){return S=e,f};this.Gesture=function(e){return b=e,f};this.Move=function(e){return w=e,f};this.AfterMove=function(e){return g=e,f};this.BeforeMove=function(e){return E=e,f};this.FullScreen=function(){return!1};this.AppendTo=function(t,n){return t.append(u),e.isFunction(i.attached)?i.attached(this,n):e.isFunction(n)&&n(this),this};i.deferredCaching||this.Cache({load:i.load,error:i.error})}})}(_jq,x5engine,window),function(e,t){"use strict";e.extend(t,{mediaPlayer:function(n){n=e.extend({url:"",type:"audio",width:400,height:400,showVideoControls:!0,target:"body",autoplay:!1,loop:!1,baseUrl:""},n);var r=e(n.target),i=new t.mediaObject({url:n.url,type:n.type,showVideoControls:n.showVideoControls,effect:"none",width:n.width,height:n.height-(!n.autoHideControls&&n.type!="youtube"&&n.type!="vimeo"?n.controlsHeight:0),baseUrl:n.baseUrl,load:function(e){return r.append(e.DOMObject()).css({"background-color":n.type!="audio"?n.bgColor:"transparent",position:"relative",margin:"0 auto"}).width(n.width).height(n.height),e.AnimateIn(),n.autoplay===!0?e.Play():n.autoplay=="onscreen"&&t.utils.onElementInViewPort(r[0],function(){e.Play()}),{Stop:function(){e&&e.Stop()},Play:function(){e&&e.Play()}}}})}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{initMenu:function(n){function c(){e("#imPageExtContainer").css("background-attachment")=="fixed"?(e("#imPageIntContainer").addClass("responsive-menu-effect-push-container"),e("#imPageExtContainer").removeClass("responsive-menu-effect-push-container")):(e("#imPageExtContainer").addClass("responsive-menu-effect-push-container"),e("#imPageIntContainer").removeClass("responsive-menu-effect-push-container"))}var r=e.extend(!0,{menuId:"",responsiveMenuEffect:"none",animationDuration:1e3},n),i=e("body"),s=r.menuId,o="responsive-menu-effect-"+r.responsiveMenuEffect,u=r.animationDuration;r.responsiveMenuEffect=="push"&&(c(),e("#imContent").on("breakpointChanged",function(){c()}));e("#"+s+" li").each(function(){var n=e(this),r="imMnMnCurrent",i=n.attr("data-link-anchor"),s=n.attr("data-link-hash"),o=e("[data-link-hash="+s+"]"),u=n.attr("data-link-paths"),a=function(e){e&&n.add(o).parents("ul").find("."+r).removeClass(r);n.add(n.add(o).parents("li")).add(o).addClass(r)},f;if(i&&n.on("click",function(){a(!0)}),u)f=u.substring(0,1),u=u.substring(1),t.utils.isCurrentPage(u.split(f),i)&&a();else n.on("click",function(e){e.stopPropagation()})});e("#"+s+" .hamburger-button").on("click",function(){if(!(e("#"+s+"-menu-opened").length>0)){e(this).css("visibility","hidden");e("<div id='"+s+"-menu-opened'><\/div>").appendTo("body");e("<div id='"+s+"_container-menu-opened'><\/div>").appendTo("#"+s+"-menu-opened");e("#"+s+"_container > *:not(.hamburger-button)").clone(!0).removeClass("hidden").appendTo("#"+s+"_container-menu-opened");var t=e("#"+s+"-menu-opened").find(".multiple-column");e(t).css("width","");e(t).css("left","");e(t).find("ul").length!==0?e(t).children("ul").css({height:"",overflow:"",display:""}):e("#"+s+"-menu-opened").find(".imLevel").find("ul").length!==0&&e("#"+s+"-menu-opened").find(".imLevel").children("ul").css({height:"",overflow:"",display:""});e("#"+s+"-menu-opened ul li").each(function(){var t=e(this),n=0;t.on("mouseover",function(){clearTimeout(n);t.children("ul, .multiple-column").stop(!1,!1).show()}).on("mouseleave",function(){n=setTimeout(function(){t.children("ul, .multiple-column").stop(!1,!1).hide()},500)})});e("#"+s+"-menu-opened .hamburger-menu-close-button").add("#"+s+"-menu-opened .imLevel[data-link-paths]").one("click",function(){i.addClass("menu-"+s+"-towards-closing");i.removeClass("menu-"+s+"-opened");e("#"+s+"-menu-opened").removeClass("animated");i.addClass("menu-"+s+"-closing");e("#imPageExtContainer").off("click.close-menu-event");e(window).off("resize.close-menu-event");setTimeout(function(){i.removeClass("menu-"+s+"-towards-closing");e("#"+s).find(".label-wrapper-over").remove();e("#"+s+"-menu-opened").remove();i.removeClass("menu-"+s+"-closing").removeClass("im-menu-opened").removeClass(o)},u+50);e("#"+s+" .hamburger-button").css("visibility","")});e("#imPageExtContainer").on("click.close-menu-event",function(t){i.hasClass("menu-"+s+"-opened")&&(t.stopPropagation(),e("#"+s+"-menu-opened .hamburger-menu-close-button").click())});e(window).on("resize.close-menu-event",function(){i.hasClass("menu-"+s+"-opened")&&e("#"+s+"-menu-opened .hamburger-menu-close-button").click()});e("#"+s+"-menu-opened .imMnMnCurrent").each(function(){e(this).parents("ul").show(0);e(this).closest(".imLevel").find("> .label-wrapper > .label-inner-wrapper > a").data("linkLevelOpened",1)});e("#"+s+"-menu-opened #"+s+"_container-menu-opened > ul > .imLevel").each(function(){var t=e(this),n=t.find("> .label-wrapper > .label-inner-wrapper > a");n.length>0&&e(this).children("ul").length>0&&n.on("touchend",function(n){e(this).data("linkLevelOpened")=="1"?e(this).data("linkLevelOpened",0):(n.preventDefault(),e(this).data("linkLevelOpened",1),t.trigger("mouseover"))})});setTimeout(function(){i.addClass("menu-"+s+"-opened").addClass("im-menu-opened").addClass(o);e("#"+s+"-menu-opened").addClass("animated")},10)}});var a=e("#"+s),f=e(window),l=function(e){e.add(e.find("ul")).toggleClass("open-right").toggleClass("open-left")};a.find(".imLevel").on("mouseenter",function(){var t=e(this),n,r,i,c=t.find(".multiple-column"),h,p,d;if(!(t.parents("#"+s+"-menu-opened").length>0))if(c.length||a.css("float")=="right")!c.length||(c.css("left",""),n=t.offset(),console.log(c.outerWidth(!0)),d=n.left+c.outerWidth(!0)-e(window).width(),d>0&&c.css("left",-Math.min(d,n.left)));else{if(t.find("li").first().is(":visible"))return;n=t.offset();r=t.children("ul");i=t.parents("ul").first();t.parents(".imLevel").length||r.add(r.find("ul")).each(function(){e(this).removeClass("open-right").removeClass("open-left").addClass(e(this).attr("data-original-position"))});r.attr("data-computed-width")||(h=r.clone(),a.append(h),h.show(0).css({position:"absolute",top:-1e3,width:"",height:"",display:"block"}),r.attr("data-computed-width",h.find("li").outerWidth()),h.remove());p=r.attr("data-computed-width")*1;r.hasClass("open-right")&&n.left+t.outerWidth()+p>f.width()+f.scrollLeft()&&l(r);r.hasClass("open-left")&&n.left-p<f.scrollLeft()&&l(r)}})}})}(_jq,x5engine),function(e,t,n){"use strict";function r(){var t=e("#imHeader"),n=0;return e("#imHeader [id^=imHeader_imMenuObject_]:not(.template-object-wrapper):visible").each(function(){e(this).offset().top+e(this).outerHeight()>n&&(t=e(this),n=t.offset().top+t.outerHeight())}),t}function i(r){var E,S;r=e.extend({target:null,trigger:null,triggerPartialHide:!0,appear:!1,enabledBreakpoints:null,forceFixed:!0,forceTop:!1,forceLeft:!1,noLeft:!1,useTranslateZ:!1,alwaysVisible:!1},r);var i=!1,s=!1,o=e(n),u,a,f,l,c=!1,h=!1,p,d=e("#imFooter"),v=function(){i=!0;f=typeof r.trigger=="function"?r.trigger():e(r.trigger);u=f.offset().top+(r.triggerPartialHide?0:f.outerHeight()),function t(n){if(!!n&&n.target!=n.currentTarget){e("#imContent").one("change",t);return}p=a.parent().offset().left;a.css("position")!="fixed"&&(l=a.position().left);r.forceFixed&&(m(),w());e("#imContent").one("change",t)}()},m=function(){i&&(r.appear?a.stop(!1,!1).animate({top:-a.outerHeight(!0)},{duration:200,complete:function(){a.css({visibility:"hidden",overflow:"hidden"})}}):(a.stop().css({"margin-top":"",left:"",top:"","z-index":""}),r.forceFixed&&a.css("position","")),c=!1)},g=function(){return r.noLeft?"":-o.scrollLeft()+l+p},y=function(){a.css({"margin-top":0,left:g(),bottom:"auto","z-index":t.settings.zIndex.stickyBar+(r.forceTop?1:0)});r.forceFixed&&a.css("position","fixed");r.useTranslateZ&&a.css("-webkit-transform","translateZ(0)")},b=function(t,n){var r=Math.floor(e("#imContent").offset().top+e("#imContent").outerHeight(!0)),i=n;i+a.outerHeight(!0)>=r-t&&(i=r-t-a.outerHeight(!0));a.css("top",i)},w=function(){var t,n;if(s&&(i||v(),t=Math.floor(e("#imContent").offset().top+e("#imContent").outerHeight(!0)),n=Math.floor(u+a.outerHeight(!0)+parseInt(e("#imContent").css("padding-bottom"))),!(t<=n))){var f=o.scrollTop(),l=e("#imStickyBarContainer:visible"),p=r.forceTop||l.length===0?0:l.height();u-p<f||r.alwaysVisible?(c||(r.appear?(y(),h=!0,a.stop(!1,!1).show().css({top:-a.outerHeight(!0),visibility:"visible",overflow:"visible"}).animate({top:0},{duration:500},"swing",function(){h=!1})):y(),c=!0),h||b(f,p)):c&&m();r.forceLeft&&a.css("left",0)}};(this.enable=function(){s=!0;w()},this.disable=function(){var e=s;s=!1;e&&m()},a=e(r.target),a.length!==0)&&(r.alwaysVisible||o.scroll(w),o.resize(function(){p=a.parent().offset().left;c&&a.css("left",g());w()}),E=this,S=t.responsive.getCurrentBreakPoint(),r.enabledBreakpoints.indexOf(S.hash)!=-1&&E.enable(),e("#imContent").on("beforeBreakpointChanged.sidebarscroll",function(){E.disable()}).on("breakpointChanged.sidebarscroll",function(e,t){r.enabledBreakpoints.indexOf(t.hash)!=-1&&(i=!1,E.enable())}))}e.extend(t,{sidebarScroll:function(t){t=e.extend({target:"#imSideBarObjects",trigger:"#imSideBarObjects",appear:!1,enabledBreakpoints:null,noLeft:!0},t);var n=new i(t)},blogSidebarScroll:function(t){t=e.extend({target:"#imBlogSidebar",trigger:"#imBlogSidebar",appear:!1,enabledBreakpoints:null},t);var n=new i(t)},stickyBar:function(t){t=e.extend({target:"#imStickyBarContainer",trigger:r,triggerPartialHide:!1,appear:!0,enabledBreakpoints:null,forceFixed:!1,forceTop:!0,forceLeft:!0,useTranslateZ:!0,alwaysVisible:!1},t);e("header").height()==0&&(t.alwaysVisible=!0);var n=new i(t)}})}(_jq,x5engine,window),function(e,t){"use strict";e.extend(t,{pageRowsObserver:function(){var n,r,i=document.querySelectorAll(".imPageRow"),s=function(){for(var p,d,t=e(window).height(),n=.01,s=.5,o=.99,u=[],a=[],f=[],l=[n,s,o],c={},h=0;h<i.length;h++)p=e(i[h]).height(),d=t/p,c[i[h].id]={start:d*n,half:d*s,full:d*o},t!=p&&l.push(c[i[h].id].half,c[i[h].id].full);for(r=new IntersectionObserver(function(t){for(var r,i,n=0;n<t.length;n++)r=t[n],i=c[r.target.id],u.indexOf(r.target.id)==-1&&r.intersectionRatio>=i.start&&(u.push(r.target.id),e(r.target).trigger("rowEntersInViewport")),u.indexOf(r.target.id)>-1&&r.intersectionRatio<i.start&&(u.splice(u.indexOf(r.target.id),1),e(r.target).trigger("rowExitsFromViewport")),a.indexOf(r.target.id)==-1&&r.intersectionRatio>=i.half&&(a.push(r.target.id),e(r.target).trigger("rowFillsHalfViewport")),a.indexOf(r.target.id)>-1&&r.intersectionRatio<i.half&&(a.splice(a.indexOf(r.target.id),1),e(r.target).trigger("rowNoFillsHalfViewport")),f.indexOf(r.target.id)==-1&&r.intersectionRatio>=i.full&&(f.push(r.target.id),e(r.target).trigger("rowFillsViewport")),f.indexOf(r.target.id)>-1&&r.intersectionRatio<i.full&&(f.splice(f.indexOf(r.target.id),1),e(r.target).trigger("rowNoFillsViewport"))},{threshold:l}),h=0;h<i.length;h++)r.observe(i[h])},o=function(){n&&(clearTimeout(n),n=undefined);n=setTimeout(function(){r.disconnect();s();n=undefined},100)};return{start:function(){var n,r,u;for(s(),e(window).resize(o),n=0;n<i.length;n++){r=0;u=0;t.utils.onElementResize(i[n],function(e){(r!=e.width||u!=e.height)&&(r=e.width,u=e.height,o())})}}}}()})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imPageToTop:{constants:{id:"imPageToTop",visibleClass:"page-to-top-visible"},initializeButton:function(n){var r=t.imPageToTop.constants,i=t.settings.imPageToTop,s;n=e.extend(!0,{speed:i.speed,appearAt:i.appearAt,imageFile:i.imageFile},n);s=function(){var i=e("#"+r.id);e(window).scrollTop()>n.appearAt?i.hasClass(r.visibleClass)||(i.addClass(r.visibleClass),i.fadeIn(1e3),i.one("click.scroll-to-top",function(){var r={duration:n.speed,easing:"swing",start:function(){e("body").trigger("pageToTopAnimationInProgress")},complete:function(){e("body").trigger("pageToTopAnimationCompleted")}};t.utils.scrollTo(0,r);i.off("click.scroll-to-top");i.fadeOut(1e3)})):i.hasClass(r.visibleClass)&&(i.removeClass(r.visibleClass),i.fadeOut(1e3))};t.imPageToTop.createButton(n);e(window).on("ready scroll",s)},createButton:function(n){var r=t.imPageToTop.constants,i=e(document.createElement("div")),s;i.attr("id",r.id);s=e(document.createElement("img"));s.attr("src",t.settings.currentPath+n.imageFile).attr("alt","scroll to top").attr("id",r.id+"_img");e("body").append(i.append(s))}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{panAndZoom:function(n){var r=e.extend({target:"",url:"",targetWidth:null,targetHeight:null,autoMove:!0,animate:!1,enableZoom:!1,showZoomControl:!1,showNavigator:!1,protect:!1,freedom:"both",handImage:"res/move.png",lensImage:"res/imsearch.png",helperBg:"black",navigatorSize:30},n),i=null,s=null,o=null,u=null,a=null,f=e("html").hasClass("touchevents"),l=null,c=null,h=0,p=0,d=0,v=0,m="#eee",g="#ccc",y="#aaa",b=null,w=(Math.random()-.5<0?-1:1)*(100+Math.round(Math.random()*20-10)),E=(Math.random()-.5<0?-1:1)*(100+Math.round(Math.random()*20-10)),S=!1,x=function(){var n={x:0,y:0},i={x:0,y:0},u=r.targetWidth/l*c,f=r.targetWidth,v=null,g;u>r.targetHeight&&(f=r.targetHeight/c*l,u=r.targetHeight);f=f*r.navigatorSize/100;u=u*r.navigatorSize/100;g=new t.mediaObject({url:r.url,effect:"none",width:f,height:u,contentWidth:f,contentHeight:u,touchDevice:!1,deferredCaching:!0,protect:r.protect});g.Cache({load:function(){var t=null,y;o=e("<div />").css({position:"absolute",top:-f-10,left:10,background:m,border:"1px solid "+m}).width(f).height(u).mousedown(function(e){S=!0;n={x:e.pageX,y:e.pageY};i={x:y.css("border-left-width").replace(/px/g,"")*-1,y:y.css("border-top-width").replace(/px/g,"")*-1}}).mouseup(function(){S=!1}).mouseleave(function(){S=!1}).mousemove(function(e){S&&(e.preventDefault(),h=(i.x+(n.x-e.pageX))/f*l,p=(i.y+(n.y-e.pageY))/u*c,h=Math.min(Math.max(h,-l*d+r.targetWidth),0),p=Math.min(Math.max(p,-c*d+r.targetHeight),0),s.css({top:p,left:h}).triggerHandler("image.change",[d,h,p]))}).on("dragstart",function(e){return e.preventDefault(),!1});y=e("<div />").css({position:"absolute",top:0,bottom:0,left:0,right:0,border:"0px solid "+m,background:"transparent"}).fadeTo(0,.75);s.on("image.change",function(e,t,n,i){v!==null&&window.cancelAnimFrame(v);v=window.requestAnimFrame(function(){y.css({"border-top-width":-i/t/c*u,"border-bottom-width":u- -i/t/c*u-r.targetHeight*u/(c*t),"border-left-width":-n/t/l*f,"border-right-width":f- -n/t/l*f-r.targetWidth*f/(l*t)})})});a.append(o.append(g.DOMObject()).append(y)).mouseleave(function(){t=setTimeout(function(){o.stop(!1,!1).animate({top:-o.height()-20})},1e3)}).mouseenter(function(){t!==null&&(clearTimeout(t),t=null);o.stop(!1,!1).animate({top:10})});o.on("mousewheel DOMMouseScroll",C)}})},T=function(){var t=20,n=10,i=Math.min(a.height(),170)-2*t-2*n,o=!1,f=function(e){return o=!1,l(e)},l=function(e){return e.preventDefault(),!1};u=e("<div />").css({position:"absolute",right:10,top:n}).mousemove(function(e){if(o){E.css("top",c(e.pageY-w.offset().top));var n=1-(e.pageY-w.offset().top)/(i-t/2);N(n*(1-v)+v,null,null,!1)}}).mouseleave(f).mouseup(f).on("selectstart mousedown",l);var c=function(e){return Math.min(Math.max(e-t/2,0),i-t)},h={position:"absolute",color:y,border:"1px solid "+g,background:m,cursor:"pointer","text-align":"center"},p=e("<div />").width(t).height(t).css(h).css({top:0,"border-radius":"5px 5px 0 0"}).text("+").click(function(e){return e.preventDefault(),N(d+.1),!1}).dblclick(l).on("selectstart mousedown",l),b=e("<div />").width(t).height(t).css(h).css({bottom:0,"border-radius":"0 0 5px 5px"}).text("-").click(function(e){return e.preventDefault(),N(d-.1),!1}).dblclick(l).on("selectstart mousedown",l),w=e("<div />").css({margin:t+"px 9px",background:m,border:"1px solid "+g}).width(2).height(Math.min(i,r.targetHeight-20)),E=e("<div />").css({"border-radius":5,position:"absolute",margin:t+5+"px 0",bottom:0,left:5,border:"1px solid "+y,background:m,cursor:"pointer"}).width(10).height(10).mousedown(function(){o=!0}).mouseup(function(){o=!1}).on("dragstart",l).on("selectstart mousedown",l);a.append(u.append(w.append(E)).append(p).append(b));s.on("image.change",function(e,t){o||(t=(t-v)/(1-v),E.css("top",c((1-t)*i)))})},N=function(e,t,n,i){var o=d,u=null,a;(e=Math.max(Math.min(e,1),v),s!==null&&e!=d)&&((i===undefined||i===null)&&(i=!0),s.stop(!1,!1),(t===null||t===undefined)&&(t=(h-r.targetWidth/2)*e/d+r.targetWidth/2),(n===null||n===undefined)&&(n=(p-r.targetHeight/2)*e/d+r.targetHeight/2),h=t=Math.min(Math.max(t,-l*e+r.targetWidth),0),p=n=Math.min(Math.max(n,-c*e+r.targetHeight),0),a={width:l*e,height:c*e,left:t,top:n},i?s.animate(a,{step:function(e,r){switch(r.prop){case"width":d=e/l;break;case"left":h=t=e;break;case"top":p=n=e}s.triggerHandler("image.change",[d,t,n])},complete:function(){d=e;s.triggerHandler("image.change",[d,t,n])}}):(d=e,u!==null&&window.cancelAnimFrame(u),u=window.requestAnimFrame(function(){s.css(a).width(l*e).height(c*e).triggerHandler("image.change",[d,t,n])})))},C=function(e){if(r.enableZoom){e.preventDefault();var t=(e.originalEvent.detail?e.originalEvent.detail:e.originalEvent.wheelDelta)>0?-.2:.2;t*=/(Chrome|IE)/gi.test(navigator.userAgent)?-1:1;N(d+t)}};if(a=e(r.target),a.length===0)return!1;a.css({position:"relative",overflow:"hidden"}).width(r.targetWidth).height(r.targetHeight).prepend(t.settings.imLoadingAnimation);i=new t.mediaObject({url:r.url,effect:"fade",contentWidth:r.targetWidth,contentHeight:r.targetHeight,touchDevice:f,protect:r.protect,load:function(t){var n={x:0,y:0},o={x:0,y:0},u=null;if(s=t.DOMObject(),s.css({display:"none",position:"absolute"}),r.freedom=="ver"?(l=r.targetWidth,c=r.targetWidth*s.attr("data-height")/s.attr("data-width")):r.freedom=="hor"?(c=r.targetHeight,l=r.targetHeight*s.attr("data-width")/s.attr("data-height")):(c=s.attr("data-height"),l=s.attr("data-width")),a.empty().prepend(s),v=r.targetWidth/l,v*c>r.targetHeight&&(v=r.targetHeight/c),r.enableZoom?(N(Math.min(r.targetWidth,r.targetHeight)/Math.max(c,l),(-l+r.targetWidth)/2,(-c+r.targetHeight)/2,!1),r.showZoomControl&&T()):N(1,(-l+r.targetWidth)/2,(-c+r.targetHeight)/2,!1),f){var m=d,g=null,y=null,k=null,L=null;t.BeforeMove(function(e){e.preventDefault();m=d;s.stop(!1,!1);n={x:e.touches[0].pageX,y:e.touches[0].pageY};o={x:h,y:p};g=y=null;S=!0}).Move(function(e){S&&(e.preventDefault(),k=g,L=y,p=y=o.y-(n.y-e.touches[0].pageY),h=g=o.x-(n.x-e.touches[0].pageX),(y<-c*d+r.targetHeight||y>0)&&(p=y=o.y-(n.y-e.touches[0].pageY)/2),(g<-l*d+r.targetWidth||g>0)&&(h=o.x-(n.x-e.touches[0].pageX)/2),s.css("top",y),s.css("left",g),n={x:e.touches[0].pageX,y:e.touches[0].pageY},o={x:h,y:p})}).AfterMove(function(e){e.preventDefault();g!==null&&y!==null&&(k!==null&&L!==null&&(g+=(g-k)*6,y+=(y-L)*6),s.stop(!1,!1).animate({top:Math.min(Math.max(y,-c*d+r.targetHeight),0),left:Math.min(Math.max(g,-l*d+r.targetWidth),0)},{duration:1e3,easing:"iOsSwing",step:function(e,t){t.prop=="top"&&(p=e);t.prop=="left"&&(h=e)}}));S=!1});r.enableZoom&&i.Pinch(function(e){S=!1;e.preventDefault();N(e.scale*m,null,null,!1)})}else r.showNavigator&&x(),s.mousedown(function(e){e.which!=1||r.autoMove||(s.stop(!1,!1).css("cursor","move"),S=!0,n={x:e.pageX,y:e.pageY},o={x:s.position().left,y:s.position().top})}).mouseup(function(){r.autoMove||(S=!1,s.css("cursor","auto"))}).mouseleave(function(){S=!1;s.css("cursor","auto");u!==null&&window.cancelAnimFrame(u)}).mousemove(function(e){if(e.preventDefault(),r.autoMove){S=!0;var t=e.pageX-a.offset().left-r.targetWidth/2,i=e.pageY-a.offset().top-r.targetHeight/2,f=Math.abs(t/i),v="";r.freedom=="ver"?v+="ns":r.freedom=="hor"?v+="ew":f<1.5&&f>.5?(v+=i<0?"n":"s",v+=t<0?"w":"e"):f>1?v+=t<0?"w":"e":f<1&&(v+=i<0?"n":"s");s.css("cursor",v+"-resize");u!==null&&window.cancelAnimFrame(u),function m(e){var n=t*d*e/400,o=i*d*e/400,a;S&&(p=Math.min(Math.max(p-o,-c*d+r.targetHeight),0),h=Math.min(Math.max(h-n,-l*d+r.targetWidth),0),s.css({top:p,left:h}).triggerHandler("image.change",[d,h,p]));a=new Date;u=window.requestAnimFrame(function(){m(new Date-a)})}(0)}else S&&(h=Math.min(Math.max(o.x-(n.x-e.pageX),-l*d+r.targetWidth),0),p=Math.min(Math.max(o.y-(n.y-e.pageY),-c*d+r.targetHeight),0),s.css({top:p,left:h}).triggerHandler("image.change",[d,h,p]))}),r.enableZoom&&s.dblclick(function(){d!=1?N(1):N(v)}),s.on("mousewheel DOMMouseScroll",C).on("dragstart",function(){return!1}),a.append(b=e("<div />").css({position:"absolute",bottom:0,right:0}).width(30).height(30).append(e("<div />").css({background:r.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0}).fadeTo(0,.75)).append(e("<div />").css({background:"transparent url('"+(r.enableZoom?r.lensImage:r.handImage)+"') no-repeat center center",position:"absolute",top:0,bottom:0,left:0,right:0}))).mouseenter(function(){b.stop(!1,!1).animate({right:-30,bottom:-30})}).mouseleave(function(){b.stop(!1,!1).animate({right:0,bottom:0})});i.TriggerAnimationInStart();s.fadeIn();r.animate&&function A(e){var t,n,i;!S&&d>v+.05&&(t=e/1e3*w,n=e/1e3*E,h+=t*d,p+=n*d,(p<-c*d+r.targetHeight||p>0)&&(E*=-1,p=Math.min(Math.max(p,-c*d+r.targetHeight),0)),(h<-l*d+r.targetWidth||h>0)&&(w*=-1,h=Math.min(Math.max(h,-l*d+r.targetWidth),0)),s.css({top:p,left:h}).triggerHandler("image.change",[d,h,p]));i=new Date;window.requestAnimFrame(function(){A(new Date-i)})}(0)}})}})}(_jq,x5engine),function(e,t,n){"use strict";e.extend(t,{parallax:function(){function o(){n.requestAnimationFrame(function(){r=[];i=e(n).height();s=-1;var o=t.utils.getCurrentBrowser();e(".imParallax").each(function(){var t=e(this),n=t.find(".imParallaxBackground"),s,u;if(n.length!=0){if(s=n.data("parallaxDirection")||"down",s=="down"&&(o=="Microsoft Edge"||o=="Microsoft Internet Explorer")){n.css("visibility","visible");return}if(s=="fixed"){if(u=Math.round((i-t.height())/2),n.css("top",(u>0?-u:0)+"px"),n.css("bottom",(u>0?-u:0)+"px"),n.css("visibility","visible"),o=="Microsoft Internet Explorer")return;n.css("background-attachment","fixed");return}var a=t.offset().top+t.height()/2,f=i/2+t.height()/2,l=n.data("parallaxZoom")||0,c=Math.round(t.height()*(1+l/100)),h=(c-t.height())/2;r.push({background:n,focusPoint:a,maxDistance:f,hidden:!0,direction:s,translateYMax:h});n.css("will-change","transform")}});a()})}function u(){n.requestAnimationFrame(function(){i=e(n).height();e(".imParallax").each(function(){var t=e(this),n=t.find(".imParallaxBackground"),r,s;n.length!=0&&(r=n.data("parallaxDirection")||"down",r=="fixed"&&(s=Math.round((i-t.height())/2),n.css("top",(s>0?-s:0)+"px"),n.css("bottom",(s>0?-s:0)+"px")),n.css("visibility","visible"))})})}function a(){var t=(document.documentElement||document.body.parentNode||document.body).scrollTop||n.pageYOffset,o=t+i/2;s!=o&&(s=o,e.each(r,function(t,n){var r=n.focusPoint-o,i;r>n.maxDistance?r=n.maxDistance:r<-n.maxDistance&&(r=-n.maxDistance);i=Math.round(r*n.translateYMax/n.maxDistance);n.direction!="up"&&(i=-i);n.background.each(function(){var r=e(this),s=r.data("parallaxLevels")||1,o,u;s>1&&n.direction!="fixed"?(o=r.data("parallaxLevel")||0,u=(n.direction=="down"?s-o:o+1)/s,r.css("transform","translate3d(0, "+Math.round(i*u)+"px, 0")):r.css("transform","translate3d(0, "+i+"px, 0)")});n.hidden&&(n.background.css("visibility","visible"),n.hidden=!1)}))}function f(e){n.requestAnimationFrame(function(){e();f(e)})}var r=[],i=0,s=-1;return{start:function(){if(t.responsive.isMobileDevice()){u();return}o();var e=document.getElementById("imContent");t.utils.onElementResize(e,function(){o()});f(a)}}}()})}(_jq,x5engine,window),function(e,t){"use strict";e.extend(t,{passwordpolicy:{requiredPolicy:!1,minimumCharacters:6,includeUppercase:!1,includeNumeric:!1,includeSpecial:!1,init:function(n){n=e.extend({requiredPolicy:!1,minimumCharacters:6,includeUppercase:!1,includeNumeric:!1,includeSpecial:!1},n);t.passwordpolicy.requiredPolicy=n.requiredPolicy=="true";t.passwordpolicy.minimumCharacters=parseInt(n.minimumCharacters);t.passwordpolicy.includeUppercase=n.includeUppercase=="true";t.passwordpolicy.includeNumeric=n.includeNumeric=="true";t.passwordpolicy.includeSpecial=n.includeSpecial=="true";n.requiredPolicy=="true"&&t.imForm.activeFocusPasswordPolicy(t.passwordpolicy.getPolicy())},getMinimumCharacters:function(){return t.passwordpolicy.minimumCharacters},getPolicy:function(){var e=["form_password"];return e.push("form_password_length"),t.passwordpolicy.includeUppercase&&e.push("form_password_upper"),t.passwordpolicy.includeNumeric&&e.push("form_password_numeric"),t.passwordpolicy.includeSpecial&&e.push("form_password_special"),e},isValidPassword:function(e){var n=!t.passwordpolicy.includeUppercase||t.passwordpolicy.includeUppercase&&/[A-Z]/.test(e),r=!t.passwordpolicy.includeNumeric||t.passwordpolicy.includeNumeric&&/[0-9]/.test(e),s=!t.passwordpolicy.includeSpecial||t.passwordpolicy.includeSpecial&&/[!?<>#$%&*@()]/.test(e);return e.length>=t.passwordpolicy.minimumCharacters&&n&&r&&s}}})}(_jq,x5engine),function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";function p(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return t.reduce(function(t,n){var r=e["border-"+n+"-width"];return t+p(r)},0)}function v(e){for(var s,o,n={},r=0,i=["top","right","bottom","left"];r<i.length;r+=1)s=i[r],o=e["padding-"+s],n[s]=p(o);return n}function m(e){var t=e.getBBox();return S(0,0,t.width,t.height)}function g(e){var t=e.clientWidth,n=e.clientHeight,f,l;if(!t&&!n)return h;var r=c(e).getComputedStyle(e),i=v(r),s=i.left+i.right,o=i.top+i.bottom,u=p(r.width),a=p(r.height);return r.boxSizing==="border-box"&&(Math.round(u+s)!==t&&(u-=d(r,"left","right")+s),Math.round(a+o)!==n&&(a-=d(r,"top","bottom")+o)),b(e)||(f=Math.round(u+s)-t,l=Math.round(a+o)-n,Math.abs(f)!==1&&(u-=f),Math.abs(l)!==1&&(a-=l)),S(i.left,i.top,u,a)}function b(e){return e===c(e).document.documentElement}function w(e){return t?y(e)?m(e):g(e):h}function E(e){var t=e.x,n=e.y,r=e.width,i=e.height,s=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,o=Object.create(s.prototype);return l(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}function S(e,t,n,r){return{x:e,y:t,width:n,height:r}}var e=function(){function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t?(n=r,!0):!1}),n}return typeof Map!="undefined"?Map:function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){var n=this,r,i,s;for(t===void 0&&(t=null),r=0,i=n.__entries__;r<i.length;r+=1)s=i[r],e.call(t,s[1],s[0])},Object.defineProperties(t.prototype,n),t}()}(),t=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,n=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),r=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(n):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),i=2,s=function(e,t){function u(){n&&(n=!1,e());s&&f()}function a(){r(u)}function f(){var e=Date.now();if(n){if(e-o<i)return;s=!0}else n=!0,s=!1,setTimeout(a,t);o=e}var n=!1,s=!1,o=0;return f},o=20,u=["top","right","bottom","left","width","height","size","weight"],a=typeof MutationObserver!="undefined",f=function(){this.connected_=!1;this.mutationEventsAdded_=!1;this.mutationsObserver_=null;this.observers_=[];this.onTransitionEnd_=this.onTransitionEnd_.bind(this);this.refresh=s(this.refresh.bind(this),o)},T,N,C,k;f.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e);this.connected_||this.connect_()};f.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1);!t.length&&this.connected_&&this.disconnect_()};f.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()};f.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0};f.prototype.connect_=function(){t&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)};f.prototype.disconnect_=function(){t&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)};f.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n;t===void 0&&(t="");n=u.some(function(e){return!!~t.indexOf(e)});n&&this.refresh()};f.getInstance=function(){return this.instance_||(this.instance_=new f),this.instance_};f.instance_=null;var l=function(e,t){for(var i,n=0,r=Object.keys(t);n<r.length;n+=1)i=r[n],Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0});return e},c=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||n},h=S(0,0,0,0),y=function(){return typeof SVGGraphicsElement!="undefined"?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&typeof e.getBBox=="function"}}(),x=function(e){this.broadcastWidth=0;this.broadcastHeight=0;this.contentRect_=S(0,0,0,0);this.target=e};return x.prototype.isActive=function(){var e=w(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},x.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},T=function(e,t){var n=E(t);l(this,{target:e,contentRect:n})},N=function(t,n,r){if(this.activeObservations_=[],this.observations_=new e,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t;this.controller_=n;this.callbackCtx_=r},N.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},N.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},N.prototype.disconnect=function(){this.clearActive();this.observations_.clear();this.controller_.removeObserver(this)},N.prototype.gatherActive=function(){var e=this;this.clearActive();this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},N.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new T(e.target,e.broadcastRect())});this.callback_.call(e,t,e);this.clearActive()}},N.prototype.clearActive=function(){this.activeObservations_.splice(0)},N.prototype.hasActive=function(){return this.activeObservations_.length>0},C=typeof WeakMap!="undefined"?new WeakMap:new e,k=function(e){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=f.getInstance(),n=new N(e,t,this);C.set(this,n)},["observe","unobserve","disconnect"].forEach(function(e){k.prototype[e]=function(){return(t=C.get(this))[e].apply(t,arguments);var t}}),function(){return typeof n.ResizeObserver!="undefined"?n.ResizeObserver:k}()}),function(e,t){"use strict";e.extend(!0,t,{responsive:{interfaceName:"media-query-to-js",init:function(){var n=e(window).width(),r,i;if(t.settings.breakPoints&&t.settings.breakPoints.length){e("body").append('<div id="'+t.responsive.interfaceName+'" />');r=null;i=t.responsive.getCurrentBreakPoint();e(window).on("resize",function(){r&&clearTimeout(r);r=setTimeout(function(){if(!t.utils.isInFullScreenMode()&&e(window).width()!=n){n=e(window).width();var r=t.responsive.getCurrentBreakPoint();!r||!i||(i.hash!=r.hash?(e("#imContent").trigger("beforeBreakpointChanged",r).trigger("breakpointChanged",r).trigger("breakpointChangedOrFluid",r),i=r):r.fluid&&e("#imContent").trigger("breakpointChangedOrFluid",r))}},50)})}},getCurrentBreakPoint:function(){for(var n=e("#"+t.responsive.interfaceName).width(),r=t.settings.breakPoints,i=0;i<r.length;i++)if(r[i].end<=n)return r[i];throw"Breakpoint not found!";},isDesktopMode:function(){return t.settings.breakPoints.length<2?!0:t.responsive.getCurrentBreakPoint().hash==t.settings.breakPoints[0].hash},isMobileDevice:function(){if(t.settings.breakPoints.length<3)return!1;var n=t.settings.breakPoints[t.settings.breakPoints.length-2];return e(window).width()<=n.start&&Modernizr.touchevents},resolutionRedirect:function(n){var o;n=e.extend({execute:!0,defaultUrl:"",rules:[]},n);var r=e("#"+t.responsive.interfaceName),i=r.length&&r.innerWidth()>0,s=i?r.innerWidth():e(window).innerWidth();if(s>0)for(o=0;o<n.rules.length;o++)if(n.rules[o].min<=s&&s<n.rules[o].max)return n.execute&&(location.href=n.rules[o].url),n.rules[o].url;return n.defaultUrl?(n.execute&&(location.href=n.defaultUrl),n.defaultUrl):""},touchHelper:function(){var t=!1,n="touchstart"in document||"ontouchstart"in document;e("body").one("mousemove",function(){t=!0});this.isTouch=function(){return n};this.isTouchOnly=function(){return this.isTouch()&&!t}}}});t.boot.push(t.responsive.init,!1,"first")}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imRollover:function(t){t=e.extend({id:null,movement:"ALTERNATE",direction:"UP",effect:"LINEAR",autostart:!1},t);var n=e(t.id),r,i=null,s=t.time,o=null,u=0,a={top:n.css("padding-top").replace(/px/,"")*1,right:n.css("padding-right").replace(/px/,"")*1,bottom:n.css("padding-bottom").replace(/px/,"")*1,left:n.css("padding-left").replace(/px/,"")*1};switch(t.effect){case"SWING":r="swing";break;case"BOUNCE":r="imBounce";break;default:r="linear"}(n.attr("id")===undefined||n.attr("id")===null)&&n.attr("id","rollover_"+Math.round(Math.random()*1e3));var f=function(s){s=e.extend({tick:!1,reset:!0},s);var a,l;s.reset&&p();switch(t.movement){case"PAGINATE":switch(t.direction){case"UP":l=o.css("top").replace("px","");l=isNaN(parseInt(l,10))?0:parseInt(l,10);l>t.height-o.outerHeight()?o.animate({top:l-t.height},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r}):o.animate({top:0},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r});break;case"BOTTOM":l=o.css("top").replace("px","");l=isNaN(parseInt(l,10))?0:parseInt(l,10);l<=0?o.animate({top:l+t.height},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r}):o.animate({top:t.height-o.height()},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r});break;case"LEFT":a=o.css("left").replace("px","");a=isNaN(parseInt(a,10))?0:parseInt(a,10);a>-o.width()+n.width()?o.animate({left:a-n.width()},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r}):o.animate({left:0},{duration:"medium",complete:function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r});break;case"RIGHT":a=o.css("left").replace("px","");a=isNaN(parseInt(a,10))?0:parseInt(a,10);a<0?o.animate({left:a+n.width()},{duration:"medium",complete:function(){setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r}):o.animate({left:-o.width()+n.width()},{duration:"medium",complete:function(){setTimeout(function(){f({reset:!1})},t.time*1e3)},easing:r})}break;case"CONTINUE":switch(t.direction){case"UP":o.animate({top:-o.outerHeight()},{duration:t.time*1e3,complete:function(){o.css({top:t.outerHeight});f()},easing:r});break;case"BOTTOM":o.animate({top:t.height},{duration:t.time*1e3,complete:function(){o.css({top:-o.height()});f()},easing:r});break;case"LEFT":o.animate({left:-o.width()},{duration:t.time*1e3,complete:function(){o.css({left:n.width()});f()},easing:r});break;case"RIGHT":o.animate({left:n.width()},{duration:t.time*1e3,complete:function(){o.css({left:-o.width()});f()},easing:r})}break;case"SINGLE":switch(t.direction){case"UP":o.animate({top:0},{duration:t.time*1e3,easing:r});break;case"BOTTOM":o.animate({top:-o.height()+t.height},{duration:t.time*1e3,easing:r});break;case"RIGHT":u=h(o.html());o.animate({left:-u+n.width()},{duration:t.time*1e3,easing:r});break;case"LEFT":o.animate({left:0},{duration:t.time*1e3,easing:r})}break;default:switch(t.direction){case"UP":o.animate({top:0},{duration:t.time*1e3,complete:function(){t.direction="BOTTOM";f()},easing:r});break;case"BOTTOM":o.animate({top:-o.height()+t.height},{duration:t.time*1e3,complete:function(){t.direction="UP";f()},easing:r});break;case"RIGHT":u=h(o.html());o.animate({left:-u+n.outerWidth()},{duration:t.time*1e3,complete:function(){t.direction="LEFT";f()},easing:r});break;case"LEFT":o.animate({left:0},{duration:t.time*1e3,complete:function(){t.direction="RIGHT";f()},easing:r})}}},l=function(){t.movement!="PAGINATE"?f():i=setTimeout(function(){f()},t.time*1e3)},c=function(){o.stop()},h=function(r){var i=e("<div><div>"+r+"<\/div><\/div>").css({position:"absolute",top:-1e3}).width(5e7),s=i.children().css({width:"auto","white-space":t.direction=="UP"||t.direction=="BOTTOM"?"normal":"nowrap",display:"inline-block","padding-top":a.top,"padding-bottom":a.bottom,"padding-right":a.right,"padding-left":a.left,"max-width":"100%"}),o=0;return n.append(i),o=s.outerWidth(!0)+30,i.remove(),o},p=function(){e(t.id).parent().height()<t.height&&e(t.id).parent().height(t.height);switch(t.movement){case"CONTINUE":switch(t.direction){case"UP":o.css({left:0,top:t.height});break;case"BOTTOM":o.css({left:0,top:-o.height()});break;case"LEFT":o.css("left",n.width()).width(h(o.html()));break;case"RIGHT":u=h(o.html());o.css("left",-Math.abs(u)).width(u)}break;case"PAGINATE":switch(t.direction){case"BOTTOM":o.css({left:0,top:-o.height()+t.height});break;case"UP":o.css({left:0,top:0});break;case"RIGHT":u=h(o.html());o.css("left",-u+n.width()).width(u);break;case"LEFT":o.css("left",0).width(h(o.html()))}break;default:switch(t.direction){case"UP":o.css({left:0,top:-o.height()+t.height});break;case"BOTTOM":o.css({left:0,top:0});break;case"LEFT":u=h(o.html());o.css("left",-u+n.width()).width(u);break;case"RIGHT":u=h(o.html());o.css("right",-u+n.width()).width(u)}}},d=function(){c();e(o.eq(0).contents()).unwrap();n.height("auto")};(function v(){if(!n.is(":visible")){setTimeout(v,300);return}n.height(t.height).css({position:"relative",overflow:"hidden"});e("#"+n.attr("id")+"_runner").length<1&&n.wrapInner('<div id="'+n.attr("id")+'_runner">');o=e("#"+n.attr("id")+"_runner").css({position:"absolute","padding-top":a.top,"padding-bottom":a.bottom,"padding-right":a.right,"padding-left":a.left,"white-space":t.direction=="UP"||t.direction=="BOTTOM"?"normal":"nowrap","max-width":t.direction=="UP"||t.direction=="BOTTOM"?"100%":"none",width:"100%","box-sizing":"border-box"});t.mouselock&&(t.movement!="PAGINATE"?n.mouseenter(function(){o.pauseAnim()}).mouseleave(function(){o.resAnim()}):n.mouseover(function(){i!==null&&clearTimeout(i)}).mouseleave(function(){i=setTimeout(function(){f({reset:!1})},t.time*1e3)}));t.autostart&&l();n.data("imRollover",{start:function(){l()},stop:function(){c()},disable:function(){d()}})})()}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imShowBox:function(n,r,i){var s=e("html").hasClass("touchevents")?{innerBorder:0,borderWidth:{left:0,right:0,top:0,bottom:0},windowPadding:0}:{},o,u,a,zt,Wt;n=e.extend({},t.settings.imShowBox,n,s);r=r||0;i=e(i);o=r;i.width()&&i.height()&&!i.children("img").length||(u=i.children("img"),u.length?i=u:(a=!1,i.children().each(function(){var t=e(this);a||t.width()===0||t.height()===0||(i=t,a=!0)})));var f=e("html").hasClass("touchevents"),l=/(iPad|iPhone)/i.test(navigator.userAgent),c=!1,h=[],p=null,d=null,v=null,m=null,g=null,y=null,b=null,w=null,E=null,S=null,x=null,T=null,N=null,C=null,k=null,L=null,A=n.effect!="fade"&&n.effect!="custom"?250:2,O=n.effect!="fade"?250:2,M=null,_=e(window),D=_.width(),P=e("body"),H=e("head"),B=null,j=null,F=i.css("visibility"),I=i.width(),q=i.height(),R=!1,U=null,z=null,W=null,X=null,V=null,K=!1,Q=!1,G=1,Y=!1,Z=10,et=!0,tt=!0,nt=t.l10n.get,rt=n.innerBorder*2+n.borderWidth.left+n.borderWidth.right,it=n.innerBorder*2+n.borderWidth.top+n.borderWidth.bottom,st=function(){for(var e={forceStop:!1},t=0;t<n.media.length;t++)e[t]={loadStarted:!1,loadEnded:!1};return e}(),ot=function(e,t,r){n.media[e]&&ut(e,function(e,n){r?ot(e+r,t,r):(ot(e+1,t,1),ot(e-1,t,-1));t(e,n)})},ut=function(r,i){var s,o;st.forceStop||st[r].loadStarted||(st[r].loadStarted=!0,s=n.media[r].load,(n.media[r].effect===undefined||n.media[r].effect===null)&&(n.media[r].effect=n.transitionEffect),o=new t.mediaObject(e.extend({},n.media[r],{touchDevice:f,android:c,allowFrameTransparency:n.allowFrameTransparency,load:function(t){h[r]=t;e.isFunction(i)&&i(r,t);f&&t.AfterMove(function(e,t){e.preventDefault();Q||((Math.abs(t.offsetX)>Math.abs(t.offsetY)?t.offsetX:t.offsetY)<0?Mt():_t())}).Gesture(function(e){e.preventDefault();e.scale<.9&&Ht()}).AfterPinch(function(e){e.preventDefault();Q?e.scale<1?Tt():xt():e.scale<.9&&Ht()});e.isFunction(s)&&s(t);st[r].loadEnded=!0}})))},at=function(t,r){var i,s,o;n.showThumbs&&n.media[t]!==undefined&&n.media[t]!==null&&(i=e("<div class='im-showbox-thumb' data-index='"+t+"'>"),i.css({"background-position":"center center","background-repeat":"no-repeat","background-size":"cover",width:n.thumbSize,height:n.thumbSize,display:"none",cursor:"pointer","box-shadow":"0 0 2px "+n.background}),s="",o=n.media[t].type,s=n.media[t].thumbUrl===undefined?["video","youtube","vimeo"].indexOf(o)!=-1?"res/video_thumb.png":o=="image"?n.media[t].url:"res/impage.png":n.media[t].thumbUrl,e("<img/>").on("load",function(){i.css("background-image",'url("'+s+'")');e.isFunction(r)&&r(t,i)}).attr("src",s),at(t+1,r))},ft=function(e,t){var n,r;if(t.css({float:"left",margin:Z+"px"}),e>0)for(r=e-1;r>=0;r--)if(n=L.find("[data-index="+r+"]"),n.length>0){n.after(t);return}L.prepend(t)},lt=function(e){L.find(".im-showbox-thumb").css("opacity",1);L.find(".im-showbox-thumb[data-index="+e+"]").css("opacity",.6);var t=n.thumbSize+Z*2,r=_.width()/2-(e*t+t/2);L.css("left",r);tt&&(L.animate({bottom:0},500),tt=!1)},ct=function(r){y=e(document.createElement("div"));P.append(y);y.addClass("showbox-bg");!r||y.prepend(t.settings.imLoadingAnimation);y.css({position:"fixed","background-color":n.background,top:0,left:0,bottom:0,right:0,display:"none","z-index":t.settings.zIndex.showBox}).fadeTo(A,n.opacity);ht();n.radialBg&&(/Firefox/i.test(navigator.userAgent)?y.css({"background-image":"-moz-radial-gradient(center 45deg, ellipse farthest-corner, "+t.utils.hex2rgb(n.background,80,80,80)+" 0%, "+t.utils.hex2rgb(n.background,40,40,40)+" 40%, "+t.utils.hex2rgb(n.background)+" 100%)"}):/Chrome/i.test(navigator.userAgent)&&y.css({background:"-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from("+t.utils.hex2rgb(n.background,80,80,80)+"), to("+t.utils.hex2rgb(n.background)+"))"}))},ht=function(){P.append(d);d.show().click(Ht)},pt=function(){g.css("box-shadow",n.shadow)},dt=function(){g.css("box-shadow","")},vt=function(){return K?_.width():_.width()-n.windowPadding*2-(b.outerWidth()+w.outerWidth())},mt=function(){return K?_.height():_.height()-n.windowPadding*2-Math.max(C.outerHeight(),E.outerHeight(),S.outerHeight())-k.outerHeight()},gt=function(e){var t=h[e].Width()/h[e].Height(),n=h[e].Width()+rt,r=h[e].Height()+it,i=vt(),s=mt(),o,u=h[e].GetDescription(),a=null,f,l,c,p;return u&&(a=v.clone(),a.css({position:"absolute",top:-1e3,right:"auto",left:"auto",bottom:"auto"}).width(n).html(u),P.append(a),r+=a.outerHeight()),n>i&&(r=(i-rt)/t+it,n=i,!a||(a.width(n),r+=a.outerHeight())),r>s&&(n=(s-rt)*t+rt,r=s,o=r,!a||(a.width(n),f=a.outerHeight(),o-=f,l=a.width(),c=Math.round(h[e].Width()*o/h[e].Height()),a.width(c),a.outerHeight()<=f?n=Math.round(c):a.width(l))),p=0,!a||(p=a.outerHeight(),a.remove()),{width:n,height:r,dHeight:p}},yt=function(e){n.showProgress&&n.media.length>1&&C.html(e+1+"/"+n.media.length)},bt=function(){return n.fullScreenEnabled&&t.utils.isFullScreenNativelySupported()&&(K?Et():wt()),!1},wt=function(){K=!0;t.utils.enterFullScreen(d.get(0));S.html(n.buttonExitFS).attr("title",nt("showbox_tip_fs_exit","Exit FullScreen"));e(document).on("imFullScreenClose",Et);M!=null&&clearTimeout(M);M=setTimeout(Rt,4e3);e(document).on("mousemove",St);e("#imShowBox").on("click",St)},Et=function(){K&&(K=!1,t.utils.exitFullScreen());S.html(n.buttonEnterFS).attr("title",nt("showbox_tip_fs_enter","Enter FullScreen"));e(document).off("imFullScreenClose",Et);e(document).off("mousemove",St);e("#imShowBox").off("click",St);M!=null?(clearTimeout(M),M=null):qt()},St=function(){M!=null?(clearTimeout(M),M=null):qt();M=setTimeout(Rt,4e3)},xt=function(){return n.zoomEnabled&&Y&&G<6&&(Q=!0,G++,Ct()),!1},Tt=function(){return n.zoomEnabled&&Y&&G>1&&(G--,G==1&&(Q=!1),Ct()),!1},Nt=function(){return n.zoomEnabled&&Y&&Q&&(G=1,Q=!1,Ct()),!1},Ct=function(){if(!R){p.on("showboxReady",Ct);return}var e=h[j].DOMObject();e.css({transform:"scale3d("+G+", "+G+", 1)","transform-origin":"50% 50% 0","transition-property":"transform","transition-duration":Q?"300ms":"0"});Q?(e.addClass("grabbable"),C.fadeOut(),v.fadeOut(),p.css({backgroundColor:"transparent",borderColor:"transparent"}),dt()):(e.removeClass("grabbable"),C.fadeIn(),v.fadeIn(),p.css({backgroundColor:n.boxColor,borderColor:n.borderColor}),pt());e.parent().css({overflow:Q?"visible":"hidden",transform:"translate3d(0, 0, 0)"}).attr("data-x",0).attr("data-y",0);Lt();kt()},kt=function(){var e,t,r;n.zoomEnabled&&(e={cursor:"pointer",position:"absolute",top:"0"},t=n.fullScreenEnabled?S.outerWidth():0,Y?(r=0,x.css(e).css({display:"block",right:r+=E.outerWidth()+t}),G<6?x.children().removeClass("disabled"):x.children().addClass("disabled"),T.css(e).css({display:Q?"block":"none",right:r+=x.outerWidth()}),N.css(e).css({display:Q?"block":"none",right:r+=T.outerWidth()})):(n.media.length==1?x.css("display","none"):x.css(e).css({display:"block",right:E.outerWidth()+t}).children().addClass("disabled"),T.css("display","none"),N.css("display","none")))},Lt=function(){var e=h[j].DOMObject(),t=e.parent(),n={},r={},i=!1,s=!1,o=!1,u=!1,a=function(n,r,i,s){var o=parseInt(t.attr("data-x"))+(r.x-n.x),u=parseInt(t.attr("data-y"))+(r.y-n.y),a=(e.outerHeight()-_.height())/2,f=(e.outerWidth()-_.width())/2;s&&(u<=-a?u=-a:u>=a&&(u=a));i&&(o<=-f?o=-f:o>=f&&(o=f));s?t.attr("data-y",u):u=t.attr("data-y");i?t.attr("data-x",o):o=t.attr("data-x");t.css("transform","translate3d("+o+"px, "+u+"px, 0)")};m.off("mousedown.zoom touchstart.zoom").on("mousedown.zoom touchstart.zoom",function(t){Q&&(u=e.outerHeight()>_.height(),o=e.outerWidth()>_.width(),(o||u)&&(t.preventDefault(),n=t.type=="mousedown"?{x:t.pageX,y:t.pageY}:{x:t.originalEvent.targetTouches[0].pageX,y:t.originalEvent.targetTouches[0].pageY},e.removeClass("grabbable").addClass("grabbing"),s=!0))});_.off("mousemove.zoom touchmove.zoom").on("mousemove.zoom touchmove.zoom",function(e){if(s){var a,f;i=!0;r=e.type=="mousemove"?{x:e.pageX,y:e.pageY}:{x:e.originalEvent.targetTouches[0].pageX,y:e.originalEvent.targetTouches[0].pageY};f=u?parseInt(t.attr("data-y"))+(r.y-n.y):t.attr("data-y");a=o?parseInt(t.attr("data-x"))+(r.x-n.x):t.attr("data-x");t.css("transform","translate3d("+a+"px, "+f+"px, 0)")}});_.off("mouseup.zoom touchend.zoom").on("mouseup.zoom touchend.zoom",function(t){s&&(s=!1,e.removeClass("grabbing").addClass("grabbable"),i&&(n.x!==r.x||n.y!==r.y)&&(t.type=="mouseup"&&(r={x:t.pageX,y:t.pageY}),a(n,r,o,u)),i=!1)})},At=function(e,t,n,i){st[e].loadEnded?Ot(e,t,n,i):st[e].loadStarted?setTimeout(function(){At(e,t,n,i)},100):(r=e,ot(e,function(r){r==e&&Ot(e,t,n,i)}))},Ot=function(t,r,i,s){var o=gt(t),u=j!==null?gt(j):{width:0,height:0};r=r?r:!1;i=i?i:!1;R=!1;Y=n.media[t].type=="image";yt(t);lt(t);var a=function(t){j!==null?(v.stop(!1,!1).fadeOut(A/2),h[j].AnimateOut(m,function(n){n.DOMObject().detach();e.isFunction(t)&&t()},r)):e.isFunction(t)&&t()},f=function(){h[t].AppendTo(m);m.width(o.width-rt).height(o.height-o.dHeight-it);h[t].ContentWidth(o.width-rt);h[t].ContentHeight(o.height-o.dHeight-it);var e=null;et&&(e=n.media[t].effect,h[t].ChangeAnimation("none"),et=!1);h[t].AnimateIn(m,function(){h[t].GetDescription()!==""&&v.html(h[t].GetDescription()).fadeIn(A);e!==null&&h[t].ChangeAnimation(e);l&&h[t].DOMObject().is("iframe")?m.css({overflow:"scroll","-webkit-overflow-scrolling":"touch"}):m.css({overflow:"hidden","-webkit-overflow-scrolling":""});R=!0;p.trigger("showboxReady")},r)},c=function(){var e=(_.height()-o.height)/2,t=Math.max(C.outerHeight(),E.outerHeight(),S.outerHeight())+n.windowPadding,r=k.outerHeight()+n.windowPadding;if(!K){if(e<t)return t;if(e<r)return e-(r-e)}return e},d=function(t){n.shadow&&dt();p.stop(!1,!1).animate({width:o.width-rt,height:o.height-it,left:(_.width()-o.width)/2,top:c()},{duration:p.width()>32?O:A,complete:function(){p.css("overflow","visible").trigger("showboxReady");!n.shadow||pt();e.isFunction(t)&&t()}})},g=function(){j=t;y||s?d(function(){f()}):f()},y=u.width!=o.width||u.height!=o.height;i||!y?(a(),g()):a(g)},Mt=function(){return Q&&Nt(),jt(),j+1<h.length?At(j+1):At(0),!1},_t=function(){return Q&&Nt(),jt(),j-1<0?At(h.length-1,!0):At(j-1,!0),!1},Dt=function(){var n=t.utils.fullScreenElement();n&&n!==d.get(0)||(Q&&Nt(),h[j].DOMObject().is("iframe")&&navigator.userAgent.indexOf("X5")!=-1||At(j,null,null,!0))},Pt=function(e){switch(e.keyCode){case 37:case 40:e.preventDefault();_t();break;case 39:case 38:e.preventDefault();Mt();break;case 27:e.preventDefault();K?bt():Ht()}},Ht=function(){var t=function(){z&&(z.attr("content",V+", maximum-scale=4, user-scalable=yes"),_.scrollLeft(W),_.scrollTop(X))},r,s,u;d.off("click");P.off("keydown",Pt);_.off("resize",At);y.stop(!1,!1).fadeOut(A,function(){y.remove()});j!==null&&h[j].Stop();!U||clearTimeout(U);(n.effect=="zoom"||n.effect=="hide")&&j!=o&&(i.css("visibility",F),n.effect="fade");e.isFunction(n.onClose)&&n.onClose();!B||B.pause();switch(n.effect){case"fade":p.stop(!1,!1).fadeOut(A,function(){d.remove();t()});break;case"move":p.stop(!1,!1).animate({top:-p.outerHeight()},{duration:A,complete:function(){d.remove();t()}});break;case"zoom":case"hide":r=i.offset();r.left-=_.scrollLeft();r.top-=_.scrollTop();s=h[j].DOMObject();v.fadeOut(A);u=i.find("img");i.is("img")&&(u=i.clone().css({width:"100%",height:"100%",visibility:"visible"}).fadeIn(0),s.before(u));s.css({width:"100%",height:"100%"}).fadeOut(A);m.animate({width:I,height:q},{duration:A});n.shadow!==""&&dt();p.animate({top:r.top,left:r.left,width:I,height:q,padding:0},{duration:A,complete:function(){n.effect=="hide"&&i.css("visibility",F);d.remove();t()}});break;default:d.remove();y.stop().remove();t()}st.forceStop=!0},Bt=function(){U=setTimeout(function(){Mt();U=null;Bt()},n.autoplayTime)},jt=function(){U!==null&&clearTimeout(U)},Ft=function(){if(n.buttons){var e={cursor:"pointer",position:"absolute"};n.media.length>1&&(w.stop(!0,!0).css(e).css({top:(_.height()-w.height())/2,left:0}).fadeIn(A),b.stop(!0,!0).css(e).css({top:(_.height()-b.height())/2,right:0}).fadeIn(A));n.fullScreenEnabled&&S.stop(!0,!0).css(e).css({top:0,display:"block",right:E.outerWidth()});kt()}},It=function(e){M=null;e=e||!1;w.add(b).stop(!1,!1).fadeOut(e?0:O)},qt=function(){d.removeClass("imHideShowBoxControls")},Rt=function(){d.addClass("imHideShowBoxControls");M=null},Ut=function(){n.sound&&(B=new Audio(n.sound),B.play())};p=e('<div id="imShowBox"/>');d=e('<div id="imShowBoxWrapper"/>');m=e("<div />");v=e("<div />");E=e('<div id="imShowBoxClose"/>').html(n.buttonClose);b=e('<div id="imShowBoxNext"/>').html(n.buttonRight);w=e('<div id="imShowBoxPrev"/>').html(n.buttonLeft);S=e('<div id="imShowBoxFullScreenToggle"/>').html(n.buttonEnterFS);x=e('<div id="imShowBoxZoomIn"/>').html(n.buttonZoomIn);T=e('<div id="imShowBoxZoomOut"/>').html(n.buttonZoomOut);N=e('<div id="imShowBoxZoomRestore"/>').html(n.buttonZoomRestore);C=e('<div id="imShowBoxProgress"/>');k=e('<div id="imShowBoxThumbs"/>');L=e('<div id="imShowBoxThumbsDragger"/>');b.css({display:"none"}).click(Mt).attr("title",nt("showbox_tip_next","Next")).on("selectstart mousedown",function(){return!1});w.css({display:"none"}).click(_t).attr("title",nt("showbox_tip_prev","Previous")).on("selectstart mousedown",function(){return!1});m.addClass(n.boxClass).css({position:"relative",height:"100%",overflow:"hidden"});v.css({"font-family":n.fontFamily,"font-size":n.fontSize,color:n.textColor,"padding-top":0,"padding-left":n.innerBorder,"padding-right":n.innerBorder,"padding-bottom":n.innerBorder,"text-align":n.textAlignment,"font-style":n.fontStyle,"font-weight":n.fontWeight,"line-height":1.4,position:"absolute",right:0,left:0,bottom:0});E.css({position:"absolute",right:0,top:0,cursor:"pointer",display:"block"}).click(Ht).attr("title",nt("showbox_tip_close","Close"));S.css({display:"none"}).click(bt).attr("title",nt(t.utils.isFullScreenNativelySupported()?"showbox_tip_fs_enter":"showbox_tip_fs_unavailable"),t.utils.isFullScreenNativelySupported()?"Enter FullScreen":"FullScreen unavailable").children().addClass(t.utils.isFullScreenNativelySupported()?"":"disabled");x.css({display:"none"}).click(xt).attr("title",nt("showbox_tip_zoom_in","Zoom In"));T.css({display:"none"}).click(Tt).attr("title",nt("showbox_tip_zoom_out","Zoom Out"));N.css({display:"none"}).click(Nt).attr("title",nt("showbox_tip_zoom_restore","Zoom Restore"));C.css({position:"absolute",padding:10,top:0,left:0,"text-shadow":"0 0 2px "+n.background}).addClass("im-common-button-text-style");k.css({position:"absolute",bottom:0,left:0,width:"100%",display:"none"});L.css({position:"absolute",bottom:-(n.thumbSize+Z*2),left:0,width:n.media.length*(n.thumbSize+Z*2),"transition-duration":"200ms"});k.append(L);p.click(function(e){e.stopPropagation()});d.append(p).append(E).append(S).append(x).append(T).append(N).append(C).append(k).css({position:"fixed",top:0,left:0,bottom:0,right:0,display:"none","z-index":t.settings.zIndex.showBox+1});f||d.append(w).append(b);p.append(m).append(v).append(t.settings.imLoadingAnimation).css({position:"fixed","background-position":"center center","background-repeat":"no-repeat","border-radius":n.borderRadius,"z-index":t.settings.zIndex.showBox+2,overflow:"visible"});[E,w,b,S,x,T,N,C,k].map(function(e){e.css("z-index",t.settings.zIndex.showBox+3)});R?Ft():p.on("showboxReady",Ft);g=n.boxColor=="transparent"&&(n.borderWidth.top===0&&n.borderWidth.bottom===0&&n.borderWidth.left===0&&n.borderWidth.right===0||n.borderColor=="transparent transparent transparent transparent")?m:p;f&&(X=_.scrollTop(),W=_.scrollLeft(),z=H.find('meta[name="viewport"]'),z.length||(z=e('<meta name="viewport" content="initial-scale=1" />'),H.append(z)),V=z.attr("content"),z.attr("content",V+", user-scalable=no, maximum-scale=1"));n.autoplay&&p.one("showboxReady",Bt);n.showThumbs&&(k.css({display:"block",height:n.thumbSize+Z*2}),at(0,function(e,t){ft(e,t);t.fadeIn(A).click(function(){return At(e),!1})}));switch(n.effect){case"none":case"fade":case"move":ct();p.css({width:32,height:32,left:(_.width()-32)/2,"background-color":n.boxColor,top:n.effect!="move"?(_.height()-32)/2:-50,padding:n.innerBorder,"border-top-width":n.borderWidth.top,"border-right-width":n.borderWidth.right,"border-bottom-width":n.borderWidth.bottom,"border-left-width":n.borderWidth.left,"border-style":"solid","border-color":n.borderColor,display:n.effect!="move"?"none":"block"});zt=function(){ot(r,function(e){e===r&&(p.find(".imLoadAnim").remove(),At(r,!1,!1),Ut())});P.keydown(Pt);_.resize(function(){e(this).width()!=D&&(D=e(this).width(),Dt())})};n.effect!="move"?p.fadeIn(A,zt):(p.animate({top:(_.height()-32)/2},{duration:A}),zt());break;case"zoom":case"hide":Wt=i.offset();Wt.left-=_.scrollLeft();Wt.top-=_.scrollTop();ct();p.css({width:i.width(),height:i.height(),left:Wt.left,top:Wt.top,padding:0,"background-color":"transparent","border-top-width":0,"border-right-width":0,"border-bottom-width":0,"border-left-width":0,display:"none"}).fadeIn(A);ot(r,function(t,s){var o,u,a;t===r&&(j=t,Y=n.media[t].type=="image",yt(t),o=null,i.is("img")&&(o=i.clone().css({width:"100%",height:"100%"}),m.append(o)),n.effect=="hide"&&i.css("visibility","hidden"),p.find(".imLoadAnim").remove(),u=gt(t),a=s.DOMObject(),a.css({top:0,left:0,width:"100%",height:"100%",display:"none"}),m.append(a),m.stop(!0,!0).animate({width:u.width-rt,height:u.height-u.dHeight-it},{duration:A}),s.TriggerAnimationInStart(),p.css({"background-color":n.boxColor,"border-top-width":0,"border-right-width":0,"border-bottom-width":0,"border-left-width":0,"border-style":"solid","border-color":n.borderColor}).stop(!0,!0).animate({padding:n.innerBorder,width:u.width-rt,height:u.height-it,"border-top-width":n.borderWidth.top,"border-right-width":n.borderWidth.right,"border-bottom-width":n.borderWidth.bottom,"border-left-width":n.borderWidth.left,top:(_.height()-u.height)/2,left:(_.width()-u.width)/2},{duration:A,complete:function(){lt(t);R=!0;p.trigger("showboxReady");a.width(u.width-rt).height(u.height-u.dHeight-it);At(t);n.shadow!==""&&pt();s.TriggerAnimationInEnd()}}),!o||o.fadeOut(function(){o.remove()}),a.fadeIn(A),v.empty().fadeOut(A),Ut(),P.keydown(Pt),_.resize(function(){e(this).width()!=D&&(D=e(this).width(),Dt())}))});break;case"custom":n.customEffect&&(ct(!0),p.css({width:32,height:32,left:(_.width()-32)/2,"background-color":n.boxColor,top:n.effect!="move"?(_.height()-32)/2:-50,padding:n.innerBorder,"border-top-width":n.borderWidth.top,"border-right-width":n.borderWidth.right,"border-bottom-width":n.borderWidth.bottom,"border-left-width":n.borderWidth.left,"border-style":"solid","border-color":n.borderColor,display:"none"}),ot(r,function(e){e===r&&(y.find(".imLoadAnim").remove(),p.fadeIn(A,function(){p.find(".imLoadAnim").remove();At(r,!1,!1);var e=function(){p.addClass(n.customEffect)};navigator.userAgent.indexOf("MS IE")>-1?setTimeout(e,2):e();Ut()}))}),P.keydown(Pt),_.resize(function(){e(this).width()!=D&&(D=e(this).width(),Dt())}))}return!1}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imSlider:{Horizontal:function(n,r){var i=e(n),s=0,o=0,u=i.find(".imGlContent"),a=i.find(".imRunner"),f=0,l=!1,c=e("html").hasClass("touchevents"),h=null,p=e.extend({helperBg:"black",swipeImage:"res/move.png",visibleImagesCount:0},r);if(c){i.find(".imLeftArrow").add(i.find(".imRightArrow")).css("visibility","hidden");var d=a.find("img").outerWidth(!0),v=null,m=new t.mediaObject({type:"dom",url:n+" .imRunner",width:a.width(),height:a.height(),effect:"none",touchDevice:!0,load:function(e){var t,n,r,i,s=a.width(),o=u.width();e.TriggerAnimationInStart().TriggerAnimationInEnd().BeforeMove(function(e){a.stop(!1,!1);r=e.touches[0].pageX;i=f;d=a.find("img").outerWidth(!0);t=null}).Move(function(e){e.preventDefault();n=t;f=t=i-(r-e.touches[0].pageX);(t<-s+o||t>0)&&(f=i-(r-e.touches[0].pageX)/2);window.cancelAnimFrame(v);v=window.requestAnimFrame(function(){a.css("left",f)});r=e.touches[0].pageX;i=f}).AfterMove(function(e){if(e.preventDefault(),!!t){n&&(t+=(t-n)*6);var r=Math.abs(t%d);r>d/2?t-=d-r:t+=r;a.stop(!1,!1).animate({left:Math.min(Math.max(t,-s+o),0)},{duration:1e3,easing:"iOsSwing",step:function(e,t){t.prop=="left"&&(f=e)}})}l=!1})}});h=e('<div data-hide="false" />').css({position:"absolute",bottom:0,right:0}).width(30).height(30).append(e("<div />").css({background:p.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0}).fadeTo(0,.75)).append(e("<div />").css({background:"transparent url('"+p.swipeImage+"') no-repeat center center",position:"absolute",top:0,bottom:0,left:0,right:0}));u.append(h)}else o=a.find("img").length,i.find(".imLeftArrow").not(".hiddenArrow").off("click").on("click",function(){s===0?s=o-p.visibleImagesCount:(s-=p.visibleImagesCount,s=Math.max(s,0));f=-a.find("img").eq(s).position().left;a.stop(!1,!1).animate({left:f})}),i.find(".imRightArrow").not(".hiddenArrow").off("click").on("click",function(){var e=o-p.visibleImagesCount;s>=e?s=0:(s+=p.visibleImagesCount,s=Math.min(s,e));f=-a.find("img").eq(s).position().left;a.stop(!1,!1).animate({left:f})})},Vertical:function(n,r){var i=e(n),s=0,o,u=i.find(".imGlContent"),a=i.find(".imRunner").on("dragstart",function(){return!1}),f=0,l=!1,c=e("html").hasClass("touchevents"),h=null,p=e.extend({helperBg:"black",swipeImage:"res/move.png",visibleImagesCount:0},r);if(c){i.find(".imTopArrow").add(i.find(".imBottomArrow")).css("visibility","hidden");var d=0,v=null,m=new t.mediaObject({type:"dom",url:n+" .imRunner",width:a.width(),height:a.height(),effect:"none",touchDevice:!0,load:function(e){var t,n,r,i,s=a.height(),o=u.height();e.TriggerAnimationInStart().TriggerAnimationInEnd().BeforeMove(function(e){a.stop(!1,!1);r=e.touches[0].pageY;i=f;d=a.find("img").outerHeight(!0);t=null}).Move(function(e){e.preventDefault();n=t;f=t=i-(r-e.touches[0].pageY);(t<-s+o||t>0)&&(f=i-(r-e.touches[0].pageY)/2);window.cancelAnimFrame(v);v=window.requestAnimFrame(function(){a.css("top",f)});r=e.touches[0].pageY;i=f}).AfterMove(function(e){if(e.preventDefault(),!!t){n&&(t+=(t-n)*6);var r=Math.abs(t%d);r>d/2?t-=d-r:t+=r;a.stop(!1,!1).animate({top:Math.min(Math.max(t,-s+o),0)},{duration:1e3,easing:"iOsSwing",step:function(e,t){t.prop=="top"&&(f=e)}})}l=!1})}});h=e('<div data-hide="false" />').css({position:"absolute",bottom:0,right:0}).width(30).height(30).append(e("<div />").css({background:p.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0}).fadeTo(0,.75)).append(e("<div />").css({background:"transparent url('"+p.swipeImage+"') no-repeat center center",position:"absolute",top:0,bottom:0,left:0,right:0}));u.append(h)}else o=a.find("img").length,i.find(".imTopArrow").off("click").on("click",function(){s===0?s=o-p.visibleImagesCount:(s-=p.visibleImagesCount,s=Math.max(s,0));f=-a.find("img").eq(s).position().top;a.stop(!1,!1).animate({top:f})}),i.find(".imBottomArrow").off("click").on("click",function(){var e=o-p.visibleImagesCount;s>=e?s=0:(s+=p.visibleImagesCount,s=Math.min(s,e));f=-a.find("img").eq(s).position().top;a.stop(!1,!1).animate({top:f})})},Page:function(n,r){var i=e(n),s=e(n+" .imSPage"),o=e(n+" .imRunner").on("dragstart",function(){return!1}),u=0,a=10,f=!1,l=e("html").hasClass("touchevents"),c=s.width(),h=s.length*c,p=null,d=e.extend({helperBg:"black",swipeImage:"res/move.png"},r),v,m;if(r.fluidMode==1){o.width("auto");return}o.width(h);l?(m=new t.mediaObject({type:"dom",url:n+" .imRunner",width:h,height:o.height(),effect:"none",touchDevice:!0,load:function(e){var t,n,r,s,a=i.width();e.TriggerAnimationInStart().TriggerAnimationInEnd().BeforeMove(function(e){o.stop(!1,!1);r=e.touches[0].pageX;s=u;t=null}).Move(function(e){e.preventDefault();n=t;u=t=s-(r-e.touches[0].pageX);(t<-h+a||t>0)&&(u=s-(r-e.touches[0].pageX)/2);o.css("left",u);r=e.touches[0].pageX;s=u}).AfterMove(function(e,r){if(e.preventDefault(),!!t){var i=Math.abs(t%c);t+=i;Math.abs(r.offsetX)>30&&(t+=t-i-n<0?-c:c);o.stop(!1,!1).animate({left:Math.min(Math.max(t,-h+a),0)},{duration:1e3,easing:"iOsSwing",step:function(e,t){t.prop=="left"&&(u=e)}})}f=!1})}}),p=e('<div data-hide="false" />').css({position:"absolute",bottom:0,right:0}).width(30).height(30).append(e("<div />").css({background:d.helperBg,"border-top-left-radius":5,position:"absolute",top:0,bottom:0,left:0,right:0}).fadeTo(0,.75)).append(e("<div />").css({background:"transparent url('"+d.swipeImage+"') no-repeat center center",position:"absolute",top:0,bottom:0,left:0,right:0})),i.append(p)):(v=e(n+" .imSControls"),v.length&&v.remove(),i.append('<div class="imSControls"><p class="imPPrev">&lt;<\/p><p class="imPNext">&gt;<\/p><\/div>'),v.css({"border-radius":a+"px "+a+"px 0 0",color:"black",bottom:-v.height()-50}),e(n+" .imPPrev").off("click").on("click",function(){u+c>0?u=-h+c:u+=c;o.animate({left:u})}),e(n+" .imPNext").off("click").on("click",function(){u-c<-h+c?u=0:u-=c;o.animate({left:u})}),i.mouseleave(function(){v.stop(!0,!0).animate({bottom:-v.height()-50})}).mouseover(function(){v.stop(!0,!0).animate({bottom:0})}))}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imSplashBox:function(n){var r='<img class="imCloseInn" src=\''+t.settings.currentPath+"res/imClose.png' />",i=500,s,o,u,a,f,l=null,c=e(),h=e(window),p=e("body"),d,y,b,w;if(n=e.extend(!0,{id:"splash",effect:"fade",position:"center",shadow:!0,margin:10,cookie:!1,priority:0,link:"",media:null,text:"",sound:"",onClose:null,elementClose:r,offlineTimeStamp:0},n),d="im_splash"+n.id+(!t.utils.isOnline()&&!!n.offlineTimeStamp?"_"+n.offlineTimeStamp:""),n.cookie&&e.imCookie(d)=="true")return!1;var v=function(){var t,r;f?(c=f.DOMObject(),s.add(c).css({width:"",height:"",right:"",bottom:""}),u=f.Width(),a=f.Height()):(u=s.width(),a=s.height());t=h.width()-40;r=h.height()-40;u>t?(u=t,s.add(c).outerWidth(u),a=s.outerHeight()):s.add(c).outerWidth(u);!!c.length&&a>r&&(u=r/a*u,a=r,s.add(c).outerHeight(a).outerWidth(u));switch(n.position){case"center":o={left:(h.width()-u)/2,top:(h.height()-a)/2};break;case"center-left":o={left:n.margin,top:(h.height()-a)/2};break;case"center-right":o={left:h.width()-u-n.margin,top:(h.height()-a)/2};break;case"bottom":o={left:(h.width()-u)/2,top:h.height()-a-n.margin};break;case"bottom-right":o={left:h.width()-u-n.margin,top:h.height()-a-n.margin};break;case"bottom-left":o={left:n.margin,top:h.height()-a-n.margin};break;case"top":o={left:(h.width()-u)/2,top:n.margin};break;case"top-right":o={left:h.width()-u-n.margin,top:n.margin};break;case"top-left":o={left:n.margin,top:n.margin}}s.css(o)},m=function(t){n.cookie&&e.imCookie(d,"true",{expires:0});e.isFunction(n.onClose)&&n.onClose();s.fadeOut(200,function(){s.remove();l&&l.pause()});p.off("keydown",y);t.stopPropagation()},g='<div id="'+n.id+'" class="splashbox">';return n.elementClose!==""&&(g+='<div style="text-align: right; "><div class="imClose close">'+n.elementClose+"<\/div><\/div>"),!n.text||(g+='<div class="splashContent" style="overflow: hidden;">'+n.text+"<\/div>"),g+=n.media?'<div class="splashContent mediaTarget" style="overflow: hidden;"><\/div>':"",g+="<\/div>",e("body").append(g),s=e("#"+n.id).fadeOut(0).css({zIndex:t.settings.zIndex.splashBox+n.priority}),n.shadow&&s.css("box-shadow","0px 3px 7px #000"),y=function(e){e.keyCode==27&&m(e)},p.keydown(y),b=function(t){var r=f?f.DOMObject():s.find(".splashContent");setTimeout(function(){s.fadeIn(0);s.fadeOut(0);v();var f;h.resize(function(){clearTimeout(f);f=setTimeout(v,100)});s.find(".close").click(m);r.click(function(){e.isFunction(n.link)?n.link.call(s):n.link!==""&&(location.href=n.link)});switch(n.effect){case"fromtop":s.css({top:-e(window).height()-a});s.fadeIn(0);s.animate(o,{duration:i,complete:t});break;case"frombottom":s.css({top:e(window).height()+a});s.fadeIn(0);s.animate(o,{duration:i,complete:t});break;case"fromleft":s.css({left:-u});s.fadeIn(0);s.animate(o,{duration:i,complete:t});break;case"fromright":s.css({left:u+h.width()});s.fadeIn(0);s.animate(o,{duration:i,complete:t});break;case"fade":s.fadeIn(i,t);break;default:s.css("display","");s.addClass(n.effect);e.isFunction(t)&&t()}n.sound&&n.sound&&(l=new Audio(n.sound),l.play())},500)},n.media?(w=n.media.load,f=new t.mediaObject(e.extend(n.media,{load:function(t){t.AppendTo(e(".mediaTarget"));t.DOMObject().css("position","");setTimeout(function(){b(function(){e.isFunction(w)&&w(t)})},100)}}))):b(),{close:function(){e.isFunction(m)&&m()}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{textTabs:function(n){var L,A,O,M,W;if(n=e.extend({target:null,width:0,height:0,effect:"horizontalSlide",tabPosition:"top",autoplay:!1,interval:5e3,setTabScrollWidth:!1,setContainerHeight:!1,enableFixedHeight:!1,fixedHeight:200,cleanCssContent:!1,slideshow:{active:!1,nextPrevMode:"hover",buttonPrev:{url:"",x:0,y:0},buttonNext:{url:"",x:0,y:0}}},n),n.target!==null){var r=e(n.target),i=r.find(".tab").not(".tab-scroller"),s=r.find(".tab-scroller"),o=r.find(".text-tabs-outer"),u=r.find(".text-tabs-inner"),a=r.find("[id*="+r.attr("id")+"]"),f=r.find(".text-container"),l=f.position(),c=f.width(),h=[],p=0,d=e("html").hasClass("touchevents"),v=0,m=null,g=i.width()+1,y=i.height()+1,b,w,E=u.height(),S=u.width(),x=null,T=null,N=null,C=0,k=!0;if(n.setTabScrollWidth&&s.filter(":visible").length>0?o.width(f.width()-s.eq(0).outerWidth(!0)-s.eq(1).outerWidth(!0)):o.css("width",""),b=o.height(),w=o.width(),L=e("#"+r[0].id+"_tab0").find(".text-tab-content.text-inner.grid-prop.current-tab"),n.enableFixedHeight!==!0||d)if(n.setContainerHeight===!0){for(L.length>0&&p==0&&L.css("height","auto"),A=0,O=0,f.height("auto"),a.height("auto").width(f.width()),O=0;O<a.length;O++)A=Math.max(a.eq(O).outerHeight(!0),A);for(O=0;O<a.length;O++)a.eq(O).height(A);L.length>0&&p==0&&(M=parseInt(e("#"+r[0].id+" .text-container").css("min-height"))-parseInt(e(L).css("padding-top"))-parseInt(e(L).css("padding-bottom"))+"px",L.css("height",M));f.height(A)}else f.css("height","");else f.height(n.fixedHeight);if(L.length>0&&p==0)try{L.data("imRollover").start()}catch(_){}d||e("#"+r[0].id+" .tab").addClass("not-mobile");(window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPhone/i))&&r.css("-webkit-text-size-adjust","none");var D=function(e,t,n,r){if(e!=p){U(e);var s=h[p].DOMObject().find(".text-inner").data("imRollover");s&&(r!=undefined&&r?s.disable():s.stop());f.css("overflow-x","hidden");h[e].DOMObject().wrapInner('<div class="temp-wrapper" style="overflow-x: hidden; width: '+f.width()+'px;" />');h[p].AnimateOut(f,function(t){t.DOMObject().hide(0);setTimeout(function(){z(e)},100)},t);h[e].AnimateIn(f,function(e){e.DOMObject().find(".temp-wrapper").contents().unwrap();f.css("overflow-x","");var t=e.DOMObject().find(".text-inner").data("imRollover");t&&t.start()},t);i.removeClass("selected-text-tab").eq(e).addClass("selected-text-tab");n&&B(e);p=e}},P=function(e){e=e?!0:!1;q();D((p+1)%h.length,!1,e)},H=function(e){e=e?!0:!1;q();D(p-1<0?h.length-1:p-1,!0,e)},B=function(e,t){t=t===null||t===undefined?!1:!0;var r=n.tabPosition=="bottom"||n.tabPosition=="top",i=r?g:y,o=r?S:E,a=r?w:b,f=v+e*i<a/2?!0:!1,l;if(s.length!=2||!t&&v>=e*-i&&v<=(e+1)*-i+a)return!1;l=f?e*-i:e*-i+a-i;v=Math.min(0,Math.max(-o+a,l));u.stop(!1,!1);r?u.animate({left:v}):u.animate({top:v})},j=function(){m!==null&&clearTimeout(m);m=setTimeout(function(){P(!0);j()},n.interval)},F=function(){m!==null&&clearTimeout(m)},I=function(e){e.TriggerAnimationInStart().TriggerAnimationInEnd().AfterMove(function(e,t){e.preventDefault();(Math.abs(t.offsetX)>Math.abs(t.offsetY)?t.offsetX:t.offsetY)<0?P(!0):H(!0)})},q=function(){var e=f.get(0).scrollWidth==f.get(0).clientWidth,r;for(h=[],r=0;r<a.length;r++)h[h.length]=new t.mediaObject({url:"#"+a.eq(r).attr("id"),type:"dom",effect:n.effect,width:n.width,height:a.eq(r).height(),contentWidth:f.width(),contentHeight:a.eq(r).height(),touchDevice:e,load:I,selectable:!0})};i.off("click").on("click",function(t){t.preventDefault();var n=e(this).attr("data-index")*1;return R(n),!1}).css("left",0);var R=function(e){k!=0&&e!==null&&e!==!1&&(q(),F(),D(e,e<p,!0))},U=function(t){if(k=!1,e("#"+r[0].id+" .text-container").append(e('<div class="grid-prop text-tab-content-place-holder">')),e("#"+r[0].id+" .grid-prop.text-tab-content-place-holder").css("min-height",f.height()),e("#"+r[0].id+" .grid-prop.text-tab-content-place-holder").css("height","100%"),e("#"+r[0].id+" .text-tab-content.current-tab").css("display","block"),e("#"+r[0].id+" .text-tab-content").css("position","").addClass("detach"),e("#"+r[0].id+" .text-tab-content").removeClass("current-tab grid-prop").css("opacity",""),n.effect=="horizontalSlide"||n.effect=="bounceFromLeft"||n.effect=="elasticFromLeft"||n.effect=="elasticFromRight"){var i=e("#"+r[0].id+" .text-container").width()*-1;e("#"+r[0].id+"_tab"+t+"").css("left",i)}},z=function(i){var s,o,u,f,l;for(e("#"+r[0].id+" .text-tab-content").removeClass("detach"),e("#"+r[0].id+" .text-tab-content").addClass("grid-prop"),e("#"+r[0].id+" .grid-prop").removeClass("current-tab"),e("#"+r[0].id+" .text-container").find("[data-index='"+i+"']").addClass("current-tab"),s=!!window.MSInputMethodContext&&!!document.documentMode,o=0;o<a.length;o++)u=e("#"+r[0].id+"_tab"+o+""),n.cleanCssContent?(u.css({display:"","transform-origin":"",transform:"",left:0,top:0,height:"100%",width:"100%"}),s||u.css("position",""),e("#"+r[0].id+"_tab"+o+" div").hasClass("text-tab-content")&&(e("#"+r[0].id+"_tab"+o+" .text-tab-content").css({display:"","transform-origin":"",transform:"",left:0,top:0,height:"100%",width:"100%"}),s||e("#"+r[0].id+"_tab"+o+" .text-tab-content").css("position",""))):(u.css("height","100%"),s||u.css("position",""),e("#"+r[0].id+"_tab"+o+" div").hasClass("text-tab-content")&&(e("#"+r[0].id+"_tab"+o+" .text-tab-content").css("height","100%"),s||e("#"+r[0].id+"_tab"+o+" .text-tab-content").css("position","")));e("#"+r[0].id+"_tab"+i+"").css("opacity","").addClass("current-tab");f=e("#"+r[0].id+"_tab"+i+"").find(".text-tab-content.text-inner.grid-prop.current-tab");f.length>0&&(l=parseInt(e("#"+r[0].id+" .text-container").css("min-height"))-parseInt(e(f).css("padding-top"))-parseInt(e(f).css("padding-bottom"))+"px",e(f).css("position","relative"),t.responsive.getCurrentBreakPoint().name=="Desktop"&&e(f).css("height",l));e("#"+r[0].id+" .text-tab-content-place-holder").remove();k=!0};if(n.slideshow.active&&n.slideshow.nextPrevMode!="none"&&(W=e(n.target).css("padding-top"),W=W!=undefined?parseFloat(W):0,e("<img />").one("load",function(){var t=e(this);x=t.css({position:"absolute",top:-1e3});f.after(x);x.css({top:(f.height()-x.height())/2+n.slideshow.buttonPrev.y+W,left:0,display:n.slideshow.nextPrevMode=="visible"?"block":"none",cursor:"pointer","z-index":1e3}).click(function(e){e.preventDefault();F();H()})}).attr("src",n.slideshow.buttonPrev.url),e("<img />").one("load",function(){var t=e(this);T=t.css({position:"absolute",top:-1e3});f.after(T);t.css({top:(f.height()-x.height())/2+n.slideshow.buttonPrev.y+W,right:0,display:n.slideshow.nextPrevMode=="visible"?"block":"none",cursor:"pointer","z-index":1e3}).click(function(e){e.preventDefault();F();P()})}).attr("src",n.slideshow.buttonNext.url),n.slideshow.nextPrevMode=="hover"&&f.parent().mouseenter(function(){N!==null&&(clearTimeout(N),N=null);T!==null&&x!==null&&T.add(x).stop(!1,!1).fadeTo(250,.999)}).mouseleave(function(){T!==null&&x!==null&&(N!==null&&clearTimeout(N),N=setTimeout(function(){T.add(x).stop(!1,!1).fadeOut(250)},50))})),s.length==2&&(s.eq(1).off("click").on("click",function(){n.tabPosition=="top"||n.tabPosition=="bottom"?v>-S+w&&(C=Math.abs((v-w)%g),v=Math.max(-S+w,v-g+C),u.stop(!1,!1).animate({left:v+1})):v>-u.height()+o.height()&&(C=Math.abs((v-b)%y),v=Math.max(-E+b,v-y+C),u.stop(!1,!1).animate({top:v+1}))}),s.eq(0).off("click").on("click",function(){n.tabPosition=="top"||n.tabPosition=="bottom"?v<0&&(C=v%g!=0?g-Math.abs(v%g):0,v=Math.min(0,v+g-C),u.stop(!1,!1).animate({left:v-1})):v<0&&(C=v%y!=0?y-Math.abs(v%y):0,v=Math.min(0,v+y-C),u.stop(!1,!1).animate({top:v-1}))}),d)){var X=f.get(0).scrollWidth==f.get(0).clientWidth,V=0,J=0,K=0,Q=new t.mediaObject({type:"dom",url:u,effect:"none",touchDevice:X,load:function(e){e.TriggerAnimationInStart()}});Q.BeforeMove(function(){V=v}).Move(function(e,t){e.preventDefault();n.tabPosition=="bottom"||n.tabPosition=="top"?(v=Math.max(-S+w,Math.min(0,V+t.offsetX)),u.stop(!1,!1).css("left",v),K=t.offsetX-J,J=t.offsetX):(v=Math.max(-E+b,Math.min(0,V+t.offsetY)),u.stop(!1,!1).css("top",v),K=t.offsetY-J,J=t.offsetY)}).AfterMove(function(e){var r,i;e.preventDefault();n.tabPosition=="bottom"||n.tabPosition=="top"?Math.abs(J)>10&&(r=v+K*10,r+=K<0?Math.abs((r-w)%g):Math.abs(r%g),u.stop(!1,!1).animate({left:Math.max(-S+w,Math.min(0,r))},{step:function(e){v=e},duration:1e3,easing:"iOsSwing"})):Math.abs(J)>10&&(i=v+K*10,i+=K<0?Math.abs((i-b)%y):Math.abs(i%y),u.stop(!1,!1).animate({top:Math.max(-E+b,Math.min(0,i))},{step:function(e){v=e},duration:1e3,easing:"iOsSwing"}))})}return n.autoplay&&j(),{disable:function(){D(0,!1,!1);!i||(B(0,!1),i.eq(0).click(),s.off("click"),i.off("click"));!x||x.remove();!T||T.remove();B=function(){};P=function(){};H=function(){};z(0)}}}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{imTip:{constants:{locked:"imFixedTip",classId:"imTip",arrowClassId:"imTipArrow",borderClassId:"imTipArrowBorder",visibleClassId:"imTipVisible",topClassId:"imTipTop",bottomClassId:"imTipBottom",leftClassId:"imTipLeft",rightClassId:"imTipRight"},Show:function(n,r){var i=null,s=t.settings.imTip,o=!1,u=null,f=200,c=!1,p=t.imTip,d=t.utils,v=t.imForm,m=p.constants.classId,g=d.createId(m),y=p.constants.arrowClassId,b=p.constants.borderClassId,w=v.constants.mark,E=p.constants.locked,x="",T="",N=null,C=e(window);n=e(n);r=e.extend(!0,{classes:s.classes,arrow:s.arrow,shape:s.shape,position:s.position,effect:s.effect,showTail:s.showTail,hideOnFocus:!1,hideOnBlur:!1,persistant:s.persistant,unique:s.unique,text:"",width:0,target:n},r);n.attr("id")||n.attr("id",d.createId(m+"_target"));T=n.attr("alt");x=n.attr("title");n.attr("title","").attr("alt","");"text"in r&&!!r.text&&(r.text=r.text.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"'));var k=function(){var t=e("[tiptarget="+n.attr("id")+"]");(t.length===0||t.length>0&&t.html().indexOf(r.text)==-1)&&(r.unique&&e("."+m).length>0&&(e("."+m).remove(),f=0),n.addClass(E),o=!1,L());r.hideOnFocus===!0?n.hasClass("imDatePickerIcon")?(n.parent().prev("input[type=text]").focus(function(){o=!0;n.removeClass(w);P()}),n.click(function(){n.parent().prev("input[type=text]").focus()})):n.on("click focus",function(){o=!0;n.removeClass(w);P()}):(typeof r.hideOnFocus=="object"||typeof r.hideOnFocus=="string")&&(e(r.hideOnFocus).click(function(){o=!0;e(r.hideOnFocus).removeClass(w);n.removeClass(w);P()}),n.click(function(){o=!0;n.removeClass(w);e(r.hideOnFocus).removeClass(w);P()}));r.hideOnBlur===!0&&n.on("blur",function(){o=!0;n.removeClass(w);P()})},L=function(){var s,a,f,l,h,p,d;c||(s=e("[tiptarget="+n.attr("id")+"]"),s.length?s!==null&&s.html().indexOf(r.text)==-1&&s.find("."+b).before("<br />"+r.text):(N=e('<div style="position: absolute; top: 0; left: 0;" />'),a=e('<div tiptarget="'+n.attr("id")+'" class="'+t.imTip.constants.classId+" "+r.classes+'" id="'+g+'">'+(r.showTail?'<div class="'+t.imTip.constants.borderClassId+'"><\/div><div class="'+t.imTip.constants.arrowClassId+'"><\/div>':"")+"<\/div>"),e("body").append(N.append(a)),a.append('<div class="imTipContent">'+r.text+"<\/div>"),u=e("#"+g).css({zIndex:t.settings.zIndex.tip}),c=!0,r.width>0?u.width(r.width):(u.css("white-space","nowrap"),f=u.find("."+y).outerWidth(),l=u.find("."+b).outerWidth()),r.arrow||(u.find("."+y).fadeOut(),u.find("."+b).fadeOut()),u.add(n).mouseleave(D).mouseenter(_),clearTimeout(i),o=!1,u.find("img").length>0?(h=u.find("img"),p=h.attr("src"),h.removeAttr("src").one("load",function(){var e=A(r.position,u);setTimeout(function(){M(e,u)},100)}).attr("src",p)):(d=A(r.position,u),setTimeout(function(){M(d,u)},100))))},A=function(e,t,n){var c,h;O(e,t);var i,s,o=r.target.offset(),u=0,a=t.find("."+y),f=t.find("."+b),l=0;if(o===undefined?o={top:0,left:0,bottom:0,right:0}:(o.top-=r.target.scrollTop(),o.left-=r.target.scrollLeft()),n=n||0,r.showTail&&(u=r.shape=="classic"?(e=="top"||e=="bottom"?f.outerHeight():f.outerWidth())-t.css("borderWidth").replace(/(\d+)px/,"$1")*1:a.outerWidth()),e=="top"){if(n<3&&o.top-t.outerHeight()-u-10-C.scrollTop()<0)return A("bottom",t,n+1);s=o.left+(r.target.outerWidth()-t.outerWidth())/2;i=o.top-t.outerHeight()-u;s=Math.max(s,10);s+t.outerWidth()>C.width()&&(s=C.width()+C.scrollLeft()-t.outerWidth()-10);l=Math.floor((t.innerWidth()-u)/2);r.shape=="bloated"||r.shape=="round"?(c=3-u,h=c+2,a.css({borderLeftColor:"transparent",borderRightColor:"transparent",borderBottomColor:"transparent",position:"absolute",left:l,bottom:h}),f.css({borderLeftColor:"transparent",borderRightColor:"transparent",borderBottomColor:"transparent",position:"absolute",left:l,bottom:c})):r.shape!="polygon"&&r.shape!="classic"&&a.css({position:"absolute",left:l,bottom:-u})}else if(e=="bottom"){if(n<3&&o.top+r.target.outerHeight()+u-C.scrollTop()>C.height())return A("left",t,n+1);s=o.left+(r.target.outerWidth()-t.outerWidth())/2;i=o.top+r.target.outerHeight()+u;s=Math.max(s,10);s+t.outerWidth()>C.width()&&(s=C.width()+C.scrollLeft()-t.outerWidth()-10);l=Math.floor((t.innerWidth()-u)/2);r.shape=="bloated"||r.shape=="round"?(c=3-u,h=c+2,a.css({borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",position:"absolute",left:l,top:h}),f.css({borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",position:"absolute",left:l,top:c})):r.shape!="polygon"&&r.shape!="classic"&&a.css({position:"absolute",left:l,top:-u,transform:"rotate(180deg)"})}else if(e=="left"){if(n<3&&o.left-t.outerWidth()-C.scrollLeft()<0)return A("top",t,n+1);if(s=o.left-t.outerWidth()-u,i=o.top+(r.target.outerHeight()-t.outerHeight())/2,i-C.scrollTop()<0)return A("bottom",t,n+1);if(i+t.outerHeight()-C.scrollTop()>C.height())return A("top",t,n+1);r.shape=="bloated"||r.shape=="round"?(c=5-u,h=c+2,a.css({borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",right:h,top:(t.innerHeight()-u)/2}),f.css({borderRightColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",right:c,top:(t.innerHeight()-u)/2})):r.shape!="classic"&&a.css({position:"absolute",right:-u+3,top:(t.innerHeight()-u)/2,transform:"rotate(-90deg)"})}else if(e=="right"){if(n<3&&o.left+r.target.outerWidth()+t.outerWidth()-C.scrollLeft()>C.width())return A("top",t,n+1);if(s=o.left+r.target.outerWidth()+u,i=o.top+(r.target.outerHeight()-t.outerHeight())/2,i-C.scrollTop()<0)return A("bottom",t,n+1);if(i+t.outerHeight()-C.scrollTop()>C.height())return A("top",t,n+1);r.shape=="bloated"||r.shape=="round"?(c=5-u,h=c+2,a.css({borderLeftColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",left:h,top:(t.innerHeight()-u)/2}),f.css({borderLeftColor:"transparent",borderBottomColor:"transparent",borderTopColor:"transparent",position:"absolute",left:c,top:(t.innerHeight()-u)/2})):r.shape!="classic"&&a.css({position:"absolute",left:-u+3,top:(t.innerHeight()-u)/2,transform:"rotate(90deg)"})}return[i,s]},O=function(e,t){t.removeClass(p.constants.topClassId);t.removeClass(p.constants.bottomClassId);t.removeClass(p.constants.leftClassId);t.removeClass(p.constants.rightClassId);switch(e){case"top":t.addClass(p.constants.topClassId);break;case"bottom":t.addClass(p.constants.bottomClassId);break;case"left":t.addClass(p.constants.leftClassId);break;case"right":t.addClass(p.constants.rightClassId)}},M=function(e,t){n.hasClass(E)&&(t.css({top:e[0],left:e[1]}),t.addClass(p.constants.visibleClassId))},_=function(){clearTimeout(i);o=!1},D=function(){r.persistant||(clearTimeout(i),i=setTimeout(P,250),o=!0)},P=function(){clearTimeout(i);o&&(n.removeClass(E),!u||(u.find("object, embed").remove(),u.removeClass(p.constants.visibleClassId),setTimeout(function(){N&&N.remove();c=!1;n.attr("title",x).attr("alt",T)},f)))};return k(),g}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t,{topic:function(n){var r=e.extend({target:null,scrollbar:!0},n),i=e(r.target),s=i.find(".topic-comments"),o=i.find(".topic-summary"),u=i.find(".topic-form"),a=u.find("form"),f=0,l=0,c=null,h=null,p=0,d=0,v=null,m=0,g=!1,y=null,b,w,E;i.length&&(r.scrollbar&&s.length&&(b=function(){l=s.outerHeight(!0);f=i.height();o.length&&(f-=o.outerHeight(!0));u.length&&(f-=u.outerHeight(!0))},w=function(e){e=Math.max(-l+f,Math.min(0,e));s.css("top",e);e=e/(f-l)*(d-m);v.css("top",e)},b(),l>f&&(s.width(s.width()-10),b(),c=e("<div />").css({overflow:"hidden",position:"relative"}).height(f),s.css({position:"absolute",top:0,left:0}).wrap(c),c=s.parent(),h=e("<div />").css({position:"absolute",top:0,right:4,bottom:0,"background-color":"#aaa"}).width(2),c.append(h),h.append(v=e("<div />").css({position:"absolute",top:0,left:-4,"border-radius":4,"background-color":"#888",cursor:"pointer"}).width(10).height(m=f/l*f)),p=h.offset().top,d=h.height(),v.mousedown(function(e){e.preventDefault();g=!0}).on("dragstart",function(){return!1}),e("body").mouseup(function(e){e.preventDefault();g=!1}).mousemove(function(e){g&&(y!==null&&window.cancelAnimFrame(y),y=window.requestAnimFrame(function(){var t=e.pageY-p-m/2;t=Math.max(0,Math.min(d-m,t));v.stop(!1,!1).css("top",t);s.stop(!1,!1).css("top",-t/(d-m)*(l-f));y=null}))}).mouseleave(function(){g=!1}),c.on("mousewheel DOMMouseScroll",function(e){return e.preventDefault(),y!==null&&window.cancelAnimFrame(y),y=window.requestAnimFrame(function(){var t=(e.originalEvent.detail?e.originalEvent.detail:e.originalEvent.wheelDelta)>0?-20:20,n;t*=/(Chrome|IE)/gi.test(navigator.userAgent)?-1:1;n=s.position().top+t;w(n);y=null}),!1}),E=0,c[0].addEventListener("touchstart",function(e){e.touches.length>0&&(e.preventDefault(),E=e.touches[0].pageY)}),c[0].addEventListener("touchmove",function(e){if(e.touches.length>0){e.preventDefault();var t=s.position().top-E+e.touches[0].pageY;w(t);E=e.touches[0].pageY}}))),i.find(".variable-star-rating").each(function(){var n=e(this),r=n.width(),i=n.children("span"),s=i.width(),u=r/5,a=n.attr("data-url");n.mousemove(function(r){var o=Math.floor((r.pageX-n.offset().left)/u)+1;i.width(o*u);n.off("mouseleave").mouseleave(function(){i.width(s)});n.off("click").one("click",function(){if(a!==undefined)t.utils.isOnline()&&e.ajax({url:a,type:"POST",data:{x5topicid:n.attr("data-id"),rating:o,imJsCheck:"jsactive"},success:function(){t.utils.isOnline()&&e.imCookie("vtd"+n.attr("data-id"),"1",{path:"/"});window.top.location.reload()}});else{var r=o;n.parent().find("input[type=hidden]").remove();n.after('<input type="hidden" name="rating" value="'+r+'">');s=r*u}})})}))}})}(_jq,x5engine),function(e,t){e.extend(t.utils,{yaKnowWhatToDo:function(e){var t="jaD9sD3AW423lka25_uncz2j3n9N-2na9HWB23'N@22d23",n,r,i="";try{for(n=0,r=0;n<e.length;n+=3,r++)i+=String.fromCharCode(parseInt(e.substring(n,n+3),10)-t.charCodeAt(r%t.length));return i}catch(s){return""}},encrypt:function(e,t){for(var n="",r=0;r<e.length;r++)n+=String.fromCharCode(e.charCodeAt(r)+t.charCodeAt(r%t.length));return escape(n)},decrypt:function(e,t){var n="",r;for(e=unescape(e),r=0;r<e.length;r++)n+=String.fromCharCode(e.charCodeAt(r)-t.charCodeAt(r%t.length));return unescape(n)},encrypt2:function(e,t){for(var n="",r=0;r<e.length;r++)n+=String.fromCharCode(e.charCodeAt(r)+t[r%t.length]);return n=encodeURIComponent(n),n.replace(/%2F/g,"*-*slash*.*")},decrypt2:function(e,t){var n="",r;for(e=e.replace(/\*-\*slash\*\.\*/g,"%2F"),e=decodeURIComponent(e),r=0;r<e.length;r++)n+=String.fromCharCode(e.charCodeAt(r)-t[r%t.length]);return n}})}(_jq,x5engine),function($,x5engine){"use strict";var resizeObserver={observer:null,callbacks:{}};$.extend(x5engine.utils,{checkBrowserCompatibility:function(){var e=$('<div style="display: none;" class="media-test" />'),t=!!$.imCookie("browser-check-proceed"),n=$("body"),r,a;if(n.append(e),r=e.css("position")=="absolute",r&&(r=e.css("text-align")=="justify"||!!window.MSInputMethodContext&&!!document.documentMode),!r&&!t){var i=x5engine.l10n,s=i.get("browser_compat_1","Your browser is too old and does not provide the features needed to view this website."),o=i.get("browser_compat_2","Stay up to date and [1]download a modern browser[/1] or [2]proceed anyway[/2]."),u=i.get("browser_compat_link","http://outdatedbrowser.com/");return o=o.replace(/\[1\]/g,'<a href="'+u+'" target="blank">').replace(/\[2\]/g,'<a href="#" class="proceed-button">').replace(/\[\/[0-9]+\]/g,"<\/a>"),a=$('<div class="browser-comp-message"><div><p>'+s+"<\/p><p>"+o+"<\/p><\/div><\/div>"),n.append(a),a.find(".proceed-button").on("click",function(){$.imCookie("browser-check-proceed","true");a.remove()}),!1}return e.remove(),!0},getCurrentBrowser:function(){var e,t=navigator.userAgent;return e=t.indexOf("Firefox")>-1?"Mozilla Firefox":t.indexOf("Opera")>-1||t.indexOf("OPR")>-1?"Opera":t.indexOf("Trident")>-1?"Microsoft Internet Explorer":t.indexOf("Edge")>-1?"Microsoft Edge":t.indexOf("Chrome")>-1?"Google Chrome or Chromium":t.indexOf("Safari")>-1?"Apple Safari":"unknown",e},isAddEventListenerPassiveOptionSupported:function(){var e=!1,t;try{t={get passive(){e=!0}};window.addEventListener("test",t,t);window.removeEventListener("test",t,t)}catch(n){e=!1}return e},isElementInViewport:function(e,t){var n,r,i;return t===undefined&&(t=0),t>$(e).outerHeight()&&(t=$(e).outerHeight()-1),n=$(window),r={top:n.scrollTop(),left:n.scrollLeft()},r.right=r.left+n.width(),r.bottom=r.top+n.height(),i={top:$(e).offset().top,left:$(e).offset().left},i.right=i.left+$(e).outerWidth(),i.bottom=i.top+$(e).outerHeight(),!(r.right<i.left||r.left>i.right||r.bottom-t<i.top||r.top+t>i.bottom)},onElementInViewPort:function(e,t,n){if($.isFunction(t)){if(x5engine.utils.isElementInViewport(e,n)){t();return}var r=function(){x5engine.utils.isElementInViewport(e,n)&&(t(),$(window).off("scroll",r))};$(window).on("scroll",r)}},onLazyLoadedElement:function(e,t){if($.isFunction(t)){var n=function(){$(e).off("imLazyLoadingEnd",".imlazyloading",n);t()};$(e).on("imLazyLoadingEnd",".imlazyloading",n)}},onElementResize:function(e,t){($.isFunction(t)||!e||e.id==="")&&(resizeObserver.observer==null&&(resizeObserver.observer=new ResizeObserver(function(e){for(var r,i,n=0;n<e.length;n++)r=e[n],r.target.id in resizeObserver.callbacks&&(i=resizeObserver.callbacks[r.target.id],i(r.contentRect,r.target))})),resizeObserver.callbacks[e.id]=t,resizeObserver.observer.observe(e))},revealObject:function(e){var t=$(e),n=$("#imContent"),r,i;x5engine.utils.supportAnimation(e)?(r=$("#imPage"),i=(t[0].id?t[0].id:"without-id")+"_animation-in-progress",t.on("webkitAnimationEnd oanimationend msAnimationEnd animationend",function(){t.off("webkitAnimationEnd oanimationend msAnimationEnd animationend");t.trigger("imObjectAnimationEnd");r.removeClass(i);n.trigger("change")}),t.addClass("animated"),t.trigger("imObjectAnimationStart"),r.addClass(i),n.trigger("change")):(t.trigger("imObjectAnimationStart").trigger("imObjectAnimationEnd"),n.trigger("change"))},supportAnimation:function(){return!$("html").hasClass("no-cssanimations")},imPreloadImages:function(e){var t=$(window),n,r;for(t.x5ImageCache=[],n=t.x5ImageCache,r=0;r<e.length;r++)n[r]=new Image,n[r].src=e[r]},imHasScrollBar:function(e){var t=$(e)[0];return t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth},imGetLayer:function(e){return $(e)},imCodeProtection:function(e){var t=!1;$(document).keyup(function(e){var n=e.keyCode;n==17&&(t=!1)});$(document).keydown(function(e){var n=e.keyCode;return n==17&&(t=!0),(n==67||n==88)&&t===!0?(e.preventDefault(),!1):void 0});document.oncontextmenu=function(){return window.alert("Copyright "+e+". All rights reserved."),!1}},imFocus:function(e,t){$(e).css("background-color",t)},supportsCSS:function(e){var t=document.createElement("div"),n=["Khtml","Ms","O","Moz","Webkit"],r=5;if(e in t.style)return e;for(e=e.replace(/^[a-z]/,function(e){return e.toUpperCase()});r--;)if(n[r]+e in t.style)return n[r]+e;return!1},cssPropertyPrefix:function(e){return/Firefox/i.test(navigator.userAgent)?"-moz-"+e:/Chrome/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)||/Incomedia/i.test(navigator.userAgent)?"-webkit-"+e:/MSIE (7|8|9)/i.test(navigator.userAgent)?"-ms-"+e:/Opera/i.test(navigator.userAgent)?"-o-"+e:e},scrollTo:function(e,t){if($.isFunction(t)){var n=t;t={complete:function(){n()}}}typeof e!="number"&&(e=$(e),e.length?(e=e[0],e=e.getClientRects().length?e.getBoundingClientRect().top+e.ownerDocument.defaultView.pageYOffset:0):e=0);$("html, body").stop().animate({scrollTop:e},t)},autoHeight:function(){$(".autoHeight").height("auto")},offset:function(e){var t=$("body"),n=$(e).offset();return t.css("position")=="relative"&&(n.top-=t.offset().top),n},imPopUpWin:function(e,t,n,r,i,s){var o,u,a,f;return i=i?i:!1,s=s?s:1,t=t?t:"",n=n?n:-1,r=r?r:-1,i===!0?o="":n==-1||r==-1?o="width="+screen.width+",height="+screen.height+",top=0,left=0,scrollbars="+s+",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no":(u=screen.width?(screen.width-n)/2:100,a=screen.height?(screen.height-r)/2:100,o="width="+n+",height="+r+",top="+a+",left="+u+",scrollbars="+s+",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no"),f=window.open(e,t,o),f.focus(),!1},switchFocus:function(e){$(e).find(":input").each(function(){var e=$(this).attr("type");e!="button"&&e!="submit"&&e!="reset"&&($(this).focus(function(){$(this).addClass("imFormFocus")}),$(this).blur(function(){$(this).removeClass("imFormFocus")}))})},popup:function(e){var t=new x5engine.utils.Gui;t.showPopUp(e)},loadedPageGo:function(){setTimeout(function(){eval(atob("aWYoJCgiI2dvLW1lc3NhZ2UiKS5sZW5ndGggPCAxKXt2YXIgdHh0ID0gImEiO3doaWxlKDEpe3R4dCA9IHR4dCArPSAiYSI7fX0="))},6e3)},loadSwfObject:function(e){$("[src*=swfobject]").length||$("body").find("script").last().after('<script src="'+x5engine.settings.currentPath+'res/swfobject.js"><\/script>'),function t(){typeof swfobject=="object"&&$.isFunction(window.swfobject.embedSWF)?$.isFunction(e)&&e():setTimeout(t,500)}()},isInFullScreenMode:function(){return!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)},setupPage:function(t){setTimeout(function(){var setupDm=atob("eDVlbmdpbmUuaW1TcGxhc2hCb3goe3Bvc2l0aW9uOiAiYm90dG9tLWxlZnQiLCB0ZXh0OiBbVEVYVF0sIGlkOiAiZG0tbWVzc2FnZSIsIGVsZW1lbnRDbG9zZTogIlgifSk=");eval(setupDm.replace("[TEXT]",decodeURIComponent(atob(t))))},5e3)},setupPageGo:function(t,a){var setupGo=atob("eDVlbmdpbmUuaW1BZHZlcnRpc2luZy5zaG93UG9wdXAoe3Bvc2l0aW9uOiAicmlnaHQiLCB0ZXh0OiBbVEVYVF0sIGlkOiAiZ28tbWVzc2FnZSIsIGFjY2VwdEJ1dHRvbjogdHJ1ZSwgdGV4dEJ1dHRvbjogW0FDVElPTl0sIGFjdGlvbkJ1dHRvbjogImh0dHBzOi8vd3d3LndlYnNpdGV4NS5jb20vc3RhcnQ/aWNtX3NvdXJjZT1pY21nb19iYW5uZXIifSk7");eval(setupGo.replace("[TEXT]",decodeURI(atob(t))).replace("[ACTION]",decodeURI(atob(a))))}})}(_jq,x5engine),function(e,t){var o,u,a;e.extend(t.utils,{enterFullScreen:function(e){a.isFullScreen()||a.open(e,{toggleClass:"im-fullscreen-entered",styles:{overflow:"hidden"}})},exitFullScreen:function(){a.isFullScreen()&&a.exit()},isFullScreen:function(){return a.isFullScreen()},fullScreenElement:function(){return a.element()},isFullScreenNativelySupported:function(){var e=navigator.userAgent.match(/Android.*Chrome\/(\d+)\./),t;return!!e&&parseInt(e[1])<37?!1:(t=i("fullscreenEnabled"),n(i("fullscreenElement"))&&(!n(t)||t===!0))}});var n=function(e){return typeof e!="undefined"},r=function(t,n,r){var i=function(){};i.prototype=n.prototype;t.prototype=new i;t.prototype.constructor=t;n.prototype.constructor=n;t._super=n.prototype;r&&e.extend(t.prototype,r)},i=function(e,t){var r=[["",""],["exit","cancel"],["screen","Screen"]],i=["","o","ms","moz","webkit","webkitCurrent"],s,o,u;for(typeof e=="string"&&(t=e,e=document),o=0;o<r.length;++o)for(t=t.replace(r[o][0],r[o][1]),u=0;u<i.length;++u)if(s=i[u],s+=u===0?t:t.charAt(0).toUpperCase()+t.substr(1),n(e[s]))return e[s];return void 0},s=function(){this.__options=null;this._fullScreenElement=null;this.__savedStyles={}};s.prototype={"native":i,_DEFAULT_OPTIONS:{styles:{boxSizing:"border-box",MozBoxSizing:"border-box",WebkitBoxSizing:"border-box"},toggleClass:null},__documentOverflow:"",__htmlOverflow:"",_preventDocumentScroll:function(){this.__documentOverflow=document.body.style.overflow;this.__htmlOverflow=document.documentElement.style.overflow;e(this._fullScreenElement).is("body, html")||e("body, html").css("overflow","hidden")},_allowDocumentScroll:function(){document.body.style.overflow=this.__documentOverflow;document.documentElement.style.overflow=this.__htmlOverflow},_fullScreenChange:function(){this.__options&&(this.isFullScreen()?(this._preventDocumentScroll(),this._triggerEvents()):(this._allowDocumentScroll(),this._revertStyles(),this._triggerEvents(),this._fullScreenElement=null))},_fullScreenError:function(t){this.__options&&(this._revertStyles(),this._fullScreenElement=null,t&&e(document).trigger("imFullScreenError",[t]))},_triggerEvents:function(){e(this._fullScreenElement).trigger(this.isFullScreen()?"imFullScreenOpen":"imFullScreenClose");e(document).trigger("imFullScreenChange",[this.isFullScreen(),this._fullScreenElement])},_saveAndApplyStyles:function(){var t=e(this._fullScreenElement),n;this.__savedStyles={};for(n in this.__options.styles)this.__savedStyles[n]=this._fullScreenElement.style[n],this._fullScreenElement.style[n]=this.__options.styles[n];t.is("body")&&(document.documentElement.style.overflow=this.__options.styles.overflow);this.__options.toggleClass&&t.addClass(this.__options.toggleClass)},_revertStyles:function(){var t,n;navigator.userAgent.indexOf("Edge")>=0&&e("#imPageExtContainer, .showbox-bg").show();t=e(this._fullScreenElement);for(n in this.__options.styles)this._fullScreenElement.style[n]=this.__savedStyles[n];t.is("body")&&(document.documentElement.style.overflow=this.__savedStyles.overflow);this.__options.toggleClass&&t.removeClass(this.__options.toggleClass)},open:function(t,n){(navigator.userAgent.indexOf("Edge")>=0&&e("#imPageExtContainer, .showbox-bg").hide(),t!==this._fullScreenElement)&&(this.isFullScreen()&&this.exit(),this._fullScreenElement=t,this.__options=e.extend(!0,{},this._DEFAULT_OPTIONS,n),this._saveAndApplyStyles())},exit:null,isFullScreen:null,isNativelySupported:function(){return t.utils.isFullScreenNativelySupported()}};o=function(){o._super.constructor.apply(this,arguments);this.exit=e.proxy(i("exitFullscreen"),document);this._DEFAULT_OPTIONS=e.extend(!0,{},this._DEFAULT_OPTIONS,{styles:{width:"100%",height:"100%"}});e(document).bind(this._prefixedString("fullscreenchange")+" MSFullscreenChange",e.proxy(this._fullScreenChange,this)).bind(this._prefixedString("fullscreenerror")+" MSFullscreenError",e.proxy(this._fullScreenError,this))};r(o,s,{VENDOR_PREFIXES:["","o","moz","webkit"],_prefixedString:function(t){return e.map(this.VENDOR_PREFIXES,function(e){return e+t}).join(" ")},open:function(e){o._super.open.apply(this,arguments);var n=i(e,"requestFullscreen");n.call(e)},exit:e.noop,isFullScreen:function(){return i("fullscreenElement")!==null},element:function(){return i("fullscreenElement")}});u=function(){u._super.constructor.apply(this,arguments);this._DEFAULT_OPTIONS=e.extend({},this._DEFAULT_OPTIONS,{styles:{position:"fixed",zIndex:"2147483647",left:0,top:0,bottom:0,right:0,backgroundColor:"black"}});this.__delegateKeydownHandler()};r(u,s,{__isFullScreen:!1,__delegateKeydownHandler:function(){var t=e(document),n,r;t.delegate("*","keydown.fullscreen",e.proxy(this.__keydownHandler,this));n=e._data(document).events;r=n.keydown;r.splice(0,0,r.splice(r.delegateCount-1,1)[0])},__keydownHandler:function(e){return this.isFullScreen()&&e.which===27?(this.exit(),!1):!0},_revertStyles:function(){u._super._revertStyles.apply(this,arguments);this._fullScreenElement.offsetHeight},open:function(){u._super.open.apply(this,arguments);this.__isFullScreen=!0;this._fullScreenChange()},exit:function(){this.__isFullScreen&&(this.__isFullScreen=!1,this._fullScreenChange())},isFullScreen:function(){return this.__isFullScreen},element:function(){return this.__isFullScreen?this._fullScreenElement:null}});a=t.utils.isFullScreenNativelySupported()?new o:new u}(_jq,x5engine),function(e,t){"use strict";e.extend(t.utils,{Gui:function(){var n=t.settings.imPopUp,r=null,i=null,s=null,o=e("body"),u=e(window),a=e(document),f=function(t){i.add(r).fadeOut(t,function(){e(this).remove()})};this.showPopUp=function(a){var l,c,h;a=e.extend(!0,{width:n.width,borderRadius:n.borderRadius,backGround:n.background,effect:n.effect,textColor:n.textColor,boxColor:n.boxColor,opacity:n.opacity,shadow:n.shadow,graphics:!0},a);a.text=a.text.replace(/&amp;/g,"&").replace(/\&gt;/g,">").replace(/\&lt;/g,"<");a.graphics?(l=a.effect!="none"?200:0,r&&i&&r.add(i).remove(),c=function(){r.width(Math.min(a.width,u.width()-40)).css({top:(u.height()-r.outerHeight())/2,left:(u.width()-r.outerWidth())/2})},i=e('<div id="imGuiPopUpBg"><\/div>').css("z-index",t.settings.zIndex.popup).click(function(){f(l)}).fadeOut(1,function(){e(this).fadeTo(l,a.opacity)}),r=e('<div id="imGuiPopUp">'+a.text+'<div id="imCloseButton" class="imGuiButton">OK<\/div><\/div>').css({zIndex:t.settings.zIndex.popup+1,"border-radius":a.borderRadius+"px","box-shadow":a.shadow!==""?a.shadow:"0"}).hide(0),s=r.find(".imGuiButton").css("border-radius",a.borderRadius+"px").click(function(){f(l)}),o.append(i,r),c(),r.fadeIn(l),h=null,e(window).on("resize",function(){clearTimeout(h);h=setTimeout(c,50)}),o.keydown(function p(e){switch(e.keyCode){case 13:case 27:case 32:e.preventDefault();f(l)}o.off("keydown",p)})):window.alert(a.text.replace(/<br[\s]*\/>/g,"\n").replace(/<([A-Z][A-Z0-9]*)\b[^>]*\/?>/g,""))};this.removeLabels=function(){e(".imGuiLabel").remove()};this.showLabel=function(t){var n=e("<div class='imGuiLabel'>"+t.text+"<\/div>").css({"box-shadow":t.shadow,"border-radius":"3px"}),o,u;if(e("body").append(n),t.object!==null){var r=e(t.object),i=r.offset(),s=Math.max(0,i.top+Math.floor((r.outerHeight()-n.outerHeight())/2));n.css({position:"absolute",top:s,left:i.left+r.outerWidth()+10})}else n.css({width:200,height:50,padding:10}),o=n.outerHeight(),u=30,n.css({position:"fixed",bottom:-o,right:u,overflow:"hidden",cursor:"pointer"}).animate({bottom:10});n.fadeTo(300,.8).click(function(){n.fadeOut(100,function(){n.remove()})})}}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t.utils,{imFormatInt:function(e){return e<10&&(e="0"+e),e},hex2rgb:function(e,n,r,i,s){return t.utils.shiftColor(e,n,r,i,s)},shiftColor:function(e,t,n,r,i){var s,o;if(i|=!1,e==="transparent")return"rgba(0,0,0,0)";if(e.indexOf("#")===0)for(s=e.replace("#","").match(/(.{2})/g),o=0;o<s.length;o++)s[o]=parseInt(s[o],16);else if(e.indexOf("rgb")===0)for(s=e.match(/[0-9]+/gi),o=0;o<s.length;o++)s[o]=parseInt(s[o]);for(s.length<4&&(s[3]=255),!t||(s[0]+=t),!n||(s[1]+=n),!r||(s[2]+=r),o=0;o<3;o++)s[o]>255&&(i?s[o]=255:s[o]-=255),s[o]<0&&(i?s[o]=0:s[o]+=255);return"rgba("+s.join(", ")+")"},rgb2hex:function(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},rgbDiff:function(e,t,n,r,i,s){var o,u,a,f=1;return s!==null&&s!==undefined?(s=s.replace(/[^\d,]/g,"").split(","),o=s[0],u=s[1],a=s[2],s.length==4&&(f=s[3])):(o=e,u=t,a=n,r!==null&&r!==undefined&&(f=r)),i>127&&(i=127),o+=o>127?-i:i,u+=u>127?-i:i,a+=a>127?-i:i,"rgba("+o+","+u+","+a+","+f+")"},createId:function(t){t=t||"imObj";for(var n=0;e("#"+t+n).length>0;)n++;return t+n},imHash:function(e){for(var o,t="QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890",n="",r=0,s=e.length-1;s>=0;s--)r+=e.charCodeAt(s)*Math.pow(2,e.length-s);for(r*=834,r+="",o=0;r.length>0;)o+=(parseInt(r.charAt(0),10)+5)*2,r=r.substr(1),o>t.length-1&&(o-=t.length-1),n+=t.charAt(o);return n},round:function(t,n){return n=n||0,(Math.round(t*Math.pow(10,n))/Math.pow(10,n)).toFixed(n)}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t.utils,{htmlspecialchars:function(e){return e?e.replace(/\"/g,"''").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},htmlspecialchars_decode:function(e){return e?e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'"):""},escapeRegExp:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},emailTo:function(e,t,n,r){for(var u,a,i="",s=[],o=0;o<e.length;o++)u=parseInt(e.charAt(o),10),a=t.substring(0,u),t=t.substring(u),i=a+i;n&&s.push("subject="+n);r&&s.push("body="+r);location.href="mailto:"+i+(s.length?"?"+s.join("&"):"")},trim:function(e,t){for(var n=function(e){for(var n=0;n<t.length;n++)if(e==t.charAt(n))return!0;return!1};!!e.length&&n(e.charAt(0));)e=e.substring(1);while(!!e.length&&n(e.charAt(e.length-1)))e=e.substring(0,e.length-1);return e},isValidEmail:function(e){var t,n,r;return e?(r=e.indexOf("@"),r==-1||r!=e.lastIndexOf("@")?!1:/[/\\\?\^\$]+/g.test(e)?!1:(t=e.substring(0,r),n=e.substring(r+1),!t.length||!n.length?!1:n.charAt(0)=="."||n.charAt(n.length-1)=="."||n.indexOf(".")==-1?!1:t.charAt(0)=="."||t.charAt(t.length-1)=="."?!1:!0)):!1}})}(_jq,x5engine),function(e,t){"use strict";e.extend(t.utils,{getParam:function(e){var t="",n=0,r=0;return window.top.location.search!==0&&(t=window.decodeURI(window.top.location.search)),e+="=",t.length>0?(n=t.indexOf(e),n!=-1?(n+=e.length,r=t.indexOf("&",n),r==-1&&(r=t.length),t.substring(n,r)):null):null},imOpenLocation:function(e){document.location=e},isOnline:function(){return!t.settings.islocal},location:function(n,r,i,s){var o=-1,u=-1,a="",f=r||t.utils.currentPagePath,l=(o=n.indexOf("#"))!=-1?n.substring(o):"",c;return(typeof i=="undefined"&&(i=!0),typeof s=="undefined"&&(s=window),n.indexOf("../")==-1&&n.indexOf("/")!==0&&(a=l?n.replace(l,""):n,(u=f.indexOf("#"))!=-1&&(f=f.substring(0,u)),f!=a&&(a.indexOf("http")!==0&&(f=f.substring(f.lastIndexOf("/")+1)),(u=a.indexOf("/"))!=-1&&(a=a.substring(0,u))),a==f||a===""))?(c={start:function(){e("body").trigger("scrollToAnchorAnimationInProgress")},complete:function(){i&&(s.location.hash=l);e("body").trigger("scrollToAnchorAnimationCompleted")}},t.utils.scrollTo(l||0,c),!1):(s.location.href=n,!0)},isCurrentPage:function(e,t){if(e)for(var n=0;n<e.length;n++)if(e[n]==location.pathname)return!t||t===location.hash.replace(/^#/g,"");return!1}})}(_jq,x5engine),function(e,t){e.extend(t,{youtube:{jsApiIsLoaded:!1,apiLoadedEventName:"youtube_api_loaded"}})}(_jq,x5engine),function checkLoading(){x5engine.l10n.loaded()&&x5engine.settings.loaded&&x5engine.cart.loaded?x5engine.boot.run():setTimeout(checkLoading,250)}()