if (typeof Object.create != 'function') {
  Object.create = (function() {
    var Temp = function() {};
    return function (prototype) {
      if (arguments.length > 1) {
        throw Error('Second argument not supported');
      }
      if(prototype !== Object(prototype) && prototype !== null) {
        throw TypeError('Argument must be an object or null');
     }
     if (prototype === null) { 
        throw Error('null [[Prototype]] not supported');
      }
      Temp.prototype = prototype;
      var result = new Temp();
      Temp.prototype = null;
      return result;
    };
  })();
}

if (!Function.prototype.bind) {
  Function.prototype.bind = function(oThis) {
    if (typeof this !== 'function') {
      // closest thing possible to the ECMAScript 5
      // internal IsCallable function
      throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
    }

    var aArgs   = Array.prototype.slice.call(arguments, 1),
        fToBind = this,
        fNOP    = function() {},
        fBound  = function() {
          return fToBind.apply(this instanceof fNOP && oThis
                 ? this
                 : oThis,
                 aArgs.concat(Array.prototype.slice.call(arguments)));
        };

    fNOP.prototype = this.prototype;
    fBound.prototype = new fNOP();

    return fBound;
  };
}


/*!
 * parallax.js v1.4.2 (http://pixelcog.github.io/parallax.js/)
 * @copyright 2016 PixelCog, Inc.
 * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE)
 */
