+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/js/main.js b/js/main.js
new file mode 100644
index 0000000..2dd693d
--- /dev/null
+++ b/js/main.js
@@ -0,0 +1,342 @@
+function styleDefault(){
+ $('#particles-js').css("background-color", "rgb(0,0,0)");
+ particlesJS("particles-js", {
+ "particles": {
+ "number": {
+ "value": 80,
+ "density": {
+ "enable": true,
+ "value_area": 800
+ }
+ },
+ "color": {
+ "value": "#ffffff"
+ },
+ "shape": {
+ "type": "circle",
+ "stroke": {
+ "width": 0,
+ "color": "#000000"
+ },
+ "polygon": {
+ "nb_sides": 5
+ },
+ "image": {
+ "src": "img/github.svg",
+ "width": 100,
+ "height": 100
+ }
+ },
+ "opacity": {
+ "value": 0.5,
+ "random": false,
+ "anim": {
+ "enable": false,
+ "speed": 1,
+ "opacity_min": 0.1,
+ "sync": false
+ }
+ },
+ "size": {
+ "value": 3,
+ "random": true,
+ "anim": {
+ "enable": false,
+ "speed": 40,
+ "size_min": 0.1,
+ "sync": false
+ }
+ },
+ "line_linked": {
+ "enable": true,
+ "distance": 150,
+ "color": "#ffffff",
+ "opacity": 0.4,
+ "width": 1
+ },
+ "move": {
+ "enable": true,
+ "speed": 6,
+ "direction": "none",
+ "random": false,
+ "straight": false,
+ "out_mode": "out",
+ "bounce": false,
+ "attract": {
+ "enable": false,
+ "rotateX": 600,
+ "rotateY": 1200
+ }
+ }
+ },
+ "interactivity": {
+ "detect_on": "canvas",
+ "events": {
+ "onhover": {
+ "enable": true,
+ "mode": "grab"
+ },
+ "onclick": {
+ "enable": true,
+ "mode": "push"
+ },
+ "resize": true
+ },
+ "modes": {
+ "grab": {
+ "distance": 400,
+ "line_linked": {
+ "opacity": 1
+ }
+ },
+ "bubble": {
+ "distance": 400,
+ "size": 40,
+ "duration": 2,
+ "opacity": 8,
+ "speed": 3
+ },
+ "repulse": {
+ "distance": 200,
+ "duration": 0.4
+ },
+ "push": {
+ "particles_nb": 4
+ },
+ "remove": {
+ "particles_nb": 2
+ }
+ }
+ },
+ "retina_detect": true
+ });
+};
+
+function styleSpace(){
+ $('#particles-js').css("background-color", "rgb(35,39,65)");
+ particlesJS("particles-js", {
+ "particles": {
+ "number": {
+ "value": 160,
+ "density": {
+ "enable": true,
+ "value_area": 800
+ }
+ },
+ "color": {
+ "value": "#ffffff"
+ },
+ "shape": {
+ "type": "circle",
+ "stroke": {
+ "width": 0,
+ "color": "#000000"
+ },
+ "polygon": {
+ "nb_sides": 5
+ },
+ "image": {
+ "src": "img/github.svg",
+ "width": 100,
+ "height": 100
+ }
+ },
+ "opacity": {
+ "value": 1,
+ "random": true,
+ "anim": {
+ "enable": true,
+ "speed": 1,
+ "opacity_min": 0,
+ "sync": false
+ }
+ },
+ "size": {
+ "value": 3,
+ "random": true,
+ "anim": {
+ "enable": false,
+ "speed": 4,
+ "size_min": 0.3,
+ "sync": false
+ }
+ },
+ "line_linked": {
+ "enable": false,
+ "distance": 150,
+ "color": "#ffffff",
+ "opacity": 0.4,
+ "width": 1
+ },
+ "move": {
+ "enable": true,
+ "speed": 1,
+ "direction": "none",
+ "random": true,
+ "straight": false,
+ "out_mode": "out",
+ "bounce": false,
+ "attract": {
+ "enable": false,
+ "rotateX": 600,
+ "rotateY": 600
+ }
+ }
+ },
+ "interactivity": {
+ "detect_on": "canvas",
+ "events": {
+ "onhover": {
+ "enable": true,
+ "mode": "bubble"
+ },
+ "onclick": {
+ "enable": true,
+ "mode": "repulse"
+ },
+ "resize": true
+ },
+ "modes": {
+ "grab": {
+ "distance": 400,
+ "line_linked": {
+ "opacity": 1
+ }
+ },
+ "bubble": {
+ "distance": 250,
+ "size": 0,
+ "duration": 2,
+ "opacity": 0,
+ "speed": 3
+ },
+ "repulse": {
+ "distance": 400,
+ "duration": 0.4
+ },
+ "push": {
+ "particles_nb": 4
+ },
+ "remove": {
+ "particles_nb": 2
+ }
+ }
+ },
+ "retina_detect": true
+ });
+};
+
+function styleSnow(){
+ $('#particles-js').css("background-color", "rgb(100,149,237)");
+ particlesJS("particles-js", {
+ "particles": {
+ "number": {
+ "value": 400,
+ "density": {
+ "enable": true,
+ "value_area": 800
+ }
+ },
+ "color": {
+ "value": "#fff"
+ },
+ "shape": {
+ "type": "circle",
+ "stroke": {
+ "width": 0,
+ "color": "#000000"
+ },
+ "polygon": {
+ "nb_sides": 5
+ },
+ "image": {
+ "src": "img/github.svg",
+ "width": 100,
+ "height": 100
+ }
+ },
+ "opacity": {
+ "value": 0.5,
+ "random": true,
+ "anim": {
+ "enable": false,
+ "speed": 1,
+ "opacity_min": 0.1,
+ "sync": false
+ }
+ },
+ "size": {
+ "value": 10,
+ "random": true,
+ "anim": {
+ "enable": false,
+ "speed": 40,
+ "size_min": 0.1,
+ "sync": false
+ }
+ },
+ "line_linked": {
+ "enable": false,
+ "distance": 500,
+ "color": "#ffffff",
+ "opacity": 0.4,
+ "width": 2
+ },
+ "move": {
+ "enable": true,
+ "speed": 6,
+ "direction": "bottom",
+ "random": false,
+ "straight": false,
+ "out_mode": "out",
+ "bounce": false,
+ "attract": {
+ "enable": false,
+ "rotateX": 600,
+ "rotateY": 1200
+ }
+ }
+ },
+ "interactivity": {
+ "detect_on": "canvas",
+ "events": {
+ "onhover": {
+ "enable": true,
+ "mode": "bubble"
+ },
+ "onclick": {
+ "enable": true,
+ "mode": "repulse"
+ },
+ "resize": true
+ },
+ "modes": {
+ "grab": {
+ "distance": 400,
+ "line_linked": {
+ "opacity": 0.5
+ }
+ },
+ "bubble": {
+ "distance": 400,
+ "size": 4,
+ "duration": 0.3,
+ "opacity": 1,
+ "speed": 3
+ },
+ "repulse": {
+ "distance": 200,
+ "duration": 0.4
+ },
+ "push": {
+ "particles_nb": 4
+ },
+ "remove": {
+ "particles_nb": 2
+ }
+ }
+ },
+ "retina_detect": true
+
+ });
+};
\ No newline at end of file
diff --git a/lib/parallax.js-1.4.2/LICENSE b/lib/parallax.js-1.4.2/LICENSE
new file mode 100644
index 0000000..084c6c5
--- /dev/null
+++ b/lib/parallax.js-1.4.2/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 PixelCog Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/lib/parallax.js-1.4.2/README.md b/lib/parallax.js-1.4.2/README.md
new file mode 100644
index 0000000..bb9352d
--- /dev/null
+++ b/lib/parallax.js-1.4.2/README.md
@@ -0,0 +1,210 @@
+Parallax.js
+===========
+
+Simple parallax scrolling effect inspired by [Spotify.com](http://spotify.com/) implemented as a jQuery plugin
+[http://pixelcog.com/parallax.js/](http://pixelcog.com/parallax.js/)
+
+## Installation
+
+Download package or install with Bower and include `parallax.min.js` in your document after including jQuery.
+
+```bash
+$ bower i --save parallax.js
+```
+
+```html
+
+
+```
+
+## Usage
+
+### Via data attributes
+
+To easily add a parallax effect behind an element, add `data-parallax="scroll"` to the element you want to use, and specify an image with `data-image-src="/path/to/image.jpg"`.
+
+```html
+
+```
+
+### Via JavaScript
+
+To call the parallax plugin manually, simply select your target element with jQuery and do the following:
+
+```javascript
+$('.parallax-window').parallax({imageSrc: '/path/to/image.jpg'});
+```
+
+### Notes
+
+What parallax.js will do is create a fixed-position element for each parallax image at the start of the document's body. This mirror element will sit behind the other elements and match the position and dimensions of its target object.
+
+Due to the nature of this implementation, you must ensure that these parallax objects and any layers below them are transparent so that you can see the parallax effect underneath. Also, if there is no other content in this element, you will need to ensure that it has some fixed dimensions otherwise you won't see anything.
+
+```css
+.parallax-window {
+ min-height: 400px;
+ background: transparent;
+}
+```
+
+Also, keep in mind that once initialized, the parallax plugin presumes a fixed page layout unless it encounters a `scroll` or `resize` event. If you have a dynamic page in which another javascript method may alter the DOM, you must manually refresh the parallax effect with the following commands:
+
+```javascript
+jQuery(window).trigger('resize').trigger('scroll');
+```
+
+### Using inner HTML for complex content
+
+You can use the following syntax to enable complex content for the parallax:
+
+```html
+
+
+ Some Text
+
Some other Content
+
+
+```
+Please note, that the div with class "parallax-slider" is essential here.
+
+You then need to initialize it through JS and provide the naturalWidth and naturalHeight options in order to be rendered correctly.
+
+```
+$('.parallax-window').parallax({
+ naturalWidth: 600,
+ naturalHeight: 400
+ });
+```
+
+This also makes it possible to use responsive images in the slider:
+
+```html
+
+
+
+
+
+```
+
+## Options
+
+Options can be passed in via data attributes of JavaScript. For data attributes, append the option name to `data-`, as in `data-image-src=""`.
+
+Note that when specifying these options as html data-attributes, you should convert "camelCased" variable names into "dash-separated" lower-case names (e.g. `zIndex` would be `data-z-index=""`).
+
+
+
+
+
Name
+
type
+
default
+
description
+
+
+
+
+
imageSrc
+
path
+
null
+
You must provide a path to the image you wish to apply to the parallax effect.
+
+
+
naturalWidth
+
number
+
auto
+
You can provide the natural width and natural height of an image to speed up loading and reduce error when determining the correct aspect ratio of the image.
+
+
+
naturalHeight
+
number
+
auto
+
+
+
position
+
xPos yPos
+
center center
+
This is analogous to the background-position css property. Specify coordinates as top, bottom, right, left, center, or pixel values (e.g. -10px 0px). The parallax image will be positioned as close to these values as possible while still covering the target element.
+
+
+
positionX
+
xPos
+
center
+
+
+
positionY
+
yPos
+
center
+
+
+
speed
+
float
+
0.2
+
The speed at which the parallax effect runs. 0.0 means the image will appear fixed in place, and 1.0 the image will flow at the same speed as the page content.
+
+
+
zIndex
+
number
+
-100
+
The z-index value of the fixed-position elements. By default these will be behind everything else on the page.
+
+
+
bleed
+
number
+
0
+
You can optionally set the parallax mirror element to extend a few pixels above and below the mirrored element. This can hide slow or stuttering scroll events in certain browsers.
+
+
+
iosFix
+
boolean
+
true
+
iOS devices are incompatable with this plugin. If true, this option will set the parallax image as a static, centered background image whenever it detects an iOS user agent. Disable this if you wish to implement your own graceful degradation.
+
+
+
androidFix
+
boolean
+
true
+
If true, this option will set the parallax image as a static, centered background image whenever it detects an Android user agent. Disable this if you wish to enable the parallax scrolling effect on Android devices.
+
+
+
overScrollFix
+
boolean
+
false
+
(Experimental) If true, will freeze the parallax effect when "over scrolling" in browsers like Safari to prevent unexpected gaps caused by negative scroll positions.
+
+
+
+
+## Contributing
+
+If you have a pull request you would like to submit, please ensure that you update the minified version of the library along with your code changes. This project uses [uglifyjs](https://www.npmjs.com/package/uglify-js) to perform code compression.
+
+Please use the following command:
+
+ uglifyjs parallax.js --comments -m -c -o parallax.min.js
+
+
+LICENSE
+=======
+
+The MIT License (MIT)
+
+Copyright (c) 2016 PixelCog Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lib/parallax.js-1.4.2/bower.json b/lib/parallax.js-1.4.2/bower.json
new file mode 100644
index 0000000..ccf2c16
--- /dev/null
+++ b/lib/parallax.js-1.4.2/bower.json
@@ -0,0 +1,20 @@
+{
+ "name": "parallax.js",
+ "version": "1.4.2",
+ "homepage": "http://pixelcog.com/parallax.js/",
+ "description": "Simple parallax scrolling effect inspired by spotify.com implemented as a jQuery plugin",
+ "authors": [
+ "Mike Greiling (http://pixelcog.com)",
+ "Wolfgang Stöttinger (http://www.wolfography.at)"
+ ],
+ "main": "parallax.min.js",
+ "license": "MIT",
+ "keywords" : ["parallax", "scroll", "scrolling", "image"],
+ "ignore": [
+ ".jshintrc",
+ "**/*.txt"
+ ],
+ "dependencies": {
+ "jquery": ">=1.7"
+ }
+}
diff --git a/lib/parallax.js-1.4.2/parallax.js b/lib/parallax.js-1.4.2/parallax.js
new file mode 100644
index 0000000..90b5b78
--- /dev/null
+++ b/lib/parallax.js-1.4.2/parallax.js
@@ -0,0 +1,404 @@
+/*!
+ * parallax.js v1.4.2 (http://pixelcog.github.io/parallax.js/)
+ * @copyright 2016 PixelCog, Inc.
+ * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE)
+ */
+
+;(function ( $, window, document, undefined ) {
+
+ // Polyfill for requestAnimationFrame
+ // via: https://gist.github.com/paulirish/1579671
+
+ (function() {
+ var lastTime = 0;
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
+ window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
+ || window[vendors[x]+'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame)
+ window.requestAnimationFrame = function(callback) {
+ var currTime = new Date().getTime();
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
+ timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame)
+ window.cancelAnimationFrame = function(id) {
+ clearTimeout(id);
+ };
+ }());
+
+
+ // Parallax Constructor
+
+ function Parallax(element, options) {
+ var self = this;
+
+ if (typeof options == 'object') {
+ delete options.refresh;
+ delete options.render;
+ $.extend(this, options);
+ }
+
+ this.$element = $(element);
+
+ if (!this.imageSrc && this.$element.is('img')) {
+ this.imageSrc = this.$element.attr('src');
+ }
+
+ var positions = (this.position + '').toLowerCase().match(/\S+/g) || [];
+
+ if (positions.length < 1) {
+ positions.push('center');
+ }
+ if (positions.length == 1) {
+ positions.push(positions[0]);
+ }
+
+ if (positions[0] == 'top' || positions[0] == 'bottom' || positions[1] == 'left' || positions[1] == 'right') {
+ positions = [positions[1], positions[0]];
+ }
+
+ if (this.positionX != undefined) positions[0] = this.positionX.toLowerCase();
+ if (this.positionY != undefined) positions[1] = this.positionY.toLowerCase();
+
+ self.positionX = positions[0];
+ self.positionY = positions[1];
+
+ if (this.positionX != 'left' && this.positionX != 'right') {
+ if (isNaN(parseInt(this.positionX))) {
+ this.positionX = 'center';
+ } else {
+ this.positionX = parseInt(this.positionX);
+ }
+ }
+
+ if (this.positionY != 'top' && this.positionY != 'bottom') {
+ if (isNaN(parseInt(this.positionY))) {
+ this.positionY = 'center';
+ } else {
+ this.positionY = parseInt(this.positionY);
+ }
+ }
+
+ this.position =
+ this.positionX + (isNaN(this.positionX)? '' : 'px') + ' ' +
+ this.positionY + (isNaN(this.positionY)? '' : 'px');
+
+ if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
+ if (this.imageSrc && this.iosFix && !this.$element.is('img')) {
+ this.$element.css({
+ backgroundImage: 'url(' + this.imageSrc + ')',
+ backgroundSize: 'cover',
+ backgroundPosition: this.position
+ });
+ }
+ return this;
+ }
+
+ if (navigator.userAgent.match(/(Android)/)) {
+ if (this.imageSrc && this.androidFix && !this.$element.is('img')) {
+ this.$element.css({
+ backgroundImage: 'url(' + this.imageSrc + ')',
+ backgroundSize: 'cover',
+ backgroundPosition: this.position
+ });
+ }
+ return this;
+ }
+
+ this.$mirror = $('').prependTo('body');
+
+ var slider = this.$element.find('>.parallax-slider');
+ var sliderExisted = false;
+
+ if (slider.length == 0)
+ this.$slider = $('').prependTo(this.$mirror);
+ else {
+ this.$slider = slider.prependTo(this.$mirror)
+ sliderExisted = true;
+ }
+
+ this.$mirror.addClass('parallax-mirror').css({
+ visibility: 'hidden',
+ zIndex: this.zIndex,
+ position: 'fixed',
+ top: 0,
+ left: 0,
+ overflow: 'hidden'
+ });
+
+ this.$slider.addClass('parallax-slider').one('load', function() {
+ if (!self.naturalHeight || !self.naturalWidth) {
+ self.naturalHeight = this.naturalHeight || this.height || 1;
+ self.naturalWidth = this.naturalWidth || this.width || 1;
+ }
+ self.aspectRatio = self.naturalWidth / self.naturalHeight;
+
+ Parallax.isSetup || Parallax.setup();
+ Parallax.sliders.push(self);
+ Parallax.isFresh = false;
+ Parallax.requestRender();
+ });
+
+ if (!sliderExisted)
+ this.$slider[0].src = this.imageSrc;
+
+ if (this.naturalHeight && this.naturalWidth || this.$slider[0].complete || slider.length > 0) {
+ this.$slider.trigger('load');
+ }
+
+ };
+
+
+ // Parallax Instance Methods
+
+ $.extend(Parallax.prototype, {
+ speed: 0.2,
+ bleed: 0,
+ zIndex: -100,
+ iosFix: true,
+ androidFix: true,
+ position: 'center',
+ overScrollFix: false,
+
+ refresh: function() {
+ this.boxWidth = this.$element.outerWidth();
+ this.boxHeight = this.$element.outerHeight() + this.bleed * 2;
+ this.boxOffsetTop = this.$element.offset().top - this.bleed;
+ this.boxOffsetLeft = this.$element.offset().left;
+ this.boxOffsetBottom = this.boxOffsetTop + this.boxHeight;
+
+ var winHeight = Parallax.winHeight;
+ var docHeight = Parallax.docHeight;
+ var maxOffset = Math.min(this.boxOffsetTop, docHeight - winHeight);
+ var minOffset = Math.max(this.boxOffsetTop + this.boxHeight - winHeight, 0);
+ var imageHeightMin = this.boxHeight + (maxOffset - minOffset) * (1 - this.speed) | 0;
+ var imageOffsetMin = (this.boxOffsetTop - maxOffset) * (1 - this.speed) | 0;
+
+ if (imageHeightMin * this.aspectRatio >= this.boxWidth) {
+ this.imageWidth = imageHeightMin * this.aspectRatio | 0;
+ this.imageHeight = imageHeightMin;
+ this.offsetBaseTop = imageOffsetMin;
+
+ var margin = this.imageWidth - this.boxWidth;
+
+ if (this.positionX == 'left') {
+ this.offsetLeft = 0;
+ } else if (this.positionX == 'right') {
+ this.offsetLeft = - margin;
+ } else if (!isNaN(this.positionX)) {
+ this.offsetLeft = Math.max(this.positionX, - margin);
+ } else {
+ this.offsetLeft = - margin / 2 | 0;
+ }
+ } else {
+ this.imageWidth = this.boxWidth;
+ this.imageHeight = this.boxWidth / this.aspectRatio | 0;
+ this.offsetLeft = 0;
+
+ var margin = this.imageHeight - imageHeightMin;
+
+ if (this.positionY == 'top') {
+ this.offsetBaseTop = imageOffsetMin;
+ } else if (this.positionY == 'bottom') {
+ this.offsetBaseTop = imageOffsetMin - margin;
+ } else if (!isNaN(this.positionY)) {
+ this.offsetBaseTop = imageOffsetMin + Math.max(this.positionY, - margin);
+ } else {
+ this.offsetBaseTop = imageOffsetMin - margin / 2 | 0;
+ }
+ }
+ },
+
+ render: function() {
+ var scrollTop = Parallax.scrollTop;
+ var scrollLeft = Parallax.scrollLeft;
+ var overScroll = this.overScrollFix ? Parallax.overScroll : 0;
+ var scrollBottom = scrollTop + Parallax.winHeight;
+
+ if (this.boxOffsetBottom > scrollTop && this.boxOffsetTop <= scrollBottom) {
+ this.visibility = 'visible';
+ this.mirrorTop = this.boxOffsetTop - scrollTop;
+ this.mirrorLeft = this.boxOffsetLeft - scrollLeft;
+ this.offsetTop = this.offsetBaseTop - this.mirrorTop * (1 - this.speed);
+ } else {
+ this.visibility = 'hidden';
+ }
+
+ this.$mirror.css({
+ transform: 'translate3d(0px, 0px, 0px)',
+ visibility: this.visibility,
+ top: this.mirrorTop - overScroll,
+ left: this.mirrorLeft,
+ height: this.boxHeight,
+ width: this.boxWidth
+ });
+
+ this.$slider.css({
+ transform: 'translate3d(0px, 0px, 0px)',
+ position: 'absolute',
+ top: this.offsetTop,
+ left: this.offsetLeft,
+ height: this.imageHeight,
+ width: this.imageWidth,
+ maxWidth: 'none'
+ });
+ }
+ });
+
+
+ // Parallax Static Methods
+
+ $.extend(Parallax, {
+ scrollTop: 0,
+ scrollLeft: 0,
+ winHeight: 0,
+ winWidth: 0,
+ docHeight: 1 << 30,
+ docWidth: 1 << 30,
+ sliders: [],
+ isReady: false,
+ isFresh: false,
+ isBusy: false,
+
+ setup: function() {
+ if (this.isReady) return;
+
+ var $doc = $(document), $win = $(window);
+
+ var loadDimensions = function() {
+ Parallax.winHeight = $win.height();
+ Parallax.winWidth = $win.width();
+ Parallax.docHeight = $doc.height();
+ Parallax.docWidth = $doc.width();
+ };
+
+ var loadScrollPosition = function() {
+ var winScrollTop = $win.scrollTop();
+ var scrollTopMax = Parallax.docHeight - Parallax.winHeight;
+ var scrollLeftMax = Parallax.docWidth - Parallax.winWidth;
+ Parallax.scrollTop = Math.max(0, Math.min(scrollTopMax, winScrollTop));
+ Parallax.scrollLeft = Math.max(0, Math.min(scrollLeftMax, $win.scrollLeft()));
+ Parallax.overScroll = Math.max(winScrollTop - scrollTopMax, Math.min(winScrollTop, 0));
+ };
+
+ $win.on('resize.px.parallax load.px.parallax', function() {
+ loadDimensions();
+ Parallax.isFresh = false;
+ Parallax.requestRender();
+ })
+ .on('scroll.px.parallax load.px.parallax', function() {
+ loadScrollPosition();
+ Parallax.requestRender();
+ });
+
+ loadDimensions();
+ loadScrollPosition();
+
+ this.isReady = true;
+ },
+
+ configure: function(options) {
+ if (typeof options == 'object') {
+ delete options.refresh;
+ delete options.render;
+ $.extend(this.prototype, options);
+ }
+ },
+
+ refresh: function() {
+ $.each(this.sliders, function(){ this.refresh() });
+ this.isFresh = true;
+ },
+
+ render: function() {
+ this.isFresh || this.refresh();
+ $.each(this.sliders, function(){ this.render() });
+ },
+
+ requestRender: function() {
+ var self = this;
+
+ if (!this.isBusy) {
+ this.isBusy = true;
+ window.requestAnimationFrame(function() {
+ self.render();
+ self.isBusy = false;
+ });
+ }
+ },
+ destroy: function(el){
+ var i,
+ parallaxElement = $(el).data('px.parallax');
+ parallaxElement.$mirror.remove();
+ for(i=0; i < this.sliders.length; i+=1){
+ if(this.sliders[i] == parallaxElement){
+ this.sliders.splice(i, 1);
+ }
+ }
+ $(el).data('px.parallax', false);
+ if(this.sliders.length === 0){
+ $(window).off('scroll.px.parallax resize.px.parallax load.px.parallax');
+ this.isReady = false;
+ Parallax.isSetup = false;
+ }
+ }
+ });
+
+
+ // Parallax Plugin Definition
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this);
+ var options = typeof option == 'object' && option;
+
+ if (this == window || this == document || $this.is('body')) {
+ Parallax.configure(options);
+ }
+ else if (!$this.data('px.parallax')) {
+ options = $.extend({}, $this.data(), options);
+ $this.data('px.parallax', new Parallax(this, options));
+ }
+ else if (typeof option == 'object')
+ {
+ $.extend($this.data('px.parallax'), options);
+ }
+ if (typeof option == 'string') {
+ if(option == 'destroy'){
+ Parallax['destroy'](this);
+ }else{
+ Parallax[option]();
+ }
+ }
+ })
+ };
+
+ var old = $.fn.parallax;
+
+ $.fn.parallax = Plugin;
+ $.fn.parallax.Constructor = Parallax;
+
+
+ // Parallax No Conflict
+
+ $.fn.parallax.noConflict = function () {
+ $.fn.parallax = old;
+ return this;
+ };
+
+
+ // Parallax Data-API
+
+ $(document).on('ready.px.parallax.data-api', function () {
+ $('[data-parallax="scroll"]').parallax();
+ });
+
+}(jQuery, window, document));
diff --git a/lib/parallax.js-1.4.2/parallax.min.js b/lib/parallax.js-1.4.2/parallax.min.js
new file mode 100644
index 0000000..4ff4bbc
--- /dev/null
+++ b/lib/parallax.js-1.4.2/parallax.min.js
@@ -0,0 +1,6 @@
+/*!
+ * parallax.js v1.4.2 (http://pixelcog.github.io/parallax.js/)
+ * @copyright 2016 PixelCog, Inc.
+ * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE)
+ */
+!function(t,i,e,s){function o(i,e){var h=this;"object"==typeof e&&(delete e.refresh,delete e.render,t.extend(this,e)),this.$element=t(i),!this.imageSrc&&this.$element.is("img")&&(this.imageSrc=this.$element.attr("src"));var r=(this.position+"").toLowerCase().match(/\S+/g)||[];if(r.length<1&&r.push("center"),1==r.length&&r.push(r[0]),("top"==r[0]||"bottom"==r[0]||"left"==r[1]||"right"==r[1])&&(r=[r[1],r[0]]),this.positionX!=s&&(r[0]=this.positionX.toLowerCase()),this.positionY!=s&&(r[1]=this.positionY.toLowerCase()),h.positionX=r[0],h.positionY=r[1],"left"!=this.positionX&&"right"!=this.positionX&&(this.positionX=isNaN(parseInt(this.positionX))?"center":parseInt(this.positionX)),"top"!=this.positionY&&"bottom"!=this.positionY&&(this.positionY=isNaN(parseInt(this.positionY))?"center":parseInt(this.positionY)),this.position=this.positionX+(isNaN(this.positionX)?"":"px")+" "+this.positionY+(isNaN(this.positionY)?"":"px"),navigator.userAgent.match(/(iPod|iPhone|iPad)/))return this.imageSrc&&this.iosFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;if(navigator.userAgent.match(/(Android)/))return this.imageSrc&&this.androidFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;this.$mirror=t("").prependTo("body");var a=this.$element.find(">.parallax-slider"),n=!1;0==a.length?this.$slider=t("").prependTo(this.$mirror):(this.$slider=a.prependTo(this.$mirror),n=!0),this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"}),this.$slider.addClass("parallax-slider").one("load",function(){h.naturalHeight&&h.naturalWidth||(h.naturalHeight=this.naturalHeight||this.height||1,h.naturalWidth=this.naturalWidth||this.width||1),h.aspectRatio=h.naturalWidth/h.naturalHeight,o.isSetup||o.setup(),o.sliders.push(h),o.isFresh=!1,o.requestRender()}),n||(this.$slider[0].src=this.imageSrc),(this.naturalHeight&&this.naturalWidth||this.$slider[0].complete||a.length>0)&&this.$slider.trigger("load")}function h(s){return this.each(function(){var h=t(this),r="object"==typeof s&&s;this==i||this==e||h.is("body")?o.configure(r):h.data("px.parallax")?"object"==typeof s&&t.extend(h.data("px.parallax"),r):(r=t.extend({},h.data(),r),h.data("px.parallax",new o(this,r))),"string"==typeof s&&("destroy"==s?o.destroy(this):o[s]())})}!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s=this.boxWidth){this.imageWidth=h*this.aspectRatio|0,this.imageHeight=h,this.offsetBaseTop=r;var a=this.imageWidth-this.boxWidth;this.offsetLeft="left"==this.positionX?0:"right"==this.positionX?-a:isNaN(this.positionX)?-a/2|0:Math.max(this.positionX,-a)}else{this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0;var a=this.imageHeight-h;this.offsetBaseTop="top"==this.positionY?r:"bottom"==this.positionY?r-a:isNaN(this.positionY)?r-a/2|0:r+Math.max(this.positionY,-a)}},render:function(){var t=o.scrollTop,i=o.scrollLeft,e=this.overScrollFix?o.overScroll:0,s=t+o.winHeight;this.boxOffsetBottom>t&&this.boxOffsetTop<=s?(this.visibility="visible",this.mirrorTop=this.boxOffsetTop-t,this.mirrorLeft=this.boxOffsetLeft-i,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed)):this.visibility="hidden",this.$mirror.css({transform:"translate3d(0px, 0px, 0px)",visibility:this.visibility,top:this.mirrorTop-e,left:this.mirrorLeft,height:this.boxHeight,width:this.boxWidth}),this.$slider.css({transform:"translate3d(0px, 0px, 0px)",position:"absolute",top:this.offsetTop,left:this.offsetLeft,height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}}),t.extend(o,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1<<30,docWidth:1<<30,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){if(!this.isReady){var s=t(e),h=t(i),r=function(){o.winHeight=h.height(),o.winWidth=h.width(),o.docHeight=s.height(),o.docWidth=s.width()},a=function(){var t=h.scrollTop(),i=o.docHeight-o.winHeight,e=o.docWidth-o.winWidth;o.scrollTop=Math.max(0,Math.min(i,t)),o.scrollLeft=Math.max(0,Math.min(e,h.scrollLeft())),o.overScroll=Math.max(t-i,Math.min(t,0))};h.on("resize.px.parallax load.px.parallax",function(){r(),o.isFresh=!1,o.requestRender()}).on("scroll.px.parallax load.px.parallax",function(){a(),o.requestRender()}),r(),a(),this.isReady=!0}},configure:function(i){"object"==typeof i&&(delete i.refresh,delete i.render,t.extend(this.prototype,i))},refresh:function(){t.each(this.sliders,function(){this.refresh()}),this.isFresh=!0},render:function(){this.isFresh||this.refresh(),t.each(this.sliders,function(){this.render()})},requestRender:function(){var t=this;this.isBusy||(this.isBusy=!0,i.requestAnimationFrame(function(){t.render(),t.isBusy=!1}))},destroy:function(e){var s,h=t(e).data("px.parallax");for(h.$mirror.remove(),s=0;s