From 96d3b84593362eecc2e8f1d5b4f13b7779efcbcd Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Thu, 9 Apr 2015 12:46:44 -0400 Subject: Update app manifest to use one schema --- site/db.json | 3 +- site/index.js | 71 +++++++++++++++++++++++++++---------------- site/templates/index.liquid | 24 ++++++++++----- site/templates/project.liquid | 20 ++++++------ 4 files changed, 72 insertions(+), 46 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 14f8724..8107c6d 100644 --- a/site/db.json +++ b/site/db.json @@ -1,8 +1,9 @@ { "meta": [], - "retail": [ + "project": [ { "id": "diesel-ss15", + "category": "retail", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", "shortname": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", diff --git a/site/index.js b/site/index.js index d36778f..55752e5 100644 --- a/site/index.js +++ b/site/index.js @@ -1,14 +1,5 @@ var okcms = require('..'); -var projectSchema = { - id: {type: 'string', id: true}, - title: {type: 'string'}, - shortname: {type: 'string'}, - description: {type: 'text'}, - video: {type: 'video'}, - images: {type: 'captioned-image-list'} -} - var app = okcms.createApp({ root: 'public', @@ -20,19 +11,26 @@ var app = okcms.createApp({ body: {type: 'text'}, image: {type: 'string'} }, - retail: projectSchema, - advertising: projectSchema, - experiential: projectSchema, - content: projectSchema, + project: { + id: {type: 'string', id: true}, + title: {type: 'string'}, + shortname: {type: 'string'}, + description: {type: 'text'}, + video: {type: 'video'}, + images: {type: 'captioned-image-list'}, + category: {type: 'enum', options: [ + 'retail', + 'advertising', + 'experiential', + 'content'] + } + } }, resources: [ { type: 'page', static: {id: 'about'}}, { type: 'page', static: {id: 'contact'}}, - { type: 'retail' }, - { type: 'advertising' }, - { type: 'experiential' }, - { type: 'content' }, + { type: 'project' } ], services: { @@ -46,11 +44,7 @@ var app = okcms.createApp({ views: { '/': { data: [ - {type: 'retail', query: '*'}, - {type: 'advertising', query: '*'}, - {type: 'experiential', query: '*'}, - {type: 'content', query: '*'}, - {type: 'page', query: '*'} + {type: 'project', query: '*'}, ] }, '/about': { @@ -60,20 +54,43 @@ var app = okcms.createApp({ data: {type: 'page', query: 'contact'} }, '/retail/:id': { - data: {type: 'retail', query: ':id'}, + data: { + type: 'project', + query: { + category: 'retail', + id: ':id' + } + }, template: 'project' }, '/advertising/:id': { - data: {type: 'advertising', query: ':id'}, + data: { + type: 'project', + query: { + category: 'advertising', + id: ':id' + } + }, template: 'project' }, '/experiential/:id': { - data: {type: 'experiential', query: ':id'}, + data: { + type: 'project', + query: { + category: 'experiential', + id: ':id' + } + }, template: 'project' }, '/content/:id': { - data: {type: 'content', query: ':id'}, - template: 'project' + data: { + type: 'project', + query: { + category: 'content', + id: ':id' + } + } } } diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 8797f25..41de3e2 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -87,26 +87,34 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
RETAIL
- {% for project in retail %} - {{ project.shortname }} + {% for project in projects %} + {% if project.category == 'retail' %} + {{ project.shortname }} + {% endif %} {% endfor %}
advertising
- {% for project in advertising %} - {{ project.shortname || project.title }} + {% for project in projects %} + {% if project.category == 'advertising' %} + {{ project.shortname || project.title }} + {% endif %}} {% endfor %}
experiential
- {% for project in experiential %} - {{ project.shortname || project.title }} + {% for project in projects %} + {% if project.category == 'experiential' %} + {{ project.shortname || project.title }} + {% endif %}} {% endfor %}
content
- {% for project in content %} - {{ project.shortname || project.title }} + {% for project in projects %} + {% if project.category == 'content' %} + {{ project.shortname || project.title }} + {% endif %}} {% endfor %}
diff --git a/site/templates/project.liquid b/site/templates/project.liquid index 5e6bc84..583cb09 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -1,22 +1,22 @@
- {{post.title}} - + {{project.title}} +
- {{ post.description }} + {{ project.description }}
- - + +
-
-
\ No newline at end of file + + -- cgit v1.2.3-70-g09d2 From 89b9693aaa02ee80be0e4efdf9cad8b1d0fe7978 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Thu, 9 Apr 2015 12:54:29 -0400 Subject: Remove stray curlies --- site/templates/index.liquid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'site') diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 41de3e2..3d31f91 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -98,7 +98,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. {% for project in projects %} {% if project.category == 'advertising' %} {{ project.shortname || project.title }} - {% endif %}} + {% endif %} {% endfor %}
experiential
@@ -106,7 +106,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. {% for project in projects %} {% if project.category == 'experiential' %} {{ project.shortname || project.title }} - {% endif %}} + {% endif %} {% endfor %}
content
@@ -114,7 +114,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. {% for project in projects %} {% if project.category == 'content' %} {{ project.shortname || project.title }} - {% endif %}} + {% endif %} {% endfor %} -- cgit v1.2.3-70-g09d2 From 3a28bacfc38cd0244ada6e74655d1e30d81d4d34 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 9 Apr 2015 13:32:45 -0400 Subject: video thumbnail and /all page --- site/index.js | 7 +++++++ site/templates/all.liquid | 10 ++++++---- site/templates/project.liquid | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'site') diff --git a/site/index.js b/site/index.js index 55752e5..6e5aed0 100644 --- a/site/index.js +++ b/site/index.js @@ -53,6 +53,13 @@ var app = okcms.createApp({ '/contact': { data: {type: 'page', query: 'contact'} }, + '/all': { + data: { + type: 'project', + query: '*' + }, + template: 'all' + }, '/retail/:id': { data: { type: 'project', diff --git a/site/templates/all.liquid b/site/templates/all.liquid index edb31d2..852137f 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -1,6 +1,8 @@
-
- - DIESEL SS15 -
+ {% for project in projects %} +
+ + {{ project.shortname }} +
+ {% endfor %}
diff --git a/site/templates/project.liquid b/site/templates/project.liquid index 583cb09..bcaea75 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -4,7 +4,7 @@ +
-- cgit v1.2.3-70-g09d2 From 185751955605a7f302470094528117ff32077e3f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 9 Apr 2015 17:05:12 -0400 Subject: fix --- site/templates/index.liquid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'site') diff --git a/site/templates/index.liquid b/site/templates/index.liquid index e459d7b..954670a 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -89,7 +89,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
@@ -97,7 +97,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
{% for project in projects %} {% if project.category == 'advertising' %} - {{ project.shortname || project.title }} + {{ project.shortname }} {% endif %} {% endfor %}
@@ -105,7 +105,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
{% for project in projects %} {% if project.category == 'experiential' %} - {{ project.shortname || project.title }} + {{ project.shortname }} {% endif %} {% endfor %}
@@ -113,7 +113,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
{% for project in projects %} {% if project.category == 'content' %} - {{ project.shortname || project.title }} + {{ project.shortname }} {% endif %} {% endfor %}
-- cgit v1.2.3-70-g09d2 From 7b7ac014579bafdb16e91a98f995f4fa7f55b4f1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 9 Apr 2015 17:17:00 -0400 Subject: alert when deleting posts --- site/db.json | 20 ++++++++++++++++++++ themes/okadmin/public/css/main.css | 5 +++++ themes/okadmin/public/js/app.js | 9 +++++++++ themes/okadmin/templates/resource.liquid | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 8107c6d..07085d4 100644 --- a/site/db.json +++ b/site/db.json @@ -28,6 +28,26 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ] + }, + { + "id": "TEST", + "title": "", + "shortname": "", + "description": "", + "video": { + "url": "", + "type": "", + "token": "", + "title": "", + "thumb": "" + }, + "category": "retail", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/cb2698ea-9927-4ca9-972b-f227d46d25f3.png", + "caption": "" + } + ] } ], "advertising": [], diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index d2a4418..ad940e8 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -248,10 +248,15 @@ label { li.image-element:hover .remove-image { display: block; } +li.image-element .remove-image:hover { + color: red; +} .remove-image { display: none; } +#delete_form button:hover { color: red } + .template { display: none; } diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 8c85663..441172f 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -59,6 +59,15 @@ var OKAdmin = function(){ }) }) + $("#delete_form").submit(function(e){ + if (confirm("Are you sure you want to delete this record?")) { + return + } + else { + e.preventDefault() + } + }) + function pressEnter(fn){ return function(e){ if (e.keyCode && e.keyCode !== 13) return diff --git a/themes/okadmin/templates/resource.liquid b/themes/okadmin/templates/resource.liquid index 48e3ef2..c321e8a 100644 --- a/themes/okadmin/templates/resource.liquid +++ b/themes/okadmin/templates/resource.liquid @@ -14,7 +14,7 @@
-
+
-- cgit v1.2.3-70-g09d2 From 97bd666d13d5f3466d157f473d91371cd2e4c7ed Mon Sep 17 00:00:00 2001 From: julie lala Date: Thu, 9 Apr 2015 17:18:41 -0400 Subject: test data --- site/db.json | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 07085d4..b7ee8a7 100644 --- a/site/db.json +++ b/site/db.json @@ -31,21 +31,25 @@ }, { "id": "TEST", - "title": "", - "shortname": "", + "title": "Testing!", + "shortname": "TEST PROJECT", "description": "", "video": { - "url": "", - "type": "", - "token": "", - "title": "", - "thumb": "" + "url": "https://vimeo.com/19021508", + "type": "vimeo", + "token": "19021508", + "title": "Police Academy 6 - RUN", + "thumb": "http://i.vimeocdn.com/video/120177451_640.jpg" }, - "category": "retail", + "category": "advertising", "images": [ { - "uri": "https://ltho.s3.amazonaws.com/cb2698ea-9927-4ca9-972b-f227d46d25f3.png", - "caption": "" + "uri": "http://hdwallpapersfit.com/wp-content/uploads/2015/02/red-foliage-trees-wallpapers-fall-leaves.jpg", + "caption": "Autumn leaves" + }, + { + "uri": "https://img1.etsystatic.com/000/0/6435290/il_fullxfull.266310309.jpg", + "caption": "More trees, tree thursday" } ] } -- cgit v1.2.3-70-g09d2 From 59cd4002fd8900798444c10afb62f0f82b9a7c1e Mon Sep 17 00:00:00 2001 From: julie lala Date: Thu, 9 Apr 2015 17:21:22 -0400 Subject: rm test data --- site/db.json | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index b7ee8a7..8107c6d 100644 --- a/site/db.json +++ b/site/db.json @@ -28,30 +28,6 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ] - }, - { - "id": "TEST", - "title": "Testing!", - "shortname": "TEST PROJECT", - "description": "", - "video": { - "url": "https://vimeo.com/19021508", - "type": "vimeo", - "token": "19021508", - "title": "Police Academy 6 - RUN", - "thumb": "http://i.vimeocdn.com/video/120177451_640.jpg" - }, - "category": "advertising", - "images": [ - { - "uri": "http://hdwallpapersfit.com/wp-content/uploads/2015/02/red-foliage-trees-wallpapers-fall-leaves.jpg", - "caption": "Autumn leaves" - }, - { - "uri": "https://img1.etsystatic.com/000/0/6435290/il_fullxfull.266310309.jpg", - "caption": "More trees, tree thursday" - } - ] } ], "advertising": [], -- cgit v1.2.3-70-g09d2 From a6e734472853328cca725acbbcad0416763e934e Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 9 Apr 2015 19:27:40 -0400 Subject: newline_to_br --- site/templates/page.liquid | 2 +- site/templates/project.liquid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'site') diff --git a/site/templates/page.liquid b/site/templates/page.liquid index f752cb9..52b64dc 100644 --- a/site/templates/page.liquid +++ b/site/templates/page.liquid @@ -3,7 +3,7 @@ {{page.title}}
- {{page.body}} + {{page.body | newline_to_br}}
diff --git a/site/templates/project.liquid b/site/templates/project.liquid index bcaea75..d21fed2 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -12,7 +12,7 @@
- {{ project.description }} + {{ project.description | newline_to_br }}
-- cgit v1.2.3-70-g09d2 From 2b95bcf414f02551a384ef2020958e90431814dd Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Sat, 11 Apr 2015 02:07:21 -0400 Subject: Update twohustlers DB to include indices --- site/db.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 8107c6d..f33647f 100644 --- a/site/db.json +++ b/site/db.json @@ -27,24 +27,24 @@ "uri": "http://twohustlers.com/bigimages/ss15_3.jpg", "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } - ] + ], + "__index": 1 } ], - "advertising": [], - "experiential": [], - "content": [], "page": [ { "id": "about", "title": "WHO WE ARE", "body": "WE ARE A COLLECTIVE OF DIGITAL NATIVES, INDUSTRY INFLUENCERS, TRENDSETTERS, MILLENNIAL COMMUNICATORS & UNORTHODOX STRATEGISTS – A NEW MEDIA CREATIVE LAB. TOGETHER WE CREATE LIVING, BREATHING, CONTENT DRIVEN EXPERIENCES THAT ENGAGE TODAY’S CONSUMER AUDIENCE. WE ARE WILD, PUNK, PROVOCATIVE, RADICAL, FEARLESS, SUBVERSIVE, BOISTEROUS, ANARCHIC, UNEXPECTED & DISRUPTIVE. MOST OF ALL WE ARE CURIOUS. WELCOME TO THE WORLD OF TWO HUSTLERS.", - "image": "http://www.lansdowneresort.com/meetings/assets/images/masthead/meetings-team-building.jpg" + "image": "http://www.lansdowneresort.com/meetings/assets/images/masthead/meetings-team-building.jpg", + "__index": 1 }, { "id": "contact", "title": "CONTACT", "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", - "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg" + "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg", + "__index": 0 } ] -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2 From 0b6afc1d5aa8a2f33b1c21e04a10c3eaa43870c1 Mon Sep 17 00:00:00 2001 From: julie lala Date: Sat, 11 Apr 2015 11:41:55 -0400 Subject: db --- site/db.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 8107c6d..8ee246c 100644 --- a/site/db.json +++ b/site/db.json @@ -43,7 +43,7 @@ { "id": "contact", "title": "CONTACT", - "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", + "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg" } ] -- cgit v1.2.3-70-g09d2 From 90b27c7e5aac1b81aac471d07f8f42dccb90d90b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 12:34:50 -0400 Subject: styling/debugging --- site/db.json | 4 +-- site/index.js | 8 ++--- themes/okadmin/public/css/main.css | 39 ++++++++++++++++++++----- themes/okadmin/public/js/app.js | 11 +++++-- themes/okadmin/templates/index.liquid | 2 +- themes/okadmin/templates/partials/flash.liquid | 9 +++++- themes/okadmin/templates/partials/inputs.liquid | 4 +-- themes/okadmin/templates/resource.liquid | 2 +- 8 files changed, 58 insertions(+), 21 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index c07e321..d2e882a 100644 --- a/site/db.json +++ b/site/db.json @@ -28,7 +28,7 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ], - "__index": 1 + "__index": "0" } ], "page": [ @@ -47,4 +47,4 @@ "__index": 0 } ] -} +} \ No newline at end of file diff --git a/site/index.js b/site/index.js index a59e74e..dace900 100644 --- a/site/index.js +++ b/site/index.js @@ -15,15 +15,15 @@ var app = okcms.createApp({ id: {type: 'string', id: true}, title: {type: 'string'}, shortname: {type: 'string'}, - description: {type: 'text'}, - video: {type: 'video'}, - images: {type: 'captioned-image-list'}, category: {type: 'enum', options: [ 'retail', 'advertising', 'experiential', 'content'] - } + }, + description: {type: 'text'}, + video: {type: 'video'}, + images: {type: 'captioned-image-list'}, } }, diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index 3762fd4..67271bc 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -109,7 +109,7 @@ h2 { pointer-events: none; } - /* Makes the button look like a link */ +/* Makes the button look like a link */ .main.index .resource-category button { background: none !important; height: 1.5em; @@ -117,6 +117,8 @@ h2 { padding: 0 !important; font: inherit; cursor: pointer; + font-family: Monaco, monospace; + text-transform: uppercase; } .main.index .resource-category .btn { @@ -134,7 +136,7 @@ h2 { } .main.index .resource-category .btn:hover { - border-bottom: 3px solid rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); } .main.index .resource-category .btn { @@ -203,6 +205,12 @@ label { padding: 0 0.5em; margin-bottom: 1em; } +.main.resource form input[name=id] { + width: 15em; +} +button, input[type=submit] { + cursor: pointer; +} .main.resource form .group { display: block; float: left; @@ -280,18 +288,26 @@ label { background: #ddd; clear: left; text-align: left; - padding: 10px; - width: 15em; + float: left; + margin-right: 1em; position: relative; + overflow: hidden; + cursor: pointer; } .add-image-button:hover { background: #def; } +.main.resource form .add-image-button button { + margin: 0; + pointer-events: none; + width: 100%; height: 100%; +} .add-image-button input[type=file] { opacity: 0; position: absolute; top: 0; left: 0; width: 100%; height: 100%; + margin: 0; padding: 0; cursor: pointer; } li.image-element:hover .remove-image { @@ -314,13 +330,20 @@ li.image-element .remove-image:hover { } -.errors { +.success, .errors { background: white; - padding: 10px; - width: 100%; + padding: 9px 8px 7px; + width: 50%; line-height: 1.4em; + border: 1px solid; + margin: 1em; + border-radius: 2px; +} + +.success { + color: green; } -.errors .message { +.errors { color: red; } diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 1ab9956..91a8e1a 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -28,7 +28,7 @@ var OKAdmin = function(){ $(".captioned-image-list ol").disableSelection() // delete image - $(document).on("click", ".remove-image", function(){ + $(document).on("mousedown", ".remove-image", function(){ if (confirm("Delete this image?")) { $(this).parent().remove() } @@ -50,7 +50,14 @@ var OKAdmin = function(){ })) // fix post indexing in list-driven inputs - $(".main.resource form").submit(function(){ + $(".main.resource form").submit(function(e){ + var $id = $("[name=id]") + if ($id.length && ! $id.val()) { + alert("Please enter an ID") + $id.focus() + e.preventDefault() + return + } $(".image-element").each(function(index){ $(this).find("input,textarea").each(function(){ var field = $(this).attr("name").replace(/\[[0-9]*\]/, "[" + index + "]") diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid index 0672613..10903b9 100644 --- a/themes/okadmin/templates/index.liquid +++ b/themes/okadmin/templates/index.liquid @@ -26,7 +26,7 @@ cancel - edit + sort + diff --git a/themes/okadmin/templates/partials/flash.liquid b/themes/okadmin/templates/partials/flash.liquid index 1980ab5..e51a86b 100644 --- a/themes/okadmin/templates/partials/flash.liquid +++ b/themes/okadmin/templates/partials/flash.liquid @@ -1,8 +1,15 @@ +{% if success.length > 0 %}
+
Changes saved.
+
+{% endif %} + +{% if errors.length > 0 %}
{% for error in errors %}
@@ -10,4 +17,4 @@
{% endfor %}
- +{% endif %} \ No newline at end of file diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 99258f3..b9cf7a3 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -29,7 +29,7 @@ {% endif %} name="{{name}}"> {% for option in spec.options %} - + {% endfor %} {% elsif type == 'video' %} @@ -56,7 +56,7 @@
- + Add images +
-- cgit v1.2.3-70-g09d2 From d45f617dc74a07beb352d04537d47a77193f487f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 18:19:41 -0400 Subject: hide id field --- site/index.js | 4 ++-- themes/okadmin/public/js/app.js | 16 ++++++++++++---- themes/okadmin/templates/partials/inputs.liquid | 19 +++---------------- 3 files changed, 17 insertions(+), 22 deletions(-) (limited to 'site') diff --git a/site/index.js b/site/index.js index 8eec697..d4f5cb4 100644 --- a/site/index.js +++ b/site/index.js @@ -1,7 +1,7 @@ var okcms = require('..'); var projectSchema = { - id: {type: 'string', id: true}, + id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, shortname: {type: 'string'}, description: {type: 'text'}, @@ -15,7 +15,7 @@ var app = okcms.createApp({ schemas: { page: { - id: {type: 'string'}, + id: {type: 'string', hidden: true}, title: {type: 'string'}, body: {type: 'text'}, image: {type: 'string'} diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 91a8e1a..009fe4c 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -51,13 +51,18 @@ var OKAdmin = function(){ // fix post indexing in list-driven inputs $(".main.resource form").submit(function(e){ - var $id = $("[name=id]") - if ($id.length && ! $id.val()) { - alert("Please enter an ID") - $id.focus() + var $id = $("[name=id]"), $title = $("[name=title]") + + if ($title.length && ! $title.val()) { + alert("Please enter a title") + $title.focus() e.preventDefault() return } + + var slug = slugify( $title.val() ) + $id.val( slug ) + $(".image-element").each(function(index){ $(this).find("input,textarea").each(function(){ var field = $(this).attr("name").replace(/\[[0-9]*\]/, "[" + index + "]") @@ -129,3 +134,6 @@ var OKAdmin = function(){ $(function(){ window.app = new OKAdmin () }) + + +function slugify (s){ return (s || "").toLowerCase().replace(/\s/g,"-").replace(/[^-_a-zA-Z0-9]/g, '-').replace(/-+/g,"-") } diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 4d6372d..253b275 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -3,30 +3,17 @@ {% assign spec = pair[1] %} {% assign type = spec.type %} -
- +
+ {% if type == 'string' %} + name="{{name}}" type="text" value="{{spec.value}}"> {% elsif type == 'text' %} {% elsif type == 'enum' %} {% endfor %} diff --git a/themes/okadmin/templates/resource.liquid b/themes/okadmin/templates/resource.liquid index abc59e9..aa3efe0 100644 --- a/themes/okadmin/templates/resource.liquid +++ b/themes/okadmin/templates/resource.liquid @@ -6,8 +6,8 @@ Back -
-

EDIT {{ resource.type }} '{{ resource.id }}'

+
+

EDIT {{ resource.type }} '{{ resource.spec.title.value }}'

{% include 'partials/inputs' %} -- cgit v1.2.3-70-g09d2 From 455c09226f1bc57021147e889ef1127e982ed67c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 18:52:06 -0400 Subject: rename shortname -> menu to be clear --- site/db.json | 2 +- site/index.js | 2 +- site/templates/all.liquid | 8 ++++---- site/templates/index.liquid | 8 ++++---- themes/okadmin/public/js/app.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 6c598ab..eb0265d 100644 --- a/site/db.json +++ b/site/db.json @@ -4,7 +4,7 @@ { "id": "diesel-jogg-jeans-ss15-denim-campaign", "title": "DIESEL JOGG JEANS SS15 DENIM CAMPAIGN", - "shortname": "DIESEL SS15", + "menu": "DIESEL SS15", "description": "Sed posuere consectetur est at lobortis. Donec id elit non mi porta gravida at eget metus. Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. \r\n\r\nVestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \r\n\r\nCurabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas sed diam eget risus varius blandit sit amet non magna.", "video": { "url": "http://vimeo.com/112498725", diff --git a/site/index.js b/site/index.js index d4f5cb4..189dfc4 100644 --- a/site/index.js +++ b/site/index.js @@ -3,7 +3,7 @@ var okcms = require('..'); var projectSchema = { id: {type: 'string', id: true, hidden: true}, title: {type: 'string'}, - shortname: {type: 'string'}, + menu: {type: 'string'}, description: {type: 'text'}, video: {type: 'video'}, images: {type: 'captioned-image-list'}, diff --git a/site/templates/all.liquid b/site/templates/all.liquid index 01ddc3a..e6f39bf 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -2,25 +2,25 @@ {% for project in retails %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in advertisings %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in experientials %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %} {% for project in contents %}
- {{ project.shortname }} + {{ project.title }}
{% endfor %}
diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 19bdf88..19a0b6c 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -88,25 +88,25 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
{% for project in retails %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
advertising
{% for project in advertisings %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
experiential
{% for project in experientials %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
content
{% for project in contents %} - {{ project.shortname }} + {{ project.menu }} {% endfor %}
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index ab571f3..aa8d0ad 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -51,7 +51,7 @@ var OKAdmin = function(){ // fix post indexing in list-driven inputs $(".main.resource form").submit(function(e){ - var $id = $("[name=id]"), $title = $("[name=title]"), $shortname = $("[name=shortname]"), $section = $(".resource.main") + var $id = $("[name=id]"), $title = $("[name=title]"), $menu = $("[name=menu]"), $section = $(".resource.main") var id = $section.data("id"), type = $section.data("type") if ($title.length && ! $title.val()) { @@ -61,8 +61,8 @@ var OKAdmin = function(){ return } - if ($shortname.length && ! $shortname.val()) { - $shortname.val( $title.val() ) + if ($menu.length && ! $menu.val()) { + $menu.val( $title.val() ) return } -- cgit v1.2.3-70-g09d2 From db3775794623ebbc63efb44e545b66f2accfd728 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 13 Apr 2015 19:28:42 -0400 Subject: testing stuff --- site/db.json | 37 ++++++++++++++++++++++++++++++-- site/index.js | 1 + site/templates/project.liquid | 2 +- themes/okadmin/public/js/app.js | 1 - themes/okadmin/templates/resource.liquid | 4 +++- 5 files changed, 40 insertions(+), 5 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index eb0265d..7681fd8 100644 --- a/site/db.json +++ b/site/db.json @@ -46,7 +46,40 @@ "__index": "0" } ], - "advertising": [], "experiential": [], - "content": [] + "content": [ + { + "id": "stuff", + "title": "Stuff", + "menu": "Stuff", + "description": "Blablhablhalbhab", + "video": { + "url": "http://vimeo.com/112498725", + "type": "vimeo", + "token": "112498725", + "title": "FW14-2H-VIDEO-V4 2", + "thumb": "http://i.vimeocdn.com/video/497493142_640.jpg" + }, + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/aa5ab62c-a7f4-433e-8957-c059199de924.png", + "caption": "WHO" + }, + { + "uri": "https://ltho.s3.amazonaws.com/888c06f0-32f4-4f7b-938f-fb9bf178a1dc.png", + "caption": "DARK" + }, + { + "uri": "https://ltho.s3.amazonaws.com/525cd121-a436-472f-b201-7b2baffa804a.png", + "caption": "STUFF" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b2a607e6-1c60-42cd-8449-55737501ff9e.png", + "caption": "BLAH" + } + ], + "__index": "0" + } + ], + "advertising": [] } \ No newline at end of file diff --git a/site/index.js b/site/index.js index 189dfc4..b6dea48 100644 --- a/site/index.js +++ b/site/index.js @@ -81,6 +81,7 @@ var app = okcms.createApp({ '/advertising/:id': { data: { type: 'advertising', + as: 'project', query: { id: ':id' } diff --git a/site/templates/project.liquid b/site/templates/project.liquid index d21fed2..e087049 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -3,7 +3,7 @@ {{project.title}} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 72e7b0ad4f782ab4b1878d5b5b499824c10830c1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 14 Apr 2015 16:15:26 -0400 Subject: click corner logo --- site/public/assets/javascripts/_env.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'site') diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index c34787d..3bff148 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -104,6 +104,10 @@ environment.ready = function(){ var page = "/" + $(this).data("type") + "/" + $(this).data("id") load_hash(page) }) + $(".logo").click(function(e){ + e.preventDefault() + hide_entry() + }) Share.init() -- cgit v1.2.3-70-g09d2 From 52b9d528e7bc9b8b4b1d1c391ef7267be34a2458 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 14 Apr 2015 16:27:06 -0400 Subject: loading adjust --- site/public/assets/javascripts/_env.js | 2 +- site/public/assets/style.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'site') diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 3bff148..f30d62d 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -158,7 +158,7 @@ environment.ready = function(){ build_scene() setTimeout(function(){ $("#scene").removeClass("fade") - }, 50) + }, 100) } setTimeout(function(){ done_loading = true }, 200) diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 6bf1fcb..2e8829e 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -663,6 +663,10 @@ nav a.active, nav .sub a:hover { .logo img { width:100%; } +.loading .logo, +.loading .toggleRapper { + display: none; +} .toggleRapper { width: 50px; position: fixed; -- cgit v1.2.3-70-g09d2 From 22b1dabf05f968baedffb701be6c6f6fc579241a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 14 Apr 2015 18:24:32 -0400 Subject: center logo --- site/public/assets/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'site') diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 2e8829e..65235ce 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -219,7 +219,7 @@ cursor: grabbing; #loader_svg { position: absolute; left: 2.5%; - top: 10%; + top: 20%; height: 60%; width: 95%; } -- cgit v1.2.3-70-g09d2 From e69ec9ce4b4afbf1910c617bebdad02c1bce69ed Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 14 Apr 2015 19:09:06 -0400 Subject: fix shape appearance bug? --- site/public/assets/javascripts/_env.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'site') diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index f30d62d..7ff471d 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -99,12 +99,11 @@ environment.ready = function(){ }) $(".toggleRapper").click(toggle_menu) - $(".toplogo").click(hide_entry) $(document).on("click", ".project", function(){ var page = "/" + $(this).data("type") + "/" + $(this).data("id") load_hash(page) }) - $(".logo").click(function(e){ + $(".toplogo,.logo").click(function(e){ e.preventDefault() hide_entry() }) @@ -285,8 +284,10 @@ function display_entry ($el) { $("#entry_container").scrollTop(0) $("#entry_container").addClass("visible") - controls.setZoom(100000) - setTimeout(function(){ controls.zoom(100) }, 100) + $("#scene").addClass("fade") + setTimeout(function(){ + $("#scene").hide() + }, 200) } function hide_entry () { $("nav .active").removeClass("active") @@ -317,6 +318,7 @@ function toggle_menu (){ } if (! menu_open && ! entry_open) { window.location.hash = "#" + console.log("what") $("#scene").show() $("#entry_container").empty() controls.zoom(1500) -- cgit v1.2.3-70-g09d2 From d1d06e58283eac26dd78b0a19bcfcbf16e64013f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 14 Apr 2015 19:38:23 -0400 Subject: fix videos on mobile --- site/public/assets/javascripts/_env.js | 30 ++++++++++++---------- site/public/assets/style.css | 47 ++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 30 deletions(-) (limited to 'site') diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 7ff471d..c4e9ace 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -352,17 +352,19 @@ function build_gallery () { var $play = $('
') var $el = $(this) $el.append($play) - $play.click(function(e){ - e.stopPropagation() - e.preventDefault() - if ($el.hasClass('loaded')) { - var player = $el.data('player') - player.api('play') - } - else { - load_video($el) - } - }) + if (is_desktop) { + $play.on("click", function(e){ + e.stopPropagation() + e.preventDefault() + if ($el.hasClass('loaded')) { + var player = $el.data('player') + player.api('play') + } + else { + load_video($el) + } + }) + } }) $(".caption").click(function(){ @@ -416,8 +418,10 @@ function load_video ($el) { var vimeo_id = $el.data("video").match(/\d+/)[0] var $embed = $('') $el.append($embed) - var $mask = $('
') - $el.append($mask) + if (! is_mobile) { + var $mask = $('
') + $el.append($mask) + } var player = $f( $el.find("iframe")[0] ) $el.data('player', player) player.addEvent('ready', function(){ diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 65235ce..825f46c 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -113,7 +113,7 @@ cursor: grabbing; transform: translateY(-50%); } -.flickity-prev-next-button:hover { background: white; } +.desktop .flickity-prev-next-button:hover { background: white; } .flickity-prev-next-button:focus { outline: none; @@ -256,7 +256,7 @@ nav { border-top: 1px solid #222; padding-top: 10px; } -.toplogo:hover { +.desktop .toplogo:hover { cursor:pointer; opacity:1; } @@ -295,13 +295,13 @@ nav a { color:black; } -nav .cat:hover { +.desktop nav .cat:hover { cursor:pointer; background:#eee; } -nav a.active:hover { +.desktop nav a.active:hover { cursor:default; } nav .cat { @@ -313,7 +313,7 @@ nav .cat.active { display: inline-block; font-family: 'BellGothic-Bold'; } -nav .top .cat.active:hover { +.desktop nav .top .cat.active:hover { background:transparent; } @@ -409,7 +409,7 @@ nav .sub.active a { transform:translateY(0)scale(1)skew(0deg); } -nav a.active, nav .sub a:hover { +.desktop nav a.active, nav .sub a:hover { text-decoration:none; background:#eee; color:black; @@ -460,7 +460,7 @@ nav a.active, nav .sub a:hover { cursor: pointer; width: 18px; } -.credit img:hover { +.desktop .credit img:hover { opacity:1; } @@ -559,7 +559,7 @@ nav a.active, nav .sub a:hover { opacity: 0.7; z-index: 4; } -.cell.video .play:hover { +.desktop .cell.video .play:hover { opacity: 1.0; } .cell iframe { @@ -621,12 +621,12 @@ nav a.active, nav .sub a:hover { opacity:0.5; cursor:pointer; } -.caption:hover { +.desktop .caption:hover { background:#222; color:#222; cursor:pointer; } -.caption:hover::after { +.desktop .caption:hover::after { color:white; opacity:1; } @@ -734,7 +734,7 @@ nav a.active, nav .sub a:hover { transition: 0.1s opacity ease-in; transition-delay:0.4s; } -.ready .project:hover { +.desktop .ready .project:hover { opacity: 1.0; } .project img { @@ -852,14 +852,27 @@ nav a.active, nav .sub a:hover { .menuActive #entry_container { left:160px; } - body{ - font-size: 18px; + #scene { + -webkit-transition: left 0.2s; + transition: left 0.2s; + } + .menuActive #scene { + left:160px; + } + body { + font-size: 18px; } } .mobile .cell iframe { - position: fixed; /* REALLY WEIRD, vimeo won't play without this! */ - width: 80%; - opacity:0.2; + width: 100%; + opacity: 0.0!important; transition:0.4s opacity ease-in; - z-index: 2; + z-index: 100; + height: 100%; + -webkit-transform: translateZ(0); + transform: translateZ(0); } +.mobile .play { + pointer-events: none; + opacity: 1; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From eb779beb83ed6e8d000fd0453c9ed5c404327ae4 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Thu, 16 Apr 2015 02:11:55 -0400 Subject: Take metadata from config and make synchronous --- app/index.js | 35 +++------- app/node_modules/okadminview/index.js | 96 +++++++++++---------------- app/node_modules/okview/index.js | 13 ++-- site/index.js | 6 ++ themes/okadmin/templates/partials/head.liquid | 4 +- 5 files changed, 63 insertions(+), 91 deletions(-) (limited to 'site') diff --git a/app/index.js b/app/index.js index 01ea33b..d487bd7 100644 --- a/app/index.js +++ b/app/index.js @@ -38,33 +38,18 @@ function OKCMS(options) { path.join(__dirname, '../themes/okadmin/templates'); var debug = options.debug || false; - // Set metadata defaults - // TODO Abstract this out somewhere else - var meta = { - type: 'meta', - get: function() { - return Q.promise(function(resolve, reject) { - db.getMeta().then(function(metadata) { - resolve(assign({}, { - static: '' - }, metadata)); - }).fail(reject); - }); - } + var metaUser = options.meta || {}; + var metaDefault = { + project: 'OKCMS' }; - var adminMeta ={ - type: 'meta', - get: function() { - return Q.promise(function(resolve, reject) { - db.getMeta().then(function(metadata) { - resolve(assign({}, { - static: withoutTrailingSlash(adminPath) - }, metadata)); - }).fail(reject); - }); - } - }; + var meta = assign({ + static: '' + }, metaDefault, metaUser); + + var adminMeta = assign({ + static: withoutTrailingSlash(adminPath) + }, metaDefault, metaUser); var schemaConfig = options.schemas || {}; var resourceConfig = options.resources || []; diff --git a/app/node_modules/okadminview/index.js b/app/node_modules/okadminview/index.js index 161a195..82f364d 100644 --- a/app/node_modules/okadminview/index.js +++ b/app/node_modules/okadminview/index.js @@ -36,7 +36,7 @@ function OKAdminView(options) { if (!options.templateProvider) throw new Error('No templateProvider provided to OKAdminView'); if (!options.meta) - throw new Error('No meta query provided to OKAdminView'); + throw new Error('No metadata provided to OKAdminView'); if (!options.errorHandler) throw new Error('No error handler provided to OKAdminView'); @@ -135,13 +135,11 @@ function OKAdminView(options) { if (!resource) { error(req, res, 404)(new Error('No such resource ' + type)); } else { - meta.get().then(function(metadata) { - var templateData = transformData(metadata, resource, {}); - view.renderResourceNew(req, res, assign(templateData, { - success: req.flash('success'), - errors: req.flash('errors'), - })); - }).fail(error(req, res, 500)); + var templateData = transformData(meta, resource, {}); + view.renderResourceNew(req, res, assign(templateData, { + success: req.flash('success'), + errors: req.flash('errors'), + })); } }); @@ -179,18 +177,16 @@ function OKAdminView(options) { if (!resource) { error(req, res, 400)(new Error('No such resource ' + type)); } else { - meta.get().then(function(metadata) { - try { - resource.assertValid(data); - resource.create(data).then(function(created) { - req.flash('success', {action: 'create'}); - res.redirect(303, resource.getID(data)); - }).fail(error(req, res, 500)); - } catch (errors) { - var templateData = transformData(metadata, resource, data); - view.renderResource(req, res, assign(templateData, {errors: errors})); - } - }).fail(error(req, res, 500));; + try { + resource.assertValid(data); + resource.create(data).then(function(created) { + req.flash('success', {action: 'create'}); + res.redirect(303, resource.getID(data)); + }).fail(error(req, res, 500)); + } catch (errors) { + var templateData = transformData(meta, resource, data); + view.renderResource(req, res, assign(templateData, {errors: errors})); + } } }); @@ -215,11 +211,7 @@ function OKAdminView(options) { error(req, res, 500)(new Error('Resource batch contains invalid JSON')); return; } - Q.all([ - meta.get(), - resource.updateBatch(ids, resourcesParsed), - ]).then(function(results) { - var metadata = results.shift(); + resource.updateBatch(ids, resourcesParsed).then(function(results) { req.flash('success', {action: 'batch_update'}); res.redirect(303, '../..'); }).fail(error(req, res, 500)); @@ -234,19 +226,16 @@ function OKAdminView(options) { if (!resource) { error(req, res, 400)(new Error('No such resource ' + type)); } else { - // TODO Prob should make metadata synchronous... - meta.get().then(function(metadata) { - try { - resource.assertValid(data); - resource.update(id, data).then(function(updated) { - req.flash('success', {action: 'update'}); - res.redirect(303, '../' + resource.getID(updated)); - }).fail(error(req, res, 500)); - } catch (errors) { - var templateData = transformData(metadata, resource, data); - view.renderResource(req, res, assign(templateData, {errors: errors})); - } - }).fail(error(req, res, 500)); + try { + resource.assertValid(data); + resource.update(id, data).then(function(updated) { + req.flash('success', {action: 'update'}); + res.redirect(303, '../' + resource.getID(updated)); + }).fail(error(req, res, 500)); + } catch (errors) { + var templateData = transformData(meta, resource, data); + view.renderResource(req, res, assign(templateData, {errors: errors})); + } } }); @@ -257,11 +246,9 @@ function OKAdminView(options) { if (!resource) { error(req, res, 500)(new Error('No such resource ' + type)); } else { - meta.get().then(function(metadata) { - resource.destroy(id).then(function() { - req.flash('success', {action: 'delete'}); - res.redirect(303, '../..'); - }).fail(error(req, res, 500)); + resource.destroy(id).then(function() { + req.flash('success', {action: 'delete'}); + res.redirect(303, '../..'); }).fail(error(req, res, 500)); } }); @@ -328,10 +315,9 @@ OKAdminView.prototype.renderResourceNew = function(req, res, data) { */ function fetchIndexTemplateData(meta, queries) { return Q.promise(function(resolve, reject) { - Q.all([meta.get()].concat(queries.map(function(query) { + Q.all(queries.map(function(query) { return query.get(); - }))).then(function(results) { - var meta = results.shift(); + })).then(function(results) { var resources = results.reduce(function(cache, result, i) { if (!result) return cache; @@ -376,16 +362,14 @@ function fetchIndexTemplateData(meta, queries) { function fetchResourceTemplateData(meta, query, fn) { fn = fn || function(m, r, d) { return {meta: m, resource: d}; }; return Q.promise(function(resolve, reject) { - meta.get().then(function(metadata) { - query.get().then(function(data) { - if (!data) { - reject(new Error('No resource data')); - } else { - var resource = query.resource; - resolve(fn(metadata, resource, data)); - } - }).fail(reject); - }).fail(reject) + query.get().then(function(data) { + if (!data) { + reject(new Error('No resource data')); + } else { + var resource = query.resource; + resolve(fn(meta, resource, data)); + } + }).fail(reject); }); } diff --git a/app/node_modules/okview/index.js b/app/node_modules/okview/index.js index 951261c..fba1c18 100644 --- a/app/node_modules/okview/index.js +++ b/app/node_modules/okview/index.js @@ -21,7 +21,7 @@ function OKView(options) { if (!options.template) throw new Error('No template provided to OKView.'); if (!options.meta) - throw new Error('No meta resource provided to OKView'); + throw new Error('No metadata provided to OKView'); if (!options.route) throw new Error('No route provided to OKView'); if (!options.errorHandler) @@ -124,12 +124,9 @@ function fetchTemplateData(meta, queries, id) { // resource and will resolve errors if no data is found var single = queries && queries.length === 1; return Q.promise(function(resolve, reject) { - return Q.all( - [meta.get()].concat(queries.map(function(query) { - return query.get(id); - }))) - .then(function(results) { - var metadata = results.shift(); + return Q.all(queries.map(function(query) { + return query.get(id); + })).then(function(results) { if (single && !results[0]) { reject(new Error('No resource found')); } else { @@ -164,7 +161,7 @@ function fetchTemplateData(meta, queries, id) { cache[type] = result; } return cache; - }, {meta: metadata}); + }, {meta: meta}); resolve(normalized); } diff --git a/site/index.js b/site/index.js index 7457bbf..521b7d7 100644 --- a/site/index.js +++ b/site/index.js @@ -11,8 +11,14 @@ var projectSchema = { var app = okcms.createApp({ + meta: { + project: 'TwoHustlers' + }, + root: 'public', + debug: false, + schemas: { page: { id: {type: 'string', hidden: true}, diff --git a/themes/okadmin/templates/partials/head.liquid b/themes/okadmin/templates/partials/head.liquid index c423584..7ee4824 100644 --- a/themes/okadmin/templates/partials/head.liquid +++ b/themes/okadmin/templates/partials/head.liquid @@ -2,12 +2,12 @@ - TwoHustlers Admin {{meta.title}} + {{meta.project}} Admin
- TwoHustlers{{meta.title}} Admin + {{meta.project}} Admin View Site
-- cgit v1.2.3-70-g09d2 From 0f625b3e6b511f4ee1323da30e6280f4880955fc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 12:38:31 -0400 Subject: get rid of contact image --- site/db.json | 2 +- site/public/assets/images/2H_LOGOMARK.svg | 12 ++++++------ site/public/assets/style.css | 4 ++++ site/templates/index.liquid | 6 +++--- site/templates/page.liquid | 14 ++++++++++---- 5 files changed, 24 insertions(+), 14 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index f8431f0..d0624e8 100644 --- a/site/db.json +++ b/site/db.json @@ -42,7 +42,7 @@ "id": "contact", "title": "CONTACT", "body": "TWOHUSTLERS\r\n50 WHITE STREET\r\nNEW YORK, NY 10013\r\nINFO@TWOHUSTLERS.COM\r\n+1 646 370-1180\r\nTWOHUSTLERS ©2014\r\nWEBSITE BY OKFOCUS", - "image": "http://checkingintocollege.com/wp/wp-content/uploads/2014/08/angryphone.jpg", + "image": "", "__index": "0" } ], diff --git a/site/public/assets/images/2H_LOGOMARK.svg b/site/public/assets/images/2H_LOGOMARK.svg index 9af234a..43a9691 100644 --- a/site/public/assets/images/2H_LOGOMARK.svg +++ b/site/public/assets/images/2H_LOGOMARK.svg @@ -7,11 +7,11 @@ - - + - - + - -
+ viewBox="338.1 276.3 660.5 819.7" xml:space="preserve"> - + @@ -176,7 +176,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. c0,1-0.1,1.8-0.3,2.7c-0.1,0.8-0.1,1.7-0.3,2.5c0,0.3,0,0.6-0.1,0.8c-4,29.5-20.9,56.4-58.2,93.1l-81.8,80.1 c-53.5,52.1-85.9,103.9-101.6,162.9c-6.7,25.1-13.7,52.6-14.5,81L712.3,705.6z"/> - + diff --git a/site/templates/page.liquid b/site/templates/page.liquid index 52b64dc..7c295ff 100644 --- a/site/templates/page.liquid +++ b/site/templates/page.liquid @@ -1,9 +1,15 @@
{{page.title}} - -
- {{page.body | newline_to_br}} -
+ {% if page.image %} + +
+ {{page.body | newline_to_br}} +
+ {% else %} +
+ {{page.body | newline_to_br}} +
+ {% endif %}
-- cgit v1.2.3-70-g09d2 From b51455df828fde90edbee3143bd8d49b00cc3f1a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:04:10 -0400 Subject: single image upload field, abstract upload class a bit --- site/db.json | 6 +- site/index.js | 1 + site/public/assets/style.css | 3 +- site/templates/index.liquid | 2 + themes/okadmin/public/css/main.css | 25 +++++-- themes/okadmin/public/js/app.js | 93 +++++++++++++++++-------- themes/okadmin/public/js/upload.js | 91 +++++++++++------------- themes/okadmin/templates/partials/inputs.liquid | 52 +++++++++----- 8 files changed, 171 insertions(+), 102 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index d0624e8..12ccb38 100644 --- a/site/db.json +++ b/site/db.json @@ -27,7 +27,11 @@ "caption": "CURABITUR BLANDIT TEMPUS PORTTITOR 4" } ], - "__index": "0" + "__index": "0", + "shape": { + "uri": "", + "caption": "" + } } ], "page": [ diff --git a/site/index.js b/site/index.js index 521b7d7..30e4a76 100644 --- a/site/index.js +++ b/site/index.js @@ -7,6 +7,7 @@ var projectSchema = { description: {type: 'text'}, video: {type: 'video'}, images: {type: 'captioned-image-list'}, + shape: {type: 'image'}, } var app = okcms.createApp({ diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 3c2526b..28d0013 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -285,6 +285,7 @@ nav .middle { } nav .bottom { + height: 20%; width: 100%; background: #bbb; } @@ -489,7 +490,7 @@ nav .sub.active a { } .entry span div.content.noline { border-top: 0; - padding-top: 0px; + padding-top: 0; } .entry span div.content div { width:50%; diff --git a/site/templates/index.liquid b/site/templates/index.liquid index afb5de3..d18098c 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -110,9 +110,11 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. {% endfor %}
+
ABOUT
CONTACT
diff --git a/themes/okadmin/public/css/main.css b/themes/okadmin/public/css/main.css index ec426f9..685e368 100644 --- a/themes/okadmin/public/css/main.css +++ b/themes/okadmin/public/css/main.css @@ -228,7 +228,9 @@ button, input[type=submit] { border: 0; display: none; } -.main.resource form .group.loaded input:first-child, +.main.resource form .group.image input, +.main.resource form .group.video input:first-child, +.main.resource form .group.loaded.video input[type=text], .main.resource form .group input:first-child { display: block; width: 25em; @@ -238,17 +240,24 @@ button, input[type=submit] { } .main.resource form .group.loaded input { display: block; - width: 20.05em; } -.main.resource form .group input { - display: none; +.main.resource form .group input[type=text] { + width: 20.05em; margin-bottom: 0.1em; } +.main.resource form .group.image .image-element, +.main.resource form .group.video input[type=text], .main.resource form .group.loaded input[hidden], +.main.resource form .group.image.loaded .fields, .main.resource form input[hidden] { display: none; } - +.main.resource form .group.image.loaded .image-element { + display: block; +} +.main.resource form .fields { + height: 3em; +} .main.resource form textarea { padding: 0.5em; height: 15em; @@ -280,6 +289,8 @@ button, input[type=submit] { width: 10em; max-height: 10em; border: 0; +} +.main.resource form .images img { cursor: -webkit-grab; cursor: grab; } @@ -313,10 +324,10 @@ button, input[type=submit] { margin: 0; padding: 0; cursor: pointer; } -li.image-element:hover .remove-image { +.image-element:hover .remove-image { display: block; } -li.image-element .remove-image:hover { +.image-element .remove-image:hover { color: red; } .remove-image { diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index 22317f3..baa4873 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -1,38 +1,75 @@ var OKAdmin = function(){ - // initialize our (single) ajax image uploader with an element and a template - OKUpload.bind( document.getElementById("file") ) - OKUpload.add = function(data){ - var url = data[0].extra.Location - add_image(url) - } - - // also handle straight image urls - $("#add-image-url").keydown(pressEnter(function(e){ - var url = $(this).val() - $(this).val("") - add_image(url) - })) + // initialize our multi-image uploader with an element and a template + $(".image-list").each(function(){ + var uploader = new OKUpload () + uploader.bind( $(".add-image-button input", this) ) + uploader.add = function(data){ + var url = data[0].extra.Location + add_image(url) + } + // also handle straight image urls + $(".add-image-url", this).keydown(pressEnter(function(e){ + var url = $(this).val() + $(this).val("") + add_image(url) + })) + + // clone and populate template + function add_image(url){ + var imageTemplate = $("#captioned-image-template").html() + var $el = $(imageTemplate) + $el.find(".uri").val(url) + $el.find("img").attr("src", url) + $(".captioned-image-list ol").append($el) + } + }) + // delete image from gallery + $(document).on("mousedown", ".image-list .remove-image", function(){ + if (confirm("Delete this image?")) { + $(this).parent().remove() + } + }) - // clone and populate template - function add_image(url){ - var imageTemplate = $("#captioned-image-template").html() - var $el = $(imageTemplate) - $el.find(".uri").val(url) - $el.find("img").attr("src", url) - $(".captioned-image-list ol").append($el) - } + // initialize our single image uploader with existing DOM + $(".image").each(function(){ + var $el = $(this) + + var uploader = new OKUpload () + uploader.bind( $(".add-image-button input", this) ) + uploader.add = function(data){ + var url = data[0].extra.Location + add_image(url) + } + // also handle straight image urls + $(".add-image-url", this).keydown(pressEnter(function(e){ + var url = $(this).val() + $(this).val("") + add_image(url) + })) + + // clone and populate template + function add_image(url){ + $el.find(".uri").val(url) + $el.find(".caption").val("") + $el.find("img").attr("src", url) + $el.addClass("loaded") + } + }) + // delete image from single image entry + $(document).on("mousedown", ".image .remove-image", function(){ + if (confirm("Delete this image?")) { + var $el = $(this).closest(".image") + $el.removeClass('loaded') + $el.find(".uri").val("") + $el.find(".caption").val("") + $el.find("img").attr("src", "") + } + }) // make the region sortable with drag-and-drop $(".captioned-image-list ol").sortable() $(".captioned-image-list ol").disableSelection() - - // delete image - $(document).on("mousedown", ".remove-image", function(){ - if (confirm("Delete this image?")) { - $(this).parent().remove() - } - }) // populate a video field with info from our url parser var last_url diff --git a/themes/okadmin/public/js/upload.js b/themes/okadmin/public/js/upload.js index 1c9094c..39f7427 100644 --- a/themes/okadmin/public/js/upload.js +++ b/themes/okadmin/public/js/upload.js @@ -1,55 +1,48 @@ -var OKUpload = { - action: "/_services/image", - - bind: function(el){ - if (! el) return - el.addEventListener("change", OKUpload.handleFileSelect) - }, - - handleFileSelect: function(e) { - e.stopPropagation(); - e.preventDefault(); - - var files = e.dataTransfer ? e.dataTransfer.files : e.target.files; - - for (var i = 0, f; f = files[i]; i++) { - if ( ! f.type.match('image.*')) { - continue; - } - OKUpload.upload(f) - } - }, +var OKUpload = function(){ + this.action = "/_services/image" +} +OKUpload.prototype.bind = function(el){ + if (el.length) el = el[0] + el.addEventListener("change", this.handleFileSelect.bind(this)) +} +OKUpload.prototype.handleFileSelect = function(e) { + e.stopPropagation(); + e.preventDefault(); - upload: function(f){ - var fd = new FormData() - fd.append('image', f) + var files = e.dataTransfer ? e.dataTransfer.files : e.target.files; - var request = $.ajax({ - url: OKUpload.action, - type: "post", - data: fd, - dataType: "json", - processData: false, - contentType: false, - }) - request.done(OKUpload.success) - }, - - success: function(media){ - if (media.error) { - console.log(media.error) - return + for (var i = 0, f; f = files[i]; i++) { + if ( ! f.type.match('image.*')) { + continue; } - OKUpload.add(media) - }, - - add: function(media){ - console.log(media) - }, - - error: function(error){ - throw error - }, + this.upload(f) + } +} +OKUpload.prototype.upload = function(f){ + var fd = new FormData() + fd.append('image', f) + var request = $.ajax({ + url: this.action, + type: "post", + data: fd, + dataType: "json", + processData: false, + contentType: false, + }) + request.done(this.success.bind(this)) +} +OKUpload.prototype.success = function(media){ + if (media.error) { + console.log(media.error) + return + } + this.add(media) +} +OKUpload.prototype.add = function(media){ + console.log(media) +} +OKUpload.prototype.error = function(error){ + throw error } diff --git a/themes/okadmin/templates/partials/inputs.liquid b/themes/okadmin/templates/partials/inputs.liquid index 253b275..c9a4d92 100644 --- a/themes/okadmin/templates/partials/inputs.liquid +++ b/themes/okadmin/templates/partials/inputs.liquid @@ -22,15 +22,48 @@ {% elsif type == 'video' %}
- - + +
+ {% elsif type == 'image' %} +
+
+
+ + +
+ +
+
+ + + {{spec.value.caption}} + +
+
{% elsif type == 'captioned-image-list' %} -
+
+
+
+ + +
+ +
+ + +
    {% for image in spec.value %}
  1. @@ -41,19 +74,6 @@
  2. {% endfor %}
-
- - -
- -
{% elsif type == 'meta' %} -- cgit v1.2.3-70-g09d2 From 3f26845f934e95a5c3f9486f83f715240347bbcd Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:22:14 -0400 Subject: dry --- site/templates/index.liquid | 8 ++++---- themes/okadmin/public/js/app.js | 41 ++++---------------------------------- themes/okadmin/public/js/upload.js | 30 +++++++++++++++++++++------- 3 files changed, 31 insertions(+), 48 deletions(-) (limited to 'site') diff --git a/site/templates/index.liquid b/site/templates/index.liquid index d18098c..224803a 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -88,25 +88,25 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
{% for project in retails %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
advertising
{% for project in advertisings %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
experiential
{% for project in experientials %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
content
{% for project in contents %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index baa4873..874b7e1 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -3,20 +3,8 @@ var OKAdmin = function(){ // initialize our multi-image uploader with an element and a template $(".image-list").each(function(){ var uploader = new OKUpload () - uploader.bind( $(".add-image-button input", this) ) - uploader.add = function(data){ - var url = data[0].extra.Location - add_image(url) - } - // also handle straight image urls - $(".add-image-url", this).keydown(pressEnter(function(e){ - var url = $(this).val() - $(this).val("") - add_image(url) - })) - - // clone and populate template - function add_image(url){ + uploader.bind( this ) + uploader.add = function(url){ var imageTemplate = $("#captioned-image-template").html() var $el = $(imageTemplate) $el.find(".uri").val(url) @@ -36,20 +24,8 @@ var OKAdmin = function(){ var $el = $(this) var uploader = new OKUpload () - uploader.bind( $(".add-image-button input", this) ) - uploader.add = function(data){ - var url = data[0].extra.Location - add_image(url) - } - // also handle straight image urls - $(".add-image-url", this).keydown(pressEnter(function(e){ - var url = $(this).val() - $(this).val("") - add_image(url) - })) - - // clone and populate template - function add_image(url){ + uploader.bind( this ) + uploader.add = function(url){ $el.find(".uri").val(url) $el.find(".caption").val("") $el.find("img").attr("src", url) @@ -173,15 +149,6 @@ var OKAdmin = function(){ $input.val(JSON.stringify(parsed)); }) }); - - function pressEnter(fn){ - return function(e){ - if (e.keyCode && e.keyCode !== 13) return - e.preventDefault() - console.log("hi") - fn.apply(this) - } - } } $(function(){ diff --git a/themes/okadmin/public/js/upload.js b/themes/okadmin/public/js/upload.js index 39f7427..040654b 100644 --- a/themes/okadmin/public/js/upload.js +++ b/themes/okadmin/public/js/upload.js @@ -2,9 +2,14 @@ var OKUpload = function(){ this.action = "/_services/image" } -OKUpload.prototype.bind = function(el){ - if (el.length) el = el[0] - el.addEventListener("change", this.handleFileSelect.bind(this)) +OKUpload.prototype.bind = function(rapper){ + var uploader = this + $(".add-image-button input", rapper).change( uploader.handleFileSelect.bind(uploader) ) + $(".add-image-url", rapper).keydown(pressEnter(function(e){ + var url = $(this).val() + $(this).val("") + uploader.add(url) + })) } OKUpload.prototype.handleFileSelect = function(e) { e.stopPropagation(); @@ -33,12 +38,13 @@ OKUpload.prototype.upload = function(f){ }) request.done(this.success.bind(this)) } -OKUpload.prototype.success = function(media){ - if (media.error) { - console.log(media.error) +OKUpload.prototype.success = function(data){ + if (data.error) { + console.log(data.error) return } - this.add(media) + var url = data[0].extra.Location + this.add(url) } OKUpload.prototype.add = function(media){ console.log(media) @@ -46,3 +52,13 @@ OKUpload.prototype.add = function(media){ OKUpload.prototype.error = function(error){ throw error } + + + +function pressEnter(fn){ + return function(e){ + if (e.keyCode && e.keyCode !== 13) return + e.preventDefault() + fn.apply(this) + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 48923c16e00892fac916a83c8fdccca63800615f Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Apr 2015 14:41:58 -0400 Subject: load shape images from posts --- site/db.json | 2 +- site/public/assets/javascripts/_env.js | 20 ++++++++++++-------- site/templates/index.liquid | 17 ++++++++--------- themes/okadmin/public/js/app.js | 10 ++++++---- themes/okadmin/public/js/upload.js | 4 ++-- 5 files changed, 29 insertions(+), 24 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 12ccb38..f1721a6 100644 --- a/site/db.json +++ b/site/db.json @@ -29,7 +29,7 @@ ], "__index": "0", "shape": { - "uri": "", + "uri": "http://okfocus.s3.amazonaws.com/2h/13.gif", "caption": "" } } diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index c4e9ace..b567a3d 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -7,8 +7,11 @@ environment.init = function(){ $("#scene").addClass("fade") var loader = new Loader(environment.ready, new HustleLoader) var preloadImages = $("#preload-image-list").html().split("\n").filter(function(s){ return !!s }) - boxImages = $("#box-image-list").html().split("\n").filter(function(s){ return !!s }) - loader.preloadImages( preloadImages.concat(boxImages) ) + boxImages = $("#box-image-list").html().split("\n") + var postImages = $(".sub a").toArray().map(function(el){ return $(el).data("image") }) + + var images = preloadImages.concat(postImages).concat(boxImages).filter(function(s){ return !!s }) + loader.preloadImages( images ) loader.ready() } environment.ready = function(){ @@ -191,7 +194,7 @@ function build_scene () { controls.zoom(1000) strips.push( new Strip({ - images: boxImages.slice(0, 5), + images: $(".sub[data-type=advertising] a"), x: -100, y: 100, rotationY: PI/4, @@ -199,7 +202,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(5, 10), + images: $(".sub[data-type=retail] a"), x: 100, y: 100, rotationX: PI/4, @@ -208,7 +211,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(10, 15), + images: $(".sub[data-type=experiential] a"), x: 0, y: 100, z: 100, @@ -217,7 +220,7 @@ function build_scene () { }) ) strips.push( new Strip({ - images: boxImages.slice(15, 20), + images: $(".sub[data-type=content] a"), x: 0, y: 100, z: -50, @@ -455,9 +458,10 @@ var Strip = function( opt ){ root.addTo(scene) var prev = root - this.els = opt.images.map(function(url, i){ + this.els = opt.images.toArray().map(function(el, i){ + var data = $(el).data() var el = new MX.Image({ - src: url, + src: data.image, onload: function(img){ } }) diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 224803a..db6bf20 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -86,27 +86,27 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends.
retail
-
+
{% for project in retails %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
advertising
-
+
{% for project in advertisings %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
experiential
-
+
{% for project in experientials %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
content
-
+
{% for project in contents %} - {{ project.menu }} + {{ project.menu }} {% endfor %}
@@ -238,7 +238,6 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. + + + +
    + {% for image in spec.value %} + {% if image.token %} +
  1. + {{ JSON.stringify(spec.value) }} +
  2. + {% else %} +
  3. + + + {{image.caption}} + +
  4. + {% endif %} + {% endfor %} +
+
{% elsif type == 'captioned-image-list' %}
@@ -56,10 +105,10 @@
- +
- @@ -123,7 +134,7 @@ {{image.caption}} - + {% endfor %} -- cgit v1.2.3-70-g09d2 From 934a8ac8afdaa2afc2061542abbf3f4864a476b1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Apr 2015 17:02:55 -0400 Subject: prev/next buttons --- site/db.json | 4 ++-- site/index.js | 2 +- site/public/assets/javascripts/_env.js | 8 +++----- site/public/assets/style.css | 1 + site/templates/project.liquid | 11 ++++++----- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index c391558..66d905f 100644 --- a/site/db.json +++ b/site/db.json @@ -16,7 +16,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "type": "vimeo", "token": "112498725", @@ -74,7 +74,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", "caption": "" diff --git a/site/index.js b/site/index.js index a7b207a..3434742 100644 --- a/site/index.js +++ b/site/index.js @@ -5,7 +5,7 @@ var projectSchema = { title: {type: 'string'}, menu: {type: 'string'}, description: {type: 'text'}, - images: {type: 'media-list'}, + media: {type: 'media-list'}, thumbnail: {type: 'image'}, } diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 8c1270f..aae60b9 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -446,16 +446,14 @@ function build_gallery () { // load_video($el) } else { - next() + gallery.next() } }) - // $next.on("click", next) - function next(){ - gallery.next() - } gallery.loader.on("progress", function(imagesLoaded, loadingImage){ $(loadingImage.img).addClass('loaded') }) + $(".nextbutton").click(function(){ gallery.next() }) + $(".prevbutton").click(function(){ gallery.previous() }) } function resize_gallery () { if (! gallery) return; diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 9fb1a3a..8c7594d 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -446,6 +446,7 @@ nav .sub.active a { padding: 20px 0px 0.6em 2px; margin-bottom: 0.7em; font-size: 1em; + text-transform: uppercase; } diff --git a/site/templates/project.liquid b/site/templates/project.liquid index 3d32c0d..0dc828c 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -6,11 +6,12 @@ NEXT ASSET
-- cgit v1.2.3-70-g09d2 From c78f208f3e6bd1199f0d6c88d2431609b58bd303 Mon Sep 17 00:00:00 2001 From: julie lala Date: Mon, 27 Apr 2015 17:06:34 -0400 Subject: changes --- site/db.json | 62 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 15 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index bf68d79..1ada83f 100644 --- a/site/db.json +++ b/site/db.json @@ -5,9 +5,9 @@ "content": [], "advertising": [ { - "id": "diesel-s-s-2015", - "title": "Diesel S/S 2015", - "menu": "Diesel Spring/Summer 2015", + "id": "diesel-spring-summer-2015", + "title": "Diesel Spring/Summer 2015", + "menu": "Diesel S/S 2015", "description": "FOR SPRING 2015, FORMICHETTI ESTABLISHES THE KEY PIECES THAT HAVE COME TO REFLECT DIESEL’S NEW ERA AND CHARACTERIZE ITS DNA, AND THE FACES WHO BEST REFLECT THE PAST, PRESENT, AND FUTURE OF THE BRAND. IN A REVOLUTIONARY CAMPAIGN BY NICK KNIGHT, FORMICHETTI HIGHLIGHTS HIS PERSONAL HEROES, WHICH INCLUDE NEW FACES AND THE ARTISTS, INNOVATORS, MUSES, AND FRIENDS WHO INSPIRE HIM, AS WELL AS A FEW HEROES FROM PAST CAMPAIGNS. COMBINING CLASSIC PORTRAITURE WITH FUTURISTIC, DIGITAL ELEMENTS, THE CAMPAIGN WILL JUXTAPOSE THE INDIVIDUALS WHO MAKE UP DIESEL’SCOMMUNITY WITH THE “HERO” PIECES THAT BEST DEFINE THE STATEMENT OF THE BRAND TODAY.", "video": { "url": "", @@ -18,19 +18,19 @@ }, "images": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", "caption": "" }, { @@ -38,15 +38,15 @@ "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", "caption": "" } ], @@ -57,9 +57,9 @@ "__index": "0" }, { - "id": "diesel-f-w-14", - "title": "Diesel F/W 14", - "menu": "Diesel Fall/Winter 2014", + "id": "diesel-fall-winter-2014", + "title": "Diesel Fall/Winter 2014", + "menu": "Diesel F/W 2014", "description": "FOR FALL/WINTER 2014, IN AN ACT OF DEFIANT ANONYMITY, DIESEL IS STRIPPING AWAY THE IDENTITIES OF ITS MODELS AND CAMPAIGN STARS, DEMOCRATIZING THE CONCEPT – THERE IS NO SINGULAR IDEA OF WHO THE DIESEL PERSON SHOULD BE. SHOT BY NICK KNIGHT, THE CREATIVE IS INSPIRED BY THE THEME “PICASSO MEETS AVEDON,” REPRESENTING THE NEXT DIMENSION OF DIESEL, INTRODUCING THE SECOND PHASE OF THE BRAND AFTER #DIESELREBOOT.", "video": { "url": "", @@ -70,12 +70,44 @@ }, "images": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38ea6ad0-f689-491f-857a-12d4fa0d4748.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F12184bdd-0aff-43db-882c-8efcb1e583de.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fb61bd44f-d074-4a20-a641-fc11957e8cd5.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2a0b26ae-cc35-406e-923b-e60409e53eb8.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fd2a68db8-018b-4fdf-8f69-c2e4d0aff76a.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F0b24ebbd-07e8-446e-83db-60484f0f3dd9.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1f8c6b75-c694-4d31-a790-b042b75b3606.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F907a0fbd-1455-4f3d-b28e-ebcba658f2d3.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F17ee7deb-dee5-497a-a8a6-dfe3f9c3105d.jpg", "caption": "" } ], "thumbnail": { - "uri": "", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F94c3bb9d-7d11-43f7-be86-5348a677845f.jpg", "caption": "" }, "__index": "1" -- cgit v1.2.3-70-g09d2 From d41852f963dd78d4d20694f09339aae164e07f50 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Apr 2015 17:12:44 -0400 Subject: thumbs --- site/templates/all.liquid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'site') diff --git a/site/templates/all.liquid b/site/templates/all.liquid index 1ee66ff..f29a78f 100644 --- a/site/templates/all.liquid +++ b/site/templates/all.liquid @@ -1,25 +1,25 @@
{% for project in advertisings %}
- + {{ project.title }}
{% endfor %} {% for project in contents %}
- + {{ project.title }}
{% endfor %} {% for project in experientials %}
- + {{ project.title }}
{% endfor %} {% for project in retails %}
- + {{ project.title }}
{% endfor %} -- cgit v1.2.3-70-g09d2 From 21dfb9327f8acb95a5e81c4261fc00392b67e8c6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Apr 2015 17:46:49 -0400 Subject: fix flickity version --- site/db.json | 70 +++---- site/public/assets/javascripts/_env.js | 3 +- .../assets/javascripts/vendor/flickity.pkgd.js | 215 +++++++++++---------- themes/okadmin/public/js/app.js | 1 - 4 files changed, 139 insertions(+), 150 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 591706f..3d55602 100644 --- a/site/db.json +++ b/site/db.json @@ -5,9 +5,9 @@ "content": [], "advertising": [ { - "id": "diesel-spring-summer-2015", - "title": "Diesel Spring/Summer 2015", - "menu": "Diesel S/S 2015", + "id": "diesel-s-s-2015", + "title": "Diesel S/S 2015", + "menu": "Diesel Spring/Summer 2015", "description": "FOR SPRING 2015, FORMICHETTI ESTABLISHES THE KEY PIECES THAT HAVE COME TO REFLECT DIESEL’S NEW ERA AND CHARACTERIZE ITS DNA, AND THE FACES WHO BEST REFLECT THE PAST, PRESENT, AND FUTURE OF THE BRAND. IN A REVOLUTIONARY CAMPAIGN BY NICK KNIGHT, FORMICHETTI HIGHLIGHTS HIS PERSONAL HEROES, WHICH INCLUDE NEW FACES AND THE ARTISTS, INNOVATORS, MUSES, AND FRIENDS WHO INSPIRE HIM, AS WELL AS A FEW HEROES FROM PAST CAMPAIGNS. COMBINING CLASSIC PORTRAITURE WITH FUTURISTIC, DIGITAL ELEMENTS, THE CAMPAIGN WILL JUXTAPOSE THE INDIVIDUALS WHO MAKE UP DIESEL’SCOMMUNITY WITH THE “HERO” PIECES THAT BEST DEFINE THE STATEMENT OF THE BRAND TODAY.", "video": { "url": "", @@ -24,19 +24,25 @@ "thumb": "http://i.vimeocdn.com/video/497493142_640.jpg" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", + "type": "vimeo", + "token": "125927621", + "title": "the Vampyre of Time and Memory", + "thumb": "http://i.vimeocdn.com/video/516197938_640.jpg" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1b55cd3c-eb7d-4ed6-bfe9-2bc53960987d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1afaa719-c18f-4155-a42f-3e7fc10247c3.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", "caption": "" }, { @@ -44,28 +50,28 @@ "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38cb4454-34a4-44af-8243-53da4d2b7c47.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F86a3edfe-bdbb-44ac-9e50-e167c16c89b9.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe22fd077-ca52-42a1-ab9c-e0508bf4408e.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5bdc8f95-b18f-407a-b2f3-33df1025bf8a.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe402bfbb-b101-4b42-afcb-818f7b616db9.jpg", "caption": "" } ], "thumbnail": { - "uri": "", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F479667e9-a89d-4c19-935a-b78f3aaf64e6.jpg", "caption": "" }, "__index": "0" }, { - "id": "diesel-fall-winter-2014", - "title": "Diesel Fall/Winter 2014", - "menu": "Diesel F/W 2014", + "id": "diesel-f-w-14", + "title": "Diesel F/W 14", + "menu": "Diesel Fall/Winter 2014", "description": "FOR FALL/WINTER 2014, IN AN ACT OF DEFIANT ANONYMITY, DIESEL IS STRIPPING AWAY THE IDENTITIES OF ITS MODELS AND CAMPAIGN STARS, DEMOCRATIZING THE CONCEPT – THERE IS NO SINGULAR IDEA OF WHO THE DIESEL PERSON SHOULD BE. SHOT BY NICK KNIGHT, THE CREATIVE IS INSPIRED BY THE THEME “PICASSO MEETS AVEDON,” REPRESENTING THE NEXT DIMENSION OF DIESEL, INTRODUCING THE SECOND PHASE OF THE BRAND AFTER #DIESELREBOOT.", "video": { "url": "", @@ -76,44 +82,12 @@ }, "media": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F38ea6ad0-f689-491f-857a-12d4fa0d4748.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F12184bdd-0aff-43db-882c-8efcb1e583de.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fb61bd44f-d074-4a20-a641-fc11957e8cd5.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2a0b26ae-cc35-406e-923b-e60409e53eb8.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fd2a68db8-018b-4fdf-8f69-c2e4d0aff76a.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F0b24ebbd-07e8-446e-83db-60484f0f3dd9.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1f8c6b75-c694-4d31-a790-b042b75b3606.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F907a0fbd-1455-4f3d-b28e-ebcba658f2d3.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F17ee7deb-dee5-497a-a8a6-dfe3f9c3105d.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", "caption": "" } ], "thumbnail": { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F94c3bb9d-7d11-43f7-be86-5348a677845f.jpg", + "uri": "", "caption": "" }, "__index": "1" diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index aae60b9..60f6528 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -431,13 +431,14 @@ function build_gallery () { }) gallery.on("cellSelect", function(){ + console.log("DUH") $caption.html( $(gallery.selectedElement).data("caption") ) videos.forEach(function(player){ player.api('pause') }) }) gallery.on("settle", function(){ - gallery && $caption.html( $(gallery.selectedElement).data("caption") ) + $caption.html( $(gallery.selectedElement).data("caption") ) }) gallery.on("staticClick", function(e){ // console.log(e) diff --git a/site/public/assets/javascripts/vendor/flickity.pkgd.js b/site/public/assets/javascripts/vendor/flickity.pkgd.js index 6389014..0471fa5 100644 --- a/site/public/assets/javascripts/vendor/flickity.pkgd.js +++ b/site/public/assets/javascripts/vendor/flickity.pkgd.js @@ -1,6 +1,10 @@ /*! - * Flickity PACKAGED v0.2.3 + * Flickity PACKAGED v1.0.1 * Touch, responsive, flickable galleries + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * * http://flickity.metafizzy.co * Copyright 2015 Metafizzy */ @@ -1176,7 +1180,7 @@ if ( typeof define === 'function' && define.amd ) { })( window ); /** - * matchesSelector v1.0.2 + * matchesSelector v1.0.3 * matchesSelector( element, '.selector' ) * MIT license */ @@ -1189,6 +1193,10 @@ if ( typeof define === 'function' && define.amd ) { var matchesMethod = ( function() { + // check for the standard method name first + if ( ElemProto.matches ) { + return 'matches'; + } // check un-prefixed if ( ElemProto.matchesSelector ) { return 'matchesSelector'; @@ -1280,7 +1288,7 @@ if ( typeof define === 'function' && define.amd ) { })( Element.prototype ); /** - * Fizzy UI utils v0.1.1 + * Fizzy UI utils v1.0.1 * MIT license */ @@ -1380,7 +1388,7 @@ utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) { // ----- removeFrom ----- // -utils.removeFrom = function( obj, ary ) { +utils.removeFrom = function( ary, obj ) { var index = utils.indexOf( ary, obj ); if ( index != -1 ) { ary.splice( index, 1 ); @@ -1499,14 +1507,12 @@ utils.debounceMethod = function( _class, methodName, threshold ) { // ----- htmlInit ----- // -var jQuery = window.jQuery; - // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ -function toDashed( str ) { +utils.toDashed = function( str ) { return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { return $1 + '-' + $2; }).toLowerCase(); -} +}; var console = window.console; /** @@ -1516,7 +1522,7 @@ var console = window.console; */ utils.htmlInit = function( WidgetClass, namespace ) { docReady( function() { - var dashedNamespace = toDashed( namespace ); + var dashedNamespace = utils.toDashed( namespace ); var elems = document.querySelectorAll( '.js-' + dashedNamespace ); var dataAttr = 'data-' + dashedNamespace + '-options'; @@ -1538,6 +1544,7 @@ utils.htmlInit = function( WidgetClass, namespace ) { // initialize var instance = new WidgetClass( elem, options ); // make available via $().data('layoutname') + var jQuery = window.jQuery; if ( jQuery ) { jQuery.data( elem, namespace, instance ); } @@ -1893,8 +1900,12 @@ return proto; })); /*! - * Flickity v0.2.3 + * Flickity v1.0.1 * Touch, responsive, flickable galleries + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * * http://flickity.metafizzy.co * Copyright 2015 Metafizzy */ @@ -1999,7 +2010,8 @@ Flickity.defaults = { // initialIndex: 0, percentPosition: true, resize: true, - selectedAttraction: 0.025 + selectedAttraction: 0.025, + setGallerySize: true // watchCSS: false, // wrapAround: false }; @@ -2075,7 +2087,6 @@ Flickity.prototype.activate = function() { this.getSize(); // get cells from children this.reloadCells(); - this.setContainerSize(); if ( this.options.accessibility ) { // allow element to focusable @@ -2109,7 +2120,7 @@ Flickity.prototype.reloadCells = function() { this.cells = this._makeCells( this.slider.children ); this.positionCells(); this._getWrapShiftCells(); - this.setContainerSize(); + this.setGallerySize(); }; /** @@ -2215,8 +2226,10 @@ Flickity.prototype.setCellAlign = function() { this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign; }; -Flickity.prototype.setContainerSize = function() { - this.viewport.style.height = this.maxCellHeight + 'px'; +Flickity.prototype.setGallerySize = function() { + if ( this.options.setGallerySize ) { + this.viewport.style.height = this.maxCellHeight + 'px'; + } }; Flickity.prototype._getWrapShiftCells = function() { @@ -2267,13 +2280,21 @@ Flickity.prototype._containCells = function() { var lastCell = this.getLastCell(); var contentWidth = this.slideableWidth - lastCell.size[ endMargin ]; var endLimit = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign ); + // content is less than gallery size + var isContentSmaller = contentWidth < this.size.innerWidth; // contain each cell target for ( var i=0, len = this.cells.length; i < len; i++ ) { var cell = this.cells[i]; // reset default target cell.setDefaultTarget(); - cell.target = Math.max( cell.target, this.cursorPosition + firstCellStartMargin ); - cell.target = Math.min( cell.target, endLimit ); + if ( isContentSmaller ) { + // all cells fit inside gallery + cell.target = contentWidth * this.cellAlign; + } else { + // contain to bounds + cell.target = Math.max( cell.target, this.cursorPosition + firstCellStartMargin ); + cell.target = Math.min( cell.target, endLimit ); + } } }; @@ -2293,7 +2314,7 @@ Flickity.prototype.dispatchEvent = function( type, event, args ) { if ( event ) { // create jQuery event var $event = jQuery.Event( event ); - $event.type = type + '.flickity'; + $event.type = type; this.$element.trigger( $event, args ); } else { // just trigger with type if no event available @@ -2330,7 +2351,7 @@ Flickity.prototype.select = function( index, isWrap ) { this.selectedIndex = index; this.setSelectedCell(); this.startAnimation(); - this.dispatchEvent('select'); + this.dispatchEvent('cellSelect'); } }; @@ -2448,7 +2469,7 @@ Flickity.prototype.resize = function() { } this.positionCells(); this._getWrapShiftCells(); - this.setContainerSize(); + this.setGallerySize(); this.positionSliderAtSelected(); }; @@ -2554,6 +2575,9 @@ Flickity.prototype.destroy = function() { eventie.unbind( window, 'resize', this ); } this.emit('destroy'); + if ( jQuery && this.$element ) { + jQuery.removeData( this.element, 'flickity' ); + } delete this.element.flickityGUID; delete instances[ this.guid ]; }; @@ -2599,7 +2623,7 @@ return Flickity; })); /*! - * Unipointer v0.1.0 + * Unipointer v1.1.0 * base class for doing one thing with pointer event * MIT license */ @@ -2736,7 +2760,7 @@ Unipointer.prototype._pointerDown = function( event, pointer ) { Unipointer.prototype.pointerDown = function( event, pointer ) { this._bindPostStartEvents( event ); - this.emitEvent( 'pointerDown', [ this, event, pointer ] ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); }; // hash of events to be bound after start event @@ -2813,7 +2837,7 @@ Unipointer.prototype._pointerMove = function( event, pointer ) { // public Unipointer.prototype.pointerMove = function( event, pointer ) { - this.emitEvent( 'pointerMove', [ this, event, pointer ] ); + this.emitEvent( 'pointerMove', [ event, pointer ] ); }; // ----- end event ----- // @@ -2850,7 +2874,7 @@ Unipointer.prototype._pointerUp = function( event, pointer ) { // public Unipointer.prototype.pointerUp = function( event, pointer ) { - this.emitEvent( 'pointerUp', [ this, event, pointer ] ); + this.emitEvent( 'pointerUp', [ event, pointer ] ); }; // ----- pointer done ----- // @@ -2896,7 +2920,7 @@ Unipointer.prototype._pointerCancel = function( event, pointer ) { // public Unipointer.prototype.pointerCancel = function( event, pointer ) { - this.emitEvent( 'pointerCancel', [ this, event, pointer ] ); + this.emitEvent( 'pointerCancel', [ event, pointer ] ); }; // ----- ----- // @@ -2916,7 +2940,7 @@ return Unipointer; })); /*! - * Unidragger v0.2.0 + * Unidragger v1.1.3 * Draggable base class * MIT license */ @@ -3050,13 +3074,6 @@ var disableImgOndragstart = !isIE8 ? noop : function( handle ) { // ----- start event ----- // -var allowTouchstartNodes = Unidragger.allowTouchstartNodes = { - INPUT: true, - A: true, - BUTTON: true, - SELECT: true -}; - /** * pointer start * @param {Event} event @@ -3071,7 +3088,7 @@ Unidragger.prototype.pointerDown = function( event, pointer ) { } // bind move and end events this._bindPostStartEvents( event ); - this.emitEvent( 'pointerDown', [ this, event, pointer ] ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); }; // base pointer down logic @@ -3079,11 +3096,10 @@ Unidragger.prototype._dragPointerDown = function( event, pointer ) { // track to see when dragging starts this.pointerDownPoint = Unipointer.getPointerPoint( pointer ); + // prevent default, unless touchstart or - if ( !isTouchstartNode && targetNodeName != 'SELECT' ) { + if ( !isTouchstart && targetNodeName != 'SELECT' ) { preventDefaultEvent( event ); } }; @@ -3097,7 +3113,7 @@ Unidragger.prototype._dragPointerDown = function( event, pointer ) { */ Unidragger.prototype.pointerMove = function( event, pointer ) { var moveVector = this._dragPointerMove( event, pointer ); - this.emitEvent( 'pointerMove', [ this, event, pointer, moveVector ] ); + this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] ); this._dragMove( event, pointer, moveVector ); }; @@ -3129,7 +3145,7 @@ Unidragger.prototype.hasDragStarted = function( moveVector ) { * @param {Event or Touch} pointer */ Unidragger.prototype.pointerUp = function( event, pointer ) { - this.emitEvent( 'pointerUp', [ this, event, pointer ] ); + this.emitEvent( 'pointerUp', [ event, pointer ] ); this._dragPointerUp( event, pointer ); }; @@ -3155,7 +3171,7 @@ Unidragger.prototype._dragStart = function( event, pointer ) { }; Unidragger.prototype.dragStart = function( event, pointer ) { - this.emitEvent( 'dragStart', [ this, event, pointer ] ); + this.emitEvent( 'dragStart', [ event, pointer ] ); }; // dragMove @@ -3169,7 +3185,8 @@ Unidragger.prototype._dragMove = function( event, pointer, moveVector ) { }; Unidragger.prototype.dragMove = function( event, pointer, moveVector ) { - this.emitEvent( 'dragMove', [ this, event, pointer, moveVector ] ); + preventDefaultEvent( event ); + this.emitEvent( 'dragMove', [ event, pointer, moveVector ] ); }; // dragEnd @@ -3186,7 +3203,7 @@ Unidragger.prototype._dragEnd = function( event, pointer ) { }; Unidragger.prototype.dragEnd = function( event, pointer ) { - this.emitEvent( 'dragEnd', [ this, event, pointer ] ); + this.emitEvent( 'dragEnd', [ event, pointer ] ); }; // ----- onclick ----- // @@ -3202,15 +3219,16 @@ Unidragger.prototype.onclick = function( event ) { // triggered after pointer down & up with no/tiny movement Unidragger.prototype._staticClick = function( event, pointer ) { - // allow click in text input - if ( event.target.nodeName == 'INPUT' && event.target.type == 'text' ) { + // allow click in s and ",da.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",da.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,da.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){da.noCloneEvent=!1}),b.cloneNode(!0).click()),null==da.deleteExpando){da.deleteExpando=!0;try{delete b.test}catch(d){da.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=pa.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(da[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),da[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Ga=/^(?:input|select|textarea)$/i,Ha=/^key/,Ia=/^(?:mouse|contextmenu)|click/,Ja=/^(?:focusinfocus|focusoutblur)$/,Ka=/^([^.]*)(?:\.(.+)|)$/;fa.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=fa._data(a);if(q){for(c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=fa.guid++),(g=q.events)||(g=q.events={}),(k=q.handle)||(k=q.handle=function(a){return typeof fa===ya||a&&fa.event.triggered===a.type?void 0:fa.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(ua)||[""],h=b.length;h--;)f=Ka.exec(b[h])||[],n=p=f[1],o=(f[2]||"").split(".").sort(),n&&(j=fa.event.special[n]||{},n=(e?j.delegateType:j.bindType)||n,j=fa.event.special[n]||{},l=fa.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&fa.expr.match.needsContext.test(e),namespace:o.join(".")},i),(m=g[n])||(m=g[n]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,o,k)!==!1||(a.addEventListener?a.addEventListener(n,k,!1):a.attachEvent&&a.attachEvent("on"+n,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),fa.event.global[n]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=fa.hasData(a)&&fa._data(a);if(q&&(k=q.events)){for(b=(b||"").match(ua)||[""],j=b.length;j--;)if(h=Ka.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=fa.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||fa.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)fa.event.remove(a,n+b[j],c,d,!0);fa.isEmptyObject(k)&&(delete q.handle,fa._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||pa],n=ba.call(b,"type")?b.type:b,o=ba.call(b,"namespace")?b.namespace.split("."):[];if(h=k=d=d||pa,3!==d.nodeType&&8!==d.nodeType&&!Ja.test(n+fa.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),g=n.indexOf(":")<0&&"on"+n,b=b[fa.expando]?b:new fa.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:fa.makeArray(c,[b]),j=fa.event.special[n]||{},e||!j.trigger||j.trigger.apply(d,c)!==!1)){if(!e&&!j.noBubble&&!fa.isWindow(d)){for(i=j.delegateType||n,Ja.test(i+n)||(h=h.parentNode);h;h=h.parentNode)m.push(h),k=h;k===(d.ownerDocument||pa)&&m.push(k.defaultView||k.parentWindow||a)}for(l=0;(h=m[l++])&&!b.isPropagationStopped();)b.type=l>1?i:j.bindType||n,f=(fa._data(h,"events")||{})[b.type]&&fa._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&fa.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=n,!e&&!b.isDefaultPrevented()&&(!j._default||j._default.apply(m.pop(),c)===!1)&&fa.acceptData(d)&&g&&d[n]&&!fa.isWindow(d)){k=d[g],k&&(d[g]=null),fa.event.triggered=n;try{d[n]()}catch(p){}fa.event.triggered=void 0,k&&(d[g]=k)}return b.result}},dispatch:function(a){a=fa.event.fix(a);var b,c,d,e,f,g=[],h=X.call(arguments),i=(fa._data(this,"events")||{})[a.type]||[],j=fa.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=fa.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,f=0;(d=e.handlers[f++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(d.namespace))&&(a.handleObj=d,a.data=d.data,c=((fa.event.special[d.origType]||{}).handle||d.handler).apply(e.elem,h),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?fa(c,this).index(i)>=0:fa.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),Oa=/^\s+/,Pa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Qa=/<([\w:]+)/,Ra=/\s*$/g,Ya={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:da.htmlSerialize?[0,"",""]:[1,"X
","
"]},Za=p(pa),$a=Za.appendChild(pa.createElement("div"));Ya.optgroup=Ya.option,Ya.tbody=Ya.tfoot=Ya.colgroup=Ya.caption=Ya.thead,Ya.th=Ya.td,fa.extend({clone:function(a,b,c){var d,e,f,g,h,i=fa.contains(a.ownerDocument,a);if(da.html5Clone||fa.isXMLDoc(a)||!Na.test("<"+a.nodeName+">")?f=a.cloneNode(!0):($a.innerHTML=a.outerHTML,$a.removeChild(f=$a.firstChild)),!(da.noCloneEvent&&da.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||fa.isXMLDoc(a)))for(d=q(f),h=q(a),g=0;null!=(e=h[g]);++g)d[g]&&x(e,d[g]);if(b)if(c)for(h=h||q(a),d=d||q(f),g=0;null!=(e=h[g]);g++)w(e,d[g]);else w(a,f);return d=q(f,"script"),d.length>0&&v(d,!i&&q(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=p(b),n=[],o=0;l>o;o++)if(f=a[o],f||0===f)if("object"===fa.type(f))fa.merge(n,f.nodeType?[f]:f);else if(Sa.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(Qa.exec(f)||["",""])[1].toLowerCase(),k=Ya[i]||Ya._default,h.innerHTML=k[1]+f.replace(Pa,"<$1>")+k[2],e=k[0];e--;)h=h.lastChild;if(!da.leadingWhitespace&&Oa.test(f)&&n.push(b.createTextNode(Oa.exec(f)[0])),!da.tbody)for(f="table"!==i||Ra.test(f)?""!==k[1]||Ra.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)fa.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(fa.merge(n,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else n.push(b.createTextNode(f));for(h&&m.removeChild(h),da.appendChecked||fa.grep(q(n,"input"),r),o=0;f=n[o++];)if((!d||-1===fa.inArray(f,d))&&(g=fa.contains(f.ownerDocument,f),h=q(m.appendChild(f),"script"),g&&v(h),c))for(e=0;f=h[e++];)Va.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,e,f,g=0,h=fa.expando,i=fa.cache,j=da.deleteExpando,k=fa.event.special;null!=(c=a[g]);g++)if((b||fa.acceptData(c))&&(e=c[h],f=e&&i[e])){if(f.events)for(d in f.events)k[d]?fa.event.remove(c,d):fa.removeEvent(c,d,f.handle);i[e]&&(delete i[e],j?delete c[h]:typeof c.removeAttribute!==ya?c.removeAttribute(h):c[h]=null,W.push(e))}}}),fa.fn.extend({text:function(a){return Ea(this,function(a){return void 0===a?fa.text(this):this.empty().append((this[0]&&this[0].ownerDocument||pa).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=s(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=s(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?fa.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||fa.cleanData(q(c)),c.parentNode&&(b&&fa.contains(c.ownerDocument,c)&&v(q(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&fa.cleanData(q(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&fa.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return fa.clone(this,a,b)})},html:function(a){return Ea(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(Ma,""):void 0;if(!("string"!=typeof a||Ta.test(a)||!da.htmlSerialize&&Na.test(a)||!da.leadingWhitespace&&Oa.test(a)||Ya[(Qa.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Pa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(fa.cleanData(q(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,fa.cleanData(q(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=Y.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],n=fa.isFunction(m);if(n||j>1&&"string"==typeof m&&!da.checkClone&&Ua.test(m))return this.each(function(c){var d=k.eq(c);n&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(h=fa.buildFragment(a,this[0].ownerDocument,!1,this),c=h.firstChild,1===h.childNodes.length&&(h=c),c)){for(f=fa.map(q(h,"script"),t),e=f.length;j>i;i++)d=h,i!==l&&(d=fa.clone(d,!0,!0),e&&fa.merge(f,q(d,"script"))),b.call(this[i],d,i);if(e)for(g=f[f.length-1].ownerDocument,fa.map(f,u),i=0;e>i;i++)d=f[i],Va.test(d.type||"")&&!fa._data(d,"globalEval")&&fa.contains(g,d)&&(d.src?fa._evalUrl&&fa._evalUrl(d.src):fa.globalEval((d.text||d.textContent||d.innerHTML||"").replace(Xa,"")));h=c=null}return this}}),fa.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){fa.fn[a]=function(a){for(var c,d=0,e=[],f=fa(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),fa(f[d])[b](c),Z.apply(e,c.get());return this.pushStack(e)}});var _a,ab={};!function(){var a,b,c=pa.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="
a",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",da.opacity=/^0.5/.test(a.style.opacity),da.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",da.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,da.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=pa.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=pa.createElement("div"),e=pa.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==ya&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="
",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var bb,cb,db=/^margin/,eb=new RegExp("^("+Ba+")(?!px)[a-z%]+$","i"),fb=/^(top|right|bottom|left)$/;a.getComputedStyle?(bb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},cb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||bb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||fa.contains(a.ownerDocument,a)||(g=fa.style(a,b)),eb.test(g)&&db.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):pa.documentElement.currentStyle&&(bb=function(a){return a.currentStyle},cb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||bb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),eb.test(g)&&!fb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"}),!function(){function b(){var b,c,d=pa.getElementsByTagName("body")[0];d&&(b=pa.createElement("div"),c=pa.createElement("div"),b.style.cssText=j,d.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",fa.swap(d,null!=d.style.zoom?{zoom:1}:{},function(){e=4===c.offsetWidth}),f=!0,g=!1,h=!0,a.getComputedStyle&&(g="1%"!==(a.getComputedStyle(c,null)||{}).top,f="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),d.removeChild(b),c=d=null)}var c,d,e,f,g,h,i=pa.createElement("div"),j="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",k="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";i.innerHTML="
a",c=i.getElementsByTagName("a")[0],c.style.cssText="float:left;opacity:.5",da.opacity=/^0.5/.test(c.style.opacity),da.cssFloat=!!c.style.cssFloat,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",da.clearCloneStyle="content-box"===i.style.backgroundClip,c=i=null,fa.extend(da,{reliableHiddenOffsets:function(){if(null!=d)return d;var a,b,c,e=pa.createElement("div"),f=pa.getElementsByTagName("body")[0];return f?(e.setAttribute("className","t"),e.innerHTML="
a",a=pa.createElement("div"),a.style.cssText=j,f.appendChild(a).appendChild(e),e.innerHTML="
t
",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",d=c&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,d):void 0},boxSizing:function(){return null==e&&b(),e},boxSizingReliable:function(){return null==f&&b(),f},pixelPosition:function(){return null==g&&b(),g},reliableMarginRight:function(){var b,c,d,e;if(null==h&&a.getComputedStyle){if(b=pa.getElementsByTagName("body")[0],!b)return;c=pa.createElement("div"),d=pa.createElement("div"),c.style.cssText=j,b.appendChild(c).appendChild(d),e=d.appendChild(pa.createElement("div")),e.style.cssText=d.style.cssText=k,e.style.marginRight=e.style.width="0",d.style.width="1px",h=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return h}})}(),fa.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var gb=/alpha\([^)]*\)/i,hb=/opacity\s*=\s*([^)]*)/,ib=/^(none|table(?!-c[ea]).+)/,jb=new RegExp("^("+Ba+")(.*)$","i"),kb=new RegExp("^([+-])=("+Ba+")","i"),lb={position:"absolute",visibility:"hidden",display:"block"},mb={letterSpacing:0,fontWeight:400},nb=["Webkit","O","Moz","ms"];fa.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=cb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":da.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=fa.camelCase(b),i=a.style;if(b=fa.cssProps[h]||(fa.cssProps[h]=B(i,h)),g=fa.cssHooks[b]||fa.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=kb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(fa.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||fa.cssNumber[h]||(c+="px"),da.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=fa.camelCase(b);return b=fa.cssProps[h]||(fa.cssProps[h]=B(a.style,h)),g=fa.cssHooks[b]||fa.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=cb(a,b,d)),"normal"===f&&b in mb&&(f=mb[b]),""===c||c?(e=parseFloat(f),c===!0||fa.isNumeric(e)?e||0:f):f}}),fa.each(["height","width"],function(a,b){fa.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&ib.test(fa.css(a,"display"))?fa.swap(a,lb,function(){return F(a,b,d)}):F(a,b,d):void 0},set:function(a,c,d){var e=d&&bb(a);return D(a,c,d?E(a,b,d,da.boxSizing()&&"border-box"===fa.css(a,"boxSizing",!1,e),e):0)}}}),da.opacity||(fa.cssHooks.opacity={get:function(a,b){return hb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""; + +},set:function(a,b){var c=a.style,d=a.currentStyle,e=fa.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===fa.trim(f.replace(gb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=gb.test(f)?f.replace(gb,e):f+" "+e)}}),fa.cssHooks.marginRight=A(da.reliableMarginRight,function(a,b){return b?fa.swap(a,{display:"inline-block"},cb,[a,"marginRight"]):void 0}),fa.each({margin:"",padding:"",border:"Width"},function(a,b){fa.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+Ca[d]+b]=f[d]||f[d-2]||f[0];return e}},db.test(a)||(fa.cssHooks[a+b].set=D)}),fa.fn.extend({css:function(a,b){return Ea(this,function(a,b,c){var d,e,f={},g=0;if(fa.isArray(b)){for(d=bb(a),e=b.length;e>g;g++)f[b[g]]=fa.css(a,b[g],!1,d);return f}return void 0!==c?fa.style(a,b,c):fa.css(a,b)},a,b,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){Da(this)?fa(this).show():fa(this).hide()})}}),fa.Tween=G,G.prototype={constructor:G,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(fa.cssNumber[c]?"":"px")},cur:function(){var a=G.propHooks[this.prop];return a&&a.get?a.get(this):G.propHooks._default.get(this)},run:function(a){var b,c=G.propHooks[this.prop];return this.pos=b=this.options.duration?fa.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):G.propHooks._default.set(this),this}},G.prototype.init.prototype=G.prototype,G.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=fa.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){fa.fx.step[a.prop]?fa.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[fa.cssProps[a.prop]]||fa.cssHooks[a.prop])?fa.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},G.propHooks.scrollTop=G.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},fa.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},fa.fx=G.prototype.init,fa.fx.step={};var ob,pb,qb=/^(?:toggle|show|hide)$/,rb=new RegExp("^(?:([+-])=|)("+Ba+")([a-z%]*)$","i"),sb=/queueHooks$/,tb=[K],ub={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=rb.exec(b),f=e&&e[3]||(fa.cssNumber[a]?"":"px"),g=(fa.cssNumber[a]||"px"!==f&&+d)&&rb.exec(fa.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,fa.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};fa.Animation=fa.extend(M,{tweener:function(a,b){fa.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ub[c]=ub[c]||[],ub[c].unshift(b)},prefilter:function(a,b){b?tb.unshift(a):tb.push(a)}}),fa.speed=function(a,b,c){var d=a&&"object"==typeof a?fa.extend({},a):{complete:c||!c&&b||fa.isFunction(a)&&a,duration:a,easing:c&&b||b&&!fa.isFunction(b)&&b};return d.duration=fa.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in fa.fx.speeds?fa.fx.speeds[d.duration]:fa.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){fa.isFunction(d.old)&&d.old.call(this),d.queue&&fa.dequeue(this,d.queue)},d},fa.fn.extend({fadeTo:function(a,b,c,d){return this.filter(Da).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=fa.isEmptyObject(a),f=fa.speed(b,c,d),g=function(){var b=M(this,fa.extend({},a),f);(e||fa._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=fa.timers,g=fa._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&sb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&fa.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=fa._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=fa.timers,g=d?d.length:0;for(c.finish=!0,fa.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),fa.each(["toggle","show","hide"],function(a,b){var c=fa.fn[b];fa.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(I(b,!0),a,d,e)}}),fa.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){fa.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),fa.timers=[],fa.fx.tick=function(){var a,b=fa.timers,c=0;for(ob=fa.now();c
a",a=e.getElementsByTagName("a")[0],c=pa.createElement("select"),d=c.appendChild(pa.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",da.getSetAttribute="t"!==e.className,da.style=/top/.test(a.getAttribute("style")),da.hrefNormalized="/a"===a.getAttribute("href"),da.checkOn=!!b.value,da.optSelected=d.selected,da.enctype=!!pa.createElement("form").enctype,c.disabled=!0,da.optDisabled=!d.disabled,b=pa.createElement("input"),b.setAttribute("value",""),da.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),da.radioValue="t"===b.value,a=b=c=d=e=null}();var vb=/\r/g;fa.fn.extend({val:function(a){var b,c,d,e=this[0];return arguments.length?(d=fa.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,fa(this).val()):a,null==e?e="":"number"==typeof e?e+="":fa.isArray(e)&&(e=fa.map(e,function(a){return null==a?"":a+""})),b=fa.valHooks[this.type]||fa.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))})):e?(b=fa.valHooks[e.type]||fa.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(vb,""):null==c?"":c)):void 0}}),fa.extend({valHooks:{option:{get:function(a){var b=fa.find.attr(a,"value");return null!=b?b:fa.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(da.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&fa.nodeName(c.parentNode,"optgroup"))){if(b=fa(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=fa.makeArray(b),g=e.length;g--;)if(d=e[g],fa.inArray(fa.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),fa.each(["radio","checkbox"],function(){fa.valHooks[this]={set:function(a,b){return fa.isArray(b)?a.checked=fa.inArray(fa(a).val(),b)>=0:void 0}},da.checkOn||(fa.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var wb,xb,yb=fa.expr.attrHandle,zb=/^(?:checked|selected)$/i,Ab=da.getSetAttribute,Bb=da.input;fa.fn.extend({attr:function(a,b){return Ea(this,fa.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){fa.removeAttr(this,a)})}}),fa.extend({attr:function(a,b,c){var d,e,f=a.nodeType;return a&&3!==f&&8!==f&&2!==f?typeof a.getAttribute===ya?fa.prop(a,b,c):(1===f&&fa.isXMLDoc(a)||(b=b.toLowerCase(),d=fa.attrHooks[b]||(fa.expr.match.bool.test(b)?xb:wb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=fa.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void fa.removeAttr(a,b)):void 0},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ua);if(f&&1===a.nodeType)for(;c=f[e++];)d=fa.propFix[c]||c,fa.expr.match.bool.test(c)?Bb&&Ab||!zb.test(c)?a[d]=!1:a[fa.camelCase("default-"+c)]=a[d]=!1:fa.attr(a,c,""),a.removeAttribute(Ab?c:d)},attrHooks:{type:{set:function(a,b){if(!da.radioValue&&"radio"===b&&fa.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),xb={set:function(a,b,c){return b===!1?fa.removeAttr(a,c):Bb&&Ab||!zb.test(c)?a.setAttribute(!Ab&&fa.propFix[c]||c,c):a[fa.camelCase("default-"+c)]=a[c]=!0,c}},fa.each(fa.expr.match.bool.source.match(/\w+/g),function(a,b){var c=yb[b]||fa.find.attr;yb[b]=Bb&&Ab||!zb.test(b)?function(a,b,d){var e,f;return d||(f=yb[b],yb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,yb[b]=f),e}:function(a,b,c){return c?void 0:a[fa.camelCase("default-"+b)]?b.toLowerCase():null}}),Bb&&Ab||(fa.attrHooks.value={set:function(a,b,c){return fa.nodeName(a,"input")?void(a.defaultValue=b):wb&&wb.set(a,b,c)}}),Ab||(wb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},yb.id=yb.name=yb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},fa.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:wb.set},fa.attrHooks.contenteditable={set:function(a,b,c){wb.set(a,""===b?!1:b,c)}},fa.each(["width","height"],function(a,b){fa.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),da.style||(fa.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var Cb=/^(?:input|select|textarea|button|object)$/i,Db=/^(?:a|area)$/i;fa.fn.extend({prop:function(a,b){return Ea(this,fa.prop,a,b,arguments.length>1)},removeProp:function(a){return a=fa.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),fa.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;return a&&3!==g&&8!==g&&2!==g?(f=1!==g||!fa.isXMLDoc(a),f&&(b=fa.propFix[b]||b,e=fa.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]):void 0},propHooks:{tabIndex:{get:function(a){var b=fa.find.attr(a,"tabindex");return b?parseInt(b,10):Cb.test(a.nodeName)||Db.test(a.nodeName)&&a.href?0:-1}}}}),da.hrefNormalized||fa.each(["href","src"],function(a,b){fa.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),da.optSelected||(fa.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),fa.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fa.propFix[this.toLowerCase()]=this}),da.enctype||(fa.propFix.enctype="encoding");var Eb=/[\t\r\n\f]/g;fa.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(fa.isFunction(a))return this.each(function(b){fa(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(ua)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=fa.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(fa.isFunction(a))return this.each(function(b){fa(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(ua)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Eb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?fa.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(fa.isFunction(a)?function(c){fa(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,d=0,e=fa(this),f=a.match(ua)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===ya||"boolean"===c)&&(this.className&&fa._data(this,"__className__",this.className),this.className=this.className||a===!1?"":fa._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(Eb," ").indexOf(b)>=0)return!0;return!1}}),fa.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){fa.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),fa.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Fb=fa.now(),Gb=/\?/,Hb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;fa.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=fa.trim(b+"");return e&&!fa.trim(e.replace(Hb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():fa.error("Invalid JSON: "+b)},fa.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||fa.error("Invalid XML: "+b),c};var Ib,Jb,Kb=/#.*$/,Lb=/([?&])_=[^&]*/,Mb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ob=/^(?:GET|HEAD)$/,Pb=/^\/\//,Qb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Rb={},Sb={},Tb="*/".concat("*");try{Jb=location.href}catch(Ub){Jb=pa.createElement("a"),Jb.href="",Jb=Jb.href}Ib=Qb.exec(Jb.toLowerCase())||[],fa.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Jb,type:"GET",isLocal:Nb.test(Ib[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":fa.parseJSON,"text xml":fa.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?P(P(a,fa.ajaxSettings),b):P(fa.ajaxSettings,a)},ajaxPrefilter:N(Rb),ajaxTransport:N(Sb),ajax:function(a,b){function c(a,b,c,d){var e,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),j=void 0,g=d||"",v.readyState=a>0?4:0,e=a>=200&&300>a||304===a,c&&(s=Q(l,v,c)),s=R(l,s,v,e),e?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(fa.lastModified[f]=u),u=v.getResponseHeader("etag"),u&&(fa.etag[f]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,e=!r)):(r=w,(a||!w)&&(w="error",0>a&&(a=0))),v.status=a,v.statusText=(b||w)+"",e?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,i&&n.trigger(e?"ajaxSuccess":"ajaxError",[v,l,e?k:r]),p.fireWith(m,[v,w]),i&&(n.trigger("ajaxComplete",[v,l]),--fa.active||fa.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=fa.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?fa(m):fa.event,o=fa.Deferred(),p=fa.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!k)for(k={};b=Mb.exec(g);)k[b[1].toLowerCase()]=b[2];b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return j&&j.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||Jb)+"").replace(Kb,"").replace(Pb,Ib[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=fa.trim(l.dataType||"*").toLowerCase().match(ua)||[""],null==l.crossDomain&&(d=Qb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Ib[1]&&d[2]===Ib[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Ib[3]||("http:"===Ib[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=fa.param(l.data,l.traditional)),O(Rb,l,b,v),2===t)return v;i=l.global,i&&0===fa.active++&&fa.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Ob.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Gb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Lb.test(f)?f.replace(Lb,"$1_="+Fb++):f+(Gb.test(f)?"&":"?")+"_="+Fb++)),l.ifModified&&(fa.lastModified[f]&&v.setRequestHeader("If-Modified-Since",fa.lastModified[f]),fa.etag[f]&&v.setRequestHeader("If-None-Match",fa.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Tb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)v.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(e in{success:1,error:1,complete:1})v[e](l[e]);if(j=O(Sb,l,b,v)){v.readyState=1,i&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,j.send(r,c)}catch(w){if(!(2>t))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return fa.get(a,b,c,"json")},getScript:function(a,b){return fa.get(a,void 0,b,"script")}}),fa.each(["get","post"],function(a,b){fa[b]=function(a,c,d,e){return fa.isFunction(c)&&(e=e||d,d=c,c=void 0),fa.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),fa.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){fa.fn[b]=function(a){return this.on(b,a)}}),fa._evalUrl=function(a){return fa.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},fa.fn.extend({wrapAll:function(a){if(fa.isFunction(a))return this.each(function(b){fa(this).wrapAll(a.call(this,b))});if(this[0]){var b=fa(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(fa.isFunction(a)?function(b){fa(this).wrapInner(a.call(this,b))}:function(){var b=fa(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=fa.isFunction(a);return this.each(function(c){fa(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){fa.nodeName(this,"body")||fa(this).replaceWith(this.childNodes)}).end()}}),fa.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!da.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||fa.css(a,"display"))},fa.expr.filters.visible=function(a){return!fa.expr.filters.hidden(a)};var Vb=/%20/g,Wb=/\[\]$/,Xb=/\r?\n/g,Yb=/^(?:submit|button|image|reset|file)$/i,Zb=/^(?:input|select|textarea|keygen)/i;fa.param=function(a,b){var c,d=[],e=function(a,b){b=fa.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=fa.ajaxSettings&&fa.ajaxSettings.traditional),fa.isArray(a)||a.jquery&&!fa.isPlainObject(a))fa.each(a,function(){e(this.name,this.value)});else for(c in a)S(c,a[c],b,e);return d.join("&").replace(Vb,"+")},fa.fn.extend({serialize:function(){return fa.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=fa.prop(this,"elements");return a?fa.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!fa(this).is(":disabled")&&Zb.test(this.nodeName)&&!Yb.test(a)&&(this.checked||!Fa.test(a))}).map(function(a,b){var c=fa(this).val();return null==c?null:fa.isArray(c)?fa.map(c,function(a){return{name:b.name,value:a.replace(Xb,"\r\n")}}):{name:b.name,value:c.replace(Xb,"\r\n")}}).get()}}),fa.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&T()||U()}:T;var $b=0,_b={},ac=fa.ajaxSettings.xhr();a.ActiveXObject&&fa(a).on("unload",function(){for(var a in _b)_b[a](void 0,!0)}),da.cors=!!ac&&"withCredentials"in ac,ac=da.ajax=!!ac,ac&&fa.ajaxTransport(function(a){if(!a.crossDomain||da.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++$b;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete _b[g],b=void 0,f.onreadystatechange=fa.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=_b[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}}),fa.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return fa.globalEval(a),a}}}),fa.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),fa.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=pa.head||fa("head")[0]||pa.documentElement;return{send:function(d,e){b=pa.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var bc=[],cc=/(=)\?(?=&|$)|\?\?/;fa.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=bc.pop()||fa.expando+"_"+Fb++;return this[a]=!0,a}}),fa.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(cc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&cc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=fa.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(cc,"$1"+e):b.jsonp!==!1&&(b.url+=(Gb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||fa.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,bc.push(e)),g&&fa.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),fa.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||pa;var d=ma.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=fa.buildFragment([a],b,e),e&&e.length&&fa(e).remove(),fa.merge([],d.childNodes))};var dc=fa.fn.load;fa.fn.load=function(a,b,c){if("string"!=typeof a&&dc)return dc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),fa.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&fa.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?fa("
").append(fa.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},fa.expr.filters.animated=function(a){return fa.grep(fa.timers,function(b){return a===b.elem}).length};var ec=a.document.documentElement;fa.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=fa.css(a,"position"),l=fa(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=fa.css(a,"top"),i=fa.css(a,"left"),j=("absolute"===k||"fixed"===k)&&fa.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),fa.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},fa.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){fa.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;return f?(b=f.documentElement,fa.contains(b,e)?(typeof e.getBoundingClientRect!==ya&&(d=e.getBoundingClientRect()),c=V(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d):void 0},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===fa.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),fa.nodeName(a[0],"html")||(c=a.offset()),c.top+=fa.css(a[0],"borderTopWidth",!0),c.left+=fa.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-fa.css(d,"marginTop",!0),left:b.left-c.left-fa.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||ec;a&&!fa.nodeName(a,"html")&&"static"===fa.css(a,"position");)a=a.offsetParent;return a||ec})}}),fa.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);fa.fn[a]=function(d){return Ea(this,function(a,d,e){var f=V(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?fa(f).scrollLeft():e,c?e:fa(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),fa.each(["top","left"],function(a,b){fa.cssHooks[b]=A(da.pixelPosition,function(a,c){return c?(c=cb(a,b),eb.test(c)?fa(a).position()[b]+"px":c):void 0})}),fa.each({Height:"height",Width:"width"},function(a,b){fa.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){fa.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Ea(this,function(b,c,d){var e;return fa.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?fa.css(b,c,g):fa.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),fa.fn.size=function(){return this.length},fa.fn.andSelf=fa.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return fa});var fc=a.jQuery,gc=a.$;return fa.noConflict=function(b){return a.$===fa&&(a.$=gc),b&&a.jQuery===fa&&(a.jQuery=fc),fa},typeof b===ya&&(a.jQuery=a.$=fa),fa});var Froogaloop=function(){function a(b){return new a.fn.init(b)}function b(a,b,c){if(!c.contentWindow.postMessage)return!1;var d=c.getAttribute("src").split("?")[0],e=JSON.stringify({method:a,value:b});"//"===d.substr(0,2)&&(d=window.location.protocol+d),c.contentWindow.postMessage(e,d)}function c(a){var b,c;try{b=JSON.parse(a.data),c=b.event||b.method}catch(d){}if("ready"!=c||j||(j=!0),a.origin!=k)return!1;var f=b.value,g=b.data,h=""===h?null:b.player_id,i=e(c,h),l=[];return i?(void 0!==f&&l.push(f),g&&l.push(g),h&&l.push(h),l.length>0?i.apply(null,l):i.call()):!1}function d(a,b,c){c?(i[c]||(i[c]={}),i[c][a]=b):i[a]=b}function e(a,b){return b?i[b][a]:i[a]}function f(a,b){if(b&&i[b]){if(!i[b][a])return!1;i[b][a]=null}else{if(!i[a])return!1;i[a]=null}return!0}function g(a){"//"===a.substr(0,2)&&(a=window.location.protocol+a);for(var b=a.split("/"),c="",d=0,e=b.length;e>d&&3>d;d++)c+=b[d],2>d&&(c+="/");return c}function h(a){return!!(a&&a.constructor&&a.call&&a.apply)}var i={},j=!1,k=(Array.prototype.slice,"");return a.fn=a.prototype={element:null,init:function(a){return"string"==typeof a&&(a=document.getElementById(a)),this.element=a,k=g(this.element.getAttribute("src")),this},api:function(a,c){if(!this.element||!a)return!1;var e=this,f=e.element,g=""!==f.id?f.id:null,i=h(c)?null:c,j=h(c)?c:null;return j&&d(a,j,g),b(a,i,f),e},addEvent:function(a,c){if(!this.element)return!1;var e=this,f=e.element,g=""!==f.id?f.id:null;return d(a,c,g),"ready"!=a?b("addEventListener",a,f):"ready"==a&&j&&c.call(null,g),e},removeEvent:function(a){if(!this.element)return!1;var c=this,d=c.element,e=""!==d.id?d.id:null,g=f(a,e);"ready"!=a&&g&&b("removeEventListener",a,d)}},a.fn.init.prototype=a.fn,window.addEventListener?window.addEventListener("message",c,!1):window.attachEvent("onmessage",c),window.Froogaloop=window.$f=a}(),deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){ +"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime100||deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.sendClick(g,a),deviceIsIOS&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return deviceIsIOS&&!deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a,b){"use strict";return new FastClick(a,b)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick,function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function c(a,b){var c=d(a,b)?f:e;c(a,b)}var d,e,f;"classList"in document.documentElement?(d=function(a,b){return a.classList.contains(b)},e=function(a,b){a.classList.add(b)},f=function(a,b){a.classList.remove(b)}):(d=function(a,c){return b(c).test(a.className)},e=function(a,b){d(a,b)||(a.className=a.className+" "+b)},f=function(a,c){a.className=a.className.replace(b(c)," ")});var g={hasClass:d,addClass:e,removeClass:f,toggleClass:c,has:d,add:e,remove:f,toggle:c};"function"==typeof define&&define.amd?define("classie/classie",g):"object"==typeof exports?module.exports=g:a.classie=g}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/cell",["get-size/get-size"],function(c){return b(a,c)}):"object"==typeof exports?module.exports=b(a,require("get-size")):(a.Flickity=a.Flickity||{},a.Flickity.Cell=b(a,a.getSize))}(window,function(a,b){function c(a,b){this.element=a,this.parent=b,this.create()}var d="attachEvent"in a;return c.prototype.create=function(){this.element.style.position="absolute",d&&this.element.setAttribute("unselectable","on"),this.x=0,this.shift=0},c.prototype.destroy=function(){this.element.style.position="";var a=this.parent.originSide;this.element.style[a]=""},c.prototype.getSize=function(){this.size=b(this.element)},c.prototype.setPosition=function(a){this.x=a,this.setDefaultTarget(),this.renderPosition(a)},c.prototype.setDefaultTarget=function(){var a="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[a]+this.size.width*this.parent.cellAlign},c.prototype.renderPosition=function(a){var b=this.parent.originSide;this.element.style[b]=this.parent.getPositionValue(a)},c.prototype.wrapShift=function(a){this.shift=a,this.renderPosition(this.x+this.parent.slideableWidth*a)},c.prototype.remove=function(){this.element.parentNode.removeChild(this.element)},c}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/animate",["get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Flickity=a.Flickity||{},a.Flickity.animatePrototype=b(a,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c){for(var d,e=0,f="webkit moz ms o".split(" "),g=a.requestAnimationFrame,h=a.cancelAnimationFrame,i=0;i1&&(a=c.modulo(a,this.slideableWidth),a-=this.slideableWidth,this.shiftWrapCells(a)),a+=this.cursorPosition,a=this.options.rightToLeft&&k?-a:a;var b=this.getPositionValue(a);k?this.slider.style[k]=l&&this.isAnimating?"translate3d("+b+",0,0)":"translateX("+b+")":this.slider.style[this.originSide]=b},j.positionSliderAtSelected=function(){if(this.cells.length){var a=this.cells[this.selectedIndex];this.x=-a.target,this.positionSlider()}},j.getPositionValue=function(a){return this.options.percentPosition?.01*Math.round(a/this.size.innerWidth*1e4)+"%":Math.round(a)+"px"},j.settle=function(a){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*a)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,l&&this.positionSlider(),this.dispatchEvent("settle"))},j.shiftWrapCells=function(a){var b=this.cursorPosition+a;this._shiftCells(this.beforeShiftCells,b,-1);var c=this.size.innerWidth-(a+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,c,1)},j._shiftCells=function(a,b,c){for(var d=0,e=a.length;e>d;d++){var f=a[d],g=b>0?c:0;f.wrapShift(g),b-=f.size.outerWidth}},j._unshiftCells=function(a){if(a&&a.length)for(var b=0,c=a.length;c>b;b++)a[b].wrapShift(0)},j.integratePhysics=function(){this.velocity+=this.accel,this.x+=this.velocity,this.velocity*=this.getFrictionFactor(),this.accel=0},j.applyForce=function(a){this.accel+=a},j.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},j.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())},j.applySelectedAttraction=function(){var a=this.cells.length;if(!this.isPointerDown&&!this.isFreeScrolling&&a){var b=this.cells[this.selectedIndex],c=this.options.wrapAround&&a>1?this.slideableWidth*Math.floor(this.selectedIndex/a):0,d=-1*(b.target+c)-this.x,e=d*this.options.selectedAttraction;this.applyForce(e)}},j}),function(a,b){if("function"==typeof define&&define.amd)define("flickity/js/flickity",["classie/classie","eventEmitter/EventEmitter","eventie/eventie","get-size/get-size","fizzy-ui-utils/utils","./cell","./animate"],function(c,d,e,f,g,h,i){return b(a,c,d,e,f,g,h,i)});else if("object"==typeof exports)module.exports=b(a,require("desandro-classie"),require("wolfy87-eventemitter"),require("eventie"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./animate"));else{var c=a.Flickity;a.Flickity=b(a,a.classie,a.EventEmitter,a.eventie,a.getSize,a.fizzyUIUtils,c.Cell,c.animatePrototype)}}(window,function(a,b,c,d,e,f,g,h){function i(a,b){for(a=f.makeArray(a);a.length;)b.appendChild(a.shift())}function j(a,b){var c=f.getQueryElement(a);return c?(this.element=c,k&&(this.$element=k(this.element)),this.options=f.extend({},this.constructor.defaults),this.option(b),void this._create()):void(m&&m.error("Bad element for Flickity: "+(c||a)))}var k=a.jQuery,l=a.getComputedStyle,m=a.console,n=0,o={};j.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},j.createMethods=[],f.extend(j.prototype,c.prototype),j.prototype._create=function(){var b=this.guid=++n;this.element.flickityGUID=b,o[b]=this,this.selectedIndex=this.options.initialIndex||0,this.restingFrames=0,this.x=0,this.velocity=0,this.accel=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",j.setUnselectable(this.viewport),this._createSlider(),(this.options.resize||this.options.watchCSS)&&(d.bind(a,"resize",this),this.isResizeBound=!0);for(var c=0,e=j.createMethods.length;e>c;c++){var f=j.createMethods[c];this[f]()}this.options.watchCSS?this.watchCSS():this.activate()},j.prototype.option=function(a){f.extend(this.options,a)},j.prototype.activate=function(){if(!this.isActive){this.isActive=!0,b.add(this.element,"flickity-enabled"),this.options.rightToLeft&&b.add(this.element,"flickity-rtl");var a=this._filterFindCellElements(this.element.children);i(a,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.getSize(),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,d.bind(this.element,"keydown",this)),this.emit("activate"),this.positionSliderAtSelected(),this.select(this.selectedIndex)}},j.prototype._createSlider=function(){var a=document.createElement("div");a.className="flickity-slider",a.style[this.originSide]=0,this.slider=a},j.prototype._filterFindCellElements=function(a){return f.filterFindElements(a,this.options.cellSelector)},j.prototype.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},j.prototype._makeCells=function(a){for(var b=this._filterFindCellElements(a),c=[],d=0,e=b.length;e>d;d++){var f=b[d],h=new g(f,this);c.push(h)}return c},j.prototype.getLastCell=function(){return this.cells[this.cells.length-1]},j.prototype.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},j.prototype._positionCells=function(a){this.maxCellHeight=a?this.maxCellHeight||0:0;var b=0;if(a>0){var c=this.cells[a-1];b=c.x+c.size.outerWidth}for(var d,e=this.cells.length,f=a;e>f;f++)d=this.cells[f],d.setPosition(b),b+=d.size.outerWidth,this.maxCellHeight=Math.max(d.size.outerHeight,this.maxCellHeight);this.slideableWidth=b,this._containCells()},j.prototype._sizeCells=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];d.getSize()}},j.prototype._init=j.prototype.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},j.prototype.getSize=function(){this.size=e(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var p={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};j.prototype.setCellAlign=function(){var a=p[this.options.cellAlign];this.cellAlign=a?a[this.originSide]:this.options.cellAlign},j.prototype.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=this.maxCellHeight+"px")},j.prototype._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var a=this.cursorPosition,b=this.cells.length-1;this.beforeShiftCells=this._getGapCells(a,b,-1),a=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(a,0,1)}},j.prototype._getGapCells=function(a,b,c){for(var d=[];a>0;){var e=this.cells[b];if(!e)break;d.push(e),b+=c,a-=e.size.outerWidth}return d},j.prototype._containCells=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length)for(var a=this.options.rightToLeft?"marginRight":"marginLeft",b=this.options.rightToLeft?"marginLeft":"marginRight",c=this.cells[0].size[a],d=this.getLastCell(),e=this.slideableWidth-d.size[b],f=e-this.size.innerWidth*(1-this.cellAlign),g=eh;h++){var j=this.cells[h];j.setDefaultTarget(),g?j.target=e*this.cellAlign:(j.target=Math.max(j.target,this.cursorPosition+c),j.target=Math.min(j.target,f))}},j.prototype.dispatchEvent=function(a,b,c){var d=[b].concat(c);if(this.emitEvent(a,d),k&&this.$element)if(b){var e=k.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},j.prototype.select=function(a,b){if(this.isActive){var c=this.cells.length;this.options.wrapAround&&c>1&&(0>a?this.x-=this.slideableWidth:a>=c&&(this.x+=this.slideableWidth)),(this.options.wrapAround||b)&&(a=f.modulo(a,c)),this.cells[a]&&(this.selectedIndex=a,this.setSelectedCell(),this.startAnimation(),this.dispatchEvent("cellSelect"))}},j.prototype.previous=function(a){this.select(this.selectedIndex-1,a)},j.prototype.next=function(a){this.select(this.selectedIndex+1,a)},j.prototype.setSelectedCell=function(){this._removeSelectedCellClass(),this.selectedCell=this.cells[this.selectedIndex],this.selectedElement=this.selectedCell.element,b.add(this.selectedElement,"is-selected")},j.prototype._removeSelectedCellClass=function(){this.selectedCell&&b.remove(this.selectedCell.element,"is-selected")},j.prototype.getCell=function(a){for(var b=0,c=this.cells.length;c>b;b++){var d=this.cells[b];if(d.element==a)return d}},j.prototype.getCells=function(a){a=f.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],g=this.getCell(e);g&&b.push(g)}return b},j.prototype.getCellElements=function(){for(var a=[],b=0,c=this.cells.length;c>b;b++)a.push(this.cells[b].element);return a},j.prototype.getParentCell=function(a){var b=this.getCell(a);return b?b:(a=f.getParent(a,".flickity-slider > *"),this.getCell(a))},j.prototype.uiChange=function(){this.emit("uiChange")},j.prototype.childUIPointerDown=function(a){this.emitEvent("childUIPointerDown",[a])},j.prototype.onresize=function(){this.watchCSS(),this.resize()},f.debounceMethod(j,"onresize",150),j.prototype.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=f.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.positionSliderAtSelected())};var q=j.supportsConditionalCSS=function(){var a;return function(){if(void 0!==a)return a;if(!l)return void(a=!1);var b=document.createElement("style"),c=document.createTextNode('body:after { content: "foo"; display: none; }');b.appendChild(c),document.head.appendChild(b);var d=l(document.body,":after").content;return a=-1!=d.indexOf("foo"),document.head.removeChild(b),a}}();j.prototype.watchCSS=function(){var a=this.options.watchCSS;if(a){var b=q();if(!b){var c="fallbackOn"==a?"activate":"deactivate";return void this[c]()}var d=l(this.element,":after").content;-1!=d.indexOf("flickity")?this.activate():this.deactivate()}},j.prototype.onkeydown=function(a){if(this.options.accessibility&&(!document.activeElement||document.activeElement==this.element))if(37==a.keyCode){var b=this.options.rightToLeft?"next":"previous";this.uiChange(),this[b]()}else if(39==a.keyCode){var c=this.options.rightToLeft?"previous":"next";this.uiChange(),this[c]()}},j.prototype.deactivate=function(){if(this.isActive){b.remove(this.element,"flickity-enabled"),b.remove(this.element,"flickity-rtl");for(var a=0,c=this.cells.length;c>a;a++){var e=this.cells[a];e.destroy()}this._removeSelectedCellClass(),this.element.removeChild(this.viewport),i(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),d.unbind(this.element,"keydown",this)),this.isActive=!1,this.emit("deactivate")}},j.prototype.destroy=function(){this.deactivate(),this.isResizeBound&&d.unbind(a,"resize",this),this.emit("destroy"),k&&this.$element&&k.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete o[this.guid]},f.extend(j.prototype,h);var r="attachEvent"in a;return j.setUnselectable=function(a){r&&a.setAttribute("unselectable","on")},j.data=function(a){a=f.getQueryElement(a);var b=a&&a.flickityGUID;return b&&o[b]},f.htmlInit(j,"flickity"),k&&k.bridget&&k.bridget("flickity",j),j.Cell=g,j}),function(a,b){"function"==typeof define&&define.amd?define("unipointer/unipointer",["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.Unipointer=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(){}function e(){}e.prototype=new b,e.prototype.bindStartEvent=function(a){this._bindStartEvent(a,!0)},e.prototype.unbindStartEvent=function(a){this._bindStartEvent(a,!1)},e.prototype._bindStartEvent=function(b,d){d=void 0===d?!0:!!d;var e=d?"bind":"unbind";a.navigator.pointerEnabled?c[e](b,"pointerdown",this):a.navigator.msPointerEnabled?c[e](b,"MSPointerDown",this):(c[e](b,"mousedown",this),c[e](b,"touchstart",this))},e.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},e.prototype.getTouch=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];if(d.identifier==this.pointerIdentifier)return d}},e.prototype.onmousedown=function(a){var b=a.button;b&&0!==b&&1!==b||this._pointerDown(a,a)},e.prototype.ontouchstart=function(a){this._pointerDown(a,a.changedTouches[0])},e.prototype.onMSPointerDown=e.prototype.onpointerdown=function(a){this._pointerDown(a,a)},e.prototype._pointerDown=function(a,b){this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==b.pointerId?b.pointerId:b.identifier,this.pointerDown(a,b))},e.prototype.pointerDown=function(a,b){this._bindPostStartEvents(a),this.emitEvent("pointerDown",[a,b])};var f={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"],MSPointerDown:["MSPointerMove","MSPointerUp","MSPointerCancel"]};return e.prototype._bindPostStartEvents=function(b){if(b){for(var d=f[b.type],e=b.preventDefault?a:document,g=0,h=d.length;h>g;g++){var i=d[g];c.bind(e,i,this)}this._boundPointerEvents={events:d,node:e}}},e.prototype._unbindPostStartEvents=function(){var a=this._boundPointerEvents;if(a&&a.events){for(var b=0,d=a.events.length;d>b;b++){var e=a.events[b];c.unbind(a.node,e,this)}delete this._boundPointerEvents}},e.prototype.onmousemove=function(a){this._pointerMove(a,a)},e.prototype.onMSPointerMove=e.prototype.onpointermove=function(a){a.pointerId==this.pointerIdentifier&&this._pointerMove(a,a)},e.prototype.ontouchmove=function(a){var b=this.getTouch(a.changedTouches);b&&this._pointerMove(a,b)},e.prototype._pointerMove=function(a,b){this.pointerMove(a,b); + +},e.prototype.pointerMove=function(a,b){this.emitEvent("pointerMove",[a,b])},e.prototype.onmouseup=function(a){this._pointerUp(a,a)},e.prototype.onMSPointerUp=e.prototype.onpointerup=function(a){a.pointerId==this.pointerIdentifier&&this._pointerUp(a,a)},e.prototype.ontouchend=function(a){var b=this.getTouch(a.changedTouches);b&&this._pointerUp(a,b)},e.prototype._pointerUp=function(a,b){this._pointerDone(),this.pointerUp(a,b)},e.prototype.pointerUp=function(a,b){this.emitEvent("pointerUp",[a,b])},e.prototype._pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this._unbindPostStartEvents(),this.pointerDone()},e.prototype.pointerDone=d,e.prototype.onMSPointerCancel=e.prototype.onpointercancel=function(a){a.pointerId==this.pointerIdentifier&&this._pointerCancel(a,a)},e.prototype.ontouchcancel=function(a){var b=this.getTouch(a.changedTouches);b&&this._pointerCancel(a,b)},e.prototype._pointerCancel=function(a,b){this._pointerDone(),this.pointerCancel(a,b)},e.prototype.pointerCancel=function(a,b){this.emitEvent("pointerCancel",[a,b])},e.getPointerPoint=function(a){return{x:void 0!==a.pageX?a.pageX:a.clientX,y:void 0!==a.pageY?a.pageY:a.clientY}},e}),function(a,b){"function"==typeof define&&define.amd?define("unidragger/unidragger",["eventie/eventie","unipointer/unipointer"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("unipointer")):a.Unidragger=b(a,a.eventie,a.Unipointer)}(window,function(a,b,c){function d(){}function e(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function f(){}function g(){return!1}f.prototype=new c,f.prototype.bindHandles=function(){this._bindHandles(!0)},f.prototype.unbindHandles=function(){this._bindHandles(!1)};var h=a.navigator;f.prototype._bindHandles=function(a){a=void 0===a?!0:!!a;var c;c=h.pointerEnabled?function(b){b.style.touchAction=a?"none":""}:h.msPointerEnabled?function(b){b.style.msTouchAction=a?"none":""}:function(){a&&j(g)};for(var d=a?"bind":"unbind",e=0,f=this.handles.length;f>e;e++){var g=this.handles[e];this._bindStartEvent(g,a),c(g),b[d](g,"click",this)}};var i="attachEvent"in document.documentElement,j=i?function(a){"IMG"==a.nodeName&&(a.ondragstart=g);for(var b=a.querySelectorAll("img"),c=0,d=b.length;d>c;c++){var e=b[c];e.ondragstart=g}}:d;return f.prototype.pointerDown=function(a,b){this._dragPointerDown(a,b);var c=document.activeElement;c&&c.blur&&c.blur(),this._bindPostStartEvents(a),this.emitEvent("pointerDown",[a,b])},f.prototype._dragPointerDown=function(a,b){this.pointerDownPoint=c.getPointerPoint(b);var d="touchstart"==a.type,f=a.target.nodeName;d||"SELECT"==f||e(a)},f.prototype.pointerMove=function(a,b){var c=this._dragPointerMove(a,b);this.emitEvent("pointerMove",[a,b,c]),this._dragMove(a,b,c)},f.prototype._dragPointerMove=function(a,b){var d=c.getPointerPoint(b),e={x:d.x-this.pointerDownPoint.x,y:d.y-this.pointerDownPoint.y};return!this.isDragging&&this.hasDragStarted(e)&&this._dragStart(a,b),e},f.prototype.hasDragStarted=function(a){return Math.abs(a.x)>3||Math.abs(a.y)>3},f.prototype.pointerUp=function(a,b){this.emitEvent("pointerUp",[a,b]),this._dragPointerUp(a,b)},f.prototype._dragPointerUp=function(a,b){this.isDragging?this._dragEnd(a,b):this._staticClick(a,b)},f.prototype._dragStart=function(a,b){this.isDragging=!0,this.dragStartPoint=f.getPointerPoint(b),this.isPreventingClicks=!0,this.dragStart(a,b)},f.prototype.dragStart=function(a,b){this.emitEvent("dragStart",[a,b])},f.prototype._dragMove=function(a,b,c){this.isDragging&&this.dragMove(a,b,c)},f.prototype.dragMove=function(a,b,c){e(a),this.emitEvent("dragMove",[a,b,c])},f.prototype._dragEnd=function(a,b){this.isDragging=!1;var c=this;setTimeout(function(){delete c.isPreventingClicks}),this.dragEnd(a,b)},f.prototype.dragEnd=function(a,b){this.emitEvent("dragEnd",[a,b])},f.prototype.onclick=function(a){this.isPreventingClicks&&e(a)},f.prototype._staticClick=function(a,b){var c=a.target.nodeName;("INPUT"==c||"TEXTAREA"==c)&&a.target.focus(),this.staticClick(a,b)},f.prototype.staticClick=function(a,b){this.emitEvent("staticClick",[a,b])},f.getPointerPoint=function(a){return{x:void 0!==a.pageX?a.pageX:a.clientX,y:void 0!==a.pageY?a.pageY:a.clientY}},f.getPointerPoint=c.getPointerPoint,f}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/drag",["classie/classie","eventie/eventie","./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("desandro-classie"),require("eventie"),require("./flickity"),require("unidragger"),require("fizzy-ui-utils")):(a.Flickity=a.Flickity||{},a.Flickity.dragPrototype=b(a,a.classie,a.eventie,a.Flickity,a.Unidragger,a.fizzyUIUtils))}(window,function(a,b,c,d,e,f){function g(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function h(b){var c=e.getPointerPoint(b);return c.y-a.pageYOffset}f.extend(d.defaults,{draggable:!0,touchVerticalScroll:!0}),d.createMethods.push("_createDrag");var i={};f.extend(i,e.prototype),i._createDrag=function(){this.on("activate",this.bindDrag),this.on("uiChange",this._uiChangeDrag),this.on("childUIPointerDown",this._childUIPointerDownDrag),this.on("deactivate",this.unbindDrag)},i.bindDrag=function(){this.options.draggable&&!this.isDragBound&&(b.add(this.element,"is-draggable"),this.handles=[this.viewport],this.bindHandles(),this.isDragBound=!0)},i.unbindDrag=function(){this.isDragBound&&(b.remove(this.element,"is-draggable"),this.unbindHandles(),delete this.isDragBound)},i._uiChangeDrag=function(){delete this.isFreeScrolling},i._childUIPointerDownDrag=function(a){g(a),this.pointerDownFocus(a)},i.pointerDown=function(a,c){this._dragPointerDown(a,c);var d=document.activeElement;d&&d.blur&&d!=this.element&&d!=document.body&&d.blur(),this.pointerDownFocus(a),this.velocity=0,b.add(this.viewport,"is-pointer-down"),this._bindPostStartEvents(a),this.dispatchEvent("pointerDown",a,[c])};var j={touchstart:!0,MSPointerDown:!0},k={INPUT:!0,SELECT:!0};i.pointerDownFocus=function(a){!this.options.accessibility||j[a.type]||k[a.target.nodeName]||this.element.focus()},i.pointerMove=function(a,b){var c=this._dragPointerMove(a,b);this.touchVerticalScrollMove(a,b,c),this._dragMove(a,b,c),this.dispatchEvent("pointerMove",a,[b,c])},i.hasDragStarted=function(a){return!this.isTouchScrolling&&Math.abs(a.x)>3},i.pointerUp=function(a,c){delete this.isTouchScrolling,b.remove(this.viewport,"is-pointer-down"),this.dispatchEvent("pointerUp",a,[c]),this._dragPointerUp(a,c)};var l={touchmove:!0,MSPointerMove:!0};return i.touchVerticalScrollMove=function(b,c,d){var e=this.options.touchVerticalScroll,f="withDrag"==e?!e:this.isDragging||!e;!f&&l[b.type]&&!this.isTouchScrolling&&Math.abs(d.y)>10&&(this.startScrollY=a.pageYOffset,this.pointerWindowStartY=h(c),this.isTouchScrolling=!0)},i.dragStart=function(a,b){this.dragStartPosition=this.x,this.startAnimation(),this.dispatchEvent("dragStart",a,[b])},i.dragMove=function(a,b,c){g(a),this.previousDragX=this.x;var d=c.x,e=this.options.rightToLeft?-1:1;if(this.x=this.dragStartPosition+d*e,!this.options.wrapAround&&this.cells.length){var f=Math.max(-this.cells[0].target,this.dragStartPosition);this.x=this.x>f?.5*(this.x-f)+f:this.x;var h=Math.min(-this.getLastCell().target,this.dragStartPosition);this.x=this.xthis.cells[0].target&&-d=a}:function(a,b){return b>a};f(b,e)&&(d+=c,e=b,b=this.getCellDistance(-a,d),null!==b);)b=Math.abs(b);return{distance:e,index:d-c}},i.getCellDistance=function(a,b){var c=this.cells.length,d=this.options.wrapAround&&c>1,e=d?f.modulo(b,c):b,g=this.cells[e];if(!g)return null;var h=d?this.slideableWidth*Math.floor(b/c):0;return a-(g.target+h)},i.dragEndBoostSelect=function(){var a=this.getCellDistance(-this.x,this.selectedIndex);return a>0&&this.velocity<-1?1:0>a&&this.velocity>1?-1:0},i.staticClick=function(a,b){var c=this.getParentCell(a.target),d=c&&c.element,e=c&&f.indexOf(this.cells,c);this.dispatchEvent("staticClick",a,[b,d,e])},f.extend(d.prototype,i),d}),function(a,b){"function"==typeof define&&define.amd?define("tap-listener/tap-listener",["unipointer/unipointer"],function(c){return b(a,c)}):"object"==typeof exports?module.exports=b(a,require("unipointer")):a.TapListener=b(a,a.Unipointer)}(window,function(a,b){function c(a){this.bindTap(a)}c.prototype=new b,c.prototype.bindTap=function(a){a&&(this.unbindTap(),this.tapElement=a,this._bindStartEvent(a,!0))},c.prototype.unbindTap=function(){this.tapElement&&(this._bindStartEvent(this.tapElement,!0),delete this.tapElement)};var d=void 0!==a.pageYOffset;return c.prototype.pointerUp=function(c,e){var f=b.getPointerPoint(e),g=this.tapElement.getBoundingClientRect(),h=d?a.pageXOffset:document.body.scrollLeft,i=d?a.pageYOffset:document.body.scrollTop,j=f.x>=g.left+h&&f.x<=g.right+h&&f.y>=g.top+i&&f.y<=g.bottom+i;j&&this.emitEvent("tap",[c,e])},c.prototype.destroy=function(){this.pointerDone(),this.unbindTap()},c}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/prev-next-button",["eventie/eventie","./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):(a.Flickity=a.Flickity||{},a.Flickity.PrevNextButton=b(a,a.eventie,a.Flickity,a.TapListener,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a,b){this.direction=a,this.parent=b,this._create()}var g="http://www.w3.org/2000/svg",h=function(){function a(){if(void 0!==b)return b;var a=document.createElement("div");return a.innerHTML="",b=(a.firstChild&&a.firstChild.namespaceURI)==g}var b;return a}();return f.prototype=new d,f.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var a=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==a;var b=this.element=document.createElement("button");if(b.className="flickity-prev-next-button",b.className+=this.isPrevious?" previous":" next",b.setAttribute("type","button"),c.setUnselectable(b),h()){var d=this.createSVG();b.appendChild(d)}else this.setArrowText(),b.className+=" no-svg";var e=this;this.onCellSelect=function(){e.update()},this.parent.on("cellSelect",this.onCellSelect),this.on("tap",this.onTap),this.on("pointerDown",function(a,b){e.parent.childUIPointerDown(b)})},f.prototype.activate=function(){this.update(),this.bindTap(this.element),b.bind(this.element,"click",this),this.parent.element.appendChild(this.element)},f.prototype.deactivate=function(){this.parent.element.removeChild(this.element),d.prototype.destroy.call(this),b.unbind(this.element,"click",this)},f.prototype.createSVG=function(){var a=document.createElementNS(g,"svg");a.setAttribute("viewBox","0 0 100 100");var b=document.createElementNS(g,"path");b.setAttribute("d","M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z"),b.setAttribute("class","arrow");var c=this.isLeft?"translate(15,0)":"translate(85,100) rotate(180)";return b.setAttribute("transform",c),a.appendChild(b),a},f.prototype.setArrowText=function(){var a=this.parent.options,b=this.isLeft?a.leftArrowText:a.rightArrowText;e.setText(this.element,b)},f.prototype.onTap=function(){if(this.isEnabled){this.parent.uiChange();var a=this.isPrevious?"previous":"next";this.parent[a]()}},f.prototype.handleEvent=e.handleEvent,f.prototype.onclick=function(){var a=document.activeElement;a&&a==this.element&&this.onTap()},f.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},f.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},f.prototype.update=function(){var a=this.parent.cells;if(this.parent.options.wrapAround&&a.length>1)return void this.enable();var b=a.length?a.length-1:0,c=this.isPrevious?0:b,d=this.parent.selectedIndex==c?"disable":"enable";this[d]()},f.prototype.destroy=function(){this.deactivate()},e.extend(c.defaults,{prevNextButtons:!0,leftArrowText:"‹",rightArrowText:"›"}),c.createMethods.push("_createPrevNextButtons"),c.prototype._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new f(-1,this),this.nextButton=new f(1,this),this.on("activate",this.activatePrevNextButtons))},c.prototype.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},c.prototype.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},c.PrevNextButton=f,f}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/page-dots",["eventie/eventie","./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):(a.Flickity=a.Flickity||{},a.Flickity.PageDots=b(a,a.eventie,a.Flickity,a.TapListener,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){this.parent=a,this._create()}return f.prototype=new d,f.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",c.setUnselectable(this.holder),this.dots=[];var a=this;this.onCellSelect=function(){a.updateSelected()},this.parent.on("cellSelect",this.onCellSelect),this.on("tap",this.onTap),this.on("pointerDown",function(b,c){a.parent.childUIPointerDown(c)})},f.prototype.activate=function(){this.setDots(),this.updateSelected(),this.bindTap(this.holder),this.parent.element.appendChild(this.holder)},f.prototype.deactivate=function(){this.parent.element.removeChild(this.holder),d.prototype.destroy.call(this)},f.prototype.setDots=function(){var a=this.parent.cells.length-this.dots.length;a>0?this.addDots(a):0>a&&this.removeDots(-a)},f.prototype.addDots=function(a){for(var b=document.createDocumentFragment(),c=[];a;){var d=document.createElement("li");d.className="dot",b.appendChild(d),c.push(d),a--}this.holder.appendChild(b),this.dots=this.dots.concat(c)},f.prototype.removeDots=function(a){for(var b=this.dots.splice(this.dots.length-a,a),c=0,d=b.length;d>c;c++){var e=b[c];this.holder.removeChild(e)}},f.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot"),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected")},f.prototype.onTap=function(a){var b=a.target;if("LI"==b.nodeName){this.parent.uiChange();var c=e.indexOf(this.dots,b);this.parent.select(c)}},f.prototype.destroy=function(){this.deactivate()},c.PageDots=f,e.extend(c.defaults,{pageDots:!0}),c.createMethods.push("_createPageDots"),c.prototype._createPageDots=function(){this.options.pageDots&&(this.pageDots=new f(this),this.on("activate",this.activatePageDots),this.on("cellAddedRemoved",this.onCellAddedRemovedPageDots),this.on("deactivate",this.deactivatePageDots))},c.prototype.activatePageDots=function(){this.pageDots.activate()},c.prototype.onCellAddedRemovedPageDots=function(){this.pageDots.setDots()},c.prototype.deactivatePageDots=function(){this.pageDots.deactivate()},c.PageDots=f,f}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/player",["eventEmitter/EventEmitter","eventie/eventie","./flickity"],function(a,c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(require("wolfy87-eventemitter"),require("eventie"),require("./flickity")):(a.Flickity=a.Flickity||{},a.Flickity.Player=b(a.EventEmitter,a.eventie,a.Flickity))}(window,function(a,b,c){function d(a){if(this.isPlaying=!1,this.parent=a,f){var b=this;this.onVisibilityChange=function(){b.visibilityChange()}}}var e,f;return"hidden"in document?(e="hidden",f="visibilitychange"):"webkitHidden"in document&&(e="webkitHidden",f="webkitvisibilitychange"),d.prototype=new a,d.prototype.play=function(){this.isPlaying=!0,delete this.isPaused,f&&document.addEventListener(f,this.onVisibilityChange,!1),this.tick()},d.prototype.tick=function(){if(this.isPlaying&&!this.isPaused){this.tickTime=new Date;var a=this.parent.options.autoPlay;a="number"==typeof a?a:3e3;var b=this;this.timeout=setTimeout(function(){b.parent.next(!0),b.tick()},a)}},d.prototype.stop=function(){this.isPlaying=!1,delete this.isPaused,this.clear(),f&&document.removeEventListener(f,this.onVisibilityChange,!1)},d.prototype.clear=function(){clearTimeout(this.timeout)},d.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this.clear())},d.prototype.unpause=function(){this.isPaused&&this.play()},d.prototype.visibilityChange=function(){var a=document[e];this[a?"pause":"unpause"]()},c.createMethods.push("_createPlayer"),c.prototype._createPlayer=function(){this.player=new d(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},c.prototype.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),b.bind(this.element,"mouseenter",this),this.isMouseenterBound=!0)},c.prototype.stopPlayer=function(){this.player.stop()},c.prototype.deactivatePlayer=function(){this.player.stop(),this.isMouseenterBound&&(b.unbind(this.element,"mouseenter",this),delete this.isMouseenterBound)},c.prototype.onmouseenter=function(){this.player.pause(),b.bind(this.element,"mouseleave",this)},c.prototype.onmouseleave=function(){this.player.unpause(),b.unbind(this.element,"mouseleave",this)},c.Player=d,d}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/add-remove-cell",["./flickity","fizzy-ui-utils/utils"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("./flickity"),require("fizzy-ui-utils")):(a.Flickity=a.Flickity||{},a.Flickity=b(a,a.Flickity,a.fizzyUIUtils))}(window,function(a,b,c){function d(a){for(var b=document.createDocumentFragment(),c=0,d=a.length;d>c;c++){var e=a[c];b.appendChild(e.element)}return b}return b.prototype.insert=function(a,b){var c=this._makeCells(a);if(c&&c.length){var e=this.cells.length;b=void 0===b?e:b;var f=d(c),g=b==e;if(g)this.slider.appendChild(f);else{var h=this.cells[b].element;this.slider.insertBefore(f,h)}if(0===b)this.cells=c.concat(this.cells);else if(g)this.cells=this.cells.concat(c);else{var i=this.cells.splice(b,e-b);this.cells=this.cells.concat(c).concat(i)}this._sizeCells(c);var j=b>this.selectedIndex?0:c.length;this._cellAddedRemoved(b,j)}},b.prototype.append=function(a){this.insert(a,this.cells.length)},b.prototype.prepend=function(a){this.insert(a,0)},b.prototype.remove=function(a){var b,d,e,f=this.getCells(a),g=0;for(b=0,d=f.length;d>b;b++){e=f[b];var h=c.indexOf(this.cells,e)b;b++)e=f[b],e.remove(),c.removeFrom(this.cells,e);f.length&&this._cellAddedRemoved(0,g)},b.prototype._cellAddedRemoved=function(a,b){b=b||0,this.selectedIndex+=b,this.selectedIndex=Math.max(0,Math.min(this.cells.length-1,this.selectedIndex)),this.emitEvent("cellAddedRemoved",[a,b]),this.cellChange(a)},b.prototype.cellSizeChange=function(a){var b=this.getCell(a);if(b){b.getSize();var d=c.indexOf(this.cells,b);this.cellChange(d)}},b.prototype.cellChange=function(a){a=a||0,this._positionCells(a),this._getWrapShiftCells(),this.setGallerySize(),this.options.freeScroll?this.positionSlider():(this.positionSliderAtSelected(),this.select(this.selectedIndex))},b}),function(a,b){"function"==typeof define&&define.amd?define("flickity/js/index",["./flickity","./drag","./prev-next-button","./page-dots","./player","./add-remove-cell"],b):"object"==typeof exports&&(module.exports=b(require("./flickity"),require("./drag"),require("./prev-next-button"),require("./page-dots"),require("./player"),require("./add-remove-cell")))}(window,function(a){return a}),function(a,b){"function"==typeof define&&define.amd?define("flickity-as-nav-for/as-nav-for",["classie/classie","flickity/js/index","fizzy-ui-utils/utils"],function(c,d,e){return b(a,c,d,e)}):"object"==typeof exports?module.exports=b(a,require("desandro-classie"),require("flickity"),require("fizzy-ui-utils")):a.Flickity=b(a,a.classie,a.Flickity,a.fizzyUIUtils)}(window,function(a,b,c,d){return c.createMethods.push("_createAsNavFor"),c.prototype._createAsNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);var a=this.options.asNavFor;if(a){var b=this;setTimeout(function(){b.setNavCompanion(a)})}},c.prototype.setNavCompanion=function(a){a=d.getQueryElement(a);var b=c.data(a);if(b&&b!=this){this.navCompanion=b;var e=this;this.onNavCompanionSelect=function(){e.navCompanionSelect()},b.on("cellSelect",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect()}},c.prototype.navCompanionSelect=function(){if(this.navCompanion){var a=this.navCompanion.selectedIndex;this.select(a),this.removeNavSelectedElement(),this.selectedIndex==a&&(this.navSelectedElement=this.cells[a].element,b.add(this.navSelectedElement,"is-nav-selected"))}},c.prototype.activateAsNavFor=function(){this.navCompanionSelect()},c.prototype.removeNavSelectedElement=function(){this.navSelectedElement&&(b.remove(this.navSelectedElement,"is-nav-selected"),delete this.navSelectedElement)},c.prototype.onNavStaticClick=function(a,b,c,d){"number"==typeof d&&this.navCompanion.select(d)},c.prototype.deactivateAsNavFor=function(){this.removeNavSelectedElement()},c.prototype.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("cellSelect",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},c}),function(a,b){"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["eventEmitter/EventEmitter","eventie/eventie"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("eventie")):a.imagesLoaded=b(a,a.EventEmitter,a.eventie)}(window,function(a,b,c){function d(a,b){for(var c in b)a[c]=b[c];return a}function e(a){return"[object Array]"===m.call(a)}function f(a){var b=[];if(e(a))b=a;else if("number"==typeof a.length)for(var c=0,d=a.length;d>c;c++)b.push(a[c]);else b.push(a);return b}function g(a,b,c){if(!(this instanceof g))return new g(a,b);"string"==typeof a&&(a=document.querySelectorAll(a)),this.elements=f(a),this.options=d({},this.options),"function"==typeof b?c=b:d(this.options,b),c&&this.on("always",c),this.getImages(),j&&(this.jqDeferred=new j.Deferred);var e=this;setTimeout(function(){e.check()})}function h(a){this.img=a}function i(a){this.src=a,n[a]=this}var j=a.jQuery,k=a.console,l="undefined"!=typeof k,m=Object.prototype.toString;g.prototype=new b,g.prototype.options={},g.prototype.getImages=function(){this.images=[];for(var a=0,b=this.elements.length;b>a;a++){var c=this.elements[a];"IMG"===c.nodeName&&this.addImage(c);var d=c.nodeType;if(d&&(1===d||9===d||11===d))for(var e=c.querySelectorAll("img"),f=0,g=e.length;g>f;f++){var h=e[f];this.addImage(h)}}},g.prototype.addImage=function(a){var b=new h(a);this.images.push(b)},g.prototype.check=function(){function a(a,e){return b.options.debug&&l&&k.log("confirm",a,e),b.progress(a),c++,c===d&&b.complete(),!0}var b=this,c=0,d=this.images.length;if(this.hasAnyBroken=!1,!d)return void this.complete();for(var e=0;d>e;e++){var f=this.images[e];f.on("confirm",a),f.check()}},g.prototype.progress=function(a){this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded;var b=this;setTimeout(function(){b.emit("progress",b,a),b.jqDeferred&&b.jqDeferred.notify&&b.jqDeferred.notify(b,a)})},g.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var b=this;setTimeout(function(){if(b.emit(a,b),b.emit("always",b),b.jqDeferred){var c=b.hasAnyBroken?"reject":"resolve";b.jqDeferred[c](b)}})},j&&(j.fn.imagesLoaded=function(a,b){var c=new g(this,a,b);return c.jqDeferred.promise(j(this))}),h.prototype=new b,h.prototype.check=function(){var a=n[this.img.src]||new i(this.img.src);if(a.isConfirmed)return void this.confirm(a.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var b=this;a.on("confirm",function(a,c){return b.confirm(a.isLoaded,c),!0}),a.check()},h.prototype.confirm=function(a,b){this.isLoaded=a,this.emit("confirm",this,b)};var n={};return i.prototype=new b,i.prototype.check=function(){if(!this.isChecked){var a=new Image;c.bind(a,"load",this),c.bind(a,"error",this),a.src=this.src,this.isChecked=!0}},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(a){this.confirm(!0,"onload"),this.unbindProxyEvents(a)},i.prototype.onerror=function(a){this.confirm(!1,"onerror"),this.unbindProxyEvents(a)},i.prototype.confirm=function(a,b){this.isConfirmed=!0,this.isLoaded=a,this.emit("confirm",this,b)},i.prototype.unbindProxyEvents=function(a){c.unbind(a.target,"load",this),c.unbind(a.target,"error",this)},g}),function(a,b){"function"==typeof define&&define.amd?define(["flickity/js/index","imagesloaded/imagesloaded"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("flickity"),require("imagesloaded")):a.Flickity=b(a,a.Flickity,a.imagesLoaded)}(window,function(a,b,c){return b.createMethods.push("_createImagesLoaded"),b.prototype._createImagesLoaded=function(){this.on("activate",this.imagesLoaded)},b.prototype.imagesLoaded=function(){function a(a,c){var d=b.getParentCell(c.img);b.cellSizeChange(d&&d.element)}if(this.options.imagesLoaded){var b=this;this.loader=c(this.slider).on("progress",a)}},b});var Loader=Loader||function(){function a(a,b){this.assets={},this.images=[],this.readyCallback=a,this.count=0,this.view=b,this.loaded=!1}return a.prototype.register=function(a){this.assets[a]=!1,this.count+=1},a.prototype.ready=function(a){window.debug&&console.log("ready >> "+a),this.assets[a]=!0,this.loaded||(this.view&&this.view.update(this.percentRemaining()),this.isReady()&&(this.loaded=!0,this.view?this.view&&this.view.finish(this.readyCallback):this.readyCallback&&this.readyCallback()))},a.prototype.isReady=function(){for(var a in this.assets)if(this.assets.hasOwnProperty(a)&&1!=this.assets[a])return!1;return!0},a.prototype.percentRemaining=function(){return this.remainingAssets()/this.count},a.prototype.remainingAssets=function(){var a=0;for(var b in this.assets)this.assets.hasOwnProperty(b)&&1!=this.assets[b]&&a++;return a},a.prototype.preloadImages=function(a){this.register("preload");for(var b=0;b");e.load(b+" .entry",function(){display_entry(e.children()[0])})}}}),$("nav .about").click(function(a){if(a.preventDefault(),!done_loading||"#/about"!=window.location.hash){window.location.hash="#/about",$("nav a.active").removeClass("active"),open_entry(),$("#entry_container").removeClass("visible");var b=$("
");b.load("/about/ .entry",function(){console.log(b.html()),display_entry(b.children()[0])})}}),$(".toggleRapper").click(toggle_menu),$(document).on("click",".project",function(){var a="/"+$(this).data("type")+"/"+$(this).data("id");$(".entry").css("pointer-events","none"),load_hash(a)}),$(".toplogo,.logo").click(function(a){a.preventDefault(),$(".active").removeClass("active"),$(".cat.active, .sub.active, .sub.a").addClass("active"),controls.pause(),window.location.hash="#",load_index()}),Share.init(),$(window).mousedown(function(a){menu_open||(controls.pause(),controls.opt.ease=10)}),$(window).mouseup(function(a){menu_open||controls.pause(),controls.opt.ease=100}),$(window).mousemove(function(a){if(!menu_open&&!controls.dragging){var b=a.pageX/window.innerWidth,c=pow(abs(2*(b-.5)),.5),d=a.pageY/window.innerHeight,e=pow(abs(2*(d-.5)),.5),f=dist(c,e,0,0);controls.zoomPercent(clamp(f-.3,0,1)),controls.move(b*TWO_PI*4,PI/2+(1-d)*TWO_PI*4)}}),$("body").removeClass("loading");var a=window.location.hash.replace("#","");$("nav a").each(function(){var a="/"+$(this).data("type")+"/"+$(this).data("id");hashes[a]=this,$(this).data("hash",a)}),hashes["/about"]=$("nav .about"),a in hashes?(toggle_menu(!1),load_hash(a),setTimeout(build_scene,200)):(build_scene(),setTimeout(function(){$("#scene").removeClass("fade")},100)),setTimeout(function(){done_loading=!0},200),$(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",function(){function a(a){a?$("html").addClass("full-screen"):$("html").removeClass("full-screen"),resize_gallery(a)}onFullScreenSettle(requestAnimationFrame,getFullScreenElement(),a)}),$("#scene_container").click(function(a){$("body").hasClass("menuActive")||$(".entry").length||toggle_menu()}),is_desktop&&($(document).on("mouseenter",".project",function(){var a=$(this).data("type");$(".entry").addClass("hover"),$(this).addClass("hover"),$(".top .cat").not("[data-type="+a+"]").addClass("no-hover"),$(".cat[data-type="+a+"]").addClass("hover")}),$(document).on("mouseleave",".project",function(){$(this).data("type");$(".entry").removeClass("hover"),$(this).removeClass("hover"),$(".cat").removeClass("hover").removeClass("no-hover")}))};var entry_open_time=0,gallery=null,videos=[];environment.update=noop,environment.updateOnReady=function(a){controls.delta(menu_open?0:1/16,0),scene.update(),controls.update()};var Strip=function(a){this.opt=a;var b=this.root=new MX.Object3D;b.x=a.x||0,b.y=a.y||0,b.z=a.z||0,b.rotationX=a.rotationX||0,b.rotationY=a.rotationY||0,b.rotationZ=a.rotationZ||0,b.addTo(scene);var c=b;this.els=(a.images.toArray?a.images.toArray():a.images).map(function(a,b){var d;if("string"==typeof a)d=a;else{var e=$(a).data();d=e.image}var a=new MX.Image({src:d,onload:function(a){}});return a.setCSSTransformOrigin("50% 100%"),a.addTo(c),a.update(),c=a,a})};Strip.prototype.update=function(a){var b=this.els.length,c=this.opt.offset;a+=c,this.els.forEach(function(c,d){c.rotationX=d/b*Math.PI*2,c.skewY=cos(2*(1+d)*Math.PI*a/1e5+100)/10,c.y=c.height/2})};var Share={init:function(){$(document).on("click",".fb",Share.facebook),$(document).on("click",".tw",Share.twitter),setTimeout(function(){window.fbAsyncInit=function(){FB.init({appId:"643786815755427",xfbml:!0,version:"v2.3"})},function(a,b,c){var d,e=a.getElementsByTagName(b)[0];a.getElementById(c)||(d=a.createElement(b),d.id=c,d.src="//connect.facebook.net/en_US/sdk.js",e.parentNode.insertBefore(d,e))}(document,"script","facebook-jssdk")},1e3)},facebook:function(a){a.preventDefault(),FB.ui({method:"feed",link:window.location.href,caption:$(".postname").html(),picture:$(".gallery img").first().attr("src")},function(a){})},twitter:function(a){a.preventDefault();var b=window.location.href,c=$(".postname").html(),d="https://twitter.com/home?status="+encodeURIComponent(c+" "+b);window.open(d,"_blank")}};$("html").addClass(is_mobile?"mobile":"desktop");var scene,cam,map,app=new function(){};app.mode={editor:!1,builder:!1},app.init=function(){app.launch()},app.launch=function(){function a(c){b=c,requestAnimationFrame(a),environment.update(c)}$("html").addClass($.browser.msie?"msie":"notmsie"),scene=(new MX.Scene).addTo("#scene"),$(window).resize(app.resize),app.resize(),cam=scene.camera;var b=0;FastClick.attach(document.body),window.environment&&window.environment.init(),a(),window.scrollTo(0,0)},app.resize=function(){scene.width=window.innerWidth,scene.height=window.innerHeight,scene.perspective=min(window.innerWidth,scene.height),scene.update()},app.fallback=function(){app.unsupported=!0;var a="Sorry, your browser is not supported.

Please use Chrome or Safari or Firefox.",b=$("
");b.attr("id","fallback"),b.html(a),$("body").append(b)},app.on=function(){app.tube.on.apply(app.tube,arguments)},app.off=function(){app.tube.off.apply(app.tube,arguments)},app.position=function(a){var b={x:a.x,y:a.y,z:a.z,rotationX:a.rotationX,rotationY:a.rotationY};return 1!==a.scale&&(b.scale=a.scale),b},document.addEventListener("DOMContentLoaded",app.init); \ No newline at end of file -- cgit v1.2.3-70-g09d2 From de1b9e99923f5c8892b1f28ab5e8d53bee8c39e7 Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Mon, 18 May 2015 23:00:41 -0400 Subject: Add deploy deps + instructions --- package.json | 1 + site/DEPLOY | 21 +++++++++++++++++++++ site/TODO | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 site/DEPLOY create mode 100644 site/TODO (limited to 'site') diff --git a/package.json b/package.json index 4336556..a8a602f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "express": "^4.12.3", "grunt-dentist": "^0.3.4", "object-assign": "^2.0.0", + "pm2": "^0.12.15", "q": "^1.2.0" }, "devDependencies": { diff --git a/site/DEPLOY b/site/DEPLOY new file mode 100644 index 0000000..cedf761 --- /dev/null +++ b/site/DEPLOY @@ -0,0 +1,21 @@ +To deploy +=== + +`npm bin`/pm2 start index.js + +--- + +The `npm bin` bit resolves the path to the locally installed `pm2` +command. Could also use a global install. + +`npm bin`/pm2 logs + +to see logs and + +`npm bin`/pm2 list + +to see running processes and + +`npm bin`/pm2 show [id] + +for more process info diff --git a/site/TODO b/site/TODO new file mode 100644 index 0000000..c519946 --- /dev/null +++ b/site/TODO @@ -0,0 +1,2 @@ +This really should be in its own repo +At very least, it should have its own package.json -- cgit v1.2.3-70-g09d2 From fb5c451361916593edf39ed5f3614984dc29a36d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 27 May 2015 13:22:13 -0400 Subject: box --- site/db.json | 3 ++- site/index.js | 1 + site/public/assets/style.css | 4 ++-- site/templates/about.liquid | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 010ad37..16a689a 100644 --- a/site/db.json +++ b/site/db.json @@ -1139,7 +1139,8 @@ "image": "http://www.lansdowneresort.com/meetings/assets/images/masthead/meetings-team-building.jpg", "__index": "1", "contact": "FOR BRANDS WHO WANT TO PLAY WITH US, SAY HELLO!\r\n\r\nFOR ANYONE WHO WANTS TO JOIN OUR FAMILY, SHOW US WHAT YOU ARE MADE OF!\r\n\r\nWEBSITE BY OKFOCUS", - "dateCreated": "" + "dateCreated": "", + "collabs": "\"NONE OF US IS AS SMART AS ALL OF US\"\r\n\r\nWE MAKE THINGS WITH OUR FRIENDS:\r\n\r\nMERI MEDIA\r\nOKFOCUS\r\nMARK FOSTER GAGE ARCHITECTS\r\nMOVING IMAGE & CONTENT\r\nNR2154\r\nTABLE OF CONTENTS\r\nTAKE OUT MEDIA\r\nSHADES OF GREY" }, { "id": "contact", diff --git a/site/index.js b/site/index.js index 8952c46..aa1f58c 100644 --- a/site/index.js +++ b/site/index.js @@ -25,6 +25,7 @@ var app = okcms.createApp({ id: {type: 'string', hidden: true}, title: {type: 'string'}, body: {type: 'text'}, + collabs: {type: 'text'}, contact: {type: 'text'}, image: {type: 'string'} }, diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 3443642..6fbf74f 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -842,11 +842,11 @@ nav .sub.active a { float: left; } .brady div { - width: 17vw; + width: 17.1vw; position: relative; display: block; float: left; - padding: 1vw; + padding: 1vw 0.5vw 1vw 0.5vw; font-size: 0.8vw; line-height: 1.4vw; border: 1px solid black; diff --git a/site/templates/about.liquid b/site/templates/about.liquid index c693b61..14c046e 100644 --- a/site/templates/about.liquid +++ b/site/templates/about.liquid @@ -3,6 +3,7 @@
{{page.body | newline_to_br}}
{% for image in shape.images %}{{ image.label }}{% endfor %} +
{{page.collabs | newline_to_br}}
{{page.contact | newline_to_br}}
-- cgit v1.2.3-70-g09d2 From 1dfbf71af1776bbb913a65d6d9a0c5e6b0fadd46 Mon Sep 17 00:00:00 2001 From: two hustlers proj Date: Wed, 27 May 2015 13:26:28 -0400 Subject: db --- site/db.json | 76 ++++++++++++++++++++++++------------------------------------ 1 file changed, 30 insertions(+), 46 deletions(-) (limited to 'site') diff --git a/site/db.json b/site/db.json index 010ad37..0443362 100644 --- a/site/db.json +++ b/site/db.json @@ -10,7 +10,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F999cc7cf-225e-4003-aef0-e7d7f75720d9.jpg", "caption": "" }, - "__index": "0", + "__index": 0, "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F035e6b07-4f42-4f84-af57-d42aee71a90d.jpg", @@ -47,7 +47,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5990399b-8d25-4b46-8e00-6417ecfa4ad6.jpg", "caption": "" }, - "__index": "1", + "__index": 2, "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F3e2d6814-1fe4-4121-8b86-4aa4983bd319.jpg", @@ -85,10 +85,6 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F1dc7e122-a12b-47c8-a65d-80fc67b54239.jpg", "caption": "" }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe114fd65-4470-4ba9-85fb-605d219383f0.jpg", - "caption": "" - }, { "type": "vimeo", "token": "99641686", @@ -108,7 +104,8 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F478a842b-49ff-4a8c-b192-adeadb2410bf.jpg", "caption": "" }, - "__index": "2" + "__index": 4, + "dateCreated": "" }, { "id": "gaga-s-workshop-barneys-new-york", @@ -119,7 +116,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F263c4280-b4d7-4aa5-91c7-c64558834560.jpg", "caption": "" }, - "__index": "3", + "__index": 6, "media": [ { "type": "vimeo", @@ -176,7 +173,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F69fac98e-30ae-48b9-a312-bc8803138a71.jpg", "caption": "" }, - "__index": "2" + "__index": 5 }, { "id": "diesel-venice-twitter", @@ -207,7 +204,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fff7fe24f-85a9-4004-b5e7-677538b7c62d.jpg", "caption": "" }, - "__index": "1" + "__index": 3 }, { "id": "pepsi-challenge-2015-ignite-the-light", @@ -218,7 +215,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F5784676b-a3c8-4103-8245-708a666f3317.jpg", "caption": "" }, - "__index": "0", + "__index": 1, "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F29d6ced3-53cf-4d19-9a31-e9f30fdb10f8.jpg", @@ -277,7 +274,7 @@ "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F42732767-2c29-452c-b6bf-7e5554bbfbb7.jpg", "caption": "" }, - "__index": "4" + "__index": 7 } ], "content": [ @@ -308,7 +305,7 @@ "id": "mugler-womenswear-spring-summer-2012", "title": "MUGLER WOMENSWEAR SPRING/SUMMER 2012", "menu": "MUGLER WOMENSWEAR S/S 2012", - "description": "MADE WITH MUGLER + LADY GAGA + INEZ & VINOODH + MSN + FACEBOOK", + "description": "MADE WITH MUGLER + LADY GAGA + INEZ & VINOODH + SOUNDCLOUD ", "thumbnail": { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Faa8a1207-00ec-4a45-8412-63bf90605569.jpg", "caption": "" @@ -321,7 +318,8 @@ "title": "MUGLER, SS12 GAGA FILM PREMIERE", "thumb": "http://i.vimeocdn.com/video/349239691_640.jpg" } - ] + ], + "dateCreated": "" }, { "id": "gilt-lady-gaga", @@ -1051,34 +1049,15 @@ "__index": "8", "media": [ { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F3881f13f-f9b0-4ac7-9fd3-b6f4a64faac2.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Ffef0d125-7ae6-434b-bbef-104df65f0ea2.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2b9fe261-f936-40ff-aab5-e92f4bc89590.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F40f39f2a-0cd2-4d5c-898c-491214d20a82.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fe0387464-5fa1-4b35-8cc0-0cd3d97be264.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Ff069bfd9-1b38-49c7-8977-8c44a6aeb447.jpg", "caption": "" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fdc30b6e9-c5e3-4ad9-ab83-79be9f313630.jpg", - "caption": "" - }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Ffaf9f748-5d70-4511-a8f3-4976b0964ce7.jpg", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F3881f13f-f9b0-4ac7-9fd3-b6f4a64faac2.jpg", "caption": "" } - ] + ], + "dateCreated": "" }, { "id": "diesel-accessories-2014", @@ -1245,7 +1224,7 @@ "caption": "tracy@twohustlers.com" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F742c60d2-9f3f-44bb-a445-71871ca28439.gif", + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F05af3d86-b78d-44aa-a416-0b225bcffc16.gif", "label": "Tyler Rose", "caption": "tyler@nicopanda.com" }, @@ -1255,9 +1234,9 @@ "caption": "max@twohustlers.com" }, { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F71c71033-d36f-4375-bdd1-271db3b9e75c.gif", - "label": "Zak Krevitt", - "caption": "zak@twohustlers.com" + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F343ae47e-8669-4c57-9975-e4c3fc5a02d4.gif", + "label": "Steve Gershman", + "caption": "steve@twohustlers.com" }, { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F2b71ee1e-3de9-4a3d-9b39-a96065ae4ec1.gif", @@ -1274,11 +1253,6 @@ "label": "Daniel Cingari", "caption": "daniel@twohustlers.com" }, - { - "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F343ae47e-8669-4c57-9975-e4c3fc5a02d4.gif", - "label": "Steve Gershman", - "caption": "steve@twohustlers.com" - }, { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F55f0fef9-bc7c-4dbe-baa8-c0d74c9c9ab0.gif", "label": "Latif Newab", @@ -1309,10 +1283,20 @@ "label": "Frankie The Pug", "caption": "info@twohustlers.com" }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F71c71033-d36f-4375-bdd1-271db3b9e75c.gif", + "label": "Zak Krevitt", + "caption": "zak@twohustlers.com" + }, { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F7ee0e3d4-4312-41dc-8fff-943b68ae6171.gif", "label": "Angelo Balassone", "caption": "angelo@twohustlers.com" + }, + { + "uri": "https://ltho.s3.amazonaws.com/twohustlers%2F13c46353-6ed8-4724-85cb-a35e55976710.jpg", + "label": "", + "caption": "" } ], "dateCreated": "" -- cgit v1.2.3-70-g09d2 From ccafdf24213ffe0d303cf8cc5bf11325a84751cc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 27 May 2015 16:08:56 -0400 Subject: deviceorientation stuff --- Gruntfile.js | 1 + site/public/assets/javascripts/_env.js | 28 ++- .../mx/extensions/mx.unclampedOrbitCameraMobile.js | 225 +++++++++++++++++++++ site/templates/index.liquid | 1 + 4 files changed, 247 insertions(+), 8 deletions(-) create mode 100644 site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCameraMobile.js (limited to 'site') diff --git a/Gruntfile.js b/Gruntfile.js index b32e6ad..bb6f1eb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,6 +12,7 @@ module.exports = function(grunt) { "site/public/assets/javascripts/mx/mx.skew.js", "site/public/assets/javascripts/mx/extensions/mx.scene.js", "site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCamera.js", + "site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCameraMobile.js", "site/public/assets/javascripts/mx/primitives/mx.image.js", "site/public/assets/javascripts/vendor/jquery.min.js", diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index dee524c..6748409 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -74,14 +74,26 @@ environment.init = function(){ environment.ready = function(){ if (window.innerWidth < 500) document.body.classList.add('mobile') - controls = new MX.OrbitCamera({ - radius: 100000, - radiusRange: [ 10, 2000 ], - rotationX: PI/2, - rotationY: PI, - wheelEase: 20, - ease: 100 - }) + if (is_mobile) { + controls = new MX.OrbitCameraMobile({ + radius: 100000, + radiusRange: [ 10, 2000 ], + rotationX: PI/2, + rotationY: PI, + wheelEase: 20, + ease: 100 + }) + } + else { + controls = new MX.OrbitCamera({ + radius: 100000, + radiusRange: [ 10, 2000 ], + rotationX: PI/2, + rotationY: PI, + wheelEase: 20, + ease: 100 + }) + } controls.init() $('.cat').click( function(){ diff --git a/site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCameraMobile.js b/site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCameraMobile.js new file mode 100644 index 0000000..510a002 --- /dev/null +++ b/site/public/assets/javascripts/mx/extensions/mx.unclampedOrbitCameraMobile.js @@ -0,0 +1,225 @@ +MX.OrbitCameraMobile = function(opt){ + var exports = {}, bound = false + exports.opt = opt = defaults(opt, { + el: window, // object to bind events on + camera: scene.camera, // camera object we'll be moving + radius: 100, + radiusRange: [ 10, 1000 ], + rotationX: PI/2, + rotationY: 0, + center: { x: 0, y: 0, z: 0 }, + sensitivity: 10, // moving 1 pixel is like moving N radians + wheelSensitivity: 10, + ease: 10, + wheelEase: 10, + }) + var rx, ry, radius, px, py, epsilon = 1e-10 + var rotationSum = 0 + var rotationMedian = 0 + var orientationMax = 0 + var samples = 0 + var sampleThreshold = 20 + var lastAlpha + + exports.dragging = false + exports.init = function(){ + ry = opt.rotationY + rx = opt.rotationX + radius = opt.radius + exports.wheel = new wheel({ + el: opt.el, + update: function(e, delta){ + opt.radius = clamp( opt.radius + delta * opt.wheelSensitivity, opt.radiusRange[0], opt.radiusRange[1] ) + }, + }) + exports.bind() + + exports.orientationchange() + } + exports.toggle = function(state){ + if (state) exports.bind() + else exports.unbind() + } + exports.bind = function(){ + if (bound) return; + bound = true + opt.el.addEventListener("touchstart", touch(down)) + window.addEventListener("touchmove", touch(move)) + window.addEventListener("touchend", touch(up)) + + window.addEventListener('orientationchange', exports.orientationchange) + window.addEventListener("devicemotion", exports.devicemotion) + window.addEventListener("deviceorientation", exports.deviceorientation) + + exports.wheel.unlock() + } + exports.unbind = function(){ + if (! bound) return; + bound = false + exports.wheel.lock() + } + function cancelable (fn) { + return function(e){ + e.preventDefault() + fn(e) + } + } + function touch (fn){ + return function(e){ + fn(e.touches[0]) + } + } + function down (e) { + px = e.pageX + py = e.pageY + exports.dragging = true + } + function move (e) { + if (! exports.dragging) return + exports.delta(px- e.pageX, py - e.pageY) + px = e.pageX + py = e.pageY + } + function up (e) { + exports.dragging = false + } + + exports.orientationchange = function(e){ + is_portrait = window.innerWidth < window.innerHeight + if (is_portrait) { + lastAlpha = 0 + } + } + exports.devicemotion = function(e) { + if (! is_portrait) return; + var rotationBeta = e.rotationRate.alpha; // weird! + rotationSum += rotationBeta; + samples += 1; + } + exports.deviceorientation = function (e) { + if (! lastAlpha) { lastAlpha = e.alpha } + is_portrait ? exports.portraitorientation(e) : exports.landscapeorientation(e) + } + exports.portraitorientation = function(e) { + // compass gives most accurate orientation in portrait mode + var alpha, dx = 0, dy = 0 + + if (e.webkitCompassHeading) { + alpha = 180 - e.webkitCompassHeading; + } + else { + alpha = 180 - e.alpha; + } + + // android rotates in reverse + if (is_android) { + alpha = 360 - alpha + } + + // use rotationRate to gauge if we've tilted the screen past vertical + // for looking at ceiling + if (e.beta > orientationMax) { + orientationMax = e.beta + rotationMedian = rotationSum + } + + // this number was only going to 83 max.. not 90.. weird + var beta = e.beta + 7; + + // if we've got enough motion data, we should be able to determine + // if we've tilted backwards. otherwise, lock to the horizon. + if (! is_android && samples > sampleThreshold) { + dx = rotationSum > rotationMedian ? e.beta - 90 : 90 - e.beta + } + else { + dx = 0 + } + + // avoid jumping around in a circle + if (Math.abs(alpha - lastAlpha) < 100 || Math.abs(alpha - lastAlpha) > 300) { + dy = alpha - lastAlpha + lastAlpha = alpha + } + + // avoid jumping around in a circle #2 + if (dy > 300) { + dy -= 360 + } else if (dy < -300) { + dy += 360 + } + opt.rotationX = MX.toRad(dx * -5) + opt.rotationY += MX.toRad(dy * 10) + } + exports.landscapeorientation = function (e) { + var dx, dy + + dx = e.gamma > 0 ? 90 - e.gamma : 90 + e.gamma + dy = e.alpha - lastAlpha + lastAlpha = e.alpha + + // avoid the sudden jump from 0 to -360 + if (dy > 300) { + dy -= 360 + } + else if (dy < -300) { + dy += 360 + } + + opt.rotationX = dx > 45 ? 0 : MX.toRad(dx) + opt.rotationY += MX.toRad(dy) + } + + + exports.delta = function(x,y){ + opt.rotationY += x/window.innerWidth * opt.sensitivity + opt.rotationX = opt.rotationX + y/window.innerHeight * opt.sensitivity + } + exports.move = function(y, x){ + opt.rotationY = y + if (typeof x == "number") { opt.rotationX = x } + } + exports.zoom = function(r){ + opt.radius = r + } + exports.setZoom = function(r){ + radius = opt.radius = r + } + exports.zoomPercent = function(n){ + opt.radius = lerp(n, opt.radiusRange[0], opt.radiusRange[1]) + } + exports.zoomDelta = function(r){ + opt.radius += r + } + exports.pause = function(){ + var sy = sign(opt.rotationY-ry) + var sx = sign(opt.rotationX-rx) + opt.rotationY = ry + sy * 0.1 + opt.rotationX = rx + sx * 0.1 + } + exports.update = function(){ + if (abs(ry - opt.rotationY) > epsilon) { + ry = avg(ry, opt.rotationY, opt.ease) + } + else { + ry = opt.rotationY + } + if (abs(rx - opt.rotationX) > epsilon) { + rx = avg(rx, opt.rotationX, opt.ease) + } + else { + rx = opt.rotationX + } + if (abs(radius - opt.radius) > epsilon) { + radius = avg(radius, opt.radius, opt.wheelEase) + } + else { + radius = opt.radius + } + opt.camera.x = opt.center.x + radius * sin(rx) * cos(ry) + opt.camera.z = opt.center.y + radius * sin(rx) * sin(ry) + opt.camera.y = opt.center.z + radius * cos(rx) + opt.camera.rotationX = PI/2 - rx + opt.camera.rotationY = ry + PI/2 + } + return exports +} diff --git a/site/templates/index.liquid b/site/templates/index.liquid index 41d64e6..75fe389 100644 --- a/site/templates/index.liquid +++ b/site/templates/index.liquid @@ -181,6 +181,7 @@ WEBSITE BY OKFOCUS, http://okfoc.us, Internet Legends. + -- cgit v1.2.3-70-g09d2 From 8d8b74fe6316972f2850ce7ce2a103cf3c27217c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 27 May 2015 16:09:31 -0400 Subject: min --- site/public/assets/app.min.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'site') diff --git a/site/public/assets/app.min.js b/site/public/assets/app.min.js index 1790293..6f831f6 100644 --- a/site/public/assets/app.min.js +++ b/site/public/assets/app.min.js @@ -1,10 +1,8 @@ /* okfoc.us 2o15 */ -function FastClick(a,b){"use strict";function c(a,b){return function(){return a.apply(b,arguments)}}var d;if(b=b||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=b.touchBoundary||10,this.layer=a,this.tapDelay=b.tapDelay||200,!FastClick.notNeeded(a)){for(var e=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],f=this,g=0,h=e.length;h>g;g++)f[e[g]]=c(f[e[g]],f);deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(d=a.onclick,a.addEventListener("click",function(a){d(a)},!1),a.onclick=null)}}function wheel(a){function b(b){if(!a.locked){a.propagate||(b.stopPropagation(),b.preventDefault());var c=0,d=0;event.deltaY?(d-=event.deltaY*a.ratio,c-=event.deltaX*a.ratio):event.wheelDeltaY?(d-=event.wheelDeltaY*a.ratio,c-=event.wheelDeltaX*a.ratio):event.wheelDelta?d-=event.wheelDelta*a.ratio:event.detail&&(d+=2*event.detail),!a.reversible&&0>d&&0>c||a.update(b,d,c)}}a=defaults(a,{el:document,update:function(a,b){},propagate:!1,locked:!1,reversible:!0,ratio:.02,val:0});var c=1;return a.el.addEventListener("gesturestart",function(a){c=a.scale},!1),a.el.addEventListener("gesturechange",function(b){var d=(c-b.scale)*window.innerWidth;c=b.scale,a.update(b,d)},!1),a.el.addEventListener("wheel",b,!1),a.el.addEventListener("DOMMouseScroll",b,!1),a.lock=function(){a.locked=!0},a.unlock=function(){a.locked=!1},a}function has3d(){var a,b,c=$("

")[0],d=$("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&(f[e]="number"==typeof d?-1!=e.indexOf("rotation")?Number(d.toFixed(3)):~~d:d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c),"string"==typeof b?(e=f[b],null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&(f[e]="number"==typeof d?-1!=e.indexOf("rotation")?Number(d.toFixed(3)):~~d:d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.OrbitCameraMobile=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m,n=1e-10,o=0,p=0,q=0,r=0,s=20;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind(),f.orientationchange()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),window.addEventListener("orientationchange",f.orientationchange),window.addEventListener("devicemotion",f.devicemotion),window.addEventListener("deviceorientation",f.deviceorientation),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,f.wheel.lock())},f.orientationchange=function(a){is_portrait=window.innerWidthq&&(q=b.beta,p=o);b.beta+7;d=!is_android&&r>s?o>p?b.beta-90:90-b.beta:0,(Math.abs(c-m)<100||Math.abs(c-m)>300)&&(e=c-m,m=c),e>300?e-=360:-300>e&&(e+=360),a.rotationX=MX.toRad(-5*d),a.rotationY+=MX.toRad(10*e)},f.landscapeorientation=function(b){var c,d;c=b.gamma>0?90-b.gamma:90+b.gamma,d=b.alpha-m,m=b.alpha,d>300?d-=360:-300>d&&(d+=360),a.rotationX=c>45?0:MX.toRad(c),a.rotationY+=MX.toRad(d)},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>n?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>n?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>n?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c),"string"==typeof b?(e=f[b], +null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&(f[e]="number"==typeof d?-1!=e.indexOf("rotation")?Number(d.toFixed(3)):~~d:d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.OrbitCameraMobile=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m,n=1e-10,o=0,p=0,q=0,r=0,s=20;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind(),f.orientationchange()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),window.addEventListener("orientationchange",f.orientationchange),window.addEventListener("devicemotion",f.devicemotion),window.addEventListener("deviceorientation",f.deviceorientation),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,f.wheel.lock())},f.orientationchange=function(a){is_portrait=window.innerWidthq&&(q=b.beta,p=o);b.beta+7;d=!is_android&&r>s?o>p?b.beta-90:90-b.beta:0,(Math.abs(c-m)<100||Math.abs(c-m)>300)&&(e=c-m,m=c),e>300?e-=360:-300>e&&(e+=360),a.rotationX=MX.toRad(-5*d),a.rotationY+=MX.toRad(10*e)},f.landscapeorientation=function(b){var c,d;c=b.gamma>0?90-b.gamma:90+b.gamma,d=b.alpha-m,m=b.alpha,d>300?d-=360:-300>d&&(d+=360),a.rotationX=c>45?0:MX.toRad(c),a.rotationY+=MX.toRad(d)},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>n?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>n?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>n?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c),"string"==typeof b?(e=f[b], -null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&("number"==typeof d?-1!=e.indexOf("rotation")?f[e]=Number(d.toFixed(3)):f[e]=~~d:f[e]=d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.OrbitCameraMobile=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m,n=1e-10,o=0,p=0,q=0,r=0,s=20;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind(),f.orientationchange()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),window.addEventListener("orientationchange",f.orientationchange),window.addEventListener("devicemotion",f.devicemotion),window.addEventListener("deviceorientation",f.deviceorientation),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,f.wheel.lock())},f.orientationchange=function(a){is_portrait=window.innerWidthq&&(q=b.beta,p=o);b.beta+7;d=!is_android&&r>s?o>p?b.beta-90:90-b.beta:0,(Math.abs(c-m)<100||Math.abs(c-m)>300)&&(e=c-m,m=c),e>300?e-=360:-300>e&&(e+=360),a.rotationX=MX.toRad(-5*d),a.rotationY+=MX.toRad(10*e)},f.landscapeorientation=function(b){var c,d;c=b.gamma>0?90-b.gamma:90+b.gamma,d=b.alpha-m,m=b.alpha,d>300?d-=360:-300>d&&(d+=360),a.rotationX=c>45?0:MX.toRad(c),a.rotationY+=MX.toRad(d)},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>n?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>n?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>n?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c), +"string"==typeof b?(e=f[b],null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&("number"==typeof d?-1!=e.indexOf("rotation")?f[e]=Number(d.toFixed(3)):f[e]=~~d:f[e]=d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.OrbitCameraMobile=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m,n=1e-10,o=0,p=0,q=0,r=0,s=20;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind(),f.orientationchange()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),window.addEventListener("orientationchange",f.orientationchange),window.addEventListener("devicemotion",f.devicemotion),window.addEventListener("deviceorientation",f.deviceorientation),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,f.wheel.lock())},f.orientationchange=function(a){is_portrait=window.innerWidthq&&(q=b.beta,p=o);b.beta+7;d=!is_android&&r>s?o>p?b.beta-90:90-b.beta:0,(Math.abs(c-m)<100||Math.abs(c-m)>300)&&(e=c-m,m=c),e>300?e-=360:-300>e&&(e+=360),a.rotationX=MX.toRad(-5*d),a.rotationY+=MX.toRad(10*e)},f.landscapeorientation=function(b){var c,d;c=b.gamma>0?90-b.gamma:90+b.gamma,d=b.alpha-m,m=b.alpha,d>300?d-=360:-300>d&&(d+=360),a.rotationX=c>45?0:MX.toRad(c),a.rotationY+=MX.toRad(d)},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>n?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>n?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>n?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c), -"string"==typeof b?(e=f[b],null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("');a.append(c);var d=$f(a.find("iframe")[0]);a.data("player",d),d.addEvent("ready",function(){a.addClass("playing"),d.addEvent("play",function(){a.addClass("playing")}),d.addEvent("pause",function(){a.removeClass("playing")})}),videos.push(d)}}function HustleLoader(){function a(){b()}function b(){setTimeout(function(){$("#loader_svg").addClass("slide")},100)}var c=document.getElementById("loader_svg_status");this.update=function(a){var b=lerp(1-a,336,118);c.setAttribute("y",b)},this.finish=function(a){$("#loader_rapper").addClass("hidden"),setTimeout(a,100),setTimeout(function(){$("#loader_rapper").hide()},500)},a()}var MX=MX||function(a){function b(){var a=document.body.style;r.prefix="webkitTransform"in a?"webkit":"mozTransform"in a?"moz":"msTransform"in a?"ms":"",k=r.transformProp=h("transform"),l=r.transitionProp=h("transition"),m=r.transformOriginProp=h("transformOrigin"),n=r.transformStyleProp=h("transformStyle"),o=r.perspectiveProp=h("perspective"),p=r.transitionEndEvent="webkit"===r.prefix?"webkitTransitionEnd":"transitionend";for(var b=["webkit","moz","ms"],d=0;d0?1:-1;return b.y=g*Math.atan2(c*Math.cos(b.x),f*-g),b.z=Math.atan2(Math.cos(b.x),Math.sin(b.x)*Math.sin(b.y))-Math.PI/2,"deg"===r.rotationUnit&&(b.x=e(b.x),b.y=e(b.y),b.z=e(b.z)),b},add:function(){if(this.el){var a=this;return Array.prototype.forEach.call(arguments,function(b){!b instanceof i||(a.el.appendChild(b.el),a.children||(a.children=[]),a.children.push(b),b.parent=a)}),this}},remove:function(){var b=this;return Array.prototype.forEach.call(arguments,function(c){var d=b.children.indexOf(c);-1!==d&&(b.children.splice(d,1),b.el.removeChild(c.el),c.parent=a)}),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):(a instanceof i||a instanceof r.Scene)&&a.add(this),this},removeElement:function(){this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setPosition:function(a){this.x=a.x||0===a.x?a.x:this.x,this.y=a.y||0===a.y?a.y:this.y,this.z=a.z||0===a.z?a.z:this.z},setRotation:function(a){this.rotationX=a.x||0===a.x?a.x:this.rotationX,this.rotationY=a.y||0===a.y?a.y:this.rotationY,this.rotationZ=a.z||0===a.z?a.z:this.rotationZ},setScale:function(a){this.scaleX=a.x||0===a.x?a.x:this.scaleX,this.scaleY=a.y||0===a.y?a.y:this.scaleY,this.scaleZ=a.z||0===a.z?a.z:this.scaleZ},setSkew:function(a){this.skewX=a.x||0===a.x?a.x:this.skewX,this.skewY=a.y||0===a.y?a.y:this.skewY},setCSSTransformOrigin:function(a){return this.el&&(this.el.style[m]=a),this},setCSSTransformStyle:function(a){return this.el&&(this.el.style[n]=a),this},setCSSTransition:function(a){return this.el&&(this.el.style[l]=a),this},setCSSPerspective:function(a){return this.el&&(this.el.style[o]=a),this},move:function(a){var b=this;b.ops=defaults(a,b.ops);for(var c in a)b[c]=a[c];b.dirty=!0,b.update()},onTransitionEnd:function(a){function b(){c.removeEventListener(p,b),a()}this.cancelTransitionEnd();var c=this.el;c.addEventListener(p,b)},cancelTransitionEnd:function(){this.el.removeEventListener(p)},toString:function(a){return a=a||"id width height depth x y z rotationX rotationY rotationZ scale".split(" "),this.__toString(a)},__toString:function(b,c){this.id=this.id||"undef";var d,e,f={},g=this.type||"Object3d",h=g.toLowerCase();for(var i in b)e=b[i],d=this[e],(0!==d||c)&&("number"==typeof d?-1!=e.indexOf("rotation")?f[e]=Number(d.toFixed(3)):f[e]=~~d:f[e]=d);return(c||"var "+h+" = new MX."+g)+"("+JSON.stringify(f,a,2)+")\n"+(c?"":"scene.add("+h+")")},contains:function(a,b,c){var d=!1,e=!1,f=!1;return d=null===a?!0:abs(this.x-a)<=this.width/2,e=null===b?!0:abs(this.y-b)<=this.height/2,f=null===c?!0:abs(this.z-c)<=this.depth/2,d&&e&&f}},i.extend=j.bind(i),r.Object3D=i,r.toRad=f,r.toDeg=e,Object.defineProperty(r,"positionAtCenter",{get:function(){return t},set:function(a){"boolean"==typeof a&&(t=a,t?c():d())}}),r}();MX.Camera=MX.Object3D.extend({init:function(){this.el=null,this.type="Camera"},move:function(a){for(var b in a)this[b]=a[b]},toString:function(){var a="x y z rotationX rotationY".split(" ");return this.__toString(a,"scene.camera.move")},getCameraEuler:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.z-this.z;return r={},r.y=Math.atan2(-b,d),r.x=Math.atan2(-c,Math.sqrt(b*b+d*d)),r.z=0,"deg"===MX.rotationUnit&&(r.x=MX.toDeg(r.x),r.y=MX.toDeg(r.y)),r}}),MX.Scene=function(){function a(){this.el=document.createElement("div"),this.el.classList.add("mx-scene");var a=this.el.style;a[MX.transformProp]="preserve-3d",a.webkitPerspectiveOrigin="50% 50%",a.mozPerspectiveOrigin="50% 50%",a.perspectiveOrigin="50% 50%",a.webkitUserSelect="none",a.mozUserSelect="none",a.userSelect="none",a.overflow="hidden",this.inner=(new MX.Object3D).addTo(this.el),this.inner.el.style.width="0",this.inner.el.style.height="0";var b,c,d,e=this;Object.defineProperty(this,"width",{get:function(){return b},set:function(a){b=a,e.el.style.width=a+"px"}}),Object.defineProperty(this,"height",{get:function(){return c},set:function(a){c=a,e.el.style.height=a+"px"}}),Object.defineProperty(this,"perspective",{get:function(){return d},set:function(a){d=a,e.el.style[MX.perspectiveProp]=a+"px",e.inner.z=-a-e.camera.z,e.inner.rotationOrigin.z=-a}});this.camera=new MX.Camera;this.inner.rotationOrigin={x:0,y:0,z:0},this.perspective=0}var b=MX.Object3D.prototype.add,c=MX.Object3D.prototype.remove;return a.prototype={constructor:a,add:function(){return b.apply(this.inner,arguments),this},remove:function(){return c.apply(this.inner,arguments),this},addTo:function(a){return"string"==typeof a&&(a=document.querySelector(a)),a instanceof HTMLElement&&a.appendChild?a.appendChild(this.el):console.warn("You can only add a Scene to an HTML element."),this},update:function(){var a=this.inner,b=this.camera;return b.update(),a.z=-this.perspective-b.z,a.x=-b.x,a.y=-b.y,a.rotationX=-b.rotationX,a.rotationY=-b.rotationY,a.update(),this}},a}(),MX.OrbitCamera=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m=1e-10;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("mousedown",c),window.addEventListener("mousemove",d),window.addEventListener("mouseup",e),a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,a.el.removeEventListener("mousedown",c),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e),f.wheel.lock())},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>m?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>m?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>m?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.OrbitCameraMobile=function(a){function b(a){return function(b){a(b.touches[0])}}function c(a){k=a.pageX,l=a.pageY,f.dragging=!0}function d(a){f.dragging&&(f.delta(k-a.pageX,l-a.pageY),k=a.pageX,l=a.pageY)}function e(a){f.dragging=!1}var f={},g=!1;f.opt=a=defaults(a,{el:window,camera:scene.camera,radius:100,radiusRange:[10,1e3],rotationX:PI/2,rotationY:0,center:{x:0,y:0,z:0},sensitivity:10,wheelSensitivity:10,ease:10,wheelEase:10});var h,i,j,k,l,m,n=1e-10,o=0,p=0,q=0,r=0,s=20;return f.dragging=!1,f.init=function(){i=a.rotationY,h=a.rotationX,j=a.radius,f.wheel=new wheel({el:a.el,update:function(b,c){a.radius=clamp(a.radius+c*a.wheelSensitivity,a.radiusRange[0],a.radiusRange[1])}}),f.bind(),f.orientationchange()},f.toggle=function(a){a?f.bind():f.unbind()},f.bind=function(){g||(g=!0,a.el.addEventListener("touchstart",b(c)),window.addEventListener("touchmove",b(d)),window.addEventListener("touchend",b(e)),window.addEventListener("orientationchange",f.orientationchange),window.addEventListener("devicemotion",f.devicemotion),window.addEventListener("deviceorientation",f.deviceorientation),f.wheel.unlock())},f.unbind=function(){g&&(g=!1,f.wheel.lock())},f.orientationchange=function(a){is_portrait=window.innerWidthq&&(q=b.beta,p=o);b.beta+7;d=!is_android&&r>s?o>p?b.beta-90:90-b.beta:0,(Math.abs(c-m)<100||Math.abs(c-m)>300)&&(e=c-m,m=c),e>300?e-=360:-300>e&&(e+=360),a.rotationX=MX.toRad(-5*d),a.rotationY+=MX.toRad(10*e)},f.landscapeorientation=function(b){var c,d;c=b.gamma>0?90-b.gamma:90+b.gamma,d=b.alpha-m,m=b.alpha,d>300?d-=360:-300>d&&(d+=360),a.rotationX=c>45?0:MX.toRad(c),a.rotationY+=MX.toRad(d)},f.delta=function(b,c){a.rotationY+=b/window.innerWidth*a.sensitivity,a.rotationX=a.rotationX+c/window.innerHeight*a.sensitivity},f.move=function(b,c){a.rotationY=b,"number"==typeof c&&(a.rotationX=c)},f.zoom=function(b){a.radius=b},f.setZoom=function(b){j=a.radius=b},f.zoomPercent=function(b){a.radius=lerp(b,a.radiusRange[0],a.radiusRange[1])},f.zoomDelta=function(b){a.radius+=b},f.pause=function(){var b=sign(a.rotationY-i),c=sign(a.rotationX-h);a.rotationY=i+.1*b,a.rotationX=h+.1*c},f.update=function(){i=abs(i-a.rotationY)>n?avg(i,a.rotationY,a.ease):a.rotationY,h=abs(h-a.rotationX)>n?avg(h,a.rotationX,a.ease):a.rotationX,j=abs(j-a.radius)>n?avg(j,a.radius,a.wheelEase):a.radius,a.camera.x=a.center.x+j*sin(h)*cos(i),a.camera.z=a.center.y+j*sin(h)*sin(i),a.camera.y=a.center.z+j*cos(h),a.camera.rotationX=PI/2-h,a.camera.rotationY=i+PI/2},f},MX.Image=MX.Object3D.extend({init:function(a){this.type="Image",this.media=a.media,this.width=0,this.height=0,this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.scale=a.scale||1,this.backface=a.backface||!1,a.className&&this.el.classList.add(a.className),this.backface&&this.el.classList.add("backface-visible"),this.el.classList.add("image"),this.el.classList.add("mx-scenery"),this.el.style.backgroundRepeat="no-repeat",this.load(a)},load:function(a){var b=this;b.ops=defaults(a,b.ops);var c=new Image;c.onload=function(){b.ops&&(b.scale=b.ops.scale||1,b.width=b.ops.width||c.naturalWidth,b.height=b.ops.height||c.naturalHeight,b.el.style.backgroundImage="url("+c.src+")",b.el.classList.add("image"),b.dirty=!0,b.ops.onload&&b.ops.onload(c),b.update())},c.src=a.src,c.complete&&setTimeout(c.onload)}}),!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=fa.type(a);return"function"===c||fa.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(na.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return fa.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=va[a]={};return fa.each(a.match(ua)||[],function(a,c){b[c]=!0}),b}function g(){pa.addEventListener?(pa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(pa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(pa.addEventListener||"load"===event.type||"complete"===pa.readyState)&&(g(),fa.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(Aa,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:za.test(c)?fa.parseJSON(c):c}catch(e){}fa.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!fa.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(fa.acceptData(a)){var e,f,g=fa.expando,h=a.nodeType,i=h?fa.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||fa.guid++:g),i[j]||(i[j]=h?{}:{toJSON:fa.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=fa.extend(i[j],b):i[j].data=fa.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}), +f=f.data),void 0!==c&&(f[fa.camelCase(b)]=c),"string"==typeof b?(e=f[b],null==e&&(e=f[fa.camelCase(b)])):e=f,e}}function l(a,b,c){if(fa.acceptData(a)){var d,e,f=a.nodeType,g=f?fa.cache:a,h=f?a[fa.expando]:fa.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){fa.isArray(b)?b=b.concat(fa.map(b,fa.camelCase)):b in d?b=[b]:(b=fa.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!fa.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?fa.cleanData([a],!0):da.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return pa.activeElement}catch(a){}}function p(a){var b=La.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==ya?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==ya?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||fa.nodeName(d,b)?f.push(d):fa.merge(f,q(d,b));return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],f):f}function r(a){Fa.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==fa.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Wa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)fa._data(c,"globalEval",!b||fa._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&fa.hasData(a)){var c,d,e,f=fa._data(a),g=fa._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)fa.event.add(b,c,h[c][d])}g.data&&(g.data=fa.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!da.noCloneEvent&&b[fa.expando]){e=fa._data(b);for(d in e.events)fa.removeEvent(b,d,e.handle);b.removeAttribute(fa.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),da.html5Clone&&a.innerHTML&&!fa.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Fa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d=fa(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:fa.css(d[0],"display");return d.detach(),e}function z(a){var b=pa,c=ab[a];return c||(c=y(a,b),"none"!==c&&c||(_a=(_a||fa("