!function(t,i,e,s){function o(i,e){var h=this;"object"==typeof e&&(delete e.refresh,delete e.render,t.extend(this,e)),this.$element=t(i),!this.imageSrc&&this.$element.is("img")&&(this.imageSrc=this.$element.attr("src"));var r=(this.position+"").toLowerCase().match(/\S+/g)||[];if(r.length<1&&r.push("center"),1==r.length&&r.push(r[0]),("top"==r[0]||"bottom"==r[0]||"left"==r[1]||"right"==r[1])&&(r=[r[1],r[0]]),this.positionX!=s&&(r[0]=this.positionX.toLowerCase()),this.positionY!=s&&(r[1]=this.positionY.toLowerCase()),h.positionX=r[0],h.positionY=r[1],"left"!=this.positionX&&"right"!=this.positionX&&(this.positionX=isNaN(parseInt(this.positionX))?"center":parseInt(this.positionX)),"top"!=this.positionY&&"bottom"!=this.positionY&&(this.positionY=isNaN(parseInt(this.positionY))?"center":parseInt(this.positionY)),this.position=this.positionX+(isNaN(this.positionX)?"":"px")+" "+this.positionY+(isNaN(this.positionY)?"":"px"),navigator.userAgent.match(/(iPod|iPhone|iPad)/))return this.imageSrc&&this.iosFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;if(navigator.userAgent.match(/(Android)/))return this.imageSrc&&this.androidFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;this.$mirror=t("<div />").prependTo("body");var a=this.$element.find(">.parallax-slider"),n=!1;0==a.length?this.$slider=t("<img />").prependTo(this.$mirror):(this.$slider=a.prependTo(this.$mirror),n=!0),this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"}),this.$slider.addClass("parallax-slider").one("load",function(){h.naturalHeight&&h.naturalWidth||(h.naturalHeight=this.naturalHeight||this.height||1,h.naturalWidth=this.naturalWidth||this.width||1),h.aspectRatio=h.naturalWidth/h.naturalHeight,o.isSetup||o.setup(),o.sliders.push(h),o.isFresh=!1,o.requestRender()}),n||(this.$slider[0].src=this.imageSrc),(this.naturalHeight&&this.naturalWidth||this.$slider[0].complete||a.length>0)&&this.$slider.trigger("load")}function h(s){return this.each(function(){var h=t(this),r="object"==typeof s&&s;this==i||this==e||h.is("body")?o.configure(r):h.data("px.parallax")?"object"==typeof s&&t.extend(h.data("px.parallax"),r):(r=t.extend({},h.data(),r),h.data("px.parallax",new o(this,r))),"string"==typeof s&&("destroy"==s?o.destroy(this):o[s]())})}!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s<e.length&&!i.requestAnimationFrame;++s)i.requestAnimationFrame=i[e[s]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[e[s]+"CancelAnimationFrame"]||i[e[s]+"CancelRequestAnimationFrame"];i.requestAnimationFrame||(i.requestAnimationFrame=function(e){var s=(new Date).getTime(),o=Math.max(0,16-(s-t)),h=i.setTimeout(function(){e(s+o)},o);return t=s+o,h}),i.cancelAnimationFrame||(i.cancelAnimationFrame=function(t){clearTimeout(t)})}(),t.extend(o.prototype,{speed:.2,bleed:0,zIndex:-100,iosFix:!0,androidFix:!0,position:"center",overScrollFix:!1,refresh:function(){this.boxWidth=this.$element.outerWidth(),this.boxHeight=this.$element.outerHeight()+2*this.bleed,this.boxOffsetTop=this.$element.offset().top-this.bleed,this.boxOffsetLeft=this.$element.offset().left,this.boxOffsetBottom=this.boxOffsetTop+this.boxHeight;var t=o.winHeight,i=o.docHeight,e=Math.min(this.boxOffsetTop,i-t),s=Math.max(this.boxOffsetTop+this.boxHeight-t,0),h=this.boxHeight+(e-s)*(1-this.speed)|0,r=(this.boxOffsetTop-e)*(1-this.speed)|0;if(h*this.aspectRatio>=this.boxWidth){this.imageWidth=h*this.aspectRatio|0,this.imageHeight=h,this.offsetBaseTop=r;var a=this.imageWidth-this.boxWidth;this.offsetLeft="left"==this.positionX?0:"right"==this.positionX?-a:isNaN(this.positionX)?-a/2|0:Math.max(this.positionX,-a)}else{this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0;var a=this.imageHeight-h;this.offsetBaseTop="top"==this.positionY?r:"bottom"==this.positionY?r-a:isNaN(this.positionY)?r-a/2|0:r+Math.max(this.positionY,-a)}},render:function(){var t=o.scrollTop,i=o.scrollLeft,e=this.overScrollFix?o.overScroll:0,s=t+o.winHeight;this.boxOffsetBottom>t&&this.boxOffsetTop<=s?(this.visibility="visible",this.mirrorTop=this.boxOffsetTop-t,this.mirrorLeft=this.boxOffsetLeft-i,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed)):this.visibility="hidden",this.$mirror.css({transform:"translate3d(0px, 0px, 0px)",visibility:this.visibility,top:this.mirrorTop-e,left:this.mirrorLeft,height:this.boxHeight,width:this.boxWidth}),this.$slider.css({transform:"translate3d(0px, 0px, 0px)",position:"absolute",top:this.offsetTop,left:this.offsetLeft,height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}}),t.extend(o,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1<<30,docWidth:1<<30,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){if(!this.isReady){var s=t(e),h=t(i),r=function(){o.winHeight=h.height(),o.winWidth=h.width(),o.docHeight=s.height(),o.docWidth=s.width()},a=function(){var t=h.scrollTop(),i=o.docHeight-o.winHeight,e=o.docWidth-o.winWidth;o.scrollTop=Math.max(0,Math.min(i,t)),o.scrollLeft=Math.max(0,Math.min(e,h.scrollLeft())),o.overScroll=Math.max(t-i,Math.min(t,0))};h.on("resize.px.parallax load.px.parallax",function(){r(),o.isFresh=!1,o.requestRender()}).on("scroll.px.parallax load.px.parallax",function(){a(),o.requestRender()}),r(),a(),this.isReady=!0}},configure:function(i){"object"==typeof i&&(delete i.refresh,delete i.render,t.extend(this.prototype,i))},refresh:function(){t.each(this.sliders,function(){this.refresh()}),this.isFresh=!0},render:function(){this.isFresh||this.refresh(),t.each(this.sliders,function(){this.render()})},requestRender:function(){var t=this;this.isBusy||(this.isBusy=!0,i.requestAnimationFrame(function(){t.render(),t.isBusy=!1}))},destroy:function(e){var s,h=t(e).data("px.parallax");for(h.$mirror.remove(),s=0;s<this.sliders.length;s+=1)this.sliders[s]==h&&this.sliders.splice(s,1);t(e).data("px.parallax",!1),0===this.sliders.length&&(t(i).off("scroll.px.parallax resize.px.parallax load.px.parallax"),this.isReady=!1,o.isSetup=!1)}});var r=t.fn.parallax;t.fn.parallax=h,t.fn.parallax.Constructor=o,t.fn.parallax.noConflict=function(){return t.fn.parallax=r,this},t(e).on("ready.px.parallax.data-api",function(){t('[data-parallax="scroll"]').parallax()})}(jQuery,window,document);

/*!
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * @Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * @Open source under the BSD License. (http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js)
 * 
*/
(function($){
    $.extend( $.easing, {
        easeInOutQuart: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b;}
    });
})(jQuery);

/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright 2015 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});

