Page MenuHomeWolfplex

No OneTemporary

diff --git a/assets/scripts/foreground.js b/assets/scripts/foreground.js
new file mode 100644
index 0000000..9623170
--- /dev/null
+++ b/assets/scripts/foreground.js
@@ -0,0 +1,9 @@
+jQuery(document).ready(function() {
+
+ /* INITIATE PLACEHOLDERS */
+ $('input, textarea').placeholder();
+
+ /* INITIATE TOOLTIPS */
+ $(this).tooltips();
+
+});
\ No newline at end of file
diff --git a/assets/scripts/foundation/jquery.customforms.js b/assets/scripts/foundation/jquery.customforms.js
new file mode 100644
index 0000000..c1904bf
--- /dev/null
+++ b/assets/scripts/foundation/jquery.customforms.js
@@ -0,0 +1,258 @@
+/*
+ * jQuery Custom Forms Plugin 1.0
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+jQuery.foundation = jQuery.foundation || {};
+jQuery.foundation.customForms = jQuery.foundation.customForms || {};
+
+jQuery(document).ready(function ($) {
+
+ $.foundation.customForms.appendCustomMarkup = function (options) {
+ var defaults = {
+ disable_class: "js-disable-custom"
+ };
+ var options = $.extend(defaults, options);
+
+ function appendCustomMarkup(idx, sel) {
+ var $this = $(sel).hide(),
+ type = $this.attr('type'),
+ $span = $this.next('span.custom.' + type);
+
+ if ($span.length === 0) {
+ $span = $('<span class="custom ' + type + '"></span>').insertAfter($this);
+ }
+
+ $span.toggleClass('checked', $this.is(':checked'));
+ $span.toggleClass('disabled', $this.is(':disabled'));
+ }
+
+ function appendCustomSelect(idx, sel) {
+ var $this = $(sel),
+ $customSelect = $this.next('div.custom.dropdown'),
+ $options = $this.find('option'),
+ $seloptions = $this.find('option:selected'),
+ maxWidth = 0,
+ $li;
+
+ if ($this.hasClass('no-custom')) { return; }
+ if ($customSelect.length === 0) {
+ $customSelectSize = '';
+ if ($(sel).hasClass('small')) {
+ $customSelectSize = 'small';
+ } else if ($(sel).hasClass('medium')) {
+ $customSelectSize = 'medium';
+ } else if ($(sel).hasClass('large')) {
+ $customSelectSize = 'large';
+ } else if ($(sel).hasClass('expand')) {
+ $customSelectSize = 'expand';
+ }
+ $customSelect = $('<div class="custom dropdown ' + $customSelectSize + '"><a href="#" class="selector"></a><ul></ul></div>"');
+ $options.each(function () {
+ $li = $('<li>' + $(this).html() + '</li>');
+ $customSelect.find('ul').append($li);
+ });
+ $customSelect.prepend('<a href="#" class="current">' + $seloptions.html() + '</a>');
+
+ $this.after($customSelect);
+ $this.hide();
+
+ } else {
+ // refresh the ul with options from the select in case the supplied markup doesn't match
+ $customSelect.find('ul').html('');
+ $options.each(function () {
+ $li = $('<li>' + $(this).html() + '</li>');
+ $customSelect.find('ul').append($li);
+ });
+ }
+
+ $customSelect.toggleClass('disabled', $this.is(':disabled'));
+
+ $options.each(function (index) {
+ if (this.selected) {
+ $customSelect.find('li').eq(index).addClass('selected');
+ $customSelect.find('.current').html($(this).html());
+ }
+ });
+
+ $customSelect.css('width', 'inherit');
+ $customSelect.find('ul').css('width', 'inherit');
+
+ $customSelect.find('li').each(function () {
+ $customSelect.addClass('open');
+ if ($(this).outerWidth() > maxWidth) {
+ maxWidth = $(this).outerWidth();
+ }
+ $customSelect.removeClass('open');
+ });
+
+ if (!$customSelect.is('.small, .medium, .large, .expand')) {
+ $customSelect.css('width', maxWidth + 18 + 'px');
+ $customSelect.find('ul').css('width', maxWidth + 16 + 'px');
+ }
+
+ }
+
+ $('form.custom input:radio[data-customforms!=disabled]').each(appendCustomMarkup);
+ $('form.custom input:checkbox[data-customforms!=disabled]').each(appendCustomMarkup);
+ $('form.custom select[data-customforms!=disabled]').each(appendCustomSelect);
+ };
+
+});
+
+(function ($) {
+
+ function refreshCustomSelect($select) {
+ var maxWidth = 0,
+ $customSelect = $select.next();
+ $options = $select.find('option');
+ $customSelect.find('ul').html('');
+
+ $options.each(function () {
+ $li = $('<li>' + $(this).html() + '</li>');
+ $customSelect.find('ul').append($li);
+ });
+
+ // re-populate
+ $options.each(function (index) {
+ if (this.selected) {
+ $customSelect.find('li').eq(index).addClass('selected');
+ $customSelect.find('.current').html($(this).html());
+ }
+ });
+
+ // fix width
+ $customSelect.removeAttr('style')
+ .find('ul').removeAttr('style');
+ $customSelect.find('li').each(function () {
+ $customSelect.addClass('open');
+ if ($(this).outerWidth() > maxWidth) {
+ maxWidth = $(this).outerWidth();
+ }
+ $customSelect.removeClass('open');
+ });
+ $customSelect.css('width', maxWidth + 18 + 'px');
+ $customSelect.find('ul').css('width', maxWidth + 16 + 'px');
+
+ }
+
+ function toggleCheckbox($element) {
+ var $input = $element.prev(),
+ input = $input[0];
+
+ if (false == $input.is(':disabled')) {
+ input.checked = ((input.checked) ? false : true);
+ $element.toggleClass('checked');
+
+ $input.trigger('change');
+ }
+ }
+
+ function toggleRadio($element) {
+ var $input = $element.prev(),
+ input = $input[0];
+
+ if (false == $input.is(':disabled')) {
+ $('input:radio[name="' + $input.attr('name') + '"]').each(function () {
+ $(this).next().removeClass('checked');
+ });
+ input.checked = ((input.checked) ? false : true);
+ $element.toggleClass('checked');
+
+ $input.trigger('change');
+ }
+ }
+
+ $('form.custom span.custom.checkbox').live('click', function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ toggleCheckbox($(this));
+ });
+
+ $('form.custom span.custom.radio').live('click', function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ toggleRadio($(this));
+ });
+
+ $('form.custom select').live('change', function (event) {
+ refreshCustomSelect($(this));
+ });
+
+ $('form.custom label').live('click', function (event) {
+ var $associatedElement = $('#' + $(this).attr('for')),
+ $customCheckbox,
+ $customRadio;
+ if ($associatedElement.length !== 0) {
+ if ($associatedElement.attr('type') === 'checkbox') {
+ event.preventDefault();
+ $customCheckbox = $(this).find('span.custom.checkbox');
+ toggleCheckbox($customCheckbox);
+ } else if ($associatedElement.attr('type') === 'radio') {
+ event.preventDefault();
+ $customRadio = $(this).find('span.custom.radio');
+ toggleRadio($customRadio);
+ }
+ }
+ });
+
+ $('form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector').live('click', function (event) {
+ var $this = $(this),
+ $dropdown = $this.closest('div.custom.dropdown'),
+ $select = $dropdown.prev();
+
+ event.preventDefault();
+ $('div.dropdown').removeClass('open');
+
+ if (false == $select.is(':disabled')) {
+ $dropdown.toggleClass('open');
+
+ if ($dropdown.hasClass('open')) {
+ $(document).bind('click.customdropdown', function (event) {
+ $dropdown.removeClass('open');
+ $(document).unbind('.customdropdown');
+ });
+ } else {
+ $(document).unbind('.customdropdown');
+ }
+ return false;
+ }
+ });
+
+ $('form.custom div.custom.dropdown li').live('click', function (event) {
+ var $this = $(this),
+ $customDropdown = $this.closest('div.custom.dropdown'),
+ $select = $customDropdown.prev(),
+ selectedIndex = 0;
+
+ event.preventDefault();
+ event.stopPropagation();
+ $('div.dropdown').removeClass('open');
+
+ $this
+ .closest('ul')
+ .find('li')
+ .removeClass('selected');
+ $this.addClass('selected');
+
+ $customDropdown
+ .removeClass('open')
+ .find('a.current')
+ .html($this.html());
+
+ $this.closest('ul').find('li').each(function (index) {
+ if ($this[0] == this) {
+ selectedIndex = index;
+ }
+
+ });
+ $select[0].selectedIndex = selectedIndex;
+
+ $select.trigger('change');
+ });
+})(jQuery);
\ No newline at end of file
diff --git a/assets/scripts/foundation/jquery.orbit-1.4.0.js b/assets/scripts/foundation/jquery.orbit-1.4.0.js
new file mode 100644
index 0000000..f4acfe4
--- /dev/null
+++ b/assets/scripts/foundation/jquery.orbit-1.4.0.js
@@ -0,0 +1,633 @@
+/*
+ * jQuery Orbit Plugin 1.4.0
+ * www.ZURB.com/playground
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+
+(function($) {
+ 'use strict';
+ $.fn.findFirstImage = function () {
+ return this.first()
+ .find('img')
+ .andSelf().filter('img')
+ .first();
+ };
+
+ var ORBIT = {
+
+ defaults: {
+ animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push
+ animationSpeed: 600, // how fast animtions are
+ timer: true, // true or false to have the timer
+ advanceSpeed: 4000, // if timer is enabled, time between transitions
+ pauseOnHover: false, // if you hover pauses the slider
+ startClockOnMouseOut: false, // if clock should start on MouseOut
+ startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
+ directionalNav: true, // manual advancing directional navs
+ directionalNavRightText: 'Right', // text of right directional element for accessibility
+ directionalNavLeftText: 'Left', // text of left directional element for accessibility
+ captions: true, // do you want captions?
+ captionAnimation: 'fade', // fade, slideOpen, none
+ captionAnimationSpeed: 600, // if so how quickly should they animate in
+ resetTimerOnClick: false, // true resets the timer instead of pausing slideshow progress on manual navigation
+ bullets: false, // true or false to activate the bullet navigation
+ bulletThumbs: false, // thumbnails for the bullets
+ bulletThumbLocation: '', // location from this file where thumbs will be
+ afterSlideChange: $.noop, // empty function
+ afterLoadComplete: $.noop, //callback to execute after everything has been loaded
+ fluid: true,
+ centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually
+ },
+
+ activeSlide: 0,
+ numberSlides: 0,
+ orbitWidth: null,
+ orbitHeight: null,
+ locked: null,
+ timerRunning: null,
+ degrees: 0,
+ wrapperHTML: '<div class="orbit-wrapper" />',
+ timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
+ captionHTML: '<div class="orbit-caption"></div>',
+ directionalNavHTML: '<div class="slider-nav"><span class="right"></span><span class="left"></span></div>',
+ bulletHTML: '<ul class="orbit-bullets"></ul>',
+
+ init: function (element, options) {
+ var $imageSlides,
+ imagesLoadedCount = 0,
+ self = this;
+
+ // Bind functions to correct context
+ this.clickTimer = $.proxy(this.clickTimer, this);
+ this.addBullet = $.proxy(this.addBullet, this);
+ this.resetAndUnlock = $.proxy(this.resetAndUnlock, this);
+ this.stopClock = $.proxy(this.stopClock, this);
+ this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this);
+ this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this);
+ this.rotateTimer = $.proxy(this.rotateTimer, this);
+
+ this.options = $.extend({}, this.defaults, options);
+ if (this.options.timer === 'false') this.options.timer = false;
+ if (this.options.captions === 'false') this.options.captions = false;
+ if (this.options.directionalNav === 'false') this.options.directionalNav = false;
+
+ this.$element = $(element);
+ this.$wrapper = this.$element.wrap(this.wrapperHTML).parent();
+ this.$slides = this.$element.children('img, a, div');
+
+ this.$element.bind('orbit.next', function () {
+ self.shift('next');
+ });
+
+ this.$element.bind('orbit.prev', function () {
+ self.shift('prev');
+ });
+
+ this.$element.bind('orbit.goto', function (event, index) {
+ self.shift(index);
+ });
+
+ this.$element.bind('orbit.start', function (event, index) {
+ self.startClock();
+ });
+
+ this.$element.bind('orbit.stop', function (event, index) {
+ self.stopClock();
+ });
+
+ $imageSlides = this.$slides.filter('img');
+
+ if ($imageSlides.length === 0) {
+ this.loaded();
+ } else {
+ $imageSlides.bind('imageready', function () {
+ imagesLoadedCount += 1;
+ if (imagesLoadedCount === $imageSlides.length) {
+ self.loaded();
+ }
+ });
+ }
+ },
+
+ loaded: function () {
+ this.$element
+ .addClass('orbit')
+ .css({width: '1px', height: '1px'});
+
+ this.$slides.addClass('orbit-slide');
+
+ this.setDimentionsFromLargestSlide();
+ this.updateOptionsIfOnlyOneSlide();
+ this.setupFirstSlide();
+
+ if (this.options.timer) {
+ this.setupTimer();
+ this.startClock();
+ }
+
+ if (this.options.captions) {
+ this.setupCaptions();
+ }
+
+ if (this.options.directionalNav) {
+ this.setupDirectionalNav();
+ }
+
+ if (this.options.bullets) {
+ this.setupBulletNav();
+ this.setActiveBullet();
+ }
+
+ this.options.afterLoadComplete.call(this);
+ },
+
+ currentSlide: function () {
+ return this.$slides.eq(this.activeSlide);
+ },
+
+ setDimentionsFromLargestSlide: function () {
+ //Collect all slides and set slider size of largest image
+ var self = this,
+ $fluidPlaceholder;
+
+ self.$element.add(self.$wrapper).width(this.$slides.first().outerWidth());
+ self.$element.add(self.$wrapper).height(this.$slides.first().height());
+ self.orbitWidth = this.$slides.first().outerWidth();
+ self.orbitHeight = this.$slides.first().height();
+ $fluidPlaceholder = this.$slides.first().findFirstImage().clone();
+
+
+ this.$slides.each(function () {
+ var slide = $(this),
+ slideWidth = slide.outerWidth(),
+ slideHeight = slide.height();
+
+ if (slideWidth > self.$element.outerWidth()) {
+ self.$element.add(self.$wrapper).width(slideWidth);
+ self.orbitWidth = self.$element.outerWidth();
+ }
+ if (slideHeight > self.$element.height()) {
+ self.$element.add(self.$wrapper).height(slideHeight);
+ self.orbitHeight = self.$element.height();
+ $fluidPlaceholder = $(this).findFirstImage().clone();
+ }
+ self.numberSlides += 1;
+ });
+
+ if (this.options.fluid) {
+ if (typeof this.options.fluid === "string") {
+ $fluidPlaceholder = $('<img src="http://placehold.it/' + this.options.fluid + '" />')
+ }
+
+ self.$element.prepend($fluidPlaceholder);
+ $fluidPlaceholder.addClass('fluid-placeholder');
+ self.$element.add(self.$wrapper).css({width: 'inherit'});
+ self.$element.add(self.$wrapper).css({height: 'inherit'});
+
+ $(window).bind('resize', function () {
+ self.orbitWidth = self.$element.outerWidth();
+ self.orbitHeight = self.$element.height();
+ });
+ }
+ },
+
+ //Animation locking functions
+ lock: function () {
+ this.locked = true;
+ },
+
+ unlock: function () {
+ this.locked = false;
+ },
+
+ updateOptionsIfOnlyOneSlide: function () {
+ if(this.$slides.length === 1) {
+ this.options.directionalNav = false;
+ this.options.timer = false;
+ this.options.bullets = false;
+ }
+ },
+
+ setupFirstSlide: function () {
+ //Set initial front photo z-index and fades it in
+ var self = this;
+ this.$slides.first()
+ .css({"z-index" : 3})
+ .fadeIn(function() {
+ //brings in all other slides IF css declares a display: none
+ self.$slides.css({"display":"block"})
+ });
+ },
+
+ startClock: function () {
+ var self = this;
+
+ if(!this.options.timer) {
+ return false;
+ }
+
+ if (this.$timer.is(':hidden')) {
+ this.clock = setInterval(function () {
+ self.$element.trigger('orbit.next');
+ }, this.options.advanceSpeed);
+ } else {
+ this.timerRunning = true;
+ this.$pause.removeClass('active')
+ this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180);
+ }
+ },
+
+ rotateTimer: function (reset) {
+ var degreeCSS = "rotate(" + this.degrees + "deg)"
+ this.degrees += 2;
+ this.$rotator.css({
+ "-webkit-transform": degreeCSS,
+ "-moz-transform": degreeCSS,
+ "-o-transform": degreeCSS
+ });
+ if(this.degrees > 180) {
+ this.$rotator.addClass('move');
+ this.$mask.addClass('move');
+ }
+ if(this.degrees > 360 || reset) {
+ this.$rotator.removeClass('move');
+ this.$mask.removeClass('move');
+ this.degrees = 0;
+ this.$element.trigger('orbit.next');
+ }
+ },
+
+ stopClock: function () {
+ if (!this.options.timer) {
+ return false;
+ } else {
+ this.timerRunning = false;
+ clearInterval(this.clock);
+ this.$pause.addClass('active');
+ }
+ },
+
+ setupTimer: function () {
+ this.$timer = $(this.timerHTML);
+ this.$wrapper.append(this.$timer);
+
+ this.$rotator = this.$timer.find('.rotator');
+ this.$mask = this.$timer.find('.mask');
+ this.$pause = this.$timer.find('.pause');
+
+ this.$timer.click(this.clickTimer);
+
+ if (this.options.startClockOnMouseOut) {
+ this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);
+ this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);
+ }
+
+ if (this.options.pauseOnHover) {
+ this.$wrapper.mouseenter(this.stopClock);
+ }
+ },
+
+ startTimerAfterMouseLeave: function () {
+ var self = this;
+
+ this.outTimer = setTimeout(function() {
+ if(!self.timerRunning){
+ self.startClock();
+ }
+ }, this.options.startClockOnMouseOutAfter)
+ },
+
+ clearClockMouseLeaveTimer: function () {
+ clearTimeout(this.outTimer);
+ },
+
+ clickTimer: function () {
+ if(!this.timerRunning) {
+ this.startClock();
+ } else {
+ this.stopClock();
+ }
+ },
+
+ setupCaptions: function () {
+ this.$caption = $(this.captionHTML);
+ this.$wrapper.append(this.$caption);
+ this.setCaption();
+ },
+
+ setCaption: function () {
+ var captionLocation = this.currentSlide().attr('data-caption'),
+ captionHTML;
+
+ if (!this.options.captions) {
+ return false;
+ }
+
+ //Set HTML for the caption if it exists
+ if (captionLocation) {
+ //if caption text is blank, don't show captions
+ if ($.trim($(captionLocation).text()).length < 1){
+ return false;
+ }
+ captionHTML = $(captionLocation).html(); //get HTML from the matching HTML entity
+ this.$caption
+ .attr('id', captionLocation) // Add ID caption TODO why is the id being set?
+ .html(captionHTML); // Change HTML in Caption
+ //Animations for Caption entrances
+ switch (this.options.captionAnimation) {
+ case 'none':
+ this.$caption.show();
+ break;
+ case 'fade':
+ this.$caption.fadeIn(this.options.captionAnimationSpeed);
+ break;
+ case 'slideOpen':
+ this.$caption.slideDown(this.options.captionAnimationSpeed);
+ break;
+ }
+ } else {
+ //Animations for Caption exits
+ switch (this.options.captionAnimation) {
+ case 'none':
+ this.$caption.hide();
+ break;
+ case 'fade':
+ this.$caption.fadeOut(this.options.captionAnimationSpeed);
+ break;
+ case 'slideOpen':
+ this.$caption.slideUp(this.options.captionAnimationSpeed);
+ break;
+ }
+ }
+ },
+
+ setupDirectionalNav: function () {
+ var self = this,
+ $directionalNav = $(this.directionalNavHTML);
+
+ $directionalNav.find('.right').html(this.options.directionalNavRightText);
+ $directionalNav.find('.left').html(this.options.directionalNavLeftText);
+
+ this.$wrapper.append($directionalNav);
+
+ this.$wrapper.find('.left').click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.prev');
+ });
+
+ this.$wrapper.find('.right').click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.next');
+ });
+ },
+
+ setupBulletNav: function () {
+ this.$bullets = $(this.bulletHTML);
+ this.$wrapper.append(this.$bullets);
+ this.$slides.each(this.addBullet);
+ this.$element.addClass('with-bullets');
+ if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.outerWidth() / 2);
+ },
+
+ addBullet: function (index, slide) {
+ var position = index + 1,
+ $li = $('<li>' + (position) + '</li>'),
+ thumbName,
+ self = this;
+
+ if (this.options.bulletThumbs) {
+ thumbName = $(slide).attr('data-thumb');
+ if (thumbName) {
+ $li
+ .addClass('has-thumb')
+ .css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});;
+ }
+ }
+ this.$bullets.append($li);
+ $li.data('index', index);
+ $li.click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.goto', [$li.data('index')])
+ });
+ },
+
+ setActiveBullet: function () {
+ if(!this.options.bullets) { return false; } else {
+ this.$bullets.find('li')
+ .removeClass('active')
+ .eq(this.activeSlide)
+ .addClass('active');
+ }
+ },
+
+ resetAndUnlock: function () {
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .css({"z-index" : 1});
+ this.unlock();
+ this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide));
+ },
+
+ shift: function (direction) {
+ var slideDirection = direction;
+
+ //remember previous activeSlide
+ this.prevActiveSlide = this.activeSlide;
+
+ //exit function if bullet clicked is same as the current image
+ if (this.prevActiveSlide == slideDirection) { return false; }
+
+ if (this.$slides.length == "1") { return false; }
+ if (!this.locked) {
+ this.lock();
+ //deduce the proper activeImage
+ if (direction == "next") {
+ this.activeSlide++;
+ if (this.activeSlide == this.numberSlides) {
+ this.activeSlide = 0;
+ }
+ } else if (direction == "prev") {
+ this.activeSlide--
+ if (this.activeSlide < 0) {
+ this.activeSlide = this.numberSlides - 1;
+ }
+ } else {
+ this.activeSlide = direction;
+ if (this.prevActiveSlide < this.activeSlide) {
+ slideDirection = "next";
+ } else if (this.prevActiveSlide > this.activeSlide) {
+ slideDirection = "prev"
+ }
+ }
+
+ //set to correct bullet
+ this.setActiveBullet();
+
+ //set previous slide z-index to one below what new activeSlide will be
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .css({"z-index" : 2});
+
+ //fade
+ if (this.options.animation == "fade") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"opacity" : 0, "z-index" : 3})
+ .animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+
+ //horizontal-slide
+ if (this.options.animation == "horizontal-slide") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": -this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ }
+
+ //vertical-slide
+ if (this.options.animation == "vertical-slide") {
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"top": this.orbitHeight, "z-index" : 3})
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"top": -this.orbitHeight, "z-index" : 3})
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ }
+
+ //horizontal-push
+ if (this.options.animation == "horizontal-push") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({"left" : -this.orbitWidth}, this.options.animationSpeed);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": -this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({"left" : this.orbitWidth}, this.options.animationSpeed);
+ }
+ }
+
+ //vertical-push
+ if (this.options.animation == "vertical-push") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({top: -this.orbitHeight, "z-index" : 3})
+ .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({top : this.orbitHeight}, this.options.animationSpeed);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({top: this.orbitHeight, "z-index" : 3})
+ .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({top : -this.orbitHeight}, this.options.animationSpeed);
+ }
+ }
+
+ this.setCaption();
+ }
+ }
+ };
+
+ $.fn.orbit = function (options) {
+ return this.each(function () {
+ var orbit = $.extend({}, ORBIT);
+ orbit.init(this, options);
+ });
+ };
+
+})(jQuery);
+
+/*!
+ * jQuery imageready Plugin
+ * http://www.zurb.com/playground/
+ *
+ * Copyright 2011, ZURB
+ * Released under the MIT License
+ */
+(function ($) {
+
+ var options = {};
+
+ $.event.special.imageready = {
+
+ setup: function (data, namespaces, eventHandle) {
+ options = data || options;
+ },
+
+ add: function (handleObj) {
+ var $this = $(this),
+ src;
+
+ if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
+ if (options.forceLoad) {
+ src = $this.attr('src');
+ $this.attr('src', '');
+ bindToLoad(this, handleObj.handler);
+ $this.attr('src', src);
+ } else if ( this.complete || this.readyState === 4 ) {
+ handleObj.handler.apply(this, arguments);
+ } else {
+ bindToLoad(this, handleObj.handler);
+ }
+ }
+ },
+
+ teardown: function (namespaces) {
+ $(this).unbind('.imageready');
+ }
+ };
+
+ function bindToLoad(element, callback) {
+ var $this = $(element);
+
+ $this.bind('load.imageready', function () {
+ callback.apply(element, arguments);
+ $this.unbind('load.imageready');
+ });
+ }
+
+}(jQuery));
\ No newline at end of file
diff --git a/assets/scripts/foundation/jquery.placeholder.min.js b/assets/scripts/foundation/jquery.placeholder.min.js
new file mode 100644
index 0000000..138ddd3
--- /dev/null
+++ b/assets/scripts/foundation/jquery.placeholder.min.js
@@ -0,0 +1,2 @@
+/*! http://mths.be/placeholder v2.0.7 by @mathias */
+;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery));
\ No newline at end of file
diff --git a/assets/scripts/foundation/jquery.reveal.js b/assets/scripts/foundation/jquery.reveal.js
new file mode 100644
index 0000000..39722f1
--- /dev/null
+++ b/assets/scripts/foundation/jquery.reveal.js
@@ -0,0 +1,178 @@
+/*
+ * jQuery Reveal Plugin 1.1
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*globals jQuery */
+
+(function ($) {
+ 'use strict';
+ var modalQueued = false;
+
+ $('a[data-reveal-id]').live('click', function (event) {
+ event.preventDefault();
+ var modalLocation = $(this).attr('data-reveal-id');
+ $('#' + modalLocation).reveal($(this).data());
+ });
+
+ $.fn.reveal = function (options) {
+ var defaults = {
+ animation: 'fadeAndPop', // fade, fadeAndPop, none
+ animationSpeed: 300, // how fast animtions are
+ closeOnBackgroundClick: true, // if you click background will modal close?
+ dismissModalClass: 'close-reveal-modal', // the class of a button or element that will close an open modal
+ open: $.noop,
+ opened: $.noop,
+ close: $.noop,
+ closed: $.noop
+ };
+ options = $.extend({}, defaults, options);
+
+ return this.each(function () {
+ var modal = $(this),
+ topMeasure = parseInt(modal.css('top'), 10),
+ topOffset = modal.height() + topMeasure,
+ locked = false,
+ modalBg = $('.reveal-modal-bg'),
+ closeButton;
+
+ if (modalBg.length === 0) {
+ modalBg = $('<div class="reveal-modal-bg" />').insertAfter(modal);
+ modalBg.fadeTo('fast', 0.8);
+ }
+
+ function unlockModal() {
+ locked = false;
+ }
+
+ function lockModal() {
+ locked = true;
+ }
+
+ function closeOpenModals(modal) {
+
+ var openModals = $(".reveal-modal.open");
+ if (openModals.length === 1) {
+ modalQueued = true;
+ $(".reveal-modal.open").trigger("reveal:close");
+ }
+ }
+
+ function openAnimation() {
+ if (!locked) {
+ lockModal();
+ closeOpenModals(modal);
+ modal.addClass("open");
+ if (options.animation === "fadeAndPop") {
+ modal.css({'top': $(document).scrollTop() - topOffset, 'opacity': 0, 'visibility': 'visible', 'display' : 'block'});
+ modalBg.fadeIn(options.animationSpeed / 2);
+ modal.delay(options.animationSpeed / 2).animate({
+ "top": $(document).scrollTop() + topMeasure + 'px',
+ "opacity": 1
+ }, options.animationSpeed, function () {
+ modal.trigger('reveal:opened');
+ });
+
+ }
+ if (options.animation === "fade") {
+ modal.css({'opacity': 0, 'visibility': 'visible', 'display' : 'block', 'top': $(document).scrollTop() + topMeasure});
+ modalBg.fadeIn(options.animationSpeed / 2);
+ modal.delay(options.animationSpeed / 2).animate({
+ "opacity": 1
+ }, options.animationSpeed, function () {
+ modal.trigger('reveal:opened');
+ });
+
+ }
+ if (options.animation === "none") {
+ modal.css({'visibility': 'visible', 'display' : 'block', 'top': $(document).scrollTop() + topMeasure});
+ modalBg.css({"display": "block"});
+ modal.trigger('reveal:opened');
+ }
+ }
+ }
+ modal.bind('reveal:open.reveal', openAnimation);
+
+ function closeAnimation() {
+ if (!locked) {
+ lockModal();
+ modal.removeClass("open");
+ if (options.animation === "fadeAndPop") {
+ modal.animate({
+ "top": $(document).scrollTop() - topOffset + 'px',
+ "opacity": 0
+ }, options.animationSpeed / 2, function () {
+ modal.css({'top': topMeasure, 'opacity': 1, 'visibility': 'hidden', 'display': 'none'});
+ });
+ if (!modalQueued) {
+ modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
+ modal.trigger('reveal:closed');
+ });
+ } else {
+ modal.trigger('reveal:closed');
+ }
+ modalQueued = false;
+ }
+ if (options.animation === "fade") {
+ modal.animate({
+ "opacity" : 0
+ }, options.animationSpeed, function () {
+ modal.css({'opacity': 1, 'visibility': 'hidden', 'display' : 'none', 'top': topMeasure});
+ });
+ if (!modalQueued) {
+ modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
+ modal.trigger('reveal:closed');
+ });
+ } else {
+ modal.trigger('reveal:closed');
+ }
+ }
+ if (options.animation === "none") {
+ modal.css({'visibility': 'hidden', 'display' : 'block', 'top': topMeasure});
+ if (!modalQueued) {
+ modalBg.css({'display': 'none'});
+ }
+ modal.trigger('reveal:closed');
+ }
+ }
+ }
+
+ function destroy() {
+ modal.unbind('.reveal');
+ modalBg.unbind('.reveal');
+ $('.' + options.dismissModalClass).unbind('.reveal');
+ $('body').unbind('.reveal');
+ }
+
+ modal.bind('reveal:close.reveal', closeAnimation);
+ modal.bind('reveal:opened.reveal reveal:closed.reveal', unlockModal);
+ modal.bind('reveal:closed.reveal', destroy);
+
+ modal.bind('reveal:open.reveal', options.open);
+ modal.bind('reveal:opened.reveal', options.opened);
+ modal.bind('reveal:close.reveal', options.close);
+ modal.bind('reveal:closed.reveal', options.closed);
+
+ modal.trigger('reveal:open');
+
+ closeButton = $('.' + options.dismissModalClass).bind('click.reveal', function () {
+ modal.trigger('reveal:close');
+ });
+
+ if (options.closeOnBackgroundClick) {
+ modalBg.css({"cursor": "pointer"});
+ modalBg.bind('click.reveal', function () {
+ modal.trigger('reveal:close');
+ });
+ }
+
+ $('body').bind('keyup.reveal', function (event) {
+ if (event.which === 27) { // 27 is the keycode for the Escape key
+ modal.trigger('reveal:close');
+ }
+ });
+ });
+ };
+} (jQuery));
\ No newline at end of file
diff --git a/assets/scripts/foundation/jquery.tooltips.js b/assets/scripts/foundation/jquery.tooltips.js
new file mode 100644
index 0000000..22fac8a
--- /dev/null
+++ b/assets/scripts/foundation/jquery.tooltips.js
@@ -0,0 +1,166 @@
+/*
+ * jQuery Foundation Tooltip Plugin 2.0.1
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+;(function($) {
+ 'use strict';
+ var settings = {
+ bodyHeight : 0,
+ targetClass : '.has-tip',
+ tooltipClass : '.tooltip',
+ tipTemplate : function (selector, content) {
+ return '<span data-selector="' + selector + '" class="' + settings.tooltipClass.substring(1) + '">' + content + '<span class="nub"></span></span>';
+ }
+ },
+ methods = {
+ init : function (options) {
+ return this.each(function () {
+ var $body = $('body'),
+ self = this;
+
+ if (Modernizr.touch) {
+ $body.on('click.tooltip touchstart.tooltip touchend.tooltip', settings.targetClass, function (e) {
+ e.preventDefault();
+ var $this = $(this);
+ $(settings.tooltipClass).hide();
+ methods.showOrCreateTip($this);
+ });
+ $(settings.tooltipClass).on('click.tooltip touchstart.tooltip touchend.tooltip', function (e) {
+ e.preventDefault();
+ $(this).fadeOut(150);
+ });
+ } else {
+ $body.on('mouseover.tooltip mouseout.tooltip', settings.targetClass, function (e) {
+ var $this = $(this);
+ if (e.type === 'mouseover') {
+ methods.showOrCreateTip($this);
+ } else if (e.type === 'mouseout') {
+ methods.hide($this);
+ }
+ });
+ }
+
+ });
+ },
+ showOrCreateTip : function ($target) {
+ var $tip = methods.getTip($target);
+ if ($tip && $tip.length > 0) {
+ methods.show($target);
+ } else {
+ methods.create($target);
+ }
+ },
+ getTip : function ($target) {
+ var selector = methods.selector($target),
+ tip = null;
+ if (selector) tip = $('span[data-selector=' + selector + ']' + settings.tooltipClass);
+ return (tip) ? tip : false;
+ },
+ selector : function ($target) {
+ var id = $target.attr('id'),
+ dataSelector = $target.data('selector');
+ if (id === undefined && dataSelector === undefined) {
+ dataSelector = 'tooltip' + Math.random().toString(36).substring(7);
+ $target.attr('data-selector', dataSelector);
+ }
+ return (id) ? id : dataSelector;
+ },
+ create : function ($target) {
+ var $tip = $(settings.tipTemplate(methods.selector($target), $target.attr('title'))),
+ classes = methods.inheritable_classes($target);
+ $tip.addClass(classes).appendTo('body');
+ if (Modernizr.touch) $tip.append('<span class="tap-to-close">tap to close </span>');
+ $target.removeAttr('title');
+ methods.show($target);
+ },
+ reposition : function (target, tip, classes) {
+ var width, nub, nubHeight, nubWidth, row, objPos;
+
+ tip.css('visibility', 'hidden').show();
+
+ width = target.data('width');
+ nub = tip.children('.nub');
+ nubHeight = nub.outerHeight();
+ nubWidth = nub.outerWidth();
+
+ objPos = function (obj, top, right, bottom, left, width) {
+ return obj.css({
+ 'top' : top,
+ 'bottom' : bottom,
+ 'left' : left,
+ 'right' : right,
+ 'width' : (width) ? width : 'auto'
+ }).end();
+ };
+
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left, width);
+ objPos(nub, -nubHeight, 'auto', 'auto', 10);
+
+ if ($(window).width() < 767) {
+ row = target.parents('.row');
+ tip.width(row.outerWidth() - 20).css('left', row.offset().left).addClass('tip-override');
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
+ } else {
+ if (classes.indexOf('tip-top') > -1) {
+ objPos(tip, (target.offset().top - tip.outerHeight() - nubHeight), 'auto', 'auto', target.offset().left, width)
+ .removeClass('tip-override');
+ objPos(nub, 'auto', 'auto', -nubHeight, 'auto');
+ } else if (classes.indexOf('tip-left') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - nubHeight), 'auto', 'auto', (target.offset().left - tip.outerWidth() - 10), width)
+ .removeClass('tip-override');
+ objPos(nub, (tip.outerHeight() / 2) - (nubHeight / 2), -nubHeight, 'auto', 'auto');
+ } else if (classes.indexOf('tip-right') > -1) {
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - nubHeight), 'auto', 'auto', (target.offset().left + target.outerWidth() + 10), width)
+ .removeClass('tip-override');
+ objPos(nub, (tip.outerHeight() / 2) - (nubHeight / 2), 'auto', 'auto', -nubHeight);
+ }
+ }
+ tip.css('visibility', 'visible').hide();
+ },
+ inheritable_classes : function (target) {
+ var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'],
+ filtered = target.attr('class').split(' ').map(function (el, i) {
+ if ($.inArray(el, inheritables) !== -1) {
+ return el;
+ }
+ }).join(' ');
+ return $.trim(filtered);
+ },
+ show : function ($target) {
+ var $tip = methods.getTip($target);
+ methods.reposition($target, $tip, $target.attr('class'));
+ $tip.fadeIn(150);
+ },
+ hide : function ($target) {
+ var $tip = methods.getTip($target);
+ $tip.fadeOut(150);
+ },
+ reload : function () {
+ var $self = $(this);
+ return ($self.data('tooltips')) ? $self.tooltips('destroy').tooltips('init') : $self.tooltips('init');
+ },
+ destroy : function () {
+ return this.each(function () {
+ $(window).off('.tooltip');
+ $(settings.targetClass).off('.tooltip');
+ $(settings.tooltipClass).each(function(i) {
+ $($(settings.targetClass).get(i)).attr('title', $(this).text());
+ }).remove();
+ });
+ }
+ };
+
+ $.fn.tooltips = function (method) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || ! method) {
+ return methods.init.apply(this, arguments);
+ } else {
+ $.error('Method ' + method + ' does not exist on jQuery.tooltips');
+ }
+ };
+})(jQuery);
\ No newline at end of file
diff --git a/assets/scripts/foundation/modernizr.foundation.js b/assets/scripts/foundation/modernizr.foundation.js
new file mode 100644
index 0000000..b95042f
--- /dev/null
+++ b/assets/scripts/foundation/modernizr.foundation.js
@@ -0,0 +1,4 @@
+/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
+ * Build: http://modernizr.com/download/#-touch-mq-cssclasses-addtest-teststyles-prefixes-ie8compat-load
+ */
+;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(m.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["&#173;","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},u=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return t("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e});var C=function(c,d){var f=c.join(""),g=d.length;t(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch||(j.touch&&j.touch.offsetTop)===9},g,d)}([,["@media (",m.join("touch-enabled),("),h,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);n.touch=function(){return e.touch};for(var D in n)w(n,D)&&(s=D.toLowerCase(),e[s]=n[D](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},x(""),i=k=null,e._version=d,e._prefixes=m,e.mq=u,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&document.documentMode===7});
\ No newline at end of file
diff --git a/assets/scripts/foundation/off-canvas.js b/assets/scripts/foundation/off-canvas.js
new file mode 100644
index 0000000..28be93d
--- /dev/null
+++ b/assets/scripts/foundation/off-canvas.js
@@ -0,0 +1,50 @@
+$(function() {
+ // Set the negative margin on the top menu for slide-menu pages
+ var $selector1 = $('#menu-top-nav'),
+ events = 'click.fndtn touchstart.fndtn';
+ //if ($selector1.length > 0) $selector1.css("margin-top", $selector1.height() * -1);
+
+ // Watch for clicks to show the sidebar
+ var $selector2 = $('#mobile-nav-button');
+ if ($selector2.length > 0) {
+ $('#mobile-nav-button').on(events, function(e) {
+ e.preventDefault();
+ $('body').toggleClass('active');
+ });
+ }
+
+ // // Watch for clicks to show the menu for slide-menu pages
+ // var $selector3 = $('#menuButton');
+ // if ($selector3.length > 0) {
+ // $('#menuButton').on(events, function(e) {
+ // e.preventDefault();
+ // $('body').toggleClass('active-menu');
+ // });
+ // }
+
+ // Adjust sidebars and sizes when resized
+ $(window).resize(function() {
+ $('body').removeClass('active');
+ var $selector4 = $('#menu-top-nav');
+ //if ($selector4.length > 0) $selector4.css("margin-top", $selector4.height() * -1);
+ });
+
+ // // Switch panels for the paneled nav on mobile
+ // var $selector5 = $('#switchPanels');
+ // if ($selector5.length > 0) {
+ // $('#switchPanels dd').on(events, function(e) {
+ // e.preventDefault();
+ // var switchToPanel = $(this).children('a').attr('href'),
+ // switchToIndex = $(switchToPanel).index();
+ // $(this).toggleClass('active').siblings().removeClass('active');
+ // $(switchToPanel).parent().css("left", (switchToIndex * (-100) + '%'));
+ // });
+ // }
+
+ $('#nav li a').on(events, function(e) {
+ e.preventDefault();
+ var href = $(this).attr('href'),
+ $target = $(href);
+ $('html, body').animate({scrollTop : $target.offset().top}, 300);
+ });
+});
diff --git a/assets/stylesheets/foreground-print.css b/assets/stylesheets/foreground-print.css
new file mode 100644
index 0000000..6fc35b3
--- /dev/null
+++ b/assets/stylesheets/foreground-print.css
@@ -0,0 +1,4 @@
+
+nav, footer {
+ display:none;
+}
\ No newline at end of file
diff --git a/assets/stylesheets/foreground.css b/assets/stylesheets/foreground.css
index 035a381..e206655 100644
--- a/assets/stylesheets/foreground.css
+++ b/assets/stylesheets/foreground.css
@@ -1,46 +1,61 @@
+button, .button {
+ margin: 0.5em 0;
+ padding: 0.3em 0.75em 0.4em 0.75em;
+}
+
+footer.row {
+ margin-top: 3em;
+ text-align: center;
+ font-size: 80%;
+ color: grey;
+
+}
+
+footer.row ul.columns li { display: inline;float:none;}
+
div.small-10 .row {
margin: 1em 0 0 0;
}
div.small-9.columns textarea {
margin-bottom: 0.25em;
}
input[type='file'] {
margin-top: 0.4em;
}
input[type='text'], textarea, p.meta {
margin-bottom: 4px;
}
ul {list-style-type: none;}
li label.inline {
margin-bottom: 2px;
padding: 0;
}
div.small-9.columns label,
div.small-10.columns label {
font-weight: normal;
}
.columns li { float:left;width: 45%;}
small {
font-size: 80%;
}
legend {
font-size: 0.875em;
color: #4d4d4d;
cursor: pointer;
display: block;
font-weight: 500;
}
thead tr th {
cursor: pointer;
}
\ No newline at end of file
diff --git a/foreground.php b/foreground.php
index 2de1f32..b7ddb10 100755
--- a/foreground.php
+++ b/foreground.php
@@ -1,39 +1,46 @@
<?php
/**
* foreground.com foundation wiki skin.
*
* @file
* @ingroup Skins
* @author WikiWonders <skins@wikiwonders.net>
* @license 2-clause BSD
*/
if( ! defined( 'MEDIAWIKI' ))
{
die('Wiki Wonders What Youre Doing');
}
-
+
$wgExtensionCredits['skin'][] = array(
'path' => __FILE__,
'name' => 'foreground',
'url' => '[http://wikiwonders.net]',
'author' => '[http://wikiwonders.net WikiWonders]',
'descriptionmsg' => 'The base WikiWonders skin with Zurbs Foundation atop it',
);
$wgValidSkinNames['foreground'] = 'foreground';
$wgAutoloadClasses['Skinforeground'] = __DIR__.'/foreground.skin.php';
$wgExtensionMessagesFiles['foreground'] = __DIR__.'/foreground.i18n.php';
-
+
$wgResourceModules['skins.foreground'] = array(
'styles' => array(
- 'foreground/assets/stylesheets/normalize.css' => array('media' => 'screen'),
+ 'foreground/assets/stylesheets/normalize.css' => array('media' => 'screen'),
'foreground/assets/stylesheets/foundation.css' => array('media' => 'screen'),
'foreground/assets/stylesheets/foreground.css' => array('media' => 'screen'),
+ 'foreground/assets/stylesheets/foreground-print.css' => array('media' => 'print'),
'foreground/assets/stylesheets/jquery.autocomplete.css' => array('media' => 'screen'),
'foreground/assets/stylesheets/responsive-tables.css' => array('media' => 'screen')
),
+ 'scripts' => array(
+ 'foreground/assets/scripts/foundation/jquery.tooltips.js' => array('type' => 'javascript'),
+ 'foreground/assets/scripts/foundation/modernizer.foundation.js' => array('type' => 'javascript'),
+ 'foreground/assets/scripts/foundation/jquery.placeholder.min.js' => array('type' => 'javascript'),
+ 'foreground/assets/scripts/foreground.js' => array('type' => 'javascript')
+ ),
'remoteBasePath' => &$GLOBALS['wgStylePath'],
'localBasePath' => &$GLOBALS['wgStyleDirectory']
);
\ No newline at end of file
diff --git a/foreground.skin.php b/foreground.skin.php
index 15f39bc..66ba3e2 100755
--- a/foreground.skin.php
+++ b/foreground.skin.php
@@ -1,106 +1,135 @@
<?php
/**
* Skin file for skin WWFoundation.
*
* @file
* @ingroup Skins
*/
class SkinForeground extends SkinTemplate {
public $skinname = 'foreground', $stylename = 'foreground', $template = 'ForegroundTemplate', $useHeadElement = true;
public function setupSkinUserCss(OutputPage $out) {
parent::setupSkinUserCss($out);
$out->addModuleStyles('skins.foreground');
}
}
class ForegroundTemplate extends BaseTemplate {
public function execute() {
global $wgUser;
wfSuppressWarnings();
$this->html('headelement');
?>
<!-- START FOREGROUNDTEMPLATE -->
<nav class="top-bar">
<section class="top-bar-section">
<ul class="title-area">
<li class="name"><h1><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><?php echo $this->text('sitename'); ?></a></h1></li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<ul class="left">
<li class="divider"></li>
- <li class="has-dropdown active"><a href="#">Toolbox</a>
- <ul class="dropdown">
- <?php foreach ($this->getToolbox() as $key => $item): ?>
- <?php echo $this->makeListItem($key, $item); ?>
- <?php endforeach; ?>
- <?php wfRunHooks('SkinTemplateToolboxEnd', array(&$this)); ?>
- </ul>
- </li>
- <li class="divider"></li>
+ <?php foreach ( $this->getSidebar() as $boxName => $box ) { ?>
+ <li class="has-dropdown active" id='<?php echo Sanitizer::escapeId( $box['id'] ) ?>'<?php echo Linker::tooltip( $box['id'] ) ?>>
+ <a href="#"><?php echo htmlspecialchars( $box['header'] ); ?></a>
+ <?php if ( is_array( $box['content'] ) ) { ?>
+ <ul class="dropdown">
+ <?php foreach ( $box['content'] as $key => $item ) { ?>
+ <?php echo $this->makeListItem( $key, $item ); ?>
+ <?php } ?>
+ </ul>
+ <?php } ?>
+ </li>
+ <li class="divider"></li>
+ <?php } ?>
+
+ <?php if ($wgUser->isLoggedIn()): ?>
+ <li class="divider"></li>
+ <li class="has-dropdown active"><a href="#">Personal</a>
+ <ul class="dropdown">
+ <?php foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+ <?php echo $this->makeListItem($key, $item); ?>
+ <?php } ?>
+ </ul>
+ </li>
+ <?php endif; ?>
</ul>
+
+
<ul class="right">
<li class="has-form">
<form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search">
<div class="row collapse">
<div class="small-8 columns">
<?php echo $this->makeSearchInput(array('placeholder' => 'Search...', 'id' => 'searchInput') ); ?>
</div>
<div class="small-4 columns">
<button type="submit" calass="alert button">Search</button>
</div>
</form>
</li>
<li class="divider show-for-small"></li>
<li class="has-form">
<li>
<?php if ($wgUser->isLoggedIn()): ?>
<a href=""><?php echo Linker::link(Title::newFromText('Special:UserLogout'), 'Sign Out'); ?></a>
<?php else: ?>
<?php if (isset($this->data['personal_urls']['anonlogin'])): ?>
<a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>">Sign In</a>
<?php elseif (isset($this->data['personal_urls']['login'])): ?>
<a href="<?php echo $this->data['personal_urls']['login']['href']; ?>">Sign In</a>
<?php else: ?>
<?php echo Linker::link(Title::newFromText('Special:UserLogin'), 'Sign In'); ?>
<?php endif; ?>
<?php endif; ?>
</li>
</ul>
</section>
</nav>
+ <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="row notice large-12 columns"><?php $this->html( 'sitenotice' ); ?></div><?php } ?>
+ <?php if ( $this->data['newtalk'] ) { ?><div class="usermessage row notice large-12 columns"><?php $this->html( 'newtalk' ); ?></div><?php } ?>
+ <div id="mw-js-message" style="display:none;"></div>
+
<div class="row">
<div class="large-12 columns">
<h3><?php $this->html('title') ?></h3>
+ <h5><?php $this->html('subtitle') ?></h5>
<?php $this->html('bodytext') ?>
<div class="group"><?php $this->html('catlinks'); ?></div>
<?php $this->html('dataAfterContent'); ?>
</div>
</div>
<footer class="row">
<ul class="large-12 columns">
<?php foreach ( $this->getFooterLinks( "flat" ) as $key ) { ?>
<li><?php $this->html( $key ) ?></li>
<?php } ?>
</ul>
+ <ul> <?php foreach ( $this->getFooterIcons( "nocopyright" ) as $blockName => $footerIcons ) { ?>
+ <li><?php foreach ( $footerIcons as $icon ) { ?>
+ <?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
+ <?php } ?>
+ </li>
+ <?php } ?>
+ </ul>
</footer>
<div id="mw-js-message" style="display:none;"></div>
<?php $this->printTrail(); ?>
</body>
</html>
<?php
wfRestoreWarnings();
}
}
?>
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Fri, Aug 8, 12:36 AM (17 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
65032
Default Alt Text
(62 KB)

Event Timeline