
try{(function(_1){
var _1=_1,_2=_1.document,_3=i$.hasClass,_4=i$.toQuery,_5=i$.fromPath,_6=i$.forEach,_7="edit",_8="info",_9="toolbar:open",_a="toolbar:close",_b="ibm.portal.toolbar.",_c=function(_d){
var _d=_e(_d),_f=_10(_d),uri=_f.uri,_11=_f.params||{},_12=_13(_d);
if(uri){
if(_14()&&!_15(_12)){
if(_d.editMode===true){
_16(uri,_11);
}else{
_17(uri,_11);
}
}else{
_18(uri,_11,_12);
}
}else{
if(_14()){
if(_15(_12)){
_19(_12);
}
}else{
_18(uri,_11,_12);
}
}
},_1a=function(_1b){
_1b.primaryTab=_1b.tab;
_1b.tab=null;
return _c(_1b);
},_1c=function(_1d){
_1d.secondaryTab=_1d.tab;
_1d.tab=null;
return _c(_1d);
},_1e=function(_1f){
var _20=_21();
if(_20){
_20.close(_1f);
}else{
_1f();
}
},_22=function(_23){
_1e(function(){
_24(_23);
});
},_24=function(_25){
var _26=_10(_25),uri=_26.uri,_27=_26.params||{};
if(_14()){
if(uri){
if(!_27.uri){
_27.uri=[];
}
_27.uri.push(_a);
}else{
uri=_a;
}
}
if(uri){
_28(_29(),uri,_27,function(url){
_2a().location.href=url;
});
}
},_14=function(){
var r=_21();
return r;
},_2b=function(_2c,_2d){
var uri=_2e(_2c,_2d);
if(_2c==_7&&_2d&&_14()){
_16(uri);
}else{
_17(uri);
}
},_2e=function(_2f,_30){
var uri=["pagemode:"];
uri.push(_2f);
uri.push(":");
_30?uri.push("on"):uri.push("off");
var r=uri.join("");
return r;
},_31=function(_32){
_2b(_7,_32);
},_33=function(){
var r=_34(_7);
return r;
},_35=function(_36){
_2b(_8,_36);
},_37=function(){
var r=_34(_8);
return r;
},_34=function(_38){
var win=_29(),_39=win.document.body,r=_3(_39,_38+"-mode");
return r;
},_3a=function(_3b,_3c){
var r=false;
if(_3c!==undefined){
r=_3c!==_34(_3b);
}
return r;
},_17=function(uri,_3d){
var win=_29();
_28(win,uri,_3d,function(url){
win.location.href=url;
});
},_16=function(uri,_3e){
if(_14()){
var _3f=_21();
_3f.load(_40(uri,_3e),"view",{"onload":function(){
_3f.restore();
}});
}else{
var win=_29();
_28(win,uri,_3e,function(url){
win.location.href=url;
});
}
},_41=function(_42){
_29().location.reload(_42);
},_10=function(_43){
var r={};
if(_43){
var uri=null,_44={},_45=_43.editMode,_46=_43.infoMode;
if(_3a(_7,_45)){
uri=_2e(_7,_45);
}
if(_3a(_8,_46)){
var _47=_2e(_8,_46);
if(uri){
_44.uri=[_47];
}else{
uri=_47;
}
}
if(uri){
r.uri=uri;
r.params=_44;
}
}
return r;
},_40=function(uri,_48){
var _49={"uri":uri};
if(_48){
_49.params=_48;
}
return _49;
},_e=function(_4a){
if(_14()){
_4a.autoOpenDefaultTabs=false;
}
return _4a;
},_19=function(_4b){
if(_4b&&_15(_4b)){
var _4c=_21();
if(_4c){
var p=_4b.primaryURI,_4d={},_4e=_4b.onCloseDialog;
if(_4e&&_4e.id){
_4d.onCloseDialog=function(_4f){
_50(_4f,_4e.id,_4e.key);
};
}
if(p){
_4c.load(_40(p),"primary",_4d);
}
var s=_4b.secondaryURI;
if(s){
_4c.load(_40(s),"secondary",_4d);
}
}
}
},_50=function(_51,id,key){
var _52=_51,id=id,key=key||"onCloseDialog";
_53(function(w){
try{
var d=w.document;
if(d){
var n=d.getElementById(id);
if(n){
var f=n[key];
if(f){
f.call(n,_51);
}
}
}
}
catch(e){
}
});
},_18=function(uri,_54,_55){
if(uri){
if(!_54){
_54={};
}
if(!_54.uri){
_54.uri=[];
}
_54.uri.push(_9);
}else{
uri=_9;
}
if(_55&&_15(_55)){
if(!_54){
_54={};
}
var p=_55.primaryURI;
if(p){
_54.primaryTabURI=[p];
}
var s=_55.secondaryURI;
if(s){
_54.secondaryTabURI=[s];
}
}
_28(_29(),uri,_54,function(url){
_2a().location.href=url;
});
},_13=function(_56){
var r={};
if(_56){
if(_56.tab||_56.primaryTab||_56.secondaryTab){
var _57=_56.secondaryTab||_56.tab;
if(_57){
r.secondaryURI=_58(_57);
}
var _59=_56.primaryTab;
if(_59){
r.primaryURI=_58(_59);
}
}
r.onCloseDialog=_56.onCloseDialog;
var _5a=_56.autoOpenDefaultTabs;
if(_5a){
if(!r.primaryURI){
r.primaryURI="default";
}
if(!r.secondaryURI){
r.secondaryURI="default";
}
}
}
return r;
},_58=function(t){
if(t.indexOf(_b)==0||t.indexOf("Z6_")==0){
return "nm:oid:"+t;
}else{
return t;
}
},_15=function(_5b){
var r=_5b&&(_5b.primaryURI||_5b.secondaryURI);
return r;
},_28=function(win,uri,_5c,cb){
_5d(win).then(function(url){
var _5e=url,buf=[];
buf.push(_5e);
if(_5e.indexOf("?")<0){
buf.push("?");
}else{
buf.push("&");
}
buf.push("uri=");
buf.push(uri);
if(_5c){
buf.push("&");
buf.push(_4(_5c));
}
var r=buf.join("");
cb(r);
});
},_5d=function(win){
var r=wpModules.theme.WindowUtils.findBaseURL(win);
return r;
},_5f=function(win){
var r=wpModules.theme.WindowUtils.getBaseURL(win);
return r;
},_29=function(){
var wu=wpModules.theme.WindowUtils,r=(wu&&wu.getWindow(wu.VIEW_AREA))||_1;
return r;
},_53=function(cb){
var _60=_2a(),_61=_60.frames;
cb.call(this,_60);
if(_61&&_61.length>0){
_6(_61,function(f){
cb.call(this,f.window);
});
}
},_2a=function(){
var win=_29(),r=(win.parent||win);
return r;
},_21=function(){
var r=_5("wpModules.toolbar.NavigationController",false,_2a());
return r;
},_62=_5("wpModules.toolbar",true);
_62.openToolbar=_c;
_62.openPrimaryTab=_1a;
_62.openSecondaryTab=_1c;
_62.closeTab=_1e;
_62.closeToolbar=_22;
_62.isToolbarOpened=_14;
_62.setEditModeActive=_31;
_62.isEditModeActive=_33;
_62.setInfoModeActive=_35;
_62.isInfoModeActive=_37;
_62.loadViewArea=_17;
_62.reloadViewArea=_41;
_62.getViewAreaWindow=_29;
_62.getToolbarMasterWindow=_2a;
_62.getBaseURL=_5f;
})(window);


}catch(e){console.log("Module 'wp_toolbar_utils': ",e);}
try{if(typeof (wpModules.toolbar)=="undefined"){
wpModules.toolbar={};
}
if(typeof (wpModules.toolbar.menuActions)=="undefined"){
wpModules.toolbar.menuActions={};
}


}catch(e){console.log("Module 'wp_toolbar_menuactions': ",e);}
try{(function(){
    i$.merge({
	"move_page_dialog_title":"Move the page '{0}' to...",
	"edit_wiring_dialog_title":"Manage Communication Endpoints for '{0}'",
	"confirm_delete_page_anonymous":"Are you sure you want to delete this page and all of its children?",
	"delete_control_dialog_title":"Delete Portlet",
	"confirm_delete_page":"Are you sure you want to delete the page '{0}' and all of its children?",
	"confirm_delete_control_anonymous":"Are you sure you want to remove this portlet from the page?",
	"page_properties_dialog_title":"Manage Page Properties",
	"delete_page_dialog_title":"Delete Page",
	"edit_wiring_dialog_title_anonymous":"Manage Communication Endpoints",
	"preview_as_user_dialog_title":"Preview as User",
	"confirm_delete_control":"Are you sure you want to remove the portlet '{0}' from the page?"
},i$.fromPath("wpModules.toolbar.menuActions.nls",true));
})();
}catch(e){console.log("Module 'wp_toolbar_menuactions': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(){
var _1=ibmCfg.portalConfig.contentHandlerURI+((ibmCfg.portalConfig.contentHandlerURI.indexOf("?")<0)?"?":"&")+"uri=menu:${id}",_2=false,_3="Separator",_4="Header",_5=function(){
var _6=i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode");
return _6;
},_7=i$.fromPath("wptheme",true),_8=i$.fromPath("wptheme.contextMenu",true),_9=i$.fromPath("wptheme.contextMenu.extension",true);
i$.mash(_7,{getWindowIDFromSkin:function(_a){
while((_a=_a.parentNode)!=null){
if(i$.hasClass(_a,"component-control")){
var m=_a&&(_a.className||"").match(/id-([\S]+)/);
var _b=m&&m[1];
return _b;
}
}
return null;
},getPortletState:function(_c){
var _d=i$.byId("portletState");
var _e={};
if(_d){
if(!_d._cache){
_d._cache=i$.fromJson(_d.innerHTML);
_d._cache._defaults={"windowState":"normal","portletMode":"view"};
}
if(_d._cache[_c]){
_e=_d._cache[_c];
}else{
_e=_d._cache._defaults;
}
}
return _e;
},isValidOp:function(_f){
if(_f.visibility===false){
return false;
}
var _10=_f.metadata||{};
switch(_f.id){
case "ibm.portal.operations.changePortletMode":
var _11=_7.getPortletState(_10.wid).portletMode!=_10.portletMode;
return _11;
case "ibm.portal.operations.changeWindowState":
var _11=_7.getPortletState(_10.wid).windowState!=_10.windowState;
return _11;
default:
}
return true;
},operation:{changeToHelpMode:function(_12){
var _13=window.location.href;
if(_12.actionUrl){
if(_12.actionUrl.indexOf("?")==0){
var _14=_13.indexOf("#");
if(_14!=-1){
var _15=_13.substring(0,_14);
var _16=_13.substring(_14);
_13=_15+(_15.indexOf("?")==-1?"?":"&")+_12.actionUrl.substring(1);
_13+=_16;
}else{
_13+=(_13.indexOf("?")==-1?"?":"&")+_12.actionUrl.substring(1);
}
}else{
_13=_12.actionUrl;
}
}
window.open(_13,"","resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,width=800,height=600,screenX=10,screenY=10,top=10,left=10");
}},canImpersonate:function(){
return ibmCfg.portalConfig.canImpersonate;
}});
i$.mash(_8,{cache:{},css:{focus:"wpthemeMenuFocus",disabled:"wpthemeMenuDisabled",show:"wpthemeMenuShow",error:"wpthemeMenuError",menuTemplate:"wpthemeTemplateMenu",submenuTemplate:"wpthemeTemplateSubmenu",loadingTemplate:"wpthemeTemplateLoading",complementaryContent:"wpthemeComplementaryContent",menuOverlay:"wpthemeMenuOverlay",alignLeft:"wpthemeMenuLeft",alignRight:"wpthemeMenuRight",noTouch:"wpthemeNoTouch"},init:function(){
var _17;
if(arguments.length==1){
_17=arguments[0];
}else{
_17={node:arguments[0],menuId:arguments[1],jsonQuery:(arguments.length>2)?arguments[2]:null};
}
this.init2(_17);
},init2:function(_18){
var _19=_18.node;
_18.params=_18.params||{};
var _1a=_18.params.autoScroll!==false;
_19._contextMenu=_19._contextMenu||{};
var _1b=_19._contextMenu;
_1b.id=_19._contextMenu.id||_19.getAttribute("id")||Math.round(Math.random()*1000000000);
_19.setAttribute("id",_1b.id);
_1b.menuId=_18.menuId;
_1b.jsonQuery=_18.jsonQuery;
_1b.templateId=_18.params.templateId||null;
_1b.alignLeft=(_18.params.alignment=="left")||false;
_1b.alignRight=(_18.params.alignment=="right")||false;
_1b.closeFn=function(_1c,evt){
var fn=_18.onClose;
if(fn){
if(i$.isFunction(fn)){
try{
fn();
}
catch(exc){
console.log("error executing function "+fn+" - "+exc);
}
}
}
_7.contextMenu.close(_1b,_1c,evt);
};
var _1d=function(_1e){
if(_1e.displayMenu){
_1b.activeAction=false;
i$.fireEvent("wptheme/contextMenu/close/all");
var _1f=i$.byId(_1b.id);
if(!_1b._submenu){
i$.fireEvent("wptheme/contextMenu/close/all");
_7.contextMenu._updateAbsolutePosition(_1f);
}
var _20=_7.contextMenu._adjustScreenPositionStart();
i$.addClass((_1b.shadowNode)?_1b.shadowNode:_1f,_21.show);
i$.addClass((_1b.shadowNode)?_1b.shadowNode:_1f,("ontouchstart" in document)?"":_21.noTouch);
if(_1a){
_7.contextMenu._adjustScreenPositionEnd(_20);
}
var _22=_1f._firstSelectable;
if(_22){
_22.focus();
_1f._currentSelected=_22;
}
}
};
_7.contextMenu._initialize(_19).then(_1d,_1d);
_19=null;
},initSubmenu:function(_23,_24,_25){
_23._contextMenu=_23._contextMenu||{};
var _26=_23._contextMenu;
_26._submenu=true;
_26._menuitemTemplate=_25._menuitemTemplate;
_26._subMenuTemplate=_25._subMenuTemplate;
_26._loadingTemplate=_25._loadingTemplate;
_7.contextMenu.init(_23,_24,_25.jsonQuery);
},_findFocusNode:function(_27){
var _28,i,_29;
var _2a=function(_2b,_2c){
var l=_2b.childNodes.length;
for(i=0;i<l;i++){
if(_28){
break;
}
_29=_2b.childNodes[i];
if(i$.hasClass(_29,_21.focus)){
_28=_29;
break;
}
if(_29.childNodes){
i=_2a(_29,i);
}
}
return _2c;
};
if(i$.hasClass(_27,_21.focus)){
return _27;
}
_2a(_27);
return _28;
},_findNodes:function(_2d,_2e){
var _2f,_30,_31,_32,i,_33;
var _34=function(_35,_36){
for(i=_35.childNodes.length-1;i>=0;i--){
_33=_35.childNodes[i];
if(i$.hasClass(_33,_21.menuTemplate)){
_30=_33;
continue;
}
if(i$.hasClass(_33,_21.submenuTemplate)){
_31=_33;
continue;
}
if(i$.hasClass(_33,_21.loadingTemplate)){
_32=_33;
continue;
}
if(_33.childNodes){
i=_34(_33,i);
}
}
return _36;
};
if(_2e&&!_2d._contextMenu.menuNode){
_2f=document.getElementById(_2e);
if(_2f){
_2f=_2f.cloneNode(true);
_2d.appendChild(_2f);
}
}
_34(_2d);
if(!_30){
_2f=document.getElementById("simpleMenuTemplate");
if(_2f){
_2f=_2f.cloneNode(true);
_2d.appendChild(_2f);
_34(_2d);
}
}
var _37={"root":_2f,"menu":_30,"submenu":_31,"loading":_32};
return _37;
},_findNextNodeByKeyCode:function(_38,_39){
var _3a=_38.parentNode;
var _3b,_3c,_3d,i,j;
var l=_3a.childNodes.length;
for(i=0;i<l;i++){
if(_3a.childNodes[i]==_38){
break;
}
}
for(j=i+1;j<l;j++){
_3b=_3a.childNodes[j];
_3c=_3b.textContent||_3b.innerText;
if(_3b._menuitem&&_3b._menuitem.type!=_4&&_3b._menuitem.type!=_3&&_3c&&_3c.charAt(0).toUpperCase().charCodeAt(0)==_39){
_3d=_3a.childNodes[j];
return _3d;
}
}
for(j=0;j<i;j++){
_3b=_3a.childNodes[j];
_3c=_3b.textContent||_3b.innerText;
if(_3b._menuitem&&_3b._menuitem.type!=_4&&_3b._menuitem.type!=_3&&_3c&&_3c.charAt(0).toUpperCase().charCodeAt(0)==_39){
_3d=_3a.childNodes[j];
return _3d;
}
}
return null;
},_invalidateCallback:function(){
_7.contextMenu.cache={};
},_initialize:function(_3e){
var _3f=true;
var _40=_3e._contextMenu;
if(_7.contextMenu.cache[_40.id]||_40._inProgress){
return i$.promise.resolved({displayMenu:_3f});
}
_40._inProgress=true;
i$.addListener("wptheme/contextMenu/invalidate/all",_7.contextMenu._invalidateCallback);
var _41,_42,tmp=i$.createDom("div"),_43;
if(_40._submenu){
tmp.innerHTML=_40._subMenuTemplate.replace(/\$\{submenu-id\}/g,_40.id+"_menu");
_3e.appendChild(tmp.firstChild);
_41=i$.byId(_40.id+"_menu");
_42=i$.createDom("div");
_42.innerHTML=_40._loadingTemplate;
}else{
var _44=_7.contextMenu._findNodes((_40.shadowNode)?_40.shadowNode:_3e,_3e._contextMenu.templateId);
_41=_44.menu;
_43=_44.root;
if(_43){
if(_40.alignLeft||_40.alignRight){
i$.removeClass(_43,_21.alignLeft);
i$.removeClass(_43,_21.alignRight);
if(_40.alignLeft){
i$.addClass(_43,_21.alignLeft);
}else{
i$.addClass(_43,_21.alignRight);
}
}
_43.removeAttribute("id");
}
if(!_40._menuitemTemplate){
_40._menuitemTemplate=i$.trim(_41.innerHTML);
}
if(!_40._loadingTemplate){
_42=i$.createDom("div");
_42.appendChild(_44.loading);
_40._loadingTemplate=i$.trim(_42.innerHTML);
_40._loadingTemplate=_40._loadingTemplate.replace(/\$\{loading\}/g,_7.contextMenu.nls.LOADING_0);
_42=null;
}
_42=i$.createDom("div");
_42.innerHTML=_40._loadingTemplate;
if(_44.submenu){
tmp.appendChild(_44.submenu.cloneNode(true));
if(!_40._subMenuTemplate){
_40._subMenuTemplate=i$.trim(tmp.innerHTML);
}
}
}
while(_41.firstChild){
_41.removeChild(_41.firstChild);
}
_41.appendChild(_42);
var _45;
if(_40._submenu){
_45=_40.shadowNode;
}else{
if(_40.shadowNode){
_45=_40.shadowNode;
}else{
_45=_7.contextMenu._transformIntoAbsolutePosition(_3e);
}
}
i$.addClass((_45)?_45:_3e,_21.show);
i$.bindDomEvt((_45)?_45:_3e,"onmouseleave",function(){
if(_40._inProgress){
_3f=false;
}
_40.closeFn(false);
});
var _46=_7.contextMenu._load(_40).then(function(_47){
var _48=_7.contextMenu._parseData(_47).then(function(_49){
_49=_7.contextMenu._filterMenu(_49);
if(!_49||_49.length==0){
_49=[{type:"Menuitem",_enabled:true,itemClass:_21.error,title:{value:_7.contextMenu.nls.NO_ITEMS_0,lang:"en"}}];
}
_7.contextMenu._buildMenu(_40,_41,_49);
_40._inProgress=false;
_7.contextMenu.cache[_40.id]=true;
return {displayMenu:_3f};
});
return _48;
},function(){
var tmp=i$.createDom("div");
tmp.innerHTML=_7.contextMenu._fromTemplate(_40._menuitemTemplate,_21.error,_7.contextMenu.nls.ERROR_LOADING_0);
while(_41.firstChild){
_41.removeChild(_41.firstChild);
}
_41.appendChild(tmp);
_40._inProgress=false;
_7.contextMenu.cache[_40.id]=true;
return {displayMenu:_3f};
});
return _46;
},close:function(_4a,_4b,evt){
var _4c=(evt)?evt.target||evt.srcElement:null;
var _4d=i$.byId(_4a.id);
i$.removeClass((_4a.shadowNode)?_4a.shadowNode:_4d,_21.show);
if(!_4a.activeAction){
var _4e=_4d._currentSelected;
if(_4e){
_4e.blur();
}
var _4f=_7.contextMenu._findFocusNode(_4d);
window.setTimeout(function(){
((_4f)?_4f:_4d).focus();
if(_4b){
window.setTimeout(function(){
_7.contextMenu._applyAction(_4c);
},0);
}
},0);
}
},_load:function(_50){
var _51=_1.replace(/\$\{id\}/g,_50.menuId);
if(_50.jsonQuery){
_51+=(_51.indexOf("?")==-1?"?":"&")+i$.toQuery(_50.jsonQuery);
}
var _52=i$.xhrGet({url:_51,headers:{"X-IBM-XHR":"true"},responseType:"json"}).then(function(_53){
return _53.data;
},function(_54){
var _55=_54.xhr.getResponseHeader("Content-Type")||"";
if((_55.indexOf("text/html")==0)||(_54.xhr.status==401)){
window.setTimeout(function(){
document.location.reload();
},0);
}
console.log("Error trying to load the context menu feed for '"+_50.menuId+"': "+_54);
return null;
});
return _52;
},_parseData:function(_56){
var _57=[];
i$.each(_56,function(_58){
var _59=i$.fromPath("moduleInfo.deferred",false,_58)?i$.modules.loadDeferred():i$.promise.resolved(true);
_57.push(_59.then(function(){
var _5a=_7.contextMenu._checkFunction(_58,_58.visibilityFn,_58,(typeof _58.visibility!="undefined")?_58.visibility:true);
var _5b=_7.contextMenu._checkFunction(_58,_58.enableFn,_58,(typeof _58.enabled!="undefined")?_58.enabled:true);
return i$.whenAll(_5a,_5b).then(function(_5c){
_58._visible=_5c[0];
_58._enabled=_5c[1];
return _58;
});
}));
});
var _5d=i$.whenAll.apply(i$,_57);
return _5d;
},_filterMenu:function(_5e){
var _5f=[],_60,_61={"type":_3};
for(var i=_5e.length-1;i>=0;i--){
_60=_5e[i];
if(!_60._visible){
continue;
}
if(_60.type==_3){
if(_61.type==_3){
continue;
}
}else{
if(_60.type==_4){
if((_61.type==_3)||(_61.type==_4)){
continue;
}
}
}
_61=_60;
_5f.unshift(_60);
}
while(_5f.length>0&&_5f[0].type==_3){
_5f=_5f.slice(1);
}
return _5f;
},_buildMenu:function(_62,_63,_64){
var _65=document.createDocumentFragment(),tmp=i$.createDom("div"),_66,_67,_68,_69,_6a,_6b,_6c=i$.fromPath("wptheme.contextMenu.extension.badge");
for(var i=0,l=_64.length;i<l;i++){
_66=_64[i];
tmp.innerHTML=_7.contextMenu._fromTemplate(_62._menuitemTemplate,_66,_6c);
while(_67=tmp.firstChild){
if(_67.nodeType==1){
if(_66.type=="Submenu"){
_67._menuitem=_66;
_67._jsonData=_62;
i$.bindDomEvt(_67,"onmouseover",_7.contextMenu._applySubmenu);
}else{
if(_66._enabled){
if(!_6a){
_6a=_67;
}
_6b=_67;
_67.links={previous:_68,next:null,sub:null};
if(_68){
_68.links.next=_67;
}
if(!_69&&_66.type!=_4){
_69=_67;
}
_67._menuitem=_66;
_68=_67;
i$.bindDomEvt(_67,"onclick",function(evt){
_7.contextMenu._stopEventPropagation(evt);
_62.closeFn(true,evt);
});
i$.bindDomEvt(_67,"onkeydown",function(evt){
return _7.contextMenu._applyKeyAction(evt);
});
i$.bindDomEvt(_67,"onmouseover",function(evt){
return _7.contextMenu._applyFocusAction(evt);
});
}
}
if((_66.title)&&(i$.isRTL(_66.title.lang))){
i$.addClass(_67,"rtl");
_67.setAttribute("dir","RTL");
}
if(_66.markupId){
_67.setAttribute("id",_66.markupId);
}
if(_6c){
_6c.injectBadge(_67);
}
}
_65.appendChild(_67);
}
}
_6a.links.previous=_6b;
_6b.links.next=_6a;
while(_63.firstChild){
_63.removeChild(_63.firstChild);
}
_63.appendChild(_65);
i$.byId(_62.id)._firstSelectable=_69;
i$.byId(_62.id)._currentSelected=null;
},_fromTemplate:function(_6d,_6e,_6f){
var _70,_71,_72,_73="";
if(typeof (_6e)=="string"){
_70=_6e;
_71=_6f;
_72="";
}else{
_70="type"+_6e.type;
if(_6e.itemClass){
_70+=" "+_6e.itemClass;
}
if(!_6e._enabled){
_70+=" "+_21.disabled;
}
_71=(_6e.title)?_6e.title.value:"";
_72=((_6e.description)?_6e.description.value:"");
if(_6f){
_73=_6f.getAnchor(_6e);
}
}
var _74=_6d.replace(/\$\{title\}/g,_71).replace(/\$\{badge\}/g,_73).replace(/"\$\{css-class\}"/g,"\""+(_70)+"\"").replace(/\$\{css-class\}/g,"\""+(_70)+"\"").replace(/"\$\{description\}"/g,"\""+_72+"\"").replace(/\$\{description\}/g,"\""+_72+"\"");
return _74;
},_checkFunction:function(_75,fn,arg,_76){
if(fn){
if(!_75.fromPath){
_75.fromPath={};
}
var _77=i$.fromPath("wptheme.contextMenu.extension.menuItemScope"),_78=_77?_77.getWindow(_75):null,_79=_75.fromPath[fn]||i$.fromPath(fn,false,_78);
_75.fromPath[fn]=_79;
if(i$.isFunction(_79)){
try{
return _79(arg);
}
catch(exc){
console.log("error executing function "+fn+" - "+exc);
}
}
}
return i$.promise.resolved(_76);
},_stopEventPropagation:function(evt){
if(evt){
if(evt.stopPropagation){
evt.stopPropagation();
}else{
evt.cancelBubble=true;
}
}
},_applyKeyAction:function(evt){
var _7a=evt.target||evt.srcElement;
var _7b=_7a;
var _7c=null;
while(!_7c){
_7b=_7b.parentNode;
if(_7b._contextMenu){
_7c=_7b;
}
}
var _7d=_7c._contextMenu;
switch(evt.keyCode){
case 32:
if(evt.preventDefault){
evt.preventDefault();
}
case 13:
_7.contextMenu._stopEventPropagation(evt);
_7d.closeFn(true,evt);
return false;
case 9:
case 27:
_7d.closeFn(false);
break;
case 40:
_7.contextMenu._moveFocus(evt,_7d,_7a,"next");
return false;
case 38:
_7.contextMenu._moveFocus(evt,_7d,_7a,"previous");
return false;
}
var _7e=_7.contextMenu._findNextNodeByKeyCode(_7a,evt.keyCode);
if(_7e){
_7e.focus();
return false;
}
return true;
},_moveFocus:function(evt,_7f,_80,_81){
var _82=_80.links[_81];
if(_82&&(_82._menuitem.type==_4||_82._menuitem.type==_3)){
var _83=false;
var _84=null;
while(!_84&&!_83){
_82=_82.links[_81];
if(!_82){
_83=true;
}else{
if(_82._menuitem.type!=_4&&_82._menuitem.type!=_3){
_84=_82;
}
}
}
_82=_84;
}
if(_82){
var _85=i$.byId(_7f.id)._currentSelected;
if(_85){
_85.blur();
}
i$.byId(_7f.id)._currentSelected=_82;
_82.focus();
}
if(evt.preventDefault){
evt.preventDefault();
}
},_applyFocusAction:function(evt){
var _86=evt.target||evt.srcElement;
var _87=_86;
var _88=null;
var _89=_86._menuitem;
while(!_88){
_87=_87.parentNode;
if(_87._contextMenu){
_88=_87;
}
if(!_89){
_86=_86.parentNode;
_89=_86._menuitem;
}
}
var _8a=_88._contextMenu;
var _8b=i$.byId(_8a.id)._currentSelected;
if(_8b!=_86){
if(_8b){
_8b.blur();
i$.byId(_8a.id)._currentSelected=null;
}
if(_89.type!=_4&&_89.type!=_3){
i$.byId(_8a.id)._currentSelected=_86;
_86.focus();
}
}
return false;
},_applyAction:function(_8c){
var _8d=_8c;
var _8e=null;
var _8f=_8c._menuitem;
while(!_8e){
_8d=_8d.parentNode;
if(_8d._contextMenu){
_8e=_8d;
}
if(!_8f){
_8c=_8c.parentNode;
_8f=_8c._menuitem;
}
}
var _90=_8e._contextMenu;
_90.activeAction=true;
var p=_7.contextMenu._checkFunction(_8f,_8f.actionFn,_8f,_8f.actionUrl);
if(p){
p.then(function(_91){
if(_91&&i$.isString(_91)){
var _92=i$.fromPath("wptheme.contextMenu.extension.actionUrlTarget");
var _93=(_92)?_92.getWindow(_8f):window;
var _94=_8f.actionHttpMethod||"GET";
if(_94!="GET"){
var _95=_93.i$.createDom("form");
_95.setAttribute("action",_91);
_94=_94.toLowerCase();
switch(_94){
case "get":
_95.setAttribute("method","GET");
break;
case "delete":
case "put":
var _96=_93.i$.createDom("input",{"type":"hidden","name":"x-method-override","value":_94.toUpperCase()});
_95.appendChild(_96);
case "post":
_95.setAttribute("method","POST");
_95.setAttribute("enctype","multipart/form-data");
break;
default:
}
_93.i$.byId(_21.complementaryContent).appendChild(_95);
_95.submit();
}else{
var _97=_93.i$.createDom("a");
_97.setAttribute("style","display:none");
_97.setAttribute("href",_91);
_93.i$.byId(_21.complementaryContent).appendChild(_97);
_97.click();
}
}
});
}
},_applySubmenu:function(evt){
var _98=evt.target||evt.srcElement;
if(!_98._jsonData){
_98=_98.parentNode;
}
if(_98._jsonData){
_98.setAttribute("id",_98._jsonData.id+"_"+_98._menuitem.id);
_7.contextMenu.initSubmenu(_98,_98._menuitem.id,_98._jsonData);
}
},_transformIntoAbsolutePosition:function(_99){
var _9a=_99.childNodes,_9b,i=0,_9c=false;
while(_9b=_9a[i++]){
if(i$.hasClass(_9b,_21.alignRight)){
_9c=true;
break;
}else{
if(i$.hasClass(_9b,_21.alignLeft)){
break;
}
}
}
var _9d=i$.createDom("div");
_9d.className=_99.className;
_9d.appendChild(_9b);
i$.byId(_21.complementaryContent).appendChild(_9d);
_9d._contextMenu=_99._contextMenu;
_99._contextMenu.shadowNode=_9d;
_99._contextMenu._menuIsRight=_9c;
var _9e=i$.createDom("span");
_9d.appendChild(_9e);
i$.addClass(_9e,_21.menuOverlay);
_99._contextMenu.overlayNode=_9e;
_99._contextMenu.menuNode=_9b;
_7.contextMenu._updateAbsolutePosition(_99);
return _9d;
},_updateAbsolutePosition:function(_9f){
var _a0=_9f._contextMenu._menuIsRight;
var _a1=_9f._contextMenu.menuNode;
var _a2=_9f._contextMenu.overlayNode;
var _a3=_7.contextMenu._findPos(_9f);
var _a4=2;
_a2.style.left=(_a3[0]-_a4)+"px";
_a2.style.top=(_a3[1]-_a4)+"px";
_a2.style.width=(_9f.offsetWidth+(2*_a4))+"px";
_a2.style.height=(_9f.offsetHeight+(2*_a4))+"px";
var dir=document.getElementsByTagName("html")[0].getAttribute("dir");
if(dir!=null){
dir=dir.toLowerCase();
}else{
dir="";
}
if(!(dir=="rtl")){
_a1.style.left=((_a0)?_a3[0]+_9f.offsetWidth:_a3[0])+"px";
}else{
_a1.style.left=((_a0)?_a3[0]+_9f.offsetWidth-_9f.scrollWidth:_a3[0]+_9f.scrollWidth)+"px";
}
_a1.style.top=_a3[1]+"px";
},_adjustScreenPositionStart:function(){
return document.documentElement.scrollHeight;
},_adjustScreenPositionEnd:function(_a5){
var _a6=document.documentElement.scrollHeight;
if(_a5!=_a6){
document.documentElement.scrollTop=document.documentElement.scrollHeight;
}
},_findPos:function(obj){
var _a7=curtop=0;
if(obj.offsetParent){
do{
_a7+=obj.offsetLeft;
curtop+=obj.offsetTop;
}while(obj=obj.offsetParent);
var _a8=[_a7,curtop];
return _a8;
}
},});
var _21=_7.contextMenu.css;
})();


}catch(e){console.log("Module 'wp_simple_contextmenu_js': ",e);}
try{(function(){
    i$.merge({
	"NO_ITEMS_0":"No items to display",
	"ERROR_LOADING_0":"Error happened while loading the menu.",
	"LOADING_0":"Loading..."
},i$.fromPath("wptheme.contextMenu.nls",true));
})();
}catch(e){console.log("Module 'wp_simple_contextmenu_js': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(){
function _1(_2){
var _3=window,_4=_2.metadata;
if(_4&&_4._contributionWindow){
return _4._contributionWindow;
}
if(_4&&_4.contributor){
var _5=_4.contributor,_6=_5.lastIndexOf(":"),_7=_5.substr(_6+1),_8=i$.fromPath("wpModules.theme.WindowUtils");
if(_8){
_3=_8.getWindow(_7);
}
}
if(!_4){
_4=_2.metadata={};
}
_4._contributionWindow=_3;
return _3;
};
var _9={getWindow:function(_a){
var _b=(_a.metadata&&_a.metadata.actionUrlTarget)||"same",_c,wu=wpModules.theme.WindowUtils;
_c=_1(_a);
if(_b=="view"){
_c=wu&&wu.getWindow(wu.VIEW_AREA);
}else{
if(_b=="master"){
_c=wu&&wu.getWindow(wu.MASTER);
}
}
return _c||window;
}};
var _d={getWindow:function(_e){
return _1(_e);
}};
i$.toPath("wptheme.contextMenu.extension.actionUrlTarget",_9);
i$.toPath("wptheme.contextMenu.extension.menuItemScope",_d);
var _f={templates:{anchor:"<span class=\"wpthemeMenuBadgeAnchor\"></span>",loading:"<span class=\"wpthemeMenuLoading wpthemeTemplateLoading\"></span>",badge_info:"<span class=\"wpthemeMenuBadge wpthemeMenuBadgeInfo\" aria-live=\"polite\">${count}</span>",badge_warn:"<span class=\"wpthemeMenuBadge wpthemeMenuBadgeWarn\" aria-live=\"polite\">${count}</span>",badge_error:"<span class=\"wpthemeMenuBadge wpthemeMenuBadgeError\" aria-live=\"polite\">${count}</span>"},getAnchor:function(_10){
var md=(_10)?_10.metadata:null;
return (md&&(md.badgeUrl||md.badgeData))?_f.templates.anchor:"";
},injectBadge:function(_11,_12){
var _13=(_12)?_12:_11._menuitem,md=(_13)?_13.metadata:null;
if(md&&(md.badgeUrl||md.badgeData)){
var _14=_f._findNode(_11,"wpthemeMenuBadgeAnchor");
if(_14){
if(md.badgeUrl){
var _15,_16=md.badgeUrl,_17=ibmCfg.portalConfig.contentHandlerURI;
if(_16.indexOf("?")==0){
_15=_17+((_17.indexOf("?")<0)?"?":"&")+_16.substring(1);
}else{
_15=_16;
}
var tmp=i$.createDom("div");
tmp.innerHTML=_f.templates.loading;
_14.appendChild(tmp.firstChild);
i$.xhrGet({url:_15,headers:{"X-IBM-XHR":"true"},responseType:"json"}).then(function(_18){
_f._insertBadge(_18.data,md.badgeTitle,_14);
},function(_19){
while(_14.firstChild){
_14.removeChild(_14.firstChild);
}
});
}else{
_f._insertBadge(md.badgeData,md.badgeTitle,_14);
}
}
}
},_insertBadge:function(_1a,_1b,_1c){
while(_1c.firstChild){
_1c.removeChild(_1c.firstChild);
}
if(_1a&&_1a.count>0){
var tmp=i$.createDom("div");
if(_1a.level=="error"){
tmp.innerHTML=_f.templates.badge_error.replace(/\$\{count\}/g,_1a.count);
}else{
if(_1a.level=="warn"){
tmp.innerHTML=_f.templates.badge_warn.replace(/\$\{count\}/g,_1a.count);
}else{
tmp.innerHTML=_f.templates.badge_info.replace(/\$\{count\}/g,_1a.count);
}
}
if(_1b){
tmp.firstChild.setAttribute("title",_1b);
tmp.firstChild.setAttribute("aria-label",_1b);
}
_1c.appendChild(tmp.firstChild);
}
},_findNode:function(_1d,_1e){
var _1f,i,_20;
var _21=function(_22,_23){
for(i=_22.childNodes.length-1;i>=0;i--){
_20=_22.childNodes[i];
if(i$.hasClass(_20,_1e)){
_1f=_20;
continue;
}
if(_20.childNodes){
i=_21(_20,i);
}
}
return _23;
};
_21(_1d);
return _1f;
}};
i$.toPath("wptheme.contextMenu.extension.badge",_f);
})();


}catch(e){console.log("Module 'wp_simple_contextmenu_ext': ",e);}
try{(function(_1){
var _2="aria-labelledby",_3="aria-describedby",_4="aria-pressed",_5="title",_6="true",_7="false",_8="selected",_9="disabled",_a="wpToolbarHighContrast",_b="http://www.ibm.com/xmlns/prod/websphere/portal/publicparams",_c="wpInfoModeToggle",_d="wpInfoModeToggleLink",_e="wpPageModeToggle",_f="wpPageModeToggleLink",_10="wpToolbarToggle",_11="ibm.portal.home.createpage",_12="ibm.portal.toolbar.NewPage",_13="wps.content.root",_14="wps.Administration",_15="ibm.portal.page.Applications",_16=[13,32,38,40],_17=[13,32],T=true,F=false,_18=i$.byId,_19=i$.hasClass,_1a=i$.addClass,_1b=i$.removeClass,_1c=i$.forEach,_1d=i$.toQuery,_1e=i$.fromPath,_1f=i$.bindDomEvt;
function _20(_21,_22){
var _23=_21||_18(_e),_24="valueoff",_25="valueon";
if(_22){
if(!_19(_23,_25)){
_1b(_23,_24);
_1a(_23,_25);
_26(_23,_4,_6);
_26(_23,_5,_27(_28(_18("wpEditModeDesc"))));
}
}else{
if(_19(_23,_25)){
_1b(_23,_25);
_1a(_23,_24);
_26(_23,_4,_7);
_26(_23,_5,_27(_28(_18("wpViewModeDesc"))));
}
}
};
function _29(_2a,_2b){
var _2c=_2a||_18(_c),_2d=_18(_d);
if(_2b){
if(!_19(_2c,_8)){
_1a(_2c,_8);
_26(_2d,_2,"wpInfoModeOnLabel");
_26(_2d,_3,"wpInfoModeOnDesc");
_26(_2d,_4,_6);
_26(_2c,_5,_27(_28(_18("wpInfoModeOnDesc"))));
}
}else{
if(_19(_2c,_8)){
_1b(_2c,_8);
_26(_2d,_2,"wpInfoModeOffLabel");
_26(_2d,_3,"wpInfoModeOffDesc");
_26(_2d,_4,_7);
_26(_2c,_5,_27(_28(_18("wpInfoModeOffDesc"))));
}
}
};
function _2e(_2f,e){
if(!_30(e,_17)){
return F;
}
_1a(_2f,_8);
var _31=wpModules.toolbar;
if(_31.isToolbarOpened()){
_31.closeToolbar();
}else{
_31.openToolbar({"autoOpenDefaultTabs":true});
}
return T;
};
function _32(_33,_34,e){
if(!_30(e,_17)){
return F;
}
if(!_19(_33,_9)){
var t=wpModules.toolbar,_35=t.isEditModeActive();
if(_35){
t.setEditModeActive(F);
}else{
if(_34&&_36()){
var _37={"editMode":T};
if(!t.isToolbarOpened()){
_37.autoOpenDefaultTabs=true;
}
t.openToolbar(_37);
}else{
t.setEditModeActive(T);
}
}
_20(_33,!_35);
}
return T;
};
function _38(_39,e){
if(!_30(e,_17)){
return F;
}
var t=wpModules.toolbar,_3a=t.isInfoModeActive();
_29(_39,!_3a);
t.setInfoModeActive(!_3a);
return T;
};
function _3b(_3c,e){
var _3d=F;
if(_3e()){
_3d=_3f(_3c,_13,e);
}else{
_40(_13);
_3d=T;
}
return _3d;
};
function _41(_42,e){
var _43=F;
if(_3e()){
_43=_3f(_42,_15,e);
}else{
_40(_15);
_43=T;
}
return _43;
};
function _44(_45,e){
var _46=T;
_40(_14);
return _46;
};
function _3e(){
var _47=(typeof wptheme!="undefined"&&wptheme.contextMenu);
return _47;
};
function _3f(_48,_49,e){
if(!_30(e,_16)){
return F;
}
var _4a={"navID":_4b(),"rootNode":_49};
var _4c=wpModules.toolbar;
if(_4c&&_4c.isToolbarOpened()){
_4a.contribURI="nm:oid:ibm.portal.Toolbar";
}
_4d(_48,"navigationMenu",_4a);
return T;
};
function _4d(_4e,_4f,_50){
_1a(_4e.parentNode,_8);
_26(_4e,_4,_6);
args={"node":_4e.parentNode,"menuId":_4f,"jsonQuery":_50,"params":{"templateId":"simpleMenuTemplate","alignment":"right","autoScroll":false},"onClose":function(){
_1b(_4e.parentNode,_8);
_26(_4e,_4,_7);
}};
wptheme.contextMenu.init(args);
};
function _26(_51,_52,_53){
_51.setAttribute(_52,_53);
};
function _28(_54){
return _54.firstChild;
};
function _27(_55){
return _55.nodeValue;
};
function _56(_57){
var fc=_57.firstChild;
while(fc&&fc.nodeType!==1){
fc=fc.nextSibling;
}
return fc;
};
function _58(_59,_5a,_5b){
if(_5b&&_59&&_5a&&_5a.length>0){
_1c(_5a,function(p){
if(_59.name==p.name&&_59.nsuri==p.nsuri){
_5b(p.value);
return F;
}
});
}
};
function _30(e,_5c){
var k=e?e.keyCode:null;
if(k){
if(_5c){
var r=_5c.indexOf(k)>=0;
return r;
}else{
return F;
}
}
return T;
};
function _5d(){
return wpModules.toolbar.getViewAreaWindow();
};
function _4b(){
var r=_5d().ibmCfg.portalConfig.currentPageOID;
return r;
};
function _5e(){
return _1e("ibmCfg.portalConfig.isCurrentPageEditable",false,_5d());
};
function _36(){
return _1e("wpModules.state.page.supportsToolbar",false,_5d());
};
function _40(id){
wpModules.toolbar.loadViewArea("nm:oid:"+id);
};
function _5f(_60){
if(_60&&_60.pageId){
var id=_60.pageId;
if(id&&id.value&&id.value.length>0){
_40(id.value[0]);
}
}
};
i$.addOnLoad(function(){
var _61=i$.fromPath("wpModules.state.page",false);
if(_61){
var _62=_61.getStateManager();
_62.addListener(function(_63){
var _64=_63.renderParams().getModified();
_58({"nsuri":_b,"name":"editMode"},_64,function(_65){
var res=(_65&&_65[0]=="true"),_66=_18(_e);
if(_66){
_20(_66,res);
}
});
_58({"nsuri":_b,"name":"infoMode"},_64,function(_67){
var res=(_67&&_67[0]=="true"),_68=_18(_c);
if(_68){
_29(_68,res);
}
});
});
}
var _69=wpModules.toolbar.getViewAreaWindow();
if(self===_69){
var w=_69.parent||_69,_6a=w.document.getElementById(_e);
if(_6a){
if(_5e()){
_1b(_6a,_9);
}else{
_1a(_6a,_9);
}
}
var _6b=w.document.getElementById(_10);
if(_6b){
if(_36()){
_1b(_6b,_9);
}else{
_1a(_6b,_9);
}
}
}
var _6c=_18(_11);
if(_6c){
var _6d=wpModules.toolbar;
_6c.onClose=_5f;
if(_6d.isToolbarOpened()||_18(_e)){
var _6e={};
_6e.id=_11;
_6e.key="onClose";
_1f(_6c,"click",function(e){
_6d.openToolbar({"primaryTab":"siteManagerTreeTab:context:oid:"+_4b()+":default:action:CREATE_CHILD_PAGE","onCloseDialog":_6e});
e.preventDefault?e.preventDefault():e.returnValue=F;
return F;
});
}
}
});
wpModules.a11y.highContrastMode.then(function(_6f){
if(_6f){
_1a(_18(_c),_a);
}
});
_1.toggleToolbar=_2e;
_1.toggleEditMode=_32;
_1.toggleInfoMode=_38;
_1.openSitesMenu=_3b;
_1.openApplicationsMenu=_41;
_1.openAdministration=_44;
})(i$.fromPath("wpModules.theme.ActionBar",true));


}catch(e){console.log("Module 'wp_toolbar_actionbar': ",e);}
try{(function(){
if(!i$.isIE){
i$.addOnLoad(function(){
var _1=document.createElement("div");
_1.style.cssText="border:1px solid;border-color:red green;position:absolute;height:5px;top:-999px;background-image:url(\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\");";
document.body.appendChild(_1);
var _2=null;
try{
_2=document.defaultView.getComputedStyle(_1,"");
}
catch(e){
_2=_1.currentStyle;
}
if(_2){
var _3=_2.backgroundImage;
if((_2.borderTopColor==_2.borderRightColor)||(_3!=null&&(_3=="none"||_3=="url(invalid-url:)"))){
document.getElementsByTagName("body")[0].className+=" a11yHighContrast";
}
document.body.removeChild(_1);
}
});
}
})();


}catch(e){console.log("Module 'wp_high_contrast': ",e);}
try{(function(){
var _1=i$.addClass,_2=i$.hasClass,_3=i$.removeClass,_4=i$.fromPath,ln=function(o){
return o.length;
},_5="edit-mode",_6="edit-mode-disabled",_7="help-mode",_8="info-mode",_9="toolbar-opened",_a="toolbar-closed",_b=_4("wpModules.state.page");
if(_b){
var _c=_b.getStateManager();
_c&&_c.getState().then(function(_d){
var _e=_d.renderParams().get({nsuri:"http://www.ibm.com/xmlns/prod/websphere/portal/publicparams",name:"pageMode"}),_f=_d.renderParams().get({nsuri:"http://www.ibm.com/xmlns/prod/websphere/portal/publicparams",name:"showTools"}),_10=document.body;
_3(_10,_5);
_3(_10,_6);
_3(_10,_8);
_3(_10,_7);
if(_e&&ln(_e)>0&&_e[0].value&&ln(_e[0].value)>0){
var _11=_e[0].value;
for(var i=0;i<ln(_11);++i){
var _12=_11[i];
if("EDIT"==_12){
if(wpModules.state.page.supportsEditMode){
_1(_10,_5);
}else{
_1(_10,_6);
}
}else{
if("INFO"==_12){
_1(_10,_8);
}else{
if("HELP"==_12){
_1(_10,_7);
}
}
}
}
}
if(_f&&ln(_f)>0&&_f[0].value&&ln(_f[0].value)>0){
var _13=_f[0].value[0];
if("true"==_13){
_1(_10,_9);
}else{
_1(_10,_a);
}
}else{
_1(_10,_a);
}
});
}
})();


}catch(e){console.log("Module 'wp_state_page_modes': ",e);}
try{(function(){
    i$.merge({
	"WARNING_0":"Warning",
	"DELETE_0":"Delete",
	"INFO_0":"Information",
	"MESSAGES_AVAILABLE_1":"${0} messages are available for review",
	"SHOW_DETAILS_0":"Show Details",
	"ERROR_0":"Error",
	"HIDE_DETAILS_0":"Hide Details"
},i$.fromPath("wptheme.statusBar.nls",true));
})();
}catch(e){console.log("Module 'wp_status_bar': ",e);}
try{(function(){
if(typeof com==="undefined"||!com){
com={};
}
if(typeof com.ibm==="undefined"||!com.ibm){
com.ibm={};
}
if(typeof com.ibm.widgets==="undefined"||!com.ibm.widgets){
com.ibm.widgets={};
}
if(typeof com.ibm.widgets.StatusType==="undefined"||!com.ibm.widgets.StatusType){
com.ibm.widgets.StatusType=function(id,_1,_2,_3){
this._id=id;
this._styleClass=_1;
this._iconPath=_2;
this._iconAlt=_3;
};
}
if(typeof com.ibm.widgets.StatusMessage==="undefined"||!com.ibm.widgets.StatusMessage){
com.ibm.widgets.StatusMessage=function(_4,_5,_6){
this._type=_4;
this._message=_5;
if(!i$.isString(_5)&&_5.message&&i$.isString(_5.message)){
this._message=_5.message;
}
this._details=_6;
};
}
if(typeof com.ibm.widgets.StatusBarV2==="undefined"||!com.ibm.widgets.StatusBarV2){
com.ibm.widgets.StatusBarV2=function(_7){
this.uid=_7;
this.showDetails=false;
this._messages=[];
this._connections=[];
this._numMessages=0;
this._baseURL=window.location.protocol+"//"+window.location.host;
this.blankGifIcon="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
this._statusTypesMap={"error":new com.ibm.widgets.StatusType(0,"wpthemeError",this.blankGifIcon,wptheme.statusBar.nls.ERROR_0),"warning":new com.ibm.widgets.StatusType(1,"wpthemeWarning",this.blankGifIcon,wptheme.statusBar.nls.WARNING_0),"info":new com.ibm.widgets.StatusType(2,"wpthemeInfo",this.blankGifIcon,wptheme.statusBar.nls.INFO_0)};
i$.addListener("/portal/status",i$.scope(this,this.addMessage));
i$.addListener("/message/status",i$.scope(this,this.addMessage));
i$.addListener("/portal/status/clear",i$.scope(this,this.clearMessage));
i$.addListener("/message/status/clear",i$.scope(this,this.clearMessage));
if(typeof (ibmCfg)!="undefined"&&ibmCfg.portalConfig){
this.isBidi=ibmCfg.portalConfig.isRTL;
}else{
if(typeof (ibmPortalConfig)!="undefined"){
this.isBidi=ibmPortalConfig.isRTL;
}else{
if(typeof (ibmConfig)!="undefined"){
this.isBidi=ibmConfig.isBidi;
}
}
}
i$.addOnUnload(i$.scope(this,this._onWindowUnload));
this.containerNode=i$.byId("wpthemeStatusBarContainer");
};
}
i$.augment(com.ibm.widgets.StatusBarV2,{_onWindowUnload:function(){
i$.forEach(this._connections,function(_8){
i$.unbindDomEvt(_8);
});
this._connections=null;
this.clear();
this._messages=null;
},_getStatusContainer:function(){
return this.containerNode;
},_escapeHTML:function(_9){
if(_9.replace){
return _9.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;");
}
return _9;
},setShowDetails:function(_a){
this.showDetails=_a;
},toggleShowDetails:function(){
this.setShowDetails(!this.showDetails);
this.render();
},clear:function(){
var _b=this._getStatusContainer();
if(!!_b){
_b.innerHTML="";
_b.setAttribute("role","");
_b.setAttribute("wairole","");
}
this._messages.length=0;
},clearMessage:function(_c){
if(_c.uid&&_c.uid!=this.uid){
return;
}
var _d=_c.message;
if(typeof _d==="undefined"||_d===null){
this.clear();
}else{
for(var i=this._messages.length-1;i>=0;i--){
if(this._messages[i]._type==_d._type&&this._messages[i]._message==_d._message&&this._messages[i]._details==_d._details){
this._messages.splice(i,1);
}
}
if(this._messages.length==0){
this.clear();
}else{
if(this._messages.length<100){
this.render(this._getStatusContainer());
}
}
}
},addMessage:function(_e){
if(_e.uid&&_e.uid!=this.uid){
return;
}
var _f=_e.message;
this._messages.push(_f);
if(this._messages.length<100){
this.render(this._getStatusContainer());
}
},render:function(_10){
if(_10==null){
_10=this._getStatusContainer();
}
_10.innerHTML="";
if(this._messages.length>1){
this.renderHeader(_10);
}else{
if(this._messages.length==1){
this.renderMessage(_10,this._messages[0],this.showDetails,0);
}
}
if(this.showDetails&&this._messages.length>1){
for(x in this._messages){
this.renderMessage(_10,this._messages[x],this.showDetails,x);
}
}
},renderHeader:function(_11){
if(this._messages.length>1){
var _12=2;
for(var i=0;i<this._messages.length;i++){
_12=Math.min(_12,this._statusTypesMap[this._messages[i]._type]._id);
}
var _13="info";
for(x in this._statusTypesMap){
if(this._statusTypesMap[x]._id==_12){
_13=x;
break;
}
}
var _14=new com.ibm.widgets.StatusMessage(_13,wptheme.statusBar.nls.MESSAGES_AVAILABLE_1.replace("${0}",this._messages.length),"");
this.renderMessage(_11,_14,this.showDetails,-1);
}
},renderMessage:function(_15,_16,_17,_18){
var _19=this._statusTypesMap[_16._type];
var _1a=document.createElement("div");
_1a.className="wpthemeMessage "+_19._styleClass;
if(this._messages.length>1&&_18>=0){
_1a.className+=" wpthemeMoreMsg";
}
var _1b=document.createElement("img");
_1b.className="wpthemeMsgIcon "+(_19._styleClass=="wpthemeError"?"wpthemeMsgIconError":_19._styleClass=="wpthemeWarning"?"wpthemeMsgIconWarning":"wpthemeMsgIconInfo");
_1b.src=_19._iconPath;
_1b.alt=_1b.title=_19._iconAlt;
_1a.appendChild(_1b);
var _1c=document.createElement("span");
_1c.className="wpthemeAltText";
_1c.innerHTML=this._escapeHTML(_19._iconAlt+":");
_1a.appendChild(_1c);
var _1d=document.createElement("div");
_1d.className="wpthemeMessageBody";
_1d.innerHTML=this._escapeHTML(_16._message);
_1a.appendChild(_1d);
if((this._messages.length>1&&_18<0)||(this._messages.length==1)){
if(_16._details&&_16._details.length>0||_18<0){
var _1e=document.createElement("a");
_1e.href="javascript:void(0)";
_1e.className="wpthemeHideShow";
_1e.role="button";
this._connections.push(i$.bindDomEvt(_1e,"onclick",i$.scope(this,this.toggleShowDetails)));
var _1f=document.createElement("img");
_1f.className="wpthemeMsgIcon16";
_1f.src=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif";
_1e.appendChild(_1f);
var _20=document.createElement("span");
_20.className="wpthemeAltText";
_1e.appendChild(_20);
}else{
_17=false;
}
var _21=document.createElement("a");
_21.href="javascript:void(0);";
_21.className="wpthemeDelete";
_21.role="button";
_21.title=wptheme.statusBar.nls.DELETE_0;
this._connections.push(i$.bindDomEvt(_21,"onclick",i$.scope(this,this.clear)));
var _22=document.createElement("img");
_22.alt=wptheme.statusBar.nls.DELETE_0;
_22.src=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif";
_21.appendChild(_22);
var _23=document.createElement("span");
_23.className="wpthemeAltText";
_23.innerHTML=this._escapeHTML(wptheme.statusBar.nls.DELETE_0);
_21.appendChild(_23);
if(_16._details&&_16._details.length>0||_18<0){
if(_17){
_1e.title=wptheme.statusBar.nls.HIDE_DETAILS_0;
_1f.className+=" wpthemeMsgIconHide";
_1f.alt=wptheme.statusBar.nls.HIDE_DETAILS_0;
_20.innerHTML=this._escapeHTML(wptheme.statusBar.nls.HIDE_DETAILS_0);
}else{
_1e.title=wptheme.statusBar.nls.SHOW_DETAILS_0;
_1f.className+=" wpthemeMsgIconShow";
_1f.alt=wptheme.statusBar.nls.SHOW_DETAILS_0;
_20.innerHTML=this._escapeHTML(wptheme.statusBar.nls.SHOW_DETAILS_0);
}
_1a.appendChild(_1e);
}
_1a.appendChild(_21);
}
var _24=document.createElement("div");
_24.className="wpthemeClear";
_1a.appendChild(_24);
if(_16._details&&_16._details.length>0&&_17&&_18>=0){
var _25=document.createElement("div");
_25.className="wpthemeDetails";
_25.appendChild(document.createTextNode(_16._details));
_1a.appendChild(_25);
}
_15.appendChild(_1a);
_15.setAttribute("role","alert");
_15.setAttribute("wairole","alert");
}});
if(typeof wpstatusbar==="undefined"||!wpstatusbar){
wpstatusbar=new com.ibm.widgets.StatusBarV2("ibmStatusBox");
}
var _26=i$.getCookie("ibm.portal.operations.error");
if(_26){
var _27=i$.fromJson(decodeURIComponent(_26));
var _28="error";
if(_27.errorType){
_28=_27.errorType;
}else{
if(_27.errorCode){
if(_27.errorCode=="400"){
_28="error";
}
}
}
i$.fireEvent("/portal/status",[{message:new com.ibm.widgets.StatusMessage(_28,_27.errorMessage?_27.errorMessage:"",_27.errorDetails?_27.errorDetails:""),uid:"ibmStatusBox"}]);
i$.deleteCookie("ibm.portal.operations.error");
}
i$.addOnLoad(function(){
if("localStorage" in window&&window["localStorage"]!==null){
if(localStorage["com.ibm.wp.toolbar.msg.msg"]!=null){
i$.fireEvent("/message/status",[{message:new com.ibm.widgets.StatusMessage(localStorage["com.ibm.wp.toolbar.msg.type"],localStorage["com.ibm.wp.toolbar.msg.msg"],""),uid:"ibmStatusBox"}]);
localStorage.removeItem("com.ibm.wp.toolbar.msg.type");
localStorage.removeItem("com.ibm.wp.toolbar.msg.msg");
}
}
});
})();


}catch(e){console.log("Module 'wp_status_bar': ",e);}
try{(function(){
if(typeof ic4_wai_integration!="undefined"&&ic4_wai_integration===true){
if(typeof waiHideSecondaryNav!="undefined"&&waiHideSecondaryNav===true){
document.getElementById("wpthemeSecondaryBanner").style.display="none";
document.getElementById("wpthemeMainContent").style.display="none";
}
document.getElementById("wptheme_banner").removeAttribute("role");
document.getElementById("wptheme_contentinfo").removeAttribute("role");
if(dojo!="undefined"){
djConfig.locale=dojo.locale;
dojo.addOnLoad(function(){
document.getElementById("logoutlink").onclick=null;
});
}
if(typeof appName!="undefined"&&appName==="profile"){
ibmConfig.proxyURL=svcHrefProfiles+"/ajaxProxy/";
ibmConfig["com.ibm.mashups.proxy.url"]=svcHrefProfiles+"/ajaxProxy";
djConfig.baseUrl=(needProxy?(ibmConfig.proxyURL+encodeURIComponent(baseProtocol)+"/"+encodeURIComponent(baseHost)):(baseProtocol+"://"+baseHost))+basePath+"/web/dojo/";
djConfig.proxy=applicationContext+"/ajaxProxy";
}
if(typeof i$!="undefined"&&i$.isRTL){
document.body.className=document.body.className.replace("lotusImagesOff","");
document.body.className+=" wptheme_ic4_wai_rtl";
}
}
})();


}catch(e){console.log("Module 'wp_ic4_wai_resources': ",e);}
try{(function(){
    i$.merge({
	"ICON_STOP":"msgError",
	"ICON_SUCCESS":"msgSuccess",
	"BUTTON_RETRY":"Retry",
	"BUTTON_YES":"Yes",
	"BUTTON_NO":"No",
	"BUTTON_IGNORE":"Ignore",
	"LINK_LEARN_MORE":"Learn More",
	"ICON_WARNING":"msgWarning",
	"ICON_INFORMATION":"msgInfo",
	"LOADING_IMAGE_0":"loading image",
	"BUTTON_ABORT":"Abort",
	"ICON_EXCLAMATION":"msgWarning",
	"BUTTON_CANCEL":"Cancel",
	"BUTTON_CONTINUE":"Continue",
	"BUTTON_OK":"Ok",
	"BUTTON_TRY":"Try Again",
	"LOADING_0":"Loading...",
	"ICON_ASTERISK":"msgInfo",
	"ICON_ERROR":"msgError",
	"CLOSE_IMAGE_0":"close image",
	"CLOSE_0":"Close"
},i$.fromPath("wpModules.dialog.nls",true));
})();
}catch(e){console.log("Module 'wp_dialog_main': ",e);}
try{/** AJAX SOLR COMBINED JS **/

/*************************************/
/** AJAX SOLR COMBINED JS - CORE.JS **/
/*************************************/
/**
 * @namespace A unique namespace for the AJAX Solr library.
 */
AjaxSolr = function () {};

/**
 * @namespace Baseclass for all classes
 * @see https://github.com/documentcloud/backbone/blob/51eed189bf4d25877be4acdf51e0a4c6039583c5/backbone.js#L243
 */
AjaxSolr.Class = function(attributes) {
  AjaxSolr.extend(this, attributes);
};

/**
 * A class 'extends' itself into a subclass.
 *
 * @static
 * @param protoProps The properties of the subclass.
 * @returns A function that represents the subclass.
 * @see https://github.com/documentcloud/backbone/blob/51eed189bf4d25877be4acdf51e0a4c6039583c5/backbone.js#L1516
 */
AjaxSolr.Class.extend = function (protoProps, staticProps) {
  var parent = this;
  var child;

  // The constructor function for the new subclass is either defined by you
  // (the "constructor" property in your `extend` definition), or defaulted
  // by us to simply call the parent's constructor.
  if (protoProps && Object.prototype.hasOwnProperty.call(protoProps, 'constructor')) {
    child = protoProps.constructor;
  } else {
    child = function(){ return parent.apply(this, arguments); };
  }

  // Add static properties to the constructor function, if supplied.
  AjaxSolr.extend(child, parent, staticProps);

  // Set the prototype chain to inherit from `parent`, without calling
  // `parent`'s constructor function.
  var Surrogate = function(){ this.constructor = child; };
  Surrogate.prototype = parent.prototype;
  child.prototype = new Surrogate;

  // Add prototype properties (instance properties) to the subclass,
  // if supplied.
  if (protoProps) AjaxSolr.extend(child.prototype, protoProps);

  // Set a convenience property in case the parent's prototype is needed
  // later.
  child.__super__ = parent.prototype;

  return child;
};

/**
 * @static
 * @see https://github.com/documentcloud/underscore/blob/7342e289aa9d91c5aacfb3662ea56e7a6d081200/underscore.js#L789
*/
AjaxSolr.extend = function (child) {
  // From _.extend
  var obj = Array.prototype.slice.call(arguments, 1);

  // From _.extend
  var iterator = function(source) {
    if (source) {
      for (var prop in source) {
        child[prop] = source[prop];
      }
    }
  };

  // From _.each
  if (obj == null) return;
  if (Array.prototype.forEach && obj.forEach === Array.prototype.forEach) {
    obj.forEach(iterator);
  } else if (obj.length === +obj.length) {
    for (var i = 0, l = obj.length; i < l; i++) {
      iterator.call(undefined, obj[i], i, obj);
    }
  } else {
    for (var key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key)) {
        iterator.call(undefined, obj[key], key, obj);
      }
    }
  }

  return child;
};

