{"version":3,"sources":["../assets/scripts/custom.js"],"names":["$","jQuery","on","animate","scrollTop","each","this","text","hide","event","attr","stopPropagation","preventDefault","window","open","e","fadeToggle","css","empty","delay","theTimer","theElement","theLastPosition","x","y","mobileMenuBreakpoint","focusTimer","width","setTimeout","removeClass","clearTimeout","closest","addClass","inEvent","location","Math","abs","ScreenX","ScreenY","hasClass"],"mappings":"AAOAA,EAAA,WAKAC,OAAA,gBAAAC,GAAA,QAAA,WACAD,OAAA,cAAAE,SAAAC,UAAA,MAMAH,OAAA,MAAAI,KAAA,WACA,cAAAJ,OAAAK,MAAAC,QACAN,OAAAK,MAAAE,SA0BAP,OAAA,uBAAAC,GAAA,QAAA,SAAAO,GAEAR,OAAAK,MAAAI,KAAA,UACAD,EAAAE,kBACAF,EAAAG,iBACAC,OAAAC,KAAAb,OAAAK,MAAAI,KAAA,QAAA,SAAA,sFAOAT,OAAA,wBAAAC,GAAA,QAAA,SAAAa,GAEAA,EAAAJ,kBACAI,EAAAH,iBAEAX,OAAA,cAAAe,aACAf,OAAA,uBAAAe,aACAf,OAAA,uBAAAgB,IAAA,MAAA,SACAhB,OAAA,cAAAE,SAAAC,UAAA,OAAA,OAIAH,OAAA,eAAAC,GAAA,QAAA,WAEAD,OAAA,cAAAO,OACAP,OAAA,iBAAAO,OAEAP,OAAA,6BAAAiB,YA6BA,SAAAlB,EAAAa,EAAAM,GAIA,GAAAC,GAAA,EACAC,EAAA,KACAC,GAAAC,EAAA,EAAAC,EAAA,GACAC,EAAA,IACAC,EAAA,CAGA1B,GAAA,wCACAE,GAAA,WAAA,WACAF,EAAAa,GAAAc,QAAAF,IACAC,EAAAb,EAAAe,WAAA,WACA5B,EAAA,aAAA6B,YAAA,SACA,OAIA7B,EAAA,uBACAE,GAAA,WAAA,WACAF,EAAAa,GAAAc,QAAAF,IACAC,EAAAb,EAAAe,WAAA,WACA5B,EAAA,aAAA6B,YAAA,SACA,OAIA7B,EAAA,oBACAE,GAAA,QAAA,WACAF,EAAAa,GAAAc,QAAAF,GACAK,aAAAJ,KAGA1B,EAAA,iBACAE,GAAA,UAAA,WACAF,EAAAa,GAAAc,QAAAF,IACAzB,EAAA,aAAA6B,YAAA,QACA7B,EAAAM,MAAAyB,QAAA,MAAAC,SAAA,WAIAhC,EAAA,iBACAE,GAAA,QAAA,SAAA+B,GAEA,GAAAN,GAAA3B,EAAAa,GAAAc,OAEAA,GAAAF,IAEAJ,EAAArB,EAAAM,MAEAe,EAAAX,KAAA,UACAuB,EAAAtB,kBACAE,EAAAqB,SAAAb,EAAAX,KAAA,YAIAqB,QAAA,MACA7B,GAAA,aAAA,SAAA+B,GAEA,GAAAN,GAAA3B,EAAAa,GAAAc,OAEAA,GAAAF,IAEAJ,GACAA,EAAAQ,YAAA,QAEAhB,EAAAiB,aAAAV,GACAC,EAAArB,EAAAM,MAEAc,EAAAP,EAAAe,WAAA,WACAP,EAAAW,SAAA,SACAb,MAGAjB,GAAA,YAAA,SAAA+B,GAEA,GAAAN,GAAA3B,EAAAa,GAAAc,OAEA,IAAAA,EAAAF,EACA,CACA,GAAAU,KAAAC,IAAAd,EAAAC,EAAAU,EAAAI,SAAA,GACAF,KAAAC,IAAAd,EAAAE,EAAAS,EAAAK,SAAA,EAGA,MAFAhB,GAAAC,EAAAU,EAAAI,aACAf,EAAAE,EAAAS,EAAAK,QAIA,IAAAjB,EAAAkB,SAAA,QACA,MAGA1B,GAAAiB,aAAAV,GAEAA,EAAAP,EAAAe,WAAA,WACAP,EAAAW,SAAA,SACAb,MAGAjB,GAAA,aAAA,SAAA+B,GAEA,GAAAN,GAAA3B,EAAAa,GAAAc,OAEAA,GAAAF,IAEAZ,EAAAiB,aAAAV,GACAC,EAAArB,EAAAM,MAEAc,EAAAP,EAAAe,WAAA,WACAP,EAAAQ,YAAA,SACAV,OAGAlB,OAAAY,OAAA","file":"custom.js","sourcesContent":["\n/* ========================================================================\n *\n * Custom site functions\n *\n * ======================================================================== */\n\n$(function() {\n\n/* ========================================================================\n *  back-to-top\n * ======================================================================== */\njQuery('.back-to-top').on( 'click', function(){\n\tjQuery(\"html, body\").animate({ scrollTop: 0 });\n});\n\n/* ========================================================================\n *  remove the New title\n * ======================================================================== */\njQuery('h4').each( function(){\n\tif (jQuery(this).text() === 'New title') {\n\t\tjQuery(this).hide();\n\t}\n});\n\n/* ========================================================================\n *  Open external links in new window\n * ======================================================================== */\n// jQuery('a').each(function() {\n// \t var a = new RegExp('/' + window.location.host + '/');\n// \t if(!a.test(this.href)) {\n// \t\t jQuery(this).click(function(event) {\n//\n// \t\t\tif (jQuery(this).attr('id') === 'consoleWorkspace-close') {\n// \t\t\t\treturn;\n// \t\t\t}\n//\n// \t\t\tevent.preventDefault();\n// \t\t\tevent.stopPropagation();\n// \t\t\twindow.open(this.href, '_blank');\n// \t\t });\n// \t }\n// });\n\n/* ========================================================================\n *\tshare-link-trigger\n * ======================================================================== */\n\tjQuery('.share-link-trigger').on('click', function(event){\n\n\t\tif (jQuery(this).attr('href')) {\n        \tevent.stopPropagation();\n        \tevent.preventDefault();\n\t\t\twindow.open(jQuery(this).attr('href'), \"_blank\", \"toolbar=no, scrollbars=yes, resizable=yes, top=1, left=1, width=620, height=520\");\n\t\t}\n\t});\n\n/* ========================================================================\n *\tshare-email-trigger\n * ======================================================================== */\n   jQuery('.share-email-trigger').on('click', function(e){\n\n\t\te.stopPropagation();\n    \te.preventDefault();\n\n\t\tjQuery('.form-dimm').fadeToggle();\n\t\tjQuery('#form-overlay-share').fadeToggle();\n\t\tjQuery('#form-overlay-share').css( 'top', '100px' );\n\t\tjQuery(\"html, body\").animate({ scrollTop: '50%' }, 500);\n\t\treturn;\n\t});\n\n\tjQuery('.form-close').on('click', function(){\n\n\t\tjQuery('.form-dimm').hide();\n\t\tjQuery('.form-overlay').hide();\n\n\t\tjQuery('.form-overlay-video-inner').empty();\n\n\t});\n\n/* ========================================================================\n *\tSticky sidebar\n * ======================================================================== */\n\t/*\n\n\tvar width = jQuery(window).width();\n\n\tif (width > 1130)\n\t{\n\t\tjQuery('.sectionnav').scrollToFixed( {\n\t\t\tlimit: \t\t\t((jQuery('footer.content-info').offset().top) - (jQuery('.sectionnav').height()) + 20),\n\t\t\tleft: \t\t\t2,\n\t\t\ttop: \t\t\t-5,\n\t\t\tremoveOffsets: \ttrue,\n\t\t\tminWidth: \t\t1130,\n\t\t\tmarginTop: \t\t110\n\t\t});\n\t}\n\t*/\n\n});\n\n/* ========================================================================\n *\tMake the nav dropdown items clickable and focusable\n * ======================================================================== */\n(function ($, window, delay) {\n\n\n\t// http://jsfiddle.net/AndreasPizsa/NzvKC/\n\tvar theTimer = 0;\n\tvar theElement = null;\n\tvar theLastPosition = {x:0,y:0};\n\tvar mobileMenuBreakpoint = 768;\n\tvar focusTimer = 0;\n\n\t// close the menu if tabbing backward from the first item\n\t$('.dropdown:last-child li:last-child a')\n\t\t.on('focusout', function() {\n\t\t\tif ( $(window).width() > mobileMenuBreakpoint ) {\n\t\t\t\tfocusTimer = window.setTimeout( function() {\n\t\t\t\t\t$('.dropdown').removeClass('open');\n\t\t\t\t}, 10);\n\t\t\t}\n\t\t});\n\t// close the menu if tabbing forward from the last item\n\t$('[data-toggle]:eq(1)')\n\t\t.on('focusout', function() {\n\t\t\tif ( $(window).width() > mobileMenuBreakpoint ) {\n\t\t\t\tfocusTimer = window.setTimeout( function() {\n\t\t\t\t\t$('.dropdown').removeClass('open');\n\t\t\t\t}, 10);\n\t\t\t}\n\t\t});\n\t// cancel the timeout if the thing you're tabbing to is also a menu item\n\t$('.dropdown-menu a')\n\t\t.on('focus', function() {\n\t\t\tif ( $(window).width() > mobileMenuBreakpoint ) {\n\t\t\t\tclearTimeout(focusTimer);\n\t\t\t}\n\t\t});\n\t$('[data-toggle]')\n\t\t.on('focusin', function() {\n\t\t\tif ( $(window).width() > mobileMenuBreakpoint ) {\n\t\t\t\t$('.dropdown').removeClass('open');\n\t\t\t\t$(this).closest('li').addClass('open');\n\t\t\t}\n\t});\n\n\t$('[data-toggle]')\n\t\t.on('click', function (inEvent) {\n\n\t\t\tvar width = $(window).width();\n\n\t\t\tif (width > mobileMenuBreakpoint)\n\t\t\t{\n\t\t\t\ttheElement = $(this);\n\n\t\t\t\tif (theElement.attr('href')) {\n\t\t\t\t\tinEvent.stopPropagation();\n\t\t\t\t\twindow.location = theElement.attr('href');\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\t.closest('li')\n\t\t.on('mouseenter', function (inEvent) {\n\n\t\t\tvar width = $(window).width();\n\n\t\t\tif (width > mobileMenuBreakpoint)\n\t\t\t{\n\t\t\t\tif (theElement) {\n\t\t\t\t\ttheElement.removeClass('open');\n\t\t\t\t}\n\t\t\t\twindow.clearTimeout(theTimer);\n\t\t\t\ttheElement = $(this);\n\n\t\t\t\ttheTimer = window.setTimeout(function () {\n\t\t\t\t\ttheElement.addClass('open');\n\t\t\t\t}, delay);\n\t\t\t}\n\t\t})\n\t\t.on('mousemove', function (inEvent) {\n\n\t\t\tvar width = $(window).width();\n\n\t\t\tif (width > mobileMenuBreakpoint)\n\t\t\t{\n\t\t\t\tif(\tMath.abs(theLastPosition.x - inEvent.ScreenX) > 4 ||\n\t\t\t\t\tMath.abs(theLastPosition.y - inEvent.ScreenY) > 4) {\n\t\t\t\t\t\ttheLastPosition.x = inEvent.ScreenX;\n\t\t\t\t\t\ttheLastPosition.y = inEvent.ScreenY;\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (theElement.hasClass('open')){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twindow.clearTimeout(theTimer);\n\n\t\t\t\ttheTimer = window.setTimeout(function () {\n\t\t\t\t\ttheElement.addClass('open');\n\t\t\t\t}, delay);\n\t\t\t}\n\t\t})\n\t\t.on('mouseleave', function (inEvent) {\n\n\t\t\tvar width = $(window).width();\n\n\t\t\tif (width > mobileMenuBreakpoint)\n\t\t\t{\n\t\t\t\twindow.clearTimeout(theTimer);\n\t\t\t\ttheElement = $(this);\n\n\t\t\t\ttheTimer = window.setTimeout(function () {\n\t\t\t\t\ttheElement.removeClass('open');\n\t\t\t\t}, delay);\n\t\t\t}\n\t\t});\n})(jQuery, window, 0); // 200 is the delay in milliseconds\n"]}