<script src="../javascripts/foundation/jquery.placeholder.min.js"></script>
<script src="../javascripts/foundation/modernizr.foundation.js"></script>
<script src="../javascripts/foundation/jquery.tooltips.js"></script>
+ <script src="../javascripts/foundation.top-bar.js"></script>
<script src="../javascripts/foundation/app.js"></script>
<script src="presentation.js"></script>
<script src="http://www.zurb.com/assets/zurb.mega-drop.js"></script>
<script src="javascripts/foundation/jquery.customforms.js"></script>
<script src="javascripts/foundation/jquery.placeholder.min.js"></script>
<script src="javascripts/foundation/jquery.tooltips.js"></script>
+ <script src="javascripts/foundation.top-bar.js"></script>
<script src="javascripts/foundation/app.js"></script>
<script src="swipe.js"></script>
<script src="github.js"></script>
--- /dev/null
+(function ($) {
+ var currentIndex = 0;
+
+ function onMobile() {
+ return $(window).width() < 768;
+ }
+
+ function initializeMarkup($topbar) {
+ var $attached = $topbar.find('.attached');
+
+ // Pull element out of the DOM for manipulation
+ $attached.detach();
+
+ console.log($attached, $attached.find('li.has-dropdown>a'));
+
+ $attached.find('li.has-dropdown>a').each(function () {
+ var $link = $(this),
+ $dropdown = $link.siblings('ul.dropdown'),
+ $titleLi = $('<li class="title show-on-phones js-generated"><h5></h5></li>');
+
+ // Copy link to subnav
+ $titleLi.find('h5').html($link.html());
+ $dropdown.prepend($titleLi);
+ $dropdown.prepend('<li class="back show-on-phones js-generated"><a href="">← Back</a></li>');
+ });
+
+ // Put element back in the DOM
+ $attached.appendTo($topbar);
+ }
+
+ $('.top-bar .name').on('click', function (event) {
+ var $this = $(this);
+ console.log('clicked');
+ if (onMobile()) {
+ event.preventDefault();
+ console.log('mobile');
+ if (!$this.hasClass('top-bar-initialized')) {
+ console.log('add initialized');
+ initializeMarkup($this.closest('.top-bar'));
+ $this.addClass('top-bar-initialized');
+ }
+
+ $this.closest('.top-bar').toggleClass('expanded');
+ }
+ });
+
+ $('body.ie8 .has-dropdown, body.ie7 .has-dropdown').live({
+ mouseenter: function() {
+ $(this).children('.dropdown').show();
+ },
+ mouseleave: function() {
+ $(this).children('.dropdown').hide();
+ }
+ });
+
+ $('.top-bar .has-dropdown>a').live('click', function (event) {
+ if (onMobile()) {
+ var $this = $(this),
+ $selectedLi = $this.closest('li'),
+ $nextLevelUl = $selectedLi.find('>ul'),
+ $titleLi = $('<li class="title show-on-phones js-generated"><h5></h5></li>'),
+ $attached = $this.closest('.attached'),
+ $topbar = $this.closest('.top-bar'),
+ $largestUl;
+
+ event.preventDefault();
+
+ currentIndex += 1;
+
+ $selectedLi.addClass('active');
+ $attached.css({'left': '-' + 100 * currentIndex + '%'});
+ $attached.find('>.name').css({'left': 100 * currentIndex + '%'});
+
+ if (currentIndex === 1) {
+ $largestUl = $nextLevelUl;
+ $nextLevelUl.find('ul.dropdown').each(function () {
+ if ($(this).outerHeight() > $largestUl.outerHeight()) {
+ $largestUl = $(this);
+ }
+ });
+ $attached.css({'height': $largestUl.outerHeight() + 45 + 'px'});
+ }
+ }
+ });
+
+ $('.top-bar .has-dropdown .back').live('click', function (event) {
+ var $this = $(this),
+ $activeLi = $this.closest('li.active'),
+ $attached = $this.closest('.attached'),
+ $topbar = $this.closest('.top-bar'),
+ $previousLevelUl = $activeLi.closest('ul');
+
+ event.preventDefault();
+
+ currentIndex -= 1;
+
+ $attached.css({'left': '-' + 100 * currentIndex + '%'});
+ $attached.find('>.name').css({'left': 100 * currentIndex + '%'});
+
+ if (currentIndex === 0) {
+ $attached.css({'height': ''});
+ }
+
+ setTimeout(function () {
+ $activeLi.removeClass('active');
+ }, 200);
+ });
+
+}(jQuery));
\ No newline at end of file
.top-bar .attached > .name span { padding-left: 0 !important; }
}
@media only screen and (max-width: 767px) {
- .top-bar { height: auto !important; }
+ .top-bar { overflow: hidden; height: 45px; }
+ .top-bar.expanded { height: auto !important; }
.top-bar .name span { margin-left: 0px !important; }
.top-bar .attached > ul > li > a, .top-bar .attached > ul > li > span { padding-left: 0px; padding-right: 0px; }
.top-bar .attached > ul > li.download a { margin-bottom: 30px !important; margin-top: 10px; }
.top-bar .attached > .name span { padding-left: 0 !important; }
}
@media only screen and (max-width: 767px) {
- .top-bar { height: auto !important; }
+ .top-bar { overflow: hidden; height: 45px; }
+ .top-bar.expanded { height: auto !important; }
.top-bar .name span { margin-left: 0px !important; }
.top-bar .attached > ul > li > a, .top-bar .attached > ul > li > span { padding-left: 0px; padding-right: 0px; }
.top-bar .attached > ul > li.download a { margin-bottom: 30px !important; margin-top: 10px; }
+@charset "UTF-8";
/* Requires: normalize.css -box-sizing.htc */
/* Global Reset & Standards ---------------------- */
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
/* Timer ---------------------- */
div.orbit-wrapper div.timer { width: 40px; height: 40px; overflow: hidden; position: absolute; top: 10px; right: 10px; opacity: .6; cursor: pointer; z-index: 31; }
-div.orbit-wrapper span.rotator { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: -20px; background: url('../../images/foundation/orbit/rotator-black.png?1340846519') no-repeat; z-index: 3; }
+div.orbit-wrapper span.rotator { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: -20px; background: url('../../images/foundation/orbit/rotator-black.png?1340839300') no-repeat; z-index: 3; }
div.orbit-wrapper span.mask { display: block; width: 20px; height: 40px; position: absolute; top: 0; right: 0; z-index: 2; overflow: hidden; }
div.orbit-wrapper span.rotator.move { left: 0; }
-div.orbit-wrapper span.mask.move { width: 40px; left: 0; background: url('../../images/foundation/orbit/timer-black.png?1340846519') repeat 0 0; }
+div.orbit-wrapper span.mask.move { width: 40px; left: 0; background: url('../../images/foundation/orbit/timer-black.png?1340839300') repeat 0 0; }
-div.orbit-wrapper span.pause { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: 0; background: url('../../images/foundation/orbit/pause-black.png?1340846519') no-repeat; z-index: 4; opacity: 0; }
+div.orbit-wrapper span.pause { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: 0; background: url('../../images/foundation/orbit/pause-black.png?1340839300') no-repeat; z-index: 4; opacity: 0; }
-div.orbit-wrapper span.pause.active { background: url('../../images/foundation/orbit/pause-black.png?1340846519') no-repeat 0 -40px; }
+div.orbit-wrapper span.pause.active { background: url('../../images/foundation/orbit/pause-black.png?1340839300') no-repeat 0 -40px; }
div.orbit-wrapper div.timer:hover span.pause, div.orbit-wrapper span.pause.active { opacity: 1; }
div.orbit-wrapper div.slider-nav span { width: 39px; height: 50px; text-indent: -9999px; position: absolute; z-index: 30; top: 50%; margin-top: -25px; cursor: pointer; }
-div.orbit-wrapper div.slider-nav span.right { background: url('../../images/foundation/orbit/right-arrow.png?1340862868'); background-size: 100%; right: 0; }
+div.orbit-wrapper div.slider-nav span.right { background: url('../../images/foundation/orbit/right-arrow.png?1340918712'); background-size: 100%; right: 0; }
-div.orbit-wrapper div.slider-nav span.left { background: url('../../images/foundation/orbit/left-arrow.png?1340846519'); background-size: 100%; left: 0; }
+div.orbit-wrapper div.slider-nav span.left { background: url('../../images/foundation/orbit/left-arrow.png?1340839300'); background-size: 100%; left: 0; }
-.lt-ie9 div.orbit-wrapper div.slider-nav span.right { background: url('../../images/foundation/orbit/right-arrow-small.png?1340862688'); }
-.lt-ie9 div.orbit-wrapper div.slider-nav span.left { background: url('../../images/foundation/orbit/left-arrow-small.png?1340862688'); }
+.lt-ie9 div.orbit-wrapper div.slider-nav span.right { background: url('../../images/foundation/orbit/right-arrow-small.png?1340918712'); }
+.lt-ie9 div.orbit-wrapper div.slider-nav span.left { background: url('../../images/foundation/orbit/left-arrow-small.png?1340918712'); }
/* Bullet Nav ---------------------- */
ul.orbit-bullets { position: absolute; z-index: 30; list-style: none; bottom: -40px; left: 50%; margin-left: -50px; padding: 0; }
-ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../../images/foundation/orbit/bullets.jpg?1340846477') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
+ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../../images/foundation/orbit/bullets.jpg?1340839282') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
ul.orbit-bullets li.active { color: #222; background-position: -8px 0; }
ul.orbit-bullets { position: absolute; z-index: 30; list-style: none; bottom: -50px; left: 50%; margin-left: -50px; padding: 0; }
-ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../../images/foundation/orbit/bullets.jpg?1340846477') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
+ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../../images/foundation/orbit/bullets.jpg?1340839282') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
ul.orbit-bullets li.has-thumb { background: none; width: 100px; height: 75px; }
.top-bar .attached > .name span > a { width: auto; padding: 0 !important; text-indent: 0 !important; }
.top-bar .attached > ul > li > a, .top-bar .attached > ul > li > span { height: 45px !important; text-indent: 0; }
.top-bar .attached > ul > li > a.button { height: auto !important; } }
-<<<<<<< HEAD
@media only screen and (device-width: 1280px) { .top-bar { height: 45px !important; }
.top-bar .attached > .name span { padding-left: 0 !important; } }
-@media only screen and (max-width: 767px) { .top-bar { height: auto !important; }
+@media only screen and (max-width: 767px) { .top-bar { overflow: hidden; height: 45px; }
+ .top-bar.expanded { height: auto !important; }
.top-bar .name span { margin-left: 0px !important; }
.top-bar .attached > ul > li > a, .top-bar .attached > ul > li > span { padding-left: 0px; padding-right: 0px; }
.top-bar .attached > ul > li.download a { margin-bottom: 30px !important; margin-top: 10px; }
.touch .top-bar .attached { height: 45px !important; }
.touch .top-bar .attached > ul.right { overflow: hidden; height: 45px !important; } }
@media only screen and (orientation: landscape) { .touch .top-bar .attached > ul.right { height: 45px !important; overflow: hidden !important; } }
-@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { .top-bar .attached > .name span > a.toggle-nav { background-image: url('../../images/plus-toggle-2-retina.png?1340842456'); background-size: 100% 100%; } }
-=======
-@media only screen and (max-device-width: 1280px) { .top-bar .attached > .name span { padding-left: 0 !important; } }
-@media only screen and (max-width: 767px) { .top-bar .attached > w.name span { margin-left: 0px !important; } }
-@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { .top-bar .attached > .name span > a.toggle-nav { background-image: url('../../images/plus-toggle-2-retina.png?1340846519'); background-size: 100% 100%; } }
->>>>>>> Fixed the forms and prefixes to work everywhere
+@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { .top-bar .attached > .name span > a.toggle-nav { background-image: url('../../images/plus-toggle-2-retina.png?1340839300'); background-size: 100% 100%; } }
#megaDrop li { list-style: none; }
#megaDrop .show-on-phones, #megaDrop .sitemap-link { display: none !important; }
+@charset "UTF-8";
/* This is for all IE specfific style less than IE9. We hate IE. */
.lt-ie8 .row { max-width: 1000px; }
+@charset "UTF-8";
/* Requires: normalize.css -box-sizing.htc */
/* Global Reset & Standards ---------------------- */
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
/* Timer ---------------------- */
div.orbit-wrapper div.timer { width: 40px; height: 40px; overflow: hidden; position: absolute; top: 10px; right: 10px; opacity: .6; cursor: pointer; z-index: 31; }
-div.orbit-wrapper span.rotator { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: -20px; background: url('../images/foundation/orbit/rotator-black.png?1340842456') no-repeat; z-index: 3; }
+div.orbit-wrapper span.rotator { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: -20px; background: url('../images/foundation/orbit/rotator-black.png?1340839300') no-repeat; z-index: 3; }
div.orbit-wrapper span.mask { display: block; width: 20px; height: 40px; position: absolute; top: 0; right: 0; z-index: 2; overflow: hidden; }
div.orbit-wrapper span.rotator.move { left: 0; }
-div.orbit-wrapper span.mask.move { width: 40px; left: 0; background: url('../images/foundation/orbit/timer-black.png?1340842456') repeat 0 0; }
+div.orbit-wrapper span.mask.move { width: 40px; left: 0; background: url('../images/foundation/orbit/timer-black.png?1340839300') repeat 0 0; }
-div.orbit-wrapper span.pause { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: 0; background: url('../images/foundation/orbit/pause-black.png?1340842456') no-repeat; z-index: 4; opacity: 0; }
+div.orbit-wrapper span.pause { display: block; width: 40px; height: 40px; position: absolute; top: 0; left: 0; background: url('../images/foundation/orbit/pause-black.png?1340839300') no-repeat; z-index: 4; opacity: 0; }
-div.orbit-wrapper span.pause.active { background: url('../images/foundation/orbit/pause-black.png?1340842456') no-repeat 0 -40px; }
+div.orbit-wrapper span.pause.active { background: url('../images/foundation/orbit/pause-black.png?1340839300') no-repeat 0 -40px; }
div.orbit-wrapper div.timer:hover span.pause, div.orbit-wrapper span.pause.active { opacity: 1; }
div.orbit-wrapper div.slider-nav span { width: 39px; height: 50px; text-indent: -9999px; position: absolute; z-index: 30; top: 50%; margin-top: -25px; cursor: pointer; }
-div.orbit-wrapper div.slider-nav span.right { background: url('../images/foundation/orbit/right-arrow.png?1340900207'); background-size: 100%; right: 0; }
+div.orbit-wrapper div.slider-nav span.right { background: url('../images/foundation/orbit/right-arrow.png?1340918712'); background-size: 100%; right: 0; }
-div.orbit-wrapper div.slider-nav span.left { background: url('../images/foundation/orbit/left-arrow.png?1340842456'); background-size: 100%; left: 0; }
+div.orbit-wrapper div.slider-nav span.left { background: url('../images/foundation/orbit/left-arrow.png?1340839300'); background-size: 100%; left: 0; }
-.lt-ie9 div.orbit-wrapper div.slider-nav span.right { background: url('../images/foundation/orbit/right-arrow-small.png?1340900207'); }
-.lt-ie9 div.orbit-wrapper div.slider-nav span.left { background: url('../images/foundation/orbit/left-arrow-small.png?1340900207'); }
+.lt-ie9 div.orbit-wrapper div.slider-nav span.right { background: url('../images/foundation/orbit/right-arrow-small.png?1340918712'); }
+.lt-ie9 div.orbit-wrapper div.slider-nav span.left { background: url('../images/foundation/orbit/left-arrow-small.png?1340918712'); }
/* Bullet Nav ---------------------- */
ul.orbit-bullets { position: absolute; z-index: 30; list-style: none; bottom: -40px; left: 50%; margin-left: -50px; padding: 0; }
-ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../images/foundation/orbit/bullets.jpg?1340842444') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
+ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../images/foundation/orbit/bullets.jpg?1340839282') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
ul.orbit-bullets li.active { color: #222; background-position: -8px 0; }
ul.orbit-bullets { position: absolute; z-index: 30; list-style: none; bottom: -50px; left: 50%; margin-left: -50px; padding: 0; }
-ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../images/foundation/orbit/bullets.jpg?1340842444') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
+ul.orbit-bullets li { float: left; margin-left: 5px; cursor: pointer; color: #999; text-indent: -9999px; background: url('../images/foundation/orbit/bullets.jpg?1340839282') no-repeat 4px 0; width: 13px; height: 12px; overflow: hidden; }
ul.orbit-bullets li.has-thumb { background: none; width: 100px; height: 75px; }
.top-bar .attached > ul > li > a.button { height: auto !important; } }
@media only screen and (device-width: 1280px) { .top-bar { height: 45px !important; }
.top-bar .attached > .name span { padding-left: 0 !important; } }
-@media only screen and (max-width: 767px) { .top-bar { height: auto !important; }
+@media only screen and (max-width: 767px) { .top-bar { overflow: hidden; height: 45px; }
+ .top-bar.expanded { height: auto !important; }
.top-bar .name span { margin-left: 0px !important; }
.top-bar .attached > ul > li > a, .top-bar .attached > ul > li > span { padding-left: 0px; padding-right: 0px; }
.top-bar .attached > ul > li.download a { margin-bottom: 30px !important; margin-top: 10px; }
/* DROPDOWN NAV ------------- */
var lockNavBar = false;
+ if (Modernizr.touch) {
$('.nav-bar a.flyout-toggle').on('click.fndtn touchstart.fndtn mousedown.fndtn mouseup.fndtn mouseover.fndtn mouseout.fndtn', function(e) {
e.preventDefault();
console.log($(this).data('events'));
}
lockNavBar = true;
});
- if (Modernizr.touch) {
$('.nav-bar>li.has-flyout').addClass('is-touch');
} else {
$('.nav-bar>li.has-flyout').hover(function() {