/**
 * @static
 * @param value A value.
 * @param array An array.
 * @returns {Boolean} Whether value exists in the array.
 */
AjaxSolr.inArray = function (value, array) {
  if (array) {
    for (var i = 0, l = array.length; i < l; i++) {
      if (AjaxSolr.equals(array[i], value)) {
        return i;
      }
    }
  }
  return -1;
};

/**
 * @static
 * @param foo A value.
 * @param bar A value.
 * @returns {Boolean} Whether the two given values are equal.
 */
AjaxSolr.equals = function (foo, bar) {
  if (AjaxSolr.isArray(foo) && AjaxSolr.isArray(bar)) {
    if (foo.length !== bar.length) {
      return false;
    }
    for (var i = 0, l = foo.length; i < l; i++) {
      if (foo[i] !== bar[i]) {
        return false;
      }
    }
    return true;
  }
  else if (AjaxSolr.isRegExp(foo) && AjaxSolr.isString(bar)) {
    return bar.match(foo);
  }
  else if (AjaxSolr.isRegExp(bar) && AjaxSolr.isString(foo)) {
    return foo.match(bar);
  }
  else {
    return foo === bar;
  }
};

/**
 * Can't use toString.call(obj) === "[object Array]", as it may return
 * "[xpconnect wrapped native prototype]", which is undesirable.
 *
 * @static
 * @see http://thinkweb2.com/projects/prototype/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
 * @see http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
 */
