{"version":3,"sources":["executives.js"],"names":["$","document","ready","rebuildGrid","windowWidth","window","width","columnDivisor","theOutput","i","objectLength","executiveObject","smallImage","name","title","html","resizeIframe","theFrame","getElementById","contentWindow","body","offsetHeight","style","height","resizeTimer","length","modalContent","on","removeClass","addClass","e","clearTimeout","setTimeout","preventDefault","objectIndex","this","data","modalHTML","largeImage","bio","linkedin","twitter","setInterval"],"mappings":"AAAAA,EAAEC,QAAQ,EAAEC,MAAM,WAQhB,SAASC,IACP,IAAIC,EAAcJ,EAAEK,MAAM,EAAEC,MAAM,EAGhCC,EADiB,KAAfH,EACc,EACNA,GAAe,KAAsB,KAAfA,EAChB,EAEA,EAIlBI,EAAY,GACZA,GAAa,gKAGb,IAAK,IAAIC,EAAI,EAAGA,EAAIC,EAAcD,CAAC,GAGxB,EAAJA,GAAmB,GAFXA,EAAIF,IAGfC,GAAa,6KAGfA,GACE,wIAA0IC,EAAI,yGAE5HE,gBAAgBF,GAAGG,WAAa,UAAYD,gBAAgBF,GAAGI,KAAO,2EAEtDF,gBAAgBF,GAAGI,KAAO,qBACnDF,gBAAgBF,GAAGK,MAAQ,mBAKxCN,GAAa,eAEbR,EAAE,aAAa,EAAEe,KAAKP,CAAS,CACjC,CAwCA,SAASQ,IACP,IAAIC,EAAWhB,SAASiB,eAAe,mBAAmB,EAEtDD,MACoBA,EAASE,eAAiB,IAAIlB,UAAY,IAAImB,MAAQ,IAAIC,eAG9EJ,EAASK,MAAMC,OAASN,EAASE,cAAclB,SAASmB,KAAKC,aAAe,KAGlF,CA9FA,IAAIG,EAEAhB,EAAY,GACZD,EAAgB,EAChBG,EAAeC,gBAAgBc,OAC/BC,EAAe1B,EAAE,qBAAqB,EAiG1CA,EAAE,aAAa,EAAE2B,GAAG,kBAAmB,WACrCD,EAAaX,KAAK,EAAE,EACpBf,EAAE,SAAS,EAAE4B,YAAY,QAAQ,EAAEC,SAAS,QAAQ,CACtD,CAAC,EAGD7B,EAAEK,MAAM,EAAEsB,GAAG,SAAU,SAASG,GAC9BC,aAAaP,CAAW,EACxBA,EAAcQ,WAAW,WACvB7B,EAAY,CACd,EAAG,GAAG,CACR,CAAC,EACDH,EAAEC,QAAQ,EAAE0B,GAAG,QAAS,uBApExB,SAAsBG,GAEpBA,EAAEG,eAAe,EACjB,IAAIC,EAAclC,EAAEmC,IAAI,EAAEC,KAAK,cAAc,EACzCC,EAAY,GAGhBA,GACE,4JAEkB1B,gBAAgBuB,GAAaI,WAAa,+OAIT3B,gBAAgBuB,GAAarB,KAAO,wBACzEF,gBAAgBuB,GAAapB,MAAQ,QAC3CH,gBAAgBuB,GAAaK,IAC/B,8EAEK5B,gBAAgBuB,GAAaM,WAChCH,GAAa,gCAAkC1B,gBAAgBuB,GAAaM,SAAW,yKAGpF7B,gBAAgBuB,GAAaO,UAChCJ,GAAa,gCAAkC1B,gBAAgBuB,GAAaO,QAAU,wKAGhGJ,GACM,mCAIYK,YAAY1B,EAAc,GAAG,EAC/CU,EAAaX,KAAKsB,CAAS,EAmB3BrC,EAAE,SAAS,EAAE4B,YAAY,QAAQ,EAAEC,SAAS,QAAQ,CAjBtD,CAiC4D,EAC5D1B,EAAY,CACd,CAAC","file":"executives.min.js","sourcesContent":["$(document).ready(function() {\n var resizeTimer;\n var count = 18;\n var theOutput = '';\n var columnDivisor = 0;\n var objectLength = executiveObject.length;\n var modalContent = $('#exec-modal-content');\n\n function rebuildGrid() {\n var windowWidth = $(window).width();\n\n if (windowWidth >= 993) {\n columnDivisor = 4;\n } else if ( windowWidth <= 992 && windowWidth >= 576) {\n columnDivisor = 2;\n } else {\n columnDivisor = 1;\n }\n \n // Start Build\n theOutput = '';\n theOutput += '
';\n\n // Loop through the children\n for (var i = 0; i < objectLength; i++) {\n var newRow = i % columnDivisor;\n\n if ( i > 0 && newRow == 0) {\n theOutput += '
';\n }\n\n theOutput +=\n '\\\n
\\\n \"'\\\n
\\\n

'+ executiveObject[i].name + '

\\\n

' + executiveObject[i].title + '

\\\n
';\n }\n\n // End Build\n theOutput += '
';\n\n $('#executives').html(theOutput);\n }\n\n function displayModal(e) {\n // Gather key components from clicked trigger\n e.preventDefault();\n var objectIndex = $(this).data('object-index');\n var modalHTML = '';\n\n // Build modal markup\n modalHTML += \n '
\\\n
\\\n \\\n
\\\n
\\\n
\\\n

' + executiveObject[objectIndex].name + '

\\\n

' + executiveObject[objectIndex].title + '

'\n + executiveObject[objectIndex].bio +\n '
';\n \n if ( executiveObject[objectIndex].linkedin ) {\n modalHTML += '';\n }\n \n if ( executiveObject[objectIndex].twitter ) {\n modalHTML += '';\n }\n \n modalHTML += \n '
\\\n
\\\n
';\n \n var resizeTimer = setInterval(resizeIframe, 300);\n modalContent.html(modalHTML);\n hideSpinner();\n }\n\n // Helper functions to fire the iFrame resizing on loads and viewport adjustment\n function resizeIframe() {\n var theFrame = document.getElementById('mcui-modal-iframe');\n\n if (theFrame) {\n var offsetHeight = (((theFrame.contentWindow || {}).document || {}).body || {}).offsetHeight;\n \n if (offsetHeight) {\n theFrame.style.height = theFrame.contentWindow.document.body.offsetHeight + 'px';\n }\n }\n }\n\n // Hide spinner when iFrame loads\n function hideSpinner() {\n $('#loader').removeClass('d-flex').addClass('d-none');\n }\n\n // Shut off videos on modal close\n $('#exec-modal').on('hidden.bs.modal', function () {\n modalContent.html('');\n $('#loader').removeClass('d-none').addClass('d-flex');\n });\n\n // Init\n $(window).on('resize', function(e) {\n clearTimeout(resizeTimer);\n resizeTimer = setTimeout(function() {\n rebuildGrid();\n }, 250);\n });\n $(document).on('click', '[href=\"#exec-modal\"]', displayModal);\n rebuildGrid();\n});"]}