var allowPanelResize = true; var panelLock = false; /* * Superfish v1.4.8 - jQuery menu widget * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt */ ; (function($) { $.fn.superfish = function(op) { var sf = $.fn.superfish, c = sf.c, $arrow = $([' »'].join('')), over = function() { var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function() { var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer = setTimeout(function() { o.retainPath = ($.inArray($$[0], o.$path) > -1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.', o.hoverClass].join('')).length < 1) { over.call(o.$path); } }, o.delay); }, getMenu = function($menu) { var menu = $menu.parents(['ul.', c.menuClass, ':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a) { $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({}, sf.defaults, op); o.$path = $('li.' + o.pathClass, this).slice(0, o.pathLevels).each(function() { $(this).addClass([o.hoverClass, c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)', this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over, out).each(function() { if (o.autoArrows) addArrow($('>a:first-child', this)); }) .not('.' + c.bcClass) .hideSuperfishUl(); var $a = $('a', this); $a.each(function(i) { var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function() { over.call($li); }).blur(function() { out.call($li); }); }); o.onInit.call(this); }).each(function() { var menuClasses = [c.menuClass]; if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf = $.fn.superfish; sf.o = []; sf.op = {}; sf.IE7fix = function() { var o = sf.op; if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity != undefined) this.toggleClass(sf.c.shadowClass + '-off'); }; sf.c = { bcClass: 'sf-breadcrumb', menuClass: 'sf-js-enabled', anchorClass: 'sf-with-ul', arrowClass: 'sf-sub-indicator', shadowClass: 'sf-shadow' }; sf.defaults = { hoverClass: 'sfHover', pathClass: 'overideThisToUse', pathLevels: 1, delay: 800, animation: { opacity: 'show' }, speed: 'normal', autoArrows: true, dropShadows: true, disableHI: false, // true disables hoverIntent detection onInit: function() { }, // callback functions onBeforeShow: function() { }, onShow: function() { }, onHide: function() { } }; $.fn.extend({ hideSuperfishUl: function() { var o = sf.op, not = (o.retainPath === true) ? o.$path : ''; o.retainPath = false; var $ul = $(['li.', o.hoverClass].join(''), this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility', 'hidden'); o.onHide.call($ul); return this; }, showSuperfishUl: function() { var o = sf.op, sh = sf.c.shadowClass + '-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility', 'visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation, o.speed, function() { sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; } }); })(jQuery); /** * hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ * * * @param f onMouseOver function || An object with configuration options * @param g onMouseOut function || Nothing (use configuration options object) * @author Brian Cherne */ (function($) { $.fn.hoverIntent = function(f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function(ev) { cX = ev.pageX; cY = ev.pageY; }; var compare = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]); } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } }; var delay = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]); }; var handleHover = function(e) { var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while (p && p != this) { try { p = p.parentNode; } catch (e) { p = this; } } if (p == this) { return false; } var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } if (e.type == "mouseover") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } } else { $(ob).unbind("mousemove", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function() { delay(ev, ob); }, cfg.timeout); } } }; return this.mouseover(handleHover).mouseout(handleHover); }; })(jQuery); function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } //function setCookie(cookieName, cookieValue, nDays) { // var today = new Date(); // var expire = new Date(); // if (nDays == null || nDays == 0) nDays = 1; // expire.setTime(today.getTime() + 3600000 * 24 * nDays); // document.cookie = cookieName + "=" + escape(cookieValue) // + ";expires=" + expire.toGMTString(); //} function setCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; document.cookie = name + "=" + value + expires + "; path=/"; } function eraseCookie(name) { createCookie(name, "", -1); } function SetUniqueRadioButton(nameregex, current) { re = new RegExp(nameregex); for (i = 0; i < document.forms[0].elements.length; i++) { elm = document.forms[0].elements[i] if (elm.type == 'radio') { if (re.test(elm.name)) { elm.checked = false; } } } current.checked = true; } function initToolTips() { //if this breaks things which if it does I will not be happen change it // back to .size() if ($("#tooltip1").length == 0) { $("body").prepend("
"); } // select all desired input fields and attach tooltips to them $(".tooltipMe").tooltip({ // place tooltip on the right edge position: "center right", // a little tweaking of the position offset: [0, 10], // use the built-in fadeIn/fadeOut effect effect: "fade", delay: 150, predelay: 10, tip: "#tooltip1", onBeforeShow: function() { $("#tooltip1").html(this.getTrigger().next().children().clone()); } //WHEN WE WANT AJAX DO THIS: onBeforeShow: function() { genAjaxLoad($("#tooltip1"), this.getTrigger().attr("href"), $("#tooltip1")); } }); $(".topPageAdminToolTip").tooltip({ // place tooltip on the right edge position: "bottom left", // a little tweaking of the position offset: [7, 8], // use the built-in fadeIn/fadeOut effect effect: "fade", delay: 150, predelay: 10, tip: "#tooltip1", tipClass: "topPageAdminToolTip", onBeforeShow: function() { $("#tooltip1").addClass("topPageAdminToolTip"); $("#tooltip1").removeClass("tooltip1"); $("#tooltip1").html(this.getTrigger().next().children().clone()); } }); } function getURL(part) { var completeURL = window.location.href; var URl = completeURL.split("?"); return URl[part]; } function friendlyClick(parentEl) { window.location = $(parentEl).find('a:eq(0)').attr('href'); } function quickAlert(el, alertText, type, keepMsgVisible) { //type 2 = el is an ID if (type) { if (type == 2) { if ($("#" + el).length > 0) { el = $("#" + el); } } } else { } var curText = $(el).next(".quickAlert").text(); if (curText) { $(el).next().fadeTo(500, 0).animate({ opacity: 0 }, 500, null, function() { $(el).next().text(alertText); }); } else { var statusEl = "" + alertText + ""; $(el).after(statusEl); } if (keepMsgVisible) $(el).next().fadeTo("slow", 1).animate({ opacity: 1.0 }, 1000); else $(el).next().fadeTo("slow", 1).animate({ opacity: 1.0 }, 1000).fadeTo("slow", 0); } function verifyActiveSel(max, current, container, group, highlight) { //max=num, current=element, container=element, group=bool, highlight=bool var count = $("#" + container + " input:checked").length; if (count > max) { if (group) alert('Select only ' + max + ' per group please!') else alert('Only ' + max + ' drivers can be active at once!') current.checked = false; } else setCount(count, '', "#numSelected", max); if (highlight) { highlightCheckedRows(current); } } function highlightCheckedRows(current) { if (current) { if (current.checked) { $(current).parent().parent().addClass("selectedRow"); $(current).parent().parent().removeClass("deSelectedRow"); } else { $(current).parent().parent().addClass("deSelectedRow"); $(current).parent().parent().removeClass("selectedRow"); } } else { $("td input[type=checkbox]").each(function() { if (this.checked) $(this).parent().parent().addClass("selectedRow"); else $(this).parent().parent().addClass("deSelectedRow"); }); } } function setCount(num, elements, placement, max) { //sets a number of items given a known number, or counts the elements and then sets the number if (num) { $(placement).text((num) + " of " + max); } else { num = $(elements).length; $(placement).text((num) + " of " + max); } //alert("num: " + num + " max: " + max); if (num < max) { $(placement).parent().css("color", "red"); } else { $(placement).parent().css("color", "#D5D5D5"); } } function zeroPad(num, count) { var numZeropad = num + ''; while (numZeropad.length < count) { numZeropad = "0" + numZeropad; } return numZeropad; } function initCounter(cYear, cMonth, cDay, cHours, cMinutes) { //cYear = 2010; cMonth = 7; cDay = 12; cHours = 11; cMinutes = 17; var austDay = new Date(); austDay = new Date(cYear, cMonth - 1, cDay, cHours, cMinutes, 0, 0); $('#counterWrap').countdown({ until: austDay, serverSync: getServerTime, format: 'DHMS', layout: '{d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}', onTick: alertLast60, onExpiry: function() { setTimeout("location.reload()", 100); } }); } function alertLast60(periods) { if ($.countdown.periodsToSeconds(periods) == 60) { alert("You have less than 60 seconds, please make your final picks!"); $(this).css("color", "red"); } } function getServerTime() { var time = null; $.ajax({ url: 'https://www.sprintsource.com/ui/serverTime.aspx', cache: false, async: false, dataType: 'text', success: function (text) { time = new Date(text); $(".subContent").append("" + time + ""); }, error: function (http, message, exc) { time = new Date(); $(".subContent").append("" + time + ""); } }); return time; } function addJavascript(jsname, pos, callback) { var th = document.getElementsByTagName(pos)[0]; var s = document.createElement('script'); if (callback) { if (s.readyState) { //IE s.onreadystatechange = function() { if (s.readyState == "loaded" || s.readyState == "complete") { s.onreadystatechange = null; callback(); } }; } else { //Others s.onload = function() { callback(); }; } } s.setAttribute('type', 'text/javascript'); s.setAttribute('src', jsname); th.appendChild(s); } function hideAdmin(prompt, retUrl) { if (retUrl) { aniWindow(); //parent.location = retUrl; //parent.location = '/admin/cr/ui/redir.aspx?r=' + encodeURIComponent(retUrl); parent.location = '/ui/redir.aspx?r=' + encodeURIComponent(retUrl); } else { if (prompt == "1") { var closeWindow = confirm("Changes that have not been submitted will be lost. Is this ok?"); if (closeWindow) { aniWindow(); //window.location.reload(); //window.location = '/admin/cr/ui/redir.aspx?r=' + encodeURIComponent(parent.location); window.location = '/ui/redir.aspx?r=' + encodeURIComponent(parent.location); } } else { aniWindow(); $("#mrpOverlay").hide(); $("html, body").css("overflow", "auto").css("height", "auto"); //window.location.reload(); //window.location = '/admin/cr/ui/redir.aspx?r=' + encodeURIComponent(parent.location); window.location = '/ui/redir.aspx?r=' + encodeURIComponent(parent.location); } } } //---------------------------------------------------------------------------- //BOTTOM POPUP //---------------------------------------------------------------------------- function openPanel(id) { if ($("#claimProfile").is(":visible") && id == "nscaContact") closePanel("claimProfile"); if ($("#nscaContact").is(":visible") && id == "claimProfile") closePanel("nscaContact"); var $pnl = $("#" + id); var pHeight = $pnl.height() + 60; $pnl.css("visible", "false"); $pnl.show(); $pnl.css("bottom", "-" + pHeight + "px"); $pnl.animate({ bottom: 0 }, 500); } function closePanel(id) { var $pnl = $("#" + id); var pHeight = $pnl.height() + 60; $pnl.animate({ bottom: "-" + pHeight + "px" }, 500); } //---------------------------------------------------------------------------- //END BOTTOM POPUP //---------------------------------------------------------------------------- function aniWindow() { if (window.startSite) { startSite(); } var panel = parent.document.getElementById("mrpPanel"); $(panel).animate({ height: "0px" }, 600, function() { $(this).hide(); $(".panelWrap").hide(); }); $(".panelWrap iframe").each(function() { $(this).attr("src", ""); }); } function setPanelLock(value) { //alert(value); panelLock = value; } function getPanelLock() { return panelLock; } function mrp_tickTweets() { $(".mrp_twitWrap").each( function(i) { $(".mrp_twitWrap:eq(" + i + ")").addClass("found"); if ($(".mrp_twitWrap:eq(" + i + ") li").length > 1) { var liHeights = $(".mrp_twitWrap:eq(" + i + ")" + " li:eq(0)").height(); var liWidths = $(".mrp_twitWrap:eq(" + i + ")" + " li:eq(0)").width(); $(".mrp_twitWrap:eq(" + i + ") ul").css("position", "relative"); $(".mrp_twitWrap:eq(" + i + ") li").css("height", liHeights + "px").css("overflow", "hidden") .css("margin-bottom", "10px"); custScroll(700, 5000, (liHeights + 10) * -1, 'top', '.mrp_twitWrap:eq(' + i + ')', '.mrp_tweetItemsWrap', 'mrp_tweetItemsWrap li'); } } ); } //function mrp_getLatestTweets(placement, user, count, direction) { // var twitHTML = []; // var tempTweet = ""; // var twitRequest = "http://api.twitter.com/1/statuses/user_timeline.json?count=" + count + "&screen_name=" + user + "&include_rts=true&callback=?"; // $(placement).html("

Loading Tweets...

"); // if (!direction) // direction = "up"; // $.getJSON(twitRequest, function(data) { // $.each(data, function(i, k) { // tempTweet = data[i].text; // tempTweet = tempTweet.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, function(url) { // if (url == "") // twitHTML.push("
  • " + tempTweet + "
  • "); // else // twitHTML.push("
  • " + tempTweet + "
  • "); // }); // }); // $(placement).html( // $("
      ", { // 'class': 'mrp_tweetItemsWrap', // html: twitHTML.join('') // }) // ); // if ($(placement + " li").length > 1) { // var liHeights = $(placement + " li:eq(0)").height(); // var liWidths = $(placement + " li:eq(0)").width(); // $(placement + " ul").css("position", "relative"); // if (direction == "up") { // $(placement + " li").css("height", liHeights + "px").css("overflow", "hidden") // .css("margin-bottom", "10px"); // custScroll(700, 5000, (liHeights + 10) * -1, 'top', placement, '.mrp_tweetItemsWrap', 'mrp_tweetItemsWrap li'); // } // else { // $(placement + " ul").css("width", "30000em"); // $(placement + " li").css("width", liWidths + "px").css("overflow", "hidden") // .css("margin-bottom", "10px"); // custScroll(700, 5000, (liWidths + 10) * -1, 'left', placement, '.mrp_tweetItemsWrap', 'mrp_tweetItemsWrap li'); // } // } // }); //} function mrp_getLatestFBposts(placement, user, count) { var twitHTML = []; var tempTweet = ""; var twitRequest = "http://api.twitter.com/1/statuses/user_timeline.json?count=" + count + "&screen_name=" + user + "&include_rts=true&callback=?"; $(placement).html("

      Loading Tweets...

      "); $.getJSON(twitRequest, function(data) { $.each(data, function(i, k) { tempTweet = data[i].text; tempTweet = tempTweet.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, function(url) { if (url == "") twitHTML.push("
    • " + tempTweet + "
    • "); else twitHTML.push("
    • " + tempTweet + "
    • "); }); }); $(placement).html( $("
        ", { 'class': 'mrp_tweetItemsWrap', html: twitHTML.join('') }) ); if ($(placement + " li").length > 1) { var liHeights = $(placement + " li:eq(0)").height(); $(placement + " ul").css("position", "relative"); $(placement + " li").css("height", liHeights + "px").css("overflow", "hidden") .css("margin-bottom", "10px"); custScroll(700, 5000, (liHeights + 10) * -1, 'top', placement, '.mrp_tweetItemsWrap', 'mrp_tweetItemsWrap li'); } }); } function checkMrpDropDown(curMenuIndex) { $(".mrp_contentMenu:eq(" + curMenuIndex + ")").append(""); $(".mrp_contentMenu:eq(" + curMenuIndex + ")").append("
          "); var contentHeadImgWidth = $(".mrp_contentHeadWrap:eq(" + curMenuIndex + ") .mrp_contentHeadImg").outerWidth(true); if ($(".mrp_contentHeadWrap:eq(" + curMenuIndex + ")").hasClass("mrp_contentHeadFeature")) contentHeadImgWidth = 0; //profiles with header have absolutely positioned menu var availWidth = $(".mrp_contentMenu:eq(" + curMenuIndex + ")").width() - contentHeadImgWidth; if ($(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentHeadFeature").length > 0) availWidth = $(".mrp_contentMenu:eq(" + curMenuIndex + ")").width(); availWidth = availWidth - $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").outerWidth(true) - 10; //availWidth = "300"; //for testing //alert("avail:" + availWidth); var totalItemsWidth = 0; $(".mrp_contentMenu:eq(" + curMenuIndex + ") a:not('.mrp_contentMenuDropLink')").each(function() { //check if it is NOT the last one if ($(".mrp_contentMenu:eq(" + curMenuIndex + ") a:not('.mrp_contentMenuDropLink')").index(this) != $(".mrp_contentMenu:eq(" + curMenuIndex + ") a:not('.mrp_contentMenuDropLink')").length - 1) { if ($(this).outerWidth(true) + totalItemsWidth > availWidth) { if ($(this).hasClass("active")) { $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").addClass("active"); } $("#mrp_contentMenuDrop" + curMenuIndex + " ul").append( $("
        • ").append($(this))); } else { totalItemsWidth += $(this).outerWidth(true); } } else { // alert("total width: " + totalItemsWidth + " this width: " + $(this).outerWidth(true) + " avail width: " + availWidth + " more link width: " + $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").outerWidth(true)); //if it IS the last one, see if it fits (that's what she said) if ($(this).outerWidth(true) + totalItemsWidth > availWidth + $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").outerWidth(true)) { if ($(this).hasClass("active")) { $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").addClass("active"); } $("#mrp_contentMenuDrop" + curMenuIndex + " ul").append( $("
        • ").append($(this))); } } //alert("total:" + totalItemsWidth); }); if ($("#mrp_contentMenuDrop" + curMenuIndex + " li").length > 0) { if ($("#mrpMenuTooltip" + curMenuIndex).length < 1) { $("body").prepend("
          "); } $(".mrp_contentMenu:eq(" + curMenuIndex + ") .mrp_contentMenuDropLink").show().tooltip({ position: "top left", // a little tweaking of the position offset: [-5, 50], // use the built-in fadeIn/fadeOut effect effect: "fade", delay: 150, predelay: 10, tip: "#mrpMenuTooltip" + curMenuIndex, onBeforeShow: function() { $("#mrpMenuTooltip" + curMenuIndex).addClass("mrpMenuTip").html(this.getTrigger().next().children().clone()); }, onHide: function() { $("#mrpMenuTooltip" + curMenuIndex).removeClass("mrpMenuTip"); } }); } } //Browser Check //New: Added 12/29/16 var $buoop = { vs: { i: 10, f: -4, o: -4, s: 8, c: -4 }, api: 4 }; function $buo_f() { var e = document.createElement("script"); e.src = "//browser-update.org/update.min.js"; document.body.appendChild(e); }; try { document.addEventListener("DOMContentLoaded", $buo_f, false) } catch (e) { window.attachEvent("onload", $buo_f) } //OLD //var $buoop = { test:false, reminder: 0 }; //$buoop.ol = window.onload; //window.onload = function() { // try { if ($buoop.ol) $buoop.ol(); } catch (e) { } // var e = document.createElement("script"); // e.setAttribute("type", "text/javascript"); // e.setAttribute("src", "//browser-update.org/update.js"); // //document.body.appendChild(e); // $("body").append(e); //} //****************************************************************************************************************************************************************************** //****************************************************************************************************************************************************************************** function initEnvironmentTag(envType, DBEnv, cloudfront, S3Dev) { //create stat div var stat = $("
          "); stat.attr("id", "envStat"); stat.addClass("closed"); $("#mainWrap").append(stat); $("#envStat").addClass("envStat"); //create kill stat var close = $("
          "); close.attr("id", "envClose"); $("#envStat").append(close); $("#envStat").addClass(); $("#envClose").append(''); //create icon div var icon = $("
          "); icon.attr("id", "envIcon"); $("#envIcon").addClass("envIcon"); $("#envStat").append(icon); $("#envIcon").append(''); //create list var statList = $("
            "); statList.attr("id", "statList"); $("#envStat").append(statList); //add to list var list1 = $("
          • "); var list2 = $("
          • "); var list3 = $("
          • "); var list4 = $("
          • "); $("#statList").append(list1); $("#statList").append(list2); $("#statList").append(list3); $("#statList").append(list4); list1.append("Environment: (" + envType + ")"); list2.append("Database: (" + DBEnv + ")"); list3.append("Cloudfront: " + cloudfront); list4.append("S3 Development: (" + S3Dev +")"); //determine the env and display correct color var splitEnv = DBEnv.split("-"); if (splitEnv[1] == "dev") { $("#envStat").addClass("envStat dev"); $("#envIcon").addClass("envIcon dev"); } else if (splitEnv[1] == "stage") { $("#envStat").addClass("envStat stage"); $("#envIcon").addClass("envIcon stage"); } else if (splitEnv[1] == "prod" || (DBEnv.indexOf("host150") != -1)) { $("#envStat").addClass("envStat prod"); $("#envIcon").addClass("envIcon prod"); } //open/close click event $("#envIcon").click(function () { if ($("#envStat").hasClass("closed")) { $("#envStat").animate({ left: 0 }); $("#envIcon .fa").addClass("fa-rotate-180"); $("#envIcon").addClass("envIcon isOpen"); $("#envStat").removeClass("closed"); $("#envStat").addClass("open"); } else if ($("#envStat").hasClass("open")) { $("#envStat").animate({ left: -261 }); $("#envStat").removeClass("open"); $("#envIcon .fa").removeClass("fa-rotate-180"); $("#envIcon").removeClass("envIcon isOpen"); $("#envStat").addClass("closed"); } });//end click event //kill widget click event $("#envClose").click(function () { $("#envStat").remove(); });//end click event }