AjaxSolr.isArray = function (obj) {
  return obj != null && typeof obj == 'object' && 'splice' in obj && 'join' in obj;
};

/**
 * @param obj Any object.
 * @returns {Boolean} Whether the object is a RegExp object.
 */
AjaxSolr.isRegExp = function (obj) {
  return obj != null && (typeof obj == 'object' || typeof obj == 'function') && 'ignoreCase' in obj;
};

/**
 * @param obj Any object.
 * @returns {Boolean} Whether the object is a String object.
 */
AjaxSolr.isString = function (obj) {
  return obj != null && typeof obj == 'string';
};

/*************************************************/
/** AJAX SOLR COMBINED JS - ABSTRACT MANAGER JS **/
/*************************************************/

(function (callback) {
 // if (typeof define === 'function' && define.amd) {
   // define(['core/Core'], callback);
  //}
  //else {
    callback();
  //}
}(function () {

/**
 * The Manager acts as the controller in a Model-View-Controller framework. All
 * public calls should be performed on the manager object.
 *
 * @param properties A map of fields to set. Refer to the list of public fields.
 * @class AbstractManager
 */
AjaxSolr.AbstractManager = AjaxSolr.Class.extend(
  /** @lends AjaxSolr.AbstractManager.prototype */
  {
  /**
   * @param {Object} [attributes]
   * @param {String} [attributes.solrUrl] The fully-qualified URL of the Solr
   *   application. You must include the trailing slash. Do not include the path
   *   to any Solr servlet. Defaults to "http://localhost:8983/solr/"
   * @param {String} [attributes.proxyUrl] If we want to proxy queries through a
   *   script, rather than send queries to Solr directly, set this field to the
   *   fully-qualified URL of the script.
   * @param {String} [attributes.servlet] The default Solr servlet. You may
   *   prepend the servlet with a core if using multiple cores. Defaults to
   *   "servlet".
   */
  constructor: function (attributes) {
    AjaxSolr.extend(this, {
      solrUrl: 'http://localhost:8983/solr/',
      proxyUrl: null,
      servlet: 'select',
      // The most recent response from Solr.
      response: {},
      // A collection of all registered widgets.
      widgets: {},
      // The parameter store for the manager and its widgets.
      store: null,
      // Whether <tt>init()</tt> has been called yet.
      initialized: false
    }, attributes);
  },

  /**
   * An abstract hook for child implementations.
   *
   * <p>This method should be called after the store and the widgets have been
   * added. It should initialize the widgets and the store, and do any other
   * one-time initializations, e.g., perform the first request to Solr.</p>
   *
   * <p>If no store has been set, it sets the store to the basic <tt>
   * AjaxSolr.ParameterStore</tt>.</p>
   */
  init: function () {
    this.initialized = true;
    if (this.store === null) {
      this.setStore(new AjaxSolr.ParameterStore());
    }
    this.store.load(false);
    for (var widgetId in this.widgets) {
      this.widgets[widgetId].init();
    }
    this.store.init();
  },

  /**
   * Set the manager's parameter store.
   *
   * @param {AjaxSolr.ParameterStore} store
   */
  setStore: function (store) {
    store.manager = this;
    this.store = store;
  },

  /**
   * Adds a widget to the manager.
   *
   * @param {AjaxSolr.AbstractWidget} widget
   */
  addWidget: function (widget) {
    widget.manager = this;
    this.widgets[widget.id] = widget;
  },

  /**
   * Stores the Solr parameters to be sent to Solr and sends a request to Solr.
   *
   * @param {Boolean} [start] The Solr start offset parameter.
   * @param {String} [servlet] The Solr servlet to send the request to.
   */
  doRequest: function (start, servlet) {
    if (this.initialized === false) {
      this.init();
    }
    // Allow non-pagination widgets to reset the offset parameter.
    if (start !== undefined) {
      this.store.get('start').val(start);
    }
    if (servlet === undefined) {
      servlet = this.servlet;
    }

    this.store.save();

    for (var widgetId in this.widgets) {
      this.widgets[widgetId].beforeRequest();
    }

    this.executeRequest(servlet);
  },

  /**
   * An abstract hook for child implementations.
   *
   * <p>Sends the request to Solr, i.e. to <code>this.solrUrl</code> or <code>
   * this.proxyUrl</code>, and receives Solr's response. It should pass Solr's
   * response to <code>handleResponse()</code> for handling.</p>
   *
   * <p>See <tt>managers/Manager.jquery.js</tt> for a jQuery implementation.</p>
   *
   * @param {String} servlet The Solr servlet to send the request to.
   * @param {String} string The query string of the request. If not set, it
   *   should default to <code>this.store.string()</code>
   * @throws If not defined in child implementation.
   */
  executeRequest: function (servlet, string) {
    throw 'Abstract method executeRequest must be overridden in a subclass.';
  },

  /**
   * This method is executed after the Solr response data arrives. Allows each
   * widget to handle Solr's response separately.
   *
   * @param {Object} data The Solr response.
   */
  handleResponse: function (data) {
    this.response = data;

    for (var widgetId in this.widgets) {
      this.widgets[widgetId].afterRequest();
    }
  },

  /**
   * This method is executed if Solr encounters an error.
   *
   * @param {String} message An error message.
   */
  handleError: function (message) {
    window.console && console.log && console.log(message);
  }
});

}));