/* jquery.simplr.smoothscroll version 1.0.1 copyright (c) 2012 https://github.com/simov/simplr-smoothscroll licensed under MIT */
!function(e){"use strict";e.srSmoothscroll=function(t){var n=e.extend({step:55,speed:400,ease:"swing",target:e("body"),container:e(window)},t||{}),o=n.container,r=0,i=n.step,s=o.height(),a=!1,c="body"==n.target.selector?-1!==navigator.userAgent.indexOf("AppleWebKit")?n.target:e("html"):o;n.target.mousewheel(function(e,t){return a=!0,r=0>t?r+s>=n.target.outerHeight(!0)?r:r+=i:0>=r?0:r-=i,c.stop().animate({scrollTop:r},n.speed,n.ease,function(){a=!1}),!1}),o.on("resize",function(){s=o.height()}).on("scroll",function(){a||(r=o.scrollTop())})}}(jQuery);

/*!
 * imagesLoaded PACKAGED v4.1.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */

!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||[];return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=n(t),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&d[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},o.prototype.check=function(){function t(t,i,n){setTimeout(function(){e.progress(t,i,n)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(h=e,h.fn.imagesLoaded=function(t,e){var i=new o(this,t,e);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});


(function($, win, doc, undefined){
    var academicCalendarCallbackObj;
    var resizeCallbackObj;
    var resizeCallbackNavObj;
    var resizeCallbackProjectObj;
    var $rowEqualHeightColSet;
    var $equalHeightColFlexChildSet;
    var $moveBtnToBottomSet;
    var $moveBtnToBottomBtnSet;
    var $equalHeightColSet;
    var equalizeColumns = function equalizeColumns(){
        cleanupButtonMargins();
        cleanupColumnsHeights();
        if($('body').outerWidth() > 480 && $rowEqualHeightColSet){
            $rowEqualHeightColSet.each(function(){
                var $this = $(this);
                var largestHeight = 0;
                var $colSet = $this.children('.equal-height-col');
                $colSet.each(function(){
                    if($(this).innerHeight() > largestHeight){
                        largestHeight = $(this).innerHeight();
                        largestHeight += 30;
                    } 
                });
                if(largestHeight > 0) {
                    $colSet.each(function(){
                        var $this = $(this);
                        $this.innerHeight(largestHeight);
                        var extraHeight = largestHeight + 30;
                        $this.children(':not(.equal-height-col-flex-child)').each(function(){
                            extraHeight = extraHeight - $(this).outerHeight();
                        });
                        if(extraHeight > 0){
                            $this.children('.equal-height-col-flex-child').height(extraHeight);
                        }
                    });
                    
                }
            });
            $('body').trigger('emory.equalizedheight');
        } else {
            $('body').trigger('emory.equalizedheight');
        }
    };
    
    
    

    var moveNavToTop = function(){
        var $rightLinks = $('#right-nav-container-bottom').children().detach();
        $('#right-nav-container').append($rightLinks);
        $(".nav-bottom" ).remove();

    };
    var moveNavToBottom = function(){
        var $rightLinks = $('#right-nav-container').children().detach();
        $('.detail-page').append($rightLinks);
        $rightLinks.wrap('<div class="nav-bottom"><div class="container"><div class="sections"><div class="row"><div id="right-nav-container-bottom"></div></div></div></div></div>');
    };

    navCheckFunc = function(){
        if($(win).width() >= 992) {
            moveNavToTop();
        } else {
            moveNavToBottom();
        }
    };
    
    //pshan Sep 26: Adjust blue block/grey block height/padding for responsive design
    /*
    var adjustAcademicCalendarHeight = function(){
        if($(win).width() >= 768){
            $('.event').each(function(){
               var maxHeight = Math.max($(this).find('.trumba-desc').height(), $(this).find('.date-block').outerHeight(), $(this).find('.event-buttons').outerHeight());
               
                $($(this).find('.date-block')).outerHeight(maxHeight);
                var dateBlockPadding = ($($(this).find('.date-block')).outerHeight()-$(this).find('.date-block').find('.day').height()-$(this).find('.date-block').find('.date').height())/2;
                $($(this).find('.date-block')).css('padding-top', dateBlockPadding+'px').css('padding-bottom', dateBlockPadding+'px');
                
                $(this).find('.trumba-desc').height(maxHeight);
                
                $($(this).find('.event-buttons')).outerHeight(maxHeight);
                /*
                var innerItemHeight, eventButtonPadding = 0;
                $(this).find('.event-buttons').find('a').each(function(){
                   innerItemHeight +=  $(this).outerHeight(true);//Add True for Margin Count
                });
                if($(win).width()<1280){
                    eventButtonPadding = ($(this).find('.event-buttons').outerHeight()-innerItemHeight)/2;
                }
                else{
                    eventButtonPadding = ($(this).find('.event-buttons').height()-innerItemHeight)/2;
                }
                $(this).find('.event-buttons').css('padding-top', eventButtonPadding+'px').css('padding-bottom', eventButtonPadding+'px');
                
            });
        }
    }
    */
    
    /*pshan Oct 20: temporary solution for https://3.basecamp.com/3247301/buckets/493962/todos/266581396
    var heroTextPlace = function(){
        if($(window).width()>=1051){
            var padding = ($('.parallax').height()-$('.hero-text-absolute').height())/2;
            $('.hero-text-absolute').css('top', $('.hero-text-absolute').height()+padding);
        }else{
             $('.hero-text-absolute').css('top', 'inherit');
        }
           
    }
    */
    
    var readyFunction = function(){
        $rowEqualHeightColSet = $('.row-equal-height-col');
        $moveBtnToBottomSet = $('.move-btn-to-bottom');
        $equalHeightColSet = $('.row-equal-height-col > .equal-height-col');
        $equalHeightColFlexChildSet = $('.equal-height-col-flex-child');
        $moveBtnToBottomBtnSet = $('.move-btn-to-bottom > .btn');
        
        if (!("ontouchstart" in win) && !navigator.msMaxTouchPoints) {
            $('body').addClass('no-touch');
        }
        
        //pshan Oct 19: a temporary fix for Basecamp problem: https://3.basecamp.com/3247301/buckets/493962/todos/265784767
        if($('.page-content').find('.wysiwyg-text').height() == 0){
            $('.page-content').css('padding-bottom', 0);
        }

        $(".top-button").on("click", function(e){ 
            e.preventDefault();
            $("body").animate({"scrollTop": 0}, 700);
        });

    
        //pshan Oct 21: Solution for unable to scroll down menu under Chrome (Mobile Horizontally), from https://github.com/drodata/yii2-app-template/issues/1
        //See https://3.basecamp.com/3247301/buckets/493962/todos/249283310 for detail
        if($(window).width()<768 && $(window).width()>468){
            $(".navbar-collapse").css({ maxHeight: $(window).height() - $(".navbar-header").height() + "px" });
        }
        
        
        var ie = 0;
        try { ie = navigator.userAgent.match( /(MSIE |Trident.*rv[ :])([0-9]+)/ )[ 2 ]; }
        catch(e){}
        if(ie == 10 || ie == 11){
            $.srSmoothscroll({
                "step": 100,
                "speed": 400,
                "ease": "swing",
                "target": $('body'),
                "container": $(win)
            });
        }
        navCheckFunc();
        
        
    };
    
    readyFunction.ran = false;
    
    $(doc).ready(function(){
        //Setup global set for callback functions
        //console.log('Here');
        if(!readyFunction.ran){
            readyFunction();
            readyFunction.ran = true;
        }
        
        //setTimeout(function(){ adjustAcademicCalendarHeight(); }, 500); // give .5 sec to load caledar
        
        $(function(){
            $(".dropdown-menu").on('click', 'li a', function(){
              $(".dropdown-toggle:first-child").text($(this).text());
              $(".dropdown-toggle:first-child").val($(this).text());
           });
        
        });
        
        //IMAGE WITH CONTENT ON TRIPLE ROW - REMOVE MEDIUM COLUMN CLASSES TO IMPROVE GRID
        $(".triple-column-block .image-with-content-column-classes").removeClass('col-md-offset-1 col-md-11');
        
        //jotform styles
        $('.form-dropdown').css({"width":"100% !important"});
        $('.form-label-left').css({"width":"100% !important"});
        
    });
    
    
    cleanupColumnsHeights = function cleanupColumnsHeights() {
        if($equalHeightColSet){
            $equalHeightColSet.removeAttr('style');
        }
        if($equalHeightColFlexChildSet){
            $equalHeightColFlexChildSet.removeAttr('style');
        }
    };
    
    cleanupButtonMargins = function cleanupButtonMargins() {
        if($moveBtnToBottomBtnSet){
            $moveBtnToBottomBtnSet.removeAttr('style');
        }
    };
    
    $('body').on('emory.equalizedheight', function(){
        cleanupButtonMargins();
        if($moveBtnToBottomSet){
            $moveBtnToBottomSet.each(function(){
                var $this = $(this);
                var extraHeight = $this.innerHeight();
                var $theButton = $this.children('.btn');
                $this.children(':not(.btn)').each(function(){
                    extraHeight = 30 + extraHeight - $(this).outerHeight();
                });
                if(extraHeight - $theButton.outerHeight(true) > 0){
                    $theButton.css('margin-top', '0');
                    $theButton.css('margin-top', (extraHeight - $theButton.outerHeight(true)) +'px');
                }
            });
        }
    });
    
    $(win).load(function(){
        if(!readyFunction.ran){
            readyFunction();
            readyFunction.ran = true;
        }
   
    });
    
    $(win).resize(function() {
        clearTimeout(resizeCallbackObj);
        // Long enough not to be trigger during active resizing && short enough not to a significant delay 
        resizeCallbackObj = setTimeout(equalizeColumns, 100);

        clearTimeout(resizeCallbackNavObj);
        resizeCallbackNavObj = setTimeout(navCheckFunc, 250);
        
        //heroTextPlace();
        //clearTimeout(academicCalendarCallbackObj);
       // academicCalendarCallbackObj = setTimeout(adjustAcademicCalendarHeight(), 100);
        
    });
    
    
    var equalizeSetHeight = function equalizeSetHeight($set){
        var largetHeight = 0;
        $set.css('height', 'auto');
        $set.each(function(){
            if($(this).outerHeight() > largetHeight){
                largetHeight = $(this).outerHeight();
            }
        });
        if(largetHeight > 0){
            $set.css('height', largetHeight + 'px');
        }
    }
    
    
    
    
    
     
})(jQuery, window, document);
     
setTimeout(function(){document.documentElement.className=document.documentElement.className.replace(/\bwf-loading\b/g," wf-inactive ")}, 3000);

function showDataRequest() {
    $(".data-request-form-page-container").show();
    $(".data-request-preprocess").hide();
    
}
