/** * @license * Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` */ ;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++tf||typeof i=="undefined")return 1;if(it?0:t);++ee(r,i)&&o.push(i)}return o}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++eu(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++eu&&(u=t); else r=X(r,t,3),D(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function W(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++oarguments.length;return r=X(r,e,4),I(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function C(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return D(n,function(n){var t;t=++r,t=0+Sr(Wr()*(t-0+1)),e[r]=e[t],e[t]=n }),e}function P(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++te?Mr(0,u+e):e||0}else if(e)return e=J(r,t),r[e]===t?e:-1; return n(r,t,e)}function H(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=X(r,t,3);++o>>1,t(n[e])=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function X(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return nr(n);var u=Ur(n);return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Y(n){return n}function Z(n){D(x(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__]; return Rr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function nr(n){return function(r){return r[n]}}var rr,tr=0,er={},ur=+new Date+"",or=/($^)/,ir=/['\n\r\t\u2028\u2029\\]/g,fr="[object Arguments]",ar="[object Array]",lr="[object Boolean]",cr="[object Date]",pr="[object Number]",sr="[object Object]",gr="[object RegExp]",hr="[object String]",vr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},yr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mr=vr[typeof window]&&window||this,_r=vr[typeof exports]&&exports&&!exports.nodeType&&exports,dr=vr[typeof module]&&module&&!module.nodeType&&module,br=dr&&dr.exports===_r&&_r,wr=vr[typeof global]&&global; !wr||wr.global!==wr&&wr.window!==wr||(mr=wr);var jr=[],xr=Object.prototype,Tr=mr._,Er=xr.toString,Ar=RegExp("^"+(Er+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Or=Math.ceil,Sr=Math.floor,Nr=xr.hasOwnProperty,Rr=jr.push,kr=xr.propertyIsEnumerable,Br=_(Br=Object.create)&&Br,Fr=_(Fr=Array.isArray)&&Fr,qr=mr.isFinite,Dr=mr.isNaN,Ir=_(Ir=Object.keys)&&Ir,Mr=Math.max,$r=Math.min,Wr=Math.random;o.prototype=u.prototype;var zr={};!function(){var n={0:1,length:1};zr.spliceObjects=(jr.splice.call(n,0,1),!n[0]) }(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Br||(f=function(){function n(){}return function(r){if(O(r)){n.prototype=r;var t=new n;n.prototype=null}return t||mr.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Nr.call(n,"callee")&&!kr.call(n,"callee")||false});var Cr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==ar||false},Pr=function(n){var r,t=[]; if(!n||!vr[typeof n])return t;for(r in n)Nr.call(n,r)&&t.push(r);return t},Ur=Ir?function(n){return O(n)?Ir(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'"},Gr=T(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(r(n[t],t,n)===er)break;return n},Lr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(Nr.call(n,t)&&r(n[t],t,n)===er)break;return n};A(/x/)&&(A=function(n){return typeof n=="function"&&"[object Function]"==Er.call(n) });var Qr=h(function(n,r,t){Nr.call(n,t)?n[t]++:n[t]=1}),Xr=h(function(n,r,t){(Nr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=h(function(n,r,t){n[t]=r}),Zr=M,nt=_(nt=Date.now)&&nt||function(){return(new Date).getTime()};u.after=function(n,r){if(!A(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=L,u.bindAll=function(n){for(var r=1i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=T,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return D(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Ur,u.map=M,u.max=$,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):ur+arguments[0];return Nr.call(t,e)?t[e]:t[e]=n.apply(this,arguments) }},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++or?0:r);++nt?Mr(0,e+t):$r(t,e-1))+1);e--;)if(n[e]===r)return e; return-1},u.mixin=Z,u.noConflict=function(){return mr._=Tr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Sr(Wr()*(r-n+1))},u.reduce=W,u.reduceRight=z,u.result=function(n,r){if(n){var t=n[r];return A(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length},u.some=P,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=j({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||or).source+"|"+(e.interpolate||or).source+"|"+(e.evaluate||or).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ir,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r }),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,d)},u.uniqueId=function(n){var r=++tr+"";return n?n+r:r},u.all=B,u.any=P,u.detect=q,u.findWhere=function(n,r){return U(n,r,true)},u.foldl=W,u.foldr=z,u.include=k,u.inject=W,u.first=V,u.last=function(n,r,t){var u=0,o=n?n.length:0; if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.4.2",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n]; u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=jr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mr._=u, define(function(){return u})):_r&&dr?br?(dr.exports=u)._=u:_r._=u:mr._=u}).call(this); (function(jQuery) { jQuery.jQueryRandom = 0; jQuery.extend(jQuery.expr[':'], { rand: function(a,i,m,r){ if (i==0) { jQuery.jQueryRandom = Math.floor(Math.random() * r.length); } return i == jQuery.jQueryRandom; } } ) $.extend(true, $.fn, { /** * jQuery.fn.sortElements * -------------- * @param Function comparator: * Exactly the same behaviour as [1,2,3].sort(comparator) * * @param Function getSortable * A function that should return the element that is * to be sorted. The comparator will run on the * current collection, but you may want the actual * resulting sort to occur on a parent or another * associated element. * * E.g. $('td').sortElements(comparator, function(){ * return this.parentNode; * }) * * The 's parent () will be sorted instead * of the itself. */ sortElements: function(config,getSortable){ var defaults = { "default" : function(a, b){ return $(a).text() > $(b).text() ? 1 : -1; }, "numeric" : function(a, b){ return parseInt($(a).text(), 10) > parseInt($(b).text(), 10) ? 1 : -1; }, "review" : function(a,b) { return $(a).attr('title') > $(b).attr('title') ? -1 : 1; }, "auto" : function(a, b){ a = $(a).text(); b = $(b).text(); return ( isNaN(a) || isNaN(b) ? a > b : +a > +b ) ? inverse ? -1 : 1 : inverse ? 1 : -1; } } config = config || {}; var sort = [].sort; var comparator = defaults[config.comparator] || config.comparator || defaults['default']; var getSortable = getSortable || function() {return this;}; var inverse = config.inverse || false; var placements = this.map(function(){ var sortElement = getSortable.call(this), parentNode = sortElement.parentNode, // Since the element itself will change position, we have // to have some way of storing its original position in // the DOM. The easiest way is to have a 'flag' node: nextSibling = parentNode.insertBefore( document.createTextNode(''), sortElement.nextSibling ); return function() { if (parentNode === this) { throw new Error( "You can't sort elements if any one is a descendant of another." ); } // Insert before flag: parentNode.insertBefore(this, nextSibling); // Remove flag: parentNode.removeChild(nextSibling); }; }); return sort.call(this, comparator).each(function(i){ placements[i].call(getSortable.call(this)); }) } }); })(jQuery); /* * jQuery Templating Plugin * NOTE: Created for demonstration purposes. * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. */ (function(jQuery){ // Override the DOM manipulation function var oldManip = jQuery.fn.domManip; jQuery.fn.extend({ render: function( data ) { return this.map(function(i, tmpl){ return jQuery.render( tmpl, data ); }); }, // This will allow us to do: .append( "template", dataObject ) domManip: function( args ) { // This appears to be a bug in the appendTo, etc. implementation // it should be doing .call() instead of .apply(). See #6227 if ( args.length > 1 && args[0].nodeType ) { arguments[0] = [ jQuery.makeArray(args) ]; } if ( args.length === 2 && typeof args[0] === "string" && typeof args[1] !== "string" ) { arguments[0] = [ jQuery.render( args[0], args[1] ) ]; } return oldManip.apply( this, arguments ); } }); jQuery.extend({ render: function( tmpl, data ) { var fn; // Use a pre-defined template, if available if ( jQuery.templates[ tmpl ] ) { fn = jQuery.templates[ tmpl ]; // We're pulling from a script node } else if ( tmpl.nodeType ) { var node = tmpl, elemData = jQuery.data( node ); fn = elemData.tmpl || jQuery.tmpl( node.innerHTML ); } fn = fn || jQuery.tmpl( tmpl ); // We assume that if the template string is being passed directly // in the user doesn't want it cached. They can stick it in // jQuery.templates to cache it. //jQuery.postbind = []; if ( jQuery.isArray( data ) ) { return jQuery.map( data, function( data, i ) { return fn.call( data, jQuery, data, i ); }); } else { return fn.call( data, jQuery, data, 0 ); } }, // You can stick pre-built template functions here templates: { }, /* * For example, someone could do: * jQuery.templates.foo = jQuery.tmpl("some long templating string"); * $("#test").append("foo", data); */ tmplcmd: { each: { _default: [ null, "$i" ], prefix: "jQuery.each($1,function($2){with(this){", suffix: "}});" }, 'if': { prefix: "if($1){", suffix: "}" }, 'elseif': { prefix: "}else if($1){" }, 'else': { prefix: "}else{" }, 'html': { prefix: "_.push(typeof $1==='function'?$1.call(this):$1);" }, "=": { _default: [ "this" ], prefix: "_.push($.encode(typeof $1==='function'?$1.call(this):$1));" }, "substitute": { _default: [ "this" ], prefix: "_.push(typeof $1==='undefined'?$2:$1);" }, 'join': { prefix: "_.push($1.join('$2'));" }, 'count': { prefix: "_.push(($.each.arguments)? $.each.arguments[0].length+$1 : $.map.arguments[0].length+$1 || 1);" }, 'start': { _default: [ 0, "$i" ], prefix: "_.push($2+$1);" }, 'partial': { prefix: "$1['$partial']=$data;_.push($('
').append($.render($2,$1)).html());" }, 'onEvent': { prefix: "_[0] = _[0].replace(/>/g, ' on' + (evt = $2.split(','))[0] + '=\"' + evt[1] + '(' + $1 + ')\">');" }, "mod" : { prefix:'_.push(\'
\');', suffix:'_.push(\'
\');' }, "replay": { prefix: "if($1){$data['$replay']=$.encode(typeof $1==='function'?$1.call(this):$1)};_.push($data.$replay);" }, "switch": { prefix: "switch($1){", suffix: "}" }, "case": { prefix: "case $1:", suffix: "break;" }, "last": { prefix: "_.push($1);" }, "first": { prefix: "_.push($1[0]);" } }, encode: function( text ) { return text != null ? document.createTextNode( text.toString() ).nodeValue : ""; }, tmpl: function(str, data, i) { // Generate a reusable function that will serve as a template // generator (and which will be cached). var fn = new Function("jQuery","$data","$i", "var $=jQuery,_=[];_.data=$data;_.index=$i;" + // Introduce the data as local variables using with(){} "with($data){_.push('" + // Convert the template into pure JavaScript str .replace(/[\r\t\n]/g, " ") .replace(/\${([^}]*)}/g, "{{= $1}}") .replace(/{{(\/?)(\w+|.)(?:\((.*?)\))?(?: (.*?))?}}/g, function(all, slash, type, fnargs, args) { var tmpl = jQuery.tmplcmd[ type ]; if ( !tmpl ) { throw "Template not found: " + type; } var def = tmpl._default || [ null,null ]; return "');" + tmpl[slash ? "suffix" : "prefix"] .split("$1").join(args || def[0]) .split("$2").join(fnargs || def[1]) + "_.push('"; }) + "');};return $(_.join('')).get();"); // Provide some basic currying to the user return data ? fn.call( this, jQuery, data, i ) : fn; /* if (data) { return fn.call( this, jQuery, data, i ); } else { return fn }*/ } }); })(jQuery); AOS.init({ easing: 'ease-out-back', duration: 1000, once: true }); function nestOptionalCourses() { if (typeof(curricOR) !== 'undefined') { $(curricOR.key).each(function(i) { var pkey = this; $('div.accordion').each(function(j) { var $accrd = $(this); var $ORs = $('
'); var $pivot = $accrd.find('>div.accordion-group:has(.list-category:contains("'+pkey+'"))'); $(curricOR[pkey]).each(function(k) { var ORkey = this; var $OR = $accrd.find('>div.accordion-group:has(.list-category:contains("'+ORkey+'"))'); if ($OR.length && curricOR['supress'+(j+1)] && curricOR['supress'+(j+1)].indexOf(ORkey) >= 0) { var repl = new RegExp(',?'+ORkey,'i'); curricOR[pkey] = curricOR[pkey].join(',').replace(repl,'').replace(/^,/,'').split(','); if (!curricOR[pkey][0]) curricOR[pkey] = []; $pivot.find('.list-title').text($pivot.find('.list-title').text()+' -OR-') $OR.addClass('curricOR'); if ( k < curricOR[pkey].length - 1 ) { $OR.find('.list-title').text($(this).text()+' -OR-'); } else { $OR.find('h5:last').empty(); } $ORs.append($OR); } }) $pivot.after($ORs.html()); }) }) } } $(document).ready(function(){ $("nav ul:not(:has(li:not(.invisible)))").add($("nav ul:not(:has(li:not(.invisible)))").prev()).remove(); $('nav ul.navbar-nav > li > div > a.dropdown-toggle').on("click", function(e){ var $currul=$(this).parent().find('.dropdown-menu ul'); $currul.not(':has(li.active)').hide(); $currul.has('li.active').show(); }); $('nav .dropdown-menu a.dropdown-toggle').on("click", function(e){ var $this = $(this), $nextul = $this.next('ul'); $this.closest('ul').find('ul:visible').add($nextul).toggle(); e.stopPropagation(); e.preventDefault(); }); nestOptionalCourses(); $('.fragments').on('click','.paging a',function(e) { e.stopPropagation(); e.preventDefault(); $.get(e.target.href,function(data) { var posts = $(data).find('.fragments article, .fragments .paging'); $('.paging:has(a)').replaceWith(posts); }); }); $('.tabbable').find('li.active').removeClass('active').end().find('a.nav-link').on('click', function (e) { e.preventDefault() $(this).tab('show') }); if ($(document.location.hash,'.tab-content').length) $(document.location.hash,'.tab-content').parent().prev().find('li:eq('+$(document.location.hash,'.tab-content').prevAll().length+') a').click(); });