/***********************************************/
/** AJAX SOLR COMBINED JS - MANAGER JQUERY JS **/
/***********************************************/

(function (callback) {
 // if (typeof define === 'function' && define.amd) {
   // define(['core/AbstractManager'], callback);
  //}
  //else {
    callback();
 // }
}(function () {

/**
 * @see http://wiki.apache.org/solr/SolJSON#JSON_specific_parameters
 * @class Manager
 * @augments AjaxSolr.AbstractManager
 */
	AjaxSolr.Manager = AjaxSolr.AbstractManager.extend(
	  /** @lends AjaxSolr.Manager.prototype */
	  {
	  executeRequest: function (servlet, string, handler, errorHandler) {
		var self = this,
			options = {dataType: 'json'};
		string = string || this.store.string();
		handler = function (data) {
		  self.handleResponse(data);
		};
		errorHandler = errorHandler || function (jqXHR, textStatus, errorThrown) {
		  if(jqXHR.status == 302) {
		    self.handleResponse(jqXHR.responseJSON);
		  } else {
		    self.handleError(textStatus + ', ' + errorThrown);
		  }
		};

		options.url = this.solrUrl + servlet + '?' + string + '&wt=json';		//&json.wrf=?';
		//Stubbing JSON response for local
		//options.url = "../../../wcsstore/AvnetSAS/javascript/ParametricSearch/ResultJsonLM324.js";
		jQuery.ajax(options).done(handler).fail(errorHandler);	
	  }
	});

}));

/******************************************/
/** AJAX SOLR COMBINED JS - PARAMETER JS **/
/******************************************/

