function Concepts2Go_Bounds(n,t,i,r){this.x=n;this.y=t;this.width=i;this.height=r}function Concepts2Go_System(){this.InternetExplorer={};this.Firefox={};this.Safari={};this.Opera={};this.scrollHandling=!1;this.resizeHandling=!1;this.agent=null;this.hasDebuggerStatement=!1;this.name=navigator.appName;this.version=parseFloat(navigator.appVersion);navigator.userAgent.indexOf(" MSIE ")>-1?(this.agent=this.InternetExplorer,this.version=navigator.userAgent.match(/MSIE (\d+\.\d+)/)==null?-1:parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]),this.hasDebuggerStatement=!0):navigator.userAgent.indexOf(" Firefox/")>-1?(this.agent=this.Firefox,this.version=navigator.userAgent.match(/ Firefox\/(\d+\.\d+)/)==null?-1:parseFloat(navigator.userAgent.match(/ Firefox\/(\d+\.\d+)/)[1]),this.name="Firefox",this.hasDebuggerStatement=!0):navigator.userAgent.indexOf(" Safari/")>-1?(this.agent=this.Safari,this.version=navigator.userAgent.match(/ Safari\/(\d+\.\d+)/)==null?-1:parseFloat(navigator.userAgent.match(/ Safari\/(\d+\.\d+)/)[1]),this.name="Safari"):navigator.userAgent.indexOf("Opera/")>-1&&(this.agent=this.Opera);this.Cookies.init()}function getDXFormControlItem(n,t){if(typeof ASPxClientControl.GetControlCollection()=="undefined"||typeof ASPxClientControl.GetControlCollection().ForEachControl=="undefined")return null;var i=null,r=null,u=null;return ASPxClientControl.GetControlCollection().ForEachControl(function(f){typeof f.cpForm!="undefined"&&f.cpForm===n&&typeof f.cpField!="undefined"&&f.cpField===t&&(typeof f.cpControl!="undefined"&&f.cpControl===!0?r=f:typeof f.cpLabel!="undefined"&&f.cpLabel===!0?i=f:typeof f.cpComment!="undefined"&&f.cpComment===!0&&(u=f))},null),{label:i,control:r,comment:u}}function getDXFormControlItems(n){if(typeof ASPxClientControl.GetControlCollection()=="undefined"||typeof ASPxClientControl.GetControlCollection().ForEachControl=="undefined")return null;var t=[];return ASPxClientControl.GetControlCollection().ForEachControl(function(i){var r,f,u;if(typeof i.cpForm!="undefined"&&i.cpForm===n){for(r={field:null,profileProperty:null,control:null,label:null,comment:null,type:null,isrequired:null,image:null},f=!1,u=0;u<t.length;u++)if(t[u].field===i.cpField){r=t[u];f=!0;break}r.field=i.cpField;r.profileProperty=i.cpProfileProperty;typeof i.cpControl!="undefined"&&i.cpControl===!0?(r.control=i,r.isrequired=i.cpControlIsRequired,r.image=i.cpControlImage):typeof i.cpLabel!="undefined"&&i.cpLabel===!0?r.label=i:typeof i.cpComment!="undefined"&&i.cpComment===!0&&(r.comment=i);f||t.push(r)}},null),t}function isDXFormControlItemValid(n,t){return typeof ASPxClientControl.GetControlCollection()=="undefined"||typeof ASPxClientControl.GetControlCollection().ForEachControl=="undefined"?!0:(ASPxClientControl.GetControlCollection().ForEachControl(function(i){if(typeof i.cpForm!="undefined"&&i.cpForm===n&&typeof i.cpField!="undefined"&&i.cpField===t&&typeof i.cpControl!="undefined"&&i.cpControl===!0)return i.isValid},null),!0)}function isDXformItemValid(n,t,i){for(var f=!0,u=getDXFormControlItems(n),r=0;r<u.length;r++)if(u[r].field==t){u[r].isrequired&&u[r].control!=null&&(i&&u[r].image!=undefined?(u[r].control.GetEnabled()&&u[r].image.SetVisible(u[r].control.GetText()==""&&u[r].control.GetVisible()),f=u[r].control.GetEnabled()?!u[r].image.GetVisible():!0):u[r].control.isValid!=undefined?f=u[r].control.isValid:u[r].control.GetChecked!=undefined?f=u[r].control.GetEnabled()?u[r].control.GetChecked():!0:u[r].control.GetText!=undefined?f=u[r].control.GetEnabled()?u[r].control.GetText()!="":!0:u[r].control.GetValue!=undefined&&(f=u[r].control.GetEnabled()?u[r].control.GetValue()!=null:!0));break}return f}function setDXformItemValue(n,t,i,r){for(var e,f=getDXFormControlItems(n),u=0;u<f.length;u++)if(f[u].profileProperty!=null&&f[u].profileProperty==i||f[u].field!=null&&f[u].field==t){f[u].control!=null&&f[u].control.GetEnabled()&&(f[u].control.SetChecked!=undefined?f[u].control.SetChecked(r):f[u].control.SetDate!=undefined?f[u].control.SetDate(new Date(r)):f[u].control.DropDown!=undefined&&f[u].control.FindItemByValue!=undefined?(e=f[u].control.FindItemByValue(r),e!=undefined&&(f[u].control.SetText(e.text),f[u].control.listBox.SetSelectedIndexInternal(e.index),f[u].control.SetValue(r))):f[u].control.SetValue!=undefined&&f[u].control.SetValue(r),f[u].control.ValueChanged!=undefined&&f[u].control.ValueChanged.FireEvent(f[u].control,null));break}}function updateC2GStorage(n){for(var r,e,f,o,i=getDXFormControlItems(n),u=JSON.parse(sessionStorage.getItem("c2gFormData"))||[],t=0;t<i.length;t++){for(r={},r.fieldname=i[t].field,r.profileProperty=i[t].profileProperty,i[t].control!=null&&i[t].control.GetEnabled()&&(i[t].control.GetChecked!=undefined?r.value=i[t].control.GetChecked():i[t].control.GetDate!=undefined?r.value=i[t].control.GetDate():i[t].control.DropDown!=undefined&&i[t].control.GetValue!=undefined?r.value=i[t].control.GetValue():i[t].control.GetText!=undefined?r.value=i[t].control.GetText():i[t].control.GetValue!=undefined&&(r.value=i[t].control.GetValue())),e=!1,f=0;f<u.length;f++)if(u[f].fieldname==r.fieldname){u[f]=r;e=!0;break}e||u.push(r)}o=JSON.stringify(u);sessionStorage.setItem("c2gFormData",o);updateProfileFromDXForm(o)}function setDXFormValues(n){var t=JSON.parse(sessionStorage.getItem("c2gFormData"))||[];$.each(t,function(t,i){setDXformItemValue(n,i.fieldname,i.profileProperty,i.value)})}function updateDXFormFromProfile(n){var i=sessionStorage.getItem("c2gFormData"),t=JSON.parse(i)||[];$.ajax({cache:"false",type:"POST",url:"/GetCurrentProfileData.json",contentType:"application/json",data:i,success:function(i){for(var f,e,r,u=0;u<i.formData.length;u++){for(f=i.formData[u],e=!1,r=0;r<t.length;r++)if(t[r].fieldname==f.fieldname){t[r]=f;e=!0;break}e||t.push(f)}sessionStorage.setItem("c2gFormData",JSON.stringify(t));setTimeout(function(){setDXFormValues(n)},100)},error:function(t){console.log(t);setTimeout(function(){setDXFormValues(n)},100)},dataType:"json"})}function updateProfileFromDXForm(n){$.ajax({cache:"false",type:"POST",url:"/SetCurrentProfileData.json",contentType:"application/json",data:n,success:function(){},error:function(n){console.log(n)},dataType:"json"})}function Init_AutoSearch(n){Concepts2Go.Cms.AutoSearch.ext_Init_AutoSearch(n.GetInputElement(),n)}function Init_KOAutoSearch(n,t,i){Concepts2Go.Cms.AutoSearch.ext_Init_AutoSearch(n,undefined,t,i)}function CMSAddLoader(n,t,i,r,u){var f=jQuery('<img src="{0}"class="{1}" style="display:none;" title="{2}" alt="{2}" />'.format(i,u,r));jQuery(window[t].inputElement).parent().prepend(f);CMSLoaderlist[t]=f}function CMSShowLoader(n){jQuery(CMSLoaderlist[n]).css("display","")}function CMSHideLoader(n){jQuery(CMSLoaderlist[n]).css("display","none")}function CmsAutoComplete_Init(n,t){__CmsAutoComplete(n,t,"contains")}function CmsAutoCompleteStartsWith_Init(n,t){__CmsAutoComplete(n,t,"startswith")}function __CmsAutoComplete(n,t,i){if(typeof jQuery(n.GetInputElement()).autocomplete=="function"){jQuery(n.GetMainElement()).parent().addClass("autoComplete");var u=jQuery(n.GetInputElement()).autocomplete({dxctrl:n,position:{my:"left top",at:"left bottom",of:n.GetMainElement()},appendTo:jQuery(n.GetMainElement()).parent(),source:function(t,r){$.ajax({url:i=="startswith"?"/CmsAutoCompleteStartsWith.json":"/CmsAutoComplete.json",dataType:"json",data:{term:t.term,d:n.cpD,l:n.cpL},success:function(n){r($.map(n,function(n){return{label:__CmsAutoCompleteHighlight(n.value,t.term),value:n.value}}))}})},select:function(n,t){var i=jQuery(this).autocomplete("option").dxctrl;typeof i!="undefined"&&t.item!==null&&(i.nullText===""||this.value!=i.nullText)&&i.SetValue(t.item.value)},change:function(n,t){var i=jQuery(this).autocomplete("option").dxctrl;typeof i!="undefined"&&t.item===null&&(i.nullText===""||this.value!=i.nullText)&&i.SetValue(this.value)},open:function(){jQuery(this).removeClass("wait")},search:function(){jQuery(this).addClass("wait")},minLength:2}),r=u.data("autocomplete");r==undefined&&(r=u.data("ui-autocomplete"));r&&(parseFloat(jQuery.ui.version)>=1.9?r._renderItemData=CMSAutoComplete_CustomRenderItem:r._renderItem=CMSAutoComplete_CustomRenderItem)}}function __CmsAutoCompleteHighlight(n,t){var i=new RegExp("("+$.ui.autocomplete.escapeRegex(t)+")","ig");return n.replace(i,"<strong>$1<\/strong>")}var Concepts2Go_Sys,MD5,CMSLoaderlist,Concepts2Go;Concepts2Go_System.prototype.createNewDiv=function(n,t){return newDiv=document.createElement("div"),newDiv.id=n,t&&(newDiv.className=t),newDiv};Concepts2Go_System.prototype.getClientBounds=function(){var n,t;switch(this.agent){case this.InternetExplorer:n=this.version==7?document.body.clientWidth:document.documentElement.clientWidth;t=this.version==7?document.body.clientHeight:document.documentElement.clientHeight;break;case this.Safari:n=window.innerWidth;t=window.innerHeight;break;case this.Opera:n=Math.min(window.innerWidth,document.body.clientWidth);t=Math.min(window.innerHeight,document.body.clientHeight);break;default:n=Math.min(window.innerWidth,document.documentElement.clientWidth);t=Math.min(window.innerHeight,document.documentElement.clientHeight)}return new Concepts2Go_Bounds(0,0,n,t)};Concepts2Go_System.prototype.getBounds=function(){var i,r,n,t;return window.innerHeight&&window.scrollMaxY?(i=document.body.scrollWidth,r=window.innerHeight+window.scrollMaxY):document.body.scrollHeight>document.body.offsetHeight?(i=document.body.scrollWidth,r=document.body.scrollHeight):(i=document.body.offsetWidth,r=document.body.offsetHeight),self.innerHeight?(n=self.innerWidth,t=self.innerHeight):document.documentElement&&document.documentElement.clientHeight?(n=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(n=document.body.clientWidth,t=document.body.clientHeight),pageHeight=r<t?t:r,pageWidth=i<n?n:i,new Concepts2Go_Bounds(pageWidth,pageHeight,n,t)};Concepts2Go_System.prototype.addEvent=function(n,t,i,r){if(n.addEventListener)return n.addEventListener(t,i,r),!0;if(n.attachEvent)return n.attachEvent("on"+t,i);alert("Handler could not be attached")};Concepts2Go_System.prototype.removeEvent=function(n,t,i,r){if(n.removeEventListener)return n.removeEventListener(t,i,r),!0;if(n.detachEvent)return n.detachEvent("on"+t,i);alert("Handler could not be removed")};Concepts2Go_System.prototype.URLEncode=function(n){var r="",t=0,f,i,e,u;for(n=n.toString(),f=/(^[a-zA-Z0-9_.]*)/;t<n.length;)i=f.exec(n.substr(t)),i!=null&&i.length>1&&i[1]!=""?(r+=i[1],t+=i[1].length):(n[t]==" "?r+="+":(e=n.charCodeAt(t),u=e.toString(16),r+="%"+(u.length<2?"0":"")+u.toUpperCase()),t++);return r};Concepts2Go_System.prototype.URLDecode=function(n){for(var t=n,i,r;(match=/(%[^%]{2})/.exec(t))!=null&&match.length>1&&match[1]!="";)i=parseInt(match[1].substr(1),16),r=String.fromCharCode(i),t=t.replace(match[1],r);return t};Concepts2Go_System.prototype.addQueryToUrl=function(n,t,i){var r="&";return n.indexOf("?")==-1&&(r="?"),n+r+Concepts2Go_Sys.URLEncode(t)+"="+Concepts2Go_Sys.URLEncode(i)};Concepts2Go_System.prototype.highlight=function(){var e="highlightUrl",o="highlightImg",u,s,f,t,n,i,r;if(Concepts2Go_Sys.QueryString[e]||Concepts2Go_Sys.QueryString[o])if(u="",s=document.body.innerHTML,highlightStartTag="<span style='border: 2px solid #FF0000;' class='highlight'>",highlightEndTag="<\/span>",Concepts2Go_Sys.QueryString[e]){for(t=Concepts2Go_Sys.URLDecode(Concepts2Go_Sys.QueryString[e]).split("\\n"),n=0;n<t.length;n++)if(t[n]!=""&&t[n]!=null){if(u=Concepts2Go_Sys.EscapeRegex(t[n]),f=new RegExp("(<a[^>]*href=[\"'][^\"']*"+u+"[\"'][^>]*>[^<]*<\/a>)","gi"),document.domain.indexOf("dev.Concepts2Go.local")!=-1&&Concepts2Go_Sys.QueryString.debug!=null)if(alert("Searching for: "+u),i=f.exec(document.body.innerHTML),i==null)alert("No match");else{for(r="Match at position "+i.index+":\n",q=0;q<i.length;q++)r=r+i[q]+"\n";alert(r)}document.body.innerHTML=document.body.innerHTML.replace(f,highlightStartTag+"$1"+highlightEndTag)}Concepts2Go_Sys.Cookies.erase(e)}else if(Concepts2Go_Sys.QueryString[o]){for(t=Concepts2Go_Sys.URLDecode(Concepts2Go_Sys.QueryString[o]).split("\\n"),n=0;n<t.length;n++)if(t[n]!=""&&t[n]!=null){if(u=Concepts2Go_Sys.EscapeRegex(t[n]),f=new RegExp("(<img[^>]*src=[\"'][^\"']*"+u+"[\"'][^>]*>(<\/img>)?)","gi"),document.domain.indexOf("dev.Concepts2Go.local")!=-1&&Concepts2Go_Sys.QueryString.debug!=null)if(alert("Searching for: "+u),i=f.exec(document.body.innerHTML),i==null)alert("No match");else{for(r="Match at position "+i.index+":\n",q=0;q<i.length;q++)r=r+i[q]+"\n";alert(r)}document.body.innerHTML=document.body.innerHTML.replace(f,highlightStartTag+"$1"+highlightEndTag)}Concepts2Go_Sys.Cookies.erase(o)}};Concepts2Go_System.prototype.EscapeRegex=function(n){return n=n.replace(/\?/g,"\\?"),n=n.replace(/\+/g,"%20"),n=n.replace(/\./g,"\\."),n=n.replace(/\,/g,"\\,"),n=n.replace(/\(/g,Concepts2Go_Sys.agent==Concepts2Go_Sys.Firefox?"%28":"\\("),n=n.replace(/\)/g,Concepts2Go_Sys.agent==Concepts2Go_Sys.Firefox?"%29":"\\)"),n=n.replace(/\[/g,"\\["),n=n.replace(/\]/g,"\\]"),n=n.replace(/\{/g,"\\{"),n=n.replace(/\}/g,"\\}"),n=n.replace(/\&/g,"\\&"),n=n.replace(/ /g,"%20"),n.replace(/\*/g,"\\*")};Concepts2Go_System.prototype.Cookies={init:function(){for(var t,i=document.cookie.split("; "),n=0;n<i.length;n++)t=i[n].split("="),this[t[0]]=t[1]},create:function(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/";this[n]=t},erase:function(n){this.create(n,"",-1);this[n]=undefined}};Concepts2Go_System.prototype.QueryString={init:function(){this.name="QueryStringObject";window.location.search.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(n,t,i,r){Concepts2Go_Sys.QueryString[t]=r})}};Concepts2Go_Sys=new Concepts2Go_System;Concepts2Go_Sys.QueryString.init();MD5=function(n){function a(n,t){return n<<t|n>>>32-t}function o(n,t){var f,e,r,u,i;return(r=n&2147483648,u=t&2147483648,f=n&1073741824,e=t&1073741824,i=(n&1073741823)+(t&1073741823),f&e)?i^2147483648^r^u:f|e?i&1073741824?i^3221225472^r^u:i^1073741824^r^u:i^r^u}function yt(n,t,i){return n&t|~n&i}function pt(n,t,i){return n&i|t&~i}function wt(n,t,i){return n^t^i}function bt(n,t,i){return t^(n|~i)}function s(n,t,i,r,u,f,e){return n=o(n,o(o(yt(t,i,r),u),e)),o(a(n,f),t)}function h(n,t,i,r,u,f,e){return n=o(n,o(o(pt(t,i,r),u),e)),o(a(n,f),t)}function c(n,t,i,r,u,f,e){return n=o(n,o(o(wt(t,i,r),u),e)),o(a(n,f),t)}function l(n,t,i,r,u,f,e){return n=o(n,o(o(bt(t,i,r),u),e)),o(a(n,f),t)}function kt(n){for(var r,u=n.length,o=u+8,s=(o-o%64)/64,e=(s+1)*16,i=Array(e-1),f=0,t=0;t<u;)r=(t-t%4)/4,f=t%4*8,i[r]=i[r]|n.charCodeAt(t)<<f,t++;return r=(t-t%4)/4,f=t%4*8,i[r]=i[r]|128<<f,i[e-2]=u<<3,i[e-1]=u>>>29,i}function v(n){for(var i="",r="",u,t=0;t<=3;t++)u=n>>>t*8&255,r="0"+u.toString(16),i=i+r.substr(r.length-2,2);return i}function dt(n){var i,r,t;for(n=n.replace(/\r\n/g,"\n"),i="",r=0;r<n.length;r++)t=n.charCodeAt(r),t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128));return i}var e=Array(),f,ht,ct,lt,at,t,i,r,u,y=7,p=12,w=17,b=22,k=5,d=9,g=14,nt=20,tt=4,it=11,rt=16,ut=23,ft=6,et=10,ot=15,st=21,vt;for(n=dt(n),e=kt(n),t=1732584193,i=4023233417,r=2562383102,u=271733878,f=0;f<e.length;f+=16)ht=t,ct=i,lt=r,at=u,t=s(t,i,r,u,e[f+0],y,3614090360),u=s(u,t,i,r,e[f+1],p,3905402710),r=s(r,u,t,i,e[f+2],w,606105819),i=s(i,r,u,t,e[f+3],b,3250441966),t=s(t,i,r,u,e[f+4],y,4118548399),u=s(u,t,i,r,e[f+5],p,1200080426),r=s(r,u,t,i,e[f+6],w,2821735955),i=s(i,r,u,t,e[f+7],b,4249261313),t=s(t,i,r,u,e[f+8],y,1770035416),u=s(u,t,i,r,e[f+9],p,2336552879),r=s(r,u,t,i,e[f+10],w,4294925233),i=s(i,r,u,t,e[f+11],b,2304563134),t=s(t,i,r,u,e[f+12],y,1804603682),u=s(u,t,i,r,e[f+13],p,4254626195),r=s(r,u,t,i,e[f+14],w,2792965006),i=s(i,r,u,t,e[f+15],b,1236535329),t=h(t,i,r,u,e[f+1],k,4129170786),u=h(u,t,i,r,e[f+6],d,3225465664),r=h(r,u,t,i,e[f+11],g,643717713),i=h(i,r,u,t,e[f+0],nt,3921069994),t=h(t,i,r,u,e[f+5],k,3593408605),u=h(u,t,i,r,e[f+10],d,38016083),r=h(r,u,t,i,e[f+15],g,3634488961),i=h(i,r,u,t,e[f+4],nt,3889429448),t=h(t,i,r,u,e[f+9],k,568446438),u=h(u,t,i,r,e[f+14],d,3275163606),r=h(r,u,t,i,e[f+3],g,4107603335),i=h(i,r,u,t,e[f+8],nt,1163531501),t=h(t,i,r,u,e[f+13],k,2850285829),u=h(u,t,i,r,e[f+2],d,4243563512),r=h(r,u,t,i,e[f+7],g,1735328473),i=h(i,r,u,t,e[f+12],nt,2368359562),t=c(t,i,r,u,e[f+5],tt,4294588738),u=c(u,t,i,r,e[f+8],it,2272392833),r=c(r,u,t,i,e[f+11],rt,1839030562),i=c(i,r,u,t,e[f+14],ut,4259657740),t=c(t,i,r,u,e[f+1],tt,2763975236),u=c(u,t,i,r,e[f+4],it,1272893353),r=c(r,u,t,i,e[f+7],rt,4139469664),i=c(i,r,u,t,e[f+10],ut,3200236656),t=c(t,i,r,u,e[f+13],tt,681279174),u=c(u,t,i,r,e[f+0],it,3936430074),r=c(r,u,t,i,e[f+3],rt,3572445317),i=c(i,r,u,t,e[f+6],ut,76029189),t=c(t,i,r,u,e[f+9],tt,3654602809),u=c(u,t,i,r,e[f+12],it,3873151461),r=c(r,u,t,i,e[f+15],rt,530742520),i=c(i,r,u,t,e[f+2],ut,3299628645),t=l(t,i,r,u,e[f+0],ft,4096336452),u=l(u,t,i,r,e[f+7],et,1126891415),r=l(r,u,t,i,e[f+14],ot,2878612391),i=l(i,r,u,t,e[f+5],st,4237533241),t=l(t,i,r,u,e[f+12],ft,1700485571),u=l(u,t,i,r,e[f+3],et,2399980690),r=l(r,u,t,i,e[f+10],ot,4293915773),i=l(i,r,u,t,e[f+1],st,2240044497),t=l(t,i,r,u,e[f+8],ft,1873313359),u=l(u,t,i,r,e[f+15],et,4264355552),r=l(r,u,t,i,e[f+6],ot,2734768916),i=l(i,r,u,t,e[f+13],st,1309151649),t=l(t,i,r,u,e[f+4],ft,4149444226),u=l(u,t,i,r,e[f+11],et,3174756917),r=l(r,u,t,i,e[f+2],ot,718787259),i=l(i,r,u,t,e[f+9],st,3951481745),t=o(t,ht),i=o(i,ct),r=o(r,lt),u=o(u,at);return vt=v(t)+v(i)+v(r)+v(u),vt.toLowerCase()};Array.prototype.sortBy=function(){var n=window.AutoSearch_GetSiteAutoSearchDatasourceSortOrder(),t=arguments;this.sort(function(i,r){for(var u,e=0,f=0;f<t.length&&e===0;f+=2)u=t[f],e=(u=="Datasource"?n.indexOf(i[u])<n.indexOf(r[u])?-1:n.indexOf(i[u])>n.indexOf(r[u])?1:0:typeof i[u]=="number"?i[u]<r[u]?-1:i[u]>r[u]?1:0:$("<div/>").html(i[u]).text().toUpperCase().localeCompare($("<div/>").html(r[u]).text().toUpperCase()))*(t[f+1]?1:-1);return e})};Concepts2Go=Concepts2Go||{};Concepts2Go.Cms=Concepts2Go.Cms||{};Concepts2Go.Cms.AutoSearch=Concepts2Go.Cms.AutoSearch||{};Concepts2Go.Cms.AutoSearch.ext_Init_AutoSearch=function(n,t,i,r){if(typeof $(n).autocomplete=="function"){$.widget("ui.autocomplete",$.ui.autocomplete,{_create:function(){this._super();this.widget().menu("option","items","> :not(.ui-autocomplete-category)")},_renderMenu:AutoSearch_CustomRenderMenu,_renderItemData:AutoSearch_CustomRenderItem});t!=undefined?$(t.GetMainElement()).parent().addClass("autoComplete"):$(n).parent().addClass("autoComplete");var u=$(n).autocomplete({dxctrl:t,funcSelect:i,funcChanged:r,position:{my:"left top",at:"left bottom",of:n},appendTo:t!=undefined?$(t.GetMainElement()).parent():$(n).parent(),messages:{noResults:AutoSearch_CustomMessageNoResults,results:AutoSearch_CustomMessageResults},source:function(i,r){var u=this.element.attr("id");u!=undefined&&u!=""&&ModalLoadingPanel&&ModalLoadingPanel.Show(u,!0);$.ajax({url:"/extension-AutoSearch.json",dataType:"json",data:{term:i.term,d:t!=undefined?t.cpD:$(n).data("datasourceids"),l:t!=undefined?t.cpL:$(n).data("languageid"),e:t!=undefined?t.cpE:$(n).data("elementid")},success:function(n){var t=$.map(n,function(n){return{Title:$("<div/>").html(n.Title).text(),value:$("<div/>").html(n.Title).text(),label:Concepts2Go.Cms.AutoSearch.ext_AutoSearchHighlight($("<div/>").html(n.FoundContent).text(),i.term),term:i.term,Datasource:n.Datasource,Score:n.Score,Level:n.Level,Data:n.Data}});typeof AutoSearch_CustomSort!="undefined"&&(t=window.AutoSearch_CustomSort(t));r(t);u!=undefined&&u!=""&&ModalLoadingPanel&&ModalLoadingPanel.Hide(u)}})},select:function(n,t){var i=$(this).autocomplete("option").dxctrl,r;return typeof i!="undefined"?t.item!==null&&(i.nullText===""||this.value!=i.nullText)&&i.SetValue(t.item.value):AutoSearch_Select(n,t),r=$(this).autocomplete("option").funcSelect,typeof r=="function"&&r(n,t),!1},change:function(n,t){var i=$(this).autocomplete("option").dxctrl,r;typeof i!="undefined"?t.item===null&&(i.nullText===""||this.value!=i.nullText)&&i.SetValue(this.value):AutoSearch_Changed(n,t);r=$(this).autocomplete("option").funcChanged;typeof r=="function"&&r(n,t)},open:function(){$(this).removeClass("wait")},search:function(){$(this).addClass("wait")},minLength:2})}};Concepts2Go.Cms.AutoSearch.ext_AutoSearchHighlight=function(n,t){var r=r=t.trim().split(" "),i=n.trim().split(" ");return $(r).each(function(n,t){var r=new RegExp("("+$.ui.autocomplete.escapeRegex(t)+")","ig");i=i.map(function(n){return n.toString().replace(r,"<strong>$1<\/strong>")})}),i.join(" ")};typeof AutoSearch_CustomRenderItem=="undefined"&&(window.AutoSearch_CustomRenderItem=function(n,t){var i=$(n).find("li").map(function(){return $(this).text()}).filter(function(){return this==$("<div/>").html(t.label).text()}).length>0;if(!i)return $li=$("<li><\/li>"),parseFloat(jQuery.ui.version)>=1.09?$li.data("ui-autocomplete-item",t):$li.data("item.autocomplete",t),$a=$("<a class='link'><\/a>"),$a.append($("<div/>").html(t.label)[0].innerHTML),t.value=$("<div/>").html(t.label).text().replace(/[^a-zA-Z0-9 ]/g," ").replace(/\s\s+/g," "),$a.appendTo($li),$li.appendTo(n),$li});typeof AutoSearch_CustomRenderMenu=="undefined"&&(window.AutoSearch_CustomRenderMenu=function(n,t){var f=this,r=[],e=[],u,i;$.each(t,function(n,t){e.indexOf(t.Title.trim())==-1&&(e.push(t.Title.trim()),r.push(t))});u=0;i="";$.each(r,function(n,t){(i==""||i!=t.Datasource)&&(i=t.Datasource,u++)});i="";$.each(r,function(t,r){u>1&&(i==""||i!=r.Datasource)&&(i=r.Datasource,n.append("<li class='ui-autocomplete-category ui-autocomplete-datasource'>"+r.Data.type+"<\/li>"));var e=AutoSearch_GetLevelTitle(r.LanguageID,r.Level);e!=""&&n.append("<li class='ui-autocomplete-category ui-autocomplete-level'>"+e+"<\/li>");parseFloat(jQuery.ui.version)>=1.09?f._renderItemData(n,r):f._renderItem(n,r)});AutoSearch_ResetLevelTitle();$(n).find("li:odd").addClass("odd")});typeof AutoSearch_CustomMessageNoResults=="undefined"&&(window.AutoSearch_CustomMessageNoResults=function(){});typeof AutoSearch_CustomMessageResults=="undefined"&&(window.AutoSearch_CustomMessageResults=function(){});typeof AutoSearch_Select=="undefined"&&(window.AutoSearch_Select=function(n,t){t.item&&(this.value=t.item.value)});typeof AutoSearch_GetSiteAutoSearchDatasourceSortOrder=="undefined"&&(window.AutoSearch_GetSiteAutoSearchDatasourceSortOrder=function(){return[]});typeof AutoSearch_GetLevelTitle=="undefined"&&(window.AutoSearch_GetLevelTitle=function(){return""});typeof AutoSearch_ResetLevelTitle=="undefined"&&(window.AutoSearch_ResetLevelTitle=function(){});typeof AutoSearch_Changed=="undefined"&&(window.AutoSearch_Changed=function(n,t){t.item&&(this.value=t.item.value)}),function(n,t,i,r){"use strict";t.trim=function(n){return n.replace(/^[\s]+/,"").replace(/[\s]+$/,"")};t.GAUpdateClickEvents=function(){n.each(n.find('*[ga-event],[ga-click],a[target!="_blank"][ga-event],a[target!="_blank"][ga-click]'),function(){var t=n(this).attr("ga-clickevent"),i,u;(t===r||t!=="ignore"&&t!=="checked")&&(i=n(this).attr("ga-event"),i!==r?setGAEventClick(n(this),i):(u=n(this).attr("ga-click"),setGAEventClick(n(this),u,!0)),n(this).attr("ga-clickevent","checked"))});typeof ASPx!="undefined"&&ASPx.GetControlCollection().ForEachControl(function(u){var c,e,s,h,o;if(u.EndCallback&&u.EndCallback.handlerInfoList.length>0&&(c=n(u).attr("ga-UpdateEndCallback"),c===r&&(n(u).attr("ga-UpdateEndCallback","added"),u.EndCallback.handlerInfoList.push(ASPxClientEvent.CreateHandlerInfo(function(){n(t).on("load",function(){GAUpdateClickEvents()})},null)))),u.Click&&(e=n(i.getElementById(u.name)).attr("ga-clickevent"),e===r||e!=="ignore"&&e!=="checked")){if(s=n(i.getElementById(u.name)).attr("ga-event"),s!==r)setGAEventClick(n(i.getElementById(u.name)),s);else{var l="Links",a="Click",f="";this.innerText&&i.getElementById(u.name)!==r&&i.getElementById(u.name)!==null&&(f=trim(i.getElementById(u.name).innerText));this.textContent&&i.getElementById(u.name)!==r&&i.getElementById(u.name)!==null&&(f=i.getElementById(u.name).textContent.trim());f===""&&i.getElementById(u.name)!==r&&i.getElementById(u.name)!==null&&(f=n(i.getElementById(u.name).firstChild).attr("alt")===r?"no text":n(i.getElementById(u.name).firstChild).attr("alt"));f===""&&(f="no text");h=n(i.getElementById(u.name)).attr("ga-click");h!==r&&(o=h.split("|"),l=o[0],a=o[1],f=o[2],n(i.getElementById(u.name)).removeAttr("ga-click"));u.Click.handlerInfoList.push(ASPxClientEvent.CreateHandlerInfo(function(){ASPxClientEdit.ValidateEditorsInContainerById("",u.validationGroup,!0)&&pushEvent(l,a,f,null,null,n(i.getElementById(u.name)))},null))}n(i.getElementById(u.name)).attr("ga-clickevent","checked")}},null);n('a[target="_blank"][ga-event],a[target="_blank"][ga-click]').each(function(){var i=n(this).attr("ga-clickevent"),u,t;if(n(this).attr("href")!==r&&(n(this).attr("onclick")===r||n(this).attr("onclick")==="")&&(i===r||i!=="ignore"&&i!=="checked")){if(u=n(this).attr("ga-event"),u!==r)setGAEventClick(n(this),u);else{var c=n(this).attr("href").replace("http://","").replace("https://",""),f=n(this).text().replace("http://","").replace("https://",""),e="Clickout",o=f!==""?f:"Click",s=c,h=n(this).attr("ga-click");h!==r&&(t=h.split("|"),e=t[0],o=t[1],s=t[2],n(this).removeAttr("ga-click"));n(this).bind("click",function(){(typeof ASPxClientEdit=="undefined"||ASPxClientEdit.AreEditorsValid())&&pushEvent(e,o,s,null,null,n(this))})}n(this).attr("ga-clickevent","checked")}})};t.setGAEventClick=function(i,u,f){f?i.removeAttr("ga-click"):i.removeAttr("ga-event");i.bind("click",function(i){var h,o,c,l,e;if(typeof ASPxClientEdit=="undefined"||ASPxClientEdit.AreEditorsValid())if(f){var a="Links",v="Click",s="",y="",p=-1;this.innerText&&(s=trim(this.innerText));this.textContent&&(s=this.textContent.trim());s===""&&(s=n(this.firstChild).attr("alt")===r?"no text":n(this.firstChild).attr("alt"));u!==r&&u!==""&&u.length>2&&(e=u.split("|"),a=e[0],v=e[1],s=e[2],e.length>3&&(y=e[3],p=e[4]));pushEvent(a,v,s,y,p,n(this))}else{for(h=u.split("|"),o={},h.length>0&&(o.event=h[0]),c=1;c<h.length;c++)l=h[c].split(";"),o[l[0]]=l[1];typeof google_tag_manager=="object"&&i.target.href!==r&&(i.preventDefault(),o.eventTimeout=2e3,o.eventCallback=function(){i.target.target==="_blank"?t.open(i.target.href):t.location=i.target.href});pushDatalayerEvent(o,n(this))}})};typeof t.pushDatalayerEvent=="undefined"&&(t.pushDatalayerEvent=function(n){typeof dataLayer!="undefined"&&dataLayer.push(n)});typeof t.pushEvent=="undefined"&&(t.pushEvent=function(n,t,i,u,f){typeof dataLayer!="undefined"?u!==r&&u!==null&&u!==""?dataLayer.push({event:"sendEvent",eventCategory:n,eventAction:t,eventLabel:i}):dataLayer.push({event:"sendEvent",eventCategory:n,eventAction:t,eventLabel:i}):typeof ga!="undefined"?u!==""?ga("send","event",n,t,i,{extraParamName:f}):ga("send","event",n,t,i):typeof _gaq!="undefined"&&_gaq.push(["_trackEvent",n,t,i])})}(jQuery,window,document);String.prototype.format||(String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})});CMSLoaderlist={};typeof CMSAutoComplete_CustomRenderItem=="undefined"&&(window.CMSAutoComplete_CustomRenderItem=function(n,t){return jQuery("<li><\/li>").data("item.autocomplete",t).append(jQuery("<a><\/a>").html(t.label)).appendTo(n)});Concepts2Go=Concepts2Go||{};Concepts2Go.Cms=Concepts2Go.Cms||{};Concepts2Go.Cms.CMS2GO_CMSCallbackPanel_EndCallbackEventsArray=Concepts2Go.Cms.CMS2GO_CMSCallbackPanel_EndCallbackEventsArray||[],function(n){if(!n.fn.style){var t=function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},i=!!CSSStyleDeclaration.prototype.getPropertyValue;i||(CSSStyleDeclaration.prototype.getPropertyValue=function(n){return this.getAttribute(n)},CSSStyleDeclaration.prototype.setProperty=function(n,i,r){var r,u;this.setAttribute(n,i);r=typeof r!="undefined"?r:"";r!=""&&(u=new RegExp(t(n)+"\\s*:\\s*"+t(i)+"(\\s*;)?","gmi"),this.cssText=this.cssText.replace(u,n+": "+i+" !"+r+";"))},CSSStyleDeclaration.prototype.removeProperty=function(n){return this.removeAttribute(n)},CSSStyleDeclaration.prototype.getPropertyPriority=function(n){var i=new RegExp(t(n)+"\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?","gmi");return i.test(this.cssText)?"important":""});n.fn.style=function(n,t,i){var u=this.get(0),r;return typeof u=="undefined"?this:(r=this.get(0).style,typeof n!="undefined"?typeof t!="undefined"?(i=typeof i!="undefined"?i:"",r.setProperty(n,t,i),this):r.getPropertyValue(n):r)}}}(jQuery)