
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{(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{(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{$(window).on('load',function() {

    var windWidth = $(window).width();
    var windHeight = $(window).height();
	
	setTimeout(() => {
		$('.banner-section-wrapper .banner-section .content').css('width', windWidth);
	}, 200)

    var bnrLength = $('.banner-section li').length;
	
	
	
	 Highcharts.setOptions({
	  
	  lang: {
		  decimalPoint:'.',
          thousandsSep: ','
      },
      global : {
          useUTC : false
      }
  });
    
    setTimeout(() => {

        if(bnrLength == 2){
            $('.banner-section-wrapper .bx-wrapper .bx-controls-direction .bx-next').addClass('next2');
        }
        if(bnrLength == 3){
            $('.banner-section-wrapper .bx-wrapper .bx-controls-direction .bx-next').addClass('next3');
        }
        if(bnrLength == 4){
            $('.banner-section-wrapper .bx-wrapper .bx-controls-direction .bx-next').addClass('next4');
        }
        if(bnrLength == 5){
            $('.banner-section-wrapper .bx-wrapper .bx-controls-direction .bx-next').addClass('next5');
        }
        if(bnrLength == 6){
            $('.banner-section-wrapper .bx-wrapper .bx-controls-direction .bx-next').addClass('next6');
        }

        var banner_slider_height = $(".slider .bx-wrapper .bx-viewport").outerHeight();
        if(windWidth > 1100){
            $(".banner-section-wrapper").css("height", windHeight);
            $(".slider .bx-wrapper").css("height", windHeight);
        }  else{
        } 

        if(windWidth < 450){
            $(".slider .bx-wrapper").css("height", windHeight + 60);
            $(".slider .bx-wrapper .bx-viewport").css("height", windHeight + 60);
            $(".slider .bx-wrapper li").css("height", windHeight + 60);
        } 

        

    }, 500);

    // setTimeout(() => {
    //     var hdngPos = $('.banner-section h2').offset().top;
    //     $('.mktSmryBox').css('top', hdngPos + 11);
    // }, 1000);

    var topSlider = $('.slider .bxslider').bxSlider({
        mode: "fade",
        hideControlOnEnd: true
    });

    $('.play-pause').click(function(){
        if($(this).hasClass('pause')){
            $(this).removeClass('pause');
            topSlider.startAuto();
        } else{
            $(this).addClass('pause');
            topSlider.stopAuto();   
        } 
    });

    $('.chatClose').click(function(){
        $('.chat').hide();
    });

     
   /* var allNews;
    var allNews = $('.allNews ul').bxSlider({
        mode: 'fade',
        auto: false,
        moveSlides: 1,
        //infiniteLoop: false,
        loop: false,
        slideEndAnimatoin : false,
        minSlides: 5,
        maxSlides: 5,
        speed: 800,
        //hideControlOnEnd: true,
        touchEnabled:false
    });

    var marketNews;
    marketNews = $('.marketNews ul').bxSlider({
        mode: 'fade',
        auto: false,
        moveSlides: 1,
        //infiniteLoop: false,
        loop: false,
        slideEndAnimatoin : false,
        minSlides: 5,
        maxSlides: 5,
        speed: 800,
        //hideControlOnEnd: true,
        touchEnabled:false
    });

    var cmpnyAnnmnts;
    cmpnyAnnmnts = $('.cmpnyAnnmnts ul').bxSlider({
        mode: 'fade',
        auto: false,
        moveSlides: 1,
        //infiniteLoop: false,
        loop: false,
        slideEndAnimatoin : false,
        minSlides: 5,
        maxSlides: 5,
        speed: 800,
        //hideControlOnEnd: true,
        touchEnabled:false
    });

    var myWatchList;
    myWatchList = $('.myWatchList ul').bxSlider({
        mode: 'fade',
        auto: false,
        moveSlides: 1,
       // infiniteLoop: false,
        loop: false,
        slideEndAnimatoin : false,
        minSlides: 5,
        maxSlides: 5,
        speed: 800,
       // hideControlOnEnd: true,
        touchEnabled:false
    });*/

    var recentUpdates;
    if(windWidth > 450){
        recentUpdates = $('.recentUpdates ul').bxSlider({
            mode: 'horizontal',
            infiniteLoop: false,
            minSlides: 3,
            maxSlides: 3,
            moveSlides: 3,
            slideWidth: 340,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
    } else{
        recentUpdates = $('.recentUpdates ul').bxSlider({
            minSlides: 2,
            //infiniteLoop: false,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            hideControlOnEnd: true,
            auto:false
        });
    }
    

    var isSlide;
	var issuingSlide;
	var membershipSlide;
	var licensingSlide;
	
	
	function lookingFun(){
		if(windWidth > 450){
		console.log('big');
        isSlide = $('.isSlide ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 3,
            maxSlides: 4,
            slideWidth: 340,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
		
		issuingSlide = $('.issuingSlide ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 3,
            maxSlides: 4,
            slideWidth: 340,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
		
		membershipSlide = $('.membershipSlide ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 3,
            maxSlides: 4,
            slideWidth: 340,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
		
		licensingSlide = $('.licensingSlide ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 3,
            maxSlides: 4,
            slideWidth: 340,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
		
		
    } else{
		console.log('small 2');
		
        var isSlide = $('.isSlide ul').bxSlider({
            // slideWidth: 900,
            //infiniteLoop: false,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            //hideControlOnEnd: true,
            auto:false
        });
		
		var issuingSlide = $('.issuingSlide ul').bxSlider({
            // slideWidth: 900,
            //infiniteLoop: false,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            //hideControlOnEnd: true,
            auto:false
        });
		
		var  membershipSlide = $('.membershipSlide ul').bxSlider({
            // slideWidth: 900,
            //infiniteLoop: false,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            //hideControlOnEnd: true,
            auto:false
        });
		
		var licensingSlide = $('.licensingSlide ul').bxSlider({
            // slideWidth: 900,
            //infiniteLoop: false,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            //hideControlOnEnd: true,
            auto:false
        });
		
		
		
		
		setTimeout(() => {
			console.log('enter 66');
			
			isSlide.redrawSlider();
			issuingSlide.redrawSlider();
			membershipSlide.redrawSlider();
			licensingSlide.redrawSlider();
		}, 6000);
		
    }
	}
	
	
	
	
	if(windWidth > 450){
		lookingFun();
	} else {
		 setTimeout(() => {
			lookingFun();
		}, 15000); 
	}
	
    
    
    
    

    
    var focusList;
    /*if(windWidth > 450){
        focusList = $('.focusList ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 2,
            maxSlides: 3,
            slideWidth: 366,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
    } else{
        focusList = $('.focusList ul').bxSlider({
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
            auto:false
        });
    }*/

    if(windWidth < 1000){
        focusList = $('.focusList ul').bxSlider({
            mode: 'horizontal',
            auto:false,
            moveSlides: 1,            
            minSlides: 2,
            maxSlides: 3,
            slideMargin: 15
        });
    }
    
    

    var investList;
    if(windWidth > 450){
        investList = $('.investList ul').bxSlider({
            mode: 'horizontal',
            auto: 'true',
            moveSlides: 1,
            infiniteLoop: false,
            minSlides: 2,
            maxSlides: 2,
            slideWidth: 450,
            slideMargin: 15,
            speed: 800,
            pager: ($(".bxslider>.wrap").length > 1) ? true: false,
            touchEnabled:false
        });
    } else{
        investList = $('.investList ul').bxSlider({   
           // infiniteLoop: false,    
           // hideControlOnEnd: true,  
            auto: false,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 15,
        });
    }
    
    $('.newsBoxTab li').click(function(){
        $('.newsBoxTab li').removeClass('select');
        $(this).addClass('select');
        var getIndex = $(this).index();
        $('.newsBoxTabDtl .newsTabBox').removeClass('select');
        $('.newsBoxTabDtl .newsTabBox').eq(getIndex).addClass('select');
        
        allNews.reloadSlider();
        marketNews.reloadSlider();
        cmpnyAnnmnts.reloadSlider();
        myWatchList.reloadSlider();
    });

    $('.graphTab li').click(function(){
        $(this).parents('.graphTab').find('li').removeClass('selected');
        $(this).addClass('selected');
        var getIndex = $(this).index();
        $(this).parents('.smryTabDtlRgt').find('.graphTabDtlBox .graphTabDtl').removeClass('select');
        $(this).parents('.smryTabDtlRgt').find('.graphTabDtlBox .graphTabDtl').eq(getIndex).addClass('select');
    });

    
    $('.grphTab ul li').click(function(){
        var getIndex = $(this).index();
        $('.grphTab ul li').removeClass('select');
        $(this).addClass('select');
        $('.grphTabDtlCol').hide();
        $('.grphTabDtlCol').eq(getIndex).css('display', 'flex');
        if(getIndex == 0){
            graph5();
        }
    });

    

    $('.lookingForLft li').click(function(){
        $('.lookingForLft li').removeClass('select');
        $(this).addClass('select');  
        var getIndex = $(this).index();  
        $('.lookingForRgt .lookingForDtl').removeClass('selected');
        $('.lookingForRgt .lookingForDtl').eq(getIndex).addClass('selected');
        $('.lookingForRgt .lookingForDtl').css('opacity', 0);

        /*setTimeout(() => {
            isSlide.reloadSlider();
            issuingSlide.reloadSlider();
            membershipSlide.reloadSlider();
            licensingSlide.reloadSlider(); 
            $('.lookingForRgt .lookingForDtl').css('opacity', 1);
        }, 500);*/
		
		setTimeout(() => {
			lookingFun();
			 $('.lookingForRgt .lookingForDtl.selected').css('opacity', 1);
		 }, 1000);

       
    });

    $('#subscribe').click(function(){
        $('.newsletterForm').hide();
        $('.newsletterThanks').show();
    });

    $('.play').click(function(){
        $('.glrytrans').show();
        var $video = $('#video');
        var src = $(this).attr('rel');
        $video.attr('src', src + '?autoplay=1');        
    });
    $('.glryClose').click(function(){
        $('.glrytrans').hide();
        $('#video').attr('src', '');
    });

    var prslizeCount = 0;

    $('.prslizeList ul li').click(function(){
        if($(this).hasClass('select')){
            prslizeCount--;
            $(this).removeClass('select');
            $(this).find('.checkBox input').prop('checked',false);
        } else{
            if(prslizeCount < 4){
                prslizeCount++;
                $(this).addClass('select');
                $(this).find('.checkBox input').prop('checked',true);
            } else{
                var prslizeBox = $('.prslizeBox').offset().top - 200;
                //alert(prslizeBox)
                $("html, body").stop().animate({scrollTop:prslizeBox}, 500, 'swing', function() { 
                });
            }
        }
    });

    $('.ca3-scroll-down-arrow').click(function(){
        var mainContPos = $('.mainCont').offset().top - 180;
        $("html, body").stop().animate({scrollTop:mainContPos}, 500, 'swing', function() { 
        });
    });

    $('.personalizeBtn').click(function(){
        $(this).addClass('open');
        $('.prslizeBox').show();
    });
    $('.prslizeClose').click(function(){
        $('.personalizeBtn').removeClass('open');
        $('.prslizeBox').hide();
    });
    $('.applyBtn').click(function(){
        $('.personalizeBtn').removeClass('open');
        $('.prslizeBox').hide();
    });

    $('.mktWtch').click(function(){
        $('.mktSmryBox').hide();
        $('.interestedMarket').show();
    });

    $('.marketClose').click(function(){
        $('.mktSmryBox').show();
        $('.interestedMarket').hide();
    });


    if(windWidth < 1100){
        setTimeout(() => {
            var getHgt = $('.banner-section .bx-viewport').outerHeight();
            $('.banner-section .bx-wrapper').css('height', windHeight);
        }, 100);
    }


    $('#calendar').datepicker({
        weekStart: 0,
        endDate:''
    });

});



$(window).scroll(function() {
    var scroll = $(window).scrollTop();
    if (scroll < 50) {
        $(".slider .bx-wrapper .content").removeClass("hidden");
        $(".play-pause").removeClass("hidden");
        $('.slider .bx-wrapper .bx-controls-direction a').removeClass("hidden");
        $('.slider .bx-wrapper .bx-pager').removeClass("hidden");
        $('.ca3-scroll-down-link').show();
        $('.chat').removeClass('small');

    } else {
        $(".slider .bx-wrapper .content").addClass("hidden");
        $(".play-pause").addClass("hidden");
        $('.slider .bx-wrapper .bx-controls-direction a').addClass("hidden");
        $('.slider .bx-wrapper .bx-pager').addClass("hidden");
        $('.ca3-scroll-down-link').hide();      
        
        $('.chat').addClass('small');
    }   
});




var homelastScrollTop = 0;
$(window).scroll(function (event) {
  var homescroll = $(this).scrollTop();
  if (homescroll > homelastScrollTop) {
    // downscroll code
    //console.log(scroll);
    if (homescroll > 200) {
      $("header").addClass("bgColor");
      $(".newsTicker").removeClass("btmAlign");
      $(".newsTicker").addClass("newsTickerHide");
      $(".blueStrip").addClass("blueStripHide");
      $("header").addClass("topSpace");
      $(".mblMrktStatus").addClass("mblMrktStatusHide");
    }
  } else {
    // upscroll code
    $(".mblMrktStatus").addClass("bgColor");
    //$("header").addClass("bgColor");
    $(".newsTicker").removeClass("newsTickerHide");
   
    
    //$(".mblMrktStatus").removeClass("mblMrktStatusHide");
    //$('.blueStrip').addClass('blueStripTopPos');
    $('header').addClass('headerTopPos');
    $('.mblMrktStatus').addClass('mblMrktStatusTopPos');

    if (homescroll < 200) {
      $("header").removeClass("bgColor");
      $(".mblMrktStatus").removeClass("bgColor");
      $(".newsTicker").addClass("btmAlign");
      $('.blueStrip').removeClass('blueStripTopPos');
      $('header').removeClass('headerTopPos');
      $('.mblMrktStatus').removeClass('mblMrktStatusTopPos');

      $(".blueStrip").removeClass("blueStripHide");
      $("header").removeClass("topSpace");
	  $(".mblMrktStatus").removeClass("mblMrktStatusHide");
    }
  }
  homelastScrollTop = homescroll;

   
  
});

}catch(e){console.log("Module 'tadawul_home_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{/** 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.touchDevice=(com_ibm_device_class.indexOf("tablet")!=-1)||(com_ibm_device_class.indexOf("smartphone")!=-1);
_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);
};
if(_1b.touchDevice){
var _1d=i$.bindDomEvt(document.body,"touchmove",function(evt){
var _1e=(evt)?evt.target||evt.srcElement:null;
var _1f=i$.byId(_1b.id);
if(i$.hasClass((_1b.shadowNode)?_1b.shadowNode:_1f,_24.show)&&!i$.isDescendant(_1e,_1b.shadowNode)){
i$.unbindDomEvt(_1d);
if(_1b._inProgress){
_displayMenu=false;
}
_1b.closeFn(false);
}
});
}
var _20=function(_21){
if(_21.displayMenu){
_1b.activeAction=false;
i$.fireEvent("wptheme/contextMenu/close/all");
var _22=i$.byId(_1b.id);
if(!_1b._submenu){
i$.fireEvent("wptheme/contextMenu/close/all");
_7.contextMenu._updateAbsolutePosition(_22);
}
var _23=_7.contextMenu._adjustScreenPositionStart();
i$.addClass((_1b.shadowNode)?_1b.shadowNode:_22,_24.show);
if(_1a){
_7.contextMenu._adjustScreenPositionEnd(_23);
}
var _25=_22._firstSelectable;
if(_25){
_25.focus();
_22._currentSelected=_25;
}
i$.addClass((_1b.shadowNode)?_1b.shadowNode:_22,("ontouchstart" in document)?"":_24.noTouch);
}
};
_7.contextMenu._initialize(_19).then(_20,_20);
_19=null;
},initSubmenu:function(_26,_27,_28){
_26._contextMenu=_26._contextMenu||{};
var _29=_26._contextMenu;
_29._submenu=true;
_29._menuitemTemplate=_28._menuitemTemplate;
_29._subMenuTemplate=_28._subMenuTemplate;
_29._loadingTemplate=_28._loadingTemplate;
_7.contextMenu.init(_26,_27,_28.jsonQuery);
},_findFocusNode:function(_2a){
var _2b,i,_2c;
var _2d=function(_2e,_2f){
var l=_2e.childNodes.length;
for(i=0;i<l;i++){
if(_2b){
break;
}
_2c=_2e.childNodes[i];
if(i$.hasClass(_2c,_24.focus)){
_2b=_2c;
break;
}
if(_2c.childNodes){
i=_2d(_2c,i);
}
}
return _2f;
};
if(i$.hasClass(_2a,_24.focus)){
return _2a;
}
_2d(_2a);
return _2b;
},_findNodes:function(_30,_31){
var _32,_33,_34,_35,i,_36;
var _37=function(_38,_39){
for(i=_38.childNodes.length-1;i>=0;i--){
_36=_38.childNodes[i];
if(i$.hasClass(_36,_24.menuTemplate)){
_33=_36;
continue;
}
if(i$.hasClass(_36,_24.submenuTemplate)){
_34=_36;
continue;
}
if(i$.hasClass(_36,_24.loadingTemplate)){
_35=_36;
continue;
}
if(_36.childNodes){
i=_37(_36,i);
}
}
return _39;
};
if(_31&&!_30._contextMenu.menuNode){
_32=document.getElementById(_31);
if(_32){
_32=_32.cloneNode(true);
_30.appendChild(_32);
}
}
_37(_30);
if(!_33){
_32=document.getElementById("simpleMenuTemplate");
if(_32){
_32=_32.cloneNode(true);
_30.appendChild(_32);
_37(_30);
}
}
var _3a={"root":_32,"menu":_33,"submenu":_34,"loading":_35};
return _3a;
},_findNextNodeByKeyCode:function(_3b,_3c){
var _3d=_3b.parentNode;
var _3e,_3f,_40,i,j;
var l=_3d.childNodes.length;
for(i=0;i<l;i++){
if(_3d.childNodes[i]==_3b){
break;
}
}
for(j=i+1;j<l;j++){
_3e=_3d.childNodes[j];
_3f=_3e.textContent||_3e.innerText;
if(_3e._menuitem&&_3e._menuitem.type!=_4&&_3e._menuitem.type!=_3&&_3f&&_3f.charAt(0).toUpperCase().charCodeAt(0)==_3c){
_40=_3d.childNodes[j];
return _40;
}
}
for(j=0;j<i;j++){
_3e=_3d.childNodes[j];
_3f=_3e.textContent||_3e.innerText;
if(_3e._menuitem&&_3e._menuitem.type!=_4&&_3e._menuitem.type!=_3&&_3f&&_3f.charAt(0).toUpperCase().charCodeAt(0)==_3c){
_40=_3d.childNodes[j];
return _40;
}
}
return null;
},_invalidateCallback:function(){
_7.contextMenu.cache={};
},_initialize:function(_41){
var _42=true;
var _43=_41._contextMenu;
if(_7.contextMenu.cache[_43.id]||_43._inProgress){
return i$.promise.resolved({displayMenu:_42});
}
_43._inProgress=true;
i$.addListener("wptheme/contextMenu/invalidate/all",_7.contextMenu._invalidateCallback);
var _44,_45,tmp=i$.createDom("div"),_46;
if(_43._submenu){
tmp.innerHTML=_43._subMenuTemplate.replace(/\$\{submenu-id\}/g,_43.id+"_menu");
_41.appendChild(tmp.firstChild);
_44=i$.byId(_43.id+"_menu");
_45=i$.createDom("div");
_45.innerHTML=_43._loadingTemplate;
}else{
var _47=_7.contextMenu._findNodes((_43.shadowNode)?_43.shadowNode:_41,_41._contextMenu.templateId);
_44=_47.menu;
_46=_47.root;
if(_46){
if(_43.alignLeft||_43.alignRight){
i$.removeClass(_46,_24.alignLeft);
i$.removeClass(_46,_24.alignRight);
if(_43.alignLeft){
i$.addClass(_46,_24.alignLeft);
}else{
i$.addClass(_46,_24.alignRight);
}
}
_46.removeAttribute("id");
}
if(!_43._menuitemTemplate){
_43._menuitemTemplate=i$.trim(_44.innerHTML);
}
if(!_43._loadingTemplate){
_45=i$.createDom("div");
_45.appendChild(_47.loading);
_43._loadingTemplate=i$.trim(_45.innerHTML);
_43._loadingTemplate=_43._loadingTemplate.replace(/\$\{loading\}/g,_7.contextMenu.nls.LOADING_0);
_45=null;
}
_45=i$.createDom("div");
_45.innerHTML=_43._loadingTemplate;
if(_47.submenu){
tmp.appendChild(_47.submenu.cloneNode(true));
if(!_43._subMenuTemplate){
_43._subMenuTemplate=i$.trim(tmp.innerHTML);
}
}
}
while(_44.firstChild){
_44.removeChild(_44.firstChild);
}
_44.appendChild(_45);
var _48;
if(_43._submenu){
_48=_43.shadowNode;
}else{
if(_43.shadowNode){
_48=_43.shadowNode;
}else{
_48=_7.contextMenu._transformIntoAbsolutePosition(_41);
}
}
i$.addClass((_48)?_48:_41,_24.show);
i$.bindDomEvt((_48)?_48:_41,"onmouseleave",function(){
if(_43._inProgress){
_42=false;
}
_43.closeFn(false);
});
var _49=_7.contextMenu._load(_43).then(function(_4a){
var _4b=_7.contextMenu._parseData(_4a).then(function(_4c){
_4c=_7.contextMenu._filterMenu(_4c);
if(!_4c||_4c.length==0){
_4c=[{type:"Menuitem",_enabled:true,itemClass:_24.error,title:{value:_7.contextMenu.nls.NO_ITEMS_0,lang:"en"}}];
}
_7.contextMenu._buildMenu(_43,_44,_4c);
_43._inProgress=false;
_7.contextMenu.cache[_43.id]=true;
return {displayMenu:_42};
});
return _4b;
},function(){
var tmp=i$.createDom("div");
tmp.innerHTML=_7.contextMenu._fromTemplate(_43._menuitemTemplate,_24.error,_7.contextMenu.nls.ERROR_LOADING_0);
while(_44.firstChild){
_44.removeChild(_44.firstChild);
}
_44.appendChild(tmp);
_43._inProgress=false;
_7.contextMenu.cache[_43.id]=true;
return {displayMenu:_42};
});
return _49;
},close:function(_4d,_4e,evt){
var _4f=(evt)?evt.target||evt.srcElement:null;
var _50=i$.byId(_4d.id);
i$.removeClass((_4d.shadowNode)?_4d.shadowNode:_50,_24.show);
if(!_4d.activeAction){
var _51=_50._currentSelected;
if(_51){
_51.blur();
}
var _52=_7.contextMenu._findFocusNode(_50);
window.setTimeout(function(){
((_52)?_52:_50).focus();
if(_4e){
window.setTimeout(function(){
_7.contextMenu._applyAction(_4f);
},0);
}
},0);
}
},_load:function(_53){
var _54=_1.replace(/\$\{id\}/g,_53.menuId);
if(_53.jsonQuery){
_54+=(_54.indexOf("?")==-1?"?":"&")+i$.toQuery(_53.jsonQuery);
}
var _55=i$.xhrGet({url:_54,headers:{"X-IBM-XHR":"true","Cache-Control":"No-Cache"},responseType:"json"}).then(function(_56){
var _57=_53.jsonQuery.secondaryRootNode;
if(_57!=null){
_53.jsonQuery.rootNode=_57;
var _58=_1.replace(/\$\{id\}/g,_53.menuId);
_58+=(_54.indexOf("?")==-1?"?":"&")+i$.toQuery(_53.jsonQuery);
var _59=i$.xhrGet({url:_58,headers:{"X-IBM-XHR":"true"},responseType:"json"}).then(function(_5a){
return _56.data.concat(_5a.data);
});
return _59;
}
return _56.data;
},function(_5b){
var _5c=_5b.xhr.getResponseHeader("Content-Type")||"";
if((_5c.indexOf("text/html")==0)||(_5b.xhr.status==401)){
window.setTimeout(function(){
document.location.reload();
},0);
}
console.log("Error trying to load the context menu feed for '"+_53.menuId+"': "+_5b);
return null;
});
return _55;
},_parseData:function(_5d){
var _5e=[];
i$.each(_5d,function(_5f){
var _60=i$.fromPath("moduleInfo.deferred",false,_5f)?i$.modules.loadDeferred():i$.promise.resolved(true);
_5e.push(_60.then(function(){
var _61=_7.contextMenu._checkFunction(_5f,_5f.visibilityFn,_5f,(typeof _5f.visibility!="undefined")?_5f.visibility:true);
var _62=_7.contextMenu._checkFunction(_5f,_5f.enableFn,_5f,(typeof _5f.enabled!="undefined")?_5f.enabled:true);
return i$.whenAll(_61,_62).then(function(_63){
_5f._visible=_63[0];
_5f._enabled=_63[1];
return _5f;
});
}));
});
var _64=i$.whenAll.apply(i$,_5e);
return _64;
},_filterMenu:function(_65){
var _66=[],_67,_68={"type":_3};
for(var i=_65.length-1;i>=0;i--){
_67=_65[i];
if(!_67._visible){
continue;
}
if(_67.type==_3){
if(_68.type==_3){
continue;
}
}else{
if(_67.type==_4){
if((_68.type==_3)||(_68.type==_4)){
continue;
}
}
}
_68=_67;
_66.unshift(_67);
}
while(_66.length>0&&_66[0].type==_3){
_66=_66.slice(1);
}
return _66;
},_buildMenu:function(_69,_6a,_6b){
var _6c=document.createDocumentFragment(),tmp=i$.createDom("div"),_6d,_6e,_6f,_70,_71,_72,_73=i$.fromPath("wptheme.contextMenu.extension.badge");
for(var i=0,l=_6b.length;i<l;i++){
_6d=_6b[i];
tmp.innerHTML=_7.contextMenu._fromTemplate(_69._menuitemTemplate,_6d,_73);
while(_6e=tmp.firstChild){
if(_6e.nodeType==1){
if(_6d.type=="Submenu"){
_6e._menuitem=_6d;
_6e._jsonData=_69;
i$.bindDomEvt(_6e,"onmouseover",_7.contextMenu._applySubmenu);
}else{
if(_6d._enabled){
if(!_71){
_71=_6e;
}
_72=_6e;
_6e.links={previous:_6f,next:null,sub:null};
if(_6f){
_6f.links.next=_6e;
}
if(!_70&&_6d.type!=_4){
_70=_6e;
}
_6e._menuitem=_6d;
_6f=_6e;
i$.bindDomEvt(_6e,"onclick",function(evt){
_7.contextMenu._stopEventPropagation(evt);
_69.closeFn(true,evt);
});
i$.bindDomEvt(_6e,"onkeydown",function(evt){
return _7.contextMenu._applyKeyAction(evt);
});
i$.bindDomEvt(_6e,"onmouseover",function(evt){
return _7.contextMenu._applyFocusAction(evt);
});
}
}
if((_6d.title)&&(i$.isRTL(_6d.title.lang))){
i$.addClass(_6e,"rtl");
_6e.setAttribute("dir","RTL");
}
if(_6d.markupId){
_6e.setAttribute("id",_6d.markupId);
}
if(_73){
_73.injectBadge(_6e);
}
}
_6c.appendChild(_6e);
}
}
_71.links.previous=_72;
_72.links.next=_71;
while(_6a.firstChild){
_6a.removeChild(_6a.firstChild);
}
_6a.appendChild(_6c);
i$.byId(_69.id)._firstSelectable=_70;
i$.byId(_69.id)._currentSelected=null;
},_fromTemplate:function(_74,_75,_76){
var _77,_78,_79,_7a="";
if(typeof (_75)=="string"){
_77=_75;
_78=_76;
_79="";
}else{
_77="type"+_75.type;
if(_75.itemClass){
_77+=" "+_75.itemClass;
}
if(!_75._enabled){
_77+=" "+_24.disabled;
}
_78=(_75.title)?_75.title.value:"";
_79=((_75.description)?_75.description.value:"");
if(_76){
_7a=_76.getAnchor(_75);
}
}
var _7b=_74.replace(/\$\{title\}/g,_78).replace(/\$\{badge\}/g,_7a).replace(/"\$\{css-class\}"/g,"\""+(_77)+"\"").replace(/\$\{css-class\}/g,"\""+(_77)+"\"").replace(/"\$\{description\}"/g,"\""+_79+"\"").replace(/\$\{description\}/g,"\""+_79+"\"");
return _7b;
},_checkFunction:function(_7c,fn,arg,_7d){
if(fn){
if(!_7c.fromPath){
_7c.fromPath={};
}
var _7e=i$.fromPath("wptheme.contextMenu.extension.menuItemScope"),_7f=_7e?_7e.getWindow(_7c):null,_80=_7c.fromPath[fn]||i$.fromPath(fn,false,_7f);
_7c.fromPath[fn]=_80;
if(i$.isFunction(_80)){
try{
return _80(arg);
}
catch(exc){
console.log("error executing function "+fn+" - "+exc);
}
}
}
return i$.promise.resolved(_7d);
},_stopEventPropagation:function(evt){
if(evt){
if(evt.stopPropagation){
evt.stopPropagation();
}else{
evt.cancelBubble=true;
}
}
},_applyKeyAction:function(evt){
var _81=evt.target||evt.srcElement;
var _82=_81;
var _83=null;
while(!_83){
_82=_82.parentNode;
if(_82._contextMenu){
_83=_82;
}
}
var _84=_83._contextMenu;
switch(evt.keyCode){
case 32:
if(evt.preventDefault){
evt.preventDefault();
}
case 13:
_7.contextMenu._stopEventPropagation(evt);
_84.closeFn(true,evt);
return false;
case 9:
case 27:
_84.closeFn(false);
break;
case 40:
_7.contextMenu._moveFocus(evt,_84,_81,"next");
return false;
case 38:
_7.contextMenu._moveFocus(evt,_84,_81,"previous");
return false;
}
var _85=_7.contextMenu._findNextNodeByKeyCode(_81,evt.keyCode);
if(_85){
_85.focus();
return false;
}
return true;
},_moveFocus:function(evt,_86,_87,_88){
var _89=_87.links[_88];
if(_89&&(_89._menuitem.type==_4||_89._menuitem.type==_3)){
var _8a=false;
var _8b=null;
while(!_8b&&!_8a){
_89=_89.links[_88];
if(!_89){
_8a=true;
}else{
if(_89._menuitem.type!=_4&&_89._menuitem.type!=_3){
_8b=_89;
}
}
}
_89=_8b;
}
if(_89){
var _8c=i$.byId(_86.id)._currentSelected;
if(_8c){
_8c.blur();
}
i$.byId(_86.id)._currentSelected=_89;
_89.focus();
}
if(evt.preventDefault){
evt.preventDefault();
}
},_applyFocusAction:function(evt){
var _8d=evt.target||evt.srcElement;
var _8e=_8d;
var _8f=null;
var _90=_8d._menuitem;
while(!_8f){
_8e=_8e.parentNode;
if(_8e._contextMenu){
_8f=_8e;
}
if(!_90){
_8d=_8d.parentNode;
_90=_8d._menuitem;
}
}
var _91=_8f._contextMenu;
var _92=i$.byId(_91.id)._currentSelected;
if(_92!=_8d){
if(_92){
_92.blur();
i$.byId(_91.id)._currentSelected=null;
}
if(_90.type!=_4&&_90.type!=_3){
i$.byId(_91.id)._currentSelected=_8d;
_8d.focus();
}
}
return false;
},_applyAction:function(_93){
var _94=_93;
var _95=null;
var _96=_93._menuitem;
while(!_95){
_94=_94.parentNode;
if(_94._contextMenu){
_95=_94;
}
if(!_96){
_93=_93.parentNode;
_96=_93._menuitem;
}
}
var _97=_95._contextMenu;
_97.activeAction=true;
var p=_7.contextMenu._checkFunction(_96,_96.actionFn,_96,_96.actionUrl);
if(p){
p.then(function(_98){
if(_98&&i$.isString(_98)){
var _99=i$.fromPath("wptheme.contextMenu.extension.actionUrlTarget");
var _9a=(_99)?_99.getWindow(_96):window;
var _9b=_96.actionHttpMethod||"GET";
if(_9b!="GET"){
var _9c=_9a.i$.createDom("form");
_9c.setAttribute("action",_98);
_9b=_9b.toLowerCase();
switch(_9b){
case "get":
_9c.setAttribute("method","GET");
break;
case "delete":
case "put":
var _9d=_9a.i$.createDom("input",{"type":"hidden","name":"x-method-override","value":_9b.toUpperCase()});
_9c.appendChild(_9d);
case "post":
_9c.setAttribute("method","POST");
_9c.setAttribute("enctype","multipart/form-data");
break;
default:
}
_9a.i$.byId(_24.complementaryContent).appendChild(_9c);
_9c.submit();
}else{
var _9e=_9a.i$.createDom("a");
_9e.setAttribute("style","display:none");
_9e.setAttribute("href",_98);
_9a.i$.byId(_24.complementaryContent).appendChild(_9e);
_9e.click();
}
}
});
}
},_applySubmenu:function(evt){
var _9f=evt.target||evt.srcElement;
if(!_9f._jsonData){
_9f=_9f.parentNode;
}
if(_9f._jsonData){
_9f.setAttribute("id",_9f._jsonData.id+"_"+_9f._menuitem.id);
_7.contextMenu.initSubmenu(_9f,_9f._menuitem.id,_9f._jsonData);
}
},_transformIntoAbsolutePosition:function(_a0){
var _a1=_a0.childNodes,_a2,i=0,_a3=false;
while(_a2=_a1[i++]){
if(i$.hasClass(_a2,_24.alignRight)){
_a3=true;
break;
}else{
if(i$.hasClass(_a2,_24.alignLeft)){
break;
}
}
}
var _a4=i$.createDom("div");
_a4.className=_a0.className;
_a4.appendChild(_a2);
i$.byId(_24.complementaryContent).appendChild(_a4);
_a4._contextMenu=_a0._contextMenu;
_a0._contextMenu.shadowNode=_a4;
_a0._contextMenu._menuIsRight=_a3;
var _a5=i$.createDom("span");
_a4.appendChild(_a5);
i$.addClass(_a5,_24.menuOverlay);
_a0._contextMenu.overlayNode=_a5;
_a0._contextMenu.menuNode=_a2;
_7.contextMenu._updateAbsolutePosition(_a0);
return _a4;
},_updateAbsolutePosition:function(_a6){
var _a7=_a6._contextMenu._menuIsRight;
var _a8=_a6._contextMenu.menuNode;
var _a9=_a6._contextMenu.overlayNode;
var _aa=_7.contextMenu._findPos(_a6);
var _ab=2;
_a9.style.left=(_aa[0]-_ab)+"px";
_a9.style.top=(_aa[1]-_ab)+"px";
_a9.style.width=(_a6.offsetWidth+(2*_ab))+"px";
_a9.style.height=(_a6.offsetHeight+(2*_ab))+"px";
var dir=document.getElementsByTagName("html")[0].getAttribute("dir");
if(dir!=null){
dir=dir.toLowerCase();
}else{
dir="";
}
if(!(dir=="rtl")){
_a8.style.left=((_a7)?_aa[0]+_a6.offsetWidth:_aa[0])+"px";
}else{
_a8.style.left=((_a7)?_aa[0]+_a6.offsetWidth-_a6.scrollWidth:_aa[0]+_a6.scrollWidth)+"px";
}
_a8.style.top=_aa[1]+"px";
},_adjustScreenPositionStart:function(){
return document.documentElement.scrollHeight;
},_adjustScreenPositionEnd:function(_ac){
var _ad=document.documentElement.scrollHeight;
if(_ac!=_ad){
document.documentElement.scrollTop=document.documentElement.scrollHeight;
}
},_findPos:function(obj){
var _ae=curtop=0;
if(obj.offsetParent){
do{
_ae+=obj.offsetLeft;
curtop+=obj.offsetTop;
}while(obj=obj.offsetParent);
var _af=[_ae,curtop];
return _af;
}
},});
var _24=_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{(function(_1){
var _2="aria-labelledby",_3="aria-describedby",_4="aria-label",_5="aria-pressed",_6="title",_7="true",_8="false",_9="selected",_a="disabled",_b="show-text",_c="hide-text",_d="disableClick",_e="remove",_f="off-label",_10="on-label",_11="wpToolbarHighContrast",_12="http://www.ibm.com/xmlns/prod/websphere/portal/publicparams",_13="wpPageModeToggleIdContainer",_14="wpInfoModeToggle",_15="wpInfoModeToggleLink",_16="wpPageModeToggle",_17="wptoogleInput",_18="wpPageModeToggleLink",_19="wpPageIsPractitioner",_1a="wpPageModeToggleIdContainer",_1b="wpToolbarToggle",_1c="ibm.portal.home.createpage",_1d="wpEditTooltip",_1e="ibm.portal.toolbar.NewPage",_1f="wps.content.root",_20="wps.Administration",_21="ibm.portal.page.Applications",_22="hcl.portal.practitionerstudio",_23="hcl.portal.helplinks",_24="wpHelpContainerID",_25="wpHelpCenterDialogContent-root",_26="wpHelpCenterDialog",_27=[13,32,38,40],_28=[13,32],T=true,F=false,_29=i$.byId,_2a=i$.hasClass,_2b=i$.addClass,_2c=i$.removeClass,_2d=i$.forEach,_2e=i$.toQuery,_2f=i$.fromPath,_30=i$.bindDomEvt;
function _31(_32,_33){
var _34=_32||_29(_16),_35="valueoff",_36="valueon",_37=_29(_17),_38=_29(_f),_39=_29(_10),_3a=document.getElementById("wpViewModeDesc").textContent,_3b=document.getElementById("wpEditModeDesc").textContent,_3c=document.getElementById(_1d);
if(_33){
if(!_2a(_34,_36)){
_2c(_34,_35);
_2b(_34,_36);
_2c(_38,_b);
_2c(_39,_c);
_2b(_38,_c);
_2b(_39,_b);
_3c.innerHTML=_3b;
_3d(_34,_5,_7);
_3d(_34,_4,_3b);
_37.setAttribute("checked",true);
}
}else{
if(_2a(_34,_36)){
_2c(_34,_36);
_2b(_34,_35);
_2c(_38,_c);
_2c(_39,_b);
_2b(_38,_b);
_2b(_39,_c);
_3c.innerHTML=_3a;
_3d(_34,_5,_8);
_3d(_34,_4,_3a);
_37.removeAttribute("checked");
}
}
};
function _3e(_3f,_40){
var _41=_3f||_29(_14),_42=_29(_15);
if(_40){
if(!_2a(_41,_9)){
_2b(_41,_9);
_3d(_42,_2,"wpInfoModeOnLabel");
_3d(_42,_3,"wpInfoModeOnDesc");
_3d(_42,_5,_7);
_3d(_41,_6,_43(_44(_29("wpInfoModeOnDesc"))));
}
}else{
if(_2a(_41,_9)){
_2c(_41,_9);
_3d(_42,_2,"wpInfoModeOffLabel");
_3d(_42,_3,"wpInfoModeOffDesc");
_3d(_42,_5,_8);
_3d(_41,_6,_43(_44(_29("wpInfoModeOffDesc"))));
}
}
};
function _45(_46,e){
if(!_47(e,_28)){
return F;
}
_2b(_46,_9);
var _48=wpModules.toolbar;
if(_48.isToolbarOpened()){
_48.closeToolbar();
}else{
_48.openToolbar({"autoOpenDefaultTabs":true});
}
return T;
};
function _49(_4a,_4b,e){
var _4c=_29(_17),_4d=_29(_f),_4e=_29(_10);
if(!_47(e,_28)){
return F;
}
top.document.getElementById("wpToolbarActionBarBackground").style.pointerEvents="none";
if(!_2a(_4a,_a)){
var t=wpModules.toolbar,_4f=t.isEditModeActive();
if(_4f){
_2c(_4d,_b);
_2c(_4e,_c);
_2b(_4d,_c);
_2b(_4e,_b);
_4c.setAttribute("checked",true);
t.setEditModeActive(F);
}else{
_2c(_4d,_c);
_2c(_4e,_b);
_2b(_4d,_b);
_2b(_4e,_c);
_4c.removeAttribute("checked");
if(_4b&&_50()){
var _51={"editMode":T};
if(!t.isToolbarOpened()){
_51.autoOpenDefaultTabs=true;
}
t.openToolbar(_51);
}else{
t.setEditModeActive(T);
}
}
_31(_4a,!_4f);
}
return T;
};
function _52(_53,e){
if(!_47(e,_28)){
return F;
}
var t=wpModules.toolbar,_54=t.isInfoModeActive();
_3e(_53,!_54);
t.setInfoModeActive(!_54);
return T;
};
function _55(){
return _56().then(function(_57){
var _58=_57;
if(_58.length!=0&&wpModules.toolbar.isInfoModeActive()){
return T;
}else{
return F;
}
});
};
function _59(){
return _56().then(function(_5a){
var _5b=_5a;
if(_5b.length!=0&&!wpModules.toolbar.isInfoModeActive()){
return T;
}else{
return F;
}
});
};
var _5c=document.getElementById("wpPageModeToggle");
var _5d=document.getElementById("wpEditTooltip");
var _5e;
function _5f(){
_5d.style.display="block";
};
function _60(){
_5d.style.display="none";
};
function _61(e){
if(e.key==="Escape"||e.key==="Esc"){
_60();
_5c.blur();
}
};
if(_5c){
_5c.addEventListener("mousemove",function(){
_5f();
_5c.focus();
document.addEventListener("keydown",_61);
});
_5c.addEventListener("mouseleave",function(){
_60();
});
_5d.addEventListener("mouseenter",function(){
_5f();
});
_5d.addEventListener("mouseleave",function(){
_60();
document.removeEventListener("keydown",_61);
});
}
function _56(){
return new Promise(function(_62){
var _63=ibmCfg.portalConfig.contentHandlerURI+((ibmCfg.portalConfig.contentHandlerURI.indexOf("?")<0)?"?":"&")+"uri=menu:navigationMenu";
var _64={navID:_86(),rootNode:_22};
if(_64){
_63+=(_63.indexOf("?")==-1?"?":"&")+i$.toQuery(_64);
}
i$.xhrGet({url:_63,headers:{"X-IBM-XHR":"true"},responseType:"json"}).then(function(_65){
_62(_65.data);
});
});
};
function _66(){
var t=wpModules.toolbar;
t.setInfoModeActive(F);
};
function _67(){
var t=wpModules.toolbar;
t.setInfoModeActive(T);
};
function _68(_69,e){
var _6a=_29(_24);
var _6b=document.getElementById(_25);
var k=e.keyCode;
if(k&&k!==13&&k!==32&&k!==38&&k!==40&&k!==27){
return F;
}
_3d(_6a,"style","display: none");
_6b.innerHTML="";
};
function _6c(_6d,e,_6e){
var _6f=_29(_24);
var _70=document.getElementById(_25);
var _71=document.getElementById(_26);
var k=e.keyCode;
if(k&&k!==13&&k!==32&&k!==38&&k!==40){
return F;
}
window.open(_6e,"_blank");
return T;
};
function _72(_73,e){
var _74=F;
if(_75()){
_74=_76(_73,_1f,e);
}else{
_77(_1f);
_74=T;
}
return _74;
};
function _78(_79,e){
var _7a=F;
if(_75()){
_7a=_76(_79,_21,e);
}else{
_77(_21);
_7a=T;
}
return _7a;
};
function _7b(_7c,e){
var _7d=F;
if(_75()){
_7d=_7e(_7c,_22,_23,e);
}else{
_77(_22);
_7d=T;
}
return _7d;
};
function _7f(_80,e){
var _81=T;
_77(_20);
return _81;
};
function _75(){
var _82=(typeof wptheme!="undefined"&&wptheme.contextMenu);
return _82;
};
function _76(_83,_84,e){
if(!_47(e,_27)){
return F;
}
var _85={"navID":_86(),"rootNode":_84};
var _87=wpModules.toolbar;
if(_87&&_87.isToolbarOpened()){
_85.contribURI="nm:oid:ibm.portal.Toolbar";
}
_88(_83,"navigationMenu",_85);
return T;
};
function _7e(_89,_8a,_8b,e){
if(!_47(e,_27)){
return F;
}
var _8c={"navID":_86(),"rootNode":_8a,"secondaryRootNode":_8b};
var _8d=wpModules.toolbar;
if(_8d&&_8d.isToolbarOpened()){
_8c.contribURI="nm:oid:ibm.portal.Toolbar";
}
_88(_89,"navigationMenu",_8c);
return T;
};
function _88(_8e,_8f,_90){
_2b(_8e.parentNode,_9);
args={"node":_8e.parentNode,"menuId":_8f,"jsonQuery":_90,"params":{"templateId":"simpleMenuTemplate","alignment":"right","autoScroll":false},"onClose":function(){
_2c(_8e.parentNode,_9);
}};
wptheme.contextMenu.init(args);
};
function _91(){
return _29(_19).value;
};
function _3d(_92,_93,_94){
_92.setAttribute(_93,_94);
};
function _44(_95){
return _95.firstChild;
};
function _43(_96){
return _96.nodeValue;
};
function _97(_98){
var fc=_98.firstChild;
while(fc&&fc.nodeType!==1){
fc=fc.nextSibling;
}
return fc;
};
function _99(_9a,_9b,_9c){
if(_9c&&_9a&&_9b&&_9b.length>0){
_2d(_9b,function(p){
if(_9a.name==p.name&&_9a.nsuri==p.nsuri){
_9c(p.value);
return F;
}
});
}
};
function _47(e,_9d){
var k=e?e.keyCode:null;
if(k){
if(_9d){
var r=_9d.indexOf(k)>=0;
return r;
}else{
return F;
}
}
return T;
};
function _9e(){
return wpModules.toolbar.getViewAreaWindow();
};
function _86(){
var r=_9e().ibmCfg.portalConfig.currentPageOID;
return r;
};
function _9f(){
return _2f("ibmCfg.portalConfig.isCurrentPageEditable",false,_9e());
};
function _50(){
return _2f("wpModules.state.page.supportsToolbar",false,_9e());
};
function _77(id){
wpModules.toolbar.loadViewArea("nm:oid:"+id);
};
function _a0(_a1){
if(_a1&&_a1.pageId){
var id=_a1.pageId;
if(id&&id.value&&id.value.length>0){
_77(id.value[0]);
}
}
};
i$.addOnLoad(function(){
var _a2=i$.fromPath("wpModules.state.page",false);
if(_a2){
var _a3=_a2.getStateManager();
_a3.addListener(function(_a4){
var _a5=_a4.renderParams().getModified();
_99({"nsuri":_12,"name":"editMode"},_a5,function(_a6){
var res=(_a6&&_a6[0]=="true"),_a7=_29(_16);
if(_a7){
_31(_a7,res);
}
});
_99({"nsuri":_12,"name":"infoMode"},_a5,function(_a8){
var res=(_a8&&_a8[0]=="true"),_a9=_29(_14);
if(_a9){
_3e(_a9,res);
}
});
});
}
var _aa=wpModules.toolbar.getViewAreaWindow();
if(self===_aa){
var w=_aa.parent||_aa,_ab=w.document.getElementById(_16),_ac=_29(_1a),_ad=w.document.getElementById(_1b),_ae=wpModules.toolbar.isEditModeActive(),_af=w.document.getElementById(_1d),_b0=w.document.getElementById("wpEditModeDesc"),_b1=w.document.getElementById("wpViewModeDesc"),_b2=w.document.getElementById("wpEditModeDisable");
if(_ab){
if(_9f()&&_b2){
_2c(_ab,_a);
_2c(_ab,_d);
_2c(_ac,_e);
if(_ae&&_b0){
_af.innerHTML=_b0.textContent;
}else{
_af.innerHTML=_b1.textContent;
}
}else{
_2b(_ab,_d);
_2b(_ab,_a);
_2b(_ac,_e);
_af.innerHTML=_b2.innerText;
}
}
if(_ad){
if(_50()){
_2c(_ad,_a);
}else{
_2b(_ad,_a);
}
}
}
var _b3=_29(_1c);
if(_b3){
var _b4=wpModules.toolbar;
_b3.onClose=_a0;
if(_b4.isToolbarOpened()||_29(_16)){
var _b5={};
_b5.id=_1c;
_b5.key="onClose";
_30(_b3,"click",function(e){
_b4.openToolbar({"primaryTab":"siteManagerTreeTab:context:oid:"+_86()+":default:action:CREATE_CHILD_PAGE","onCloseDialog":_b5});
e.preventDefault?e.preventDefault():e.returnValue=F;
return F;
});
}
}
});
wpModules.a11y.highContrastMode.then(function(_b6){
if(_b6){
_2b(_29(_14),_11);
}
});
_1.toggleToolbar=_45;
_1.toggleEditMode=_49;
_1.toggleInfoMode=_52;
_1.openSitesMenu=_72;
_1.openApplicationsMenu=_78;
_1.openAdministration=_7f;
_1.openHelpArticle=_6c;
_1.closeHelpArticle=_68;
_1.toggleInfoModeOff=_66;
_1.toggleInfoModeOn=_67;
_1.isInfoModeActive=_55;
_1.isInfoModeInactive=_59;
_1.openPractitionersMenu=_7b;
})(i$.fromPath("wpModules.theme.ActionBar",true));


}catch(e){console.log("Module 'wp_toolbar_actionbar': ",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{(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){
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{$(window).on("load", function () {
  var windWidth = $(window).width();
  var windHeight = $(window).height();
  //console.clear();
  var body = $("html, body");
    body.stop().animate({scrollTop:0}, 500, 'swing', function() {
        
    });
  
  Highcharts.setOptions({
      
	  lang: {
		  decimalPoint:'.',
          thousandsSep: ','
      },
	  global : {
          useUTC : false
      },
	  credits: {
		enabled: false
     }

  });

  setTimeout(() => {
    $(".pageLoader").hide();
  }, 500);
  
 
  $(".groupList select").on("change", function () {
	console.log("GroupList - EN");
    var getVal = $(this).val();
    if (getVal == "1") {
      window.open(
        "https://www.tadawulgroup.sa/wps/portal/tadawulgroup/home?locale=en",
        "_blank"
      );
      return false;
    }
    if (getVal == "2") {
      window.open("https://www.edaa.sa/wps/portal/edaa/Home?locale=en", "_blank");
      return false;
    }
    if (getVal == "3") {
      window.open("https://www.muqassa.sa/wps/portal/muqassa/home?locale=en", "_blank");
      return false;
    }
    if (getVal == "4") {
      window.open("https://www.wamid.sa/wps/portal/wamid/home?locale=en", "_blank");
      return false;
    }
  });

  $(".blueBoxClose").click(function () {
    $(".blueBoxTrans").hide();
    $(".blueBoxTransPopup").hide();
	$('.blueBoxTransPopup').removeClass('blueBoxPopup');
  });

  $(".newsTicker .newsbxslider").bxSlider({
    minSlides: 3,
    maxSlides: 5,
    ticker: true,
    speed: 15000,
    tickerHover: true,
    slideMargin: 0,
    adaptiveHeight: true,
  });

  $(".statusBox").click(function (e) {
    var blueStripPos = $(".blueStrip").offset().top;
    var blueStripHgt = $(".blueStrip").height();
    var blueStripTop = blueStripPos + blueStripHgt;
     $(".marketStatus").removeClass("open");

    if ($(this).hasClass("open")) {
      $(".marketStatus").removeClass("open");
      $(this).removeClass("open");
      $(".graphBlueBox").hide();
    } else {
      $(".marketStatus").addClass("open");
      $(this).addClass("open");
      $(".graphBlueBox").css("display", "flex");
    }
    e.stopPropagation();
  });

  $(".marketStatus").click(function (e) {
    var blueStripPos = $(".blueStrip").offset().top;
    var blueStripHgt = $(".blueStrip").height();
    var blueStripTop = blueStripPos + blueStripHgt;
     $(".statusBox").removeClass("open");

    if ($(this).hasClass("open")) {
      $(".statusBox").removeClass("open");
      $(this).removeClass("open");
      $(".graphBlueBox").hide();
    } else {
      $(".statusBox").addClass("open");
      $(this).addClass("open");
      $(".graphBlueBox").css("display", "flex");
    }
    e.stopPropagation();
  });

  $(".graphBoxClose").click(function () {
    $(".graphBlueBox").hide();
    $(".marketStatus").removeClass("open");
    $(".statusBox").removeClass("open");
  });

  $(".watchBtn").click(function (e) {
    $(".blueBoxTrans").css("display", "flex");
    $(".loginBox").show();
    $(".blueBox .forgotBox").hide();
    e.stopPropagation();
  });
  
  $(".backtoLgn").on("click", function (e) {
    $(".blueBoxTrans").css("display", "flex");
    $(".loginBox").show();
    $(".forgotBox").hide();
    e.stopPropagation();
  });
  $(".loginBtn").on("click", function () {
    $(".blueBoxTrans").hide();
    $(".forgotBox").hide();
    $(".loginBox").show();
  });

  $(".menuIcon").click(function (e) {
    if ($(this).hasClass("menuClose")) {
      $(this).removeClass("menuClose");
      $(".topHdr .topNav ul").eq(0).hide();
    } else {
      $(this).addClass("menuClose");
      $(".topHdr .topNav ul").eq(0).show();
    }
    $(".mblSrch").removeClass("open");
    $(".mblSrchBox").hide();
    e.stopPropagation();
  });

  $(".searchtxt").click(function (e) {
    if ($(this).hasClass("open")) {
      $(this).removeClass("open");
      $(".srchBox").hide();
    } else {
      $(this).addClass("open");
      $(".srchBox").css("display", "flex");
    }
    e.stopPropagation();
  });

  $(".tradingPostTab li").click(function () {
    var getRel = $(this).attr("rel");
    $(".tradingPostTab li").removeClass("select");
    $(this).addClass("select");

    var scrolpos = $(getRel).offset().top;
    $("html, body")
      .stop()
      .animate({ scrollTop: scrolpos }, 500, "swing", function () {});
  });

  $(".jumptoOneLine li").click(function () {
    var getRel = $(this).attr("rel");
    $(".jumptoOneLine li").removeClass("select");
    $(this).addClass("select");

    var scrolpos = $(getRel).offset().top;
    $("html, body")
      .stop()
      .animate({ scrollTop: scrolpos }, 500, "swing", function () {});
  });

  $('.alertBox .setAlert ul li').click(function(){
    if($(this).hasClass('select')){
      $('.alertBox .setAlert ul li').removeClass('select');
    } else{
      $('.alertBox .setAlert ul li').removeClass('select');
      $(this).addClass('select');
    }
  });

  $('.alertBox .setPrice .editPrice span').click(function(){
    if($(this).hasClass('save')){
      $(this).removeClass('save');
      $('.alertBox .setPrice .editPrice strong input').attr("readonly", true); 
    } else{
      $(this).addClass('save');
      $('.alertBox .setPrice .editPrice strong input').attr("readonly", false); 
    }
  });

  $('.alertBoxClose').click(function(){
      $('.alertBox').hide();
      $('.transTable').hide();
      $('.setAlertPopup').removeClass('select');
  });
  $('.alertSaveBtn').click(function(){
    $('.alertBox').hide();
    $('.transTable').hide();
    $('.setAlertPopup.select').find('i').show();
    $('.setAlertPopup.select').find('b').addClass('underline');
    $('.setAlertPopup.select').find('b').html('Edit Alert');
  });

  $('html').on('click', '.moveList li', function(){
    if(!$(this).hasClass('disable')){
      $('.moveList li').removeClass('select');
      $(this).addClass('select');
      $(this).find('input').attr('checked', 'checked');
      $('.moveSelected .createWatchListBox .createNew').removeClass('open');
      $('.moveSelected .createWatchListBox .typeWatchList').hide();
      $('a.createMove').html('Move Selected');
      $('a.createMove').removeClass('createAndMove');
      $('a.createMove').addClass('onlyMove');
      $('.moveSelected .createWatchListBtn .createMove').show();
    }
  });

  $('.createWatchListBox .createNew').click(function(){
    $(this).addClass('open');
    $('.moveSelected .createWatchListBox .typeWatchList').show();
    $('.moveSelected .moveList ul li').removeClass('select');
    $('.moveSelected .moveList ul li').find('input').prop("checked", false);
    $('a.createMove').html('Create And Move Selected');
    $('a.createMove').removeClass('onlyMove');
    $('a.createMove').addClass('createAndMove');
    $('.moveSelected .createWatchListBtn .createMove').show();
  });

  $('.performanceTable_Tab ul li').click(function () {
		$('.performanceTable_Tab_Dtl').hide();
		$('.performanceTable_Tab ul li').removeClass('select');
		$(this).addClass('select');
		var getIndex = $(this).index();
		$('.performanceTable_Tab_Dtl').eq(getIndex).show();
  });
  
  $('html').on('click','.watchlistTab ul li i',function(){
    var liSize = $('.myWatchlistBox .watchlistTab ul li').length;
    if($(this).parent('li').hasClass('open')){
      $('.watchlistTab ul li').removeClass('open');
      $('.watchlistDropDown').slideUp();
    } else{
      $('.watchlistDropDown').slideUp();
      $('.watchlistTab ul li').removeClass('open');
      $(this).parent('li').addClass('open');
      $(this).parent('li').find('.watchlistDropDown').slideDown();
        if(liSize > 1){
          $(this).parent('li').find('.watchlistDropDown .watchlistOptionDelete').css('display', 'flex');
        }
    }
  });

  $('html').on('click','.watchlistOptionEdit',function(){
    $('.watchlistDropDown').slideUp();
    $('.transTable').css('display', 'flex');
    $('.editWatchList').show();
  });

  $('html').on('click', '.editWatchListClose', function(){
    $('.transTable').hide();
    $('.editWatchList').hide();
  });

  $('html').on('click', '.editTabName', function(){
    var inputVal = $('.editwatchlistName input').val();
    var inputValTrim = inputVal.trim();
    var inputValInt = parseInt(inputValTrim.length);
    if (inputValInt == 0){
      $('.editWatchList .editwatchlistName .errorMsg').show();
      return false;
    } else{
      $('.editWatchList').hide();
      $('.transTable').hide();
      $('.myWatchlistBox .watchlistTab ul li.open strong.name').html(inputVal);
      $('.myWatchlistBox .watchlistTab ul li').removeClass('open');
      $('.editwatchlistName input').val(' ');
      $('.editWatchList .editwatchlistName .errorMsg').hide();
    }
  });

  $('html').on('click','.watchlistOptionDelete',function(){
    var name = $('.myWatchlistBox .watchlistTab ul li.open strong').html();
    $('.transTable').css('display', 'flex');
    $('.deleteWatchList').show();
    $('.deleteWatchList p strong').html(name);
    $('.watchlistDropDown').slideUp();
  }); 

  $('html').on('click', '.deleteWatchListClose', function(){
    $('.transTable').hide();
    $('.deleteWatchList').hide();
    $('.myWatchlistBox .watchlistTab ul li').removeClass('open');
  });

  $('html').on('click', '.deleteCancel', function(){
    $('.transTable').hide();
    $('.deleteWatchList').hide();
    $('.myWatchlistBox .watchlistTab ul li').removeClass('open');
  });

  $('html').on('click', '.deleteCompany', function(){
    var getIndex = $('.myWatchlistBox .watchlistTab ul li.open').index();
    $('.transTable').hide();
    $('.deleteWatchList').hide();
    $('.myWatchlistBox .watchlistTab ul li.open').remove();
    $('.watchlistDtlBox').find('.watchlistDtl').eq(getIndex).remove();
    $('.watchlistDtlBox').find('.watchlistDtl').eq(0).show();
    $('.watchlistDtlBox').find('.watchlistDtl').eq(0).addClass('show');
    $('.myWatchlistBox .watchlistTab ul li').eq(0).addClass('select');
    $('.myWatchlist .createWatchlist').css('display', 'flex');
  });

  $('html').on('click', '.tableField .checkBox', function(){
    if($(this).hasClass('check')){
      $(this).parents('tr').removeClass('select');
      $(this).removeClass('check');
      $(this).find("input").prop("checked", false);
    } else{
      $(this).parents('tr').addClass('select');
      $(this).addClass('check');
      $(this).find("input").prop("checked", true);
    }
    var checkCount = $(this).parents('.watchlistDtl.show').find('tr.select').length;
    if(checkCount >= 1 ){
      $(this).parents('.watchlistDtl.show').find('.afterSlct').show();
      $(this).parents('.watchlistDtl.show').find('.afterSlct .companiesSlct span').html(checkCount);
    } else{
      $(this).parents('.watchlistDtl.show').find('.afterSlct').hide();
      $(this).parents('.watchlistDtl.show').find('.afterSlct .companiesSlct span').html(0);
    }
  });

  $('html').on('click', '.myWatchlistBox th span',  function(){
    var totalTr = $(this).parents('table').find('tbody tr').length;

    if($(this).hasClass('check')){
      $(this).removeClass('check');
      $(this).find("input").prop("checked", false);

      for(var i = 0; i < totalTr; i++){
        $(this).parents('table').find('tbody tr').eq(i).removeClass('select');
        $(this).parents('table').find('tbody tr').eq(i).find('td').eq(0).find('.checkBox').removeClass('check');
        $(this).parents('table').find('tbody tr').eq(i).find('td').eq(0).find('.checkBox').prop("checked", false);
      }

      $(this).parents('.watchlistDtl.show').find('.afterSlct').hide();
      $(this).parents('.watchlistDtl.show').find('.afterSlct .companiesSlct span').html(0);

    } else{
      $(this).addClass('check');
      $(this).find("input").prop("checked", true);

      for(var i = 0; i < totalTr; i++){
        $(this).parents('table').find('tbody tr').eq(i).addClass('select');
        $(this).parents('table').find('tbody tr').eq(i).find('td').eq(0).find('.checkBox').addClass('check');
        $(this).parents('table').find('tbody tr').eq(i).find('td').eq(0).find('.checkBox').prop("checked", true);
      }

      $(this).parents('.watchlistDtl.show').find('.afterSlct').show();
      $(this).parents('.watchlistDtl.show').find('.afterSlct .companiesSlct span').html(totalTr);

    }  
  });

  $('html').on('click', '.watchlistTab ul li', function(){
    var getIndex = $(this).index();
    
    $('.watchlistTab ul li').removeClass('select');
    $(this).addClass('select');  

    $('.myWatchlistBox .watchlistDtlBox .watchlistDtl').removeClass('show');
    $('.myWatchlistBox .watchlistDtlBox .watchlistDtl').hide();
    $('.myWatchlistBox .watchlistDtlBox .watchlistDtl').eq(getIndex).show();
    $('.myWatchlistBox .watchlistDtlBox .watchlistDtl').eq(getIndex).addClass('show');
    
  });

  $('html').on('click', '.watchlistDtl .fa-trash', function(){
      var deleteIndex = $(this).parents('tr').index();
      $(this).parents('tr').addClass('select');
      var tabName = $('.watchlistTab ul li.select strong').html();
      var itemName = $(this).parents('tr').find('.tableField .nameDtl strong').html();

      $('.deleteItem').attr('rel', deleteIndex);
      $('.transTable').css('display', 'flex');
      $('.deleteWatchListItem').show();
      $('.deleteWatchListItem p strong.itemName').html(itemName);
      $('.deleteWatchListItem p strong.tabName').html(tabName);

  });

  $('html').on('click', '.deleteItem', function(){
    $('.transTable').hide();
    $('.deleteWatchListItem').hide();
    $('.watchlistDtl.show').find('table tr.select').remove();
  });

  $('html').on('click', '.deleteItemCancel', function(){
    $('.transTable').hide();
    $('.deleteWatchListItem').hide();
  });

  $('html').on('click', '.deleteWatchListItemClose', function(){
      $('.transTable').hide();
      $('.deleteWatchListItem').hide();
  });

  $('html').on('click', '.afterSlct li.removeSlct', function(){
      var tabName = $('.watchlistTab li.select strong.name').html();
      var slctCount = $(this).parents('.watchlistDtl.show').find('tr.select').length;
      console.log(slctCount)
      $('.transTable').css('display', 'flex');
      $('.deleteWatchListMulty').show();
      $('.deleteWatchListMulty p strong.itemNum').html(slctCount);
      $('.deleteWatchListMulty p strong.tabName').html(tabName);
  });

  $('html').on('click', '.moveSlct', function(){
    $('.moveSelected ul li').remove();
    $('.transTable').css('display', 'flex');
    $('.moveSelected').show();

    var totalTab = $('.watchlistTab ul li').length;
    var slctTab = $('.watchlistTab ul li.select').index();

    for(var i = 0; i < totalTab; i++){
      var tabName = $('.watchlistTab ul li').eq(i).find('strong.name').html();
      $('.moveSelected ul').append(`<li><label><span><input type="radio" name="watchlist"><i></i></span><strong>${tabName}</strong></label></li>`)
    }
    $('.moveSelected ul li').eq(slctTab).addClass('disable');

    if(totalTab < 5){
      $('.moveSelected .createWatchListBox').show();
    } else{
      $('.moveSelected .createWatchListBox').hide();
    }

  });

  $('html').on('click', '.addToWatchlist', function(){
    $('.transTable').css('display', 'flex');
    $('.add-WatchList').show();
    $('.add-WatchList .add-WatchListBox').show();
	$('.add-List li').removeClass('select');
  });

  $('html').on('click', '.add-List li', function(){
    if(!$(this).hasClass('disable')){
      $('.add-List li').removeClass('select');
      $(this).addClass('select');
      $(this).find('input').attr('checked', 'checked');
	  $('.add-WatchList .add-WatchListBtn').show();
      $('.add-WatchList .add-WatchListBtn a.btn').show();
    }
  });

  $('html').on('click', '.apply_selected', function(){
    $('.add-WatchListBtn').hide();
    $('.add-WatchList .add-List').hide();
  });

  $('html').on('click', '.add-WatchListClose', function(){
    $('.transTable').hide();
    $('.add-WatchList').hide();  
	$('.add-List li').removeClass('select');
  });

  $('html').on('click', '.moveSlctClick', function(){
    $('.transTable').css('display', 'flex');
    $('.moveSelected').show();
    $('.moveSelected .createWatchListBox').show();
  });

  $('html').on('click', '.moveSelectedClose', function(){
    $('.transTable').hide();
    $('.moveSelected').hide();  
    $('.moveSelected .createWatchListBtn a.createMove').hide();
  });

  $('.clearCompare').click(function(){
      clearSlctFun();
  });
  clearSlctFun();
  function clearSlctFun(){
    $(".selectpicker").val('default');
    $(".selectpicker").selectpicker("refresh");
  }

  $('.delete-action').click(function(){
    var optValue = $(this)
    deleteSelect(optValue);
  });

  function deleteSelect(optValue){
    var getDataSymbol = optValue.parents('tr').attr('data-symbol');
    var totalOption = $('select.selectpicker option').length;   
    for(var i =0 ; i < totalOption; i++){
     var optionVal = $('select.selectpicker option').eq(i).val(); 
     if(getDataSymbol == optionVal){
       $('select.selectpicker option').eq(i).prop("selected", false);
     }
    }
   
    $values = $('.selectpicker').val();
    $('.selectpicker').selectpicker('deselectAll');
    $('.selectpicker').selectpicker('val', $values );
    $('.selectpicker').selectpicker('refresh');
  }

  $('html').on('click', '.createAndMove', function(){
    var totalTab = $('.watchlistTab ul li').length;
    if(totalTab == 4){
        $('.myWatchlist .createWatchlist').hide();
    }
    var getName = $('.typeWatchList input').val();
    var getNameTrim = getName.trim();
    var getNameInt = parseInt(getNameTrim.length);

    if (getNameInt == 0){
      $('.moveSelected .createWatchListBox .typeWatchList .errorMsg').show();
      return false
    } else{
        $('.watchlistTab ul').append(`<li>
          <strong class="name">${getName}</strong>
          <i><b></b><b></b><b></b></i>
          <span></span>
          <div class="watchlistDropDown">
              <div class="watchlistOption watchlistOptionEdit">
                  <i><img src="./assets/images/icons/edit2.png" alt=""></i>
                  <strong>Edit Watchlist</strong>
              </div>
              <div class="watchlistOption watchlistOptionDelete">
                  <i><img src="./assets/images/icons/delete.png" alt=""></i>
                  <strong>Delete Watchlist</strong>
              </div>
          </div>
          </li>`);
      
        $('.myWatchlistBox .watchlistDtlBox').append(`
          <div class="watchlistDtl">
          <div class="watchlistDtlTop">
              <div class="afterSlct">
                  <ul>
                      <li class="companiesSlct">
                          <span>3</span>
                          <strong>Companies Selected</strong>
                      </li>
                      <li class="removeSlct">
                          <span><img src="./assets/images/icons/delete2.png" alt=""></span>
                          <strong>Remove Selected</strong>
                      </li>
                      <li class="moveSlct">
                          <span><img src="./assets/images/icons/move.png" alt=""></span>
                          <strong>Move Selected</strong>
                      </li>
                  </ul>
              </div>
              <div class="lastUpdate">Last updated 5 mins ago.</div>
              <div class="filter">Filter 
                  <i>
                      <svg xmlns="http://www.w3.org/2000/svg" width="20.373" height="20.824" viewBox="0 0 20.373 20.824">
                          <g id="Group_173" data-name="Group 173" transform="translate(-3206.958 -454.75)">
                            <path id="Path_85" data-name="Path 85" d="M35.226,15.5H17.077a.857.857,0,0,0-.759.449.849.849,0,0,0,.069.9l6.66,9.385h0a1.883,1.883,0,0,1,.38,1.139V35a.832.832,0,0,0,.242.587.808.808,0,0,0,.587.242,1.226,1.226,0,0,0,.345-.069l3.727-1.415a.789.789,0,0,0,.552-.794V27.335a1.96,1.96,0,0,1,.38-1.139h0l6.66-9.351a.929.929,0,0,0,.069-.9A.857.857,0,0,0,35.226,15.5Zm-6.8,10.11a2.892,2.892,0,0,0-.587,1.725v6.073l-3.416,1.311V27.37a2.817,2.817,0,0,0-.587-1.725l-6.418-9.109h17.46Z" transform="translate(3191 439.5)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                            <line id="Line_74" data-name="Line 74" x2="8.937" transform="translate(3209.422 458.174)" stroke="#0045e3" stroke-width="0.5"/>
                            <path id="Path_86" data-name="Path 86" d="M30.554,24.235H21.618a.518.518,0,0,1,0-1.035h8.937a.518.518,0,1,1,0,1.035Z" transform="translate(3187.805 434.457)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                            <circle id="Ellipse_18" data-name="Ellipse 18" cx="0.518" cy="0.518" r="0.518" transform="translate(3219.808 457.657)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                          </g>
                        </svg>
                        
                  </i>
              </div>
              <div class="sort">Sort 
                  <i>
                      <svg xmlns="http://www.w3.org/2000/svg" width="26.057" height="15.219" viewBox="0 0 26.057 15.219">
                          <g id="Group_184" data-name="Group 184" transform="translate(-381.443 -347.526)">
                            <path id="Path_83" data-name="Path 83" d="M24.235,16.029,20.4,12.195l1.164-1.179L24,13.463V1.6h1.641V13.463l2.432-2.447,1.164,1.179L25.4,16.029l-.582.552Z" transform="translate(361.184 346.026)" fill="#0045e3" stroke="#0045e3" stroke-width="0.2"/>
                            <line id="Line_87" data-name="Line 87" x2="8" transform="translate(392.5 349.5)" fill="none" stroke="#0045e3" stroke-width="2"/>
                            <line id="Line_88" data-name="Line 88" x2="12" transform="translate(392.5 355.117)" fill="none" stroke="#0045e3" stroke-width="2"/>
                            <line id="Line_89" data-name="Line 89" x2="15" transform="translate(392.5 360.734)" fill="none" stroke="#0045e3" stroke-width="2"/>
                          </g>
                        </svg>
                        
                  </i>
              </div>
          </div>
          <div class="watchlistDtlTable">
              <div class="tableStyle">
                  <table class="col-md-12 table-bordered table-striped table-condensed cf">
                      <thead class="cf">
                          <tr>
                              <th> <span><input type="checkbox"></span> All</th>
                              <th>Value</th>
                              <th>Volume</th>
                              <th>Last Price (SAR)</th>
                              <th>Daily Change</th>
                              <th>Alert</th>
                              <th>Delete</th>
                          </tr>
                      </thead>
                      <tbody>
                          <tr>
                              <td>
                                  <div class="tableField">
                                      <div class="checkBox"><input type="checkbox"></div> 
                                      <div class="number">3209</div>
                                      <div class="nameDtl">
                                          <strong>SARCO 1</strong>
                                          <span> Saudi Arabia Refineries Co.</span>
                                      </div>
                                  </div>
                              </td>
                              <td>224.23 M</td>
                              <td>24.23 M</td>
                              <td>231.00</td>
                              <td>+7.40 (+3.22%)</td>
                              <td>Set Alert</td>
                              <td><i class="fa fa-trash"></i></td>
                          </tr>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
          `)
        
        $('.createWatchListBox').hide();
        $('.moveSelected .createWatchListBox .typeWatchList').hide();
        $('.moveSelected .createWatchListBox .typeWatchList').find('input').val('');
        $('.moveSelected .createWatchListBox .createNew').removeClass('open');
        $('.createMove').removeClass('createAndMove');
        $('.createMove').removeClass('onlyMove');
        $('.createMove').html('Move Selected');
        
        $('.transTable').hide();
        $('.moveSelected').hide();  
        $('.myWatchlistBox .watchlistDtlTop .afterSlct').hide();
        $('.moveSelected .createWatchListBtn a.createMove').hide();
    }

  });

  $('html').on('click', '.onlyMove', function(){ 
    $('.createWatchListBox').hide();
    $('.moveSelected .createWatchListBox .typeWatchList').hide();
    $('.moveSelected .createWatchListBox .typeWatchList').find('input').val('');
    $('.moveSelected .createWatchListBox .createNew').removeClass('open');
    $('.createMove').removeClass('createAndMove');
    $('.createMove').removeClass('onlyMove');
    $('.createMove').html('Move Selected');
    $('.transTable').hide();
    $('.moveSelected').hide(); 
    $('.myWatchlistBox .watchlistDtlTop .afterSlct').hide();
    $('.moveSelected .createWatchListBtn a.createMove').hide();
  });

  $('html').on('click', '.deleteWatchListMultyClose', function(){
    $('.transTable').hide();
    $('.deleteWatchListMulty').hide();
  });

  $('html').on('click', '.deleteMulty', function(){
    $('.transTable').hide();
    $('.deleteWatchListMulty').hide();
    $('.watchlistDtl.show').find('table tr.select').remove();
    $('.afterSlct').hide();
  });

  $('html').on('click', '.createWatchlist', function(){
    $('.transTable').css('display', 'flex');
    $('.newWatchlist').show();
  });

  $('html').on('click', '.authentication', function(){
    $('.transTable').css('display', 'flex');
    $('.authenticationBox').show();
  });

  $('html').on('click', '.smsVerification', function(){
    $('.transTable').css('display', 'flex');
    $('.smsVerificationBox').show();
    resendFun();
  });

  function resendFun(){
    setTimeout(() => {
      $('.smsVerificationBoxBtn a.disableResend').removeClass('disableResend');
      $('.smsVerificationBoxBtn a').eq(1).addClass('activeResend');
    }, 60000);
  }

  $('html').on('click', '.smsVerificationBoxClose', function(){
    $('.transTable').hide();
    $('.smsVerificationBox').hide();
    $('.smsVerificationBoxBtn a.btn').eq(1).removeClass('activeResend');
    $('.smsVerificationBoxBtn a.btn').eq(1).addClass('disableResend');
  });

  $('html').on('click', '.newWatchlistClose', function(){
    $('.transTable').hide();
    $('.newWatchlist').hide();
  });

  $('html').on('click', '.authenticationBoxClose', function(){
    $('.transTable').hide();
    $('.authenticationBox').hide();
  });

  $('html').on('click', '.cancelNewWatchlist', function(){
    $('.transTable').hide();
    $('.newWatchlist').hide();
  });

  $('html').on('click', '.setAlertPopup', function(){
    $('.setAlertPopup').removeClass('select');
    $(this).addClass('select');
    $('.transTable').css('display', 'flex');
    $('.alertBox').show();
  });

  $('html').on('click', '.authenticationList label' , function(){
    if($(this).hasClass('select')){
      $('.authenticationList label').removeClass('select');
      return false
    } else{
      $('.authenticationList label').removeClass('select');
      $(this).addClass('select');
      return false
    }
  });

  
  $('.createNewWatchlist').click(function(){
    var totalTab = $('.watchlistTab ul li').length;
    var getName = $('.watchlistName input').val();  
    var getNameTrim = getName.trim();
    var getNameInt = parseInt(getNameTrim.length);

    if (getNameInt == 0){
      $('.newWatchlist .watchlistName .errorMsg').show();
      return false
    } else{
      if(totalTab + 1 <= 5){
        $('.watchlistTab ul').append(`<li>
        <strong class="name">${getName}</strong>
        <i><b></b><b></b><b></b></i>
        <span></span>
        <div class="watchlistDropDown">
            <div class="watchlistOption watchlistOptionEdit">
                <i><img src="./assets/images/icons/edit2.png" alt=""></i>
                <strong>Edit Watchlist</strong>
            </div>
            <div class="watchlistOption watchlistOptionDelete">
                <i><img src="./assets/images/icons/delete.png" alt=""></i>
                <strong>Delete Watchlist</strong>
            </div>
        </div>
        </li>`);
    
        $('.myWatchlistBox .watchlistDtlBox').append(`
        <div class="watchlistDtl">
        <div class="watchlistDtlTop">
            <div class="afterSlct">
                <ul>
                    <li class="companiesSlct">
                        <span>3</span>
                        <strong>Companies Selected</strong>
                    </li>
                    <li class="removeSlct">
                        <span><img src="./assets/images/icons/delete2.png" alt=""></span>
                        <strong>Remove Selected</strong>
                    </li>
                    <li class="moveSlct">
                        <span><img src="./assets/images/icons/move.png" alt=""></span>
                        <strong>Move Selected</strong>
                    </li>
                </ul>
            </div>
            <div class="lastUpdate">Last updated 5 mins ago.</div>
            <div class="filter">Filter 
                <i>
                    <svg xmlns="http://www.w3.org/2000/svg" width="20.373" height="20.824" viewBox="0 0 20.373 20.824">
                        <g id="Group_173" data-name="Group 173" transform="translate(-3206.958 -454.75)">
                          <path id="Path_85" data-name="Path 85" d="M35.226,15.5H17.077a.857.857,0,0,0-.759.449.849.849,0,0,0,.069.9l6.66,9.385h0a1.883,1.883,0,0,1,.38,1.139V35a.832.832,0,0,0,.242.587.808.808,0,0,0,.587.242,1.226,1.226,0,0,0,.345-.069l3.727-1.415a.789.789,0,0,0,.552-.794V27.335a1.96,1.96,0,0,1,.38-1.139h0l6.66-9.351a.929.929,0,0,0,.069-.9A.857.857,0,0,0,35.226,15.5Zm-6.8,10.11a2.892,2.892,0,0,0-.587,1.725v6.073l-3.416,1.311V27.37a2.817,2.817,0,0,0-.587-1.725l-6.418-9.109h17.46Z" transform="translate(3191 439.5)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                          <line id="Line_74" data-name="Line 74" x2="8.937" transform="translate(3209.422 458.174)" stroke="#0045e3" stroke-width="0.5"/>
                          <path id="Path_86" data-name="Path 86" d="M30.554,24.235H21.618a.518.518,0,0,1,0-1.035h8.937a.518.518,0,1,1,0,1.035Z" transform="translate(3187.805 434.457)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                          <circle id="Ellipse_18" data-name="Ellipse 18" cx="0.518" cy="0.518" r="0.518" transform="translate(3219.808 457.657)" fill="#0045e3" stroke="#0045e3" stroke-width="0.5"/>
                        </g>
                      </svg>
                      
                </i>
            </div>
            <div class="sort">Sort 
                <i>
                    <svg xmlns="http://www.w3.org/2000/svg" width="26.057" height="15.219" viewBox="0 0 26.057 15.219">
                        <g id="Group_184" data-name="Group 184" transform="translate(-381.443 -347.526)">
                          <path id="Path_83" data-name="Path 83" d="M24.235,16.029,20.4,12.195l1.164-1.179L24,13.463V1.6h1.641V13.463l2.432-2.447,1.164,1.179L25.4,16.029l-.582.552Z" transform="translate(361.184 346.026)" fill="#0045e3" stroke="#0045e3" stroke-width="0.2"/>
                          <line id="Line_87" data-name="Line 87" x2="8" transform="translate(392.5 349.5)" fill="none" stroke="#0045e3" stroke-width="2"/>
                          <line id="Line_88" data-name="Line 88" x2="12" transform="translate(392.5 355.117)" fill="none" stroke="#0045e3" stroke-width="2"/>
                          <line id="Line_89" data-name="Line 89" x2="15" transform="translate(392.5 360.734)" fill="none" stroke="#0045e3" stroke-width="2"/>
                        </g>
                      </svg>
                      
                </i>
            </div>
        </div>
        <div class="watchlistDtlTable">
            <div class="tableStyle">
                <table class="col-md-12 table-bordered table-striped table-condensed cf">
                    <thead class="cf">
                        <tr>
                            <th> <span><input type="checkbox"></span> All</th>
                            <th>Value</th>
                            <th>Volume</th>
                            <th>Last Price (SAR)</th>
                            <th>Daily Change</th>
                            <th>Alert</th>
                            <th>Delete</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <div class="tableField">
                                    <div class="checkBox"><input type="checkbox"></div> 
                                    <div class="number">3209</div>
                                    <div class="nameDtl">
                                        <strong>SARCO 1</strong>
                                        <span> Saudi Arabia Refineries Co.</span>
                                    </div>
                                </div>
                            </td>
                            <td>224.23 M</td>
                            <td>24.23 M</td>
                            <td>231.00</td>
                            <td>+7.40 (+3.22%)</td>
                            <td>Set Alert</td>
                            <td><i class="fa fa-trash"></i></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
        `)
    
      } else{
      }

      $('.transTable').hide();
      $('.newWatchlist').hide();
      $('.watchlistName input').val('');
      $('.newWatchlist .watchlistName .errorMsg').hide();
    }

    if(totalTab == 4){
      $('.myWatchlist .createWatchlist').hide();
    }

  });

  $(document).on("click", function (e) {
    if ($(e.target).closest(".blueBox").length === 0) {
      $(".blueBoxTrans").hide();
      $(".forgotBox").hide();
      $(".loginBox").show();
    }

    if ($(e.target).closest(".blueBox").length === 0) {
      $(".blueBoxTransPopup").hide();
      $(".forgotBox").hide();
      $(".loginBoxPopup").show();
    }

    if ($(e.target).closest(".graphBlueBox").length === 0) {
      $(".graphBlueBox").hide();
      $(".marketStatus").removeClass("open");
      $(".statusBox").removeClass("open");
    }

    if ($(e.target).closest(".srchBox").length === 0) {
      $(".srchBox").hide();
      $(".searchtxt").removeClass("open");
    }

    if ($(e.target).closest(".mblSrchBox").length === 0) {
      $(".mblSrchBox").hide();
      $(".mblSrch").removeClass("open");
    }

    if ($(e.target).closest(".watchlistTab li i").length === 0) {
        $(".watchlistDropDown").slideUp();
    }

    if (windWidth < 1100) {
      if ($(e.target).closest(".topHdr .topNav ul").length === 0) {
        $(".topHdr .topNav ul").hide();
        $(".menuIcon").removeClass("menuClose");
      }
    } else {
      if ($(e.target).closest("ul.subMenu").length === 0) {
        $(".topHdr .topNav ul li").removeClass("open");
      }
    }
  });

  if (windWidth < 1100) {
    $(".topHdr .topNav ul li a").click(function () {
      if ($(this).hasClass("open")) {
        $(".subMenu").slideUp();
        $(".topHdr .topNav ul li a").removeClass("open");
      } else {
        $(".subMenu").slideUp();
        $(".topHdr .topNav ul li a").removeClass("open");
        $(this).next(".subMenu").slideDown();
        $(this).addClass("open");
      }
    });

    $(".mblSrch").click(function (e) {
      if ($(this).hasClass("open")) {
        $(this).removeClass("open");
        $(".mblSrchBox").slideUp();
      } else {
        $(this).addClass("open");
        $(".mblSrchBox").slideDown();
      }
      $(".menuIcon").removeClass("menuClose");
      $(".topHdr .topNav ul").hide();
      e.stopPropagation();
    });

    $(".mktStatus strong").click(function (e) {
      $(".graphBlueBox").show();
      e.stopPropagation();
    });
  } else {
    $(".topHdr .topNav ul li").click(function (e) {
      if ($(this).hasClass("open")) {
        $(".topHdr .topNav ul li").removeClass("open");
      } else {
        $(".topHdr .topNav ul li").removeClass("open");
        $(this).addClass("open");
      }
      e.stopPropagation();
    });
  }

  $(".fa-star-o").on('click',function () {
    if ($(this).hasClass("fa-star-o")) {
      $(this).removeClass("fa-star-o");
      $(this).addClass("fa-star");
      $(this).parent().find(".starInfoBox").fadeIn();
      setTimeout(() => {
        $(this).parent().find(".starInfoBox").fadeOut();
      }, 1000);
    } else {
      $(this).addClass("fa-star-o");
      $(this).removeClass("fa-star");
    }
  });

  $(".advance-search a.btn").click(function () {
    if ($(this).hasClass("open")) {
      $(this).removeClass("open");
      $(".issuer-directory-search .search-filter").slideUp();
    } else {
      $(this).addClass("open");
      $(".issuer-directory-search .search-filter").slideDown();
    }
  });

  $('.issuer-directory-search .advance-search h4').click(function(){
    if ($(this).hasClass("open")) {
      $(this).removeClass("open");
      $(".issuer-directory-search .search-filter-main").slideUp();
    } else {
      $(this).addClass("open");
      $(".issuer-directory-search .search-filter-main").slideDown();
    }
  });


  $(".filterCheck ul li").click(function () {
    if ($(this).hasClass("check")) {
      $(this).removeClass("check");
    } else {
      $(this).addClass("check");
    }
  });

  $(".filter-checkBox").click(function () {
    if ($(this).hasClass("check")) {
      $(".filter-checkBox").removeClass("check");
      $(".filter-checkBox").find("input").prop("checked", false);
    } else {
      $(".filter-checkBox").removeClass("check");
      $(".filter-checkBox").find("input").prop("checked", false);
      $(this).addClass("check");
      $(this).find("input").prop("checked", true);
    }
  });

  $(".advanced-filters .input-daterange").datepicker({});

  $(".jumpTopBtm li").click(function () {
    var getRel = $(this).attr("rel");
    var scrolpos = $(getRel).offset().top;
    $("html, body")
      .stop()
      .animate({ scrollTop: scrolpos - 150 }, 500, "swing", function () {});
  });

  $(".calendar_tab li").click(function () {
    if ($(this).hasClass("select")) {
      $(".calendar_tab li").removeClass("select");
      $(this).addClass("select");
    } else {
      $(".calendar_tab li").removeClass("select");
      $(".calendar_tab_Dtl").hide();
      $(this).addClass("select");
      var getindex = $(this).index();
      $(".calendar_tab_Dtl").eq(getindex).show();
    }
  });

  $(".advanced-results .advanced-filters h2").click(function () {
    if (windWidth > 1100) {
    } else {
      if ($(this).hasClass("open")) {
        $(this).removeClass("open");
        $(".advanced-results .filter-main").slideUp();
      } else {
        $(this).addClass("open");
        $(".advanced-results .filter-main").slideDown();
      }
    }
  });

  $(".saudiAramcoSearch input").keypress(function () {
    $(".saudiAramcoSearch button").show();
  });

  $(".saudiAramcoSearch button").on("click", function () {
    $(this).hide();
    $(".saudiAramcoSearch input").val("");
  });

  $(".result-btn .addWatchList").click(function () {
    if ($(this).hasClass("select")) {
      $(this).removeClass("select");
    } else {
      $(this).addClass("select");
    }
  });

  $(".advanceSearchLft span").on("click", function () {
    if ($(this).parents(".advanceSearchCol").hasClass("show")) {
      $(this).parents(".advanceSearchCol").removeClass("show");
      $(this).find("input").prop("checked", false);
    } else {
      $(this).parents(".advanceSearchCol").addClass("show");
      $(this).find("input").prop("checked", true);
    }
  });

  $('.stock-filters .advanceSearch h4').click(function(){
      if($(this).hasClass('open')){
          $(this).removeClass('open');
          $('.stock-filters .advanceSearch .advanceSearchAcord').slideUp();
      } else{
        $(this).addClass('open');
        $('.stock-filters .advanceSearch .advanceSearchAcord').slideDown();
      }
  });

  $('.equitiesFaq .ques').click(function(){
    if($(this).hasClass('select')){
        console.log('1');
        $(this).removeClass('select');
        $(this).parents('.equitiesFaq').find('.answer').slideUp();
    } else{
        console.log('2');
        $(this).parents('.equitiesFaq').find('.ques').removeClass('select');
        $(this).parents('.equitiesFaq').find('.answer').slideUp();
        $(this).addClass('select');
        $(this).next('.answer').slideDown(); 
    }           
});

$('.faqAccordian .ques').click(function(){
  if($(this).hasClass('select')){
      console.log('11');
      $(this).removeClass('select');
      $(this).parents('.faqAccordian').find('.answer').slideUp();
      return false;
  } else{
      console.log('22');
      $(this).parents('.faqAccordian').find('.ques').removeClass('select');
      $(this).parents('.faqAccordian').find('.answer').slideUp();
      $(this).addClass('select');
      $(this).next('.answer').slideDown(); 
      return false;
  }           
});

$('.equitiesFaq .expend').click(function(){
  console.log('enter');
    if(!$(this).hasClass('clps')){
      $(this).addClass('clps');
      $(this).find('span').html('Collapse All');
      $(this).parents('.equitiesFaq').find('.answer').each(function() {
        $(this).slideDown();
      });
      $(this).parents('.equitiesFaq').find('.ques').each(function() {
        $(this).addClass('select');
      });
    } else{
      $(this).removeClass('clps');
      $(this).find('span').html('Expand All');
      $(this).parents('.equitiesFaq').find('.answer').each(function() {
        $(this).slideUp();
      });
      $(this).parents('.equitiesFaq').find('.ques').each(function() {
        $(this).removeClass('select');
      });
    }
});

$('.faqPage .faqPageLft .faqJump ul li').click(function(){
  $('.faqPage .faqPageLft .faqJump ul li').removeClass('select');
  $(this).addClass('select');  
     var liIndex = $(this).index('.faqPage .faqPageLft .faqJump ul li');

    if(windWidth > 1100){
      $("html, body").animate({ scrollTop: $('.equitiesFaq').eq(liIndex).find('h3').offset().top }, 1000);
    } else{
      $("html, body").animate({ scrollTop: $('.equitiesFaq').eq(liIndex).find('h3').offset().top - 200 }, 1000);
    }
});

$('.marketReports .marketReportsLft .marketJump ul li').click(function(){
  $('.marketReports .marketReportsLft .marketJump ul li').removeClass('select');
  $(this).addClass('select');  
    var liIndex = $(this).index();
    if(windWidth > 1100){
      $("html, body").animate({ scrollTop: $('.marketReportsRgtCont').eq(liIndex).find('h3').offset().top }, 1000);
    } else{
      $("html, body").animate({ scrollTop: $('.marketReportsRgtCont').eq(liIndex).find('h3').offset().top - 250 }, 1000);
    }
});

$('.ruleJump ul li').click(function(){
    $('.ruleJump ul li').removeClass('select'); 
    $(this).addClass('select');  
    var liIndex = $(this).index();
    $("html, body").animate({ scrollTop: $('.rulePage .rulePageRgt .rulePageRgtCont').eq(liIndex).offset().top }, 1000);
});

$('.contactForm .fieldRowBtn .captcha span').click(function(){
    if($(this).hasClass('tick')){
      $(this).removeClass('tick');
      $(this).find("input").prop("checked", false);
    } else{
      $(this).addClass('tick');
      $(this).find("input").prop("checked", true);
    } 
});

$('.registrationForm .fieldRowBtn .captcha span').click(function(){
  if($(this).hasClass('tick')){
    $(this).removeClass('tick');
    $(this).find("input").prop("checked", false);
  } else{
    $(this).addClass('tick');
    $(this).find("input").prop("checked", true);
  } 
});


$('.watchlistName input').keyup(function() {
  var maxLength = 20;
  var textlen = maxLength - $(this).val().length;
  $('.nchars').text(textlen);
});
$('.editwatchlistName input').keyup(function() {
  var maxLength = 20;
  var textlen = maxLength - $(this).val().length;
  $('.echars').text(textlen);
});
$('.typeWatchList input').keyup(function() {
  var maxLength = 20;
  var textlen = maxLength - $(this).val().length;
  $('.cchars').text(textlen);
});

$('.watchlistDtlTop .sort').click(function(){
  if($(this).hasClass('sortUp')){
    $(this).removeClass('sortUp')
  } else{
    $(this).addClass('sortUp')
  }
});

$('.filter').click(function(){
  $('.filterPopup').show();
});

$('.filterPopupClose').click(function(){
  $('.filterPopup').hide();
});

$('.registrationForm .fa-eye').click(function(){
  if($(this).hasClass('fa-eye-slash')){
    $(this).removeClass('fa-eye-slash');
    $(this).parents('.fieldInput').find('input').attr("type", "text");
  } else{
    $(this).addClass('fa-eye-slash');
    $(this).parents('.fieldInput').find('input').attr("type", "password");
  }
});

$('#datepicker i').click(function(){
    $(this).parents('.input-daterange').find('input.form-control').eq(0).focus();
});

$('.digit-group').find('input').each(function(e) {
      $(this).attr('maxlength', 1);
      $(this).on('keyup', function(e) {
        var parent = $($(this).parent());
          if(e.keyCode === 8 || e.keyCode === 37) {
            var prev = parent.find('input#' + $(this).data('previous'));
            if(prev.length) {
              $(prev).select();
            }
          } else if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 65 && e.keyCode <= 90) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode === 39) {
              
              if($(this).val()){
                var next = parent.find('input#' + $(this).data('next'));
                if(next.length) {
                  $(next).select();
                } else {
                  if(parent.data('autosubmit')) {
                    parent.submit();
                  }
                }
              } else{
              } 
        }
      });
    
});

$('.historicalTab_Tab ul li').click(function () {
		$('.historicalTab_Dtl .historicalTab').hide();
		$('.historicalTab_Tab ul li').removeClass('select');
		$(this).addClass('select');
		var getIndex = $(this).index();
		$('.historicalTab_Dtl .historicalTab').eq(getIndex).show();
  });

  $('.time_period_box .input-daterange').datepicker({
  });

  $('.resetBtn').click(function(){
	console.log('IPL');
	  $('.input-daterange .form-control').datepicker('setDate', null);
  });

  $('.issuers_tab li').click(function(){
    $('.issuers_tab li').removeClass('select');
    $(this).addClass('select');
    var getIndex = $(this).index();
    $('.issuers_tab_main .issuers_tab_Dtl').hide();
    $('.issuers_tab_main .issuers_tab_Dtl').eq(getIndex).show();
  });

  $('.compareBtn').click(function () {
		$('.comparePopup').css('display', 'flex');
  });
  
  $('.comparePopupClose').click(function () {
		$('.comparePopup').hide();
  });

  console.log('Page enter');
  $('.todayActive_Tab ul li').click(function () {
    console.log('enter');
		$('.todayActive_Tab_Dtl').hide();
		$('.todayActive_Tab ul li').removeClass('select');
		$(this).addClass('select');
		var getIndex = $(this).index();
		$('.todayActive_Tab_Dtl').eq(getIndex).show();
		
	setTimeout(() => {
      lazyCount = 0;
      getData();
    }, 1000);
		
  });

var lazyInterval
var lazyTimeCount = 0;  
var lazyCount = 0;
var dataShowLazy = true;

 $('.historicalTable .tableStyle').on('scroll', function() {
  $('.historicalTable .tableStyle').removeClass('activeLazyTable'); 
  $(this).addClass('activeLazyTable');
  if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
      if(dataShowLazy ==  true){
          dataShowLazy = false;
          getScrollData();
		  lazyInterval = setInterval(lazyTimer, 1000); 
      }
  }
});

function lazyTimer() {
  lazyTimeCount = lazyTimeCount + 1;
  console.log(lazyTimeCount)
  if( lazyTimeCount > 10){
    var totalTr = $('.activeLazyTable').find('tr').length;
    var totalShowTr = $('.activeLazyTable').find('tr.showTr').length;
	console.log(totalTr)
	console.log(totalShowTr)
    if(totalTr > totalShowTr){
		console.log("enter");
		getScrollData();
    }
  }
}

function lazyTimeStop() {
  lazyTimeCount = 0;
  clearInterval(lazyInterval);
}

function getData(){
  var lazyTableBoxSize = $('.historicalTable .tableStyle').length;  
  var showTrSize = $('.historicalTable .tableStyle.activeLazyTable').find('tr.showTr').length;
  lazyCount = showTrSize + 13;
  for( var j = 0 ; j < lazyTableBoxSize; j++){
    for( var i = 0 ; i < lazyCount; i++){
      $('.historicalTable .tableStyle').eq(j).find('tr').eq(i).addClass('showTr');
    }
  }
}

function getScrollData(){
  var showTrSize = $('.historicalTable .tableStyle.activeLazyTable').find('tr.showTr').length;
  lazyCount = showTrSize + 13;
  for( var i = 0 ; i < lazyCount; i++){
    $('.historicalTable .tableStyle.activeLazyTable').find('tr').eq(i).addClass('showTr');
  }
  lazyTimeStop(); 
  dataShowLazy = true;
}
  
  $('.faqBoxBg ul li h2').click(function () {
		if ($(this).parent('li').hasClass('open')) {
      console.log('h2 enter 1');
			$('.faqBoxBg ul li').removeClass('open');
      $('.fawDtl').slideUp();
		} else {
			$('.faqBoxBg ul li').removeClass('open');
			$('.fawDtl').slideUp();
			$(this).parent('li').addClass('open');
			$(this).parent('li').find('.fawDtl').slideDown();
		}
	});

	$('.showWatchlistedBox').click(function () {
		if ($(this).hasClass('tick')) {
			$('.showWatchlistedBox').removeClass('tick');
		} else {
			$('.showWatchlistedBox').addClass('tick');
		}
	});
  
  $('#calendar').datepicker({  
    format: 'mm/dd/yyyy',
  }).on('changeDate', function(e) {  
      console.log(e.format());  
  }); 
  
   $('html').on('focus', 'input[name="start"]' , function(){
    $(this).datepicker();
  });
  $('html').on('focus', 'input[name="end"]' , function(){
    $(this).datepicker();
  });

  $('input[name="start"]').datepicker({
    format: "yy-mm-dd",
  }).on('changeDate', function(e) {  
    console.log(e.format());  
  });
 
  $('input[name="end"]').datepicker({
    format: "yy-mm-dd",
  }).on('changeDate', function(e) {  
    console.log(e.format());  
  });
  
 /* $(".input-daterange input[name*='start']").change(function(){
	  alert('enter');
	  $('.datepicker').hide();
	  $(this).focusout();
	  $(this).parents('.input-group').find('input.form-control').eq(1).datepicker('setDate', null);
	  $(this).parents('.input-group').find('input.form-control').eq(1).focus();
	});
	$(".input-daterange input[name*='end']").change(function(){
	  $('.datepicker').hide();
	}); */
	
   $('html').on('change', ".input-daterange input[name*='start']", function(){
	  $('.datepicker').hide();
	  $(this).focusout();
	  $(this).parents('.input-group').find('input.form-control').eq(1).datepicker('setDate', null);
	  $(this).parents('.input-group').find('input.form-control').eq(1).focus();
   })	
   $('html').on('change', ".input-daterange input[name*='end']", function(){
	   $('.datepicker').hide();
   })

  $('.feedbackType select').on('change', function(){
      var getVal = $(this).val();
      if( getVal == "technical_issue"){
          $('.meetingForm .issueType').show();
       } else{
        $('.meetingForm .issueType').hide();
       }
  });
  
  $('.teamTab li').click(function(){
    var getIndex = $(this).index();
    $('.teamBox .teamDtl').hide();
    $('.teamTab li').removeClass('select');
    $(this).addClass('select');
    $('.teamBox .teamDtl').eq(getIndex).show();
  });

  $('.faqTab ul li').click(function(){
    $('.faqTab ul li').removeClass('select');
    $(this).addClass('select');
    $('.faqDtl_tab').hide();
    var getIndex = $(this).index();
    $('.faqDtl_tab').eq(getIndex).show();
  });

  $('.restrictionTab ul li').click(function(){
    $('.restrictionTab ul li').removeClass('select');
    $(this).addClass('select');
    $('.restriction_tab').hide();
    var getIndex = $(this).index();
    $('.restriction_tab').eq(getIndex).show();
  });

  $('.fundsTab ul li').click(function(){
    $('.fundsTab ul li').removeClass('select');
    $(this).addClass('select');
    $('.fundsDtl_tab').hide();
    var getIndex = $(this).index();
    $('.fundsDtl_tab').eq(getIndex).show();
  });

  $('.showCompaniesList').click(function(){
    if($(this).hasClass('open')){
      $(this).removeClass('open');
      $(this).text('View Companies');
      $(this).next('.show-Companies').hide();
      $(this).parents('.companyHdngOnHide').next('.companyOnHide').show();

    } else{
      $(this).addClass('open');
      $(this).text('Hide Companies');
      $(this).next('.show-Companies').show();
      $(this).parents('.companyHdngOnHide').next('.companyOnHide').hide();
    }
  });
  
  $('.backToLogin').click(function(){
    $('.loginBox').show();
    $('.forgotBox').hide();
    return false
  });
  
  $('.advanceSearchRgt .price-filter-low-med-large ul li').click(function(){
	$('.advanceSearchRgt .price-filter-low-med-large ul li').removeClass('select');
	$(this).addClass('select');
  });
  
  /*$(".selectBox").selectpicker({
		noneSelectedText: "Select an option",
		allSelectedText: "Selected all",
		nSelectedText  : "Selected",
	});*/
	$('.selectpicker').selectpicker({
		noneSelectedText: 'View All'
	 });
  
	
	setTimeout(() => {
	   var getNameSlct = $('.filter-option .filter-option-inner .filter-option-inner-inner').html();
	   console.log(getNameSlct)
	   if(getNameSlct == 'Nothing selected'){
		$('.filter-option .filter-option-inner .filter-option-inner-inner').html('View All');
	   }
	   if(getNameSlct == 'Select'){
		$('.filter-option .filter-option-inner .filter-option-inner-inner').html('View All');
	   }
	}, 1000);

	
	
	
	
	
	
//var QueryString = (new URL(location.href)).searchParams.get('learn');
var crURL = window.location.href;
var QueryString = crURL.substring(crURL.indexOf('#')+1);
if(QueryString){
  if(QueryString == "learn01"){
    $("html, body").animate({ scrollTop: $('#learn01').offset().top }, 1000);
  }
  if(QueryString == "learn02"){
    $("html, body").animate({ scrollTop: $('#learn02').offset().top }, 1000);
  }
  if(QueryString == "learn03"){
    $("html, body").animate({ scrollTop: $('#learn03').offset().top }, 1000);
  }
  if(QueryString == "learn04"){
    $("html, body").animate({ scrollTop: $('#learn04').offset().top }, 1000);
  }
  if(QueryString == "learn05"){
    $("html, body").animate({ scrollTop: $('#learn05').offset().top }, 1000);
  }
}
console.log(QueryString);
	
	//console.clear();
	setTimeout(() => {
		//console.clear();
	}, 1000)
	setTimeout(() => {
		//console.clear();
	}, 2000)
	setTimeout(() => {
		//console.clear();
	}, 3000)
	setTimeout(() => {
		//console.clear();
	}, 4000)
	setTimeout(() => {
		//console.clear();
	}, 5000)	
	setTimeout(() => {
		//console.clear();
	}, 8000)
	setTimeout(() => {
		console.log('A2');
		//console.clear();
	}, 15000)	
	$("#datepicker input").attr('readonly','readonly');
});

var lastScrollTop = 0;
$(window).scroll(function (event) {
  var scroll = $(this).scrollTop();
  if (scroll > lastScrollTop) {
    if (scroll > 200) {
      $(".innerPage header").addClass("bgColor");
      $(".innerPage .newsTicker").removeClass("btmAlign");
      $(".innerPage .newsTicker").addClass("newsTickerHide");
      $(".innerPage .blueStrip").addClass("blueStripHide");
      $(".innerPage header").addClass("topSpace");
      $(".innerPage .mblMrktStatus").addClass("mblMrktStatusHide");
    }
  } else {
	
    $(".innerPage .mblMrktStatus").addClass("bgColor");
    $(".innerPage header").addClass("bgColor");
    $(".innerPage .newsTicker").addClass("btmAlign");
    $(".innerPage .newsTicker").removeClass("newsTickerHide");
    $(".innerPage .blueStrip").removeClass("blueStripHide");
    $(".innerPage header").removeClass("topSpace");
    $(".innerPage .mblMrktStatus").removeClass("mblMrktStatusHide");

    if (scroll < 200) {
   
      $(".innerPage header").removeClass("bgColor");
      $(".innerPage .mblMrktStatus").removeClass("bgColor");
    }
    if (scroll > 200) {
    	 $(".innerPage header").addClass("topSpace");
         $(".innerPage .mblMrktStatus").addClass("mblMrktStatusHide");
         $(".innerPage .newsTicker").removeClass("btmAlign");
         $(".innerPage .newsTicker").addClass("newsTickerHide");
         $(".innerPage .blueStrip").addClass("blueStripHide");
    }
  }
  lastScrollTop = scroll;
});

function getFormattedGraphJson(data){
	 var chartSeriesData = [];
		if(data.length > 0){
			for(var i=0;i<data.length;i++){
				try{
					chartSeriesData.push([moment(data[i].dateTime).valueOf(),data[i].indexPrice]);
					
				}catch(error){
					console.log('error ocuured='+error);
				}
			}
		}
	 return chartSeriesData;
}
}catch(e){console.log("Module 'tadawul_js_loadatbottom': ",e);}
try{(function(_1,_2){
var _3="selected",_4=_1.document,_5=i$.addClass,_6=i$.removeClass,_7=wpModules.theme.WindowUtils,_8=_2,_9=function(_a,_b,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 _c=_d(),_e=[];
for(var i=0,l=_c.length;i<l;i++){
_e.push("nm:oid:"+_c[i]);
}
var _f={resURI:"nm:oid:"+_10(_11()),contribURI:_e},_12={"node":_a.parentNode,"menuId":_b,"jsonQuery":_f,"params":{"templateId":"simpleMenuTemplate","alignment":"right","autoScroll":false},"onClose":function(){
_13(_a);
}};
_14(_a);
wptheme.contextMenu.init(_12);
return true;
}else{
return false;
}
},_14=function(_15){
_5(_15.parentNode,_3);
},_13=function(_16){
_6(_16.parentNode,_3);
},_17=function(_18,_19,_1a){
_18.setAttribute(_19,_1a);
},_11=function(){
var r=_7.getWindow(_7.VIEW_AREA);
return r;
},_10=function(win){
var r=win.ibmCfg.portalConfig.currentPageOID;
return r;
},_d=function(){
var r=_7.getPageIDs();
return r;
};
_8.open=_9;
})(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);}