(function (callback) {
 // if (typeof define === 'function' && define.amd) {
   // define(['core/Core'], callback);
  //}
  //else {
    callback();
  //}
}(function () {

/**
 * Represents a Solr parameter.
 *
 * @param properties A map of fields to set. Refer to the list of public fields.
 * @class Parameter
 */
AjaxSolr.Parameter = AjaxSolr.Class.extend(
  /** @lends AjaxSolr.Parameter.prototype */
  {
  /**
   * @param {Object} attributes
   * @param {String} attributes.name The parameter's name.
   * @param {String} [attributes.value] The parameter's value.
   * @param {Object} [attributes.local] The parameter's local parameters.
   */
  constructor: function (attributes) {
    AjaxSolr.extend(this, {
      name: null,
      value: null,
      locals: {}
    }, attributes);
  },

  /**
   * Returns the value. If called with an argument, sets the value.
   *
   * @param {String|Number|String[]|Number[]} [value] The value to set.
   * @returns The value.
   */
  val: function (value) {
    if (value === undefined) {
      return this.value;
    }
    else {
      this.value = value;
    }
  },

  /**
   * Returns the value of a local parameter. If called with a second argument,
   * sets the value of a local parameter.
   *
   * @param {String} name The name of the local parameter.
   * @param {String|Number|String[]|Number[]} [value] The value to set.
   * @returns The value.
   */
  local: function (name, value) {
    if (value === undefined) {
      return this.locals[name];
    }
    else {
      this.locals[name] = value;
    }
  },

  /**
   * Deletes a local parameter.
   *
   * @param {String} name The name of the local parameter.
   */
  remove: function (name) {
    delete this.locals[name];
  },

  /**
   * Returns the Solr parameter as a query string key-value pair.
   *
   * <p>IE6 calls the default toString() if you write <tt>store.toString()
   * </tt>. So, we need to choose another name for toString().</p>
   */
  string: function () {
    var pairs = [];

    for (var name in this.locals) {
      if (this.locals[name]) {
        pairs.push(name + '=' + encodeURIComponent(this.locals[name]));
      }
    }

    var prefix = pairs.length ? '{!' + pairs.join('%20') + '}' : '';

    if (this.value) {
      return this.name + '=' + prefix + this.valueString(this.value);
    }
    // For dismax request handlers, if the q parameter has local params, the
    // q parameter must be set to a non-empty value. In case the q parameter
    // has local params but is empty, use the q.alt parameter, which accepts
    // wildcards.
    else if (this.name == 'q' && prefix) {
      return 'q.alt=' + prefix + encodeURIComponent('*:*');
    }
    else {
      return '';
    }
  },

  /**
   * Parses a string formed by calling string().
   *
   * @param {String} str The string to parse.
   */
  parseString: function (str) {
    var param = str.match(/^([^=]+)=(?:\{!([^\}]*)\})?(.*)$/);
    if (param) {
      var matches;

      while (matches = /([^\s=]+)=(\S*)/g.exec(decodeURIComponent(param[2]))) {
        this.locals[matches[1]] = decodeURIComponent(matches[2]);
        param[2] = param[2].replace(matches[0], ''); // Safari's exec seems not to do this on its own
      }

      if (param[1] == 'q.alt') {
        this.name = 'q';
        // if q.alt is present, assume it is because q was empty, as above
      }
      else {
        this.name = param[1];
        this.value = this.parseValueString(param[3]);
      }
    }
  },

  /**
   * Returns the value as a URL-encoded string.
   *
   * @private
   * @param {String|Number|String[]|Number[]} value The value.
   * @returns {String} The URL-encoded string.
   */
  valueString: function (value) {
    value = AjaxSolr.isArray(value) ? value.join(',') : value;
    return encodeURIComponent(value);
  },

  /**
   * Parses a URL-encoded string to return the value.
   *
   * @private
   * @param {String} str The URL-encoded string.
   * @returns {Array} The value.
   */
  parseValueString: function (str) {
    str = decodeURIComponent(str);
    return str.indexOf(',') == -1 ? str : str.split(',');
  }
});

/**
 * Escapes a value, to be used in, for example, an fq parameter. Surrounds
 * strings containing spaces or colons in double quotes.
 *
 * @public
 * @param {String|Number} value The value.
 * @returns {String} The escaped value.
 */
AjaxSolr.Parameter.escapeValue = function (value) {
  // If the field value has a space, colon, quotation mark or forward slash
  // in it, wrap it in quotes, unless it is a range query or it is already
  // wrapped in quotes.
  if (value.match(/[ :\/"]/) && !value.match(/[\[\{]\S+ TO \S+[\]\}]/) && !value.match(/^["\(].*["\)]$/)) {
    return '"' + value.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
  }
  return value;
}

}));

/************************************************/
/** AJAX SOLR COMBINED JS - PARAMETER STORE JS **/
/************************************************/

(function (callback) {
  //if (typeof define === 'function' && define.amd) {
    //define(['core/Core', 'core/Parameter'], callback);
  //}
  //else {
    callback();
  //}
}(function () {

/**
 * The ParameterStore, as its name suggests, stores Solr parameters. Widgets
 * expose some of these parameters to the user. Whenever the user changes the
 * values of these parameters, the state of the application changes. In order to
 * allow the user to move back and forth between these states with the browser's
 * Back and Forward buttons, and to bookmark these states, each state needs to
 * be stored. The easiest method is to store the exposed parameters in the URL
 * hash (see the <tt>ParameterHashStore</tt> class). However, you may implement
 * your own storage method by extending this class.
 *
 * <p>For a list of possible parameters, please consult the links below.</p>
 *
 * @see http://wiki.apache.org/solr/CoreQueryParameters
 * @see http://wiki.apache.org/solr/CommonQueryParameters
 * @see http://wiki.apache.org/solr/SimpleFacetParameters
 * @see http://wiki.apache.org/solr/HighlightingParameters
 * @see http://wiki.apache.org/solr/MoreLikeThis
 * @see http://wiki.apache.org/solr/SpellCheckComponent
 * @see http://wiki.apache.org/solr/StatsComponent
 * @see http://wiki.apache.org/solr/TermsComponent
 * @see http://wiki.apache.org/solr/TermVectorComponent
 * @see http://wiki.apache.org/solr/LocalParams
 *
 * @param properties A map of fields to set. Refer to the list of public fields.
 * @class ParameterStore
 */
AjaxSolr.ParameterStore = AjaxSolr.Class.extend(
  /** @lends AjaxSolr.ParameterStore.prototype */
  {
  constructor: function (attributes) {
    /**
     * @param {Object} [attributes]
     * @param {String[]} [attributes.exposed] The names of the exposed
     *   parameters. Any parameters that your widgets expose to the user,
     *   directly or indirectly, should be listed here.
     */
    AjaxSolr.extend(this, {
      exposed: [],
      // The Solr parameters.
      params: {},
      // A reference to the parameter store's manager.
      manager: null
    }, attributes);
  },

  /**
   * An abstract hook for child implementations.
   *
   * <p>This method should do any necessary one-time initializations.</p>
   */
  init: function () {},

  /**
   * Some Solr parameters may be specified multiple times. It is easiest to
   * hard-code a list of such parameters. You may change the list by passing
   * <code>{ multiple: /pattern/ }</code> as an argument to the constructor of
   * this class or one of its children, e.g.:
   *
   * <p><code>new ParameterStore({ multiple: /pattern/ })</code>
   *
   * @param {String} name The name of the parameter.
   * @returns {Boolean} Whether the parameter may be specified multiple times.
   * @see http://lucene.apache.org/solr/api/org/apache/solr/handler/DisMaxRequestHandler.html
   */
  isMultiple: function (name) {
    return name.match(/^(?:contractId|bf|bq|facet\.date|facet\.date\.other|facet\.date\.include|facet\.field|facet\.pivot|facet\.range|facet\.range\.other|facet\.range\.include|facet\.query|fq|facet|group\.field|group\.func|group\.query|pf|qf)$/);
  },

  /**
   * Returns a parameter. If the parameter doesn't exist, creates it.
   *
   * @param {String} name The name of the parameter.
   * @returns {AjaxSolr.Parameter|AjaxSolr.Parameter[]} The parameter.
   */
  get: function (name) {
    if (this.params[name] === undefined) {
      var param = new AjaxSolr.Parameter({ name: name });
      if (this.isMultiple(name)) {
        this.params[name] = [ param ];
      }
      else {
        this.params[name] = param;
      }
    }
    return this.params[name];
  },

  /**
   * If the parameter may be specified multiple times, returns the values of
   * all identically-named parameters. If the parameter may be specified only
   * once, returns the value of that parameter.
   *
   * @param {String} name The name of the parameter.
   * @returns {String[]|Number[]} The value(s) of the parameter.
   */
  values: function (name) {
    if (this.params[name] !== undefined) {
      if (this.isMultiple(name)) {
        var values = [];
        for (var i = 0, l = this.params[name].length; i < l; i++) {
          values.push(this.params[name][i].val());
        }
        return values;
      }
      else {
        return [ this.params[name].val() ];
      }
    }
    return [];
  },

  /**
   * If the parameter may be specified multiple times, adds the given parameter
   * to the list of identically-named parameters, unless one already exists with
   * the same value. If it may be specified only once, replaces the parameter.
   *
   * @param {String} name The name of the parameter.
   * @param {AjaxSolr.Parameter} [param] The parameter.
   * @returns {AjaxSolr.Parameter|Boolean} The parameter, or false.
   */
  add: function (name, param) {
    if (param === undefined) {
      param = new AjaxSolr.Parameter({ name: name });
    }
    if (this.isMultiple(name)) {
      if (this.params[name] === undefined) {
        this.params[name] = [ param ];
      }
      else {
        if (AjaxSolr.inArray(param.val(), this.values(name)) == -1) {
          this.params[name].push(param);
        }
        else {
          return false;
        }
      }
    }
    else {
      this.params[name] = param;
    }
    return param;
  },

  /**
   * Deletes a parameter.
   *
   * @param {String} name The name of the parameter.
   * @param {Number} [index] The index of the parameter.
   */
  remove: function (name, index) {
    if (index === undefined) {
      delete this.params[name];
    }
    else {
      this.params[name].splice(index, 1);
      if (this.params[name].length == 0) {
        delete this.params[name];
      }
    }
  },

  /**
   * Finds all parameters with matching values.
   *
   * @param {String} name The name of the parameter.
   * @param {String|Number|String[]|Number[]|RegExp} value The value.
   * @returns {String|Number[]} The indices of the parameters found.
   */
  find: function (name, value) {
    if (this.params[name] !== undefined) {
      if (this.isMultiple(name)) {
        var indices = [];
        for (var i = 0, l = this.params[name].length; i < l; i++) {
          if (AjaxSolr.equals(this.params[name][i].val(), value)) {
            indices.push(i);
          }
        }
        return indices.length ? indices : false;
      }
      else {
        if (AjaxSolr.equals(this.params[name].val(), value)) {
          return name;
        }
      }
    }
    return false;
  },

  /**
   * If the parameter may be specified multiple times, creates a parameter using
   * the given name and value, and adds it to the list of identically-named
   * parameters, unless one already exists with the same value. If it may be
   * specified only once, replaces the parameter.
   *
   * @param {String} name The name of the parameter.
   * @param {String|Number|String[]|Number[]} value The value.
   * @param {Object} [locals] The parameter's local parameters.
   * @returns {AjaxSolr.Parameter|Boolean} The parameter, or false.
   */
  addByValue: function (name, value, locals) {
    if (locals === undefined) {
      locals = {};
    }
    if (this.isMultiple(name) && AjaxSolr.isArray(value)) {
      var ret = [];
      for (var i = 0, l = value.length; i < l; i++) {
        ret.push(this.add(name, new AjaxSolr.Parameter({ name: name, value: value[i], locals: locals })));
      }
      return ret;
    }
    else {
      return this.add(name, new AjaxSolr.Parameter({ name: name, value: value, locals: locals }));
    }
  },

  /**
   * Deletes any parameter with a matching value.
   *
   * @param {String} name The name of the parameter.
   * @param {String|Number|String[]|Number[]|RegExp} value The value.
   * @returns {String|Number[]} The indices deleted.
   */
  removeByValue: function (name, value) {
    var indices = this.find(name, value);
    if (indices) {
      if (AjaxSolr.isArray(indices)) {
        for (var i = indices.length - 1; i >= 0; i--) {
          this.remove(name, indices[i]);
        }
      }
      else {
        this.remove(indices);
      }
    }
    return indices;
  },

  /**
   * Returns the Solr parameters as a query string.
   *
   * <p>IE6 calls the default toString() if you write <tt>store.toString()
   * </tt>. So, we need to choose another name for toString().</p>
   */
  string: function () {
    var params = [], string;
    for (var name in this.params) {
      if (this.isMultiple(name)) {
        for (var i = 0, l = this.params[name].length; i < l; i++) {
          string = this.params[name][i].string();
          if (string) {
			if(name == 'q' || name == 'searchTerm' || name == 'intentSearchTerm' || name == '_wcf.search.expr') {
				params.push(string);
			} else {
				params.push(decodeURIComponent(string));
			}
          }
        }
      }
      else {
        string = this.params[name].string();
        if (string) {
          if(name == 'q' || name == 'searchTerm' || name == 'intentSearchTerm' || name == '_wcf.search.expr') {
			params.push(string);
		  } else {
			params.push(decodeURIComponent(string));
		  }
        }
      }
    }
    return params.join('&');
  },

  /**
   * Parses a query string into Solr parameters.
   *
   * @param {String} str The string to parse.
   */
  parseString: function (str) {
    var pairs = str.split('&');
    for (var i = 0, l = pairs.length; i < l; i++) {
      if (pairs[i]) { // ignore leading, trailing, and consecutive &'s
        var param = new AjaxSolr.Parameter();
        param.parseString(pairs[i]);
        this.add(param.name, param);
      }
    }
  },

  /**
   * Returns the exposed parameters as a query string.
   *
   * @returns {String} A string representation of the exposed parameters.
   */
  exposedString: function () {
    var params = [], string;
    for (var i = 0, l = this.exposed.length; i < l; i++) {
      if (this.params[this.exposed[i]] !== undefined) {
        if (this.isMultiple(this.exposed[i])) {
          for (var j = 0, m = this.params[this.exposed[i]].length; j < m; j++) {
            string = this.params[this.exposed[i]][j].string();
            if (string) {
              params.push(string);
            }
          }
        }
        else {
          string = this.params[this.exposed[i]].string();
          if (string) {
            params.push(string);
          }
        }
      }
    }
    return params.join('&');
  },

  /**
   * Resets the values of the exposed parameters.
   */
  exposedReset: function () {
    for (var i = 0, l = this.exposed.length; i < l; i++) {
      this.remove(this.exposed[i]);
    }
  },

  /**
   * Loads the values of exposed parameters from persistent storage. It is
   * necessary, in most cases, to reset the values of exposed parameters before
   * setting the parameters to the values in storage. This is to ensure that a
   * parameter whose name is not present in storage is properly reset.
   *
   * @param {Boolean} [reset=true] Whether to reset the exposed parameters.
   *   before loading new values from persistent storage. Default: true.
   */
  load: function (reset) {
    if (reset === undefined) {
      reset = true;
    }
    if (reset) {
      this.exposedReset();
    }
    this.parseString(this.storedString());
  },

  /**
   * An abstract hook for child implementations.
   *
   * <p>Stores the values of the exposed parameters in persistent storage. This
   * method should usually be called before each Solr request.</p>
   */
  save: function () {},

  /**
   * An abstract hook for child implementations.
   *
   * <p>Returns the string to parse from persistent storage.</p>
   *
   * @returns {String} The string from persistent storage.
   */
  storedString: function () {
    return '';
  }
});

}));

/*****************************************************/
/** AJAX SOLR COMBINED JS - PARAMETER HASH STORE JS **/
/*****************************************************/

(function (callback) {
 // if (typeof define === 'function' && define.amd) {
   // define(['core/ParameterStore'], callback);
  //}
  //else {
    callback();
  //}
}(function () {

/**
 * A parameter store that stores the values of exposed parameters in the URL
 * hash to maintain the application's state.
 *
 * <p>The ParameterHashStore observes the hash for changes and loads Solr
 * parameters from the hash if it observes a change or if the hash is empty.
 * The onhashchange event is used if the browser supports it.</p>
 *
 * <p>Configure the manager with:</p>
 *
 * @class ParameterHashStore
 * @augments AjaxSolr.ParameterStore
 * @see https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange
 */
AjaxSolr.ParameterHashStore = AjaxSolr.ParameterStore.extend(
  /** @lends AjaxSolr.ParameterHashStore.prototype */
  {
  /**
   * @param {Object} [attributes]
   * @param {Number} [attributes.interval] The interval in milliseconds to use
   *   in <tt>setInterval()</tt>. Do not set the interval too low as you may set
   *   up a race condition. Defaults to 250.
   */
  constructor: function (attributes) {
    AjaxSolr.ParameterHashStore.__super__.constructor.apply(this, arguments);
    AjaxSolr.extend(this, {
      interval: 250,
      // Reference to the setInterval() function.
      intervalId: null,
      // A local copy of the URL hash, so we can detect changes to it.
      hash: ''
    }, attributes);
  },

  /**
   * If loading and saving the hash take longer than <tt>interval</tt>, we'll
   * hit a race condition. However, this should never happen.
   */
  init: function () {
    if (this.exposed.length) {
      // Check if the browser supports the onhashchange event. IE 8 and 9 in compatibility mode
      // incorrectly report support for onhashchange.
      if ('onhashchange' in window && (!document.documentMode || document.documentMode > 7)) {
        if (window.addEventListener) {
          window.addEventListener('hashchange', this.intervalFunction(this), false);
        }
        else if (window.attachEvent) {
          window.attachEvent('onhashchange', this.intervalFunction(this));
        }
        else {
          window.onhashchange = this.intervalFunction(this);
        }
      }
      else {
        this.intervalId = window.setInterval(this.intervalFunction(this), this.interval);
      }
    }
  },

  /**
   * Stores the values of the exposed parameters in both the local hash and the
   * URL hash. No other code should be made to change these two values.
   */
  save: function () {
    this.hash = this.exposedString();
    if (this.storedString()) {
      // Make a new history entry.
      window.location.hash = this.hash;
    }
    else {
      // Replace the old history entry.
      window.location.replace(window.location.href.replace('#', '') + '#' + this.hash);
    }
  },

  /**
   * @see ParameterStore#storedString()
   */
  storedString: function () {
    // Some browsers automatically unescape characters in the hash, others
    // don't. Fortunately, all leave window.location.href alone. So, use that.
    var index = window.location.href.indexOf('#');
    if (index == -1) {
      return '';
    }
    else {
      return window.location.href.substr(index + 1);
    }
  },

  /**
   * Checks the hash for changes, and loads Solr parameters from the hash and
   * sends a request to Solr if it observes a change or if the hash is empty
   */
  intervalFunction: function (self) {
    return function () {
      // Support the back/forward buttons. If the hash changes, do a request.
      var hash = self.storedString();
      if (self.hash != hash && decodeURIComponent(self.hash) != decodeURIComponent(hash)) {
        self.load();
        self.manager.doRequest();
      }
    }
  }
});

}));

/************************************************/
/** AJAX SOLR COMBINED JS - ABSTRACT WIDGET JS **/
/************************************************/

(function (callback) {
  //if (typeof define === 'function' && define.amd) {
    //define(['core/Core'], callback);
 // }
  //else {
    callback();
  //}
}(function () {

/**
 * Baseclass for all widgets.
 *
 * Provides abstract hooks for child classes.
 *
 * @param properties A map of fields to set. May be new or public fields.
 * @class AbstractWidget
 */
AjaxSolr.AbstractWidget = AjaxSolr.Class.extend(
  /** @lends AjaxSolr.AbstractWidget.prototype */
  {
  /**
   * @param {Object} attributes
   * @param {String} attributes.id A unique identifier of this widget.
   * @param {String} [attributes.target] The CSS selector for this widget's
   *   target HTML element, e.g. a specific <tt>div</tt> or <tt>ul</tt>. A
   *   Widget is usually implemented to perform all its UI changes relative to
   *   its target HTML element.
   * @param {Number} [attributes.start] The offset parameter. Set this field to
   *   make the widget reset the offset parameter to the given value on each
   *   request.
   * @param {String} [attributes.servlet] The Solr servlet for this widget. You
   *   may prepend the servlet with a core if using multiple cores. If none is
   *   set, it will default to the manager's servlet.
   */
  constructor: function (attributes) {
    AjaxSolr.extend(this, {
      id: null,
      target: null,
      start: undefined,
      servlet: undefined,
      // A reference to the widget's manager.
      manager: null
    }, attributes);
  },

  /**
   * An abstract hook for child implementations.
   *
   * <p>This method should do any necessary one-time initializations.</p>
   */
  init: function () {},

  /**
   * An abstract hook for child implementations.
   *
   * <p>This method is executed before the Solr request is sent.</p>
   */
  beforeRequest: function () {},

  /**
   * An abstract hook for child implementations.
   *
   * <p>This method is executed after the Solr response is received.</p>
   */
  afterRequest: function () {},

  /**
   * A proxy to the manager's doRequest method.
   *
   * @param {Boolean} [start] The Solr start offset parameter.
   * @param {String} [servlet] The Solr servlet to send the request to.
   */
  doRequest: function (start, servlet) {
    this.manager.doRequest(start || this.start, servlet || this.servlet);
  }
});

}));


/************************************************/
/** AJAX SOLR COMBINED JS - RESULT WIDGET JS **/
/************************************************/

(function ($) {
	
	var storeParams = {};
	var contractParams = {};
	var responseParams = {};
	var boostQuery = {};
	var filterQuery = {};
	var npifilterQuery = {};
	
	function initSolrParams() {
		storeParams = {	'storeId': '715839035', 'catalogId': '10001',	'langId': '-1', 'currency': 'USD','orgEntityId':getOrgEntityId()};
		contractParams = {}; /* Multiple contract ids might get passed here */
		responseParams = {'responseFormat':'json','pageSize':'20','pageNumber':'1'};	//'debugQuery':'true'
	}
	
	var suggestProfileParams = {'searchType':'101','profileName':'Avn_findNavigationSuggestion_Products_Ajax'};
    AjaxSolr.AutoSuggestResultWidget = AjaxSolr.AbstractWidget.extend({
		beforeRequest: function () {
			this.manager.store.addByValue('searchTerm', $searchTerm);
		},
		afterRequest: function () {
			autoSuggestion[1] = this.manager.response;
			$.fn.renderSuggests(autoSuggestion);
		},
		init: function () {
			initSolrParams();
			for (var name in suggestProfileParams) { this.manager.store.addByValue(name, suggestProfileParams[name]); }
			for (var name in storeParams) { this.manager.store.addByValue(name, storeParams[name]); }
			for (var name in contractParams) { this.manager.store.addByValue(name, contractParams[name]); }
			//for (var name in boostQuery) { this.manager.store.addByValue(name, boostQuery[name]); }			
		}
	});
	
	AjaxSolr.ContentSuggestResultWidget = AjaxSolr.AbstractWidget.extend({
		beforeRequest: function () {
			this.manager.store.addByValue('searchTerm', $searchTerm);
		},
		afterRequest: function () {
			results = this.manager.response;
			suggestType=getURLParameter('mediatype',results.resourceId);
			if (suggestType==null)
				suggestType=getURLParameter('contentType',results.resourceId);
				
			if(suggestType=='docs'){autoSuggestion[2]=results;}
			else if(suggestType=='video'){autoSuggestion[3]=results;}
			else if(suggestType=='other'){autoSuggestion[4]=results;}
			
			$.fn.renderSuggests(autoSuggestion);
		},
		init: function () {
			initSolrParams();
			for (var name in storeParams) { this.manager.store.addByValue(name, storeParams[name]); }
		}
	});
	
	AjaxSolr.StaticSuggestResultWidget = AjaxSolr.AbstractWidget.extend({
		beforeRequest: function () {
			this.manager.store.addByValue('searchTerm', $searchTerm);
		},
		afterRequest: function () {
			autoSuggestion[0]=this.manager.response;
			//console.log("Category : "+autoSuggestion[0]);
			$.fn.renderSuggests(autoSuggestion);
		},
		init: function () {
			initSolrParams();
			for (var name in storeParams) { this.manager.store.addByValue(name, storeParams[name]); }
		}
	});
		
})(jQuery);

function getURLParameter(sParam, url) {
	if(url !=null){
		var sURLVariables = url.split('&');
		for (var i = 0; i < sURLVariables.length; i++)
		{
			var sParameterName = sURLVariables[i].split('=');
			if (sParameterName[0] == sParam)
			{
				return decodeURIComponent(sParameterName[1]);
			}
		}
	}
}	
/* parametricSearch js functions begin*/
(function ($) {
  $(function () {
	suggestManager = new AjaxSolr.Manager({
		solrUrl: '/search/resources/store/715839035/sitecontent/productSuggestionsBySearchTerm/'
    });
    suggestManager.addWidget(new AjaxSolr.AutoSuggestResultWidget({
    }));
    suggestManager.init();
	
	contentSuggestManager = new AjaxSolr.Manager({
  		solrUrl: '/search/resources/store/715839035/sitecontent/webContentsBySearchTerm/'
    });
  	contentSuggestManager.addWidget(new AjaxSolr.ContentSuggestResultWidget({
	}));
	contentSuggestManager.init();   
	
	staticSuggestManager = new AjaxSolr.Manager({
		solrUrl: '/search/resources/store/715839035/sitecontent/suggestions/',
		servlet: ''
    });
	staticSuggestManager.addWidget(new AjaxSolr.StaticSuggestResultWidget({
	}));
	staticSuggestManager.init();
	
  });
})(jQuery);	

$(document).ready(function(){
	
	autoSuggestion = new Array();
	$searchTerm = document.CatalogSearchForm.searchTerm.value;
	
	$('#searchInput').on('ajaxSuggest',function(){
            loadStaticSuggestions();
			//// Parts auto suggest
			$searchTerm = document.CatalogSearchForm.searchTerm.value;
			suggestManager.doRequest();
            ////
			/*contentSuggestManager.store.addByValue('profileName', 'Avn_findStaticManufactureWebContentSuggestion');
            contentSuggestManager.store.addByValue('contentType', 'manufacturer');
            contentSuggestManager.doRequest();*/
			////
            contentSuggestManager.store.addByValue('profileName', 'Avn_findAutoSuggestDocuments');
            contentSuggestManager.store.addByValue('_wcf.search.expr' , $searchTerm);
            contentSuggestManager.store.addByValue('mediatype' , 'docs');
            contentSuggestManager.doRequest();
			////
            contentSuggestManager.store.addByValue('profileName', 'Avn_findAutoSuggestVideos');
            contentSuggestManager.store.addByValue('_wcf.search.expr' , $searchTerm);
            contentSuggestManager.store.addByValue('mediatype' , 'video');
            contentSuggestManager.doRequest();
			////
            contentSuggestManager.store.addByValue('profileName', 'Avn_findWebContentSuggestion');
			contentSuggestManager.store.removeByValue('mediatype' , 'video');
            contentSuggestManager.store.addByValue('contentType', 'other');
            contentSuggestManager.doRequest();
            ////
            /*contentSuggestManager.store.addByValue('profileName', 'Avn_findWebContentSuggestion');
            contentSuggestManager.store.addByValue('contentType', 'event');
            contentSuggestManager.doRequest();*/
      });
	
	$.fn.renderSuggests = function(autoSuggestArray) {
		var autoSuggestJson = new Object();
		var suggestGroup = ['ctg','prt','doc','vid','oth'];
		var suggestCount=10;
		var nextElementIndex=0;

		for(i=0; i < autoSuggestArray.length;i++) {
			if(autoSuggestArray[i] == null || suggestCount <= 0) {
				break;
			} else {
				if(i == 0) {
					var categorySeparator = autoSuggestArray[0].suggestionView[0].categorySeparator;
					autoSuggestJson[suggestGroup[0]] = new Object();
					var categoryArray = new Array();
					var staticSuggestionCount = 0;
					autoSuggestJson[suggestGroup[0]].Category = new Array;
					autoSuggestJson[suggestGroup[0]].Manufacturers = new Array;
					autoSuggestJson[suggestGroup[0]].searchTerm= document.getElementById('searchInput').value;
					for(x=0;x<autoSuggestArray[0].suggestionView[0].entry.length;x++)
					{
                              if(((autoSuggestArray[0].suggestionView[0].entry[x].name).toLowerCase().indexOf($searchTerm.toLowerCase())!=-1)&&((autoSuggestArray[0].suggestionView[0].entry[x].fullPath).toLowerCase().indexOf(categorySeparator)!=-1))
                              {  
                            	  autoSuggestJson[suggestGroup[0]].Category[staticSuggestionCount] = new Object(); 
                            	  autoSuggestJson[suggestGroup[0]].Category[staticSuggestionCount].name= autoSuggestArray[0].suggestionView[0].entry[x].name;
                            	  autoSuggestJson[suggestGroup[0]].Category[staticSuggestionCount].value= autoSuggestArray[0].suggestionView[0].entry[x].value;
                            	  autoSuggestJson[suggestGroup[0]].Category[staticSuggestionCount].count=++nextElementIndex;
                            	  staticSuggestionCount++;
                              }

						if(staticSuggestionCount == 10) break;
                        }
					suggestCount = suggestCount - autoSuggestJson[suggestGroup[0]].Category.length;
					
					staticSuggestionCount=0;
					for(x=0;x<autoSuggestArray[0].suggestionView[1].entry.length;x++)
					{
						if((autoSuggestArray[0].suggestionView[1].entry[x].name).toLowerCase().indexOf($searchTerm.toLowerCase())!=-1 &&(autoSuggestArray[0].suggestionView[1].entry[x].mfcatgroup_id_path!=null)){
							autoSuggestJson[suggestGroup[0]].Manufacturers[staticSuggestionCount]=new Object();
							autoSuggestJson[suggestGroup[0]].Manufacturers[staticSuggestionCount].name = autoSuggestArray[0].suggestionView[1].entry[x].name;
							autoSuggestJson[suggestGroup[0]].Manufacturers[staticSuggestionCount].count = ++nextElementIndex;
							autoSuggestJson[suggestGroup[0]].Manufacturers[staticSuggestionCount].value = getCategoryId(autoSuggestArray[0].suggestionView[1].entry[x].mfcatgroup_id_path);
                      	  	staticSuggestionCount++;
							}
						if(staticSuggestionCount == suggestCount) break;
					}
					suggestCount = suggestCount - autoSuggestJson[suggestGroup[0]].Manufacturers.length;
					
				} else if(i == 1) {
					autoSuggestJson[suggestGroup[1]] = new Object();
					if(autoSuggestArray[1].DocumentList.length <= suggestCount) 
					{
						autoSuggestJson[suggestGroup[1]].DocumentList = autoSuggestArray[1].DocumentList;	
						for(k=0;k<autoSuggestJson[suggestGroup[1]].DocumentList.length;k++){
							autoSuggestJson[suggestGroup[1]].DocumentList[k].count = ++nextElementIndex;
						}
					} else {
						autoSuggestJson[suggestGroup[1]].DocumentList = new Array();
						for(j=0; j < suggestCount && j < autoSuggestArray[1].DocumentList.length; j++) {
							autoSuggestJson[suggestGroup[1]].DocumentList[j] = autoSuggestArray[1].DocumentList[j];
							autoSuggestJson[suggestGroup[1]].DocumentList[j].count=++nextElementIndex;
						}
					}
					suggestCount = suggestCount - autoSuggestJson[suggestGroup[1]].DocumentList.length;					
				} else {
					autoSuggestJson[suggestGroup[i]] = new Object();
					if(autoSuggestArray[i].webContentView.length <= suggestCount) {
						autoSuggestJson[suggestGroup[i]].webContentView = autoSuggestArray[i].webContentView;		
						for(k=0;k<autoSuggestArray[i].webContentView.length;k++){
							autoSuggestArray[i].webContentView[k].count=++nextElementIndex;
						}
					} else {
						autoSuggestJson[suggestGroup[i]].webContentView = new Array();
						for(j=0; j < suggestCount && j < autoSuggestArray[i].webContentView.length; j++) {
							autoSuggestJson[suggestGroup[i]].webContentView[j] = autoSuggestArray[i].webContentView[j];
							autoSuggestJson[suggestGroup[i]].webContentView[j].count=++nextElementIndex;
						}
					}
					suggestCount = suggestCount - autoSuggestJson[suggestGroup[i]].webContentView.length;
				}
				
			}
		}
		console.info(autoSuggestJson);
		$('#search_term_in_text').html(document.getElementById('searchInput').value);
		$('#auto-suggest-parts-dspl').html(Mustache.render($('#auto-suggest-parts-tmpl').html(), autoSuggestJson));
		if(suggestCount==10 && i == autoSuggestArray.length) {
			$("#autosuggest").removeClass("showAutoSuggest");
		}
	}

	function loadStaticSuggestions()
	{
		if(autoSuggestion[0] == null){
			staticSuggestManager.doRequest();
		} else {
			$.fn.renderSuggests(autoSuggestion);
		}
	}

});

function getCategoryId(catgroupString)
{
    var n = catgroupString.split("_");
   return n[n.length - 1];
}

function getOrgEntityId(){
	var orgIdStr = getCookieValue('WCMStore');
	if(typeof orgIdStr == "undefined" || orgIdStr ==  null || orgIdStr == ""){
		return "-2000";
	}
	return orgIdStr.split('|')[1];
}

function getCookieValue(cname){
        var name = cname + "=";
        var ca = document.cookie.split(';');
        for(var i=0; i<ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1);
            if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
        }
        return "";
}
/* parametricSearch js functions end*/
	

}catch(e){console.log("Module 'getting_started_module': ",e);}
try{//-----------------------------------------------------------------
// Licensed Materials - Property of IBM
//
// WebSphere Commerce Trademark
//
// (C) Copyright IBM Corp. 2013, 2014 All Rights Reserved.
//
// US Government Users Restricted Rights - Use, duplication or
// disclosure restricted by GSA ADP Schedule Contract with
// IBM Corp.
// This JS provides the autosuggestion
//-----------------------------------------------------------------


if(typeof(SearchJS) == "undefined" || SearchJS == null || !SearchJS){

                SearchJS = {

                                /**
                                * This variable controls the timer handler before triggering the autoSuggest.  If the user types fast, intermittent requests will be cancelled.
                                * The value is initialized to -1.
                                */
                                autoSuggestTimer: -1,

                                /**
                                * This variable controls the delay of the timer in milliseconds between the keystrokes before firing the search request.
                                * The value is initialized to 400.
                                */
                                autoSuggestKeystrokeDelay : 400,

                                /**
                                * This variable indicates whether or not the user is hovering over the autoSuggest results popup display.
                                * The value is initialized to false.
                                */
                                autoSuggestHover : false,

                                /**
                                * This variable stores the old search term used in the auto suggest search box
                                * The value is initialized to empty string.
                                */
                                autoSuggestPreviousTerm : "",

                                /**
                                * This variable stores the URL of currently selected static autosuggest recommendation
                                * The value is initialized to empty string.
                                */
                                autoSuggestURL : "",

                                /**
                                * This variable stores the index of the selected auto suggestion item when using up/down arrow keys.
                                * The value is initialized to -1.
                                */
                                autoSelectOption : -1,

                                /**
                                * This variable stores the index offset of the first previous history term
                                * The value is initialized to -1.
                                */
                                historyIndex : -1,

                                /**
                                * This variable indicates whether a the cached suggestions have been retrieved.
                                * The value is initialized to false.
                                */
                                retrievedCachedSuggestions : false,

                                /**
                                * This variable sets the total number of static autosuggest recommendations used for each static category/grouping.
                                * The value is initialized to 4.
                                */
                                TOTAL_SUGGESTED : 4,

                                /**
                                * This variable sets the total number of previous search history terms.
                                * The value is initialized to 2.
                                */
                                TOTAL_HISTORY : 2,

                                /**
                                * This variable controls when to trigger the auto suggest box.  The number of characters greater than this threshold will trigger the auto suggest functionality.
                                * The static/cached auto suggest will be performed if this threshold is exceeded.
                                * The value is initialized to 1.
                                */
                                AUTOSUGGEST_THRESHOLD : 2,

                                /**
                                * This variable controls when to trigger the dynamic auto suggest.  The number of characters greater than this threshold will trigger the request for keyword search.
                                * The static/cached auto suggest will be be displayed if the characters exceed the above config parameter, but exceeding this threshold will additionally perform the dynamic search to add to the results in the static/cached results.
                                * This value should be greater or equal than the AUTOSUGGEST_THRESHOLD, as the dynamic autosuggest is secondary to the static/cached auto suggest.
                                * The value is initialized to 1.
                                */
                                DYNAMIC_AUTOSUGGEST_THRESHOLD : 1,

                                /**
                                * This variable is an internal constant used in the element ID's generated in the autosuggest content.
                                * The value is initialized to 1000.
                                */
                                CACHED_AUTOSUGGEST_OFFSET : 1000,

                                /**
                                * This variable is used to indicate whether or not the auto suggest selection has reached the end of the list.
                                * The value is initialized to false.
                                */
                                END_OF_LIST : false,
                                /**
                                * The auto suggest container ID's
                                */
                                STATIC_CONTENT_SECTION_DIV: ["autoSuggestStatic_1", "autoSuggestStatic_2", "autoSuggestStatic_3"],


                                /**
                                * NLS message for header
                                */
                                staticContentHeaderHistory:"",

                                /**
                                * URL to retrieve Cached suggestions
                                */
                                CachedSuggestionsURL:"",

                                /**
                                * URL to retrieve auto suggest keywords
                                */
                                SearchAutoSuggestServletURL:"",

                                /**
                                * Timeout variable for department dropdown list
                                */
                                searchDepartmentHoverTimeout:"",
                                /**
                                * Timeout variable for suggestions dropdown list
                                */
                                searchSuggestionHoverTimeout:"",
                                /**
                                * Handle for dojo.connect onmousedown event.
                                */
                                mouseDownConnectHandle: null,
                                /**
                                * doStatic Search Term
                                */
                                staticSearchTerm: "",

                                searchDepartmentSelect: function(categoryId, lel){
                                                byId('searchDepartmentLabel').innerHTML=lel.innerHTML;
                                                byId('search_categoryId').value = categoryId;
                                                this.hideSearchDepartmentList();
                                                return false;
                                },

                                cancelEvent: function(e) {
                                                if (e.stopPropagation) {
                                                                e.stopPropagation();
                                                }
                                                if (e.preventDefault) {
                                                                e.preventDefault();
                                                }
                                                e.cancelBubble = true;
                                                e.cancel = true;
                                                e.returnValue = false;
                                },

                                searchDepartmentKeyPressed: function(event, pos, size, categoryId, item){
                                                if (event.keyCode == 13) { // enter
                                                                this.searchDepartmentSelect(categoryId, item);
                                                                var scrElement = document.getElementById("mobileSearchDropdown");
                                                                if (scrElement != null && scrElement.style.display == 'block'){
                                                                                dojo.byId("MobileSimpleSearchForm_SearchTerm").focus();
                                                                }else{
                                                                                document.CatalogSearchForm.searchTerm.focus();
                                                                }
                                                } else if (event.keyCode == 38) { // up arrow
                                                                if (pos != 0) {
                                                                                dojo.byId('searchDepartmentList_' + (pos - 1)).focus();
                                                                                this.cancelEvent(event);
                                                                }
                                                } else if (event.keyCode == 40) { // down arrow
                                                                if (pos != size) {
                                                                                dojo.byId('searchDepartmentList_' + (pos + 1)).focus();
                                                                                this.cancelEvent(event);
                                                                }
                                                } else if (event.keyCode == 27) { // escape
                                                                var scrElement = document.getElementById("mobileSearchDropdown");
                                                                if (scrElement != null && scrElement.style.display == 'block'){
                                                                                dojo.byId("MobileSimpleSearchForm_SearchTerm").focus();
                                                                }else{
                                                                                document.CatalogSearchForm.searchTerm.focus();
                                                                }
                                                                this.hideSearchDepartmentList();
                                                } else if (event.shiftKey && event.keyCode == 9) { // tab
                                                                var scrElement = document.getElementById("mobileSearchDropdown");
                                                                if (scrElement != null && scrElement.style.display == 'block'){
                                                                                dojo.byId("MobileSimpleSearchForm_SearchTerm").focus();
                                                                }else{
                                                                                document.CatalogSearchForm.searchTerm.focus();
                                                                }
                                                                this.cancelEvent(event);
                                                                this.hideSearchDepartmentList();
                                                } else if (event.keyCode == 9) { // tab
                                                                dojo.byId('search_submit').focus();
                                                                this.cancelEvent(event);
                                                                this.hideSearchDepartmentList();
                                                }

                                                return false;
                                },

                                hideSearchDepartmentList: function(){
                                                byId('searchDepartmentList').style.display="none";
                                },

                                init:function(){
                                                dojo.connect(document.CatalogSearchForm.searchTerm, "onfocus", SearchJS, SearchJS._onFocus);
                                                dojo.connect(document.CatalogSearchForm.searchTerm, "onkeydown", SearchJS, SearchJS._onKeyDown);
                                                dojo.connect(document.CatalogSearchForm.searchTerm, "onkeyup", SearchJS, SearchJS._onKeyUp);
                                                dojo.connect(document.getElementById("searchDropdown"), "onkeyup", SearchJS, SearchJS._onKeyTab);
                                                //                                            dojo.connect(dojo.byId("Mobilesearch_submit"), "onclick", SearchJS, SearchJS._MobileonClick);
                                                //                                            dojo.connect(dojo.byId("navSearchMobile"), "onclick", SearchJS, SearchJS._showMobileSearchComponent);
                                                //                                            dojo.connect(dojo.byId("search_submit"), "onclick", SearchJS, SearchJS._onClick);

                                                //this.staticContentHeaderHistory = storeNLS["HISTORY"];
                                },

                                showSearchComponent:function(){
                                                var srcElement = document.getElementById("searchDropdown");
                                                if(srcElement != null) {
                                                                srcElement.style.display= 'block';
                                                }
                                },

                                hideSearchComponent:function(){
                                                var srcElement = document.getElementById("searchDropdown");
                                                if(srcElement != null) {
                                                                srcElement.style.display= 'none';
                                                }
                                },

                                _showMobileSearchComponent:function(){
                                                var srcElement = document.getElementById("mobileSearchDropdown");
                                                if(srcElement != null) {
                                                                if(srcElement.style.display == "block") {
                                                                                DepartmentJS.close('mobileSearchDropdown');
                                                                                srcElement.style.display= 'none';
                                                                }
                                                                else
                                                                {
                                                                                dojo.query(".subDeptDropdown ").forEach(function(node){
                                                                                                DepartmentJS.close(node.id);
                                                                                });
                                                                                DepartmentJS.close("departmentsDropdown");
                                                                                srcElement.style.display='block';
                                                                }
                                                }
                                },

                                setCachedSuggestionsURL:function(url){
                                                this.CachedSuggestionsURL = getAbsoluteURL() + url;
                                },

                                setAutoSuggestURL:function(url){
                                                this.SearchAutoSuggestServletURL = getAbsoluteURL() + url;
                                },

                                _onFocus:function(evt){
                                                this.showSearchComponent();
                                                this.retrieveCachedSuggestions();
                                },

                                _MobileonFocus:function(evt){
                                                this.showSearchComponent();
                                                this.retrieveCachedSuggestions();
                                },

                                _MobileonBlur:function(evt){
                                                clearTimeout(this.searchSuggestionHoverTimeout);
                                                this.searchSuggestionHoverTimeout = setTimeout("SearchJS.showAutoSuggest(false)",100);
                                },

                                _onKeyPress:function(evt){
                                                return evt.keyCode != dojo.keys.ENTER;
                                },
                                _onKeyDown:function(evt){
                                                if(evt.keyCode == dojo.keys.ENTER) {
                                                                this._handleEnterKey();
                                                                this.cancelEvent(evt);
                                                }
                                                else if (evt.keyCode == '9' || evt.which == '9') {
                                                                clearTimeout(this.searchSuggestionHoverTimeout);
                                                                this.searchSuggestionHoverTimeout = setTimeout("SearchJS.showAutoSuggest(false)",200);
                                                }
                                },
                                _onKeyUp:function(evt){
                                                var srcElement = document.getElementById("searchDropdown");
                                                srcElement.style.display='block';
                                                this.doAutoSuggest(evt, this.SearchAutoSuggestServletURL, document.CatalogSearchForm.searchTerm.value);
                                },
                                _onKeyTab:function(evt){
                                                if(evt.keyCode == '9' || evt.which == '9'){
                                                                //dojo.byId("searchFilterButton").focus();
                                                }
                                },
                                _MobileonKeyUp:function(evt){
                                                var srcElement = document.getElementById("mobileSearchDropdown");
                                                srcElement.style.display='block';
                                                this.doAutoSuggest(evt, this.SearchAutoSuggestServletURL, dojo.byId("MobileSimpleSearchForm_SearchTerm").value);
                                },

                                _handleEnterKey:function() {
                                                document.CatalogSearchForm.searchTerm.value = (document.CatalogSearchForm.searchTerm.value).trim();
                                                if(document.CatalogSearchForm.searchTerm.value.length > 0) {
                                                                if(this.END_OF_LIST) {
                                                                                this.gotoAdvancedSearch(byId("advancedSearch").href);
                                                                }
                                                                else if(this.autoSuggestURL != "" &&  this.autoSuggestURL != (document.location.href + "#")) {
                                                                                //When enter key is hit with one of the suggested keywords or results highlighted, then go to the URL specified for that result..
                                                                                // go to suggested URL
                                                                                document.location.href = appendWcCommonRequestParameters(this.autoSuggestURL);
                                                                }
                                                                else {
																		//Enter key is hit, when the focus was in search term input box.. Submit the form and get the results..
																		document.CatalogSearchForm.searchTerm.value = (document.CatalogSearchForm.searchTerm.value).trim();
																		if(window.location.toString().indexOf("/SearchDisplay?") != -1) {
																			/*window.history.pushState('searchTerm=' + document.CatalogSearchForm.searchTerm.value,'title',
																			window.location.toString().replace(WCParamJS.searchTerm, document.CatalogSearchForm.searchTerm.value));*/
																			//WCParamJS.searchTerm = document.CatalogSearchForm.searchTerm.value;
																			var evt = document.createEvent('HTMLEvents');
																			evt.initEvent('ajaxSearch', false, true);
																			document.getElementById("searchInput").dispatchEvent(evt);
																		} else {
																			submitSpecifiedForm(document.CatalogSearchForm);
																		}
                                                                }
                                                }
                                                else{
                                                                return;
                                                }

                                },


                                _onClick:function(evt){
                                                document.CatalogSearchForm.searchTerm.value = (document.CatalogSearchForm.searchTerm.value).trim();
                                                if(document.CatalogSearchForm.searchTerm.value.length > 0) {
                                                                /*if(typeof TealeafWCJS != "undefined"){
                                                                TealeafWCJS.processDOMEvent(evt);
                                                }*/
                                                submitSpecifiedForm(document.CatalogSearchForm);
                                }
                                return false;
                },

                _MobileonClick:function(evt){
                                document.MobileCatalogSearchForm.searchTerm.value = (document.MobileCatalogSearchForm.searchTerm.value).trim();
                                if(document.MobileCatalogSearchForm.searchTerm.value.length > 0) {
                                                /*if(typeof TealeafWCJS != "undefined"){
                                                TealeafWCJS.processDOMEvent(evt);
                                }*/
                                submitSpecifiedForm(document.MobileCatalogSearchForm);
                }
                return false;
},

doDynamicAutoSuggest:function(url, searchTerm, showHeader, filter) {
                // if pending autosuggest triggered, cancel it.
                if(this.autoSuggestTimer != -1) {
                                clearTimeout(this.autoSuggestTimer);
                                this.autoSuggestTimer = -1;
                };

                // call the auto suggest
                this.autoSuggestTimer = setTimeout(function() {
                                /*var avnSearchType=document.getElementById("avnSearchType").value;
                                dojo.xhrPost({
                                                url: "/shop/SearchComponentAutoSuggestView?coreName=MC_10001_CatalogEntry_en_US&langId=-1&storeId=715839035&catalogId=10001&term="+searchTerm+"&showHeader=true&avnSearchType=" + filter + "&objectId=&requesttype=ajax",
                                                service: this,
                                                load: function successHandler(serviceResponse){
																if(serviceResponse.indexOf('error')!=-1){
																     	dojo.byId("widget_search_dropdown").innerHTML = "";
																   } else {
                                                                	dojo.byId("widget_search_dropdown").innerHTML = serviceResponse;
                                                                	SearchJS.showAutoSuggestIfResults();
																}
                                                },
                                                error: function(errObj,ioArgs) {

                                                }
                                });*/
								SearchJS.showAutoSuggest(true);
                                this.autoSuggestTimer = -1;
                                //dojo.byId("widget_search_dropdown").innerHTML=dojo.byId("autoSuggestText").innerHTML;
                                //document.getElementById("autoSuggest_Result_div").style.display="block";
                                //document.getElementById("widget_search_dropdown").style.display="block";

                }, this.autoSuggestKeystrokeDelay);
},

gotoAdvancedSearch:function(url) {
                var searchTerm = byId("SimpleSearchForm_SearchTerm").value;
                document.location.href = appendWcCommonRequestParameters(url) + '&searchTerm=' + searchTerm;

},

showAutoSuggest:function(display) {
				if(display) {
					//WCParamJS.searchTerm = document.CatalogSearchForm.searchTerm.value;
					var evt = document.createEvent('HTMLEvents');
					evt.initEvent('ajaxSuggest', false, true);
					document.getElementById("searchInput").dispatchEvent(evt);
					
					document.getElementById("autosuggest").className = "autosuggest showAutoSuggest";
					document.getElementById("cross_img").className = "cross_img showAutoSuggest";
				} else {
					document.getElementById("autosuggest").className = "autosuggest hideAutoSuggest";
					document.getElementById("cross_img").className = "cross_img hideAutoSuggest";
				}
                /*var autoSuggest_Result_div = document.getElementById("autoSuggest_Result_div");
                if (dojo.isIE < 7){
                                var autoSuggest_content_div = document.getElementById("autoSuggest_content_div");
                                var autoSuggestDropDownIFrame = document.getElementById("autoSuggestDropDownIFrame");
                }

                if(autoSuggest_Result_div != null && typeof autoSuggest_Result_div != 'undefined') {
                                if(display) {
                                                autoSuggest_Result_div.style.display = "block";
                                                if (dojo.isIE < 7) {
                                                                autoSuggestDropDownIFrame.style.height = autoSuggest_content_div.scrollHeight;
                                                                autoSuggestDropDownIFrame.style.display = "block";
                                                }
                                                this.registerMouseDown();
                                }
                                else {
                                                if (dojo.isIE < 7) {
                                                                autoSuggestDropDownIFrame.style.display = "none";
                                                                autoSuggestDropDownIFrame.style.height = 0;
                                                }
                                                autoSuggest_Result_div.style.display = "none";
                                                this.unregisterMouseDown();
                                }
                }
                else {
                                this.unregisterMouseDown();
                }*/
},

showAutoSuggestIfResults:function() {
                // if no results, hide the autosuggest box

                var scrElement = document.getElementById("mobileSearchDropdown");
                if(typeof(staticContent) != "undefined" && document.getElementById(this.STATIC_CONTENT_SECTION_DIV[0]).innerHTML == "" && document.getElementById("dynamicAutoSuggestTotalResults") == null) {
                                this.showAutoSuggest(false);
                }
                else if(scrElement != null && scrElement.style.display == 'block')
                {
                                if(document.getElementById("MobileSimpleSearchForm_SearchTerm").value.length <= this.AUTOSUGGEST_THRESHOLD)
                                {
                                                this.showAutoSuggest(false);
                                }
                                else
                                {
                                                this.showAutoSuggest(true);
                                }
                }
                else {
                                if(document.CatalogSearchForm.searchTerm.value.length <= this.AUTOSUGGEST_THRESHOLD)
                                {
                                                this.showAutoSuggest(false);
                                }
                                else
                                {
                                                var hasResults = this.doStaticAutoSuggest(this.staticSearchTerm);
                                                this.showAutoSuggest(true);
                                }
                }
},

selectAutoSuggest:function(term) {
                var scrElement = document.getElementById("mobileSearchDropdown");
                if (scrElement != null && scrElement.style.display == 'block'){
                                var searchBox = document.getElementById("MobileSimpleSearchForm_SearchTerm");
                }else{
                                var searchBox = document.CatalogSearchForm.searchTerm;
                }

                searchBox.value = term;
                searchBox.focus();
                this.autoSuggestPreviousTerm = term;
                /*if(typeof TealeafWCJS != "undefined"){
                TealeafWCJS.createExplicitChangeEvent(searchBox);
}*/
submitSpecifiedForm(document.CatalogSearchForm);
},

highLightSelection:function(state, index) {
                var selection = document.getElementById("autoSelectOption_" + index);
                if(selection != null && typeof selection != 'undefined') {
                                if(state) {
                                                selection.focus();
                                                selection.className = "autoSuggestSelected";
                                                var scrElement = document.getElementById("mobileSearchDropdown");
                                                if (scrElement != null && scrElement.style.display == 'block'){
                                                                var searchBox = document.getElementById("MobileSimpleSearchForm_SearchTerm");
                                                }else{
                                                                var searchBox = document.CatalogSearchForm.searchTerm;
                                                }
                                                searchBox.setAttribute("aria-activedescendant", "suggestionItem_" + index);
                                                searchBox.focus();
                                                var totalDynamicResults = document.getElementById("dynamicAutoSuggestTotalResults");
                                                if((totalDynamicResults != null && typeof totalDynamicResults != 'undefined' && index < totalDynamicResults.value) || (index >= this.historyIndex)) {
                                                                searchBox.value = selection.title;
                                                                this.autoSuggestPreviousTerm = selection.title;
                                                }
                                                this.autoSuggestURL = selection.href;
                                }
                                else {
                                                selection.className = "";
                                }
                                return true;
                }
                else {
                                return false;
                }
},

enableAutoSelect:function(index) {
                this.highLightSelection(false, this.autoSelectOption);
                var item = document.getElementById('autoSelectOption_' + index);
                item.className = "autoSuggestSelected";
                this.autoSelectOption = index;
},

resetAutoSuggestKeyword:function() {
                var originalKeyedSearchTerm = document.getElementById("autoSuggestOriginalTerm");
                if(originalKeyedSearchTerm != null && typeof originalKeyedSearchTerm != 'undefined') {
                                var scrElement = document.getElementById("mobileSearchDropdown");
                                if (scrElement != null && scrElement.style.display == 'block')
                                {
                                                var searchBox = document.getElementById("MobileSimpleSearchForm_SearchTerm");
                                }else{
                                                var searchBox = document.CatalogSearchForm.searchTerm;
                                }
                                searchBox.value = originalKeyedSearchTerm.value;
                                this.autoSuggestPreviousTerm = originalKeyedSearchTerm.value;
                                searchBox.focus();
                }
},


clearAutoSuggestResults:function() {
                // clear the static search results.
                for (var i = 0; i < staticContent.length; i++) {
                                document.getElementById(this.STATIC_CONTENT_SECTION_DIV[i]).innerHTML = "";
                }
                this.autoSuggestPreviousTerm = "";
                this.autoSuggestURL = "";
                // clear the dynamic search results;
                document.getElementById("autoSuggestDynamic_Result_div").innerHTML = "";
                this.showAutoSuggest(false);
},

doAutoSuggest:function(event, url, searchTerm) {
                if(searchTerm.length <= this.AUTOSUGGEST_THRESHOLD ) {
                                this.showAutoSuggest(false);
                }

                if(event.keyCode == dojo.keys.ENTER) {
                                return;
                }

                if(event.keyCode == dojo.keys.TAB) {
                                this.autoSuggestHover = true;
                                return;
                }

                if(event.keyCode == dojo.keys.ESCAPE) {
                                this.showAutoSuggest(false);
                                return;
                }

                if(event.keyCode == dojo.keys.UP_ARROW) {
                                var totalDynamicResults = document.getElementById("dynamicAutoSuggestTotalResults");
                                if(this.END_OF_LIST) {
                                                dojo.removeClass("autoSuggestAdvancedSearch", "autoSuggestSelected");
                                                this.END_OF_LIST = false;
                                                this.autoSelectOption--;
                                                if(!this.highLightSelection(true, this.autoSelectOption)) {
                                                                if(this.autoSelectOption == this.CACHED_AUTOSUGGEST_OFFSET && totalDynamicResults != null && typeof totalDynamicResults != 'undefined') {
                                                                                this.autoSelectOption = totalDynamicResults.value-1;
                                                                                this.highLightSelection(true, this.autoSelectOption);
                                                                }
                                                }
                                }
                                else if (this.highLightSelection(true, this.autoSelectOption-1)) {
                                                this.highLightSelection(false, this.autoSelectOption);
                                                if(this.autoSelectOption == this.historyIndex) {
                                                                this.resetAutoSuggestKeyword();
                                                }
                                                this.autoSelectOption--;
                                }
                                else if(this.autoSelectOption == this.CACHED_AUTOSUGGEST_OFFSET && totalDynamicResults != null && typeof totalDynamicResults != 'undefined') {
                                                this.highLightSelection(false, this.CACHED_AUTOSUGGEST_OFFSET);
                                                this.autoSelectOption = totalDynamicResults.value-1;
                                                this.highLightSelection(true, this.autoSelectOption);
                                }
                                else {
                                                // up arrow back to the very top
                                                this.highLightSelection(false, this.autoSelectOption);
                                                this.autoSelectOption = -1;
                                                var originalKeyedSearchTerm = document.getElementById("autoSuggestOriginalTerm");
                                                this.resetAutoSuggestKeyword();
                                }
                                return;
                }

                if(event.keyCode == dojo.keys.DOWN_ARROW) {
                                if(this.highLightSelection(true, this.autoSelectOption+1)) {
                                                this.highLightSelection(false, this.autoSelectOption);
                                                this.autoSelectOption++;
                                }
                                else if(this.autoSelectOption < this.CACHED_AUTOSUGGEST_OFFSET && this.highLightSelection(true, this.CACHED_AUTOSUGGEST_OFFSET)) {
                                                // down arrow into the cached autosuggest section
                                                this.highLightSelection(false, this.autoSelectOption);
                                                this.autoSelectOption = this.CACHED_AUTOSUGGEST_OFFSET;
                                                this.resetAutoSuggestKeyword();
                                }
                                else if(!this.END_OF_LIST) {
                                                dojo.addClass("autoSuggestAdvancedSearch", "autoSuggestSelected");
                                                this.highLightSelection(false, this.autoSelectOption);
                                                this.autoSelectOption++;
                                                this.END_OF_LIST = true;
                                                var scrElement = document.getElementById("mobileSearchDropdown");
                                                if (scrElement != null && scrElement.style.display == 'block'){
                                                                var searchBox = document.getElementById("MobileSimpleSearchForm_SearchTerm");
                                                }else{
                                                                var searchBox = document.CatalogSearchForm.searchTerm;
                                                }
                                                searchBox.setAttribute("aria-activedescendant", "advancedSearch");
                                }
                                return;
                }

                if(searchTerm.length > this.AUTOSUGGEST_THRESHOLD && searchTerm == this.autoSuggestPreviousTerm) {
                                return;
                }
                else {
                                this.autoSuggestPreviousTerm = searchTerm;
                }

                if(searchTerm.length <= this.AUTOSUGGEST_THRESHOLD) {
                                return;
                };

                // cancel the dynamic search if one is pending
                if(this.autoSuggestTimer != -1) {
                                clearTimeout(this.autoSuggestTimer);
                                this.autoSuggestTimer = -1;
                }

                if(searchTerm != "") {
                                this.autoSelectOption = -1;
                                this.staticSearchTerm = searchTerm;
                                //var hasResults = this.doStaticAutoSuggest(searchTerm);
                                if(searchTerm.length > this.DYNAMIC_AUTOSUGGEST_THRESHOLD) {
                                                var showHeader = true; // hasResults;
                                                var filter = "";
                                                //var filter = $('#searchFilterBtn').val().toLowerCase();
                                                this.doDynamicAutoSuggest(url, searchTerm, showHeader, filter);
                                                /*var response = document.getElementById('suggestedKeywordResults');
                                                var productsResponse = document.getElementById('suggestedProductsResults');
                                                //responses for software,tools,doc and video
                                                var softwareResponse = document.getElementById('suggestedSoftwareResults');
                                                var toolsResponse = document.getElementById('suggestedToolsResults');
                                                var documentResponse = document.getElementById('suggestedDocumentResults');
                                                var videoResponse = document.getElementById('suggestedVideoResults');
                                                var categoryResponse = document.getElementById('autoSuggestStatic_1');
                                                var manufacturerResponse = document.getElementById('autoSuggestStatic_2');

                                                if(response == null && productsResponse == null && documentResponse == null && manufacturerResponse == null && videoResponse == null && softwareResponse == null && toolsResponse == null) {
                                                                // No response or an error page.   Clear the contents.
                                                                document.getElementById("autoSuggestDynamic_Result_div").innerHTML = "";
                                                }*/
                                                //SearchJS.showAutoSuggestIfResults();
                                }
                                else {
                                                // clear the dynamic results
                                                document.getElementById("autoSuggestDynamic_Result_div").innerHTML = "";
                                }
                }
                else {
                                this.clearAutoSuggestResults();
                }
},

tokenizeForBidi:function(displayName, searchName, searchTerm, searchTermLower) {
                var tokens = displayName.split( " > " );
                var html = "";
                var str = "";
                if(tokens.length > 0) {
                                html = html + "<div class='category_list'>";
                                for(i = 0; i < tokens.length; i++) {
                                                if(i!=0) {
                                                                // not the first token
                                                                html = html + "<span class='gt'>&nbsp; > &nbsp;</span>";
                                                }
                                                if(i == tokens.length - 1) {
                                                                // last token
                                                                var index = searchName.toLowerCase().indexOf(searchTermLower);
                                                                var subStringBefore = searchName.substr(0, index);
                                                                var subStringAfter =  searchName.substr(index + searchTerm.length);
                                                                var highLighted = "<span class='highlight'>" + searchTerm + "</span>";
                                                                str = subStringBefore + highLighted + subStringAfter;
                                                }
                                                else {
                                                                str = tokens[i];
                                                }
                                                html = html + str;
                                }
                                html = html + "</div>";
                }
                return html;
},

doStaticAutoSuggest:function(searchTerm) {
                var resultList = ["", "", "", "", "", ""];
                var emptyCell = 0;
                var searchTermLower = searchTerm.toLowerCase();
                var listCount = parseInt(document.getElementById("productPartSuggestionCount").value);
                var divStart = "<div class='list_section'><div";
                var divEnd =   "</div></div>";
                if(typeof(staticContent)!='undefined'){

                                for(var i = 0; i < staticContent.length; i++) {
                                                var count = 0;
                                                for(var j = 0; j < staticContent[i].length; j++) {
                                                                var searchName = staticContent[i][j][0];
                                                                var searchURL = staticContent[i][j][1];
                                                                var displayName = staticContent[i][j][2];
                                                                var index = searchName.toLowerCase().indexOf(searchTermLower);
                                                                if(index != -1) {

                                                                                var htmlDisplayName = this.tokenizeForBidi(displayName, searchName, searchTerm, searchTermLower);

                                                                                resultList[i] = resultList[i] + "<ul class='autoSuggestDivNestedList'><li id='suggestionItem_" + listCount + "' role='listitem' tabindex='-1'><a id='autoSelectOption_" + listCount + "' title='" + searchName + "' onmouseout='this.className=\"\"; this.autoSuggestURL=\"\";' onclick='SearchJS.hideSearchComponent();' onmouseover='SearchJS.enableAutoSelect(" + listCount + "); this.autoSuggestURL=this.href;' href=\"" + searchURL + "\">" + htmlDisplayName + "</a></li></ul>";
                                                                                count++;
                                                                                listCount++;
                                                                                if(count >= this.TOTAL_SUGGESTED) {
                                                                                                break;
                                                                                }
                                                                }
                                                }
                                }
                }
                if(typeof(staticContent)!='undefined'){
                                for (var i = 0; i < staticContent.length; i++) {
                                                document.getElementById(this.STATIC_CONTENT_SECTION_DIV[i]).innerHTML = "";
                                                if(resultList[i] != "") {
                                                                var heading =  "<ul class='autoSuggestDivNestedList'><li class='heading'><span>" + staticContentHeaders[i] + "</span></li></ul>";
                                                                document.getElementById(this.STATIC_CONTENT_SECTION_DIV[emptyCell]).innerHTML = heading + divStart + " role='list' title='" + staticContentHeaders[i] + "' aria-label='" + staticContentHeaders[i] + "'>" + resultList[i] + divEnd;
                                                                emptyCell++;
                                                }
                                }
                }

                var historyList = "";
                var searchHistorySection = document.getElementById("autoSuggestHistory");
                if(typeof(searchHistorySection)!= 'undefined' && searchHistorySection != null){
                                searchHistorySection.innerHTML = "";
                                var historyArray = new Array();
                                listCount = parseInt(document.getElementById("offSetSuggestionCount").value);
                                this.historyIndex = listCount;
                }

                if(typeof(searchHistoryCookie) != 'undefined') {
                                var termsArray = searchHistoryCookie.split("|");
                                var count = 0;
                                for(var i = termsArray.length - 1; i > 0; i--) {
                                                var theTerm = termsArray[i];
                                                var theLowerTerm = theTerm.toLowerCase();
                                                if(theLowerTerm.match("^"+searchTermLower) == searchTermLower) {
                                                                var repeatedTerm = false;
                                                                for(var j = 0; j < historyArray.length; j++) {
                                                                                if(historyArray[j] == theLowerTerm) {
                                                                                                repeatedTerm = true;
                                                                                                break;
                                                                                }
                                                                }
                                                                if(!repeatedTerm) {
                                                                                if(count >= this.TOTAL_HISTORY) {
                                                                                                break;
                                                                                }
                                                                                historyList = historyList + "<ul class='autoSuggestDivNestedList'><li id='suggestionItem_" + listCount + "' role='listitem' tabindex='-1'><a href='#' onmouseout='this.className=\"\"' onmouseover='SearchJS.enableAutoSelect(" + listCount + ");' onclick='SearchJS.selectAutoSuggest(this.title); return false;' title='" + theTerm + "' id='autoSelectOption_" + listCount+ "'><strong>" + searchTerm + "</strong>" + theTerm.substring(searchTerm.length, theTerm.length) + "</a></li></ul>";
                                                                                historyArray.push(theLowerTerm);
                                                                                count++;
                                                                                listCount++;
                                                                }
                                                }
                                }
                }


                if(historyList != "") {
                                var heading =  "<ul class='autoSuggestDivNestedList'><li class='heading'><span>" + this.staticContentHeaderHistory + "</span></li></ul>"
                                searchHistorySection.innerHTML = heading + divStart + " title='" + this.staticContentHeaderHistory + "'>" + historyList + divEnd;
                                emptyCell++;
                }

                if(emptyCell > 0) {
                                this.showAutoSuggest(true);
                                return true;
                }

                return false;
},

retrieveCachedSuggestions:function() {
                if(!this.retrievedCachedSuggestions) {
                                dojo.xhrPost({
                                                url: "/shop/SearchComponentCachedSuggestionsView?langId=-1&storeId=715839035&catalogId=10001",
                                                service: this,

                                                load: function successHandler(serviceResponse){
													if(serviceResponse.indexOf('error')!=-1){
													            document.getElementById("autoSuggestCachedSuggestions_div").innerHTML = "";
													          } else {
                                                            	    document.getElementById("autoSuggestCachedSuggestions_div").innerHTML = serviceResponse;
																}
                                                                var response = document.getElementById('cachedSuggestions');
                                                                if(response == null || response.innerHTML.indexOf('error')!=-1) {
                                                                                // No response or an error page.   Clear the contents.
                                                                                document.getElementById("autoSuggestCachedSuggestions_div").innerHTML = "";
                                                                }
                                                                else {
                                                                                var scripts = response.getElementsByTagName("script");
                                                                                var j = scripts.length;
                                                                                for (var i = 0; i < j; i++){
                                                                                                var newScript = document.createElement('script');
                                                                                                newScript.type = "text/javascript";
                                                                                                newScript.text = scripts[i].text;
                                                                                                document.getElementById('autoSuggestCachedSuggestions_div').appendChild (newScript);
                                                                                }
                                          SearchJS.retrievedCachedSuggestions = true;
                                                                                searchTerm = document.CatalogSearchForm.searchTerm.value;
                                                                                /*var scrElement = document.getElementById("mobileSearchDropdown");
                                                                                if (scrElement != null && scrElement.style.display == 'block')
                                                                                {
                                                                                searchTerm = document.getElementById("MobileSimpleSearchForm_SearchTerm").value;
                                                                }
                                                                else
                                                                {*/

                                                                //}
                                                                if(searchTerm.length > SearchJS.AUTOSUGGEST_THRESHOLD) {
                                                                                SearchJS.doStaticAutoSuggest(searchTerm);
                                                                }
                                                }
                                },
                                error: function(errObj,ioArgs) {

                                }
                });
}
},

/**
* Updates the searchTermHistory cookie value...
*/
updateSearchTermHistoryCookie:function(updatedSearchTerm){
                var cookieKey = "searchTermHistory";
                var cookieValue = "|" + updatedSearchTerm;
                var searchTermHistoryCookie = getCookie(cookieKey);
                if(typeof(searchTermHistoryCookie) != 'undefined') {
                                cookieValue =  dojo.cookie(cookieKey) + cookieValue;
                }
                dojo.cookie(cookieKey, cookieValue, {path:'/'});
},

updateSearchTermHistoryCookieAndRedirect:function(updatedSearchTerm, redirectURL){
                this.updateSearchTermHistoryCookie(updatedSearchTerm);
                document.location.href = appendWcCommonRequestParameters(redirectURL);
},

isValidNumber:function(n) {
                return !isNaN(parseFloat(n)) && isFinite(n) && n >= 0;
},

/**
* Validation method for advanced search form
*/
validateForm: function(form) {
                form["minPrice"].value = (form["minPrice"].value).trim();
                form["maxPrice"].value = (form["maxPrice"].value).trim();

                var minValue = form["minPrice"].value;
                var maxValue = form["maxPrice"].value;

                var minIsValid = this.isValidNumber(minValue);
                var maxIsValid = this.isValidNumber(maxValue);

                if(minValue.length > 0 && !minIsValid) {
                                MessageHelper.formErrorHandleClient(form["minPrice"].id, MessageHelper.messages["EDPPaymentMethods_AMOUNT_NAN"]);
                                return false;
                }
                else if(maxValue.length > 0 && !maxIsValid) {
                                MessageHelper.formErrorHandleClient(form["maxPrice"].id, MessageHelper.messages["EDPPaymentMethods_AMOUNT_NAN"]);
                                return false;
                }
                else if (minValue.length > 0 && maxValue.length > 0 && parseFloat(minValue) > parseFloat(maxValue)) {
                                MessageHelper.formErrorHandleClient(form["maxPrice"].id, MessageHelper.messages["ERROR_PRICE_RANGE"]);
                                return false;
                }

                form["searchTerm"].value = (form["searchTerm"].value).trim();
                form["filterTerm"].value = (form["filterTerm"].value).trim();
                form["manufacturer"].value = (form["manufacturer"].value).trim();

                var searchTerm = form["searchTerm"].value;
                var filterTerm = form["filterTerm"].value;
                var manufacturer = form["manufacturer"].value;

                if (searchTerm.length == 0 && filterTerm.length == 0 && manufacturer.length == 0) {
                                MessageHelper.formErrorHandleClient(form["searchTerm"].id, MessageHelper.messages["ERROR_EMPTY_SEARCH_FIELDS"]);
                                return false;
                }

                processAndSubmitForm(form);
},

registerMouseDown: function() {
                if (this.mouseDownConnectHandle == null) {
                                this.mouseDownConnectHandle = dojo.connect(document.documentElement, "onmousedown", this, "handleMouseDown");
                }
},

unregisterMouseDown: function() {
                if (this.mouseDownConnectHandle != null) {
                                dojo.disconnect(this.mouseDownConnectHandle);
                                this.mouseDownConnectHandle = null;
                }
},

handleMouseDown: function(evt) {
                var node = evt.target;
                if (node != document.documentElement) {
                                var searchDropdown = document.getElementById("searchDropdown");
                                var searchTerm = document.CatalogSearchForm.searchTerm;
                                var close = true;
                                while (node) {
                                                if (node == searchDropdown || node == searchTerm) {
                                                                close = false;
                                                                break;
                                                }
                                                node = node.parentNode;
                                }
                                if (close) {
                                                this.showAutoSuggest(false);
                                }
                }
},

searchButtonClick: function(placeHolder) {
                document.CatalogSearchForm.searchTerm.value = document.CatalogSearchForm.searchTerm.value.trim();
                if(document.CatalogSearchForm.searchTerm.value.length > 0 && document.CatalogSearchForm.searchTerm.value != placeHolder) {
                    if(window.location.toString().indexOf("/SearchDisplay?") != -1) {
						/*window.history.pushState('searchTerm=' + document.CatalogSearchForm.searchTerm.value,'title',
						window.location.toString().replace(WCParamJS.searchTerm, document.CatalogSearchForm.searchTerm.value));
						WCParamJS.searchTerm = document.CatalogSearchForm.searchTerm.value;*/
						var evt = document.createEvent('HTMLEvents');
						evt.initEvent('ajaxSearch', false, true);
						document.getElementById("searchInput").dispatchEvent(evt);
				   } else {
						submitSpecifiedForm(document.CatalogSearchForm);
				   }
                }else{
                                return;
                }
}
};
}

/************************************* avnparametricsearchsuggest js **********************************************************/


if (typeof require !== "undefined"){
require(["dojo/on", "dojo/_base/array", "dojo/dom", "dojo/dom-class", "dojo/dom-style","dojo/query","dojo/domReady!"],
	function(on, array, dom, domClass, domStyle, query, win) {
		
		on(dom.byId("searchInput"), "click", function(evt){ 
			dojo.setStyle(dojo.byId("searchInput"), "backgroundColor", "#ffffff");
			dojo.setStyle(dojo.byId("searchText"), "backgroundColor", "#ffffff");
		});
	
		/*code for Search box functionality in header*/		
		on(dom.byId("cross_img"), "click", function(evt){
			domClass.remove(dojo.byId("autosuggest"), 'showAutoSuggest');
			domClass.remove(dojo.byId("cross_img"), 'showAutoSuggest');
			domClass.add(dojo.byId("autosuggest"), 'hideAutoSuggest');
			domClass.add(dojo.byId("cross_img"), 'hideAutoSuggest');			
			dom.byId("searchInput").value='';
			var numElements = document.getElementById('autosuggest').getElementsByTagName('a').length;
			for (i=1; i<=numElements; i++) {
				var elementId = "list_"+i;
				dojo.replaceClass(elementId, "");
			}			
		});
		
		query(".autosuggestion").on("click",function(event){
			query(this).children(".autosuggestion_link").forEach(function(node){
				dom.byId("searchInput").value = node.innerHTML;
			});
		});

		query(".autosuggestBox").on("click",function(event){
			query(this).children(".autosuggest_link").forEach(function(node){
				dom.byId("searchInput").value = node.innerHTML;
			});
		});	
		
		on(document, "click", function(e){
			/*Code to close autosuggest on clicking outside*/
			if(e.target.id != "searchInput" && e.target.className != "autosuggest" && e.target.className != "suggestion" && e.target.className != "heading" && e.target.className != "autosuggestList" && e.target.className != "autosuggestBox" && e.target.className != "autosuggest_link" && e.target.className != "autosuggestion" && e.target.className != "autosuggestion_link" && e.target.className != "desc1" && e.target.className != "desc2"){
				domClass.remove(dojo.byId("autosuggest"), 'showAutoSuggest');
				domClass.add(dojo.byId("autosuggest"), 'hideAutoSuggest');
			}
			/*Code to close compare dropdown on clicking outside*/
			if(e.target.id != "default_on_hover_div" && e.target.id != "populated_on_hover_div" && e.target.id != "default_compare_dropdown" && e.target.id != "populated_compare_dropdown" &&  e.target.id != "dropdown_innercontent" && e.target.id != "comp_contents" && e.target.id !="clear_comp" && e.target.className != "dropdown_content"){

				if(domClass.contains(dom.byId("default_on_hover_div"),"showDrop")){
					domClass.remove(dojo.byId("default_on_hover_div"),"showDrop");
				}
				if(domClass.contains(dom.byId("populated_on_hover_div"),"showDrop")){
					domClass.remove(dom.byId("populated_on_hover_div"),'showDrop');	
				}			
			}
		});
		
		
});
}

/************************************avnparametricsearchsuggest js end *********************************************************/
/*autosuggest functionality code*/
function searchInputChange() {
    var x = document.getElementById("searchInput").value;
	if(x != null && x != "") {
		document.getElementById("autosuggest").className = "autosuggest showAutoSuggest";
		document.getElementById("cross_img").className = "cross_img showAutoSuggest";
	}
	else {
		document.getElementById("autosuggest").className = "autosuggest hideAutoSuggest";
		document.getElementById("cross_img").className = "cross_img hideAutoSuggest";
	}
	removeHoverColor();
	document.getElementById("searchInput").focus();
}

function scrollDown(e,tb) {
	removeHoverColor();
	var numElements = document.getElementById('auto-suggest-parts-dspl').getElementsByTagName('a').length;
	var elementId = tb.id;
	if(elementId != "searchInput") {
		elementId = elementId.split("_");
		elementId = elementId[1];
	}
	if (e.keyCode == 40) {
		e.preventDefault();
		if (elementId == "searchInput") {
			document.getElementById("searchInputValue").value = document.getElementById("searchInput").value;
			document.getElementById("autosuggest_1").focus();
			document.getElementById("list_1").className = "focus_color";
			var displayVal = document.getElementById("autosuggest_1").innerHTML;
			document.getElementById("searchInput").value = displayVal;
		}
		else if (+elementId > 0 && +elementId < numElements) {
			var id = +elementId + 1;
			var autosuggestId = "autosuggest_"+id;
			var listId = "list_"+id;
			var listIdPrev = "list_"+elementId;
			document.getElementById(autosuggestId).focus();
			document.getElementById(listIdPrev).className = "";
			document.getElementById(listId).className = "focus_color";
			var displayVal = document.getElementById(autosuggestId).innerHTML;
			document.getElementById("searchInput").value = displayVal;
		}
		else if (elementId == numElements) {
			document.getElementById("searchInput").focus();
			document.getElementById("list_"+numElements).className = "";
			document.getElementById("searchInput").value = document.getElementById("searchInputValue").value;
		}
	}
	else if (e.keyCode == 38) {
		e.preventDefault();
		if (tb.id == "searchInput") {
			document.getElementById("searchInputValue").value = document.getElementById("searchInput").value;
			document.getElementById("autosuggest_"+numElements).focus();
			document.getElementById("list_"+numElements).className = "focus_color";
			var displayVal = document.getElementById("autosuggest_"+numElements).innerHTML;
			document.getElementById("searchInput").value = displayVal;
		}
		else if (+elementId > 1 && +elementId <= numElements) {
			var id = +elementId - 1;
			var autosuggestId = "autosuggest_"+id;
			var listId = "list_"+id;
			var listIdPrev = "list_"+elementId;
			document.getElementById(autosuggestId).focus();
			document.getElementById(listIdPrev).className = "";
			document.getElementById(listId).className = "focus_color";
			var displayVal = document.getElementById(autosuggestId).innerHTML;
			document.getElementById("searchInput").value = displayVal;
		}
		else if (elementId == "1") {
			document.getElementById("searchInput").focus();
			document.getElementById("list_1").className = "";
			document.getElementById("searchInput").value = document.getElementById("searchInputValue").value;
		}

	}
	else if (e.keyCode == 13){             
		if(document.getElementById("autosuggest").className == "autosuggest showAutoSuggest")
			document.getElementById("autosuggest").className="autosuggest hideAutoSuggest";                                
	}else if(e.keyCode == 27){
		document.getElementById("searchInput").focus();
		document.getElementById("searchInput").value = document.getElementById("searchInputValue").value;
	}
	else{
		document.getElementById("searchInput").focus();
	}
}

function hoverColor(tb) {
	removeHoverColor();
	var elementId = tb.id;
	elementId = elementId.split("_");
	elementId = elementId[1];
	var listId = "list_"+elementId;
	var autosuggestId = "autosuggest_"+elementId;
	if(document.getElementById(autosuggestId) != undefined && document.getElementById(autosuggestId) != null){
		document.getElementById(autosuggestId).focus();
	}
	if(document.getElementById(listId) != undefined && document.getElementById(listId) != null){
		document.getElementById(listId).className = "focus_color";
		document.getElementById("searchInput").value = document.getElementById(autosuggestId).innerHTML;
	}
}

function hoverColorOut(tb) {
	var elementId = tb.id;
	elementId = elementId.split("_");
	elementId = elementId[1];
	var listId = "list_"+elementId;
	if(document.getElementById(elementId) != undefined && document.getElementById(elementId) != null){
		document.getElementById(listId).className = "";
	}
}

function removeHoverColor() {
	var numElements = document.getElementById('auto-suggest-parts-dspl').getElementsByTagName('a').length;
	for (i=1; i<=numElements; i++) {
		var elementId = "list_"+i;
		if(document.getElementById(elementId) != undefined && document.getElementById(elementId) != null){
			document.getElementById(elementId).className = "";
		}
	}
}
}catch(e){console.log("Module 'getting_started_module': ",e);}
try{require(["dojo/html", "dojo/dom", "dojo/request", "dojo/json"], function(html, dom, request, JSON){

  // EMA WCS Navigation
  var navJSON = '/emaWCSNavigation.json';

  request(navJSON).then(
    function(result){
      var navMenu = JSON.parse(result);

      //Build Products Menu
      var categories = navMenu.catalogGroupView;
      // var catCount = categories.length;
      // var colCount = Math.ceil(catCount/6);
      var subCategories;

      var menu = '';
      menu = menu + "<ul class='pdt_details_list'>";
      for(var c in categories){
        if (categories.hasOwnProperty(c)) {
          // if(c % colCount === 0){
          //   menu = menu + '<div class="col-md-2 avn-clanpro-news-13">';
          // };
          if(typeof categories[c].catalogGroupView != 'undefined'){
            menu = menu + '<div class="avn-product-menu"><span style="color:#d5d5d5;">+ </span>' + categories[c].categoryName;
          } else {
            menu = menu + '<div class="avn-product-menu"><a href="' + categories[c].url + '"><span style="color:#d5d5d5;">&nbsp;&nbsp;&nbsp;</span>' + categories[c].categoryName + '</a>';
          }
          subCategories = categories[c].catalogGroupView;
          menu = menu + '<div class="avn-product-submenu" style="display:none;">';
          for(s in subCategories){
            if (subCategories.hasOwnProperty(s)) {
              menu = menu + '<li><a href="' + subCategories[s].url + '">' + subCategories[s].categoryName + '</a></li>'
            }
          }
          menu = menu + '</div></div>';
          // if(c % colCount === (colCount-1)){
          //   menu = menu + '</div>';
          // };
        }
      }
      menu = menu + "</ul>"

      dojo.empty(dom.byId("products-menu"));
      html.set(dom.byId("products-menu"), menu);

      //Toggle products subCategory sections
      $('.avn-product-menu').on('click', function (event) {
        event.stopPropagation();
        if($(this).children('div').is(':visible')){
          var showSubMenu = false;
        } else {
          var showSubMenu = true;
        }
        $('.avn-product-submenu').hide();
        $(this).children('div').toggle(showSubMenu);
      });

      //Prevent Collapse of Menu after Click
      $('.avn-product-submenu a').click(function(e){
        e.stopPropagation();
      });

      //Build Manufacturers Menu
      var manufacturers = navMenu.manufacturerView;

      //Menu Object
      var menu = {};
      var mfr = {};
      var mfrs = [];
      for(var m in manufacturers){
        if (manufacturers.hasOwnProperty(m)) {
          letter = manufacturers[m].manufacturerName.charAt(0).toUpperCase();
          if (letter < 'A'){letter = 'A'};
          if(menu[letter]){
            menu[letter].count++;
          } else {
            menu[letter]={};
            menu[letter].count = 1;
            menu[letter].mfrs = [];
          }
          mfr["name"] = manufacturers[m].manufacturerName;
          mfr["url"] = manufacturers[m].url;
          menu[letter].mfrs.push(mfr);
          mfr = {};
        }
      }

      var menuHTML = '';
      var colCount = 0;
      var noColumns = 4;
      for (var m in menu){
        if(m === 'A'){
          menuHTML = menuHTML + '<div class="avn-' + m + '">';
        } else {
          menuHTML = menuHTML + '</div><div class="avn-' + m + '" style="display: none;">';
        }
        colCount = Math.ceil(menu[m].count/noColumns);
        for (c=0; c < noColumns; c++){
          menuHTML = menuHTML + '<div class="col-md-3">';
          for (i=0; i < colCount; i++){
            if (menu[m].count > i+(c*colCount)){
              menuHTML = menuHTML + '<div class="avn-mfr-list-item"><a href="' + menu[m].mfrs[i+(c*colCount)].url + '">' + menu[m].mfrs[i+(c*colCount)].name + '</a></div>';
            }
          }
          menuHTML = menuHTML + '</div>';
        }
        menuHTML = menuHTML + '</div>'
      }
      dojo.empty(dom.byId("manufacturers-menu"));
      html.set(dom.byId("manufacturers-menu"), menuHTML);

      //Toggle manufacturer sections
      $('.avn-mfr-menu').on('click', function (event) {
        event.stopPropagation();
        $('#manufacturersMenu').children('')
        var l = $(this).attr('id').length;
        var letter = $(this).attr('id').charAt(l-1);
        var className ='.avn-' + letter.toUpperCase();
        $('#manufacturers-menu').children().not(className).hide();
        $(className).show();
        var triangle = $('.avn-mfr-triangle');
        triangle.removeClass();
        triangle.addClass('avn-mfr-triangle avn-mfr-triangle-' + letter.toUpperCase());
      });

    },
    function(error){
      console.log("An error occurred: " + error);
    }
  )

  // EMA WCM Navigation
  //navJSON = '/wps/wcm/connect/web+content/articles?srv=cmpnt&cmpntname=Navigation_EMA&source=library&CACHE=NONE&CONTENTCACHE=NONE&CONNECTORCACHE=NONE';
  navJSON = '/wps/portal/caas?current=true&urile=wcm:path:Web Content/Navigators/NavigatorContent&mime-type=application/json&tab_id=ema&CACHE=NONE&CONTENTCACHE=NONE&CONNECTORCACHE=NONE'
  request(navJSON).then(
    function(result){
      var navMenu = JSON.parse(result);

      //Build Markets & Technologies Menu
      var mkts = navMenu['Markets &amp; Technologies'];
      var mktsCount = mkts.length;
      var colCount = Math.ceil(mktsCount/3);
      var menu = '';
      for(var m in mkts){
        if (mkts.hasOwnProperty(m)) {
          if(m % colCount === 0){
            if (m > 0){
              menu = menu + '</div>'
            }
            menu = menu + '<div class="col-md-4 avn-clanpro-news-13">';
          };
          menu = menu + '<div class="avn-mkts-menu"><a href="' + mkts[m].url + '">' + mkts[m].title + '</a></div>';
        }
      }
      dojo.empty(dom.byId("mkts-menu"));
      html.set(dom.byId("mkts-menu"), menu);

      //Build Design Resources Menu
      var desRes = navMenu['Design Resources'];
      var desResCount = desRes.length;
      var colCount = Math.ceil(desResCount/3);
      var menu = '';
      for(var d in desRes){
        if (desRes.hasOwnProperty(d)) {
          if(d % colCount === 0){
            if (d > 0){
              menu = menu + '</div>'
            }
            menu = menu + '<div class="col-md-4 avn-clanpro-news-13">';
          };
          menu = menu + '<div class="avn-design-menu"><a href="' + desRes[d].url + '">' + desRes[d].title + '</a></div>';
        }
      }
      dojo.empty(dom.byId("design-menu"));
      html.set(dom.byId("design-menu"), menu);

      //Build Services Menu
      var svcs = navMenu['Services'];
      var svcsCount = svcs.length;
      var colCount = Math.ceil(svcsCount/3);
      var menu = '';
      for(var s in svcs){
        if (svcs.hasOwnProperty(s)) {
          if(s % colCount === 0){
            if (s > 0){
              menu = menu + '</div>'
            }
            menu = menu + '<div class="col-md-4 avn-clanpro-news-13">';
          };
          menu = menu + '<div class="avn-svcs-menu"><a href="' + svcs[s].url + '">' + svcs[s].title + '</a></div>';
        }
      }
      dojo.empty(dom.byId("services-menu"));
      html.set(dom.byId("services-menu"), menu);
    },
    function(error){
      console.log("An error occurred: " + error);
    }
  )

})

$( document ).ready(function() {

  //Manually Show Mega Menu
  $('li.dropdown.yamm-fw a').on('click', function (event) {
    $('li.dropdown.yamm-fw').removeClass('open');
    $(this).parent().toggleClass("open");
    if($('.modal-backdrop').length === 0){
      $('<div class="modal-backdrop"></div>').appendTo(document.body);
    }
  });

  //Manually Hide Mega Menu
  $('body').on('click', function (e) {
    if (!$('li.dropdown.yamm-fw').is(e.target) && $('li.dropdown.yamm-fw').has(e.target).length === 0 && $('.open').has(e.target).length === 0) {
      $('li.dropdown.yamm-fw').removeClass('open');
      $(".modal-backdrop").remove();
    }
  });

});

}catch(e){console.log("Module 'getting_started_module': ",e);}
try{
function omnitureForRegionChange(newRegion){
			s=s_global;
			if(digitalData!=undefined){
				digitalData.user.locale =  newRegion ;
		        s.prop12 = digitalData.user.locale;
		        s.eVar12 = digitalData.user.locale;
		        digitalData.event.eventinfo.events = "event34";	
				s.linkTrackEvents=digitalData.event.eventinfo.events;
				s.linkTrackVars="prop12,eVar12";
				s.events= digitalData.event.eventinfo.events;
				var s_code=s.tl(this,'o','region change');
				if(s_code)document.write(s_code);
			}
		}

 function omnitureForSpeedBoatChange(targetURL){
			s=s_global;
        	if(digitalData!=undefined){	
                digitalData.page.attributes.speedBoatLink = targetURL;
                s.eVar77 = digitalData.page.attributes.speedBoatLink;
				digitalData.event.eventinfo.events = "event77";
                s.events=digitalData.event.eventinfo.events;
				s.linkTrackEvents=digitalData.event.eventinfo.events;
				s.linkTrackVars="eVar77";
	            var s_code=s.tl(this,'o','Speedboat change');
				if(s_code)document.write(s_code);   
        	}
   		}
		
		
}catch(e){console.log("Module 'getting_started_module': ",e);}
try{(function defineMustache(global, factory) {
    /*if (typeof exports === "object" && exports && typeof exports.nodeName !== "string") {
        factory(exports)
    } else if (typeof define === "function" && define.amd) {
        define(["exports"], factory)
    } else {*/
        global.Mustache = {};
        factory(global.Mustache)
    //}
})(this, function mustacheFactory(mustache) {
    var objectToString = Object.prototype.toString;
    var isArray = Array.isArray || function isArrayPolyfill(object) {
        return objectToString.call(object) === "[object Array]"
    }
    ;
    function isFunction(object) {
        return typeof object === "function"
    }
    function typeStr(obj) {
        return isArray(obj) ? "array" : typeof obj
    }
    function escapeRegExp(string) {
        return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
    }
    function hasProperty(obj, propName) {
        return obj != null  && typeof obj === "object" && propName in obj
    }
    var regExpTest = RegExp.prototype.test;
    function testRegExp(re, string) {
        return regExpTest.call(re, string)
    }
    var nonSpaceRe = /\S/;
    function isWhitespace(string) {
        return !testRegExp(nonSpaceRe, string)
    }
    var entityMap = {
        "&": "&amp;",
        "<": "&lt;",
        ">": "&gt;",
        '"': "&quot;",
        "'": "&#39;",
        "/": "&#x2F;",
        "`": "&#x60;",
        "=": "&#x3D;"
    };
    function escapeHtml(string) {
        return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
            return entityMap[s]
        })
    }
    var whiteRe = /\s*/;
    var spaceRe = /\s+/;
    var equalsRe = /\s*=/;
    var curlyRe = /\s*\}/;
    var tagRe = /#|\^|\/|>|\{|&|=|!/;
    function parseTemplate(template, tags) {
        if (!template)
            return [];
        var sections = [];
        var tokens = [];
        var spaces = [];
        var hasTag = false;
        var nonSpace = false;
        function stripSpace() {
            if (hasTag && !nonSpace) {
                while (spaces.length)
                    delete tokens[spaces.pop()]
            } else {
                spaces = []
            }
            hasTag = false;
            nonSpace = false
        }
        var openingTagRe, closingTagRe, closingCurlyRe;
        function compileTags(tagsToCompile) {
            if (typeof tagsToCompile === "string")
                tagsToCompile = tagsToCompile.split(spaceRe, 2);
            if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)
                throw new Error("Invalid tags: " + tagsToCompile);
            openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + "\\s*");
            closingTagRe = new RegExp("\\s*" + escapeRegExp(tagsToCompile[1]));
            closingCurlyRe = new RegExp("\\s*" + escapeRegExp("}" + tagsToCompile[1]))
        }
        compileTags(tags || mustache.tags);
        var scanner = new Scanner(template);
        var start, type, value, chr, token, openSection;
        while (!scanner.eos()) {
            start = scanner.pos;
            value = scanner.scanUntil(openingTagRe);
            if (value) {
                for (var i = 0, valueLength = value.length; i < valueLength; ++i) {
                    chr = value.charAt(i);
                    if (isWhitespace(chr)) {
                        spaces.push(tokens.length)
                    } else {
                        nonSpace = true
                    }
                    tokens.push(["text", chr, start, start + 1]);
                    start += 1;
                    if (chr === "\n")
                        stripSpace()
                }
            }
            if (!scanner.scan(openingTagRe))
                break;
            hasTag = true;
            type = scanner.scan(tagRe) || "name";
            scanner.scan(whiteRe);
            if (type === "=") {
                value = scanner.scanUntil(equalsRe);
                scanner.scan(equalsRe);
                scanner.scanUntil(closingTagRe)
            } else if (type === "{") {
                value = scanner.scanUntil(closingCurlyRe);
                scanner.scan(curlyRe);
                scanner.scanUntil(closingTagRe);
                type = "&"
            } else {
                value = scanner.scanUntil(closingTagRe)
            }
            if (!scanner.scan(closingTagRe))
                throw new Error("Unclosed tag at " + scanner.pos);
            token = [type, value, start, scanner.pos];
            tokens.push(token);
            if (type === "#" || type === "^") {
                sections.push(token)
            } else if (type === "/") {
                openSection = sections.pop();
                if (!openSection)
                    throw new Error('Unopened section "' + value + '" at ' + start);
                if (openSection[1] !== value)
                    throw new Error('Unclosed section "' + openSection[1] + '" at ' + start)
            } else if (type === "name" || type === "{" || type === "&") {
                nonSpace = true
            } else if (type === "=") {
                compileTags(value)
            }
        }
        openSection = sections.pop();
        if (openSection)
            throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos);
        return nestTokens(squashTokens(tokens))
    }
    function squashTokens(tokens) {
        var squashedTokens = [];
        var token, lastToken;
        for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
            token = tokens[i];
            if (token) {
                if (token[0] === "text" && lastToken && lastToken[0] === "text") {
                    lastToken[1] += token[1];
                    lastToken[3] = token[3]
                } else {
                    squashedTokens.push(token);
                    lastToken = token
                }
            }
        }
        return squashedTokens
    }
    function nestTokens(tokens) {
        var nestedTokens = [];
        var collector = nestedTokens;
        var sections = [];
        var token, section;
        for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
            token = tokens[i];
            switch (token[0]) {
            case "#":
            case "^":
                collector.push(token);
                sections.push(token);
                collector = token[4] = [];
                break;
            case "/":
                section = sections.pop();
                section[5] = token[2];
                collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
                break;
            default:
                collector.push(token)
            }
        }
        return nestedTokens
    }
    function Scanner(string) {
        this.string = string;
        this.tail = string;
        this.pos = 0
    }
    Scanner.prototype.eos = function eos() {
        return this.tail === ""
    }
    ;
    Scanner.prototype.scan = function scan(re) {
        var match = this.tail.match(re);
        if (!match || match.index !== 0)
            return "";
        var string = match[0];
        this.tail = this.tail.substring(string.length);
        this.pos += string.length;
        return string
    }
    ;
    Scanner.prototype.scanUntil = function scanUntil(re) {
        var index = this.tail.search(re), match;
        switch (index) {
        case -1:
            match = this.tail;
            this.tail = "";
            break;
        case 0:
            match = "";
            break;
        default:
            match = this.tail.substring(0, index);
            this.tail = this.tail.substring(index)
        }
        this.pos += match.length;
        return match
    }
    ;
    function Context(view, parentContext) {
        this.view = view;
        this.cache = {
            ".": this.view
        };
        this.parent = parentContext
    }
    Context.prototype.push = function push(view) {
        return new Context(view,this)
    }
    ;
    Context.prototype.lookup = function lookup(name) {
        var cache = this.cache;
        var value;
        if (cache.hasOwnProperty(name)) {
            value = cache[name]
        } else {
            var context = this, names, index, lookupHit = false;
            while (context) {
                if (name.indexOf(".") > 0) {
                    value = context.view;
                    names = name.split(".");
                    index = 0;
                    while (value != null  && index < names.length) {
                        if (index === names.length - 1)
                            lookupHit = hasProperty(value, names[index]);
                        value = value[names[index++]]
                    }
                } else {
                    value = context.view[name];
                    lookupHit = hasProperty(context.view, name)
                }
                if (lookupHit)
                    break;
                context = context.parent
            }
            cache[name] = value
        }
        if (isFunction(value))
            value = value.call(this.view);
        return value
    }
    ;
    function Writer() {
        this.cache = {}
    }
    Writer.prototype.clearCache = function clearCache() {
        this.cache = {}
    }
    ;
    Writer.prototype.parse = function parse(template, tags) {
        var cache = this.cache;
        var tokens = cache[template];
        if (tokens == null )
            tokens = cache[template] = parseTemplate(template, tags);
        return tokens
    }
    ;
    Writer.prototype.render = function render(template, view, partials) {
        var tokens = this.parse(template);
        var context = view instanceof Context ? view : new Context(view);
        return this.renderTokens(tokens, context, partials, template)
    }
    ;
    Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) {
        var buffer = "";
        var token, symbol, value;
        for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
            value = undefined;
            token = tokens[i];
            symbol = token[0];
            if (symbol === "#")
                value = this.renderSection(token, context, partials, originalTemplate);
            else if (symbol === "^")
                value = this.renderInverted(token, context, partials, originalTemplate);
            else if (symbol === ">")
                value = this.renderPartial(token, context, partials, originalTemplate);
            else if (symbol === "&")
                value = this.unescapedValue(token, context);
            else if (symbol === "name")
                value = this.escapedValue(token, context);
            else if (symbol === "text")
                value = this.rawValue(token);
            if (value !== undefined)
                buffer += value
        }
        return buffer
    }
    ;
    Writer.prototype.renderSection = function renderSection(token, context, partials, originalTemplate) {
        var self = this;
        var buffer = "";
        var value = context.lookup(token[1]);
        function subRender(template) {
            return self.render(template, context, partials)
        }
        if (!value)
            return;
        if (isArray(value)) {
            for (var j = 0, valueLength = value.length; j < valueLength; ++j) {
                buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate)
            }
        } else if (typeof value === "object" || typeof value === "string" || typeof value === "number") {
            buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate)
        } else if (isFunction(value)) {
            if (typeof originalTemplate !== "string")
                throw new Error("Cannot use higher-order sections without the original template");
            value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);
            if (value != null )
                buffer += value
        } else {
            buffer += this.renderTokens(token[4], context, partials, originalTemplate)
        }
        return buffer
    }
    ;
    Writer.prototype.renderInverted = function renderInverted(token, context, partials, originalTemplate) {
        var value = context.lookup(token[1]);
        if (!value || isArray(value) && value.length === 0)
            return this.renderTokens(token[4], context, partials, originalTemplate)
    }
    ;
    Writer.prototype.renderPartial = function renderPartial(token, context, partials) {
        if (!partials)
            return;
        var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
        if (value != null )
            return this.renderTokens(this.parse(value), context, partials, value)
    }
    ;
    Writer.prototype.unescapedValue = function unescapedValue(token, context) {
        var value = context.lookup(token[1]);
        if (value != null )
            return value
    }
    ;
    Writer.prototype.escapedValue = function escapedValue(token, context) {
        var value = context.lookup(token[1]);
        if (value != null )
            return mustache.escape(value)
    }
    ;
    Writer.prototype.rawValue = function rawValue(token) {
        return token[1]
    }
    ;
    mustache.name = "mustache.js";
    mustache.version = "2.2.1";
    mustache.tags = ["{{", "}}"];
    var defaultWriter = new Writer;
    mustache.clearCache = function clearCache() {
        return defaultWriter.clearCache()
    }
    ;
    mustache.parse = function parse(template, tags) {
        return defaultWriter.parse(template, tags)
    }
    ;
    mustache.render = function render(template, view, partials) {
        if (typeof template !== "string") {
            throw new TypeError('Invalid template! Template should be a "string" ' + 'but "' + typeStr(template) + '" was given as the first ' + "argument for mustache#render(template, view, partials)")
        }
        return defaultWriter.render(template, view, partials)
    }
    ;
    mustache.to_html = function to_html(template, view, partials, send) {
        var result = mustache.render(template, view, partials);
        if (isFunction(send)) {
            send(result)
        } else {
            return result
        }
    }
    ;
    mustache.escape = escapeHtml;
    mustache.Scanner = Scanner;
    mustache.Context = Context;
    mustache.Writer = Writer
});

}catch(e){console.log("Module 'getting_started_module': ",e);}
try{/*!
 * Bootstrap v3.2.0 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f+', [role="menu"], [role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.2.0",c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(300):c.$element.trigger("focus").trigger(e)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;if(this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-k<o.left?"right":g,e.removeClass(m).addClass(g)}var p=this.getCalculatedOffset(g,j,k,l);this.applyPlacement(p,g);var q=function(){d.$element.trigger("shown.bs."+d.type),d.hoverState=null};a.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",q).emulateTransitionEnd(150):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=k.left?2*k.left-e+i:2*k.top-f+j,m=k.left?"left":"top",n=k.left?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(l,d[0][n],m)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one("bsTransitionEnd",b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName;return a.extend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():null,{scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop(),width:d?a(window).width():b.outerWidth(),height:d?a(window).height():b.outerHeight()},d?{top:0,left:0}:b.offset())},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
}catch(e){console.log("Module 'bootstrap': ",e);}
try{(function(_1){
var _2="wpToolbarProjectMenuLink",_3="wpToolbarProjectInfoBox",_4="<edit-mode>",_5="<page-id>",_6="?uri=toolbar:projectTab:projectMenu:returnURI:dialog:CloseModalDialog@oid:"+_5+"&uri=pagemode:edit:"+_4,_7="project:oid:",_8="project:null",_9="title",_a="titleLang",_b="titleDir",_c="editMode",_d="action",_e="resultURI",_f="selectProject",_10="openDialog",_11="openToolbar",_12="closeToolbar",_13={"uri":"pagemode:edit:on"},_14={"uri":"pagemode:edit:off"},_15={"uri":"toolbar:open","params":{"primaryTabURI":"default","secondaryTabURI":"default"}},_16={"uri":"toolbar:open"},_1=_1,_17=_1.document,_18=i$.byId,_19=i$.bindDomEvt,_1a=i$.fromPath,_1b=i$.forEach,_1c=i$.toQuery,_1d=wpModules.toolbar,_1e=function(_1f,e){
var k=e.keyCode;
if(k&&k!==13&&k!==32&&k!==38&&k!==40){
return false;
}
var url=_6.replace(_5,_20()).replace(_4,(_21()?"on":"off")),_22={"url":url,"autoResize":true,"posHandler":"horizontallyBelow","autoPosition":_1f.parentNode,"modal":false,"padding":0,"callbackFn":function(_23){
_1f.focus();
if(_23){
var _24=get(_23,_d);
if(_f==_24){
_25(_23);
}else{
if(_10==_24){
_26(_23);
}else{
if(_11==_24){
_27(_23);
}
}
}
}
}};
_28(_22);
return true;
},_25=function(_29){
var uri=get(_29,_e),_2a=get(_29,_c)=="true";
if(uri){
var _2b=[],_2c=_1d.isToolbarOpened(),_2d=_2e(uri),_2f=_30(_29),_31=_32();
if(_2c&&!_2d){
if(_2f){
_1d.closeToolbar({"editMode":_2a});
}else{
_1d.setEditModeActive(_2a);
}
}else{
if(_2a!=_21()){
if(_2a){
_2b.push(_13);
if(!_2c&&_31){
_2b.push(_15);
}
}else{
_2b.push(_14);
}
}
if(_2c){
if(_2f){
_1d.closeTab();
}else{
if(_31){
if(_2a){
_2b.push(_15);
}else{
_2b.push(_16);
}
}
}
}
_2b.push(_33(uri));
var win=_34(),url=_35(_2b,win),_36=win.parent||win;
_36.location.href=url;
}
}
},_26=function(_37){
var _38=_39(_3a(_37,_e));
if(_38){
var _3b=get(_37,_9)||"Dialog",url=_3c(_38),_3d={"url":url,"title":_3b,"modal":true,"autoResize":true,"metrics":{"width":900},"padding":0,"callbackFn":function(_3e){
if(_3e&&_3e.result=="project_published"){
_1d.closeToolbar({"editMode":false});
}else{
_1d.reloadViewArea(true);
}
}};
_28(_3d);
}
},_27=function(_3f){
var uri=get(_3f,_e);
_1d.openToolbar({tab:uri});
},_28=function(_40){
var _41=new wpModules.dialog.Dialog(_40);
_41.open();
},_35=function(_42,_43){
var _44=_43?_45(_43):"",url=[_44];
_44.indexOf("?")<0?url.push("?"):url.push("&");
_1b(_42,function(_46){
var uri=_46.uri,_47=_46.params;
url.push("uri=");
url.push(uri);
url.push("&");
if(_47){
url.push(_1c(_47));
url.push("&");
}
});
var r=url.join("");
return r;
},_3c=function(_48,_49){
var _4a=_49?_45(_49):"",url=[_4a],uri=_48.uri,_4b=_48.params;
_4a.indexOf("?")<0?url.push("?"):url.push("&");
url.push("uri=");
url.push(uri);
if(_4b){
url.push("&");
url.push(_1c(_4b));
}
var r=url.join("");
return r;
},_33=function(uri,_4c){
var a={};
a.uri=uri;
if(_4c){
a.params=_4c;
}
return a;
},_39=function(_4d){
if(_4d&&_4d.length>0){
var o={};
o.uri=_4d[0];
o.params={};
for(var i=1,l=_4d.length;i<l;i+=2){
var key=_4d[i],val=_4d[i+1];
if(val){
o.params[key]=[val];
}
}
return o;
}
return null;
},get=function(obj,key){
var o=obj[key];
if(o){
var v=o.value;
if(v&&v.length>0){
var r=v[0];
return r;
}
}
return null;
},_3a=function(obj,key){
var o=obj[key];
if(o){
var r=o.value;
return r;
}
return null;
},_20=function(){
var r=_34().ibmCfg.portalConfig.currentPageOID;
return r;
},_21=function(){
var r=_1d.isEditModeActive();
return r;
},_34=function(){
var r=_1d.getViewAreaWindow();
return r;
},_32=function(){
var r=_1a("wpModules.state.page.supportsToolbar",false,_34());
return r;
},_45=function(win){
var r=_1d.getBaseURL(win);
return r;
},_2e=function(uri){
var _4e=_4f(),r=true;
if(_4e){
r=uri.substring(_7.length)!=_4e;
}else{
r=uri!=_8;
}
return r;
},_30=function(_50){
var _51=_3a(_50,_d),r=(_51&&_51.length>1&&_51[1]==_12);
return r;
},_4f=function(){
return _34().ibmCfg.portalConfig.projectUUID;
};
i$.addOnLoad(function(){
var _52=_18(_2);
if(_52){
var _53=function(e){
if(_1e(_52,e)){
e.preventDefault?e.preventDefault():e.returnValue=false;
return false;
}
};
_19(_52,"click",_53);
_19(_52,"keydown",_53);
}
});
})(window);


}catch(e){console.log("Module 'wp_toolbar_projectmenu': ",e);}
try{(function(_1,_2){
var _3="?uri=pagemode:edit:off&uri=op:ibm.portal.operations.showPreviewScreen()&returnURI=dialog:CloseModalDialog",_4={"then":function(){
}},_5=i$.fromPath,_1=_1,_6=_1.document,_7=wpModules.toolbar,_8=_2,_9=function(_a){
var _b=_3,_c=_d("preview_as_user_dialog_title")||"Preview as User",_e={"url":_b,"title":_c,"modal":true,"autoResize":true,"window":_1.parent||_1,"callbackFn":function(_f){
if(_f){
var _10=get(_f,"action");
if(_10=="ok"){
var _11=get(_f,"userID"),_12=get(_f,"path");
_13(_11,_12);
}
}
}},_14=new wpModules.dialog.Dialog(_e);
_14.open();
var r=_4;
return r;
},_13=function(_15,_16){
var url=_7.getBaseURL(_17());
url=url.replace(_16,_16+_15);
url+=url.indexOf("?")<0?"?":"&";
url+="uri=toolbar:close&uri=pagemode:edit:off";
top.location.href=url;
},_18=function(_19){
var r=_19.visibility!==false;
return r;
},_1a=function(_1b){
var r=_1c();
return r;
},_1c=function(){
var r=_5("ibmCfg.portalConfig.canAnonymousUserViewCurrentPage",false,_17());
return r;
},_17=function(){
var r=_7.getViewAreaWindow();
return r;
},_1d=function(_1e){
return {"then":function(cb){
cb(_1e);
}};
},_d=function(key){
var r=_8.nls[key];
return r;
},get=function(obj,key){
var o=obj[key],r=null;
if(o){
var v=o.value;
if(v&&v.length>0){
r=v[0];
}
}
return r;
};
_8.openPreviewAsUserDialog=_9;
_8.isPreviewAsUnauthenticatedUserVisible=_18;
_8.isPreviewAsUnauthenticatedUserEnabled=_1a;
})(window,i$.fromPath("wpModules.toolbar.menuActions",true));


}catch(e){console.log("Module 'wp_toolbar_sitepreview_menuactions': ",e);}
try{(function(_1,_2){
var _3="aria-pressed",_4="selected",_5="true",_6="false",_7=_1.document,_8=i$.addClass,_9=i$.removeClass,_a=wpModules.theme.WindowUtils,_b=_2,_c=function(_d,_e,e){
if(e){
var k=e.keyCode;
if(k&&k!==13&&k!==32&&k!==38&&k!==40){
return false;
}
}
if(typeof wptheme!="undefined"&&wptheme.contextMenu){
var _f=_10(),_11=[];
for(var i=0,l=_f.length;i<l;i++){
_11.push("nm:oid:"+_f[i]);
}
var _12={resURI:"nm:oid:"+_13(_14()),contribURI:_11},_15={"node":_d.parentNode,"menuId":_e,"jsonQuery":_12,"params":{"templateId":"simpleMenuTemplate","alignment":"right","autoScroll":false},"onClose":function(){
_16(_d);
}};
_17(_d);
wptheme.contextMenu.init(_15);
return true;
}else{
return false;
}
},_17=function(_18){
_8(_18.parentNode,_4);
_19(_18,_3,_5);
},_16=function(_1a){
_9(_1a.parentNode,_4);
_19(_1a,_3,_6);
},_19=function(_1b,_1c,_1d){
_1b.setAttribute(_1c,_1d);
},_14=function(){
var r=_a.getWindow(_a.VIEW_AREA);
return r;
},_13=function(win){
var r=win.ibmCfg.portalConfig.currentPageOID;
return r;
},_10=function(){
var r=_a.getPageIDs();
return r;
};
_b.open=_c;
})(window,i$.fromPath("wpModules.toolbar.ContextMenu",true));


}catch(e){console.log("Module 'wp_toolbar_contextmenu': ",e);}
try{(function(_1){
var _2=_1,_3=_1.document,_4=i$.addClass,_5=i$.removeClass,_6=i$.byId,_7=i$.bindDomEvt,_8="minimized",_9="utb-end-preview-btn",_a=3500,_b=500,_c=function(_d,_e){
var _f=function(){
_4(_d,_8);
};
return setTimeout(_f,_e);
},_10=function(_11,_12){
var _13=function(){
_5(_11,_8);
};
return setTimeout(_13,_12);
};
i$.addOnLoad(function(){
var _14=_6(_9);
if(_14){
var _15=_14.parentNode,_16=_c(_15,_a);
_7(_15,"mouseenter",function(){
if(_16){
clearTimeout(_16);
}
_16=_10(_15,_b);
});
_7(_15,"mouseleave",function(){
if(_16){
clearTimeout(_16);
}
_16=_c(_15,_a);
});
}
});
})(window);


}catch(e){console.log("Module 'wp_toolbar_sitepreview': ",e);}
try{(function(){
if(!i$.isIE){
i$.addOnLoad(function(){
var _1=document.getElementsByTagName("SECTION");
for(var i=0;i<_1.length;i++){
if(i$.hasClass(_1[i],"a11yRegionTarget")){
var _2=_1[i];
var _3=null;
var _4=_2.getElementsByTagName("SPAN");
for(var j=0;j<_4.length;j++){
if(i$.hasClass(_4[j],"a11yRegionLabel")){
_3=_4[j];
}
}
if(_3){
var _5=_3;
var _6=_2;
var _7=null;
while((_6=_6.parentNode)!=null){
if(i$.hasClass(_6,"component-control")){
var m=_6&&(_6.className||"").match(/id-([\S]+)/);
_7=m&&m[1];
break;
}
}
if(_7){
var _8="wpRegionId"+_7;
_5.setAttribute("id",_8);
_2.setAttribute("aria-labelledby",_8);
}
}
}
}
});
}
})();


}catch(e){console.log("Module 'wp_theme_skin_region': ",e);}