var dnnJscriptVersion="6.0.0";if(typeof(Sys.Browser.Chrome)=="undefined"){Sys.Browser.Chrome={};if(navigator.userAgent.indexOf(" Chrome/")>-1){Sys.Browser.agent=Sys.Browser.Chrome;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Chrome\/(\d+\.\d+)/)[1]);Sys.Browser.name="Chrome";Sys.Browser.hasDebuggerStatement=true}}else{if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version>10){HTMLAnchorElement.prototype.attachEvent=function(a,b){if(a.substr(0,2)=="on"){a=a.substr(2)}this.addEventListener(a,b,false)};HTMLAnchorElement.prototype.detachEvent=function(a,b){if(a.substr(0,2)=="on"){a=a.substr(2)}this.removeEventListener(a,b,false)}}}var DNN_HIGHLIGHT_COLOR="#9999FF";var COL_DELIMITER=String.fromCharCode(18);var ROW_DELIMITER=String.fromCharCode(17);var QUOTE_REPLACEMENT=String.fromCharCode(19);var KEY_LEFT_ARROW=37;var KEY_UP_ARROW=38;var KEY_RIGHT_ARROW=39;var KEY_DOWN_ARROW=40;var KEY_RETURN=13;var KEY_ESCAPE=27;Type.registerNamespace("dnn");dnn.extend=function(a,b){for(s in b){a[s]=b[s]}return a};dnn.extend(dnn,{apiversion:new Number("04.02"),pns:"",ns:"dnn",diagnostics:null,vars:null,dependencies:new Array(),isLoaded:false,delay:[],_delayedSet:null,getVars:function(){if(this.vars==null){var a=dnn.dom.getById("__dnnVariable");if(a!=null){if(a.value.indexOf("`")==0){a.value=a.value.substring(1).replace(/`/g,'"')}if(a.value.indexOf("__scdoff")!=-1){COL_DELIMITER="~|~";ROW_DELIMITER="~`~";QUOTE_REPLACEMENT="~!~"}}if(a!=null&&a.value.length>0){this.vars=Sys.Serialization.JavaScriptSerializer.deserialize(a.value)}else{this.vars=[]}}return this.vars},getVar:function(key,def){if(this.getVars()[key]!=null){var re=new RegExp(QUOTE_REPLACEMENT,"g");return this.getVars()[key].replace(re,'"')}return def},setVar:function(b,c){if(this.vars==null){this.getVars()}this.vars[b]=c;var a=dnn.dom.getById("__dnnVariable");if(a==null){a=dnn.dom.createElement("INPUT");a.type="hidden";a.id="__dnnVariable";dnn.dom.appendChild(dnn.dom.getByTagName("body")[0],a)}if(dnn.isLoaded){a.value=Sys.Serialization.JavaScriptSerializer.serialize(this.vars)}else{dnn._delayedSet={key:b,val:c}}return true},callPostBack:function(action){var postBack=dnn.getVar("__dnn_postBack");var data="";if(postBack.length>0){data+=action;for(var i=1;i").replace(/"/g,'"')},encode:function(a,c){var b=a;if(encodeURIComponent){b=encodeURIComponent(b)}else{b=escape(b)}if(c==false){return b}return b.replace(/%/g,"%25")},encodeHTML:function(a){return a.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/\"/g,""")},encodeJSON:function(a){return a.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"\u0027").replace(/\"/g,""").replace(/\\/g,"\\\\")},evalJSON:function(a){return Sys.Serialization.JavaScriptSerializer.deserialize(a)},escapeForEval:function(a){return a.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\r/g,"").replace(/\n/g,"\\n").replace(/\./,"\\.")},getEnumByValue:function(a,b){for(var c in a){if(typeof(a[c])=="number"&&a[c]==b){return c}}},_onload:function(){dnn.isLoaded=true;if(dnn._delayedSet){dnn.setVar(dnn._delayedSet.key,dnn._delayedSet.val)}},addIframeMask:function(c){if(dnn.dom.browser.isType("ie")&&(c.previousSibling==null||c.previousSibling.nodeName.toLowerCase()!="iframe")){var a=document.createElement("iframe");c.parentNode.insertBefore(a,c);var b=c.getBoundingClientRect();a.style.position="absolute";a.style.left=c.offsetLeft+"px";a.style.top=c.offsetTop+"px";a.style.width=(b.right-b.left)+"px";a.style.height=(b.bottom-b.top)+"px";a.style.opacity="0";a.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";a.style.zIndex="-1";return a}return null},removeIframeMask:function(a){if(dnn.dom.browser.isType("ie")&&(a.previousSibling!=null&&a.previousSibling.nodeName.toLowerCase()=="iframe")){a.parentNode.removeChild(a.previousSibling)}}});dnn.delayObject=function(c,a,b){this.num=null;this.pfunc=c;this.context=a;this.type=b};dnn.delayObject.prototype={complete:function(){dnn.delay[this.type]=null;this.pfunc(this.context)}};dnn.delayObject.registerClass("dnn.delayObject");dnn.ScriptRequest=function(e,d,c){this.ctl=null;this.xmlhttp=null;this.src=null;this.text=null;if(e!=null&&e.length>0){var b=dnn.dom.scriptFile(e);var a=dnn.getVar(b+".resx","");if(a.length>0){this.src=a}else{this.src=e}}if(d!=null&&d.length>0){this.text=d}this.callBack=c;this.status="init";this.timeOut=5000;this._xmlhttpStatusChangeDelegate=dnn.createDelegate(this,this.xmlhttpStatusChange);this._statusChangeDelegate=dnn.createDelegate(this,this.statusChange);this._completeDelegate=dnn.createDelegate(this,this.complete);this._reloadDelegate=dnn.createDelegate(this,this.reload)};dnn.ScriptRequest.prototype={load:function(){this.status="loading";this.ctl=document.createElement("script");this.ctl.type="text/javascript";if(this.src!=null){if(dnn.dom.browser.isType(dnn.dom.browser.Safari)){this.xmlhttp=new XMLHttpRequest();this.xmlhttp.open("GET",this.src,true);this.xmlhttp.onreadystatechange=this._xmlhttpStatusChangeDelegate;this.xmlhttp.send(null);return}else{if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer)){this.ctl.onreadystatechange=this._statusChangeDelegate}else{if(dnn.dom.browser.isType(dnn.dom.browser.Opera)==false){this.ctl.onload=this._completeDelegate}}this.ctl.src=this.src}dnn.dom.scriptElements[this.src]=this.ctl}else{if(dnn.dom.browser.isType(dnn.dom.browser.Safari)){this.ctl.innerHTML=dnn.encodeHTML(this.text)}else{this.ctl.text=this.text}}var a=dnn.dom.getByTagName("HEAD");if(a){if(dnn.dom.browser.isType(dnn.dom.browser.Opera)==false||this.src!=null){a[0].appendChild(this.ctl)}}else{alert("Cannot load dynamic script, no HEAD tag present.")}if(this.src==null||dnn.dom.browser.isType(dnn.dom.browser.Opera)){this.complete()}else{if(this.timeOut){dnn.doDelay("loadScript_"+this.src,this.timeOut,this._reloadDelegate,null)}}},xmlhttpStatusChange:function(){if(this.xmlhttp.readyState!=4){return}this.src=null;this.text=this.xmlhttp.responseText;this.load()},statusChange:function(){if((this.ctl.readyState=="loaded"||this.ctl.readyState=="complete")&&this.status!="complete"){this.complete()}},reload:function(){if(dnn.dom.scriptStatus(this.src)=="complete"){this.complete()}else{this.load()}},complete:function(){dnn.cancelDelay("loadScript_"+this.src);this.status="complete";if(typeof(this.callBack)!="undefined"){this.callBack(this)}this.dispose()},dispose:function(){this.callBack=null;if(this.ctl){if(this.ctl.onreadystatechange){this.ctl.onreadystatechange=new function(){}}else{if(this.ctl.onload){this.ctl.onload=null}}this.ctl=null}this.xmlhttp=null;this._xmlhttpStatusChangeDelegate=null;this._statusChangeDelegate=null;this._completeDelegate=null;this._reloadDelegate=null}};dnn.ScriptRequest.registerClass("dnn.ScriptRequest");Type.registerNamespace("dnn.dom");dnn.extend(dnn.dom,{pns:"dnn",ns:"dom",browser:null,__leakEvts:[],scripts:[],scriptElements:[],tweens:[],attachEvent:function(a,c,d){if(a.addEventListener){var b=c.substring(2);a.addEventListener(b,function(e){dnn.dom.event=new dnn.dom.eventObject(e,e.target);return d()},false)}else{a.attachEvent(c,function(){dnn.dom.event=new dnn.dom.eventObject(window.event,window.event.srcElement);return d()})}return true},cursorPos:function(b){if(b.value.length==0){return 0}var h=-1;if(b.selectionStart){h=b.selectionStart}else{if(b.createTextRange){var f=window.document.selection.createRange();var a=b.createTextRange();if(a==null||f==null||((f.text!="")&&a.inRange(f)==false)){return-1}if(f.text==""){if(a.boundingLeft==f.boundingLeft){h=0}else{var d=b.tagName.toLowerCase();if(d=="input"){var g=a.text;var c=1;while(c0){b.style.height=(b.offsetHeight-d).toString()+"px";dnn.doDelay(b.id+"col",10,dnn.dom.__collapseElement,a)}else{b.style.display="none";if(a.pfunc!=null){a.pfunc()}}},cancelExpandElement:function(a){dnn.cancelDelay(a.id+"exp");a.style.overflow="";a.style.height=""},disableTextSelect:function(a){if(typeof a.onselectstart!="undefined"){a.onselectstart=function(){return false}}else{if(typeof a.style.MozUserSelect!="undefined"){a.style.MozUserSelect="none"}else{a.onmousedown=function(){return false}}}},expandElement:function(b,c,d){if(c==null){c=10}if(b.style.display=="none"&&b.origHeight==null){b.style.display="";b.style.overflow="";b.origHeight=b.offsetHeight;b.style.overflow="hidden";b.style.height="1px"}b.style.display="";var a=new Object();a.num=c;a.ctl=b;a.pfunc=d;dnn.dom.__expandElement(a)},__expandElement:function(a){var c=a.num;var b=a.ctl;var d=b.origHeight/c;if(b.offsetHeight+d0){f=e.indexOf(d);if(f!=-1){f+=d.length;a=e.indexOf(";",f);if(a==-1){a=e.length}b=unescape(e.substring(f,a))}}return(b)},getNonTextNode:function(a){if(this.isNonTextNode(a)){return a}while(a!=null&&this.isNonTextNode(a)){a=this.getSibling(a,1)}return a},addSafeHandler:function(b,a,c,d){b[a]=this.getObjMethref(c,d);if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer)){if(this.__leakEvts.length==0){dnn.dom.attachEvent(window,"onunload",dnn.dom.destroyHandlers)}this.__leakEvts[this.__leakEvts.length]=new dnn.dom.leakEvt(a,b,b[a])}},destroyHandlers:function(){var c=dnn.dom.__leakEvts.length-1;for(var a=c;a>=0;a--){var b=dnn.dom.__leakEvts[a];b.ctl.detachEvent(b.name,b.ptr);b.ctl[b.name]=null;dnn.dom.__leakEvts.length=dnn.dom.__leakEvts.length-1}},getObjMethref:function(b,a){return(function(c){c=c||window.event;return b[a](c,this)})},getSibling:function(a,c){if(a!=null&&a.parentNode!=null){for(var b=0;b-1){this.scriptElements[c]=a[b];return a[b]}}},getScriptSrc:function(b){var a=dnn.getVar(b+".resx","");if(a.length>0){return a}return b},getScriptPath:function(){var a=dnn.dom.getScript("dnn.js");if(a){var b=a.src;if(b.indexOf("?")>-1){b=b.substr(0,b.indexOf("?"))}return b.replace("dnn.js","")}var c=dnn.getVar("__sp");if(c){return c}return""},scriptFile:function(b){var a=b.split("/");return a[a.length-1]},loadScript:function(e,d,b){var c;if(e!=null&&e.length>0){c=this.scriptFile(e);if(this.scripts[c]!=null){return}}var a=new dnn.ScriptRequest(e,d,b);if(c){this.scripts[c]=a}a.load();return a},loadScripts:function(a,b,c){if(dnn.scripts==null){var e=function(f,g,h){return(function(){dnn.dom.loadScripts(f,g,h)})};dnn.dom.loadScript(dnn.dom.getScriptPath()+"dnn.scripts.js",null,e(a,b,c));return}var d=new dnn.scripts.ScriptBatchRequest(a,b,c);d.load()},scriptStatus:function(c){var b=this.scriptFile(c);if(this.scripts[b]){return this.scripts[b].status}var a=this.getScript(c);if(a!=null){return"complete"}else{return""}},setScriptLoaded:function(b){var a=this.scriptFile(b);if(this.scripts[a]&&dnn.dom.scripts[a].status!="complete"){dnn.dom.scripts[a].complete()}},navigate:function(b,a){if(a!=null&&a.length>0){if(a=="_blank"||a=="_new"){window.open(b)}else{document.frames[a].location.href=b}}else{if(Sys.Browser.agent===Sys.Browser.InternetExplorer){window.navigate(b)}else{window.location.href=b}}return false},setCookie:function(b,f,h,e,d,c,a){var g;if(h){g=new Date();g.setTime(g.getTime()+(h*24*60*60*1000))}if(a){g=new Date();g.setTime(g.getTime()+(a))}document.cookie=b+"="+escape(f)+((g)?"; expires="+g.toGMTString():"")+((e)?"; path="+e:"")+((d)?"; domain="+d:"")+((c)?"; secure":"");if(document.cookie.length>0){return true}},getCurrentStyle:function(b,c){var a=Sys.UI.DomElement._getCurrentStyle(b);if(a){return a[c]}return""},getFormPostString:function(a){var c="";if(a!=null){if(a.tagName&&a.tagName.toLowerCase()=="form"){for(var b=0;b-1){var e=o.jQuery("#iPopUp"),i=e.dialog("option","refresh"),t=e.dialog("option","closingUrl"),n=e.dialog("option","minWidth"),a=e.dialog("option","minHeight"),r=e.dialog("option","showReturn");t||(t=location.href),!0===e.dialog("isOpen")&&e.dialog("option",{close:function(o,e){dnnModal.refreshPopup({url:t,width:n,height:a,showReturn:r,refresh:i})}}).dialog("close")}else o.jQuery("#iPopUp").dialog({autoOpen:!1,title:document.title})}return!1}catch(o){return!0}},show:function(n,a,r,l,d,s){var p=e("#iPopUp");p.length&&(p[0].src="about:blank",p.remove()),p=e(''),e(document.body).append(p),e(document).find("html").css("overflow","hidden");for(var c=document.styleSheets,h=!1,m=0,g=c.length;m-1){h=!0;break}}var f=!h&&(e(o).width()<481||t);f?e("html").addClass("mobileView"):e("html").removeClass("mobileView");var w=0,b=function(){p.prev(".dnnLoading").remove()},v=function(){p.on("load",function(){b();var e=document.getElementById("iPopUp"),t=o.location.hostname.toLowerCase(),a=o.location.port.toLowerCase(),r=i(n),l=r.host.toLowerCase(),d=r.port.toLowerCase();if(l=l||t,d=d||a,t===l&&a===d)try{if(f){var s=e.contentDocument.body,c=e.contentDocument.documentElement;c.style.width=w+"px",s.className+="mobileView dnnFormPopup dnnFormPopupMobileView";var h=Math.max(s.scrollHeight,s.offsetHeight,c.clientHeight,c.scrollHeight,c.offsetHeight);p.css("height",h+100).dialog("option","position",{my:"top",at:"top"})}e.contentWindow.dnnModal.show=function(o,e,i,t,n,a){var r=parent.jQuery("#iPopUp");a||(a=location.href),r.dialog("isOpen")&&r.dialog("option",{close:function(){parent.dnnModal.show(o,e,i,t,n,a)}}).dialog("close")}}catch(o){}}),p[0].src=n,"function"==typeof e.ui.dialog.prototype.options.open&&e.ui.dialog.prototype.options.open.apply(this,arguments)};if(f){w=e(o).width()-100;var y=e("body").css("height");p.dialog({modal:!0,autoOpen:!0,dialogClass:"dnnFormPopup dnnFormPopupMobileView",resizable:!1,closeOnEscape:!0,refresh:d,showReturn:a,closingUrl:s,minHeight:r,position:{my:"top",at:"top"},draggable:!1,open:function(){e("#Form").hide(),e("body").css("height","auto"),p.parent().css({width:"auto",left:"0",right:"0",top:"0","box-shadow":"none"}),o.scrollTo(0,0),v()},close:function(){e("#Form").show(),y&&e("body").css("height",y),o.scrollTo(0,0),o.dnnModal.closePopUp(d,s)}})}else if(p.dialog({modal:!0,autoOpen:!0,dialogClass:"dnnFormPopup",position:{my:"center",at:"center"},minWidth:l,minHeight:r,maxWidth:1920,maxHeight:1080,resizable:!0,closeOnEscape:!0,refresh:d,showReturn:a,closingUrl:s,open:v,close:function(){o.dnnModal.closePopUp(d,s)}}).width(l-11).height(r-11),0===p.parent().find(".ui-dialog-title").next("a.dnnModalCtrl").length){var k=e(' ');p.parent().find(".ui-dialog-titlebar-close").wrap(k);var x=e('Max ');p.parent().find(".ui-dialog-titlebar-close").before(x),x.click(function(i){i.preventDefault();var t,n,a=e(o),r="center",l="center",d=0,s=0;if(e("button.ui-dialog-titlebar-close").length&&(s=e("button.ui-dialog-titlebar-close").parent(".dnnModalCtrl").height(),d=e("button.ui-dialog-titlebar-close").parent(".dnnModalCtrl").width()),p.data("isMaximized")){var c=p.data("height")+100;c>=a.height()&&(c=p.data("height")),t=c-s,n=p.data("width"),p.data("isMaximized",!1)}else{p.data("height",p.dialog("option","minHeight")).data("width",p.dialog("option","minWidth"));var h=0;e("#personaBar-iframe").length&&(h=e("#personaBar-iframe").width()),n=a.outerWidth()-h-d/7.5-40,t=a.height()-s,r="right-"+d/5.5+" center",l="right center-"+s/11,p.data("isMaximized",!0)}p.dialog("option","height",t),p.dialog("option","width",n),p.dialog("option","position",{my:r,at:l,of:o})})}if(function(){var o=e('
');o.css({width:p.width(),height:p.height()}),p.before(o)}(),"true"===a.toString())return!1},closePopUp:function(o,i){var t=parent,n=t.jQuery("#iPopUp");void 0!==o&&null!=o||(o=!0),"true"==o.toString()?(void 0!==i&&""!=i||(i=t.location.href),t.location.href=i,n.hide()):n.dialog("option","close",null).dialog("close"),e(t.document).find("html").css("overflow","")},refreshPopup:function(o){var e=parent,i=e.parent;e.location.href!==i.location.href&&e.location.href!==o.url?i.dnnModal.show(o.url,o.showReturn,o.height,o.width,o.refresh,o.closingUrl):dnnModal.closePopUp(o.refresh,o.url)}},o.dnnModal.load()}(window,jQuery);
;;;var DNN_COL_DELIMITER=String.fromCharCode(16);var DNN_ROW_DELIMITER=String.fromCharCode(15);var __dnn_m_bPageLoaded=false;if(window.addEventListener){window.addEventListener("load",__dnn_Page_OnLoad,false)}else{window.attachEvent("onload",__dnn_Page_OnLoad)}function __dnn_ClientAPIEnabled(){return typeof(dnn)!="undefined"&&typeof(dnn.dom)!="undefined"}function __dnn_Page_OnLoad(){if(__dnn_ClientAPIEnabled()){dnn.dom.attachEvent(window,"onscroll",__dnn_bodyscroll)}__dnn_m_bPageLoaded=true}function __dnn_KeyDown(iKeyCode,sFunc,e){if(e==null){e=window.event}if(e.keyCode==iKeyCode){eval(unescape(sFunc));return false}}function __dnn_bodyscroll(){var a=document.forms[0];if(__dnn_ClientAPIEnabled()&&__dnn_m_bPageLoaded&&typeof(a.ScrollTop)!="undefined"){a.ScrollTop.value=document.documentElement.scrollTop?document.documentElement.scrollTop:dnn.dom.getByTagName("body")[0].scrollTop}}function __dnn_setScrollTop(c){if(__dnn_ClientAPIEnabled()){if(c==null){c=document.forms[0].ScrollTop.value}var a=dnn.getVar("ScrollToControl");if(a!=null&&a.length>0){var b=dnn.dom.getById(a);if(b!=null){c=dnn.dom.positioning.elementTop(b);dnn.setVar("ScrollToControl","")}}if(document.getElementsByTagName("html")[0].style.overflow!="hidden"){window.scrollTo(0,c)}}}function __dnn_SetInitialFocus(a){var b=dnn.dom.getById(a);if(b!=null&&__dnn_CanReceiveFocus(b)){b.focus()}}function __dnn_CanReceiveFocus(b){if(b.style.display!="none"&&b.tabIndex>-1&&b.disabled==false&&b.style.visible!="hidden"){var a=b.parentElement;while(a!=null&&a.tagName!="BODY"){if(a.style.display=="none"||a.disabled||a.style.visible=="hidden"){return false}a=a.parentElement}return true}else{return false}}function __dnn_ContainerMaxMin_OnClick(i,b){var g=dnn.dom.getById(b);if(g!=null){var e=i.childNodes[0];var l=dnn.getVar("containerid_"+b);var j=dnn.getVar("cookieid_"+b);var d=e.src.toLowerCase().substr(e.src.lastIndexOf("/"));var a;var h;var k;if(dnn.getVar("min_icon_"+l)){k=dnn.getVar("min_icon_"+l)}else{k=dnn.getVar("min_icon")}if(dnn.getVar("max_icon_"+l)){h=dnn.getVar("max_icon_"+l)}else{h=dnn.getVar("max_icon")}a=h.toLowerCase().substr(h.lastIndexOf("/"));var c=5;var f=dnn.getVar("animf_"+b);if(f!=null){c=new Number(f)}if(d==a){e.src=k;dnn.dom.expandElement(g,c);e.title=dnn.getVar("min_text");if(j!=null){if(dnn.getVar("__dnn_"+l+":defminimized")=="true"){dnn.dom.setCookie(j,"true",365)}else{dnn.dom.deleteCookie(j)}}else{dnn.setVar("__dnn_"+l+"_Visible","true")}}else{e.src=h;dnn.dom.collapseElement(g,c);e.title=dnn.getVar("max_text");if(j!=null){if(dnn.getVar("__dnn_"+l+":defminimized")=="true"){dnn.dom.deleteCookie(j)}else{dnn.dom.setCookie(j,"false",365)}}else{dnn.setVar("__dnn_"+l+"_Visible","false")}}return true}return false}function __dnn_Help_OnClick(a){var b=dnn.dom.getById(a);if(b!=null){if(b.style.display=="none"){b.style.display=""}else{b.style.display="none"}return true}return false}function __dnn_SectionMaxMin(f,c){var d=dnn.dom.getById(c);if(d!=null){var g=f.getAttribute("max_icon");var e=f.getAttribute("min_icon");var a=f.getAttribute("userctr")!=null;var b;if(d.style.display=="none"){f.src=e;d.style.display="";if(a){b="True"}else{dnn.setVar(f.id+":exp",1)}}else{f.src=g;d.style.display="none";if(a){b="False"}else{dnn.setVar(f.id+":exp",0)}}if(a){dnncore.setUserProp(f.getAttribute("userctr"),f.getAttribute("userkey"),b,null)}return true}return false}function __dnn_enableDragDrop(){var b=dnn.getVar("__dnn_dragDrop").split(";");var e;for(var c=0;c0){var a=dnn.dom.getById(e[0]);var d=dnn.dom.getById(e[1]);if(a!=null&&d!=null){a.setAttribute("moduleid",e[2]);dnn.dom.positioning.enableDragAndDrop(a,d,"__dnn_dragComplete()","__dnn_dragOver()")}}}}var __dnn_oPrevSelPane;var __dnn_oPrevSelModule;var __dnn_dragEventCount=0;function __dnn_dragOver(){__dnn_dragEventCount++;if(__dnn_dragEventCount%75!=0){return}var c=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);var a=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);if(__dnn_oPrevSelPane!=null){__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder}if(a!=null){__dnn_oPrevSelPane=a;a.pane.style.border="4px double "+DNN_HIGHLIGHT_COLOR;var e=__dnn_getPaneControlIndex(c,a);var b;var f;for(var d=0;dd&&a.controls[d].id!=c.id){b=a.controls[d]}if(e<=d&&a.controls[d].id!=c.id){f=a.controls[d];break}}if(__dnn_oPrevSelModule!=null){dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder}if(f!=null){__dnn_oPrevSelModule=f;dnn.dom.getNonTextNode(f.control).style.borderTop="5px groove "+DNN_HIGHLIGHT_COLOR}else{if(b!=null){__dnn_oPrevSelModule=b;dnn.dom.getNonTextNode(b.control).style.borderBottom="5px groove "+DNN_HIGHLIGHT_COLOR}}}}function __dnn_dragComplete(){var f=dnn.dom.getById(dnn.dom.positioning.dragCtr.contID);var d=f.getAttribute("moduleid");if(__dnn_oPrevSelPane!=null){__dnn_oPrevSelPane.pane.style.border=__dnn_oPrevSelPane.origBorder}if(__dnn_oPrevSelModule!=null){dnn.dom.getNonTextNode(__dnn_oPrevSelModule.control).style.border=__dnn_oPrevSelModule.origBorder}var b=__dnn_getMostSelectedPane(dnn.dom.positioning.dragCtr);var e;if(b==null){var a=__dnn_Panes();for(var c=0;c0){__dnn_m_aryPanes[__dnn_m_aryPanes.length]=new __dnn_Pane(dnn.dom.getById(b[c]),a[c])}}}var __dnn_m_aryPanes;var __dnn_m_aryModules;function __dnn_Panes(){if(__dnn_m_aryPanes==null){__dnn_m_aryPanes=new Array();__dnn_RefreshPanes()}return __dnn_m_aryPanes}function __dnn_Modules(a){if(__dnn_m_aryModules==null){__dnn_RefreshPanes()}return __dnn_m_aryModules[a]}function __dnn_getMostSelectedPane(g){var c=new dnn.dom.positioning.dims(g);var f=0;var a;var h;for(var e=0;e<__dnn_Panes().length;e++){var b=__dnn_Panes()[e];var d=new dnn.dom.positioning.dims(b.pane);a=dnn.dom.positioning.elementOverlapScore(d,c);if(a>f){f=a;h=b}}return h}function __dnn_getPaneControlIndex(f,b){if(b==null){return}var a=new dnn.dom.positioning.dims(f);var e;if(b.controls.length==0){return 0}for(var c=0;c0){e+=c+"~";this.controls[this.controls.length]=new __dnn_PaneControl(g,f);__dnn_m_aryModules[c]=g.id;f+=1}}}this.moduleOrder=e}function __dnn_PaneControl(a,b){this.control=a;this.id=a.id;this.index=b;this.origBorder=a.style.border}function __dnn_ShowModalPage(a){dnnModal.show(a,true,550,950,true,"")}function __dnncore(){this.GetUserVal=0;this.SetUserVal=1}__dnncore.prototype={getUserProp:function(b,c,a){this._doUserCallBack(dnncore.GetUserVal,b,c,null,new dnncore.UserPropArgs(b,c,a))},setUserProp:function(c,d,a,b){this._doUserCallBack(dnncore.SetUserVal,c,d,a,new dnncore.UserPropArgs(c,d,b))},_doUserCallBack:function(c,d,e,a,b){if(dnn&&dnn.xmlhttp){var f=c+COL_DELIMITER+d+COL_DELIMITER+e+COL_DELIMITER+a;dnn.xmlhttp.doCallBack("__Page",f,dnncore._callBackSuccess,b,dnncore._callBackFail,null,true,null,0)}else{alert("Client Personalization not enabled")}},_callBackSuccess:function(a,b,c){if(b.pFunc){b.pFunc(b.namingCtr,b.key,a)}},_callBackFail:function(a,b){window.status=a}};__dnncore.prototype.UserPropArgs=function(b,c,a){this.namingCtr=b;this.key=c;this.pFunc=a};var dnncore=new __dnncore();
;;;(function($){$.dnnSF=function(moduleId){var base=this;base.getServiceRoot=function(moduleName){var serviceRoot=dnn.getVar("sf_siteRoot","/");serviceRoot+="API/"+moduleName+"/";return serviceRoot;};base.getTabId=function(){return dnn.getVar("sf_tabId",-1);};base.getModuleId=function(){return moduleId;};base.setModuleHeaders=function(xhr){var tabId=base.getTabId();if(tabId>-1){xhr.setRequestHeader("ModuleId",base.getModuleId());xhr.setRequestHeader("TabId",tabId);}var afValue=base.getAntiForgeryValue();if(afValue){xhr.setRequestHeader("RequestVerificationToken",afValue);}};base.getAntiForgeryKey=function(){return"__RequestVerificationToken";};base.getAntiForgeryValue=function(){return $('[name="__RequestVerificationToken"]').val();};return base;};$.ServicesFramework=function(moduleId){return new $.dnnSF(moduleId);};})(jQuery);
;;;$(document).ready(function(){function toggleLeftMenu(){var desktopAccordion=$("nav[aria-label='secondary'] ul.treeview-navigation");var mobileDetails=$("nav[aria-label='secondary'] details.treeview-mobile");var mobileAccordion=$("nav[aria-label='secondary'] details.treeview-mobile > ul");var windowWidth=$(window).width();if(windowWidth<984){console.log(windowWidth)
desktopAccordion.css('display','none');mobileDetails.css('display','block');mobileAccordion.css('display','block');}else{mobileDetails.css('display','none');mobileAccordion.css('display','none');desktopAccordion.css('display','block');}}
toggleLeftMenu();$(window).resize(toggleLeftMenu);});
;;;(function($){$.fn.rateit=function(p1,p2){var options={};var mode='init';if(this.length==0)return this;var tp1=$.type(p1);if(tp1=='object'||p1===undefined||p1==null){options=$.extend({},$.fn.rateit.defaults,p1);}
else if(tp1=='string'&&p2===undefined){return this.data('rateit-'+p1);}
else if(tp1=='string'){mode='setvalue'}
return this.each(function(){var item=$(this);var itemdata=function(k,v){k='rateit-'+k;if(arguments.length===1)
return item.data(k);item.data(k,v);return v;};if(!item.hasClass('rateit'))item.addClass('rateit');var ltr=item.css('direction')!='rtl';if(mode=='setvalue'){if(!itemdata('init'))throw'Can\'t set value before init';if(p1=='readonly'&&!itemdata('readonly')){item.find('.rateit-range').unbind();itemdata('wired',false);}
if(itemdata('backingfld')){var fld=$(itemdata('backingfld'));if(p1=='value')fld.val(p2);if(p1=='min'&&fld[0].min)fld[0].min=p2;if(p1=='max'&&fld[0].max)fld[0].max=p2;if(p1=='step'&&fld[0].step)fld[0].step=p2;}
itemdata(p1,p2);}
if(!itemdata('init')){itemdata('min',itemdata('min')||options.min);itemdata('max',itemdata('max')||options.max);itemdata('step',itemdata('step')||options.step);itemdata('readonly',itemdata('readonly')!==undefined?itemdata('readonly'):options.readonly);itemdata('resetable',itemdata('resetable')!==undefined?itemdata('resetable'):options.resetable);itemdata('backingfld',itemdata('backingfld')||options.backingfld);itemdata('starwidth',itemdata('starwidth')||options.starwidth);itemdata('starheight',itemdata('starheight')||options.starheight);itemdata('value',itemdata('value')||options.min);if(itemdata('backingfld')){var fld=$(itemdata('backingfld'));itemdata('value',fld.hide().val());if(fld[0].nodeName=='INPUT'){if(fld[0].type=='range'||fld[0].type=='text'){itemdata('min',parseInt(fld.attr('min'))||itemdata('min'));itemdata('max',parseInt(fld.attr('max'))||itemdata('max'));itemdata('step',parseInt(fld.attr('step'))||itemdata('step'));}}
if(fld[0].nodeName=='SELECT'&&fld[0].options.length>1){itemdata('min',Number(fld[0].options[0].value));itemdata('max',Number(fld[0].options[fld[0].length-1].value));itemdata('step',Number(fld[0].options[1].value)-Number(fld[0].options[0].value));}}
item.append('
');if(!ltr){item.find('.rateit-reset').css('float','right');item.find('.rateit-selected').addClass('rateit-selected-rtl');item.find('.rateit-hover').addClass('rateit-hover-rtl');}
itemdata('init',true);}
var range=item.find('.rateit-range');range.width(itemdata('starwidth')*(itemdata('max')-itemdata('min'))).height(itemdata('starheight'));if(itemdata('value')){var score=(itemdata('value')-itemdata('min'))*itemdata('starwidth');item.find('.rateit-selected').width(score);}
var resetbtn=item.find('.rateit-reset');var calcRawScore=function(element,event){var pageX=(event.changedTouches)?event.changedTouches[0].pageX:event.pageX;var offsetx=pageX-$(element).offset().left;if(!ltr)offsetx=range.width()-offsetx;if(offsetx>range.width())offsetx=range.width();if(offsetx<0)offsetx=0;return score=Math.ceil(offsetx/itemdata('starwidth')*(1/itemdata('step')));};if(!itemdata('readonly')){if(itemdata('resetable')){resetbtn.click(function(){itemdata('value',itemdata('min'));range.find('.rateit-hover').hide().width(0);range.find('.rateit-selected').width(0).show();if(itemdata('backingfld'))$(itemdata('backingfld')).val(itemdata('min'));item.trigger('reset');});}
else{resetbtn.hide();}
if(!itemdata('wired')){range.bind('touchmove touchend',touchHandler);range.mousemove(function(e){var score=calcRawScore(this,e);var w=score*itemdata('starwidth')*itemdata('step');var h=range.find('.rateit-hover');if(h.data('width')!=w){range.find('.rateit-selected').hide();h.width(w).show().data('width',w);item.trigger('hover',[(score*itemdata('step'))+itemdata('min')]);}});range.mouseleave(function(e){range.find('.rateit-hover').hide().width(0).data('width','');item.trigger('hover',[null]);range.find('.rateit-selected').show();});range.mouseup(function(e){var score=calcRawScore(this,e);var newvalue=(score*itemdata('step'))+itemdata('min');itemdata('value',newvalue);if(itemdata('backingfld')){$(itemdata('backingfld')).val(newvalue);}
range.find('.rateit-hover').hide();range.find('.rateit-selected').width(score*itemdata('starwidth')*itemdata('step')).show();item.trigger('hover',[null]).trigger('rated',[newvalue]);});itemdata('wired',true);}
if(itemdata('resetable')){resetbtn.show();}}
else{resetbtn.hide();}});};function touchHandler(event){var touches=event.originalEvent.changedTouches,first=touches[0],type="";switch(event.type){case"touchmove":type="mousemove";break;case"touchend":type="mouseup";break;default:return;}
var simulatedEvent=document.createEvent("MouseEvent");simulatedEvent.initMouseEvent(type,true,true,window,1,first.screenX,first.screenY,first.clientX,first.clientY,false,false,false,false,0,null);first.target.dispatchEvent(simulatedEvent);event.preventDefault();};$.fn.rateit.defaults={min:0,max:5,step:0.5,starwidth:16,starheight:16,readonly:false,resetable:true};eds3_5_jq(document).ready(function($){$('div.rateit').rateit();});})(eds3_5_jq);
;;;(function(document,undefined){var eds_cookie=function($){var pluses=/\+/g;function raw(s){return s;}
function decoded(s){return decodeURIComponent(s.replace(pluses,' '));}
var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);if(value===null){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}
value=config.json?JSON.stringify(value):String(value);return(document.cookie=[encodeURIComponent(key),'=',config.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
var decode=config.raw?raw:decoded;var cookies=document.cookie.split('; ');for(var i=0,l=cookies.length;ix
",r.appendChild(e.childNodes[1])}var d={selector:["iframe","object"],players:["www.youtube.com","player.vimeo.com"]},o=[".edn_fluidvids {","width: 100%; max-width: 100%; position: relative;","}",".edn_fluidvids-item {","position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;","}"].join(""),r=document.head||document.getElementsByTagName("head")[0];return d.render=function(){for(var e=document.querySelectorAll(d.selector.join()),t=e.length;t--;)i(e[t])},d.init=function(e){for(var t in e)d[t]=e[t];d.render(),n()},d});
;;;/*!
* imagesLoaded PACKAGED v3.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
(function () { function e() { } function t(e, t) { for (var n = e.length; n--;)if (e[n].listener === t) return n; return -1 } function n(e) { return function () { return this[e].apply(this, arguments) } } var i = e.prototype, r = this, o = r.EventEmitter; i.getListeners = function (e) { var t, n, i = this._getEvents(); if ("object" == typeof e) { t = {}; for (n in i) i.hasOwnProperty(n) && e.test(n) && (t[n] = i[n]) } else t = i[e] || (i[e] = []); return t }, i.flattenListeners = function (e) { var t, n = []; for (t = 0; e.length > t; t += 1)n.push(e[t].listener); return n }, i.getListenersAsObject = function (e) { var t, n = this.getListeners(e); return n instanceof Array && (t = {}, t[e] = n), t || n }, i.addListener = function (e, n) { var i, r = this.getListenersAsObject(e), o = "object" == typeof n; for (i in r) r.hasOwnProperty(i) && -1 === t(r[i], n) && r[i].push(o ? n : { listener: n, once: !1 }); return this }, i.on = n("addListener"), i.addOnceListener = function (e, t) { return this.addListener(e, { listener: t, once: !0 }) }, i.once = n("addOnceListener"), i.defineEvent = function (e) { return this.getListeners(e), this }, i.defineEvents = function (e) { for (var t = 0; e.length > t; t += 1)this.defineEvent(e[t]); return this }, i.removeListener = function (e, n) { var i, r, o = this.getListenersAsObject(e); for (r in o) o.hasOwnProperty(r) && (i = t(o[r], n), -1 !== i && o[r].splice(i, 1)); return this }, i.off = n("removeListener"), i.addListeners = function (e, t) { return this.manipulateListeners(!1, e, t) }, i.removeListeners = function (e, t) { return this.manipulateListeners(!0, e, t) }, i.manipulateListeners = function (e, t, n) { var i, r, o = e ? this.removeListener : this.addListener, s = e ? this.removeListeners : this.addListeners; if ("object" != typeof t || t instanceof RegExp) for (i = n.length; i--;)o.call(this, t, n[i]); else for (i in t) t.hasOwnProperty(i) && (r = t[i]) && ("function" == typeof r ? o.call(this, i, r) : s.call(this, i, r)); return this }, i.removeEvent = function (e) { var t, n = typeof e, i = this._getEvents(); if ("string" === n) delete i[e]; else if ("object" === n) for (t in i) i.hasOwnProperty(t) && e.test(t) && delete i[t]; else delete this._events; return this }, i.removeAllListeners = n("removeEvent"), i.emitEvent = function (e, t) { var n, i, r, o, s = this.getListenersAsObject(e); for (r in s) if (s.hasOwnProperty(r)) for (i = s[r].length; i--;)n = s[r][i], n.once === !0 && this.removeListener(e, n.listener), o = n.listener.apply(this, t || []), o === this._getOnceReturnValue() && this.removeListener(e, n.listener); return this }, i.trigger = n("emitEvent"), i.emit = function (e) { var t = Array.prototype.slice.call(arguments, 1); return this.emitEvent(e, t) }, i.setOnceReturnValue = function (e) { return this._onceReturnValue = e, this }, i._getOnceReturnValue = function () { return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 }, i._getEvents = function () { return this._events || (this._events = {}) }, e.noConflict = function () { return r.EventEmitter = o, e }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () { return e }) : "object" == typeof module && module.exports ? module.exports = e : this.EventEmitter = e }).call(this), function (e) { function t(t) { var n = e.event; return n.target = n.target || n.srcElement || t, n } var n = document.documentElement, i = function () { }; n.addEventListener ? i = function (e, t, n) { e.addEventListener(t, n, !1) } : n.attachEvent && (i = function (e, n, i) { e[n + i] = i.handleEvent ? function () { var n = t(e); i.handleEvent.call(i, n) } : function () { var n = t(e); i.call(e, n) }, e.attachEvent("on" + n, e[n + i]) }); var r = function () { }; n.removeEventListener ? r = function (e, t, n) { e.removeEventListener(t, n, !1) } : n.detachEvent && (r = function (e, t, n) { e.detachEvent("on" + t, e[t + n]); try { delete e[t + n] } catch (i) { e[t + n] = void 0 } }); var o = { bind: i, unbind: r }; "function" == typeof define && define.amd ? define("eventie/eventie", o) : e.eventie = o }(this), function (e, t) { "function" == typeof define && define.amd ? define(["eventEmitter/EventEmitter", "eventie/eventie"], function (n, i) { return t(e, n, i) }) : "object" == typeof exports ? module.exports = t(e, require("eventEmitter"), require("eventie")) : e.imagesLoaded = t(e, e.EventEmitter, e.eventie) }(this, function (e, t, n) { function i(e, t) { for (var n in t) e[n] = t[n]; return e } function r(e) { return "[object Array]" === d.call(e) } function o(e) { var t = []; if (r(e)) t = e; else if ("number" == typeof e.length) for (var n = 0, i = e.length; i > n; n++)t.push(e[n]); else t.push(e); return t } function s(e, t, n) { if (!(this instanceof s)) return new s(e, t); "string" == typeof e && (e = document.querySelectorAll(e)), this.elements = o(e), this.options = i({}, this.options), "function" == typeof t ? n = t : i(this.options, t), n && this.on("always", n), this.getImages(), a && (this.jqDeferred = new a.Deferred); var r = this; setTimeout(function () { r.check() }) } function c(e) { this.img = e } function f(e) { this.src = e, v[e] = this } var a = e.eds3_5_jq,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},s.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),c.prototype=new t,c.prototype.check=function(){var e=v[this.img.src]||new f(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return f.prototype=new t,f.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},f.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},f.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},f.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},f.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},f.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
;;;(function($,window){'use strict';var defaultOptions={portalId:0,moduleId:0,tabId:0,autoplayVideo:false,userLoggedIn:false,googleReCaptchaSiteKey:'',websiteRoot:'',portfolioMode:false,openAt:0,wrapperResizeDuration:200,flowplayerSwf:'',flowplayer:{key:'',logo:''},socialButtons:{facebook:false,gplus:false,twitter:false,inshare:false,pinterest:false},cssClass:'',events:{onBeforeClose:function(){}},comments:{requireAuthorInfo:true,useReCaptcha:false,permissions:{show:false,commenting:false}},like:{permissions:{liking:false}},mobile:false,i18n:{}},ajaxState={UNSET:0,SENT:1,DONE:2},activeClass='activeElement',imageNotLoadedClass='imageNotLoaded',smbLightBodyClass='smbLightFixed',audioItemTypeClass='audioItem',videoItemTypeClass='videoItem',imageItemTypeClass='imageItem',positionAnimationClass='positionAnimation',swipeAnimationClass='swipeAnimation',itemDomInitKey='initialized',emailVerification=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,preloadImage=function(itemIndex,callback){var self=this,item=self.items[itemIndex];if(!item)
return;if(item.type!='image')
return;var imageMeta=self.images[item.src];if(imageMeta){if(typeof callback=='function'){if(imageMeta.stats.preloadFinished)
callback(imageMeta.stats);else
imageMeta.callbacks.push(callback);}
return;}
imageMeta=self.images[item.src]={callbacks:[],stats:{preloadFinished:false,isLoaded:false,width:0,height:0}};if(typeof callback=='function')
imageMeta.callbacks.push(callback);var $img=$(' ');$img.imagesLoaded().progress(function(instance,imageInfo){if(self.viewClosed)
return;var imageMeta=self.images[item.src];imageMeta.stats.preloadFinished=true;imageMeta.stats.isLoaded=imageInfo.isLoaded;if(!self.smbPlus&&imageInfo.isLoaded)
self.$imagesWrapper.append($img);imageMeta.stats.width=$img.width();imageMeta.stats.height=$img.height();if(self.smbPlus){$img.css(getItemDimensions.call(self,imageMeta.stats.width,imageMeta.stats.height,false));$img.parent().removeClass('loading');}else{var currentItem=self.items[self.currentItemIndex];if(currentItem.type=='image'&¤tItem.src==item.src){self.initialItemLoaded=true;showItem.call(self);}}
$img=null;for(var i=0,l=imageMeta.callbacks.length;i div.item_'+itemIndex,self.$contentWrapper));}
$img.attr('src',item.src);},preloadImages=function(){var self=this,i=0,numberOfItems=self.items.length;for(;imaxItemWidth||itemHeight>maxItemHeight){containerRatio=maxItemWidth/maxItemHeight;itemRatio=itemWidth/itemHeight;displayWidth=maxItemWidth;displayHeight=maxItemHeight;if(itemRatiocontainerRatio){displayHeight=Math.round(maxItemWidth/itemWidth*itemHeight);}}
if(fixedHeight)
displayHeight=itemHeight;return{width:displayWidth,height:displayHeight,top:Math.floor((maxItemHeight-displayHeight)/2),left:Math.floor((maxItemWidth-displayWidth)/2)};},setItemDimensions=function(itemDimensions){var self=this,resizeFinished=function(){self.$loadingOverlay.stop(true).fadeTo(200,0,function(){self.$loadingOverlay.css('display','none');});setItemInfo.call(self);},doResize=function(properties,complete){if(self.options.wrapperResizeDuration==0){self.$mainWrapper.css(properties);complete();}else{self.$mainWrapper.stop(true).animate(properties,{duration:self.options.wrapperResizeDuration,complete:function(){self.$mainWrapper.css('overflow','');complete();}});}},resizeHeight=function(){if(self.$mainWrapper.height()!=itemDimensions.height)
doResize({height:itemDimensions.height,top:itemDimensions.top},resizeFinished);else
resizeFinished();};self.$loadingOverlay.removeClass('inProgress');if(self.$mainWrapper.width()!=itemDimensions.width)
doResize({width:itemDimensions.width,left:itemDimensions.left},resizeHeight);else
resizeHeight();},showImage=function(currentItem){var self=this,imageInfo=self.images[currentItem.src].stats,width,height;if(!imageInfo.preloadFinished)
return;self.$mainWrapper.addClass(imageItemTypeClass);$('> img',self.$imagesWrapper).removeClass(activeClass).filter('.smbLightImage_'+currentItem.id).addClass(activeClass);if(imageInfo.isLoaded){width=imageInfo.width;height=imageInfo.height;}else{width=400;height=400;self.$imagesWrapper.addClass(imageNotLoadedClass);}
self.$imagesWrapper.addClass(activeClass);setItemDimensions.call(self,getItemDimensions.call(self,width,height));},showVideo=function(currentItemIndex){var self=this,videoHtml='',videoType='',currentItem=self.items[currentItemIndex];if(!self.smbPlus)
self.$mainWrapper.addClass(videoItemTypeClass);switch(currentItem.source){case'youtube':videoHtml='';break;case'vimeo':videoHtml='';break;case'wistia':videoHtml='';break;case'flowplayer':if(stringEndsWith(currentItem.src,'.mp4')){videoType='video/mp4';}else if(stringEndsWith(currentItem.src,'.webm')){videoType='video/webm';}else if(stringEndsWith(currentItem.src,'.ogg')){videoType='video/ogg';}else if(stringEndsWith(currentItem.src,'.flv')){videoType='video/flash';}
videoHtml='
';}
var $playerContainer=self.$audioVideo;if(self.smbPlus){if(currentItem.source!='flowplayer')
videoHtml=''+videoHtml+'
';$playerContainer=$('> div.item_'+self.currentItemIndex,self.$contentWrapper);}else
$playerContainer.addClass(activeClass);$playerContainer.html(videoHtml).removeClass('loading');if(currentItem.source=='flowplayer')
$('> .flowplayerContainer',$playerContainer).flowplayer({swf:self.options.flowplayerSwf,ratio:currentItem.height/currentItem.width,autoplay:self.options.autoplayVideo,tooltip:false,embed:false,clip:{sources:[{type:videoType,src:currentItem.src}]},key:self.options.flowplayer.key,logo:self.options.flowplayer.logo});var playerCss=getItemDimensions.call(self,currentItem.width,currentItem.height,true);if(self.smbPlus)
$('>',$playerContainer).css(playerCss);else
setItemDimensions.call(self,playerCss);self.initialItemLoaded=true;},showAudio=function(currentItem){var self=this;if(!self.smbPlus)
self.$mainWrapper.addClass(audioItemTypeClass);var $playerContainer=self.$audioVideo,audioHtml=' ',selector='> audio';if(self.smbPlus){audioHtml=''+audioHtml+'
';selector='> div > audio';$playerContainer=$('> div.item_'+self.currentItemIndex,self.$contentWrapper);}else
$playerContainer.addClass(activeClass);$playerContainer.html(audioHtml).removeClass('loading');audiojs.create($(selector,$playerContainer)[0]);var playerCss=getItemDimensions.call(self,460,36,false,true);if(self.smbPlus)
$('>',$playerContainer).css(playerCss);else
setItemDimensions.call(self,playerCss);self.initialItemLoaded=true;},setItemInfo=function(){var self=this,currentItem=self.items[self.currentItemIndex];if(typeof currentItem.title=='string'&¤tItem.title!='')
self.$itemTitle.html(currentItem.title).stop(true).fadeTo(200,1);if((self.options.socialButtons.facebook||self.options.socialButtons.twitter||self.options.socialButtons.gplus||self.options.socialButtons.inshare||(self.options.socialButtons.pinterest&¤tItem.type=='image'))&&typeof currentItem.socialUrl=='string'&¤tItem.socialUrl!='')
self.$socialButtonsTrigger.css('display','');else
self.$socialButtonsTrigger.css('display','none');},validItemIndex=function(index){var numberOfItems=this.items.length;if(index<0)
index=numberOfItems-1;else if(index>=numberOfItems)
index=0;return index;},showItem=function(){var self=this;self.$itemTitle.text('').stop(true).fadeTo(0,0);self.$socialButtonsTrigger.removeClass('show');self.$socialButtonsWrapper.removeClass('show').html('');self.currentItemIndex=validItemIndex.call(self,self.currentItemIndex);self.$root.removeClass('firstItem lastItem');if(self.currentItemIndex===0)
self.$root.addClass('firstItem');if(self.currentItemIndex===self.items.length-1)
self.$root.addClass('lastItem');if(self.smbPlus){var prevItemIndex=validItemIndex.call(self,self.currentItemIndex-1),nextItemIndex=validItemIndex.call(self,self.currentItemIndex+1);$('> div.videoItem.item_'+prevItemIndex+','+'> div.audioItem.item_'+prevItemIndex+','+'> div.videoItem.item_'+nextItemIndex+','+'> div.audioItem.item_'+nextItemIndex,self.$contentWrapper).html('');setItemInfo.call(self);}
var item=self.items[self.currentItemIndex],itemTypeClass='imageActive';if(item.type=='video')
itemTypeClass='videoActive';else if(item.type=='audio')
itemTypeClass='audioActive';self.$root.removeClass('imageActive videoActive audioActive').addClass(itemTypeClass);self.showItem();},size=function(){var self=this;if(self.smbPlus){var windowHeight=self.$window.height();if(window.innerHeight)
windowHeight=window.innerHeight;windowHeight+=1;self.$root.height(windowHeight);self.overlayWidth=self.$root.width();self.overlayHeight=windowHeight;}else{self.overlayWidth=self.$contentWrapper.width();self.overlayHeight=self.$contentWrapper.height();}
self.center();},swipe=function(indexModifier){var self=this;if(self.skipGestures||indexModifier==-1&&self.currentItemIndex==0||indexModifier==1&&self.currentItemIndex==this.items.length-1)
return;self.skipGestures=true;var newX=-self.currentItemIndex*self.overlayWidth;if(indexModifier==1)
newX-=self.overlayWidth;else
newX+=self.overlayWidth;self.$contentWrapper.removeClass(positionAnimationClass).addClass(swipeAnimationClass).css({transform:'translate3d('+newX+'px, 0, 0)'});setTimeout(function(){self.currentItemIndex+=indexModifier;showItem.call(self);self.skipGestures=false;},250);},showPrevItem=function(){var self=this;if(!self.initialItemLoaded)
return;if(self.smbPlus){swipe.call(self,-1);return;}
self.currentItemIndex-=1;showItem.call(self);},showNextItem=function(){var self=this;if(!self.initialItemLoaded)
return;if(self.smbPlus){swipe.call(self,1);return;}
self.currentItemIndex+=1;showItem.call(self);},close=function(){var self=this;if(typeof self.options.events.onBeforeClose=='function'&&self.options.events.onBeforeClose({activeItem:self.currentItemIndex,displayItems:self.items})===false)
return;self.$document.off('.smbLightEvent');self.$window.off('.smbLightEvent');self.viewClosed=true;self.$root.stop(true).fadeOut(200,function(){self.$root.remove();self.$body.removeClass(smbLightBodyClass);});if(self.smbPlus){if(self.oldViewportMetaContent===undefined)
self.$viewportMeta.remove();else
self.$viewportMeta.attr('content',self.oldViewportMetaContent);if(self.oldIeTapHighlight===undefined)
self.$ieTapHighlight.remove();else
self.$ieTapHighlight.attr('content',self.oldIeTapHighlight);}},inFullscreenMode=function(){if(document.fullscreenElement&&document.fullscreenElement!=null)
return true;else if(document.mozFullScreenElement&&document.mozFullScreenElement!=null)
return true;else if(document.webkitFullscreenElement&&document.webkitFullscreenElement!=null)
return true;return false;},eventListener=function(events,callback){var el=this,registerEvent=function(ev){if(el.addEventListener)
el.addEventListener(ev,callback,false);else if(el.attachEvent)
el.attachEvent(ev,callback);},eventsArray,i,l;if(events.indexOf(' ')==-1){registerEvent(events);return;}
eventsArray=events.split(' ');i=0;l=eventsArray.length;for(;i'+' '+''+$('
').text(author.name).html()+' '+''+this.content+'
'+''+this.dateHtml+'
'+'';if(self.commentSorting=='asc')
commentsHtml+=commentHtml;else
commentsHtml=commentHtml+commentsHtml;});self.$commentList.html(commentsHtml);},initEnviroment=function(items,options){var self=this;self.$body=$('body');if(self.$body.hasClass(smbLightBodyClass)||items.length==0)
return false;self.$body.addClass(smbLightBodyClass);self.$window=$(window);self.$document=$(document);self.initialItemLoaded=false;self.viewClosed=false;self.items=items;self.options=$.extend(true,{},defaultOptions,options);self.currentItemIndex=self.options.openAt;if(self.currentItemIndex<0||self.currentItemIndex>=items.length)
self.currentItemIndex=0;self.images={};return true;},postInit=function(){var self=this;self.$window.on('resize.smbLightEvent',function(){if(self.comments){var currentItem=self.items[self.currentItemIndex],itemCommentMeta=self.comments?self.comments[currentItem.id]:undefined;if(self.desktopVersion&&itemCommentMeta&&itemCommentMeta.state.open)
self.$root.width(self.$window.width()-self.$commentsModal.outerWidth(true));}
size.call(self);});self.$document.on('keyup.smbLightEvent',function(e){switch(e.keyCode){case 37:showPrevItem.call(self);break;case 39:showNextItem.call(self);break;case 27:if(self.commentsOpened){self.closeComments();return false;}
close.call(self);break;default:}
return false;});self.$root.on('click','.navigation',function(){if(self.$root.hasClass('initializing'))
return;if($(this).hasClass('prev'))
showPrevItem.call(self);else
showNextItem.call(self);}).on('click','.close',function(){close.call(self);});self.$socialButtonsTrigger.on('click',function(){if(self.$root.hasClass('initializing'))
return;var currentItem=self.items[self.currentItemIndex];var encodedUri=encodeURIComponent(currentItem.socialUrl);var escapedTitle='';var encodedTitle='';var twitterTitle='';if(typeof currentItem.title=='string'&¤tItem.title!=''){twitterTitle=escapedTitle=currentItem.title.replace(/&/g,'&').replace(/"/g,'"').replace(/'/g,''').replace(//g,'>');twitterTitle+=' '+currentItem.socialUrl.replace(/&/g,'&').replace(/"/g,'"').replace(/'/g,''').replace(//g,'>');encodedTitle=encodeURIComponent(currentItem.title);}
var socialButtonsHtml='';if(self.options.socialButtons.facebook)
socialButtonsHtml='
';if(self.options.socialButtons.twitter)
socialButtonsHtml+='
';if(self.options.socialButtons.inshare)
socialButtonsHtml+='
';if(self.options.socialButtons.pinterest&¤tItem.type=='image')
socialButtonsHtml+='';if(socialButtonsHtml=='')
return;self.$socialButtonsWrapper.toggleClass('show').html(socialButtonsHtml);if(self.options.socialButtons.pinterest&¤tItem.type=='image')
$.ajax({url:'//assets.pinterest.com/js/pinit.js',dataType:'script',cache:true});$(this).toggleClass('show');});},_=function(s){var self=this,translation=self.options.i18n[s];if(!translation)
return s;return translation;};function Standard(items,options){var self=this,currentItem,controlsHtml='';if(!initEnviroment.call(self,items,options))
return;self.$root=$('');self.$root.addClass(self.options.cssClass);self.$contentWrapper=$('> div.contentWrapper',self.$root);if(items.length>1)
controlsHtml=' '+' ';controlsHtml+=' '+'
'+''+_.call(self,'Share')+' ';self.$mainWrapper=$(''+'
'+'
'+_.call(self,'This image is currently unavailable')+'
'+'
'+'
'+
controlsHtml+'
').appendTo(self.$contentWrapper);self.$itemTitle=$(' ').appendTo(self.$mainWrapper);self.$loadingOverlay=$('
').appendTo(self.$mainWrapper);self.$imagesWrapper=$('> .viewWrapper > .images',self.$mainWrapper);self.$audioVideo=$('> .viewWrapper > .audioVideo',self.$mainWrapper);self.$socialButtonsWrapper=$('.socialButtonsWrapper',self.$mainWrapper);self.$socialButtonsTrigger=$('.socialButtonsTrigger',self.$mainWrapper);currentItem=self.items[self.currentItemIndex];if(currentItem.type=='image'){preloadImage.call(self,self.currentItemIndex,function(){preloadImages.call(self);});}else{preloadImages.call(self);}
self.$root.appendTo(self.$body);self.main={horizontalSpace:self.$mainWrapper.outerWidth(true)-self.$mainWrapper.width(),verticalSpace:self.$mainWrapper.outerHeight(true)-self.$mainWrapper.height()};size.call(self);self.$root.fadeTo(200,1,function(){if(currentItem.type=='image')
return;showItem.call(self);});postInit.call(self);return self;}
Standard.prototype={center:function(){var self=this,css={},currentItem,imageInfo,dimensionsSet=false,width=0,height=0,maximizeItem=false,fixedHeight=false;if(self.initialItemLoaded){currentItem=self.items[self.currentItemIndex];switch(currentItem.type){case'image':imageInfo=self.images[currentItem.src].stats;if(imageInfo.isLoaded){width=imageInfo.width;height=imageInfo.height;}else{width=400;height=400;}
break;case'video':width=currentItem.width;height=currentItem.height;maximizeItem=true;break;case'audio':width=460;height=36;fixedHeight=true;break;}
css=getItemDimensions.call(self,width,height,maximizeItem,fixedHeight);dimensionsSet=true;}
if(!dimensionsSet){css.width=self.$mainWrapper.width();css.height=self.$mainWrapper.height();css.left=Math.floor((self.overlayWidth-(css.width+self.main.horizontalSpace))/2);css.top=Math.floor((self.overlayHeight-(css.height+self.main.verticalSpace))/2);}
self.$mainWrapper.stop(true).css(css);},showItem:function(){var self=this;self.$imagesWrapper.removeClass(imageNotLoadedClass);self.$loadingOverlay.addClass('inProgress').stop(true).fadeTo(0,1,function(){self.$loadingOverlay.css('display','');});self.$audioVideo.html('');$('> .viewWrapper > div',self.$mainWrapper).removeClass(activeClass);self.$mainWrapper.removeClass(audioItemTypeClass).removeClass(videoItemTypeClass).removeClass(imageItemTypeClass);var currentItem=self.items[self.currentItemIndex];switch(currentItem.type){case'image':showImage.call(self,currentItem);break;case'video':showVideo.call(self,self.currentItemIndex);break;case'audio':showAudio.call(self,currentItem);break;default:self.initialItemLoaded=true;}
if(self.initialItemLoaded)
self.$root.removeClass('initializing');}};function Mobile(items,options){var self=this,currentItem,touch={newTouch:false,startX:0},controlsHtml='';self.smbPlus=true;if(!initEnviroment.call(self,items,options))
return;self.options.wrapperResizeDuration=0;self.$viewportMeta=$('meta[name="viewport"]');self.oldViewportMetaContent=undefined;if(self.$viewportMeta.length>0){self.oldViewportMetaContent=self.$viewportMeta.attr('content');self.$viewportMeta.attr('content','user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1');}else
self.$viewportMeta=$(' ').appendTo($('head'));self.$ieTapHighlight=$('meta[name="msapplication-tap-highlight"]');self.oldIeTapHighlight=undefined;if(self.$ieTapHighlight.length>0){self.oldIeTapHighlight=self.$ieTapHighlight.attr('content');self.$ieTapHighlight.attr('content','no');}else
self.$ieTapHighlight=$(' ').appendTo($('head'));self.$root=$('').addClass(self.options.cssClass);if(!/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())){self.$root.addClass('desktopUserAgent');self.desktopVersion=true;}
self.$contentWrapper=$('> div.contentWrapper',self.$root);controlsHtml='
';if(items.length>1)
controlsHtml+=' '+' ';controlsHtml+=' '+'
'+''+_.call(self,'Share')+' ';self.$root.append(controlsHtml);self.$itemTitle=$(' ').appendTo(self.$root);self.$socialButtonsWrapper=$('.socialButtonsWrapper',self.$root);self.$socialButtonsTrigger=$('.socialButtonsTrigger',self.$root);self.$modalOverlay=$('> .modalOverlay',self.$root);if(self.options.comments.permissions.show){self.comments={};self.$root.append(''+'');self.$commentsTrigger=$('> .actions.commentsTrigger',self.$root);self.$mainCommentsCount=$('> span',self.$commentsTrigger);self.$commentsModal=$('> .commentsModalWrapper',self.$root);self.$commentsMainWrapper=$('> .main',self.$commentsModal);self.$newCommentWrapper=$('> .newCommentWrapper',self.$commentsMainWrapper);self.$newCommentInput=$('> textarea',self.$newCommentWrapper);self.$newCommentButton=$('> button',self.$newCommentWrapper);self.$commentsTopBar=$('> .top',self.$commentsMainWrapper);self.$internalCommentsCount=$('> .comments',self.$commentsTopBar);self.$commentsLikes=$('> .likes',self.$commentsTopBar);self.$commentsSorting=$('> .sort',self.$commentsTopBar);self.$commentList=$('> ul',self.$commentsMainWrapper);self.$anonymCommentWrapper=$('> .anonymCommentWrapper',self.$commentsModal);self.$anonymCommenterNameInput=$('> .authorName > input',self.$anonymCommentWrapper);self.$anonymCommenterEmailInput=$('> .authorEmail > input',self.$anonymCommentWrapper);self.$anonymCommentInput=$('> .authorTextarea > textarea',self.$anonymCommentWrapper);self.$anonymCommentCancel=$('> .actions > .cancel',self.$anonymCommentWrapper);self.$anonymCommentPost=$('> .actions > .post',self.$anonymCommentWrapper);self.$newCommentCaptchaContainer=$('> .captchaContainer',self.$anonymCommentWrapper);self.commentSorting='asc';self.addingAjaxRequest=undefined;self.commentsOpened=false;self.commentsAnimationTimeout;var reCaptchaId;self.$commentsTrigger.on('click',function(){if(self.desktopVersion&&self.commentsOpened==true){self.closeComments();return;}
self.updateItemComments();if(self.desktopVersion){self.commentsOpened=true;clearTimeout(self.commentsAnimationTimeout);self.$root.addClass('animateComments moveComments');self.commentsAnimationTimeout=setTimeout(function(){self.$root.removeClass('animateComments moveComments');self.$root.width(self.$root.width()-self.$commentsModal.outerWidth(true));size.call(self);},200);}else{self.$root.addClass('modalActive');self.$modalOverlay.stop(true).animate({opacity:1},{duration:200});}});self.$commentsSorting.on('click',function(){if(self.commentSorting=='asc')
self.commentSorting='desc';else
self.commentSorting='asc';self.$commentsSorting.toggleClass('desc',self.commentSorting=='desc');updateCommentsUi.call(self);});self.$commentsModal.on('click','> span.closeComments',function(){self.closeComments();});self.$newCommentInput.on('change keyup',function(){var val=self.$newCommentInput.val();self.$newCommentWrapper.toggleClass('filledIn',val!=='');}).on('focus',function(){if(!self.options.comments.requireAuthorInfo)
return;self.$anonymCommenterNameInput.trigger('focus').val('').parent().removeClass('error');self.$anonymCommenterEmailInput.val('').parent().removeClass('error');self.$anonymCommentInput.val('').parent().removeClass('error');self.$newCommentCaptchaContainer.removeClass('error');if(self.options.comments.useReCaptcha){if(reCaptchaId)
grecaptcha.reset(reCaptchaId);else
reCaptchaId=grecaptcha.render($('> .captcha',self.$newCommentCaptchaContainer)[0],{sitekey:self.options.googleReCaptchaSiteKey,size:'compact'});}
self.$commentsModal.addClass('showAnonymWindow');});self.$anonymCommentCancel.on('click',function(){self.$commentsModal.removeClass('showAnonymWindow');self.$anonymCommentWrapper.removeClass('addingAnonComment');if(self.addingAjaxRequest){self.addingAjaxRequest.abort();self.addingAjaxRequest=undefined;}});var submitComment=function(e,authorName,authorEmail,comment,captcha,anonComment){var activeItemIndex=self.currentItemIndex,currentItem=self.items[activeItemIndex],itemCommentMeta=self.comments[currentItem.id],newComment=self.options.comments.requireAuthorInfo?comment:self.$newCommentInput.val(),params={action:'add_comment'},error=false;if(newComment===''||self.$newCommentWrapper.hasClass('addingComment'))
return;self.$newCommentCaptchaContainer.removeClass('error');self.$newCommentInput.val('');self.$newCommentWrapper.removeClass('filledIn').addClass('addingComment');params.comment=newComment;if(self.options.comments.requireAuthorInfo){params.name=authorName;params.email=authorEmail;}
if(captcha)
params.captcha=captcha;self.addingAjaxRequest=$.ajax({data:params,dataType:'json',type:'POST',url:currentItem.comments.backend,timeout:30000,cache:false,error:function(){},success:function(response){if(response.status==undefined)
return;if(response.status=='success'){itemCommentMeta.cache.comments.push({author:response.author.id,content:response.comment,raw:newComment,id:response.id,dateHtml:response.dateHtml});itemCommentMeta.count+=1;if(itemCommentMeta.cache.authors[response.author.id]==undefined)
itemCommentMeta.cache.authors[response.author.id]={avatar:response.author.avatar,name:response.author.name,url:response.author.url};}else if(response.status=='captcha_error'){self.$newCommentCaptchaContainer.addClass('error');error=true;}},complete:function(){self.addingAjaxRequest=undefined;if(!itemCommentMeta.state.open||activeItemIndex!=self.currentItemIndex)
return;if(anonComment){self.$anonymCommentWrapper.removeClass('addingAnonComment');self.$anonymCommentPost.text(_.call(self,'Post'));}
self.$newCommentWrapper.removeClass('addingComment');if(error)
return;if(anonComment){self.$commentsModal.removeClass('showAnonymWindow');self.$newCommentCaptchaContainer.removeClass('error');}
updateCommentsUi.call(self);}});};self.$anonymCommentPost.on('click',function(){var authorName=self.$anonymCommenterNameInput.val(),authorEmail=self.$anonymCommenterEmailInput.val(),comment=self.$anonymCommentInput.val(),hasErrors=false,captcha=undefined;self.$anonymCommenterNameInput.attr('placeholder',_.call(self,'Name'));self.$anonymCommenterEmailInput.attr('placeholder',_.call(self,'Email'));self.$anonymCommentInput.attr('placeholder',_.call(self,'Write a comment'));self.$anonymCommenterNameInput.parent().removeClass('error');self.$anonymCommenterEmailInput.parent().removeClass('error');self.$anonymCommentInput.parent().removeClass('error');if(!authorName){self.$anonymCommenterNameInput.attr('placeholder',_.call(self,'Please specify your name')).parent().addClass('error');hasErrors=true;}
if(!authorEmail||!emailVerification.test(authorEmail)){self.$anonymCommenterEmailInput.attr('placeholder',_.call(self,'Please specify your email')).parent().addClass('error');hasErrors=true;}
if(!comment){self.$anonymCommentInput.attr('placeholder',_.call(self,'Please write a comment')).parent().addClass('error');hasErrors=true;}
if(self.options.comments.useReCaptcha){captcha=grecaptcha.getResponse(reCaptchaId);if(captcha.length==0){self.$newCommentCaptchaContainer.addClass('error');hasErrors=true;}}
if(hasErrors){return;}
self.$anonymCommentWrapper.addClass('addingAnonComment');self.$anonymCommentPost.text(_.call(self,'Commenting'));submitComment({},authorName,authorEmail,comment,captcha,true);});self.$newCommentButton.on('click',submitComment);}
if(self.options.like.permissions.liking){self.$root.append('0 ');self.$likeTrigger=$('> .actions.likeTrigger',self.$root);self.$mainLikeCount=$('> span',self.$likeTrigger);self.$likeTrigger.on('click',function(){if(self.$root.hasClass('initializing'))
return;var activeItemIndex=self.currentItemIndex,currentItem=self.items[activeItemIndex],liked=!currentItem.likes.likedByUser,params={portalId:self.options.portalId,moduleId:self.options.moduleId,mediaId:currentItem.id};currentItem.likes.likedByUser=liked;if(liked)
currentItem.likes.numOfLikes+=1;else
if(currentItem.likes.numOfLikes>0)
currentItem.likes.numOfLikes-=1;self.$mainLikeCount.text(currentItem.likes.numOfLikes);self.$likeTrigger.toggleClass('liked',liked);if(typeof currentItem.journalId=='number'){params.action='like';params.journalid=currentItem.journalId;params.liked=liked;}else{params.action='media_like';params.vote=liked?1:-1;}
$.ajax({data:params,dataType:'json',type:'POST',url:self.options.websiteRoot+'DesktopModules/EasyDNNGallery/Services/SocialMediaBox.ashx',timeout:10000,cache:false,error:function(){},success:function(){},complete:function(){}});});}
self.$root.appendTo(self.$body);self.main={horizontalSpace:0,verticalSpace:0};$.each(self.items,function(itemIndex){var $itemDiv=$('
');$itemDiv.addClass('loading item_'+itemIndex).data('itemIndex',itemIndex);if(this.type=='image'){$itemDiv.addClass('imageItem');}else if(this.type=='video'){$itemDiv.addClass('videoItem');}else if(this.type=='audio'){$itemDiv.addClass('audioItem');}
$itemDiv.appendTo(self.$contentWrapper)});size.call(self);self.$root.addClass('show');setTimeout(function(){showItem.call(self);},200);var hammerTime=new Hammer($('> .mobileOverlay',self.$root)[0]);self.skipGestures=false;var tapTimeout;hammerTime.on('swipeleft swiperight panleft panright panend tap',function(event){var currentItemOffset=-(self.currentItemIndex*self.overlayWidth),deltaX=event.deltaX;if(event.type=='tap'){clearTimeout(tapTimeout);if(self.$root.hasClass('hideControls')){self.$root.removeClass('hideControls fadeOutControls');}else{self.$root.addClass('fadeOutControls');tapTimeout=setTimeout(function(){self.$root.addClass('hideControls');},500);}
return;}
if(self.skipGestures||!self.initialItemLoaded)
return;if((event.type=='swipeleft'||event.type=='swiperight')&&items.length>1){if(event.type=='swipeleft')
if(self.currentItemIndex=0||self.currentItemIndex==self.items.length-1&&deltaX<0||Math.abs(deltaX)0){newX=self.overlayWidth;indexModifier=-1;}
newX=currentItemOffset+newX;self.$contentWrapper.addClass(positionAnimationClass).removeClass(swipeAnimationClass).css({transform:'translate3d('+newX+'px, 0, 0)'});setTimeout(function(){self.skipGestures=false;self.currentItemIndex+=indexModifier;showItem.call(self);},550);return;}
if(self.currentItemIndex==0&&deltaX>=0||self.currentItemIndex==self.items.length-1&&deltaX<0){deltaX=1-Math.abs(deltaX)/self.overlayWidth;if(deltaX<.5){deltaX=Math.round(self.overlayWidth/4);if(event.deltaX<1)
deltaX=-deltaX;}else
deltaX=Math.round(deltaX*event.deltaX);}
self.$contentWrapper.removeClass(positionAnimationClass).removeClass(swipeAnimationClass).css({transform:'translate3d('+(currentItemOffset+deltaX)+'px, 0, 0)'});});postInit.call(self);return self;}
Mobile.prototype={center:function(){var self=this,commentListHeight=0;if(self.options.comments.permissions.show){commentListHeight=$('>',self.$commentsModal).height()-self.$commentsTopBar.outerHeight(true)-self.$newCommentWrapper.outerHeight(true);if(commentListHeight<0)
commentListHeight=0;self.$commentList.css('height',commentListHeight);};self.$contentWrapper.removeClass(positionAnimationClass).removeClass(swipeAnimationClass).css({width:self.items.length*self.overlayWidth,transform:'translate3d(-'+self.currentItemIndex*self.overlayWidth+'px, 0, 0)'});$('>',self.$contentWrapper).width(self.overlayWidth).each(function(){var $itemContainer=$(this),itemIndex=$itemContainer.data('itemIndex'),item=self.items[itemIndex];if($itemContainer.hasClass('loading')||(item.type!='image'&&itemIndex!=self.currentItemIndex))
return;if(item.type=='image'){var imageStats=self.images[item.src].stats;$('> img',$itemContainer).css(getItemDimensions.call(self,imageStats.width,imageStats.height,false));}else if(item.type=='video'){$('> div',$itemContainer).css(getItemDimensions.call(self,item.width,item.height,true));}else if(item.type=='audio'){$('> div',$itemContainer).css(getItemDimensions.call(self,460,36,false,true));}});},showItem:function(){var self=this,$currentDomItem=$('> div.item_'+self.currentItemIndex,self.$contentWrapper),thisItemIndex=self.currentItemIndex,currentItem=self.items[thisItemIndex],preloadNeighbours=function(){if(thisItemIndex>0)
preloadImage.call(self,validItemIndex.call(self,thisItemIndex-1));if(thisItemIndex-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;af?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance head');$(function(){$('body').on('click','.eds_openModal',function(){var $clicked=$(this),$modalTarget=$('.eds_modalWrapper').filter(function(){return $clicked.data('targetId')==this.id||$(this).hasClass($clicked.data('targetClass'));}),$dnnModuleElements=$modalTarget.parents('.DnnModule'),$modalContent,$modalResizeWrapper,$modalContentTitle,initialHeight,resizeContent=function(){var windowHeight=$window.height(),ContentHDiff=Math.round($modalContent.outerHeight(true)-$modalContent.height()),resizeWrapperHDiff=Math.round($modalResizeWrapper.outerHeight(true)-$modalResizeWrapper.height()),titleHeight=$modalContentTitle.outerHeight(true),maxHeight=windowHeight-ContentHDiff-resizeWrapperHDiff-titleHeight;if(maxHeight .eds_modalContent",$modalTarget).addClass("eds_fadeInDown");if($modalTarget.hasClass('eds_resizable')){$modalContent=$('>',$modalTarget);$modalContentTitle=$('> h3',$modalContent);$modalResizeWrapper=$('> div',$modalContent);initialHeight=$modalResizeWrapper.height();resizeContent()
$window.on('resize.eds_modalWrapper',function(){resizeContent();});}}).on('click','.eds_modalClose',function(){var $clicked=$(this),$modalTarget=$('.eds_modalWrapper'),$dnnModuleElements=$modalTarget.parents('.DnnModule');$dnnModuleElements.each(function(){var $this=$(this);$this.css('z-index',$this.data('previousZIndex'));});$modalTarget.filter(function(){return $clicked.data('targetId')==this.id||$(this).hasClass($clicked.data('targetClass'));}).removeClass("eds_modalVisible").css('z-index','');});});}
var initOptions=null;if($('#eds_js1_1').length>0){initOptions=$('#eds_js1_1').data('initJson')}
if($('meta[name="eds__GmapsInitData"]').length>0){initOptions=JSON.parse($('meta[name="eds__GmapsInitData"]').attr("content"));}
if(window[initOptions.instanceGlobal]==undefined&&initOptions!=null)
window[initOptions.instanceGlobal]=new EasyDnnSolutions1_1(initOptions);})(eds3_5_jq);
;;;
'+'
'+_.call(self,'No comments yet')+'
'+''+_.call(self,'Add a comment')+'
'+''+''+''+ (self.options.comments.requireAuthorInfo&&self.options.comments.useReCaptcha?''+_.call(self,'Please solve the test correctly.')+'
'+_.call(self,'Loading comments')+'
'+'