linaro-jekyll-theme 0.1.2.75 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -52
- data/_includes/_theme-includes/_blog/pagination.html +1 -1
- data/_includes/_theme-includes/_footer/backup.html +71 -0
- data/_includes/_theme-includes/_footer/footer.html +23 -54
- data/_includes/_theme-includes/_head/ascii-art.html +11 -0
- data/_includes/_theme-includes/_head/head.html +7 -18
- data/_includes/_theme-includes/_navigation/_sub-navigation/tabbed-nav.html +150 -0
- data/_includes/_theme-includes/_navigation/nav.html +46 -119
- data/_includes/_theme-includes/_page-structure/breadcrumb.html +27 -77
- data/_includes/_theme-includes/_page-structure/old-breadcrumb.html +139 -0
- data/_includes/_theme-includes/_script-includes/css.html +1 -40
- data/_includes/_theme-includes/_script-includes/gtm/gtm-noscript.html +1 -2
- data/_includes/_theme-includes/_script-includes/gtm/gtm-script.html +7 -9
- data/_includes/_theme-includes/_script-includes/javascript.html +2 -50
- data/_includes/_theme-includes/_third-party/disqus.html +1 -1
- data/_includes/_theme-includes/_third-party/mailchimp-homepage.html +6 -1
- data/_includes/_theme-includes/_third-party/mailchimp-sub-footer.html +40 -0
- data/_includes/_theme-includes/members.html +3 -3
- data/_includes/image.html +1 -6
- data/_includes/media.html +1 -9
- data/_layouts/empty-container-page.html +13 -0
- data/_layouts/{fluid-no-sub-nav.html → plain-page.html} +2 -2
- data/_sass/{core/animations.scss → animations.scss} +0 -0
- data/_sass/blog.scss +188 -0
- data/_sass/bootstrap/_variables.scss +7 -30
- data/_sass/breadcrumb.scss +48 -0
- data/_sass/carousel.scss +122 -0
- data/_sass/{core/cookieconsent.scss → cookieconsent.scss} +2 -31
- data/_sass/critical.scss +991 -0
- data/_sass/{core/fa.scss → fa.scss} +2 -7
- data/_sass/flipclock.scss +435 -0
- data/_sass/{core/font-awesome.min.scss → font-awesome.min.scss} +0 -0
- data/_sass/{core/fonts.scss → fonts.scss} +0 -0
- data/_sass/footer.scss +76 -0
- data/_sass/{core/lightbox.scss → lightbox.scss} +0 -0
- data/_sass/members-sprite.scss +425 -0
- data/_sass/nav.scss +533 -0
- data/_sass/openhours.scss +51 -0
- data/_sass/{core/owl.carousel.min.scss → owl.carousel.min.scss} +1 -1
- data/_sass/{core/owl.theme.default.min.scss → owl.theme.default.min.scss} +0 -0
- data/_sass/products.scss +214 -0
- data/_sass/projects.scss +34 -0
- data/_sass/{core/social-media-icons.scss → social-media-icons.scss} +0 -0
- data/_sass/{core/syntax.scss → syntax.scss} +0 -0
- data/_sass/tables.scss +87 -0
- data/_sass/theme.scss +208 -0
- data/assets/css/_bootstrap-compass.scss +9 -0
- data/assets/css/_bootstrap-mincer.scss +19 -0
- data/assets/css/_bootstrap-sprockets.scss +9 -0
- data/assets/css/_bootstrap.scss +56 -0
- data/assets/css/blog-pages.scss +5 -0
- data/assets/css/bootstrap/_alerts.scss +73 -0
- data/assets/css/bootstrap/_badges.scss +68 -0
- data/assets/css/bootstrap/_breadcrumbs.scss +28 -0
- data/assets/css/bootstrap/_button-groups.scss +244 -0
- data/assets/css/bootstrap/_buttons.scss +168 -0
- data/assets/css/bootstrap/_carousel.scss +270 -0
- data/assets/css/bootstrap/_close.scss +36 -0
- data/assets/css/bootstrap/_code.scss +69 -0
- data/assets/css/bootstrap/_component-animations.scss +37 -0
- data/assets/css/bootstrap/_dropdowns.scss +216 -0
- data/assets/css/bootstrap/_forms.scss +617 -0
- data/assets/css/bootstrap/_glyphicons.scss +307 -0
- data/assets/css/bootstrap/_grid.scss +84 -0
- data/assets/css/bootstrap/_input-groups.scss +171 -0
- data/assets/css/bootstrap/_jumbotron.scss +54 -0
- data/assets/css/bootstrap/_labels.scss +66 -0
- data/assets/css/bootstrap/_list-group.scss +130 -0
- data/assets/css/bootstrap/_media.scss +66 -0
- data/assets/css/bootstrap/_mixins.scss +40 -0
- data/assets/css/bootstrap/_modals.scss +150 -0
- data/assets/css/bootstrap/_navbar.scss +662 -0
- data/assets/css/bootstrap/_navs.scss +242 -0
- data/assets/css/bootstrap/_normalize.scss +424 -0
- data/assets/css/bootstrap/_pager.scss +54 -0
- data/assets/css/bootstrap/_pagination.scss +89 -0
- data/assets/css/bootstrap/_panels.scss +271 -0
- data/assets/css/bootstrap/_popovers.scss +131 -0
- data/assets/css/bootstrap/_print.scss +101 -0
- data/assets/css/bootstrap/_progress-bars.scss +87 -0
- data/assets/css/bootstrap/_responsive-embed.scss +35 -0
- data/assets/css/bootstrap/_responsive-utilities.scss +179 -0
- data/assets/css/bootstrap/_scaffolding.scss +161 -0
- data/assets/css/bootstrap/_tables.scss +234 -0
- data/assets/css/bootstrap/_theme.scss +291 -0
- data/assets/css/bootstrap/_thumbnails.scss +38 -0
- data/assets/css/bootstrap/_tooltip.scss +101 -0
- data/assets/css/bootstrap/_type.scss +298 -0
- data/assets/css/bootstrap/_utilities.scss +55 -0
- data/assets/css/bootstrap/_variables.scss +874 -0
- data/assets/css/bootstrap/_wells.scss +29 -0
- data/assets/css/bootstrap/mixins/_alerts.scss +14 -0
- data/assets/css/bootstrap/mixins/_background-variant.scss +12 -0
- data/assets/css/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/css/bootstrap/mixins/_buttons.scss +65 -0
- data/assets/css/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/css/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/css/bootstrap/mixins/_forms.scss +88 -0
- data/assets/css/bootstrap/mixins/_gradients.scss +58 -0
- data/assets/css/bootstrap/mixins/_grid-framework.scss +81 -0
- data/assets/css/bootstrap/mixins/_grid.scss +122 -0
- data/assets/css/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/css/bootstrap/mixins/_image.scss +33 -0
- data/assets/css/bootstrap/mixins/_labels.scss +12 -0
- data/assets/css/bootstrap/mixins/_list-group.scss +32 -0
- data/assets/css/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/css/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/assets/css/bootstrap/mixins/_opacity.scss +8 -0
- data/assets/css/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/css/bootstrap/mixins/_panels.scss +24 -0
- data/assets/css/bootstrap/mixins/_progress-bar.scss +10 -0
- data/assets/css/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/css/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/css/bootstrap/mixins/_resize.scss +6 -0
- data/assets/css/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/assets/css/bootstrap/mixins/_size.scss +10 -0
- data/assets/css/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/css/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/css/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/css/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/css/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/assets/css/core/animations.scss +125 -0
- data/{_sass → assets/css}/core/blog.scss +26 -136
- data/assets/css/core/breadcrumb.scss +48 -0
- data/{_sass → assets/css}/core/carousel.scss +0 -15
- data/assets/css/core/cookieconsent.scss +13 -0
- data/assets/css/core/critical.scss +991 -0
- data/assets/css/core/fa.scss +2331 -0
- data/{_sass → assets/css}/core/flipclock.scss +0 -0
- data/assets/css/core/font-awesome.min.scss +4 -0
- data/assets/css/core/fonts.scss +7 -0
- data/assets/css/core/footer.scss +79 -0
- data/assets/css/core/homepage.scss +16 -0
- data/assets/css/core/lightbox.scss +213 -0
- data/assets/css/core/members-sprite.scss +425 -0
- data/assets/css/core/nav.scss +536 -0
- data/{_sass → assets/css}/core/openhours.scss +0 -0
- data/assets/css/core/owl.carousel.min.scss +6 -0
- data/assets/css/core/owl.theme.default.min.scss +6 -0
- data/{_sass → assets/css}/core/products.scss +1 -1
- data/{_sass → assets/css}/core/projects.scss +0 -0
- data/assets/css/core/social-media-icons.scss +71 -0
- data/assets/css/core/syntax.scss +65 -0
- data/{_sass → assets/css}/core/tables.scss +0 -38
- data/assets/css/core/theme.scss +244 -0
- data/assets/css/documentation-pages.scss +3 -0
- data/assets/css/home-page.scss +3 -0
- data/assets/css/main.scss +0 -6
- data/assets/css/openhours-page.scss +4 -0
- data/assets/css/products-pages.scss +5 -0
- data/assets/css/projects-pages.scss +5 -0
- data/assets/js/app.js +5 -0
- data/assets/js/app/{main.js → 96boards.js} +29 -5
- data/assets/js/app/mixitup.js +23 -0
- data/assets/js/app/{search.js → search-page.js} +1 -1
- data/assets/js/app/{sticky.js → sticky-navbar.js} +0 -0
- data/assets/js/vendor.js +6 -0
- data/assets/js/vendor/cookieconsent.min.js +9 -2
- data/assets/js/vendor/filtrify.js +11 -0
- data/assets/js/vendor/flipclock.min.js +0 -33
- data/assets/js/vendor/lightbox.js +519 -0
- data/assets/js/vendor/loadCSS.js +34 -78
- data/assets/js/vendor/loadCSS.min.js +2 -0
- data/assets/js/vendor/picturefill.min.js +5 -0
- data/assets/js/vendor/shuffle.js +2004 -0
- data/{_layouts/about.html → assets/vendor.js} +0 -0
- metadata +207 -150
- data/_data/authors.yml +0 -7
- data/_data/company.yml +0 -29
- data/_data/footer.yml +0 -111
- data/_data/linaro.yml +0 -4
- data/_data/members_db.yaml +0 -115
- data/_data/nav.yml +0 -62
- data/_data/news.yaml +0 -230
- data/_data/sub-nav-stacked.yml +0 -67
- data/_data/sub-nav.yml +0 -61
- data/_includes/_theme-includes/_navigation/stacked-nav.html +0 -20
- data/_includes/_theme-includes/_navigation/tabbed-nav.html +0 -35
- data/_includes/_theme-includes/_page-structure/home-hero-shape.html +0 -34
- data/_includes/_theme-includes/_page-structure/home-hero.html +0 -23
- data/_includes/_theme-includes/_page-structure/shape-divider.html +0 -12
- data/_includes/_theme-includes/_script-includes/google-analytics/script.html +0 -10
- data/_includes/youtube.html +0 -7
- data/_layouts/accessory-display-page.html +0 -88
- data/_layouts/blog-breadcrumbless.html +0 -49
- data/_layouts/blog.html +0 -56
- data/_layouts/contact.html +0 -10
- data/_layouts/default-empty.html +0 -11
- data/_layouts/default-no-sub-nav.html +0 -15
- data/_layouts/default-plain.html +0 -16
- data/_layouts/default-stacked-breadcrumb.html +0 -23
- data/_layouts/default-stacked.html +0 -22
- data/_layouts/default.html +0 -20
- data/_layouts/empty.html +0 -10
- data/_layouts/fluid.html +0 -15
- data/_layouts/home-shape.html +0 -18
- data/_layouts/home.html +0 -18
- data/_layouts/post.html +0 -146
- data/_layouts/product-display-page.html +0 -262
- data/_layouts/project-display-page.html +0 -28
- data/_layouts/redirect.html +0 -11
- data/_sass/core/breadcrumb.scss +0 -90
- data/_sass/core/carousel-styles.scss +0 -3
- data/_sass/core/custom.scss +0 -3
- data/_sass/core/footer.scss +0 -133
- data/_sass/core/forms.scss +0 -0
- data/_sass/core/homepage.scss +0 -45
- data/_sass/core/nav.scss +0 -723
- data/_sass/core/old-search.scss +0 -239
- data/_sass/core/theme.scss +0 -444
- data/_sass/core/youtube.scss +0 -65
- data/_sass/custom.scss +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +0 -2671
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/fonts/fontello.eot +0 -0
- data/assets/fonts/fontello.svg +0 -44
- data/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/fonts/lato-regular/LICENSE.txt +0 -93
- data/assets/fonts/lato-regular/Lato-regular.eot +0 -0
- data/assets/fonts/lato-regular/Lato-regular.svg +0 -435
- data/assets/fonts/lato-regular/Lato-regular.ttf +0 -0
- data/assets/fonts/lato-regular/Lato-regular.woff +0 -0
- data/assets/fonts/lato-regular/Lato-regular.woff2 +0 -0
- data/assets/images/avatar-placeholder.png +0 -0
- data/assets/images/background-image.jpg +0 -0
- data/assets/images/banner.jpg +0 -0
- data/assets/images/close.png +0 -0
- data/assets/images/css3.png +0 -0
- data/assets/images/favicon.ico +0 -0
- data/assets/images/favicon.png +0 -0
- data/assets/images/html5.png +0 -0
- data/assets/images/jekyll.svg +0 -1
- data/assets/images/js.jpeg +0 -0
- data/assets/images/loading.gif +0 -0
- data/assets/images/next.png +0 -0
- data/assets/images/owl.video.play.png +0 -0
- data/assets/images/placeholder.png +0 -0
- data/assets/images/prev.png +0 -0
- data/assets/images/social-media-image.png +0 -0
- data/assets/js/app/tables.js +0 -8
- data/assets/js/vendor/cognito-forms.js +0 -150
- data/assets/js/vendor/lightbox.min.js +0 -14
- data/robots.txt +0 -9
data/assets/css/main.scss
CHANGED
@@ -1,12 +1,7 @@
|
|
1
|
-
---
|
2
|
-
---
|
3
|
-
@import "custom";
|
4
|
-
|
5
1
|
@import 'bootstrap';
|
6
2
|
@import 'bootstrap/variables';
|
7
3
|
|
8
4
|
@import "core/fonts";
|
9
|
-
@import "core/font-awesome.min";
|
10
5
|
@import "core/nav";
|
11
6
|
@import "core/theme";
|
12
7
|
@import "core/cookieconsent";
|
@@ -16,5 +11,4 @@
|
|
16
11
|
@import "core/social-media-icons";
|
17
12
|
@import "core/breadcrumb";
|
18
13
|
@import "core/tables";
|
19
|
-
|
20
14
|
@import "core/animations";
|
data/assets/js/app.js
ADDED
@@ -7,15 +7,39 @@ $(document).ready(function () {
|
|
7
7
|
if (navigator.userAgent.match(/.*CPU.*OS 7_\d/i)){$('html').addClass('ios7');}
|
8
8
|
|
9
9
|
|
10
|
+
//Open Hours CountDown using FlipClick http://flipclockjs.com/
|
11
|
+
|
12
|
+
function nextDay(x){
|
13
|
+
var now = new Date();
|
14
|
+
now.setDate(now.getDate() + (x+(7-now.getDay())) % 7);
|
15
|
+
return now;
|
16
|
+
}
|
17
|
+
|
18
|
+
var nextOpenHours = nextDay(4);
|
19
|
+
|
20
|
+
//The date of the open hours
|
21
|
+
var openhours = new Date(Date.UTC(2017, 06, 27, 16, 0, 0));
|
22
|
+
var now = new Date();
|
23
|
+
var diff = openhours.getTime()/1000 - now.getTime()/1000;
|
24
|
+
|
25
|
+
var date2 = new Date(Date.UTC(1996, nextOpenHours.getMonth(), nextOpenHours.getDate(), 16, 0, 0));
|
26
|
+
var now2 = new Date();
|
27
|
+
var diff2 = date2.getTime()/1000 - now2.getTime()/1000;
|
28
|
+
|
29
|
+
var clock = $('.open-hours-clock').FlipClock(diff, {
|
30
|
+
clockFace: 'DailyCounter',
|
31
|
+
countdown: true
|
32
|
+
});
|
33
|
+
|
34
|
+
var clock2 = $('.expired-clock').FlipClock(diff2, {
|
35
|
+
clockFace: 'DailyCounter',
|
36
|
+
countdown: true
|
37
|
+
});
|
38
|
+
|
10
39
|
$("#closeForm").click(function(){
|
11
40
|
$("#searchDropdown").dropdown('toggle');
|
12
41
|
});
|
13
42
|
|
14
|
-
// //Close the bootstrap navigation bar by clicking another part of the current page.
|
15
|
-
// $(document).on('click',function(){
|
16
|
-
// $('#navbar-collapse').collapse('hide');
|
17
|
-
// });
|
18
|
-
|
19
43
|
$('.main-navbar ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
|
20
44
|
event.preventDefault();
|
21
45
|
event.stopPropagation();
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**!
|
2
|
+
* MixItUp v2.1.11
|
3
|
+
*
|
4
|
+
* @copyright Copyright 2015 KunkaLabs Limited.
|
5
|
+
* @author KunkaLabs Limited.
|
6
|
+
* @link https://mixitup.kunkalabs.com
|
7
|
+
*
|
8
|
+
* @license Commercial use requires a commercial license.
|
9
|
+
* https://mixitup.kunkalabs.com/licenses/
|
10
|
+
*
|
11
|
+
* Non-commercial use permitted under terms of CC-BY-NC license.
|
12
|
+
* http://creativecommons.org/licenses/by-nc/3.0/
|
13
|
+
*/
|
14
|
+
!function(a,b){"use strict";a.MixItUp=function(){var b=this;b._execAction("_constructor",0),a.extend(b,{selectors:{target:".mix",filter:".filter",sort:".sort"},animation:{enable:!0,effects:"fade scale",duration:600,easing:"ease",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",queue:!0,queueLimit:1,animateChangeLayout:!1,animateResizeContainer:!0,animateResizeTargets:!1,staggerSequence:!1,reverseOut:!1},callbacks:{onMixLoad:!1,onMixStart:!1,onMixBusy:!1,onMixEnd:!1,onMixFail:!1,_user:!1},controls:{enable:!0,live:!1,toggleFilterButtons:!1,toggleLogic:"or",activeClass:"active"},layout:{display:"inline-block",containerClass:"",containerClassFail:"fail"},load:{filter:"all",sort:!1},_$body:null,_$container:null,_$targets:null,_$parent:null,_$sortButtons:null,_$filterButtons:null,_suckMode:!1,_mixing:!1,_sorting:!1,_clicking:!1,_loading:!0,_changingLayout:!1,_changingClass:!1,_changingDisplay:!1,_origOrder:[],_startOrder:[],_newOrder:[],_activeFilter:null,_toggleArray:[],_toggleString:"",_activeSort:"default:asc",_newSort:null,_startHeight:null,_newHeight:null,_incPadding:!0,_newDisplay:null,_newClass:null,_targetsBound:0,_targetsDone:0,_queue:[],_$show:a(),_$hide:a()}),b._execAction("_constructor",1)},a.MixItUp.prototype={constructor:a.MixItUp,_instances:{},_handled:{_filter:{},_sort:{}},_bound:{_filter:{},_sort:{}},_actions:{},_filters:{},extend:function(b){for(var c in b)a.MixItUp.prototype[c]=b[c]},addAction:function(b,c,d,e){a.MixItUp.prototype._addHook("_actions",b,c,d,e)},addFilter:function(b,c,d,e){a.MixItUp.prototype._addHook("_filters",b,c,d,e)},_addHook:function(b,c,d,e,f){var g=a.MixItUp.prototype[b],h={};f=1===f||"post"===f?"post":"pre",h[c]={},h[c][f]={},h[c][f][d]=e,a.extend(!0,g,h)},_init:function(b,c){var d=this;if(d._execAction("_init",0,arguments),c&&a.extend(!0,d,c),d._$body=a("body"),d._domNode=b,d._$container=a(b),d._$container.addClass(d.layout.containerClass),d._id=b.id,d._platformDetect(),d._brake=d._getPrefixedCSS("transition","none"),d._refresh(!0),d._$parent=d._$targets.parent().length?d._$targets.parent():d._$container,d.load.sort&&(d._newSort=d._parseSort(d.load.sort),d._newSortString=d.load.sort,d._activeSort=d.load.sort,d._sort(),d._printSort()),d._activeFilter="all"===d.load.filter?d.selectors.target:"none"===d.load.filter?"":d.load.filter,d.controls.enable&&d._bindHandlers(),d.controls.toggleFilterButtons){d._buildToggleArray();for(var e=0;e<d._toggleArray.length;e++)d._updateControls({filter:d._toggleArray[e],sort:d._activeSort},!0)}else d.controls.enable&&d._updateControls({filter:d._activeFilter,sort:d._activeSort});d._filter(),d._init=!0,d._$container.data("mixItUp",d),d._execAction("_init",1,arguments),d._buildState(),d._$targets.css(d._brake),d._goMix(d.animation.enable)},_platformDetect:function(){var a=this,c=["Webkit","Moz","O","ms"],d=["webkit","moz"],e=window.navigator.appVersion.match(/Chrome\/(\d+)\./)||!1,f="undefined"!=typeof InstallTrigger,g=function(a){for(var b=0;b<c.length;b++)if(c[b]+"Transition"in a.style)return{prefix:"-"+c[b].toLowerCase()+"-",vendor:c[b]};return"transition"in a.style?"":!1},h=g(a._domNode);a._execAction("_platformDetect",0),a._chrome=e?parseInt(e[1],10):!1,a._ff=f?parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]):!1,a._prefix=h.prefix,a._vendor=h.vendor,a._suckMode=window.atob&&a._prefix?!1:!0,a._suckMode&&(a.animation.enable=!1),a._ff&&a._ff<=4&&(a.animation.enable=!1);for(var i=0;i<d.length&&!window.requestAnimationFrame;i++)window.requestAnimationFrame=window[d[i]+"RequestAnimationFrame"];"function"!=typeof Object.getPrototypeOf&&("object"==typeof"test".__proto__?Object.getPrototypeOf=function(a){return a.__proto__}:Object.getPrototypeOf=function(a){return a.constructor.prototype}),a._domNode.nextElementSibling===b&&Object.defineProperty(Element.prototype,"nextElementSibling",{get:function(){for(var a=this.nextSibling;a;){if(1===a.nodeType)return a;a=a.nextSibling}return null}}),a._execAction("_platformDetect",1)},_refresh:function(a,c){var d=this;d._execAction("_refresh",0,arguments),d._$targets=d._$container.find(d.selectors.target);for(var e=0;e<d._$targets.length;e++){var f=d._$targets[e];if(f.dataset===b||c){f.dataset={};for(var g=0;g<f.attributes.length;g++){var h=f.attributes[g],i=h.name,j=h.value;if(i.indexOf("data-")>-1){var k=d._helpers._camelCase(i.substring(5,i.length));f.dataset[k]=j}}}f.mixParent===b&&(f.mixParent=d._id)}if(d._$targets.length&&a||!d._origOrder.length&&d._$targets.length){d._origOrder=[];for(var e=0;e<d._$targets.length;e++){var f=d._$targets[e];d._origOrder.push(f)}}d._execAction("_refresh",1,arguments)},_bindHandlers:function(){var c=this,d=a.MixItUp.prototype._bound._filter,e=a.MixItUp.prototype._bound._sort;c._execAction("_bindHandlers",0),c.controls.live?c._$body.on("click.mixItUp."+c._id,c.selectors.sort,function(){c._processClick(a(this),"sort")}).on("click.mixItUp."+c._id,c.selectors.filter,function(){c._processClick(a(this),"filter")}):(c._$sortButtons=a(c.selectors.sort),c._$filterButtons=a(c.selectors.filter),c._$sortButtons.on("click.mixItUp."+c._id,function(){c._processClick(a(this),"sort")}),c._$filterButtons.on("click.mixItUp."+c._id,function(){c._processClick(a(this),"filter")})),d[c.selectors.filter]=d[c.selectors.filter]===b?1:d[c.selectors.filter]+1,e[c.selectors.sort]=e[c.selectors.sort]===b?1:e[c.selectors.sort]+1,c._execAction("_bindHandlers",1)},_processClick:function(c,d){var e=this,f=function(c,d,f){var g=a.MixItUp.prototype;g._handled["_"+d][e.selectors[d]]=g._handled["_"+d][e.selectors[d]]===b?1:g._handled["_"+d][e.selectors[d]]+1,g._handled["_"+d][e.selectors[d]]===g._bound["_"+d][e.selectors[d]]&&(c[(f?"remove":"add")+"Class"](e.controls.activeClass),delete g._handled["_"+d][e.selectors[d]])};if(e._execAction("_processClick",0,arguments),!e._mixing||e.animation.queue&&e._queue.length<e.animation.queueLimit){if(e._clicking=!0,"sort"===d){var g=c.attr("data-sort");(!c.hasClass(e.controls.activeClass)||g.indexOf("random")>-1)&&(a(e.selectors.sort).removeClass(e.controls.activeClass),f(c,d),e.sort(g))}if("filter"===d){var h,i=c.attr("data-filter"),j="or"===e.controls.toggleLogic?",":"";e.controls.toggleFilterButtons?(e._buildToggleArray(),c.hasClass(e.controls.activeClass)?(f(c,d,!0),h=e._toggleArray.indexOf(i),e._toggleArray.splice(h,1)):(f(c,d),e._toggleArray.push(i)),e._toggleArray=a.grep(e._toggleArray,function(a){return a}),e._toggleString=e._toggleArray.join(j),e.filter(e._toggleString)):c.hasClass(e.controls.activeClass)||(a(e.selectors.filter).removeClass(e.controls.activeClass),f(c,d),e.filter(i))}e._execAction("_processClick",1,arguments)}else"function"==typeof e.callbacks.onMixBusy&&e.callbacks.onMixBusy.call(e._domNode,e._state,e),e._execAction("_processClickBusy",1,arguments)},_buildToggleArray:function(){var a=this,b=a._activeFilter.replace(/\s/g,"");if(a._execAction("_buildToggleArray",0,arguments),"or"===a.controls.toggleLogic)a._toggleArray=b.split(",");else{a._toggleArray=b.split("."),!a._toggleArray[0]&&a._toggleArray.shift();for(var c,d=0;c=a._toggleArray[d];d++)a._toggleArray[d]="."+c}a._execAction("_buildToggleArray",1,arguments)},_updateControls:function(c,d){var e=this,f={filter:c.filter,sort:c.sort},g=function(a,b){try{d&&"filter"===h&&"none"!==f.filter&&""!==f.filter?a.filter(b).addClass(e.controls.activeClass):a.removeClass(e.controls.activeClass).filter(b).addClass(e.controls.activeClass)}catch(c){}},h="filter",i=null;e._execAction("_updateControls",0,arguments),c.filter===b&&(f.filter=e._activeFilter),c.sort===b&&(f.sort=e._activeSort),f.filter===e.selectors.target&&(f.filter="all");for(var j=0;2>j;j++)i=e.controls.live?a(e.selectors[h]):e["_$"+h+"Buttons"],i&&g(i,"[data-"+h+'="'+f[h]+'"]'),h="sort";e._execAction("_updateControls",1,arguments)},_filter:function(){var b=this;b._execAction("_filter",0);for(var c=0;c<b._$targets.length;c++){var d=a(b._$targets[c]);d.is(b._activeFilter)?b._$show=b._$show.add(d):b._$hide=b._$hide.add(d)}b._execAction("_filter",1)},_sort:function(){var a=this,b=function(a){for(var b=a.slice(),c=b.length,d=c;d--;){var e=parseInt(Math.random()*c),f=b[d];b[d]=b[e],b[e]=f}return b};a._execAction("_sort",0),a._startOrder=[];for(var c=0;c<a._$targets.length;c++){var d=a._$targets[c];a._startOrder.push(d)}switch(a._newSort[0].sortBy){case"default":a._newOrder=a._origOrder;break;case"random":a._newOrder=b(a._startOrder);break;case"custom":a._newOrder=a._newSort[0].order;break;default:a._newOrder=a._startOrder.concat().sort(function(b,c){return a._compare(b,c)})}a._execAction("_sort",1)},_compare:function(a,b,c){c=c?c:0;var d=this,e=d._newSort[c].order,f=function(a){return a.dataset[d._newSort[c].sortBy]||0},g=isNaN(1*f(a))?f(a).toLowerCase():1*f(a),h=isNaN(1*f(b))?f(b).toLowerCase():1*f(b);return h>g?"asc"===e?-1:1:g>h?"asc"===e?1:-1:g===h&&d._newSort.length>c+1?d._compare(a,b,c+1):0},_printSort:function(a){var b=this,c=a?b._startOrder:b._newOrder,d=b._$parent[0].querySelectorAll(b.selectors.target),e=d.length?d[d.length-1].nextElementSibling:null,f=document.createDocumentFragment();b._execAction("_printSort",0,arguments);for(var g=0;g<d.length;g++){var h=d[g],i=h.nextSibling;"absolute"!==h.style.position&&(i&&"#text"===i.nodeName&&b._$parent[0].removeChild(i),b._$parent[0].removeChild(h))}for(var g=0;g<c.length;g++){var j=c[g];if("default"!==b._newSort[0].sortBy||"desc"!==b._newSort[0].order||a)f.appendChild(j),f.appendChild(document.createTextNode(" "));else{var k=f.firstChild;f.insertBefore(j,k),f.insertBefore(document.createTextNode(" "),j)}}e?b._$parent[0].insertBefore(f,e):b._$parent[0].appendChild(f),b._execAction("_printSort",1,arguments)},_parseSort:function(a){for(var b=this,c="string"==typeof a?a.split(" "):[a],d=[],e=0;e<c.length;e++){var f="string"==typeof a?c[e].split(":"):["custom",c[e]],g={sortBy:b._helpers._camelCase(f[0]),order:f[1]||"asc"};if(d.push(g),"default"===g.sortBy||"random"===g.sortBy)break}return b._execFilter("_parseSort",d,arguments)},_parseEffects:function(){var a=this,b={opacity:"",transformIn:"",transformOut:"",filter:""},c=function(b,c,d){if(a.animation.effects.indexOf(b)>-1){if(c){var e=a.animation.effects.indexOf(b+"(");if(e>-1){var f=a.animation.effects.substring(e),g=/\(([^)]+)\)/.exec(f),h=g[1];return{val:h}}}return!0}return!1},d=function(a,b){return b?"-"===a.charAt(0)?a.substr(1,a.length):"-"+a:a},e=function(a,e){for(var f=[["scale",".01"],["translateX","20px"],["translateY","20px"],["translateZ","20px"],["rotateX","90deg"],["rotateY","90deg"],["rotateZ","180deg"]],g=0;g<f.length;g++){var h=f[g][0],i=f[g][1],j=e&&"scale"!==h;b[a]+=c(h)?h+"("+d(c(h,!0).val||i,j)+") ":""}};return b.opacity=c("fade")?c("fade",!0).val||"0":"1",e("transformIn"),a.animation.reverseOut?e("transformOut",!0):b.transformOut=b.transformIn,b.transition={},b.transition=a._getPrefixedCSS("transition","all "+a.animation.duration+"ms "+a.animation.easing+", opacity "+a.animation.duration+"ms linear"),a.animation.stagger=c("stagger")?!0:!1,a.animation.staggerDuration=parseInt(c("stagger")&&c("stagger",!0).val?c("stagger",!0).val:100),a._execFilter("_parseEffects",b)},_buildState:function(a){var b=this,c={};return b._execAction("_buildState",0),c={activeFilter:""===b._activeFilter?"none":b._activeFilter,activeSort:a&&b._newSortString?b._newSortString:b._activeSort,fail:!b._$show.length&&""!==b._activeFilter,$targets:b._$targets,$show:b._$show,$hide:b._$hide,totalTargets:b._$targets.length,totalShow:b._$show.length,totalHide:b._$hide.length,display:a&&b._newDisplay?b._newDisplay:b.layout.display},a?b._execFilter("_buildState",c):(b._state=c,void b._execAction("_buildState",1))},_goMix:function(a){var b=this,c=function(){b._chrome&&31===b._chrome&&f(b._$parent[0]),b._setInter(),d()},d=function(){var a=window.pageYOffset,c=window.pageXOffset;document.documentElement.scrollHeight;b._getInterMixData(),b._setFinal(),b._getFinalMixData(),window.pageYOffset!==a&&window.scrollTo(c,a),b._prepTargets(),window.requestAnimationFrame?requestAnimationFrame(e):setTimeout(function(){e()},20)},e=function(){b._animateTargets(),0===b._targetsBound&&b._cleanUp()},f=function(a){var b=a.parentElement,c=document.createElement("div"),d=document.createDocumentFragment();b.insertBefore(c,a),d.appendChild(a),b.replaceChild(a,c)},g=b._buildState(!0);b._execAction("_goMix",0,arguments),!b.animation.duration&&(a=!1),b._mixing=!0,b._$container.removeClass(b.layout.containerClassFail),"function"==typeof b.callbacks.onMixStart&&b.callbacks.onMixStart.call(b._domNode,b._state,g,b),b._$container.trigger("mixStart",[b._state,g,b]),b._getOrigMixData(),a&&!b._suckMode?window.requestAnimationFrame?requestAnimationFrame(c):c():b._cleanUp(),b._execAction("_goMix",1,arguments)},_getTargetData:function(a,b){var c,d=this;a.dataset[b+"PosX"]=a.offsetLeft,a.dataset[b+"PosY"]=a.offsetTop,d.animation.animateResizeTargets&&(c=d._suckMode?{marginBottom:"",marginRight:""}:window.getComputedStyle(a),a.dataset[b+"MarginBottom"]=parseInt(c.marginBottom),a.dataset[b+"MarginRight"]=parseInt(c.marginRight),a.dataset[b+"Width"]=a.offsetWidth,a.dataset[b+"Height"]=a.offsetHeight)},_getOrigMixData:function(){var a=this,b=a._suckMode?{boxSizing:""}:window.getComputedStyle(a._$parent[0]),c=b.boxSizing||b[a._vendor+"BoxSizing"];a._incPadding="border-box"===c,a._execAction("_getOrigMixData",0),!a._suckMode&&(a.effects=a._parseEffects()),a._$toHide=a._$hide.filter(":visible"),a._$toShow=a._$show.filter(":hidden"),a._$pre=a._$targets.filter(":visible"),a._startHeight=a._incPadding?a._$parent.outerHeight():a._$parent.height();for(var d=0;d<a._$pre.length;d++){var e=a._$pre[d];a._getTargetData(e,"orig")}a._execAction("_getOrigMixData",1)},_setInter:function(){var a=this;a._execAction("_setInter",0),a._changingLayout&&a.animation.animateChangeLayout?(a._$toShow.css("display",a._newDisplay),a._changingClass&&a._$container.removeClass(a.layout.containerClass).addClass(a._newClass)):a._$toShow.css("display",a.layout.display),a._execAction("_setInter",1)},_getInterMixData:function(){var a=this;a._execAction("_getInterMixData",0);for(var b=0;b<a._$toShow.length;b++){var c=a._$toShow[b];a._getTargetData(c,"inter")}for(var b=0;b<a._$pre.length;b++){var c=a._$pre[b];a._getTargetData(c,"inter")}a._execAction("_getInterMixData",1)},_setFinal:function(){var a=this;a._execAction("_setFinal",0),a._sorting&&a._printSort(),a._$toHide.removeStyle("display"),a._changingLayout&&a.animation.animateChangeLayout&&a._$pre.css("display",a._newDisplay),a._execAction("_setFinal",1)},_getFinalMixData:function(){var a=this;a._execAction("_getFinalMixData",0);for(var b=0;b<a._$toShow.length;b++){var c=a._$toShow[b];a._getTargetData(c,"final")}for(var b=0;b<a._$pre.length;b++){var c=a._$pre[b];a._getTargetData(c,"final")}a._newHeight=a._incPadding?a._$parent.outerHeight():a._$parent.height(),a._sorting&&a._printSort(!0),a._$toShow.removeStyle("display"),a._$pre.css("display",a.layout.display),a._changingClass&&a.animation.animateChangeLayout&&a._$container.removeClass(a._newClass).addClass(a.layout.containerClass),a._execAction("_getFinalMixData",1)},_prepTargets:function(){var b=this,c={_in:b._getPrefixedCSS("transform",b.effects.transformIn),_out:b._getPrefixedCSS("transform",b.effects.transformOut)};b._execAction("_prepTargets",0),b.animation.animateResizeContainer&&b._$parent.css("height",b._startHeight+"px");for(var d=0;d<b._$toShow.length;d++){var e=b._$toShow[d],f=a(e);e.style.opacity=b.effects.opacity,e.style.display=b._changingLayout&&b.animation.animateChangeLayout?b._newDisplay:b.layout.display,f.css(c._in),b.animation.animateResizeTargets&&(e.style.width=e.dataset.finalWidth+"px",e.style.height=e.dataset.finalHeight+"px",e.style.marginRight=-(e.dataset.finalWidth-e.dataset.interWidth)+1*e.dataset.finalMarginRight+"px",e.style.marginBottom=-(e.dataset.finalHeight-e.dataset.interHeight)+1*e.dataset.finalMarginBottom+"px")}for(var d=0;d<b._$pre.length;d++){var e=b._$pre[d],f=a(e),g={x:e.dataset.origPosX-e.dataset.interPosX,y:e.dataset.origPosY-e.dataset.interPosY},c=b._getPrefixedCSS("transform","translate("+g.x+"px,"+g.y+"px)");f.css(c),b.animation.animateResizeTargets&&(e.style.width=e.dataset.origWidth+"px",e.style.height=e.dataset.origHeight+"px",e.dataset.origWidth-e.dataset.finalWidth&&(e.style.marginRight=-(e.dataset.origWidth-e.dataset.interWidth)+1*e.dataset.origMarginRight+"px"),e.dataset.origHeight-e.dataset.finalHeight&&(e.style.marginBottom=-(e.dataset.origHeight-e.dataset.interHeight)+1*e.dataset.origMarginBottom+"px"))}b._execAction("_prepTargets",1)},_animateTargets:function(){var b=this;b._execAction("_animateTargets",0),b._targetsDone=0,b._targetsBound=0,b._$parent.css(b._getPrefixedCSS("perspective",b.animation.perspectiveDistance+"px")).css(b._getPrefixedCSS("perspective-origin",b.animation.perspectiveOrigin)),b.animation.animateResizeContainer&&b._$parent.css(b._getPrefixedCSS("transition","height "+b.animation.duration+"ms ease")).css("height",b._newHeight+"px");for(var c=0;c<b._$toShow.length;c++){var d=b._$toShow[c],e=a(d),f={x:d.dataset.finalPosX-d.dataset.interPosX,y:d.dataset.finalPosY-d.dataset.interPosY},g=b._getDelay(c),h={};d.style.opacity="";for(var i=0;2>i;i++){var j=0===i?j=b._prefix:"";b._ff&&b._ff<=20&&(h[j+"transition-property"]="all",h[j+"transition-timing-function"]=b.animation.easing+"ms",h[j+"transition-duration"]=b.animation.duration+"ms"),h[j+"transition-delay"]=g+"ms",h[j+"transform"]="translate("+f.x+"px,"+f.y+"px)"}(b.effects.transform||b.effects.opacity)&&b._bindTargetDone(e),b._ff&&b._ff<=20?e.css(h):e.css(b.effects.transition).css(h)}for(var c=0;c<b._$pre.length;c++){var d=b._$pre[c],e=a(d),f={x:d.dataset.finalPosX-d.dataset.interPosX,y:d.dataset.finalPosY-d.dataset.interPosY},g=b._getDelay(c);(d.dataset.finalPosX!==d.dataset.origPosX||d.dataset.finalPosY!==d.dataset.origPosY)&&b._bindTargetDone(e),e.css(b._getPrefixedCSS("transition","all "+b.animation.duration+"ms "+b.animation.easing+" "+g+"ms")),e.css(b._getPrefixedCSS("transform","translate("+f.x+"px,"+f.y+"px)")),b.animation.animateResizeTargets&&(d.dataset.origWidth-d.dataset.finalWidth&&1*d.dataset.finalWidth&&(d.style.width=d.dataset.finalWidth+"px",d.style.marginRight=-(d.dataset.finalWidth-d.dataset.interWidth)+1*d.dataset.finalMarginRight+"px"),d.dataset.origHeight-d.dataset.finalHeight&&1*d.dataset.finalHeight&&(d.style.height=d.dataset.finalHeight+"px",d.style.marginBottom=-(d.dataset.finalHeight-d.dataset.interHeight)+1*d.dataset.finalMarginBottom+"px"))}b._changingClass&&b._$container.removeClass(b.layout.containerClass).addClass(b._newClass);for(var c=0;c<b._$toHide.length;c++){for(var d=b._$toHide[c],e=a(d),g=b._getDelay(c),k={},i=0;2>i;i++){var j=0===i?j=b._prefix:"";k[j+"transition-delay"]=g+"ms",k[j+"transform"]=b.effects.transformOut,k.opacity=b.effects.opacity}e.css(b.effects.transition).css(k),(b.effects.transform||b.effects.opacity)&&b._bindTargetDone(e)}b._execAction("_animateTargets",1)},_bindTargetDone:function(b){var c=this,d=b[0];c._execAction("_bindTargetDone",0,arguments),d.dataset.bound||(d.dataset.bound=!0,c._targetsBound++,b.on("webkitTransitionEnd.mixItUp transitionend.mixItUp",function(e){(e.originalEvent.propertyName.indexOf("transform")>-1||e.originalEvent.propertyName.indexOf("opacity")>-1)&&a(e.originalEvent.target).is(c.selectors.target)&&(b.off(".mixItUp"),d.dataset.bound="",c._targetDone())})),c._execAction("_bindTargetDone",1,arguments)},_targetDone:function(){var a=this;a._execAction("_targetDone",0),a._targetsDone++,a._targetsDone===a._targetsBound&&a._cleanUp(),a._execAction("_targetDone",1)},_cleanUp:function(){var b=this,c=b.animation.animateResizeTargets?"transform opacity width height margin-bottom margin-right":"transform opacity",d=function(){b._$targets.removeStyle("transition",b._prefix)};b._execAction("_cleanUp",0),b._changingLayout?b._$show.css("display",b._newDisplay):b._$show.css("display",b.layout.display),b._$targets.css(b._brake),b._$targets.removeStyle(c,b._prefix).removeAttr("data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom"),b._$hide.removeStyle("display"),b._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin",b._prefix),b._sorting&&(b._printSort(),b._activeSort=b._newSortString,b._sorting=!1),b._changingLayout&&(b._changingDisplay&&(b.layout.display=b._newDisplay,b._changingDisplay=!1),b._changingClass&&(b._$parent.removeClass(b.layout.containerClass).addClass(b._newClass),b.layout.containerClass=b._newClass,b._changingClass=!1),b._changingLayout=!1),b._refresh(),b._buildState(),b._state.fail&&b._$container.addClass(b.layout.containerClassFail),b._$show=a(),b._$hide=a(),window.requestAnimationFrame&&requestAnimationFrame(d),b._mixing=!1,"function"==typeof b.callbacks._user&&b.callbacks._user.call(b._domNode,b._state,b),"function"==typeof b.callbacks.onMixEnd&&b.callbacks.onMixEnd.call(b._domNode,b._state,b),b._$container.trigger("mixEnd",[b._state,b]),b._state.fail&&("function"==typeof b.callbacks.onMixFail&&b.callbacks.onMixFail.call(b._domNode,b._state,b),b._$container.trigger("mixFail",[b._state,b])),b._loading&&("function"==typeof b.callbacks.onMixLoad&&b.callbacks.onMixLoad.call(b._domNode,b._state,b),b._$container.trigger("mixLoad",[b._state,b])),b._queue.length&&(b._execAction("_queue",0),b.multiMix(b._queue[0][0],b._queue[0][1],b._queue[0][2]),b._queue.splice(0,1)),b._execAction("_cleanUp",1),b._loading=!1},_getPrefixedCSS:function(a,b,c){var d=this,e={},f="",g=-1;for(g=0;2>g;g++)f=0===g?d._prefix:"",c?e[f+a]=f+b:e[f+a]=b;return d._execFilter("_getPrefixedCSS",e,arguments)},_getDelay:function(a){var b=this,c="function"==typeof b.animation.staggerSequence?b.animation.staggerSequence.call(b._domNode,a,b._state):a,d=b.animation.stagger?c*b.animation.staggerDuration:0;return b._execFilter("_getDelay",d,arguments)},_parseMultiMixArgs:function(a){for(var b=this,c={command:null,animate:b.animation.enable,callback:null},d=0;d<a.length;d++){var e=a[d];null!==e&&("object"==typeof e||"string"==typeof e?c.command=e:"boolean"==typeof e?c.animate=e:"function"==typeof e&&(c.callback=e))}return b._execFilter("_parseMultiMixArgs",c,arguments)},_parseInsertArgs:function(b){for(var c=this,d={index:0,$object:a(),multiMix:{filter:c._state.activeFilter},callback:null},e=0;e<b.length;e++){var f=b[e];"number"==typeof f?d.index=f:"object"==typeof f&&f instanceof a?d.$object=f:"object"==typeof f&&c._helpers._isElement(f)?d.$object=a(f):"object"==typeof f&&null!==f?d.multiMix=f:"boolean"!=typeof f||f?"function"==typeof f&&(d.callback=f):d.multiMix=!1}return c._execFilter("_parseInsertArgs",d,arguments)},_execAction:function(a,b,c){var d=this,e=b?"post":"pre";if(!d._actions.isEmptyObject&&d._actions.hasOwnProperty(a))for(var f in d._actions[a][e])d._actions[a][e][f].call(d,c)},_execFilter:function(a,b,c){var d=this;if(d._filters.isEmptyObject||!d._filters.hasOwnProperty(a))return b;for(var e in d._filters[a])return d._filters[a][e].call(d,c)},_helpers:{_camelCase:function(a){return a.replace(/-([a-z])/g,function(a){return a[1].toUpperCase()})},_isElement:function(a){return window.HTMLElement?a instanceof HTMLElement:null!==a&&1===a.nodeType&&"string"===a.nodeName}},isMixing:function(){var a=this;return a._execFilter("isMixing",a._mixing)},filter:function(){var a=this,b=a._parseMultiMixArgs(arguments);a._clicking&&(a._toggleString=""),a.multiMix({filter:b.command},b.animate,b.callback)},sort:function(){var a=this,b=a._parseMultiMixArgs(arguments);a.multiMix({sort:b.command},b.animate,b.callback)},changeLayout:function(){var a=this,b=a._parseMultiMixArgs(arguments);a.multiMix({changeLayout:b.command},b.animate,b.callback)},multiMix:function(){var a=this,c=a._parseMultiMixArgs(arguments);if(a._execAction("multiMix",0,arguments),a._mixing)a.animation.queue&&a._queue.length<a.animation.queueLimit?(a._queue.push(arguments),a.controls.enable&&!a._clicking&&a._updateControls(c.command),a._execAction("multiMixQueue",1,arguments)):("function"==typeof a.callbacks.onMixBusy&&a.callbacks.onMixBusy.call(a._domNode,a._state,a),a._$container.trigger("mixBusy",[a._state,a]),a._execAction("multiMixBusy",1,arguments));else{a.controls.enable&&!a._clicking&&(a.controls.toggleFilterButtons&&a._buildToggleArray(),a._updateControls(c.command,a.controls.toggleFilterButtons)),a._queue.length<2&&(a._clicking=!1),delete a.callbacks._user,c.callback&&(a.callbacks._user=c.callback);var d=c.command.sort,e=c.command.filter,f=c.command.changeLayout;a._refresh(),d&&(a._newSort=a._parseSort(d),a._newSortString=d,a._sorting=!0,a._sort()),e!==b&&(e="all"===e?a.selectors.target:e,a._activeFilter=e),a._filter(),f&&(a._newDisplay="string"==typeof f?f:f.display||a.layout.display,a._newClass=f.containerClass||"",(a._newDisplay!==a.layout.display||a._newClass!==a.layout.containerClass)&&(a._changingLayout=!0,a._changingClass=a._newClass!==a.layout.containerClass,a._changingDisplay=a._newDisplay!==a.layout.display)),a._$targets.css(a._brake),a._goMix(c.animate^a.animation.enable?c.animate:a.animation.enable),a._execAction("multiMix",1,arguments)}},insert:function(){var a=this,b=a._parseInsertArgs(arguments),c="function"==typeof b.callback?b.callback:null,d=document.createDocumentFragment(),e=function(){return a._refresh(),a._$targets.length?b.index<a._$targets.length||!a._$targets.length?a._$targets[b.index]:a._$targets[a._$targets.length-1].nextElementSibling:a._$parent[0].children[0]}();if(a._execAction("insert",0,arguments),b.$object){for(var f=0;f<b.$object.length;f++){var g=b.$object[f];d.appendChild(g),d.appendChild(document.createTextNode(" "))}a._$parent[0].insertBefore(d,e)}a._execAction("insert",1,arguments),"object"==typeof b.multiMix&&a.multiMix(b.multiMix,c)},prepend:function(){var a=this,b=a._parseInsertArgs(arguments);a.insert(0,b.$object,b.multiMix,b.callback)},append:function(){var a=this,b=a._parseInsertArgs(arguments);a.insert(a._state.totalTargets,b.$object,b.multiMix,b.callback)},getOption:function(a){var c=this,d=function(a,c){for(var d=c.split("."),e=d.pop(),f=d.length,g=1,h=d[0]||c;(a=a[h])&&f>g;)h=d[g],g++;return a!==b?a[e]!==b?a[e]:a:void 0};return a?c._execFilter("getOption",d(c,a),arguments):c},setOptions:function(b){var c=this;c._execAction("setOptions",0,arguments),"object"==typeof b&&a.extend(!0,c,b),c._execAction("setOptions",1,arguments)},getState:function(){var a=this;return a._execFilter("getState",a._state,a)},forceRefresh:function(){var a=this;a._refresh(!1,!0)},destroy:function(b){var c=this,d=a.MixItUp.prototype._bound._filter,e=a.MixItUp.prototype._bound._sort;c._execAction("destroy",0,arguments),c._$body.add(a(c.selectors.sort)).add(a(c.selectors.filter)).off(".mixItUp");for(var f=0;f<c._$targets.length;f++){var g=c._$targets[f];b&&(g.style.display=""),delete g.mixParent}c._execAction("destroy",1,arguments),d[c.selectors.filter]&&d[c.selectors.filter]>1?d[c.selectors.filter]--:1===d[c.selectors.filter]&&delete d[c.selectors.filter],e[c.selectors.sort]&&e[c.selectors.sort]>1?e[c.selectors.sort]--:1===e[c.selectors.sort]&&delete e[c.selectors.sort],delete a.MixItUp.prototype._instances[c._id]}},a.fn.mixItUp=function(){var c,d=arguments,e=[],f=function(b,c){var d=new a.MixItUp,e=function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()};d._execAction("_instantiate",0,arguments),b.id=b.id?b.id:"MixItUp"+e(),d._instances[b.id]||(d._instances[b.id]=d,d._init(b,c)),d._execAction("_instantiate",1,arguments)};return c=this.each(function(){if(d&&"string"==typeof d[0]){var c=a.MixItUp.prototype._instances[this.id];if("isLoaded"===d[0])e.push(c?!0:!1);else{var g=c[d[0]](d[1],d[2],d[3]);g!==b&&e.push(g)}}else f(this,d[0])}),e.length?e.length>1?e:e[0]:c},a.fn.removeStyle=function(c,d){return d=d?d:"",this.each(function(){for(var e=this,f=c.split(" "),g=0;g<f.length;g++)for(var h=0;4>h;h++){switch(h){case 0:var i=f[g];break;case 1:var i=a.MixItUp.prototype._helpers._camelCase(i);break;case 2:var i=d+f[g];break;case 3:var i=a.MixItUp.prototype._helpers._camelCase(d+f[g])}if(e.style[i]!==b&&"unknown"!=typeof e.style[i]&&e.style[i].length>0&&(e.style[i]=""),!d&&1===h)break}e.attributes&&e.attributes.style&&e.attributes.style!==b&&""===e.attributes.style.value&&e.attributes.removeNamedItem("style")})}}(jQuery);
|
15
|
+
|
16
|
+
$(function(){
|
17
|
+
$('#project_grid').mixItUp({
|
18
|
+
animation: {
|
19
|
+
enabled:false
|
20
|
+
}
|
21
|
+
});
|
22
|
+
|
23
|
+
});
|
@@ -38,4 +38,4 @@ function getAllUrlParams(url) {
|
|
38
38
|
var searchQuery = getAllUrlParams().q;
|
39
39
|
|
40
40
|
|
41
|
-
$('#searchIframe').attr('src', "https://search.linaro.org/search/?fields.label=
|
41
|
+
$('#searchIframe').attr('src', "https://search.linaro.org/search/?fields.label=96Boards&q=" + searchQuery);
|
File without changes
|
data/assets/js/vendor.js
ADDED
@@ -2,7 +2,14 @@
|
|
2
2
|
window.addEventListener("load", function(){
|
3
3
|
window.cookieconsent.initialise({
|
4
4
|
"palette": {
|
5
|
+
"popup": {
|
6
|
+
"background": "#000000",
|
7
|
+
"text": "#ffdf84"
|
8
|
+
},
|
9
|
+
"button": {
|
10
|
+
"background": "#19947b",
|
11
|
+
"text": "#ffffff"
|
12
|
+
}
|
5
13
|
},
|
6
|
-
"
|
7
|
-
"position": "bottom-right"
|
14
|
+
"position": "bottom-left"
|
8
15
|
})});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* jQuery Filtrify v0.2
|
3
|
+
* Beautiful advanced tag filtering with HTML5 and jQuery
|
4
|
+
* http://luis-almeida.github.com/filtrify
|
5
|
+
*
|
6
|
+
* Licensed under the MIT license.
|
7
|
+
* Copyright 2012 Luís Almeida
|
8
|
+
* https://github.com/luis-almeida
|
9
|
+
*/
|
10
|
+
|
11
|
+
;(function($,window,document,undefined){var defaults={noresults:"No results match",hide:true,block:[],close:false,query:undefined,callback:undefined};function Filtrify(containerID,placeholderID,options){this.options=$.extend({},defaults,options);this._container=$("#"+containerID);this._holder=$("#"+placeholderID);this._items=this._container.children();this._matrix=[];this._fields={};this._order=[];this._menu={};this._query={};this._match=[];this._mismatch=[];this._z=9999;this._bind=function(fn,me){return function(){return fn.apply(me,arguments);};};this.init();};Filtrify.prototype.init=function(){this.load();this.set();if(this.options.query!==undefined){this.trigger(this.options.query);};};Filtrify.prototype.load=function(){var attr,i,name,field,tags,data,t;this._items.each(this._bind(function(index,element){attr=element.attributes;data={};for(i=0;i<attr.length;i++){name=attr[i].name;if(name.indexOf("data-")===0&&$.inArray(name,this.options.block)===-1){field=name.replace(/data-/gi,"").replace(/-/gi," ");tags=element.getAttribute(name).split(", ");data[field]=tags;if(this._fields[field]===undefined){this._order.push(field);this._fields[field]={};};for(t=0;t<tags.length;t++){if(tags[t].length){tags[t]=tags[t].replace(/\\/g,"");this._fields[field][tags[t]]=this._fields[field][tags[t]]===undefined?1:this._fields[field][tags[t]]+1;};};};};this._matrix.push(data);},this));};Filtrify.prototype.set=function(){var f=0,field,browser=$.browser;this._menu.list=$("<ul class='ft-menu' />");for(f;f<this._order.length;f++){field=browser.webkit||browser.opera?this._order[f]:this._order[this._order.length-f-1];this._menu[field]={};this.build(field);this.cache(field);this.events(field);this.append(field);this.query(field);};this._holder.html(this._menu.list);};Filtrify.prototype.build=function(f){var html,t,tag,tags=[];html="<li class='ft-field'>"+"<span class='ft-label'>"+f+"</span>"+"<div class='ft-panel ft-hidden'>"+"<ul class='ft-selected' style='display:none;'></ul>"+"<fieldset class='ft-search'><input type='text' placeholder='Search' /></fieldset>"+"<ul class='ft-tags'>";for(tag in this._fields[f]){tags.push(tag);};tags.sort();for(t=0;t<tags.length;t++){tag=tags[t];html+="<li data-count='"+this._fields[f][tag]+"' >"+tag+"</li>";};html+="</ul><div class='ft-mismatch ft-hidden'></div></div></li>";this._menu[f].item=$(html);};Filtrify.prototype.cache=function(f){this._menu[f].label=this._menu[f].item.find("span.ft-label");this._menu[f].panel=this._menu[f].item.find("div.ft-panel");this._menu[f].selected=this._menu[f].item.find("ul.ft-selected");this._menu[f].search=this._menu[f].item.find("fieldset.ft-search");this._menu[f].tags=this._menu[f].item.find("ul.ft-tags");this._menu[f].mismatch=this._menu[f].item.find("div.ft-mismatch");this._menu[f].highlight=$([]);this._menu[f].active=$([]);};Filtrify.prototype.append=function(f){this._menu.list.append(this._menu[f].item);};Filtrify.prototype.query=function(f){this._query[f]=[];};Filtrify.prototype.events=function(f){$(document).on("click",this._bind(function(){this.closePanel(f);},this));this._menu[f].panel.on("click",this._bind(function(event){event.stopPropagation();},this));this._menu[f].panel.on("mouseenter",this._bind(function(){this.bringToFront(f);},this));this._menu[f].label.on("click",this._bind(function(event){this.openPanel(f);this.bringToFront(f);event.stopPropagation();},this));this._menu[f].search.on("keyup","input",this._bind(function(event){if(event.which===38||event.which===40){return false;}else if(event.which===13){if(this._menu[f].highlight.length){this.select(f);this.filter();};}else{this.search(f,event.target.value);};},this));this._menu[f].search.on("keydown","input",this._bind(function(event){if(event.which===40){this.moveHighlight(f,"down");event.preventDefault();}else if(event.which===38){this.moveHighlight(f,"up");event.preventDefault();};},this));this._menu[f].tags.on("mouseenter","li",this._bind(function(event){this.highlight(f,$(event.target));},this));this._menu[f].tags.on("mouseleave","li",this._bind(function(){this.clearHighlight(f);},this));this._menu[f].tags.on("click","li",this._bind(function(){this.select(f);this.filter();},this));this._menu[f].selected.on("click","li",this._bind(function(event){this.unselect(f,$(event.target).text());this.filter();},this));};Filtrify.prototype.bringToFront=function(f){this._z=this._z+1;this._menu[f].panel.css("z-index",this._z);this._menu[f].search.find("input").focus();};Filtrify.prototype.openPanel=function(f){this._menu[f].label.toggleClass("ft-opened");this._menu[f].panel.toggleClass("ft-hidden");this._menu[f].search.find("input").focus();};Filtrify.prototype.closePanel=function(f){this.resetSearch(f);this._menu[f].panel.addClass("ft-hidden");this._menu[f].label.removeClass("ft-opened");};Filtrify.prototype.preventOverflow=function(f){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;maxHeight=parseInt(this._menu[f].tags.css("maxHeight"),10);visible_top=this._menu[f].tags.scrollTop();visible_bottom=maxHeight+visible_top;high_top=this._menu[f].highlight.position().top+this._menu[f].tags.scrollTop();high_bottom=high_top+this._menu[f].highlight.outerHeight();if(high_bottom>=visible_bottom){return this._menu[f].tags.scrollTop((high_bottom-maxHeight)>0?high_bottom-maxHeight:0);}else if(high_top<visible_top){return this._menu[f].tags.scrollTop(high_top);}};Filtrify.prototype.moveHighlight=function(f,direction){if(this._menu[f].highlight.length){var method=direction==="down"?"nextAll":"prevAll",next=this._menu[f].highlight[method](":visible:first");if(next.length){this.clearHighlight(f);this.highlight(f,next);this.preventOverflow(f);};}else{this.highlight(f,this._menu[f].tags.children(":visible:first"));this.preventOverflow(f);};};Filtrify.prototype.highlight=function(f,elem){this._menu[f].highlight=elem;this._menu[f].highlight.addClass("ft-highlight");};Filtrify.prototype.removeHighlight=function(f){this._menu[f].highlight.removeClass("ft-highlight");};Filtrify.prototype.hideHighlight=function(f){this._menu[f].highlight.addClass("ft-hidden");};Filtrify.prototype.resetHighlight=function(f){this._menu[f].highlight=$([]);};Filtrify.prototype.clearHighlight=function(f){this.removeHighlight(f);this.resetHighlight(f);};Filtrify.prototype.showMismatch=function(f,txt){this._menu[f].mismatch.html(this.options.noresults+" \"<b>"+txt+"</b>\"").removeClass("ft-hidden");};Filtrify.prototype.hideMismatch=function(f){this._menu[f].mismatch.addClass("ft-hidden");};Filtrify.prototype.search=function(f,txt){this.clearHighlight(f);this.showResults(f,txt);this.highlight(f,this._menu[f].tags.children(":visible:first"));};Filtrify.prototype.resetSearch=function(f){this._menu[f].search.find("input").val("");this._menu[f].tags.children().not(this._menu[f].active).removeClass("ft-hidden");this.hideMismatch(f);};Filtrify.prototype.showResults=function(f,txt){var results=0;this.hideMismatch(f);this._menu[f].tags.children().not(this._menu[f].active).each(function(){if((this.textContent||this.innerText).toUpperCase().indexOf(txt.toUpperCase())>=0){$(this).removeClass("ft-hidden");results=results+1;}else{$(this).addClass("ft-hidden");};});if(!results){this.showMismatch(f,txt);};};Filtrify.prototype.select=function(f){this.updateQueryTags(f,this._menu[f].highlight.text());this.updateActiveClass(f);this.removeHighlight(f);this.appendToSelected(f);this.addToActive(f);this.hideHighlight(f);this.resetHighlight(f);this.resetSearch(f);if(this.options.close){this.closePanel(f);};};Filtrify.prototype.updateQueryTags=function(f,tag){var index=$.inArray(tag,this._query[f]);if(index===-1){this._query[f].push(tag);}else{this._query[f].splice(index,1);};};Filtrify.prototype.updateActiveClass=function(f){if(this._query[f].length){this._menu[f].label.addClass("ft-active");}else{this._menu[f].label.removeClass("ft-active");};};Filtrify.prototype.appendToSelected=function(f){this._menu[f].selected.append(this._menu[f].highlight.clone());this.slideSelected(f);};Filtrify.prototype.addToActive=function(f){this._menu[f].active=this._menu[f].active.add(this._menu[f].highlight);};Filtrify.prototype.unselect=function(f,tag){this.updateQueryTags(f,tag);this.removeFromSelected(f,tag);this.removeFromActive(f,tag);this.updateActiveClass(f);this.resetSearch(f);};Filtrify.prototype.removeFromSelected=function(f,tag){this._menu[f].selected.children().filter(function(){return(this.textContent||this.innerText)===tag;}).remove();this.slideSelected(f);};Filtrify.prototype.removeFromActive=function(f,tag){this._menu[f].active=this._menu[f].active.filter(function(){return(this.textContent||this.innerText)!==tag;});};Filtrify.prototype.slideSelected=function(f){if(this._menu[f].selected.children().length){this._menu[f].selected.slideDown("fast");}else{this._menu[f].selected.slideUp("fast");};};Filtrify.prototype.filter=function(){var f,r,t,c,m;this.resetCachedMatch();for(r=this._matrix.length-1;r>=0;r--){m=true;for(f in this._query){c=0;for(t=this._query[f].length-1;t>=0;t--){if($.inArray(this._query[f][t],this._matrix[r][f])!==-1){c=c+1;};};if(!this._query[f].length||c>=this._query[f].length){}else{m=false;};};this.updateFields(r,m);this.cacheMatch(r,m);this.showMatch(r,m);};this.rewriteFields();this.callback();};Filtrify.prototype.updateFields=function(row,match){var field,tags,t;for(field in this._fields){if(row===this._matrix.length-1){this._fields[field]={};};tags=this._matrix[row][field];if(match&&tags){for(t=0;t<tags.length;t++){if(tags[t].length){this._fields[field][tags[t]]=this._fields[field][tags[t]]===undefined?1:this._fields[field][tags[t]]+1;};};};};};Filtrify.prototype.rewriteFields=function(){var field;for(field in this._fields){this._menu[field].tags.children().each(this._bind(function(index,element){var tag=(element.textContent||element.innerText),count=this._fields[field][tag]===undefined?0:this._fields[field][tag];element.setAttribute("data-count",count);},this));};};Filtrify.prototype.resetCachedMatch=function(){this._match=[];this._mismatch=[];};Filtrify.prototype.cacheMatch=function(row,match){if(match){this._match.unshift(this._items[row]);}else{this._mismatch.unshift(this._items[row]);};};Filtrify.prototype.showMatch=function(row,match){if(this.options.hide){var hidden=this._items[row].className.indexOf("ft-hidden")!==-1;if(match){if(hidden)this._items[row].className=this._items[row].className.replace(/ft-hidden/g,"");}else{if(!hidden)this._items[row].className=this._items[row].className+" ft-hidden";};};};Filtrify.prototype.callback=function(){if(this.options.callback!==undefined&&$.isFunction(this.options.callback)){this.options.callback(this._query,this._match,this._mismatch);};};Filtrify.prototype.trigger=function(query){var f;for(f in this._fields){this.clearSearch(f);this.updateQueryField(f,query);this.updateActiveClass(f);this.updatePanel(f);this.toggleSelected(f);};this.filter();};Filtrify.prototype.clearSearch=function(f){this.clearHighlight(f);this.resetSearch(f);this.clearSelected(f);};Filtrify.prototype.clearSelected=function(f){this._menu[f].selected.empty();this._menu[f].active=$([]);};Filtrify.prototype.updateQueryField=function(f,query){this._query[f]=query[f]!==undefined?query[f]:[];};Filtrify.prototype.updatePanel=function(f){var t=0,tag,tags=this._menu[f].tags.children().removeClass("ft-hidden");for(t;t<this._query[f].length;t++){tag=tags.filter(this._bind(function(index){return(tags[index].textContent||tags[index].innerText)===this._query[f][t];},this));this._menu[f].selected.append(tag.clone());this._menu[f].active=this._menu[f].active.add(tag);tag.addClass("ft-hidden");};};Filtrify.prototype.toggleSelected=function(f){if(this._menu[f].selected.children().length){this._menu[f].selected.show();}else{this._menu[f].selected.hide();};};Filtrify.prototype.reset=function(){this.trigger({});};$.filtrify=function(containerID,placeholderID,options){return new Filtrify(containerID,placeholderID,options);};})(jQuery,window,document);
|
@@ -1,35 +1,2 @@
|
|
1
1
|
/*! flipclock 2015-08-31 */
|
2
2
|
var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a<arguments.length;a++)"function"==typeof arguments[a]?arguments[a](this.prototype):this.prototype.extend(arguments[a]);return this},toString:function(){return String(this.valueOf())}});var FlipClock;!function(a){"use strict";FlipClock=function(a,b,c){return b instanceof Object&&b instanceof Date==!1&&(c=b,b=0),new FlipClock.Factory(a,b,c)},FlipClock.Lang={},FlipClock.Base=Base.extend({buildDate:"2014-12-12",version:"0.7.7",constructor:function(b,c){"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={}),this.setOptions(a.extend(!0,{},b,c))},callback:function(a){if("function"==typeof a){for(var b=[],c=1;c<=arguments.length;c++)arguments[c]&&b.push(arguments[c]);a.apply(this,b)}},log:function(a){window.console&&console.log&&console.log(a)},getOption:function(a){return this[a]?this[a]:!1},getOptions:function(){return this},setOption:function(a,b){this[a]=b},setOptions:function(a){for(var b in a)"undefined"!=typeof a[b]&&this.setOption(b,a[b])}})}(jQuery),function(a){"use strict";FlipClock.Face=FlipClock.Base.extend({autoStart:!0,dividers:[],factory:!1,lists:[],constructor:function(a,b){this.dividers=[],this.lists=[],this.base(b),this.factory=a},build:function(){this.autoStart&&this.start()},createDivider:function(b,c,d){"boolean"!=typeof c&&c||(d=c,c=b);var e=['<span class="'+this.factory.classes.dot+' top"></span>','<span class="'+this.factory.classes.dot+' bottom"></span>'].join("");d&&(e=""),b=this.factory.localize(b);var f=['<span class="'+this.factory.classes.divider+" "+(c?c:"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(b?b:"")+"</span>",e,"</span>"],g=a(f.join(""));return this.dividers.push(g),g},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return this.lists.push(c),c},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits}),this.flip(this.factory.original,!1)},appendDigitToClock:function(a){a.$el.append(!1)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(b)},start:function(){},stop:function(){},autoIncrement:function(){this.factory.countdown?this.decrement():this.increment()},increment:function(){this.factory.time.addSecond()},decrement:function(){0==this.factory.time.getTimeSeconds()?this.factory.stop():this.factory.time.subSecond()},flip:function(b,c){var d=this;a.each(b,function(a,b){var e=d.lists[a];e?(c||b==e.digit||e.play(),e.select(b)):d.addDigit(b)})}})}(jQuery),function(a){"use strict";FlipClock.Factory=FlipClock.Base.extend({animationRate:1e3,autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:!1,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:!1,face:!0,lang:!1,language:"english",minimumDigits:0,original:!1,running:!1,time:!1,timer:!1,$wrapper:!1,constructor:function(b,c,d){d||(d={}),this.lists=[],this.running=!1,this.base(d),this.$el=a(b).addClass(this.classes.wrapper),this.$wrapper=this.$el,this.original=c instanceof Date?c:c?Math.round(c):0,this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate}),this.timer=new FlipClock.Timer(this,d),this.loadLanguage(this.language),this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face",e=!1;return a=a.ucfirst()+d,this.face.stop&&(this.stop(),e=!0),this.$el.html(""),this.time.minimumDigits=this.minimumDigits,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),this.face=c,e&&this.start(),this.face},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage],this.lang=b},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists.hasOwnProperty(b)&&this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.flip(!0)},getTime:function(a){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(a){this.face.flip(!1,a)}})}(jQuery),function(a){"use strict";FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$el:!1,$obj:!1,items:[],lastDigit:0,constructor:function(a,b,c){this.factory=a,this.digit=b,this.lastDigit=b,this.$el=this.createList(),this.$obj=this.$el,b>0&&this.select(b),this.factory.$el.append(this.$el)},select:function(a){if("undefined"==typeof a?a=this.digit:this.digit=a,this.digit!=this.lastDigit){var b=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before),this.appendListItem(this.classes.active,this.digit),b.remove(),this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$el.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createListItem:function(a,b){return['<li class="'+(a?a:"")+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn">'+(b?b:"")+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn">'+(b?b:"")+"</div>","</div>","</a>","</li>"].join("")},appendListItem:function(a,b){var c=this.createListItem(a,b);this.$el.append(c)},createList:function(){var b=this.getPrevDigit()?this.getPrevDigit():this.digit,c=a(['<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'">',this.createListItem(this.classes.before,b),this.createListItem(this.classes.active,this.digit),"</ul>"].join(""));return c},getNextDigit:function(){return 9==this.digit?0:this.digit+1},getPrevDigit:function(){return 0==this.digit?9:this.digit-1}})}(jQuery),function(a){"use strict";String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){"use strict";FlipClock.Time=FlipClock.Base.extend({time:0,factory:!1,minimumDigits:0,constructor:function(a,b,c){"object"!=typeof c&&(c={}),c.minimumDigits||(c.minimumDigits=a.minimumDigits),this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;c<a.length;c++)a[c].match(/^\d*$/g)&&b.push(a[c]);return b},digit:function(a){var b=this.toString(),c=b.length;return b[c-a]?b[c-a]:!1},digitize:function(b){var c=[];if(a.each(b,function(a,b){b=b.toString(),1==b.length&&(b="0"+b);for(var d=0;d<b.length;d++)c.push(b.charAt(d))}),c.length>this.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length)for(var d=c.length;d<this.minimumDigits;d++)c.unshift("0");return c},getDateObject:function(){return this.time instanceof Date?this.time:new Date((new Date).getTime()+1e3*this.getTimeSeconds())},getDayCounter:function(a){var b=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return a&&b.push(this.getSeconds(!0)),this.digitize(b)},getDays:function(a){var b=this.getTimeSeconds()/60/60/24;return a&&(b%=7),Math.floor(b)},getHourCounter:function(){var a=this.digitize([this.getHours(),this.getMinutes(!0),this.getSeconds(!0)]);return a},getHourly:function(){return this.getHourCounter()},getHours:function(a){var b=this.getTimeSeconds()/60/60;return a&&(b%=24),Math.floor(b)},getMilitaryTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject());var c=[a.getHours(),a.getMinutes()];return b===!0&&c.push(a.getSeconds()),this.digitize(c)},getMinutes:function(a){var b=this.getTimeSeconds()/60;return a&&(b%=60),Math.floor(b)},getMinuteCounter:function(){var a=this.digitize([this.getMinutes(),this.getSeconds(!0)]);return a},getTimeSeconds:function(a){return a||(a=new Date),this.time instanceof Date?this.factory.countdown?Math.max(this.time.getTime()/1e3-a.getTime()/1e3,0):a.getTime()/1e3-this.time.getTime()/1e3:this.time},getTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject()),console.log(a);var c=a.getHours(),d=[c>12?c-12:0===c?12:c,a.getMinutes()];return b===!0&&d.push(a.getSeconds()),this.digitize(d)},getSeconds:function(a){var b=this.getTimeSeconds();return a&&(60==b?b=0:b%=60),Math.ceil(b)},getWeeks:function(a){var b=this.getTimeSeconds()/60/60/24/7;return a&&(b%=52),Math.floor(b)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a,f){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},addSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()+a):this.time+=a},addSecond:function(){this.addSeconds(1)},subSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()-a):this.time-=a},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}(jQuery),function(a){"use strict";FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,animationRate:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b._interval(a),b.timer=setInterval(function(){b._interval(a)},this.interval)}})}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul");this.factory.time.time||(this.factory.original=new Date,this.factory.time=new FlipClock.Time(this.factory,this.factory.original));var b=b?b:this.factory.time.getMilitaryTime(!1,this.showSeconds);b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.createDivider(),this.createDivider(),a(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el),a(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el),this.base()},flip:function(a,b){this.autoIncrement(),a=a?a:this.factory.time.getMilitaryTime(!1,this.showSeconds),this.base(a,b)}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:!1,constructor:function(a,b){"object"!=typeof b&&(b={}),a.autoStart=b.autoStart?!0:!1,b.autoStart&&(this.shouldAutoIncrement=!0),a.increment=function(){a.countdown=!1,a.setTime(a.getTime().getTimeSeconds()+1)},a.decrement=function(){a.countdown=!0;var b=a.getTime().getTimeSeconds();b>0&&a.setTime(b-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$el.find("ul"),d=this.factory.getTime().digitize([this.factory.getTime().time]);d.length>c.length&&a.each(d,function(a,c){var d=b.createList(c);d.select(c)}),a.each(this.lists,function(a,b){b.play()}),this.base()},flip:function(a,b){this.shouldAutoIncrement&&this.autoIncrement(),a||(a=this.factory.getTime().digitize([this.factory.getTime().time])),this.base(a,b)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0),this.flip()}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul"),e=0;b=b?b:this.factory.time.getDayCounter(this.showSeconds),b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el):e=2,a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4+e].$el),a(this.createDivider("Hours")).insertBefore(this.lists[this.lists.length-6+e].$el),a(this.createDivider("Days",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getDayCounter(this.showSeconds)),this.autoIncrement(),this.base(a,b)}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$el.find("ul");c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){d.createList(b)}),a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el),a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4].$el),b||a(this.createDivider("Hours",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getHourCounter()),this.autoIncrement(),this.base(a,b)},appendDigitToClock:function(a){this.base(a),this.dividers[0].insertAfter(this.dividers[0].next())}})}(jQuery),function(a){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a,b){a||(a=this.factory.time.getMinuteCounter()),this.base(a,b)}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(){var b=this.factory.time.getTime(!1,this.showSeconds);this.base(b),this.meridiumText=this.getMeridium(),this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(a,b){this.meridiumText!=this.getMeridium()&&(this.meridiumText=this.getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime(!1,this.showSeconds),b)},getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},isPM:function(){return"PM"==this.getMeridium()?!0:!1},isAM:function(){return"AM"==this.getMeridium()?!0:!1}})}(jQuery),function(a){FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"},FlipClock.Lang.ar=FlipClock.Lang.Arabic,FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic,FlipClock.Lang.arabic=FlipClock.Lang.Arabic}(jQuery),function(a){FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.da=FlipClock.Lang.Danish,FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish,FlipClock.Lang.danish=FlipClock.Lang.Danish}(jQuery),function(a){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(a){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(a){FlipClock.Lang.Spanish={years:"Años",months:"Meses",days:"Días",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(a){FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"},FlipClock.Lang.fi=FlipClock.Lang.Finnish,FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish,FlipClock.Lang.finnish=FlipClock.Lang.Finnish}(jQuery),function(a){FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery),function(a){FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"},FlipClock.Lang.it=FlipClock.Lang.Italian,FlipClock.Lang["it-it"]=FlipClock.Lang.Italian,FlipClock.Lang.italian=FlipClock.Lang.Italian}(jQuery),function(a){FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"},FlipClock.Lang.lv=FlipClock.Lang.Latvian,FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian,FlipClock.Lang.latvian=FlipClock.Lang.Latvian}(jQuery),function(a){FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"},FlipClock.Lang.nl=FlipClock.Lang.Dutch,FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch,FlipClock.Lang.dutch=FlipClock.Lang.Dutch}(jQuery),function(a){FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.no=FlipClock.Lang.Norwegian,FlipClock.Lang.nb=FlipClock.Lang.Norwegian,FlipClock.Lang["no-nb"]=FlipClock.Lang.Norwegian,FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian}(jQuery),function(a){FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.pt=FlipClock.Lang.Portuguese,FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese,FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese}(jQuery),function(a){FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"},FlipClock.Lang.ru=FlipClock.Lang.Russian,FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian,FlipClock.Lang.russian=FlipClock.Lang.Russian}(jQuery),function(a){FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"},FlipClock.Lang.sv=FlipClock.Lang.Swedish,FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish,FlipClock.Lang.swedish=FlipClock.Lang.Swedish}(jQuery),function(a){FlipClock.Lang.Chinese={years:"年",months:"月",days:"日",hours:"时",minutes:"分",seconds:"秒"},FlipClock.Lang.zh=FlipClock.Lang.Chinese,FlipClock.Lang["zh-cn"]=FlipClock.Lang.Chinese,FlipClock.Lang.chinese=FlipClock.Lang.Chinese}(jQuery);
|
3
|
-
|
4
|
-
$(document).ready(function(){
|
5
|
-
|
6
|
-
//Open Hours CountDown using FlipClick http://flipclockjs.com/
|
7
|
-
|
8
|
-
function nextDay(x){
|
9
|
-
var now = new Date();
|
10
|
-
now.setDate(now.getDate() + (x+(7-now.getDay())) % 7);
|
11
|
-
return now;
|
12
|
-
}
|
13
|
-
|
14
|
-
var nextOpenHours = nextDay(4);
|
15
|
-
|
16
|
-
//The date of the open hours
|
17
|
-
var openhours = new Date(Date.UTC(2017, 06, 27, 16, 0, 0));
|
18
|
-
var now = new Date();
|
19
|
-
var diff = openhours.getTime()/1000 - now.getTime()/1000;
|
20
|
-
|
21
|
-
var date2 = new Date(Date.UTC(1996, nextOpenHours.getMonth(), nextOpenHours.getDate(), 16, 0, 0));
|
22
|
-
var now2 = new Date();
|
23
|
-
var diff2 = date2.getTime()/1000 - now2.getTime()/1000;
|
24
|
-
|
25
|
-
var clock = $('.open-hours-clock').FlipClock(diff, {
|
26
|
-
clockFace: 'DailyCounter',
|
27
|
-
countdown: true
|
28
|
-
});
|
29
|
-
|
30
|
-
var clock2 = $('.expired-clock').FlipClock(diff2, {
|
31
|
-
clockFace: 'DailyCounter',
|
32
|
-
countdown: true
|
33
|
-
});
|
34
|
-
|
35
|
-
}));
|
@@ -0,0 +1,519 @@
|
|
1
|
+
/*!
|
2
|
+
* Lightbox v2.9.0
|
3
|
+
* by Lokesh Dhakar
|
4
|
+
*
|
5
|
+
* More info:
|
6
|
+
* http://lokeshdhakar.com/projects/lightbox2/
|
7
|
+
*
|
8
|
+
* Copyright 2007, 2015 Lokesh Dhakar
|
9
|
+
* Released under the MIT license
|
10
|
+
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
11
|
+
*
|
12
|
+
* @preserve
|
13
|
+
*/
|
14
|
+
|
15
|
+
// Uses Node, AMD or browser globals to create a module.
|
16
|
+
(function (root, factory) {
|
17
|
+
if (typeof define === 'function' && define.amd) {
|
18
|
+
// AMD. Register as an anonymous module.
|
19
|
+
define(['jquery'], factory);
|
20
|
+
} else if (typeof exports === 'object') {
|
21
|
+
// Node. Does not work with strict CommonJS, but
|
22
|
+
// only CommonJS-like environments that support module.exports,
|
23
|
+
// like Node.
|
24
|
+
module.exports = factory(require('jquery'));
|
25
|
+
} else {
|
26
|
+
// Browser globals (root is window)
|
27
|
+
root.lightbox = factory(root.jQuery);
|
28
|
+
}
|
29
|
+
}(this, function ($) {
|
30
|
+
|
31
|
+
function Lightbox(options) {
|
32
|
+
this.album = [];
|
33
|
+
this.currentImageIndex = void 0;
|
34
|
+
this.init();
|
35
|
+
|
36
|
+
// options
|
37
|
+
this.options = $.extend({}, this.constructor.defaults);
|
38
|
+
this.option(options);
|
39
|
+
}
|
40
|
+
|
41
|
+
// Descriptions of all options available on the demo site:
|
42
|
+
// http://lokeshdhakar.com/projects/lightbox2/index.html#options
|
43
|
+
Lightbox.defaults = {
|
44
|
+
albumLabel: 'Image %1 of %2',
|
45
|
+
alwaysShowNavOnTouchDevices: false,
|
46
|
+
fadeDuration: 600,
|
47
|
+
fitImagesInViewport: true,
|
48
|
+
imageFadeDuration: 600,
|
49
|
+
// maxWidth: 800,
|
50
|
+
// maxHeight: 600,
|
51
|
+
positionFromTop: 50,
|
52
|
+
resizeDuration: 700,
|
53
|
+
showImageNumberLabel: true,
|
54
|
+
wrapAround: false,
|
55
|
+
disableScrolling: false,
|
56
|
+
/*
|
57
|
+
Sanitize Title
|
58
|
+
If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
|
59
|
+
This will free you to add html tags, such as links, in the caption.
|
60
|
+
|
61
|
+
If the caption data is user submitted or from some other untrusted source, then set this to true
|
62
|
+
to prevent xss and other injection attacks.
|
63
|
+
*/
|
64
|
+
sanitizeTitle: false
|
65
|
+
};
|
66
|
+
|
67
|
+
Lightbox.prototype.option = function(options) {
|
68
|
+
$.extend(this.options, options);
|
69
|
+
};
|
70
|
+
|
71
|
+
Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) {
|
72
|
+
return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
|
73
|
+
};
|
74
|
+
|
75
|
+
Lightbox.prototype.init = function() {
|
76
|
+
var self = this;
|
77
|
+
// Both enable and build methods require the body tag to be in the DOM.
|
78
|
+
$(document).ready(function() {
|
79
|
+
self.enable();
|
80
|
+
self.build();
|
81
|
+
});
|
82
|
+
};
|
83
|
+
|
84
|
+
// Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
|
85
|
+
// that contain 'lightbox'. When these are clicked, start lightbox.
|
86
|
+
Lightbox.prototype.enable = function() {
|
87
|
+
var self = this;
|
88
|
+
$('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
|
89
|
+
self.start($(event.currentTarget));
|
90
|
+
return false;
|
91
|
+
});
|
92
|
+
};
|
93
|
+
|
94
|
+
// Build html for the lightbox and the overlay.
|
95
|
+
// Attach event handlers to the new DOM elements. click click click
|
96
|
+
Lightbox.prototype.build = function() {
|
97
|
+
var self = this;
|
98
|
+
$('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
|
99
|
+
|
100
|
+
// Cache jQuery objects
|
101
|
+
this.$lightbox = $('#lightbox');
|
102
|
+
this.$overlay = $('#lightboxOverlay');
|
103
|
+
this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
|
104
|
+
this.$container = this.$lightbox.find('.lb-container');
|
105
|
+
this.$image = this.$lightbox.find('.lb-image');
|
106
|
+
this.$nav = this.$lightbox.find('.lb-nav');
|
107
|
+
|
108
|
+
// Store css values for future lookup
|
109
|
+
this.containerPadding = {
|
110
|
+
top: parseInt(this.$container.css('padding-top'), 10),
|
111
|
+
right: parseInt(this.$container.css('padding-right'), 10),
|
112
|
+
bottom: parseInt(this.$container.css('padding-bottom'), 10),
|
113
|
+
left: parseInt(this.$container.css('padding-left'), 10)
|
114
|
+
};
|
115
|
+
|
116
|
+
this.imageBorderWidth = {
|
117
|
+
top: parseInt(this.$image.css('border-top-width'), 10),
|
118
|
+
right: parseInt(this.$image.css('border-right-width'), 10),
|
119
|
+
bottom: parseInt(this.$image.css('border-bottom-width'), 10),
|
120
|
+
left: parseInt(this.$image.css('border-left-width'), 10)
|
121
|
+
};
|
122
|
+
|
123
|
+
// Attach event handlers to the newly minted DOM elements
|
124
|
+
this.$overlay.hide().on('click', function() {
|
125
|
+
self.end();
|
126
|
+
return false;
|
127
|
+
});
|
128
|
+
|
129
|
+
this.$lightbox.hide().on('click', function(event) {
|
130
|
+
if ($(event.target).attr('id') === 'lightbox') {
|
131
|
+
self.end();
|
132
|
+
}
|
133
|
+
return false;
|
134
|
+
});
|
135
|
+
|
136
|
+
this.$outerContainer.on('click', function(event) {
|
137
|
+
if ($(event.target).attr('id') === 'lightbox') {
|
138
|
+
self.end();
|
139
|
+
}
|
140
|
+
return false;
|
141
|
+
});
|
142
|
+
|
143
|
+
this.$lightbox.find('.lb-prev').on('click', function() {
|
144
|
+
if (self.currentImageIndex === 0) {
|
145
|
+
self.changeImage(self.album.length - 1);
|
146
|
+
} else {
|
147
|
+
self.changeImage(self.currentImageIndex - 1);
|
148
|
+
}
|
149
|
+
return false;
|
150
|
+
});
|
151
|
+
|
152
|
+
this.$lightbox.find('.lb-next').on('click', function() {
|
153
|
+
if (self.currentImageIndex === self.album.length - 1) {
|
154
|
+
self.changeImage(0);
|
155
|
+
} else {
|
156
|
+
self.changeImage(self.currentImageIndex + 1);
|
157
|
+
}
|
158
|
+
return false;
|
159
|
+
});
|
160
|
+
|
161
|
+
/*
|
162
|
+
Show context menu for image on right-click
|
163
|
+
|
164
|
+
There is a div containing the navigation that spans the entire image and lives above of it. If
|
165
|
+
you right-click, you are right clicking this div and not the image. This prevents users from
|
166
|
+
saving the image or using other context menu actions with the image.
|
167
|
+
|
168
|
+
To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
|
169
|
+
set pointer-events to none on the nav div. This is so that the upcoming right-click event on
|
170
|
+
the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
|
171
|
+
we set the pointer events back to auto for the nav div so it can capture hover and left-click
|
172
|
+
events as usual.
|
173
|
+
*/
|
174
|
+
this.$nav.on('mousedown', function(event) {
|
175
|
+
if (event.which === 3) {
|
176
|
+
self.$nav.css('pointer-events', 'none');
|
177
|
+
|
178
|
+
self.$lightbox.one('contextmenu', function() {
|
179
|
+
setTimeout(function() {
|
180
|
+
this.$nav.css('pointer-events', 'auto');
|
181
|
+
}.bind(self), 0);
|
182
|
+
});
|
183
|
+
}
|
184
|
+
});
|
185
|
+
|
186
|
+
|
187
|
+
this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
|
188
|
+
self.end();
|
189
|
+
return false;
|
190
|
+
});
|
191
|
+
};
|
192
|
+
|
193
|
+
// Show overlay and lightbox. If the image is part of a set, add siblings to album array.
|
194
|
+
Lightbox.prototype.start = function($link) {
|
195
|
+
var self = this;
|
196
|
+
var $window = $(window);
|
197
|
+
|
198
|
+
$window.on('resize', $.proxy(this.sizeOverlay, this));
|
199
|
+
|
200
|
+
$('select, object, embed').css({
|
201
|
+
visibility: 'hidden'
|
202
|
+
});
|
203
|
+
|
204
|
+
this.sizeOverlay();
|
205
|
+
|
206
|
+
this.album = [];
|
207
|
+
var imageNumber = 0;
|
208
|
+
|
209
|
+
function addToAlbum($link) {
|
210
|
+
self.album.push({
|
211
|
+
link: $link.attr('href'),
|
212
|
+
title: $link.attr('data-title') || $link.attr('title')
|
213
|
+
});
|
214
|
+
}
|
215
|
+
|
216
|
+
// Support both data-lightbox attribute and rel attribute implementations
|
217
|
+
var dataLightboxValue = $link.attr('data-lightbox');
|
218
|
+
var $links;
|
219
|
+
|
220
|
+
if (dataLightboxValue) {
|
221
|
+
$links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
|
222
|
+
for (var i = 0; i < $links.length; i = ++i) {
|
223
|
+
addToAlbum($($links[i]));
|
224
|
+
if ($links[i] === $link[0]) {
|
225
|
+
imageNumber = i;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
} else {
|
229
|
+
if ($link.attr('rel') === 'lightbox') {
|
230
|
+
// If image is not part of a set
|
231
|
+
addToAlbum($link);
|
232
|
+
} else {
|
233
|
+
// If image is part of a set
|
234
|
+
$links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
|
235
|
+
for (var j = 0; j < $links.length; j = ++j) {
|
236
|
+
addToAlbum($($links[j]));
|
237
|
+
if ($links[j] === $link[0]) {
|
238
|
+
imageNumber = j;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
|
244
|
+
// Position Lightbox
|
245
|
+
var top = $window.scrollTop() + this.options.positionFromTop;
|
246
|
+
var left = $window.scrollLeft();
|
247
|
+
this.$lightbox.css({
|
248
|
+
top: top + 'px',
|
249
|
+
left: left + 'px'
|
250
|
+
}).fadeIn(this.options.fadeDuration);
|
251
|
+
|
252
|
+
// Disable scrolling of the page while open
|
253
|
+
if (this.options.disableScrolling) {
|
254
|
+
$('body').addClass('lb-disable-scrolling');
|
255
|
+
}
|
256
|
+
|
257
|
+
this.changeImage(imageNumber);
|
258
|
+
};
|
259
|
+
|
260
|
+
// Hide most UI elements in preparation for the animated resizing of the lightbox.
|
261
|
+
Lightbox.prototype.changeImage = function(imageNumber) {
|
262
|
+
var self = this;
|
263
|
+
|
264
|
+
this.disableKeyboardNav();
|
265
|
+
var $image = this.$lightbox.find('.lb-image');
|
266
|
+
|
267
|
+
this.$overlay.fadeIn(this.options.fadeDuration);
|
268
|
+
|
269
|
+
$('.lb-loader').fadeIn('slow');
|
270
|
+
this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
|
271
|
+
|
272
|
+
this.$outerContainer.addClass('animating');
|
273
|
+
|
274
|
+
// When image to show is preloaded, we send the width and height to sizeContainer()
|
275
|
+
var preloader = new Image();
|
276
|
+
preloader.onload = function() {
|
277
|
+
var $preloader;
|
278
|
+
var imageHeight;
|
279
|
+
var imageWidth;
|
280
|
+
var maxImageHeight;
|
281
|
+
var maxImageWidth;
|
282
|
+
var windowHeight;
|
283
|
+
var windowWidth;
|
284
|
+
|
285
|
+
$image.attr('src', self.album[imageNumber].link);
|
286
|
+
|
287
|
+
$preloader = $(preloader);
|
288
|
+
|
289
|
+
$image.width(preloader.width);
|
290
|
+
$image.height(preloader.height);
|
291
|
+
|
292
|
+
if (self.options.fitImagesInViewport) {
|
293
|
+
// Fit image inside the viewport.
|
294
|
+
// Take into account the border around the image and an additional 10px gutter on each side.
|
295
|
+
|
296
|
+
windowWidth = $(window).width();
|
297
|
+
windowHeight = $(window).height();
|
298
|
+
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
|
299
|
+
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120;
|
300
|
+
|
301
|
+
// Check if image size is larger then maxWidth|maxHeight in settings
|
302
|
+
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
|
303
|
+
maxImageWidth = self.options.maxWidth;
|
304
|
+
}
|
305
|
+
if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
|
306
|
+
maxImageHeight = self.options.maxHeight;
|
307
|
+
}
|
308
|
+
|
309
|
+
// Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
|
310
|
+
// option than we need to size down while maintaining the aspect ratio.
|
311
|
+
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
|
312
|
+
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
|
313
|
+
imageWidth = maxImageWidth;
|
314
|
+
imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
|
315
|
+
$image.width(imageWidth);
|
316
|
+
$image.height(imageHeight);
|
317
|
+
} else {
|
318
|
+
imageHeight = maxImageHeight;
|
319
|
+
imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
|
320
|
+
$image.width(imageWidth);
|
321
|
+
$image.height(imageHeight);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
}
|
325
|
+
self.sizeContainer($image.width(), $image.height());
|
326
|
+
};
|
327
|
+
|
328
|
+
preloader.src = this.album[imageNumber].link;
|
329
|
+
this.currentImageIndex = imageNumber;
|
330
|
+
};
|
331
|
+
|
332
|
+
// Stretch overlay to fit the viewport
|
333
|
+
Lightbox.prototype.sizeOverlay = function() {
|
334
|
+
this.$overlay
|
335
|
+
.width($(document).width())
|
336
|
+
.height($(document).height());
|
337
|
+
};
|
338
|
+
|
339
|
+
// Animate the size of the lightbox to fit the image we are showing
|
340
|
+
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
|
341
|
+
var self = this;
|
342
|
+
|
343
|
+
var oldWidth = this.$outerContainer.outerWidth();
|
344
|
+
var oldHeight = this.$outerContainer.outerHeight();
|
345
|
+
var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
|
346
|
+
var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
|
347
|
+
|
348
|
+
function postResize() {
|
349
|
+
self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
350
|
+
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
351
|
+
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
352
|
+
self.showImage();
|
353
|
+
}
|
354
|
+
|
355
|
+
if (oldWidth !== newWidth || oldHeight !== newHeight) {
|
356
|
+
this.$outerContainer.animate({
|
357
|
+
width: newWidth,
|
358
|
+
height: newHeight
|
359
|
+
}, this.options.resizeDuration, 'swing', function() {
|
360
|
+
postResize();
|
361
|
+
});
|
362
|
+
} else {
|
363
|
+
postResize();
|
364
|
+
}
|
365
|
+
};
|
366
|
+
|
367
|
+
// Display the image and its details and begin preload neighboring images.
|
368
|
+
Lightbox.prototype.showImage = function() {
|
369
|
+
this.$lightbox.find('.lb-loader').stop(true).hide();
|
370
|
+
this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
|
371
|
+
|
372
|
+
this.updateNav();
|
373
|
+
this.updateDetails();
|
374
|
+
this.preloadNeighboringImages();
|
375
|
+
this.enableKeyboardNav();
|
376
|
+
};
|
377
|
+
|
378
|
+
// Display previous and next navigation if appropriate.
|
379
|
+
Lightbox.prototype.updateNav = function() {
|
380
|
+
// Check to see if the browser supports touch events. If so, we take the conservative approach
|
381
|
+
// and assume that mouse hover events are not supported and always show prev/next navigation
|
382
|
+
// arrows in image sets.
|
383
|
+
var alwaysShowNav = false;
|
384
|
+
try {
|
385
|
+
document.createEvent('TouchEvent');
|
386
|
+
alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
|
387
|
+
} catch (e) {}
|
388
|
+
|
389
|
+
this.$lightbox.find('.lb-nav').show();
|
390
|
+
|
391
|
+
if (this.album.length > 1) {
|
392
|
+
if (this.options.wrapAround) {
|
393
|
+
if (alwaysShowNav) {
|
394
|
+
this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
|
395
|
+
}
|
396
|
+
this.$lightbox.find('.lb-prev, .lb-next').show();
|
397
|
+
} else {
|
398
|
+
if (this.currentImageIndex > 0) {
|
399
|
+
this.$lightbox.find('.lb-prev').show();
|
400
|
+
if (alwaysShowNav) {
|
401
|
+
this.$lightbox.find('.lb-prev').css('opacity', '1');
|
402
|
+
}
|
403
|
+
}
|
404
|
+
if (this.currentImageIndex < this.album.length - 1) {
|
405
|
+
this.$lightbox.find('.lb-next').show();
|
406
|
+
if (alwaysShowNav) {
|
407
|
+
this.$lightbox.find('.lb-next').css('opacity', '1');
|
408
|
+
}
|
409
|
+
}
|
410
|
+
}
|
411
|
+
}
|
412
|
+
};
|
413
|
+
|
414
|
+
// Display caption, image number, and closing button.
|
415
|
+
Lightbox.prototype.updateDetails = function() {
|
416
|
+
var self = this;
|
417
|
+
|
418
|
+
// Enable anchor clicks in the injected caption html.
|
419
|
+
// Thanks Nate Wright for the fix. @https://github.com/NateWr
|
420
|
+
if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
|
421
|
+
this.album[this.currentImageIndex].title !== '') {
|
422
|
+
var $caption = this.$lightbox.find('.lb-caption');
|
423
|
+
if (this.options.sanitizeTitle) {
|
424
|
+
$caption.text(this.album[this.currentImageIndex].title);
|
425
|
+
} else {
|
426
|
+
$caption.html(this.album[this.currentImageIndex].title);
|
427
|
+
}
|
428
|
+
$caption.fadeIn('fast')
|
429
|
+
.find('a').on('click', function(event) {
|
430
|
+
if ($(this).attr('target') !== undefined) {
|
431
|
+
window.open($(this).attr('href'), $(this).attr('target'));
|
432
|
+
} else {
|
433
|
+
location.href = $(this).attr('href');
|
434
|
+
}
|
435
|
+
});
|
436
|
+
}
|
437
|
+
|
438
|
+
if (this.album.length > 1 && this.options.showImageNumberLabel) {
|
439
|
+
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
|
440
|
+
this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
441
|
+
} else {
|
442
|
+
this.$lightbox.find('.lb-number').hide();
|
443
|
+
}
|
444
|
+
|
445
|
+
this.$outerContainer.removeClass('animating');
|
446
|
+
|
447
|
+
this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
|
448
|
+
return self.sizeOverlay();
|
449
|
+
});
|
450
|
+
};
|
451
|
+
|
452
|
+
// Preload previous and next images in set.
|
453
|
+
Lightbox.prototype.preloadNeighboringImages = function() {
|
454
|
+
if (this.album.length > this.currentImageIndex + 1) {
|
455
|
+
var preloadNext = new Image();
|
456
|
+
preloadNext.src = this.album[this.currentImageIndex + 1].link;
|
457
|
+
}
|
458
|
+
if (this.currentImageIndex > 0) {
|
459
|
+
var preloadPrev = new Image();
|
460
|
+
preloadPrev.src = this.album[this.currentImageIndex - 1].link;
|
461
|
+
}
|
462
|
+
};
|
463
|
+
|
464
|
+
Lightbox.prototype.enableKeyboardNav = function() {
|
465
|
+
$(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
466
|
+
};
|
467
|
+
|
468
|
+
Lightbox.prototype.disableKeyboardNav = function() {
|
469
|
+
$(document).off('.keyboard');
|
470
|
+
};
|
471
|
+
|
472
|
+
Lightbox.prototype.keyboardAction = function(event) {
|
473
|
+
var KEYCODE_ESC = 27;
|
474
|
+
var KEYCODE_LEFTARROW = 37;
|
475
|
+
var KEYCODE_RIGHTARROW = 39;
|
476
|
+
|
477
|
+
var keycode = event.keyCode;
|
478
|
+
var key = String.fromCharCode(keycode).toLowerCase();
|
479
|
+
if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
|
480
|
+
this.end();
|
481
|
+
} else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
|
482
|
+
if (this.currentImageIndex !== 0) {
|
483
|
+
this.changeImage(this.currentImageIndex - 1);
|
484
|
+
} else if (this.options.wrapAround && this.album.length > 1) {
|
485
|
+
this.changeImage(this.album.length - 1);
|
486
|
+
}
|
487
|
+
} else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
|
488
|
+
if (this.currentImageIndex !== this.album.length - 1) {
|
489
|
+
this.changeImage(this.currentImageIndex + 1);
|
490
|
+
} else if (this.options.wrapAround && this.album.length > 1) {
|
491
|
+
this.changeImage(0);
|
492
|
+
}
|
493
|
+
}
|
494
|
+
};
|
495
|
+
|
496
|
+
// Closing time. :-(
|
497
|
+
Lightbox.prototype.end = function() {
|
498
|
+
this.disableKeyboardNav();
|
499
|
+
$(window).off('resize', this.sizeOverlay);
|
500
|
+
this.$lightbox.fadeOut(this.options.fadeDuration);
|
501
|
+
this.$overlay.fadeOut(this.options.fadeDuration);
|
502
|
+
$('select, object, embed').css({
|
503
|
+
visibility: 'visible'
|
504
|
+
});
|
505
|
+
if (this.options.disableScrolling) {
|
506
|
+
$('body').removeClass('lb-disable-scrolling');
|
507
|
+
}
|
508
|
+
};
|
509
|
+
|
510
|
+
return new Lightbox();
|
511
|
+
}));
|
512
|
+
|
513
|
+
|
514
|
+
$(document).ready(function(){
|
515
|
+
lightbox.option({
|
516
|
+
'disableScrolling': true,
|
517
|
+
'albumLabel': ''
|
518
|
+
})
|
519
|
+
});
|