PageSourceSearch

https://www.portalcms.nl/js_md/script.base.js?check=46289.6699306

js portalcms.nl collected 2026-09-24 14:05:33 UTC 96,747 bytes, 2,009 lines download raw bytes

1/* check local storage is enabled in browser - if yes below block will work*/
2var l = window.localStorage || 0;
3l = window.localStorage ? localStorage : 0;
4if(window.localStorage ){
5	var statusWindow = $('html');
6
7	(function (win)
8	{
9		//Private variables
10		var _LOCALSTORAGE_KEY = 'WINDOW_VALIDATION';
11		var RECHECK_WINDOW_DELAY_MS = 100;
12		var _initialized = false;
13		var _isMainWindow = false;
14		var _unloaded = false;
15		var _windowArray;
16		var _windowId;
17		var _isNewWindowPromotedToMain = false;
18		var _onWindowUpdated;
19
20
21		function WindowStateManager(isNewWindowPromotedToMain, onWindowUpdated)
22		{
23			//this.resetWindows();
24			_onWindowUpdated = onWindowUpdated;
25			_isNewWindowPromotedToMain = isNewWindowPromotedToMain;
26			_windowId = Date.now().toString();
27
28			bindUnload();
29
30			determineWindowState.call(this);
31
32			_initialized = true;
33
34			_onWindowUpdated.call(this);
35		}
36
37		//Determine the state of the window 
38		//If its a main or child window
39		function determineWindowState()
40		{
41			var self = this;
42			var _previousState = _isMainWindow;
43
44			_windowArray = localStorage.getItem(_LOCALSTORAGE_KEY);
45
46			if (_windowArray === null || _windowArray === "NaN")
47			{
48				_windowArray = [];
49			}
50			else
51			{
52				_windowArray = JSON.parse(_windowArray);
53			}
54
55			if (_initialized)
56			{
57				//Determine if this window should be promoted
58				if (_windowArray.length <= 1 ||
59				   (_isNewWindowPromotedToMain ? _windowArray[_windowArray.length - 1] : _windowArray[0]) === _windowId)
60				{
61					_isMainWindow = true;
62				}
63				else
64				{
65					_isMainWindow = false;
66				}
67			}
68			else
69			{
70				if (_windowArray.length === 0)
71				{
72					_isMainWindow = true;
73					_windowArray[0] = _windowId;
74					localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(_windowArray));
75				}
76				else
77				{
78					_isMainWindow = false;
79					_windowArray.push(_windowId);
80					localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(_windowArray));
81				}
82			}
83
84			//If the window state has been updated invoke callback
85			if (_previousState !== _isMainWindow)
86			{
87				_onWindowUpdated.call(this);
88			}
89
90			//Perform a recheck of the window on a delay
91			setTimeout(function()
92					   {
93						 determineWindowState.call(self);
94					   }, RECHECK_WINDOW_DELAY_MS);
95		}
96
97		//Remove the window from the global count
98		function removeWindow()
99		{
100			var __windowArray = JSON.parse(localStorage.getItem(_LOCALSTORAGE_KEY));
101			for (var i = 0, length = __windowArray.length; i < length; i++)
102			{
103				if (__windowArray[i] === _windowId)
104				{
105					__windowArray.splice(i, 1);
106					break;
107				}
108			}
109			//Update the local storage with the new array
110			localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(__windowArray));
111		}
112
113		//Bind unloading events  
114		function bindUnload()
115		{
116			win.addEventListener('beforeunload', function ()
117			{
118				if (!_unloaded)
119				{
120					removeWindow();
121				}
122			});
123			win.addEventListener('unload', function ()
124			{
125				if (!_unloaded)
126				{
127					removeWindow();
128				}
129			});
130		}
131
132		WindowStateManager.prototype.isMainWindow = function ()
133		{
134			return _isMainWindow;
135		};
136
137		WindowStateManager.prototype.resetWindows = function ()
138		{
139			localStorage.removeItem(_LOCALSTORAGE_KEY);
140		};
141
142		win.WindowStateManager = WindowStateManager;
143	})(window);
144
145	var WindowStateManager = new WindowStateManager(false, windowUpdated);
146
147	function windowUpdated()
148	{
149		//"this" is a reference to the WindowStateManager
150		//statusWindow.attr('windowstatus',this.isMainWindow() ? 'main' : 'child');
151	}
152} else {
153	console.log("This browser does not support localStorage");
154}
155/* check local storage is enabled in browser -Block end*/
156
157function deleteCookie(a, b) {
158    var c = getCookie("V_" + a),
159        d = c.replace(b, "");
160    document.cookie = "V_" + a + "=" + d
161}
162
163function deleteFullNameCookie(a, b, c) {
164    var d = getAllCookie("V_SELECTEDCOOKIES"),
165        e = getAllCookie("V_FILTEROPERATION_OR"),
166        f = getAllCookie("V_FILTEROPERATION_AND"),
167        g = d.replace(b, "").replace(/^~|~$/g, "").replace(/[~]+/g, "~");
168    if (document.cookie = "V_SELECTEDCOOKIES=" + g, 0 == c) {
169        var h = f.replace(b, "").replace(/^~|~$/g, "");
170        document.cookie = "V_FILTEROPERATION_AND=" + h
171    } else {
172        var i = e.replace(b, "").replace(/^~|~$/g, "");
173        document.cookie = "V_FILTEROPERATION_OR=" + i
174    }
175}
176
177function setFullNameCookie(a, b, c) {
178    var d = getAllCookie("V_SELECTEDCOOKIES"),
179        e = getAllCookie("V_FILTEROPERATION_OR"),
180        f = getAllCookie("V_FILTEROPERATION_AND"),
181        g = $.trim(d).length ? d + "~" + b : b;
182    document.cookie = "V_SELECTEDCOOKIES=" + g, 0 == c ? (resAnd = $.trim(f).length ? f + "~" + b : b, document.cookie = "V_FILTEROPERATION_AND=" + resAnd) : (resOR = $.trim(e).length ? e + "~" + b : b, document.cookie = "V_FILTEROPERATION_OR=" + resOR)
183}
184
185function setCookie(a, b) {
186    var c = getCookie("V_" + a),
187        d = c + "" + b;
188    document.cookie = "V_" + a + "=" + d
189}
190
191function getCookie(a) {
192    for (var b = a + "=", c = document.cookie.split(";"), d = 0; d < c.length; d++) {
193        for (var e = c[d];
194            " " == e.charAt(0);) e = e.substring(1);
195        if (0 == e.indexOf(b)) return e.substring(b.length, e.length).replace(/[^a-z0-9\s]/gi, "").replace(/[_\s]/g, "-").toLowerCase()
196    }
197    return ""
198}
199
200function getAllCookie(a) {
201    for (var b = a + "=", c = document.cookie.split(";"), d = 0; d < c.length; d++) {
202        for (var e = c[d];
203            " " == e.charAt(0);) e = e.substring(1);
204        if (0 == e.indexOf(b)) return e.substring(b.length, e.length).toLowerCase()
205    }
206    return ""
207}
208
209function getVacancies(a) {
210    var b = [],
211        c = ($(".VacancyListWrapper"), a.reset || !1);
212    $.ajax({
213        type: "POST",
214        url: "/vacatures.list.ajax",
215        data: a,
216        dataType: "JSON",
217        cache: !1,
218        beforeSend: function() {},
219        success: function(a) {
220            r = a, b = r.responsebody, updateContainer(b, c)
221        },
222        error: function() {
223            console.log("error")
224        }
225    })
226}
227
228function updateContainer(a, b) {
229    var c = $(".vacancy--list"),
230        d = $("#vacancyLoadMore"),
231        b = b || !1;
232    if (b)
233        if ($("#vacancyListContainer #vacancyListWrapper .articleItem,#vacancyListContainer #vacancyListWrapper .moreVacanciesWrapper,.noVacancies").remove(), a.length)
234            for (i = 1; i <= a.recordcount; i++) {
235                var e = a["summaryimage_" + i],
236                    f = a["title_" + i],
237                    g = a["summary_" + i],
238                    h = a["datepublished_" + i],
239                    j = a["author_" + i],
240                    k = a["commentcount_" + i],
241                    l = a["viewcount_" + i];
242                $('<div class="row-fluid vacanciesItem articleItem  vacancy vacancy--list"><div class="span12 vacancy__content"><div class="row-fluid"><div class="span2"><div class="vacanciesItemImage articleItemImage"><a href="##"><img src="' + e + '" alt="" class="img-polaroid" width="90" />\t</a></div></div><div class="span10"><div class="row-fluid"><div class="span12"><div class="vacanciesItemTitle"><h5><a href="##">' + f + '</a></h5></div></div></div><div class="row-fluid"><div class="span12"><div class="articleSummary">' + g + '</div></div></div><div class="row-fluid"><div class="span9"><div class="vacanciesItemInfo"><div class="articleItemDate">' + h + ',</div><div class="articleItemAuthor"><a href="##">' + j + '</a> | </div><div class="articleItemCommentCount">Comments: ' + k + ' - </div><div class="articleItemViewCount">Views: ' + l + '</div></div></div><div class="span3"><div class="articleItemReadMore"><a href="##">Read more &raquo;</a></div></div></div></div></div></div></div>').insertBefore(d.parent())
243            } else d.before('<div class="noVacancies"><em>Er zijn geen vacatures die voldoen aan de geselecteerde criteria</em></div>');
244        else {
245            var m = "";
246            for (i = 1; i <= a.recordcount; i++) {
247                var e = a["summaryimage_" + i],
248                    f = a["title_" + i],
249                    g = a["summary_" + i],
250                    h = a["datepublished_" + i],
251                    j = a["author_" + i],
252                    k = a["commentcount_" + i],
253                    l = a["viewcount_" + i],
254                    n = a["name_" + i],
255                    o = a["id_" + i],
256                    p = (a["userid_" + i], "/vacatures/" + n + "/" + o);
257                m += '<div class="row-fluid vacanciesItem articleItem  vacancy vacancy--list"><div class="span12 vacancy__content"><div class="row-fluid"><div class="span2"><div class="vacanciesItemImage articleItemImage"><a href="' + p + '"><img src="' + e + '" alt="" class="img-polaroid" width="90" />\t</a></div></div><div class="span10"><div class="row-fluid"><div class="span12"><div class="vacanciesItemTitle"><h5><a href="' + p + '">' + f + '</a></h5></div></div></div><div class="row-fluid"><div class="span12"><div class="articleSummary">' + g + "</div></div></div></div></div></div></div>"
258            }
259            getLoadData = $("#loadJobs"), getLoadData.children().length ? (_content = $("#loadJobs").html(), $("#loadJobs").html(_content + m)) : $("#loadJobs").html(m), c.hide(), $(".vacancy--list").slideDown(1e3), $(".vacancy--list").animate({
260                scrollTop: $(window).scrollTop()
261            }, 1e3)
262        }
263    $("#vacancyLoadMore").attr("data-limit") < $("#vacancyLoadMore").attr("data-totalcount") ? d.show() : d.hide()
264}
265
266function wikiSubpageMouseOver(a) {
267	 pageid = $(a).attr("data-pageId");
268	 wikiId = $(a).attr("data-wikiid");
269	 teamid = $(a).attr("data-teamid");
270	attr = $(a).attr("data-taskwiki");
271	_task = false;
272	var _date = new Date();
273	_month = parseInt(_date.getMonth())+1;
274	_day = _date.getDate();
275	_year = _date.getFullYear();
276	if(typeof attr !== typeof undefined && attr !== false){
277		_task = true;
278		_url = "/portal.wikidetails.ajax.get/pageid/" + pageid + "/wikiid/" + wikiId + "/teamId/" + teamid+'/task/true';
279	}else {
280		_url = "/portal.wikidetails.ajax.get/pageid/" + pageid + "/wikiid/" + wikiId + "/teamId/" + teamid;
281		}
282     $(a).hasClass("wikiPageHide") ? ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), $("#sbpagewikilinkid" + pageid).toggleClass("activeWiki"), $(".wksbpg" + pageid).remove()) : ($(".wksbpg" + pageid).remove(), $.ajax({
283        url: _url,
284        async: !1,
285        success: function(b) {
286            if ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), wikiSubpagelist = b.responsebody.result, b.responsebody.result.length > 0) {
287                $("#sbpg" + pageid).append('<ul class="wksbpg' + pageid + '"></ul>');
288                var c = $(".wksbpg" + pageid);
289                $.each(wikiSubpagelist, function() {
290					if(_task){
291						$wikipageItem = this, c.append('<li class="pg' + $wikipageItem.pageid + ' clear wiki-wiDes wk-sub-page-li"><a href="/' + $wikipageItem.teamid + "/wiki/" + wikiId + "/" + $wikipageItem.pageid + "/" + $wikipageItem.pagetitle + '"  class="wikiPageLink pgs' + pageid + '" id="sbpgid' + $wikipageItem.pageid + '" >' + $wikipageItem.title + "<span class='shortname-task'>(#"+ $wikipageItem.taskshortname +")</span>" +"</a><a class='task-wiki-sub-timelog waves-effect waves-light dialog iframe timelog-add-btn'  data-position='bottom' data-delay='50' data-tooltip='"+_day+"/"+_month+"/"+_year+"'  href='/portal.timelog.add/day/"+_day+"/month/"+ _month +"/year/"+_year+"/view/widget/pageid/"+$wikipageItem.pageid +"'><i class='material-icons'>query_builder</i></a></li>")
292					}else{
293						$wikipageItem = this, c.append('<li class="pg' + $wikipageItem.pageid + ' clear wiki-wiDes wk-sub-page-li"><a href="/' + $wikipageItem.teamid + "/wiki/" + wikiId + "/" + $wikipageItem.pageid + "/" + $wikipageItem.pagetitle + '"  class="wikiPageLink pgs' + pageid + '" id="sbpgid' + $wikipageItem.pageid + '" >' + $wikipageItem.title  +"</a></li>")
294					}	
295                })
296            }
297        }
298    }))
299}
300
301function wikiSubpageMore(a) {
302    pageid = $(a).attr("data-pageId"), wikiId = $(a).attr("data-wikiid"), teamid = $(a).attr("data-teamid"), isseo = $(a).closest("li.main-wiki-page").attr("data-is-seo"), ismainpage = $(a).hasClass(".main-wiki-page-exp"), seopagetitle = "", seopagetitle = "", isseo && (seopagetitle = $(a).closest("li.main-wiki-page").attr("data-seo-page-title"), seoteamtitle = $(a).closest("li.main-wiki-page").attr("data-team-shortname"), seowikititle = $(a).closest("li.main-wiki-page").attr("data-wiki-seo-title")), $(a).hasClass("wikiPageHide") ? ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), $("#sbpagewikilinkids" + pageid).toggleClass("activeWiki"), $(".wksbpgs" + pageid).remove()) : ($(".wksbpgs" + pageid).remove(), $.ajax({
303        url: "/portal.wikidetails.ajax.get/pageid/" + pageid + "/wikiid/" + wikiId + "/teamId/" + teamid,
304        async: !1,
305        success: function(b) {
306            if ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), wikiSubpagelist = b.responsebody.result, b.responsebody.result.length > 0) {
307                $("#sbpgs" + pageid).append('<ul class="wksbpgs' + pageid + '"></ul>');
308                var c = $(".wksbpgs" + pageid);
309                $.each(wikiSubpagelist, function() {
310					var addOrRemove = '';
311					var hasnochild = 'hasnochild';
312					if( this.haschildren == 1){
313						 addOrRemove = 'add';
314						 var hasnochild = '';
315					}
316					
317					var _isreadIcon = '';
318					if(this.isread == 'true'){
319						_isreadIcon = '<i class="material-icons mail-read">drafts</i>';
320					}
321					
322					if(typeof this.assignedusers != 'undefined'){
323						 $wikipageItem = this, isseo > 0 && seoteamtitle.length > 0 ? linkAddress = seoteamtitle + "/" + seowikititle + "/" + seopagetitle + "/" + $wikipageItem.seotitle : linkAddress = $wikipageItem.teamid + "/wiki/" + wikiId + "/" + $wikipageItem.pageid + "/" + $wikipageItem.pagetitle, c.append('<li class="page' + $wikipageItem.pageid + ' sub-wiki-page clear wiki-wiDes" id="sbpgs' + $wikipageItem.pageid + '"><div class="border-div"><a href="javascript:void(0)" class="wiki-plus-icon left'+hasnochild+'"><span class="wikiPageMore" onClick="wikiSubpageMore(this);" data-pageid="' + $wikipageItem.pageid + '" data-wikiid="' + wikiId + '" data-teamid="' + teamid + '"><i class="material-icons wiki-add-icon">'+addOrRemove+'</i></span></a><a href="/' + linkAddress + '"  class="wikiPageLink left pgs' + pageid + '" id="sbpgids' + $wikipageItem.pageid + '" ><span class="status-box warning-icon tooltipped ' + $wikipageItem.warning + '"  data-position="left" data-delay="50" data-tooltip="Reminder date expired"><i class="material-icons">warning</i></span><span class="status-box tooltipped "  data-position="left" data-delay="50" data-tooltip="' + $wikipageItem.statusname + '">' + $wikipageItem.statusicon + '</span>	<span class="wikiPageTitleDetails">' + $wikipageItem.title + ''+_isreadIcon+'</span><span class="wikiPageCodeDetails">#' + $wikipageItem.taskshortname + '</span><span class="wikiPageDateDetails">' + $wikipageItem.datepublished + '</span><i class="userAssignedDetails">('+$wikipageItem.author+' <i class="material-icons">keyboard_arrow_right</i> '+$wikipageItem.assignedusers+")</i></a> <span class='notification-wiki-checkbox right'><input type='checkbox' name='notificationwikicheckbox'  id='notificationwikicheckbox-"+ $wikipageItem.pageid +"' value="+ $wikipageItem.pageid +"><label for='notificationwikicheckbox-"+ $wikipageItem.pageid +"'></label></spam></div></li>")
324					} else {
325						 $wikipageItem = this, isseo > 0 && seoteamtitle.length > 0 ? linkAddress = seoteamtitle + "/" + seowikititle + "/" + seopagetitle + "/" + $wikipageItem.seotitle : linkAddress = $wikipageItem.teamid + "/wiki/" + wikiId + "/" + $wikipageItem.pageid + "/" + $wikipageItem.pagetitle, c.append('<li class="page' + $wikipageItem.pageid + ' sub-wiki-page clear wiki-wiDes" id="sbpgs' + $wikipageItem.pageid + '"><div class="border-div"><a href="javascript:void(0)" class="wiki-plus-icon left '+hasnochild+'"><span class="wikiPageMore" onClick="wikiSubpageMore(this);" data-pageid="' + $wikipageItem.pageid + '" data-wikiid="' + wikiId + '" data-teamid="' + teamid + '"><i class="material-icons wiki-add-icon">'+addOrRemove+'</i></span></a><a href="/' + linkAddress + '"  class="wikiPageLink left pgs' + pageid + '" id="sbpgids' + $wikipageItem.pageid + '" ><span class="wikiPageTitleDetails">' + $wikipageItem.title + ""+_isreadIcon+"</span></a><span class='notification-wiki-checkbox right'><input type='checkbox' name='notificationwikicheckbox'  id='notificationwikicheckbox-"+ $wikipageItem.pageid +"' value="+ $wikipageItem.pageid +"><label for='notificationwikicheckbox-"+ $wikipageItem.pageid +"'></label></spam></div></li>")						
326					}
327                   
328					
329				})
330            }
331        }
332    }))
333}
334
335function wikiCollectionSubpageMore(a) {
336	 pageid = $(a).attr("data-pageId");
337	 wikiId = $(a).attr("data-wikiid");
338	 teamid = $(a).attr("data-teamid");
339	attr = $(a).attr("data-taskwiki");
340	_task = false;
341	var _date = new Date();
342	_month = parseInt(_date.getMonth())+1;
343	_day = _date.getDate();
344	_year = _date.getFullYear();
345	if(typeof attr !== typeof undefined && attr !== false){
346		_task = true;
347		_url = "/portal.wikidetails.ajax.get/pageid/" + pageid + "/wikiid/" + wikiId + "/teamId/" + teamid+'/task/true';
348	}else {
349		_url = "/portal.wikidetails.ajax.get/pageid/" + pageid + "/wikiid/" + wikiId + "/teamId/" + teamid;
350		}
351     $(a).hasClass("wikiPageHide") ? ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), $("#sbpagewikilinkid" + pageid).toggleClass("activeWiki"), $(".wksbpg" + pageid).remove()) : ($(".wksbpg" + pageid).remove(), $.ajax({
352        url: _url,
353        async: !1,
354        success: function(b) {
355            if ($(a).toggleClass("wikiPageHide"), $(a).children(".material-icons").text("add" == $(a).children(".material-icons").text() ? "remove" : "add"), wikiSubpagelist = b.responsebody.result, b.responsebody.result.length > 0) {
356                $("#sbpg" + pageid).append('<ul class="wksbpg' + pageid + '"></ul>');
357                var c = $(".wksbpg" + pageid);
358                $.each(wikiSubpagelist, function() {
359                    $wikipageItem = this, c.append('<li class="pg' + $wikipageItem.pageid + ' clear wiki-wiDes wk-sub-page-li"><a href="/' + $wikipageItem.teamid + "/wiki/" + wikiId + "/" + $wikipageItem.pageid + "/" + $wikipageItem.pagetitle + '"  class="wikiPageLink pgs' + pageid + '" id="sbpgid' + $wikipageItem.pageid + '" >' + $wikipageItem.title + "</a></li>")
360                })
361            }
362        }
363    }))
364}
365
366
367function getCookieCheck(a) {
368    for (var b = a + "=", c = document.cookie.split(";"), d = 0; d < c.length; d++) {
369        for (var e = c[d];
370            " " == e.charAt(0);) e = e.substring(1);
371        if (0 == e.indexOf(b)) return e.substring(b.length, e.length)
372    }
373    return ""
374}
375
376function createCookieBar() {
377    return $("<div>", {
378        id: "cookie-bar",
379        class: "fixed"
380    }).hide().html("<p>" + cookieControlMessage + '<a href="" class="cb-enable"><i class="icon-remove-sign icon-white">x</i></a></p>')
381}
382if (function(a) {
383        "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery)
384    }(function(a) {
385        function b(b) {
386            var g = b || window.event,
387                h = i.call(arguments, 1),
388                j = 0,
389                k = 0,
390                l = 0,
391                m = 0;
392            if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (l = -1 * g.detail), "wheelDelta" in g && (l = g.wheelDelta), "wheelDeltaY" in g && (l = g.wheelDeltaY), "wheelDeltaX" in g && (k = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (k = -1 * l, l = 0), j = 0 === l ? k : l, "deltaY" in g && (l = -1 * g.deltaY, j = l), "deltaX" in g && (k = g.deltaX, 0 === l && (j = -1 * k)), 0 !== l || 0 !== k) {
393                if (1 === g.deltaMode) {
394                    var n = a.data(this, "mousewheel-line-height");
395                    j *= n, l *= n, k *= n
396                } else if (2 === g.deltaMode) {
397                    var o = a.data(this, "mousewheel-page-height");
398                    j *= o, l *= o, k *= o
399                }
400                return m = Math.max(Math.abs(l), Math.abs(k)), (!f || f > m) && (f = m, d(g, m) && (f /= 40)), d(g, m) && (j /= 40, k /= 40, l /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), k = Math[k >= 1 ? "floor" : "ceil"](k / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), b.deltaX = k, b.deltaY = l, b.deltaFactor = f, b.deltaMode = 0, h.unshift(b, j, k, l), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h)
401            }
402        }
403
404        function c() {
405            f = null
406        }
407
408        function d(a, b) {
409            return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 == 0
410        }
411        var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
412            h = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"],
413            i = Array.prototype.slice;
414        if (a.event.fixHooks)
415            for (var j = g.length; j;) a.event.fixHooks[g[--j]] = a.event.mouseHooks;
416        var k = a.event.special.mousewheel = {
417            version: "3.1.9",
418            setup: function() {
419                if (this.addEventListener)
420                    for (var c = h.length; c;) this.addEventListener(h[--c], b, !1);
421                else this.onmousewheel = b;
422                a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this))
423            },
424            teardown: function() {
425                if (this.removeEventListener)
426                    for (var a = h.length; a;) this.removeEventListener(h[--a], b, !1);
427                else this.onmousewheel = null
428            },
429            getLineHeight: function(b) {
430                return parseInt(a(b)["offsetParent" in a.fn ? "offsetParent" : "parent"]().css("fontSize"), 10)
431            },
432            getPageHeight: function(b) {
433                return a(b).height()
434            },
435            settings: {
436                adjustOldDeltas: !0
437            }
438        };
439        a.fn.extend({
440            mousewheel: function(a) {
441                return a ? this.bind("mousewheel", a) : this.trigger("mousewheel")
442            },
443            unmousewheel: function(a) {
444                return this.unbind("mousewheel", a)
445            }
446        })
447    }), function(a) {
448        function b(a) {
449            return window.open("/filemanager/?p=" + a, "filemanager", "height=600,width=980,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=200,top=150"), !1
450        }
451
452        function c(b, c, d, e, f) {
453            if (a(".modal--titel").html(c), window.outerWidth > 600) {
454                var g = (a("#modal1 .modal-content").empty().html('<iframe id="modalIframeId" src="' + b + '"width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" />'), a("#modal1"));
455                g.modal({
456                    dismissible: !0,
457                    opacity: .5,
458                    in_duration: 300,
459                    out_duration: 200,
460                    starting_top: "4%",
461                    ending_top: "10%",
462                    ready: function(b, c) {
463                        a(".modal--close").show()
464                    },
465                    complete: function() {
466                        a(".modal--close").hide(), 1 == f && document.location.reload()
467                    }
468                }), g.modal || dialogPolyfill.registerDialog(g), g.modal("open"), a(".ui-dialog-titlebar-close").addClass("close").html("&times;")
469            } else window.location.href = b
470        }
471        if (a(".btn").addClass("waves-effect"), a(".modal").modal(), a(".datepicker").pickadate({
472                selectMonths: 12,
473                selectYears: 200,
474                format: "dd-mm-yyyy"
475				,editable: true
476            }), a(document).ready(function() {
477                a(".modal--close").on("click", function() {
478                    a("#modal1").modal("close")
479                }), a("select").material_select()
480            }), window.closeModal = function(b) {
481                errorbox = '<div class="messageContainer"><div class="alert alert-error alert-float"><button type="button" class="close" data-dismiss="alert">&times;</button>' + b + "</div></div>", a("#modal1").modal("close"), a(".container").append(errorbox);
482                var c = a(".messageContainer");
483                c.css({
484                    left: (a(document).width() - c.width()) / 2 + "px"
485                }), c.show().delay(4000).fadeOut("slow", function() {
486                    c.remove()
487                })
488            }, a("#modal1").length) {
489            var d = a("#modal1"),
490                e = d.height(),
491                f = d.get(0).scrollHeight;
492            d.bind("mousewheel", function(a, b) {
493                (this.scrollTop === f - e && 0 > b || 0 === this.scrollTop && b > 0) && a.preventDefault()
494            })
495        }
496        void 0 !== a.cookie && (a("#dashboardTabs li a").click(function() {
497            a.cookie("upt", a(this).parent().index())
498        }), a.cookie("upt")), a(function() {
499            if (a(".cancelAction").click(function(a) {
500                    a.preventDefault(), history.back()
501                }), a(".deleteItem").click(function(a) {
502                    return !!confirm("Are you sure?") && void 0
503                }), a(".tooltipE").tooltip({
504                    placement: "right"
505                }), a(".tooltipN").tooltip({
506                    placement: "top"
507                }), a(".tooltipW").tooltip({
508                    placement: "left"
509                }), a(".tooltipS").tooltip({
510                    placement: "bottom"
511                }), a(".messageContainer").length) {
512                var d = a(".messageContainer");
513                d.css({
514                    left: (a(document).width() - d.width()) / 2 + "px"
515                }), d.show().delay(4000).fadeOut()
516            }
517            a(".filemanager").click(function(c) {
518                c.preventDefault(), b(a(this).attr("data-param"))
519            }), a(document).on('click','.dialog',function(b) {
520                b.preventDefault();
521                var d = a(this);
522                d.hasClass("archivedmsgs") ? wid = 870 : wid = 1070, target = d.attr("href"), title = d.attr("data-tooltip"), w = d.attr("data-window-w") || wid, h = d.attr("data-window-h") || 640, r = d.attr("data-reload") || !0, w = "%" == w.toString().charAt(w.length - 1) ? parseInt(a(document).width() * (parseInt(w) / 100)) : parseInt(w), h = "%" == h.toString().charAt(h.length - 1) ? parseInt(a(window).height() * (parseInt(h) / 100)) : parseInt(h), a(this).hasClass("iframe") && c(target, title, w, h, r)
523            }), a("#addQuickblogbtn").click(function() {
524                a("#quickBlogForm").slideToggle()
525            }), a(".readmore").click(function() {
526                artId = a(this).attr("data-articleid"), artHgt = a(this).attr("data-height"), a("#portalQuickBlogPaginationWrapperTop").css("height", artHgt), a("#portalArticleListPaginationWrapperLeft").css("height", artHgt), a(".summaryNote" + artId).hide(), a(".hiddenSummaryNote" + artId).slideDown()
527            }), a(".hideReadmore").click(function() {
528                artId = a(this).attr("data-articleid"), a("#portalQuickBlogPaginationWrapperTop").css("height", 236), a("#portalArticleListPaginationWrapperLeft").css("height", 100), a(".summaryNote" + artId).slideDown(), a(".hiddenSummaryNote" + artId).slideUp(400)
529            }), a(".readmoreleft").click(function() {
530                artId = a(this).attr("data-articleid"), artHgt = a(this).attr("data-height"), a("#portalQuickBlogPaginationWrapperTop").css("height", artHgt), a("#portalArticleListPaginationWrapperLeft").css("height", artHgt), a(".summaryNote" + artId).hide(), a(".hiddenSummaryNote" + artId).show()
531            }), a(".hideReadmoreleft").click(function() {
532                artId = a(this).attr("data-articleid"), a(".hiddenSummaryNote" + artId).hide(), a(".summaryNote" + artId).show(), a("#portalQuickBlogPaginationWrapperTop").css("height", 236), a("#portalArticleListPaginationWrapperLeft").css("height", 100)
533            })
534        })
535    }(jQuery), $(document).on("click", '[data-js="filter-toggle"]', function(a) {
536        var b = "filter-toggle",
537            c = $(this);
538        $('[data-js="filter-toggle"]').each(function() {
539            $(this).hasClass(b + "--active") && !c.hasClass(b + "--active") && $(this).removeClass(b + "--active")
540        }), c.hasClass(b + "--active") ? c.removeClass(b + "--active") : c.addClass(b + "--active")
541    }), $("#vacancies").width() < 700 && $("#vacancies .dropdownsresp").removeClass("dropdowns"), $(".resetFilter").on("click", "#resetJobFilter", function(a) {
542        var b = "V_REGIONFILTER,V_LEVELFILTER,V_AREAFILTER,V_INDUSTRIESFILTER,V_SOLUTIONSFILTER,V_SELECTEDCOOKIES,V_FILTEROPERATION_AND,V_FILTEROPERATION_OR",
543            c = b.split(",");
544        $.each(c, function(a) {
545            document.cookie = c[a] + "="
546        }), document.cookie = "V_SELECTEDCOOKIES=", a.preventDefault(), window.location.href = "/vacatures"
547    }), $("input.checkbox").change(function() {
548        this.checked ? (setCookie($(this).attr("name").toUpperCase().replace(/[^a-z0-9\s]/gi, "").replace(/[_\s]/g, "-"), $(this).attr("id")), setFullNameCookie($(this).attr("name").toUpperCase().replace(/[^a-z0-9\s]/gi, "").replace(/[_\s]/g, "-"), $(this).val().toLowerCase(), $(this).data("searchoperator"))) : (deleteCookie($(this).attr("name").toUpperCase().replace(/[^a-z0-9\s]/gi, "").replace(/[_\s]/g, "-"), $(this).attr("id")), deleteFullNameCookie($(this).attr("name").toUpperCase().replace(/[^a-z0-9\s]/gi, "").replace(/[_\s]/g, "-"), $(this).val().toLowerCase(), $(this).data("searchoperator")))
549    }), regionTagList = getCookie("V_REGIONFILTER"), levelTagList = getCookie("V_LEVELFILTER"), areaTagList = getCookie("V_AREAFILTER"), industriesTagList = getCookie("V_INDUSTRIESFILTER"), solutionsTagList = getCookie("V_SOLUTIONSFILTER"), $(".form--filter input").each(function() {
550        -1 != regionTagList.search($(this).attr("id")) && $(this).attr("checked", "checked"), -1 != levelTagList.search($(this).attr("id")) && $(this).attr("checked", "checked"), -1 != areaTagList.search($(this).attr("id")) && $(this).attr("checked", "checked"), -1 != industriesTagList.search($(this).attr("id")) && $(this).attr("checked", "checked"), -1 != solutionsTagList.search($(this).attr("id")) && $(this).attr("checked", "checked")
551    }), $(".loadMore").on("click", "#vacancyLoadMore", function(a) {
552        a.preventDefault();
553        var b = {};
554        $(".VacancyListWrapper").length && (b.startRow = $("#vacancyLoadMore").attr("data-startrow"), b.limit = $("#vacancyLoadMore").attr("data-limit"), b.totalCount = $("#vacancyLoadMore").attr("data-totalcount"), b.catid = $("#vacancyLoadMore").attr("data-catid"), b.page = parseInt($("#vacancyLoadMore").attr("data-page")) + 1, b.lt = parseInt($("#vacancyLoadMore").attr("data-limit")) + 9, $("#vacancyLoadMore").attr("data-page", b.page), $("#vacancyLoadMore").attr("data-limit", b.lt), getVacancies(b))
555    }), $(window).scroll(function() {
556        $(window).scrollTop() == $(document).height() - $(window).height() && parseInt($("#vacancyLoadMore").attr("data-limit")) < parseInt($("#vacancyLoadMore").attr("data-totalcount")) && $("#vacancyLoadMore").click()
557    }), $("#profileEdit #tags .icon-custom-info").click(function(a) {
558        var b = ($(this).offset().top, $(this).attr("data-id"));
559        $(this).offset().left, $.ajax({
560            url: "/portal.taglist.ajax.get/id/" + b,
561            dataType: "JSON",
562            success: function(a) {
563                tagList = a.responsebody.taglist, $(".tooltip-inner").html(tagList)
564            }
565        })
566    }), $(".step--tags .icon-custom-info").click(function(a) {
567        var b = ($(this).offset().top, $(this).attr("data-id"));
568        $(this).offset().left, $.ajax({
569            url: "/portal.taglist.ajax.get/id/" + b,
570            dataType: "JSON",
571            success: function(a) {
572                tagList = a.responsebody.taglist, $(".tooltip-inner").html(tagList)
573            }
574        })
575    }), $("#registerCompleteForm .icon-custom-info").click(function(a) {
576        var b = ($(this).offset().top, $(this).attr("data-id"));
577        $(this).offset().left, $.ajax({
578            url: "/portal.taglist.ajax.get/id/" + b,
579            dataType: "JSON",
580            success: function(a) {
581                tagList = a.responsebody.taglist, $(".tooltip-inner").html(tagList)
582            }
583        })
584    }), $("#tags .icon-custom-info").on("mouseleave", function(a) {
585        var b = $(this).attr("data-id");
586        $("#" + b).hide()
587    }), $(document).ready(function() {
588        var a = !1;
589        $(".solrSearchUserIds").click(function() {
590            $(".solrSearchUserIds").each(function() {
591                $(this).is(":checked") && (a = !0)
592            }), a ? $(".addSelectionTagsHide").removeClass("addSelectionTagsHide").addClass("addSelectionTagsShow") : $(".addSelectionTagsHide").removeClass("addSelectionTagsShow").addClass("addSelectionTagsHide")
593        }), $("#userCV").change(function() {
594            $(".greenCheckMark").show()
595        })
596    }), $(".dateDrpDown").click(function(a) {
597        a.stopPropagation(), $(".dateUL").toggle()
598    }), $.fn.datepicker && ($.datepicker.regional.nl = {
599        dateFormat: "dd-mm-yy",
600        firstDay: 1,
601        isRTL: !1,
602        showMonthAfterYear: !1,
603        yearSuffix: ""
604    }, $.datepicker.setDefaults($.datepicker.regional.nl), $.datepicker.setDefaults($.datepicker.regional.nl), $(".date").datepicker({
605        changeMonth: !0,
606        changeYear: !0
607    })), $(".wikiMore").length) {
608    var wikiId = "";
609    $(".wikiMore").click(function() {
610		wikiId = $(this).data("id");
611		_teamid = $(this).attr("data-teamId");
612		attr = $(this).attr("data-taskwiki");
613		_task = '';
614		if(typeof attr !== typeof undefined && attr !== false){
615			_task = 'data-taskwiki="true"';
616			_url = "/portal.wikidetails.ajax.get/wikiid/" + wikiId + "/teamid/" + _teamid+'/task/true';
617		}else {
618			_url = "/portal.wikidetails.ajax.get/wikiid/" + wikiId + "/teamid/" + _teamid;
619			}
620         $('[data-id="' + wikiId + '"]').hasClass("wikiHide") ? ($('[data-id="' + wikiId + '"]').toggleClass("wikiHide"), $('[data-id="' + wikiId + '"]').children(".material-icons").text("add" == $('[data-id="' + wikiId + '"]').children(".material-icons").text() ? "remove" : "add"), $(".wkpg" + wikiId).remove()) : ($(".wkpg" + wikiId).remove(), $.ajax({
621            url: _url,
622            async: !1,
623            success: function(a) {
624                if ($('[data-id="' + wikiId + '"]').toggleClass("wikiHide"), $('[data-id="' + wikiId + '"]').children(".material-icons").text("add" == $('[data-id="' + wikiId + '"]').children(".material-icons").text() ? "remove" : "add"), wikilist = a.responsebody.result, a.responsebody.result.length > 0) {
625                    $("#wk" + wikiId).append('<ul class="wkpg' + wikiId + '"></ul>');
626                    var b = $(".wkpg" + wikiId);
627					var _date = new Date();
628					_month = parseInt(_date.getMonth())+1;
629					_day = _date.getDate();
630					_year = _date.getFullYear();
631                    $.each(wikilist, function() {
632						var addOrRemove = 'remove';
633						var addOrRemoveVisibility = 'visibility:hidden;';
634						if( this.haschildren == 1){
635							 addOrRemove = 'add';
636							 addOrRemoveVisibility = '';
637						}
638						if(_task.length){
639							$wikiItem = this, b.append('<li id="sbpg' + $wikiItem.pageid + '" class="main-wiki-page clear wiki-wiDes"><a href="javascript:void(0)" class="wiki-plus-icon"><span class="wikiPageMore main-wiki-page-exp" onClick="wikiSubpageMouseOver(this);" data-pageid="' + $wikiItem.pageid + '" data-wikiid="' + wikiId + '" data-teamid="' + _teamid + '" '+_task+' ><i class="material-icons" style="'+addOrRemoveVisibility+'">'+addOrRemove+'</i></span></a><div class="task-wiki-page-name"><a href="/' + $wikiItem.teamid + "/wiki/" + wikiId + "/" + $wikiItem.pageid + "/" + $wikiItem.pagetitle + '" id="sbpagewikilinkid' + $wikiItem.pageid + '" class="sbpageswiki' + wikiId + '">' + $wikiItem.title + " <span class='shortname-task'>(#"+ $wikiItem.taskshortname+")</span>" + "</a><a class='task-wiki-timelog waves-effect waves-light dialog iframe timelog-add-btn'  data-position='bottom' data-delay='50' data-tooltip='"+_day+"/"+_month+"/"+_year+"'  href='/portal.timelog.add/day/"+_day+"/month/"+ _month +"/year/"+_year+"/view/widget/pageid/"+$wikiItem.pageid +"'><i class='material-icons'>query_builder</i></a></div></li>")
640						}else{
641							$wikiItem = this, b.append('<li id="sbpg' + $wikiItem.pageid + '" class="main-wiki-page clear wiki-wiDes"><a href="javascript:void(0)" class="wiki-plus-icon"><span class="wikiPageMore main-wiki-page-exp" onClick="wikiSubpageMouseOver(this);" data-pageid="' + $wikiItem.pageid + '" data-wikiid="' + wikiId + '" data-teamid="' + _teamid + '" '+_task+' ><i class="material-icons" style="'+addOrRemoveVisibility+'">'+addOrRemove+'</i></span></a><div class="task-wiki-page-name"><a href="/' + $wikiItem.teamid + "/wiki/" + wikiId + "/" + $wikiItem.pageid + "/" + $wikiItem.pagetitle + '" id="sbpagewikilinkid' + $wikiItem.pageid + '" class="sbpageswiki' + wikiId + '">' + $wikiItem.title +  "</a></div></li>")
642						}	
643                    })
644                }
645            }
646        }))
647    })
648}
649if ($("#wikinav").length) {
650    var _pathname = window.location.pathname,
651        _pathDeatils = _pathname.split("/"),
652        _teamName = _pathDeatils[1],
653        _wikiId = _pathDeatils[3],
654        _subpageId = _pathDeatils[4],
655        _parentId = "";
656    _pathDeatils.length >= 3 && "wiki" == _pathDeatils[2] && $.isNumeric(_wikiId) && _wikiId.length && $("#wklinkid" + _wikiId).addClass("activeWiki"), _pathDeatils.length >= 4 && "wiki" == _pathDeatils[2] && ($.ajax({
657        url: "/portal.wikidetails.ajax.get/parentid/" + _subpageId + "/wikiid/" + _wikiId + "/teamId/" + _teamName,
658        async: !1,
659        success: function(a) {
660            a.responsebody && (wikiSubpagelist = a.responsebody.result, $.isEmptyObject(wikiSubpagelist) || (_parentId = wikiSubpagelist[0].parentid))
661        }
662    }), $.isNumeric(_subpageId) && _subpageId.length && ($('[data-id="' + _wikiId + '"]').trigger("click"), void 0 !== _parentId && ($('[data-pageid="' + _parentId + '"]').trigger("click"), $("#sbpgid" + _subpageId).addClass("activeWiki")), $("#sbpagewikilinkid" + _subpageId).addClass("activeWiki")))
663}
664$(document).ready(function() {
665    function a(a) {
666        var b = $("#activeshoutboxdelete").attr("data-ajax-link");
667        $.ajax({
668            url: b,
669            dataType: "json",
670            data: {
671                messageid: a
672            },
673            method: "POST",
674            success: function(a) {
675                c(e, "na", "na", "", "home", g, "del")
676            }
677        })
678    }
679
680    function b() {
681        var a = $("#participants").attr("data-ajax-link");
682        $.ajax({
683            url: a,
684            dataType: "json",
685            method: "POST",
686            success: function(a) {
687                $("#participants").html(a.responsebody.result)
688            }
689        })
690    }
691
692    function c(a, b, c, d, e, f, g) {
693        $.ajax({
694            url: a,
695            data: {
696                message: b,
697                latesttimestamp: c
698            },
699            dataType: "json",
700            method: "POST",
701            success: function(a) {
702                if ("del" == g && $("#chatbox").html(""), a.responsebody.result.length > 0) {
703                    var b = "";
704                    $.each(a.responsebody.result, function() {
705                        if ($eventItem = this, isMeClass = "", $eventItem.isme && (isMeClass = "myself"), "home" == e ? (b += '<div class="message-wrapper" id="message-' + $eventItem.messageid + '">', b += '<div class="namesection ' + isMeClass + '">' + $eventItem.username + '<span>:</span></div> <div class="msgsection"> ' + $eventItem.message + "</div>", b += '<div class="timestamp" title="' + $eventItem.datesent + " " + $eventItem.timesent + '">', b += $eventItem.istoday ? $eventItem.timesent : $eventItem.datesent, b += "</div>", "Yes" == f && (b += '<div class="deletesection"><div class="delete-wrapper"><a href="javascript:void(0)"><img src="/img/delete.x.gif" class="activemsgdelete" data-shoutboxmsgid="' + $eventItem.messageid + '"></a></div></div>'), b += "</div>") : (b += '<div class="message-wrapper" id="message-' + $eventItem.messageid + '">', b += '<div class="namesection">' + $eventItem.username + '<span>:</span></div> <div class="msgsection"> ' + $eventItem.message + "</div>", b += '<div class="archivetimestamp">' + $eventItem.datesent + " " + $eventItem.timesent, b += "</div></div>"), "" == $("#datesent").val() || $eventItem.timestamp != $("#datesent").val()) {
706                            var a = $("#archiveactivemsg"),
707                                c = $("#archivemsgid");
708                            "new" == d ? $("#chatbox").append(b) : ($("#chatbox").html(b), a.val(b), c.val(c.val() + $eventItem.messageid + ","))
709                        }
710                        $("#datesent").val($eventItem.timestamp)
711                    });
712                    var c = document.getElementById("chatbox");
713                    $("#chatbox").animate({
714                        scrollTop: c.scrollHeight
715                    }, 1e3)
716                }
717            }
718        })
719    }
720
721    function d() {
722        var a = $("#datesent").val(),
723            b = "new";
724        "" == a && (a = "na", b = "");
725        var d = $("#usermsg").val();
726        "" != d && (c(e, d, a, b, f, g, ""), $("#usermsg").val(""))
727    }
728    if ($("#star-rating").length && ($("#star-rating").rating({
729            starCaptions: function(a) {
730                return 3 > a ? a : "high"
731            },
732            starCaptionClasses: function(a) {
733                return 3 > a ? "label label-danger" : "label label-success"
734            },
735            hoverOnClear: !1
736        }), $("#rating-input").rating({
737            min: 0,
738            max: 5,
739            step: 1,
740            size: "lg",
741            showClear: !1
742        }), $("#btn-rating-input").on("click", function() {
743            $("##rating-input").rating("refresh", {
744                showClear: !0,
745                disabled: !0
746            })
747        }), $(".btn-danger").on("click", function() {
748            $("##kartik").rating("destroy")
749        }), $(".btn-success").on("click", function() {
750            $("##kartik").rating("create")
751        }), $("#star-rating").on("rating.change", function() {
752            var a = $(this).attr("data-itemid"),
753                b = $(this).attr("data-module"),
754                c = $(this).attr("data-ajaxlink"),
755                d = $(this).attr("data-ratingtype"),
756                e = $(this).attr("data-ratingid"),
757                f = $(this).attr("data-forward"),
758                g = $(this).val();
759            $.ajax({
760                url: c,
761                async: !0,
762                method: "POST",
763                data: {
764                    itemid: a,
765                    module: b,
766                    ratingtype: d,
767                    ratingid: e,
768                    forward: f,
769                    value: g
770                },
771                success: function(b) {
772                    ratingDetails = b.responsebody.result, ratingId = ratingDetails[0].ratingid, $(".star" + a).attr("data-ratingid", ratingId)
773                }
774            })
775        }), $(".rb-rating").rating({
776            showCaption: !0,
777            stars: "3",
778            min: "0",
779            max: "3",
780            step: "1",
781            size: "xs",
782            starCaptions: {
783                0: "status:nix",
784                1: "status:wackelt",
785                2: "status:geht",
786                3: "status:laeuft"
787            }
788        })), $(".user-rating").click(function(a) {
789            var b = $(this).attr("data-itemid"),
790                c = $(this).attr("data-module"),
791                d = $(this).attr("data-ajaxlink"),
792                e = $(this).attr("data-ratingtype"),
793                f = $(this).attr("data-ratingid"),
794                g = $(this).attr("data-forward"),
795                h = $(this).attr("data-likeCount"),
796                i = $(this).attr("data-button-ui") || "",
797                k = $(this);
798            k.hasClass("processing") || (k.addClass("processing"), $.ajax({
799                url: d,
800                async: !0,
801                method: "POST",
802                data: {
803                    itemid: b,
804                    module: c,
805                    ratingtype: e,
806                    ratingid: f,
807                    forward: g,
808                    value: 6
809                },
810                success: function(a) {
811                    var c = a.responsebody.result,
812                        d = c[0].ratingid;
813                    $("." + e + b).attr("data-ratingid", d);
814                    var g = c[0].ratingcount;
815                    "like" == e && h.length && 0 == f.length && ($(".like-count").text(parseInt($(".like-count").first().text()) + 1), $("." + e + b).addClass("marked"), "text" == i && (value = $(".likecount" + b).first().text(), newCount = void 0 !== g ? g : parseInt(h) + 1, $(".likecount" + b).text(newCount), $("." + e + b).find("i").removeClass("icon-custom-heart-black").addClass("icon-custom-heart-red"))), "like" == e && f && ("text" == i && (value = $(".likecount" + b).first().text(), newCount = void 0 !== g ? g : parseInt(h) + 1, $(".likecount" + b).text(newCount)), $("." + e + b).attr("data-ratingid", ""), $("." + e + b).removeClass("marked"), "text" == i && $("." + e + b).find("i").removeClass("icon-custom-heart-red").addClass("icon-custom-heart-black")), k.attr("data-likeCount", newCount)
816                }
817            }).always(function() {
818                k.removeClass("processing")
819            })), a.preventDefault()
820        }), $("#teamMessageBoard.chat-window-side").length) {
821        var e = $("#chatbox").attr("data-ajax-link"),
822            f = $("#chatbox").attr("data-parentwindow"),
823            g = $("#chatbox").attr("data-isadmin"),
824            h = "";
825        h = window.location.hash ? location.hash.match(/^#?(.*)$/)[1] : "", "shoutbox" == h && $("#teamMessageBoard #wrapper").show(), $("#chatbox").on("mouseenter", ".msgsection,.namesection,.timestamp,.deletesection", function() {
826            $(this).nextAll(".deletesection").find(".delete-wrapper").show()
827        }).on("mouseleave", ".msgsection,.namesection,.timestamp,.deletesection", function() {
828            $(this).nextAll(".deletesection").find(".delete-wrapper").hide()
829        }), $("#chatbox").on("mouseenter", ".deletesection", function() {
830            $(this).find(".delete-wrapper").show()
831        }).on("mouseleave", ".deletesection", function() {
832            $(this).find(".delete-wrapper").hide()
833        }), $("#chatbox").on("click", ".activemsgdelete", function() {
834            a($(this).attr("data-shoutboxmsgid"))
835        }), $(".board-hide").click(b), $("#archivetitles").change(function() {
836            var a = $("#archivebox").attr("data-ajax-link"),
837                b = this.value;
838            $.ajax({
839                url: a,
840                dataType: "json",
841                method: "POST",
842                data: {
843                    archivetitles: b
844                },
845                success: function(a) {
846                    a.responsebody.result.length > 0 && $("#archivebox").html(a.responsebody.result[0].archivedmessage)
847                }
848            })
849        }), ("home" == f || "archive" == f) && c(e, "na", "na", "", f, g, ""), setInterval(function() {
850            var a = $("#datesent").val(),
851                b = "new";
852            "" == a && (a = "na", b = ""), "home" == f && c(e, "na", a, b, f, g, "")
853        }, 3e3), $("#usermsg").keypress(function(a) {
854            13 == a.which && d()
855        }), $("#submitmsg").click(function() {
856            d()
857        })
858    }
859}), $(document).ready(function() {
860    function a(a, b, c, d, e) {
861        $.post(a, b).done(function(a) {
862            var b = new i("v_team_wiki_collapse");
863            $(".inputClearLinkHide").removeClass("inputClearLinkHide"), $(".teamWikiSearchtaglistUL").hide(), $("#teamWikiSearchtagResultDivContainer").html(a), $.trim($("#searchwikilist").data("wiki-search-recordcount")) && $("#teamWikiSearchtagResultDiv").show(), ("false" == b.items()[0] || e) && $("#teamWikiSearchtagResultDivContainer").slideDown(500), $(".wiki-pagination li a").each(function() {
864                $.isNumeric($(this).text()) ? $(this).attr("href", "javascript:void(0);").addClass("wiki-pagination-a") : $(this).attr("href", "javascript:void(0);")
865            }), $(".hidepagenum").removeClass("active")
866        }).always(function() {
867            c && $(".wiki-pagination .pagination .page-prev").removeClass("page-prev").addClass("page-prev-stop"), d && $(".wiki-pagination .pagination .page-next").removeClass("page-next").addClass("page-next-stop"), $("#teamWikiSearchtagResultDiv .wikiResultCount").text($("#searchwikilist").data("wiki-search-recordcount")), $("#teamWikiSearchtagResultDiv .showarrow").hide(), $("#teamWikiSearchtagResultDiv .hidearrow").show()
868        })
869    }
870
871    function b() {
872        var a = $("#cookieTagList").val().split(",");
873        new i("v_team_wiki_collapse").update("false"), $("input[name='tagIds']:checked").removeAttr("checked"), a.push("v_keyword"), a.push("v_tagcondition");
874        for (var c = 0; c < a.length; c++) clearCookie = new i(a[c]), clearCookie.clear();
875        $('input[name="tagCondition"]input[value="OR"]').prop("checked", !0), $(".cookieListSpan").text("")
876    }
877    var c = getCookieCheck("cookiedismiss");
878    if (cookieControlMessage = cookieControlMessage || "", !c.length && cookieControlMessage.length && (createCookieBar().prependTo("body"), jQuery("#cookie-bar").slideDown("slow")), $(document).on("click", "#cookie-bar, #cookie-bar .cb-enable, #cookie-bar a.closeMessage", function(a) {
879            a.preventDefault();
880            var b = new Date;
881            b.setTime(b.getTime() + 864e8), document.cookie = "cookiedismiss=true; expires=" + b.toGMTString() + "; path=/", jQuery("#cookie-bar").slideUp("fast")
882        }), $("#userSocialView li.inactive, span.mediaformItem.inactive").tooltip({
883            placement: "bottom"
884        }), $("#wikiSearchTagDiv").length) {
885        var d = window.location.pathname,
886            e = $("#wikiSearchTagDiv").data("teamid"),
887            f = $("#wikiSearchTagDiv").data("teamshortname"),
888            g = d.split("/");
889        if (g[1] == f || (e.toString().indexOf(',') > -1 && $.inArray(g[1],e.split(',')) > -1) || g[1] == e) {
890            var h = $("#wikiSearchTagDiv").data("src");
891            $.get(h, function(a) {
892                $("#wikiSearchTagDiv").html(a)
893            }).done(function() {
894                var a = [],
895                    b = "",
896                    c = new i("v_keyword"),
897                    d = new i("v_tagcondition"),
898                    e = $("#wikiSearchTagDiv").data("position-team-searchbox-selector"),
899                    f = $("#wikiSearchTagDiv").data("position-team-searchbox-insert"),
900                    g = $("#wikiSearchTagDiv").data("position-team-result-selector"),
901                    h = $("#wikiSearchTagDiv").data("position-team-result-insert"),
902                    j = $("#wikiSearchTagDiv").data("position-team-inner-searchbox-selector"),
903                    k = $("#wikiSearchTagDiv").data("position-team-inner-searchbox-insert"),
904                    l = $("#wikiSearchTagDiv").data("position-team-inner-result-selector"),
905                    m = $("#wikiSearchTagDiv").data("position-team-inner-result-insert");
906                if (c.items().length) {
907                    var n = c.items()[0];
908                    $("#searchKeyword").val(n)
909                }
910                if (d.items().length) {
911                    var o = d.items()[0];
912                    $('input[name="tagCondition"]input[value=' + o + "]").prop("checked", !0)
913                }
914                if (void 0 !== $("#cookieTagList").val() && (a = $("#cookieTagList").val().split(","), a.length))
915                    for (var p = 0; p < a.length; p++) {
916                        var q = new i(a[p]),
917                            r = q.items();
918                        if (r.length) {
919                            for (var s = 0; s < r.length; s++) $("input[data-taggroup=" + a[p] + "]input[data-tagtext=" + r[s] + "]").prop("checked", !0), b = b + (b ? ", " : "") + r[s];
920                            $(".cookieListSpan").text(b), $("#teamWikiSearchCookieTagList").show()
921                        }
922                    }
923                if ($("#wikiSearchTagDiv").length) {
924                    var t = window.location.pathname,
925                        u = $("#wikiSearchTagDiv").data("teamid"),
926                        v = $("#wikiSearchTagDiv").data("teamshortname"),
927                        w = t.split("/");
928                    (w[1] == v || ((u.toString().indexOf(',') > -1 && $.inArray(w[1],u.split(',')) > -1) || w[1] == u)) && ($("#teamView").length ? ($(e).empty(), "prepend" == f ? $("#wikiSearchTagDiv").prependTo(e) : $("#wikiSearchTagDiv").appendTo(e), $("#teamWikiSearchtagResultDiv").length && ("prepend" == h ? $("#teamWikiSearchtagResultDiv").prependTo(g) : $("#teamWikiSearchtagResultDiv").appendTo(g))) : ($(j).empty(), "prepend" == k ? $("#wikiSearchTagDiv").prependTo(j) : $("#wikiSearchTagDiv").appendTo(j), $("#teamWikiSearchtagResultDiv").length && ("prepend" == m ? $("#teamWikiSearchtagResultDiv").prependTo(l) : $("#teamWikiSearchtagResultDiv").appendTo(l))), $("#wikiSearchTagDiv").show())
929                }
930                var x = $("#cookieTagList").val().split(",");
931                x.push("v_keyword");
932                for (var y = !1, p = 0; p < x.length; p++) q = new i(x[p]), !y && q.items().length && (y = !0);
933                y && $("#teamWikiSearchtagSubmitBtn").trigger("click", "auto");
934                var z = new i("v_team_wiki_collapse");
935                z.items().length || z.update("false")
936            }), $(document).on("click", ".teamWikiSearchtagDrpdwn", function() {
937                event.stopPropagation(), $(".teamWikiSearchtaglistUL").toggle()
938            }), $(document).on("click", "#teamWikiSearchtagSubmitBtn", function(b) {
939                var c = "",
940                    d = "",
941                    e = "OR",
942                    f = 0,
943                    k = !0,
944                    l = new i("v_team_wiki_collapse");
945                void 0 !== b.isTrigger && b.isTrigger && (k = !1), k && l.update("false"), $("input[name='tagIds']:checked").each(function() {
946                    c = c + (c ? ", " : "") + $(this).val()
947                }), $.trim($("#searchKeyword").val()).length && (d = $.trim($("#searchKeyword").val()), addKeywordCookie = new i("v_keyword"), addKeywordCookie.add(d)), $("input:radio[name=tagCondition]:checked").val().length && (e = $("input:radio[name=tagCondition]:checked").val(), addTagConditionCookie = new i("v_tagcondition"), addTagConditionCookie.update(e)), f = $("#wikiSearchTagDiv").data("teamid"), dataVal = {
948                    keyword: d,
949                    teamId: f,
950                    tagIdList: c,
951                    tagCondition: e
952                }, a("/team.search.wiki", dataVal, !0, !1, k)
953            }), $(document).on("click", ".wiki-pagination-a", function() {
954                var b = "",
955                    c = "",
956                    d = "OR",
957                    e = 0,
958                    f = 0,
959                    j = !1,
960                    k = !1;
961                $("input[name='tagIds']:checked").each(function() {
962                    b = b + (b ? ", " : "") + $(this).val()
963                }), parseInt($.trim($(".wiki-pagination li.active a").text())) && ($(".wiki-pagination li.active").next(), "page-next" == $(this).parent("li").next().children().attr("class") ? j = !0 : "page-next-stop" == $(this).parent("li").next().children().attr("class") && (j = !0), "page-prev" == $(this).parent("li").prev().children().attr("class") ? k = !0 : "page-prev-stop" == $(this).parent("li").prev().children().attr("class") && (k = !0)), $.trim($("#searchKeyword").val()).length && (c = $.trim($("#searchKeyword").val()), addKeywordCookie = new i("v_keyword"), addKeywordCookie.add(c)), $("input:radio[name=tagCondition]:checked").val().length && (d = $("input:radio[name=tagCondition]:checked").val(), addTagConditionCookie = new i("v_tagcondition"), addTagConditionCookie.update(d)), $.isNumeric($.trim($(this).text())) && (f = $(this).text() - 1), e = $("#wikiSearchTagDiv").data("teamid"), dataVal = {
964                    keyword: c,
965                    teamId: e,
966                    tagIdList: b,
967                    tagCondition: d,
968                    page: f
969                }, a("/team.search.wiki", dataVal, k, j, !1)
970            }), $(document).on("click", ".page-next", function() {
971                var b = parseInt($.trim($(".wiki-pagination li.active a").text())),
972                    c = "",
973                    d = "",
974                    e = "OR",
975                    f = 0,
976                    h = !1;
977                parseInt($.trim($(".wiki-pagination li.active a").text())) && (liObj = $(".wiki-pagination li.active").removeClass("active").next().addClass("active"), "page-next" == liObj.next().children().attr("class") && (liObj.next().children().removeClass("page-next").addClass("page-next-stop"), h = !0), $(".page-prev-stop").length && $(".page-prev-stop").removeClass("page-prev-stop").addClass("page-prev")), $("input[name='tagIds']:checked").each(function() {
978                    c = c + (c ? ", " : "") + $(this).val()
979                }), $.trim($("#searchKeyword").val()).length && (d = $.trim($("#searchKeyword").val()), addKeywordCookie = new i("v_keyword"), addKeywordCookie.add(d)), $("input:radio[name=tagCondition]:checked").val().length && (e = $("input:radio[name=tagCondition]:checked").val(), addTagConditionCookie = new i("v_tagcondition"), addTagConditionCookie.update(e)), f = $("#wikiSearchTagDiv").data("teamid"), dataVal = {
980                    keyword: d,
981                    teamId: f,
982                    tagIdList: c,
983                    tagCondition: e,
984                    page: b
985                }, a("/team.search.wiki", dataVal, !1, h, !1)
986            }), $(document).on("click", ".page-prev", function() {
987                var b = parseInt($.trim($(".wiki-pagination li.active a").text())) - 2,
988                    c = "",
989                    d = "",
990                    e = "OR",
991                    f = 0,
992                    g = !1;
993                parseInt($.trim($(".wiki-pagination li.active a").text())) && (liObj = $(".wiki-pagination li.active").removeClass("active").prev().addClass("active"), "page-prev" == liObj.prev().children().attr("class") && (g = !0, liObj.prev().children().removeClass("page-prev").addClass("page-prev-stop")), $(".page-next-stop").length && $(".page-next-stop").removeClass("page-next-stop").addClass("page-next")), $("input[name='tagIds']:checked").each(function() {
994                    c = c + (c ? ", " : "") + $(this).val()
995                }), $.trim($("#searchKeyword").val()).length && (d = $.trim($("#searchKeyword").val()), addKeywordCookie = new i("v_keyword"), addKeywordCookie.add(d)), $("input:radio[name=tagCondition]:checked").val().length && (e = $("input:radio[name=tagCondition]:checked").val(), addTagConditionCookie = new i("v_tagcondition"), addTagConditionCookie.update(e)), f = $("#wikiSearchTagDiv").data("teamid"), dataVal = {
996                    keyword: d,
997                    teamId: f,
998                    tagIdList: c,
999                    tagCondition: e,
1000                    page: b
1001                }, a("/team.search.wiki", dataVal, g, !1, !1)
1002            }), $(document).on("click", ".teamWikiSearchTagheading", function() {
1003                var a = new i("v_team_wiki_collapse");
1004                "true" == a.items()[0] ? a.update("false") : a.update("true"), $("#teamWikiSearchtagResultDiv .showarrow").toggle(), $("#teamWikiSearchtagResultDiv .hidearrow").toggle(), $("#teamWikiSearchtagResultDivContainer").slideToggle(500)
1005            }), $(document).on("click", ".inputClearLink", function() {
1006                $("#searchKeyword").val(""), $("#teamWikiSearchtagResultDiv").slideToggle(), $(".teamWikiSearchtaglistUL").hide(), $(".inputClearLink").addClass("inputClearLinkHide"), b()
1007            }), $(document).on("click", ".cookieResetFilter a", function() {
1008                $("#searchKeyword").val(""), $("#teamWikiSearchtagResultDiv").slideToggle(), $(".teamWikiSearchtaglistUL").hide(), $(".inputClearLink").addClass("inputClearLinkHide"), b()
1009            });
1010            var i = function(a) {
1011                var b = $.cookie(a),
1012                    c = b ? b.split(/~/) : new Array;
1013                return {
1014                    add: function(b) {
1015                        c.push(b), $.cookie(a, c.join("~"), {
1016                            path: "/"
1017                        })
1018                    },
1019                    remove: function(b) {
1020                        indx = c.indexOf(b), -1 != indx && c.splice(indx, 1), $.cookie(a, c.join("~"), {
1021                            path: "/"
1022                        })
1023                    },
1024                    clear: function() {
1025                        c = null, $.cookie(a, "", {
1026                            path: "/"
1027                        })
1028                    },
1029                    items: function() {
1030                        return c
1031                    },
1032                    update: function(b) {
1033                        $.cookie(a, b, {
1034                            path: "/"
1035                        })
1036                    }
1037                }
1038            };
1039            $(document).on("click", ".listtags", function() {
1040                var a = $(this).data("taggroup"),
1041                    b = ($(this).val(), $(this).data("tagtext")),
1042                    c = $(".cookieListSpan").text(),
1043                    d = new i(a),
1044                    e = "";
1045                1 == $(this).prop("checked") ? (d.add(b), c = c + (c ? ", " : "") + b, $(".cookieListSpan").text(c), $("#teamWikiSearchCookieTagList").show()) : 0 == $(this).prop("checked") && (d.remove(b), e = $(".cookieListSpan").text().split(","), e.length && (spanCookieIndx = e.indexOf(b), -1 != indx && e.splice(spanCookieIndx, 1), $(".cookieListSpan").text(e.join(","))))
1046            })
1047        }
1048    }
1049}), window.onload = function(a) {
1050    if ($(".iframeContent").length) {
1051        var b = $("iframe");
1052        b.each(function(a) {
1053            $(this).removeAttr("width").removeAttr("height").removeAttr("style")
1054        }), $(window).resize(function() {
1055            b.each(function() {
1056                var a = $(this).parent().width(),
1057                    b = document.body,
1058                    c = document.documentElement,
1059                    d = Math.max(b.scrollHeight, b.offsetHeight, c.clientHeight, c.scrollHeight, c.offsetHeight) + 100;
1060                $(this).attr("width", a), $(this).attr("height", d)
1061            })
1062        }).resize()
1063    }
1064}, $(document).ready(function() {
1065    function a() {
1066        var a = c.height(),
1067            d = c.scrollTop(),
1068            e = d + a;
1069        $.each(b, function() {
1070            var a = $(this),
1071                b = a.outerHeight(),
1072                c = a.offset().top;
1073            c + b >= d && e >= c && a.addClass("in-view")
1074        })
1075    }
1076    $("ul.tabs").tabs({
1077        onShow: function(a) {
1078					if(a[0] != undefined){
1079            var b = new Date;
1080            b.setTime(b.getTime() + 864e8), document.cookie = "selectedTab=" + a[0].id + "; expires=" + b.toGMTString() + "; path=/"
1081					}
1082        }
1083    }), $("ul.tabs").tabs("select_tab", getCookieCheck("selectedTab")), $(".widgets").sideNav({
1084        edge: "right",
1085        closeOnClick: !1,
1086        draggable: !1
1087    }), $(".main-navigatn").sideNav({
1088        edge: "right",
1089        closeOnClick: !1,
1090        draggable: !1
1091    }), $(".side-nav-left").sideNav({
1092        edge: "left",
1093        closeOnClick: !1,
1094        draggable: !1
1095    }), $(".widgetWrapper, .articleListWrapperLarge ").addClass("animation-element bounce-up"), $(".appTile ").append('<span class="circle-1"></span>');
1096    var b = $(".animation-element"),
1097        c = $(window);
1098    $(window).width() > 1200 ? (c.on("scroll resize", a), c.trigger("scroll")) : $(".animation-element").removeClass("bounce-up")
1099});
1100$(document).ready(function(){
1101	$('.updateLink').on('click',function(){ var linkHref = $(this).data('href'); window.location.href = linkHref;});	
1102	
1103	/* portal Agenda list - filter date*/
1104	$('.filter-date-btn').on('click', function(){
1105	   $('.filter-date').slideToggle();
1106	});
1107	
1108	$(document).on('click','.cookie-a',function(e){
1109		e.stopPropagation();
1110	});
1111	
1112	/* Enable notification*/
1113	//if($('html').attr('notifyme') == "true"){
1114		
1115	//}
1116	$( window ).load(function() {
1117		
1118		setInterval(function() {  
1119				if($('html').attr('notifyme') == "true" && $('html').attr('windowstatus') == 'main' && $('html').attr('istamePage') == "false" && !$('.chat-window').hasClass('active')){
1120				   portalNotification();	
1121				}		
1122			}, 5000);
1123		
1124	});
1125	/* chat window close*/
1126	
1127	$('.chat-window-close').on('click',function(){
1128		$('.chat-window').removeClass('active').hide();
1129		$( "#chat-iframe" ).attr('src','');	 
1130	});
1131	
1132	$('#NotificationNav .reply-button').on('click',function(){
1133		var _teamid = $(this).data('teamid');   
1134		var _fromuserid = $(this).data('fromuserid');   
1135		$( ".chat-window" ).show( "fast").addClass('active');
1136		if(_teamid){
1137			$( "#chat-iframe" ).attr('src','/portal.chat.popup/teamId/'+_teamid);
1138		} else if (_teamid == 0) {
1139			$( "#chat-iframe" ).attr('src','/portal.user.chat.popup/touserid/'+_fromuserid);
1140		}	
1141	});
1142	
1143	$('#comments .reply-button').on('click',function(){
1144		var _teamid = $(this).data('teamid');  
1145		var _commentauthor = $(this).data('commentauthor');  
1146		
1147		$( ".chat-window" ).show( "fast").addClass('active');
1148		if(_teamid){
1149			$( "#chat-iframe" ).attr('src','/portal.chat.popup/teamId/'+_teamid+'/commentauthor/'+_commentauthor);
1150		}	
1151	});
1152	
1153	
1154	$('.chatbtn').on('click',function(event){
1155		event.stopPropagation();
1156		var _userid = $(this).data('userid');   
1157		$( ".chat-window" ).show( "fast").addClass('active');
1158		$( "#chat-iframe" ).attr('src','/portal.user.chat.popup/touserid/'+_userid);
1159	});
1160	
1161		
1162});
1163function getNotificationCookie(cname) {
1164    var name = cname + "=",
1165        ca = document.cookie.split(';'),
1166        i,
1167        c,
1168        ca_length = ca.length;
1169    for (i = 0; i < ca_length; i += 1) {
1170        c = ca[i];
1171        while (c.charAt(0) === ' ') {
1172            c = c.substring(1);
1173        }
1174        if (c.indexOf(name) !== -1) {
1175            return c.substring(name.length, c.length);
1176        }
1177    }
1178    return "";
1179}
1180
1181function portalNotification(){	
1182	var notificationStartDate = $('html').attr('notification-date-start');
1183	var cookieNotificationList = getNotificationCookie('notificationMsgIdList');	
1184	var cookieNotificationPvtList = getNotificationCookie('notificationPvtMsgIdList');	
1185	if(!$.trim(cookieNotificationList).length){
1186		var notificationMsgIdList = [];		
1187	} 
1188	if(!$.trim(cookieNotificationPvtList).length){
1189		var notificationPvtMsgIdList = [];		
1190	} 
1191	if($.trim(cookieNotificationList).length) {	
1192		var notificationMsgIdList = cookieNotificationList.split(',');
1193		var intArr = [];
1194		for(i=0; i < notificationMsgIdList.length; i++){
1195		   intArr.push(parseInt(notificationMsgIdList[i]));	
1196		}  
1197	    notificationMsgIdList = intArr;	   
1198	}
1199	if($.trim(cookieNotificationPvtList).length) {	
1200		var notificationPvtMsgIdList = cookieNotificationPvtList.split(',');
1201		var intPvtMsgArr = [];
1202		for(i=0; i < notificationPvtMsgIdList.length; i++){
1203		   intPvtMsgArr.push(parseInt(notificationPvtMsgIdList[i]));	
1204		}  
1205	    notificationPvtMsgIdList = intPvtMsgArr;	   
1206	}
1207	
1208	$.ajax({
1209		url: '/portal.chat.message.ajax', 
1210		data: {                
1211			notifytimestamp: notificationStartDate
1212		},           
1213		dataType: "json",
1214		method: "POST",
1215		success: function(data) {
1216			   var msgIdListArray = [];
1217			   var pvtMsgIdListArray = [];
1218			   
1219			 $.each(data.responsebody.result, function() {
1220				$notificationItem = this;
1221				
1222				if(this.teamid){
1223					msgIdListArray.push(Number($.trim(this.messageid)));
1224				}
1225				if(this.teamid == 0){
1226					pvtMsgIdListArray.push(Number($.trim(this.id)));
1227				}
1228				if(this.teamid && notificationMsgIdList.indexOf(Number($.trim(this.messageid))) == -1){					
1229					notificationMsgIdList.push(Number($.trim(this.messageid)));
1230					notifyMe($notificationItem);
1231				}
1232				if(this.teamid == 0 && notificationPvtMsgIdList.indexOf(Number($.trim(this.id))) == -1){					
1233					notificationPvtMsgIdList.push(Number($.trim(this.id)));
1234					notifyMe($notificationItem);
1235				}	
1236			});	
1237		
1238			document.cookie = "notificationMsgIdList="+msgIdListArray.join(',');			
1239			
1240			document.cookie = "notificationPvtMsgIdList="+pvtMsgIdListArray.join(',');
1241			
1242			
1243		}
1244	})
1245}
1246
1247function notifyMe(obj) { 
1248  // Let's check if the browser supports notifications
1249   var theBody = obj.message;
1250   var theTitle = obj.shoutboxtitle;
1251   var theData = {
1252		teamid : obj.teamid,
1253		messageid : obj.messageid,
1254		fromuserid : obj.fromuserid
1255   }
1256  
1257  if (!("Notification" in window)) {
1258    console.log("This browser does not support desktop notification");
1259  }
1260
1261  // Let's check whether notification permissions have already been granted
1262  else if (Notification.permission === "granted") {
1263    // If it's okay let's create a notification
1264    //var notification = new Notification("Hi there!");
1265	
1266		spawnNotification(theBody, theTitle, theData);
1267  }
1268
1269  // Otherwise, we need to ask the user for permission
1270  else if (Notification.permission !== "denied") {
1271    Notification.requestPermission(function (permission) {
1272      // If the user accepts, let's create a notification
1273      if (permission === "granted") {
1274		spawnNotification(theBody, theTitle, theData);
1275      }
1276    });
1277  }
1278
1279  // At last, if the user has denied notifications, and you 
1280  // want to be respectful there is no need to bother them any more.
1281}
1282
1283function spawnNotification(theBody, theTitle, theData) {
1284var _icon = '/img/notification.png'	;
1285  var options = {
1286      body: theBody,
1287	  data: theData ,
1288	  icon : _icon
1289  }
1290  var n = new Notification(theTitle,options);
1291  // Save data to sessionStorage
1292  sessionStorage.setItem('notifyObj', n);
1293  n.onclick = function(event) {
1294	// url =  '/'+this.data.teamid+'/team/'; 
1295     $( ".chat-window" ).show( "fast").addClass('active');
1296	 if(this.data.teamid){
1297		$( "#chat-iframe" ).attr('src','/portal.chat.popup/teamId/'+this.data.teamid);	 
1298	 }else if(this.data.teamid == 0){
1299		$( "#chat-iframe" ).attr('src','/portal.user.chat.popup/touserid/'+this.data.fromuserid);	 
1300	 }
1301  };	
1302}
1303
1304$(function(){
1305	$(document).on('click','.datepicker-icon',function(){	
1306		var $input = $(this).parent().find('.datepicker').pickadate({
1307		selectMonths:!0,selectYears:200,format:"dd-mm-yyyy"
1308		});
1309
1310		var picker = $input.pickadate('picker');
1311		picker.open();
1312
1313		$(this).parent().find('.datepicker').addClass('active-picker');
1314
1315		picker.on('render', function(){
1316		var _date = this.get();	
1317		$('.active-picker').val(_date);
1318		});
1319
1320		picker.on('close', function(){
1321		   $('.active-picker').removeClass('active-picker');
1322		});
1323   });
1324   
1325   
1326	if($('#userchatbox').length || $('#chat-iframe').contents().find('#userchatbox').length) {
1327		var _url = $("#userchatbox").attr("data-ajax-link");
1328		_parentWindow = $("#userchatbox").attr("data-parentwindow");
1329		_isAdmin = $("#userchatbox").attr("data-isadmin");
1330		o = "";
1331		setInterval(function() {
1332			saveChatMessage();
1333		}, 3e3);
1334	}
1335
1336	function saveChatMessage() {
1337		var _datesent = $("#datesent").val();
1338		var _flag = "new";
1339		"" == _datesent && (_datesent = "na", _flag = "");
1340		var _msg = $("#usermsg").val();
1341		"" != _msg && (show_populate_user_msgs(_url, _msg, _datesent, _flag, _parentWindow, _isAdmin, ""), $("#usermsg").val(""))
1342		
1343	}
1344
1345	function show_populate_user_msgs(_url, _msg, _datetime, _flag, _parentWindow, _isAdmin, s) {
1346		 $.ajax({
1347			url: _url,
1348			data: {
1349				message: _msg,
1350				latesttimestamp: _datetime
1351			},
1352			dataType: "json",
1353			method: "POST",
1354			success: function(e) {
1355				if ($("#userchatbox").html(""),  e.responsebody.result.length > 0) {
1356					var t = "";
1357					$.each(e.responsebody.result, function() {
1358						if ($eventItem = this, isMeClass = "", $eventItem.isme && (isMeClass = "myself"), "home" == s ? (t += '<div class="message-wrapper" id="message-' + $eventItem.messageid + '">', t += '<div class="namesection ' + isMeClass + '">' + $eventItem.username + '<span>:</span></div> <div class="msgsection"> ' + $eventItem.message + "</div>", t += '<div class="timestamp" title="' + $eventItem.datesent + " " + $eventItem.timesent + '">', t += $eventItem.istoday ? $eventItem.timesent : $eventItem.datesent, t += "</div>", (t += '<div class="deletesection"><div class="delete-wrapper"><a href="javascript:void(0)"><img src="/img/delete.x.gif" class="activemsgdelete" data-shoutboxmsgid="' + $eventItem.messageid + '"></a></div></div>'), t += "</div>") : (t += '<div class="message-wrapper" id="message-' + $eventItem.messageid + '">', t += '<div class="namesection">' + $eventItem.username + '<span>:</span></div> <div class="msgsection"> ' + $eventItem.message + "</div>", t += '<div class="archivetimestamp">' + $eventItem.datesent + " " + $eventItem.timesent, t += "</div></div>"), "" == $("#datesent").val() || $eventItem.timestamp != $("#datesent").val()) {
1359						
1360						if($('html').attr('notifyme') == "true" && $('html').attr('windowstatus') == 'main' && n == "new" && !$('.chat-window').hasClass('active')){
1361							 notifyMe($eventItem);
1362						}
1363													
1364							"new" == _flag ? $("#userchatbox").append(t) : ($("#userchatbox").html(t));
1365							/*, e.each(function() {
1366								$(this).val(t);
1367							}), a.each(function() {
1368								$(this).val($(this).val() + $eventItem.messageid + ",")
1369							}))*/
1370						} 
1371						$("#datesent").val($eventItem.timestamp)
1372					});
1373					var d = document.getElementById("userchatbox");					
1374					 $("#userchatbox").animate({
1375                        scrollTop: d.scrollHeight
1376                    }, 1e3)
1377					
1378				}
1379			}
1380		});
1381	}
1382   
1383    /* stickynote*/
1384	$('.usernotes').on('click',function(){
1385	   $('html').addClass('modal-stickynote');
1386	});
1387	
1388	var cookieList = function(cookieName) {
1389	var cookie = $.cookie(cookieName);
1390	var items = cookie ? cookie.split(/~/) : new Array();
1391	return {
1392		"add": function(val) {
1393			//Add to the items.
1394			items.push(val);
1395			//Save the items to a cookie.			
1396			$.cookie(cookieName, items.join('~'), { path: '/' });
1397		},
1398		"remove": function (val) { 		   
1399			indx = items.indexOf(val); 
1400			if(indx!=-1) items.splice(indx, 1); 
1401			$.cookie(cookieName, items.join('~'), { path: '/' });        },
1402		"clear": function() {
1403			items = null;
1404			//clear the cookie.
1405			$.cookie(cookieName, '', { path: '/' });
1406		},
1407		"items": function() {
1408			//Get all the items.
1409			return items;
1410		},
1411		"update" : function(val){
1412		 // update value
1413		 $.cookie(cookieName, val, { path: '/' });
1414		}
1415	  }
1416	}
1417	
1418	$('button[name="search-all"]').on('click',function(){
1419		var theCookies = document.cookie.split(';');
1420		theCookies.push('v_keyword');
1421		for (var i = 1 ; i <= theCookies.length; i++) {
1422			 
1423		   if(theCookies[i-1].indexOf('v_tag') == 1 || theCookies[i-1] == 'v_keyword'){	
1424				_cookiename = 	$.trim(theCookies[i-1]).split('=')[0];
1425			    clearCookie = new cookieList(_cookiename);		   
1426				clearCookie.clear();			
1427		   }
1428		}		
1429	});
1430	
1431	
1432	 $('.wikishowall').on('click',function(){
1433		$('#taskreminderfilter').prop('checked',false);	
1434	   $('form#wikishowallform').submit();
1435	 }); 
1436	 $('.wikipriority').on('click',function(){
1437		$('#taskreminderfilter').prop('checked',true); 
1438	   $('form#wikiPriorityform').submit();
1439	 }); 
1440	  $('.wikimylist').on('click',function(){
1441		$('#taskreminderfilter').prop('checked',false);  
1442	   $('form#wikiMylistform').submit();
1443	 }); 
1444	$('.reviewlink').on('click',function(){
1445		 _commentid = $(this).data('id');
1446		$.ajax('/team.wiki.review.update.ajax/commentid/' + _commentid, {
1447		  success: function(data) {
1448			if($('[data-id="'+_commentid+'"]').hasClass('checked')){
1449				$('[data-id="'+_commentid+'"]').removeClass('checked').addClass('unchecked');
1450			}else{
1451				$('[data-id="'+_commentid+'"]').removeClass('unchecked').addClass('checked');
1452			}	
1453		  },
1454		  error: function() {
1455			console.log("error");
1456		  }
1457		});
1458	});
1459	
1460	/*News link - check URL*/
1461	$('#link').on('blur',function(){
1462	var linkVal = $(this).val();	
1463	var string = linkVal;
1464      if (!~string.indexOf("http")) {
1465        string = "http://" + string;
1466      }
1467      linkVal = string;
1468      $('#link').val(linkVal);
1469	});
1470	
1471	$('.bloglink').on('click',function(){
1472		$('.bloglinktr').toggle();
1473	});
1474	
1475	
1476	/*wiki collection
1477	if($('.fullwidth').length){
1478		$('.fullwidth').parent().addClass('full-width-div');
1479		$('.fullwidth').parent().parent().children().each(function(){
1480		  if(!$(this).hasClass('full-width-div')){
1481				$(this).remove();
1482			}
1483
1484		})
1485	}*/
1486	
1487	$(".wikiCollectionlink").click(function() {
1488		wikiId = $(this).data("id");
1489		_teamid = $(this).attr("data-teamId");
1490		_url = "/portal.wikidetails.ajax.get/wikiid/" + wikiId + "/teamid/" + _teamid;
1491		_selectedImg = 	 $(this).find('.appTileImg img').attr('src');
1492		_selectedTile = 	 $(this).find('.appTileTitle').text();
1493		
1494		
1495         $.ajax({
1496            url: _url,
1497            async: !1,
1498            success: function(a) {
1499                if (a.responsebody.result.length > 0) {
1500					wikilist = a.responsebody.result;
1501					$(".wiki-collection-page-list").html('');
1502                     $(".wiki-collection-page-list").append('<ul class="wkpg' + wikiId + '"></ul>');
1503                    var b = $(".wkpg" + wikiId);
1504					var _date = new Date();
1505					_month = parseInt(_date.getMonth())+1;
1506					_day = _date.getDate();
1507					_year = _date.getFullYear();
1508                    $.each(wikilist, function() {
1509						var addOrRemove = '';
1510						var _wikispacer = 'spacer';
1511						var addOrRemoveVisibility = 'visibility:hidden';
1512						if( this.haschildren == 1){
1513							 addOrRemove = 'add';
1514							 _wikispacer = '';
1515							 addOrRemoveVisibility = '';
1516						}
1517                        $wikiItem = this, b.append('<li id="sbpg' + $wikiItem.pageid + '" class="main-wiki-page clear wiki-wiDes"><a href="javascript:void(0)" class="wiki-plus-icon '+_wikispacer+'"><span class="wikiCollectionlink main-wiki-page-exp" onClick="wikiCollectionSubpageMore(this);" data-pageid="' + $wikiItem.pageid + '" data-wikiid="' + wikiId + '" data-teamid="' + _teamid + '" ><i class="material-icons" style="'+addOrRemoveVisibility+'">'+addOrRemove+'</i></span></a><div class="collection-wiki-page-name"><a href="/' + $wikiItem.teamid + "/wiki/" + wikiId + "/" + $wikiItem.pageid + "/" + $wikiItem.pagetitle + '" id="sbpagewikilinkid' + $wikiItem.pageid + '" class="sbpageswiki' + wikiId + '">' + $wikiItem.title + "</a></div></li>")
1518                    })
1519                }
1520            }
1521        })
1522    })
1523		});
1524
1525	$(".sticky-item").on('click', function(e){
1526		$("#note-desc-" + $("#sticky-collection").data("id")).hide();
1527		$("#note-title-" + $("#sticky-collection").data("id")).show();
1528		
1529		$("#sticky-collection").data("id",$(this).data("noteid"));
1530		
1531		$("#note-title-" + $(this).data("noteid")).hide();
1532		$("#note-desc-" + $(this).data("noteid")).show();
1533	});
1534	
1535	$(document).ready(function(){
1536		if($('.widgetheaderlinks').length){
1537			$('.widgetheaderlinks').each(function(){
1538				_url = $(this).data('url');
1539				_name = $(this).data('name');
1540				_class = $(this).data('class');
1541				$(this).parent().parent().find('.widgetHeader .Cmn-HeadingSmall').append('<a class="right widgetrightlink '+_class+'" href="'+_url+'">'+_name+'</a>')
1542			})
1543		}	
1544
1545		$("iframe#gallery-iframe").load(function(){
1546		   var gallerURL = $(this).attr('src');
1547			$(this).contents().find('.gallery').on("click", function(e){
1548				 e.preventDefault();
1549				e.stopPropagation();
1550				window.open(gallerURL);
1551			});
1552		});	
1553		
1554		$(".deleteGeneralItem").click(function(t) {
1555		  _res = confirm($(this).data('message'));
1556		  if(_res == true){
1557			  window.location.href = $(this).attr("href");
1558		  } else {
1559			  return false;
1560		  }
1561		});
1562		
1563		/*task wiki*/
1564		if($('.taskfilter-form-div').length){
1565			$('.taskfilter-form-div').prependTo($('#y2').children().last());
1566			$('.taskfilter-form-div').removeClass('hide');	
1567		}
1568		$('#taskWikiFilterClearBtn').on('click',function(e){
1569			e.preventDefault();
1570			$('#datefrom').val('');
1571			$('#dateto').val('');
1572			$('#taskshortname').val('');
1573			$('#tasktitle').val('');
1574			$('#taskowner').val('');
1575			$('#extra').val('');
1576			$('#taskreminderfilter').prop('checked',false);
1577			$('#allstatus').prop('checked',true);
1578			$('#desctype').prop('checked',true);
1579			$('select[name="taskorderby"] option:nth-child(1)').attr('selected', 'selected');
1580			  $('select[name="taskorderby"]').material_select();
1581			$('form[name="taskWikiFilterForm"]').submit();
1582		});
1583		$('.iframe').on('click',function(){
1584		  if($('.preloader-background').length){
1585				$('.preloader-background').remove();
1586			}
1587			_loader = '<div class="preloader-background"><div class="preloader-wrapper big active"><div class="spinner-layer spinner-blue-only"><div class="circle-clipper left"><div class="circle"></div>		  </div> <div class="gap-patch"><div class="circle"></div></div> <div class="circle-clipper right"><div class="circle"></div> </div></div></div>';
1588		
1589		  $('#modal1').append(_loader);
1590		});
1591		$('.taskopentaglist .chip').on('click',function(e){
1592			var tagid = $(this).data('id');	
1593			var wikiid = $(this).data('wikiid');			
1594			var onlyshowassignedtasks = $(this).data('onlyshowassignedtasks');
1595			var datelimit = $(this).data('datelimit');
1596			if($(this).hasClass('active')){
1597				$('div[id^="priorityWikiList-"] #wikinav').slideDown();
1598				$('.taskopentaglist .chip').removeClass('active');
1599				$(".opentaskList").slideUp();	
1600			}else{
1601				$('div[id^="priorityWikiList-"] #wikinav').slideUp();
1602				$('.taskopentaglist .chip').removeClass('active');	
1603				$(this).addClass('active');	
1604				if($('div[id^="priorityWikiList-"] #wikinav').css('display') != 'none'){
1605					 $("html, body").animate({ scrollTop: 0 }, "slow");
1606				}
1607				$.ajax({
1608					url: '/team.wiki.page.listbytag.ajax/tagid/'+tagid+'/wikiid/'+wikiid+'/onlyshowassignedtasks/'+onlyshowassignedtasks+'/datelimit/'+datelimit,
1609					dataType: "json",
1610					method: "get",
1611					success: function(a) {
1612						$(".opentaskList").html(a.responsebody.html);
1613						$(".opentaskList").slideDown();	
1614					}
1615				})
1616			}
1617			
1618			
1619			
1620			
1621		});	
1622		
1623		
1624		 $(document).on('click',"#selectallwiki", function(){
1625			$('input[name="notificationwikicheckbox"]:checkbox').not(this).prop('checked', this.checked);
1626			if($(this).prop("checked") == true){
1627				 $('.mail-icons').show();
1628			}else{
1629				$('.mail-icons').hide();
1630			}
1631		  });
1632		  
1633		  $(document).on('change','input[name="notificationwikicheckbox"]',function(){
1634			var read = false;
1635			$('input[name="notificationwikicheckbox"]').each(function(){
1636				if($(this).prop("checked") == true){
1637					 read = true;
1638				}
1639
1640			});
1641			if(read == true){
1642				$('.mail-icons').show();
1643			}else{
1644				$('.mail-icons').hide();
1645			}
1646		 });
1647		 
1648		 $(document).on('click','.read-all-wiki-notification',function(){
1649			var _valArray = [];
1650			var _valList = '';
1651			$('input[name="notificationwikicheckbox"]').each(function(){
1652				if($(this).prop("checked") == true){
1653					_valArray.push($(this).val());
1654				}
1655
1656			});
1657			_valList = _valArray.toString();
1658			
1659			$.ajax({
1660				url: "/team.wiki.page.read",
1661				async: !0,
1662				method: "POST",
1663				data: {
1664					wikiidlist: _valList
1665				},
1666				success: function(data) {
1667					setTimeout(function(){
1668						location.href= location.href;					
1669					},500);
1670					
1671				}
1672			});
1673
1674		});
1675		
1676		$(document).on('click','.unread-all-wiki-notification',function(){
1677			var _valArray = [];
1678			var _valList = '';
1679			$('input[name="notificationwikicheckbox"]').each(function(){
1680				if($(this).prop("checked") == true){
1681					_valArray.push($(this).val());
1682				}
1683
1684			});
1685			_valList = _valArray.toString();
1686			
1687			$.ajax({
1688				url: "/team.wiki.page.unread",
1689				async: !0,
1690				method: "POST",
1691				data: {
1692					wikiidlist: _valList
1693				},
1694				success: function(data) {
1695					setTimeout(function(){
1696						location.href= location.href;					
1697					},500);
1698					
1699				}
1700			});
1701
1702		});
1703		
1704		$('.main-catalog-wiki a i').on('click',function(){
1705			  var _boekid = $(this).data('wikiid');  
1706			  $(this).text( $(this).text() == 'add' ? 'remove' : 'add');
1707			  if($(this).text() == 'add'){
1708				$('.catalog-wiki-li-'+_boekid).hide();
1709			  } else{
1710				$('.catalog-wiki-li-'+_boekid).show();
1711			   } 
1712		});
1713		
1714		if($('#teamWikiCatalogView').length){
1715			var _pagetitle = location.pathname.split('/');
1716			if(_pagetitle.length == 4){
1717				_pagetitle = _pagetitle[3];
1718			   var _wikiid =  $('li[data-catalogsub="'+_pagetitle+'"]').data('wikiid');
1719			   $('.main-catalog-wiki i[data-wikiid="'+_wikiid+'"]').trigger('click');
1720			}
1721		}
1722		
1723		$('.loadmorearticle').on('click',function(){
1724			var _link = $(this).data('href');
1725			var _page = $(this).attr('data-page');
1726			 var _widget = $(this).attr('data-widgetid');
1727			var _view = $(this).attr('data-view');
1728
1729			$(this).attr('data-page',parseInt(_page)+1);
1730			$(this).addClass('isDisabled');
1731			var _this = this;
1732			$.ajax({
1733				type: "GET",
1734				url: _link+'/'+_page,
1735				dataType: "JSON",
1736				cache: !1,
1737				beforeSend: function() {},
1738				success: function(data) {
1739					if(_view == 'Small'){
1740						$('#portalArticleListBlock-'+_widget+' .articleListWrapper'+_view+' ul').append(data.responsebody);   
1741					}else{
1742						$('#portalArticleListBlock-'+_widget+' .articleListWrapper'+_view
1742).append(data.responsebody);   
1743					}			
1744					$(_this).removeClass('isDisabled');
1745				},
1746				error: function() {
1747					console.log("error")
1748				}
1749			})
1750
1751		});
1752
1753
1754		/*solr search*/
1755		
1756		
1757		  $(document).on('click','#re-index-db',function(){
1758			
1759			
1760			 $.ajax({
1761				  type: "GET",
1762				  url: "/portal.solr.advanced.reindex",         
1763				
1764				  beforeSend: function() {},
1765				  success: function(a) {
1766					 
1767					  const date = new Date();
1768					  const [month, day, year]       = [date.getMonth()+1, date.getDate(), date.getFullYear()];
1769					  const [hour, minutes, seconds] = [date.getHours(), date.getMinutes(), date.getSeconds()];
1770					  $('.last-indexed').html(day +'-'+ month+ '-'+ year+ ' '+ hour+ ':'+ minutes );
1771				  },
1772				  error: function() {
1773					  console.log("error")
1774				  }
1775			  });  
1776			
1777			
1778		  });
1779		  
1780		  $('#solrsearchBar button').on('click',function(){
1781			  var _keyword = $('#solrsearchBar #keyword').val().toLowerCase();
1782			  var fieldArray = [];
1783			  var typeArray = [];
1784			  var fieldMethod = '';
1785			  var tagIdsArray = [];
1786			  var searchBy = $('select[name="searchType"]').val();
1787			  $('.filter-list').hide();
1788			  $( ".advance-filter .filter-list-li.active" ).each(function(){          
1789				  if($(this).attr('data-name') == 'type'){
1790					  typeArray.push($(this).attr('data-val'));
1791				  }        
1792			  });
1793			  
1794			  $('#searchResult .result').html('<div class="preloaderdiv center"><div class="preloader-wrapper small active"><div class="spinner-layer spinner-green-only"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div></div>');
1795			   $('div#searchResult').show();
1796			  $( "input:checked" ).each(function(){
1797					  if($(this).attr('data-name') == 'searchby'){
1798						  searchBy = true;
1799						
1800					  }
1801					  if($(this).attr('data-name') == 'tagcondition'){                  
1802						fieldmethod = $(this).val();
1803					  }
1804					  if($(this).attr('data-name') == 'tagids'){                  
1805						  tagIdsArray.push($(this).val());
1806					  }
1807					  
1808			  
1809			  });
1810			  
1811			  $.ajax({
1812				  type: "POST",
1813				  url: "/portal.solr.advanced.searchlist",
1814				  data: {
1815						  "keyword":_keyword,
1816						  "fieldList": fieldArray.toString(),
1817						   "typeList": typeArray.toString(),
1818						   "tagIds": tagIdsArray.toString(),
1819						   "fieldmethod": fieldmethod,
1820						   "searchBy":searchBy,
1821						   "start":1
1822					  },
1823				  cache: !1,
1824				  beforeSend: function() {},
1825				  success: function(a) {
1826					 
1827					  var _res = a.responsebody;
1828					  $('#searchResult .result').attr('data-start',1);
1829					  $('#searchResult .result').html(_res);
1830					  $('div#searchResult').show();
1831				  },
1832				  error: function() {
1833					  console.log("error")
1834				  }
1835			  });  
1836		  });  
1837		  
1838		  
1839		  $(document).on('click','#solrloadMore',function(){
1840			  var _keyword = $('#solrsearchBar #keyword').val().toLowerCase();
1841			  var fieldArray = [];
1842			  var typeArray = $(this).attr('data-type');
1843			  var fieldMethod = '';
1844			  var tagIdsArray = [];
1845			  var searchBy = $('select[name="searchType"]').val();
1846			  $('.filter-list').hide();
1847			 
1848			  var currentPage = $(this).attr('data-page'); // Track the current page
1849			  
1850			 // $('#searchResult .result').html('<div class="preloaderdiv center"><div class="preloader-wrapper small active"><div class="spinner-layer spinner-green-only"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div></div>');
1851			   //$('div#searchResult').show();
1852			  $( "input:checked" ).each(function(){
1853					  if($(this).attr('data-name') == 'searchby'){
1854						  searchBy = true;
1855						
1856					  }
1857					  if($(this).attr('data-name') == 'tagcondition'){                  
1858						fieldmethod = $(this).val();
1859					  }
1860					  if($(this).attr('data-name') == 'tagids'){                  
1861						  tagIdsArray.push($(this).val());
1862					  }
1863					  
1864			  
1865			  });
1866			 
1867			  currentPage++;
1868			  $(this).attr('data-page',currentPage)
1869			  $.ajax({
1870				  type: "POST",
1871				  url: "/portal.solr.advanced.searchlist.loadmore",
1872				  data: {
1873						  "keyword":_keyword,
1874						  "fieldList": fieldArray.toString(),
1875						   "typeList": typeArray,
1876						   "tagIds": tagIdsArray.toString(),
1877						   "fieldmethod": fieldmethod,
1878						   "searchBy":searchBy,
1879						   "page":currentPage
1880					  },
1881				  cache: !1,
1882				  beforeSend: function() {},
1883				  success: function(a) {
1884					 
1885					  var _res = a.responsebody;
1886					  
1887					  $('#searchResult .result').attr('data-start',1);
1888					  $('#solrSearchList').append(_res);
1889					  $('div#searchResult').show();
1890					  if(a.responsemessages < 50){
1891						  $('#solrloadMore').hide();
1892					  }else{
1893						  $('#solrloadMore').show();
1894					  }
1895				  },
1896				  error: function() {
1897					  console.log("error")
1898				  }
1899			  });  
1900		  });  
1901		  
1902		  
1903		  
1904		  $('.clear-btn').on('click',function(){
1905			 $('input[name="tagIds"]').removeAttr('checked');  
1906			 $('#solrsearchBar #keyword').val('');
1907			 $('div#searchResult').hide();
1908			
1909		  });
1910		  
1911		  $('.filter-btn').on('click',function(){
1912			$('.filter-list').slideToggle();
1913
1914		  });
1915		  
1916		  $('.filter-btn-advance').on('click',function(){
1917			$('.advance-filter-div').slideToggle();
1918
1919		  });
1920		  
1921		  $( window ).resize(function() {
1922			 if($( window ).width() < 1200){
1923				 if($('.solr-search-filter-ul.advance-filter-ul').length){
1924					 $('.solr-search-filter-ul.advance-filter-ul').addClass('small-dropdown');
1925				 }
1926			 }else {
1927				 if($('.solr-search-filter-ul.advance-filter-ul').length){	
1928					$('.advance-filter-div').prependTo('#y2 .col-lg-3:nth-child(3)').show();
1929				 }	
1930				 $('.advance-filter-div').css('margin-bottom','20px');
1931			 }
1932			});
1933			if($( window ).width() < 1200){
1934				 if($('.solr-search-filter-ul.advance-filter-ul').length){
1935					 $('.solr-search-filter-ul.advance-filter-ul').addClass('small-dropdown');
1936					 $('.advance-filter-div').slideToggle();
1937				 }
1938				 
1939			 }else {
1940				 if($('.solr-search-filter-ul.advance-filter-ul').length){	
1941					$('.advance-filter-div').prependTo('#y2 .col-lg-3:nth-child(3)').show();
1942				 }	
1943				 $('.advance-filter-div').css('margin-bottom','20px');
1944			 }
1945
1946			 $("#solrsearchBar form").submit(function() { return false; });	
1947			$("#solrsearchBar input#keyword").keypress(function(e){
1948			 
1949				var key = e.which;
1950
1951				if(key == 13)  
1952				{
1953					   $("#solrsearchBar button").trigger('click');
1954				}
1955			});
1956			
1957		  $(document).on('click','.advance-filter li.filter-list-li',function(){
1958			  $('.advance-filter li').removeClass('active');
1959			   $(this).addClass('active');
1960			   $('#solrsearchBar button').trigger('click');
1961		  });
1962		  
1963		 /* $(document).on('click','.advance-filter-ul li.filter-list-li',function(){
1964			 
1965			   $('#solrsearchBar button').trigger('click');
1966		  });*/
1967		  
1968		  $('#solrsearchBar .taggrouphead').on('click',function(){
1969			 _childClass = $(this).data('group');			
1970			  $('.tag-'+_childClass).toggle();
1971			});	
1972			
1973		   $('.solr-search-filter-ul .taggrouphead').on('click',function(){
1974			 _childClass = $(this).data('group');			
1975			 // $('.tag-'+_childClass).toggle();
1976			});		
1977		  
1978		  $(document).on('click','.suggestions a',function(){
1979
1980			var _serachText = $.trim($(this).text());
1981			$('#solrsearchBar #keyword').val(_serachText);
1982			 $('#solrsearchBar button').trigger('click');
1983		})
1984  
1985
1986         if($('.login-auth-screen #googlecode').length){
1987            $('.login-auth-screen #googlecode').focus();
1988            $('label[for="googlecode"]').addClass('active');
1989         }   
1990    	
1991			
1992	});
1993	
1994	
1995
1996    function widgetfilterContacts(alpha,_this){
1997       
1998        if(alpha == 'All'){
1999            $('.all_apha').removeClass('hide');
2000            $('#alphabet-filter-list .filter-btn').removeClass('active');
2001            $(_this).addClass('active');
2002        }else{
2003            $('.all_apha').addClass('hide');
2004            $('.'+alpha+'_alpha').removeClass('hide');
2005            $('#alphabet-filter-list .filter-btn').removeClass('active');
2006            $(_this).addClass('active');
2007        }    
2008    }
2009	

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.