Skip to content

Instantly share code, notes, and snippets.

@scrooloose scrooloose/css.css
Created Nov 22, 2015

Embed
What would you like to do?
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability of focused elements when they are also in an
* active/hover state.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: .67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -.5em;
}
sub {
bottom: -.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
box-sizing: content-box; /* 2 */
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: .35em .625em .75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
.three-col .col .contact-list,
.social-networks,
.nav {
margin: 0;
padding: 0;
list-style: none;
}
.clearfix:after {
content: "";
display: block;
clear: both;
}
.ellipsis {
white-space: nowrap; /* 1 */
text-overflow: ellipsis; /* 2 */
overflow: hidden;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
* {
max-height: 1000000px;
}
body {
color: #1b307e;
background: #fff;
font: 14px / 1.2 "Source Sans Pro", "Arial", "Helvetica Neue", "Helvetica", sans-serif;
min-width: 320px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
img {
max-width: 100%;
height: auto;
}
.gm-style img {
max-width: none;
}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6,
.h {
font-family: inherit;
font-weight: bold;
margin: 0 0 .5em;
color: inherit;
}
h1,
.h1 {
font-size: 30px;
}
h2,
.h2 {
font-size: 27px;
}
h3,
.h3 {
font-size: 24px;
}
h4,
.h4 {
font-size: 21px;
}
h5,
.h5 {
font-size: 17px;
}
h6,
.h6 {
font-size: 15px;
}
p {
margin: 0 0 1em;
}
a {
color: #39f;
}
a:hover,
a:focus {
text-decoration: none;
}
form,
fieldset {
margin: 0;
padding: 0;
border-style: none;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
-webkit-appearance: none;
-webkit-border-radius: 0;
border: 1px solid #999;
padding: .4em .7em;
}
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus {
border-color: #333;
}
input[type="text"]::-webkit-input-placeholder,
input[type="tel"]::-webkit-input-placeholder,
input[type="email"]::-webkit-input-placeholder,
input[type="search"]::-webkit-input-placeholder,
input[type="password"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #999;
}
input[type="text"]::-moz-placeholder,
input[type="tel"]::-moz-placeholder,
input[type="email"]::-moz-placeholder,
input[type="search"]::-moz-placeholder,
input[type="password"]::-moz-placeholder,
textarea::-moz-placeholder {
opacity: 1;
color: #999;
}
input[type="text"]:-moz-placeholder,
input[type="tel"]:-moz-placeholder,
input[type="email"]:-moz-placeholder,
input[type="search"]:-moz-placeholder,
input[type="password"]:-moz-placeholder,
textarea:-moz-placeholder {
color: #999;
}
input[type="text"]:-ms-input-placeholder,
input[type="tel"]:-ms-input-placeholder,
input[type="email"]:-ms-input-placeholder,
input[type="search"]:-ms-input-placeholder,
input[type="password"]:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: #999;
}
input[type="text"].placeholder,
input[type="tel"].placeholder,
input[type="email"].placeholder,
input[type="search"].placeholder,
input[type="password"].placeholder,
textarea.placeholder {
color: #999;
}
select {
-webkit-border-radius: 0;
}
textarea {
resize: vertical;
vertical-align: top;
}
button,
input[type="button"],
input[type="reset"],
input[type="file"],
input[type="submit"] {
-webkit-appearance: none;
-webkit-border-radius: 0;
cursor: pointer;
}
@font-face {
font-family: "icomoon";
src: url("../fonts/icomoon.eot?2c54ro");
src: url("../fonts/icomoon.eot?2c54ro#iefix") format("embedded-opentype"), url("../fonts/icomoon.ttf?2c54ro") format("truetype"), url("../fonts/icomoon.woff?2c54ro") format("woff"), url("../fonts/icomoon.svg?2c54ro#icomoon") format("svg");
font-weight: normal;
font-style: normal;
}
[class^="icon-"],
[class*=" icon-"] {
font-family: "icomoon";
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1; /* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-downarrow:before {
content: "\e900";
}
.icon-facebook a:before {
content: "\e901";
}
.icon-instagram a:before {
content: "\e902";
}
.icon-left:before {
content: "\e903";
}
.icon-right:before {
content: "\e904";
}
.icon-twitter a:before {
content: "\e905";
}
#wrapper {
overflow: hidden;
position: relative;
width: 100%;
}
#header {
padding: 136px 0 50px;
text-align: center;
}
.header {
height: 100%;
width: 100%;
white-space: nowrap;
position: relative;
z-index: 99;
min-height: 536px;
}
.header:after {
content: "";
display: inline-block;
height: 100%;
width: 1px;
overflow: hidden;
margin: 0 0 0 -5px;
vertical-align: middle;
}
.header .frame {
display: inline-block;
vertical-align: middle;
white-space: normal;
}
.logo {
margin: 0 auto 57px;
width: 532px;
}
.logo img {
display: block;
}
.bottom-btn {
color: #105ea3;
text-decoration: none;
font-size: 58px;
position: relative;
top: 0;
-webkit-transition: top .7s, opacity .3s;
transition: top .7s, opacity .3s;
-webkit-animation-name: btn-anim;
animation-name: btn-anim;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
.bottom-btn:hover {
opacity: .8;
}
.top-block {
font-size: 35px;
line-height: 1.43;
width: 100%;
position: relative;
text-align: center;
color: #fff;
}
.top-block .description {
max-width: 880px;
margin: 0 auto;
display: block;
padding: 40px 20px 77px;
color: #fff;
display: inline-block;
vertical-align: bottom;
white-space: normal;
position: relative;
z-index: 99;
}
.top-block .text-holder {
position: relative;
height: 100%;
width: 100%;
white-space: nowrap;
}
.top-block .text-holder:after {
content: "";
display: inline-block;
height: 100%;
width: 1px;
overflow: hidden;
margin: 0 0 0 -5px;
vertical-align: middle;
}
.top-block .bg-stretch {
position: absolute;
bottom: -350px;
left: 0;
}
.top-block .bg-stretch img {
width: 100%;
max-width: none;
vertical-align: top;
}
.carousel-holder {
vertical-align: middle;
display: inline-block;
white-space: normal;
width: 100%;
overflow: hidden;
}
.cycle-gallery {
position: relative;
overflow: hidden;
width: 100%;
margin: 0 auto;
}
.cycle-gallery .mask {
width: 100%;
position: relative;
overflow: hidden;
}
.cycle-gallery .mask .slideset {
width: 9999px;
float: left;
}
.cycle-gallery .mask .slideset .slide {
padding: 20px 0;
width: 100%;
float: left;
}
.cycle-gallery .mask .slideset .slide .image-hold {
padding: 0 20%;
}
.cycle-gallery .mask img {
max-width: none;
display: block;
width: 100%;
height: auto;
}
.cycle-gallery .btn-prev,
.cycle-gallery .btn-next {
position: absolute;
top: 50%;
margin: -25px 0 0;
left: 26px;
color: #fff;
font-size: 49px;
text-decoration: none;
-webkit-transition: opacity .3s;
transition: opacity .3s;
z-index: 99;
}
.cycle-gallery .btn-prev:hover,
.cycle-gallery .btn-next:hover {
opacity: .8;
}
.cycle-gallery .btn-next {
right: 26px;
left: auto;
}
.carousel .mask {
position: relative;
overflow: hidden;
}
.carousel .mask .slideset {
width: 99999px;
float: left;
}
.carousel .mask .slide {
text-align: center;
float: left;
padding: 0 100px;
}
.carousel .mask .slide img {
vertical-align: top;
}
.cycle-gallery .mask .slide.active {
z-index: 1; /*@include media("<widescreen"){
img{
width: 60%;
}
}
@include media("<tablet"){
img{
width: 50%;
}
}
@include media("<phone"){
img{
width: 70%;
}
}
*/
}
.two-col {
background: url(../images/bg-02.jpg);
background-size: 100% auto;
font-size: 0;
line-height: 0;
position: relative;
z-index: 2;
}
.two-col .col {
background: rgba(255, 255, 255, .6);
width: 50%;
display: inline-block;
vertical-align: top;
font-size: 30px;
line-height: 1.17;
color: #1b307e;
font-weight: 600;
padding: 20px 0; /*height: 478px;*/
text-align: center;
}
.two-col .col:first-child {
background: rgba(255, 255, 255, .32) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzYxZDFkOSIgc3RvcC1vcGFjaXR5PSIwLjYiLz4KICAgIDxzdG9wIG9mZnNldD0iOCUiIHN0b3AtY29sb3I9IiM1ZGNiZDYiIHN0b3Atb3BhY2l0eT0iMC42Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjIzJSIgc3RvcC1jb2xvcj0iIzUxYmFjZSIgc3RvcC1vcGFjaXR5PSIwLjYiLz4KICAgIDxzdG9wIG9mZnNldD0iNzUlIiBzdG9wLWNvbG9yPSIjMWE2Y2E5IiBzdG9wLW9wYWNpdHk9IjAuNiIvPgogICAgPHN0b3Agb2Zmc2V0PSI5MCUiIHN0b3AtY29sb3I9IiMwZTViYTEiIHN0b3Atb3BhY2l0eT0iMC42Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwOTU0OWUiIHN0b3Atb3BhY2l0eT0iMC42Ii8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -webkit-linear-gradient(top, rgba(97, 209, 217, .6) 0%, rgba(93, 203, 214, .6) 8%, rgba(81, 186, 206, .6) 23%, rgba(26, 108, 169, .6) 75%, rgba(14, 91, 161, .6) 90%, rgba(9, 84, 158, .6) 100%);
background: linear-gradient(to bottom, rgba(97, 209, 217, .6) 0%, rgba(93, 203, 214, .6) 8%, rgba(81, 186, 206, .6) 23%, rgba(26, 108, 169, .6) 75%, rgba(14, 91, 161, .6) 90%, rgba(9, 84, 158, .6) 100%);
}
.two-col .text-holder {
height: 100%;
width: 100%;
white-space: nowrap;
padding: 0 150px;
}
.two-col .text-holder:after {
content: "";
display: inline-block;
height: 100%;
width: 1px;
overflow: hidden;
margin: 0 0 0 -5px;
vertical-align: middle;
}
.two-col .description {
vertical-align: middle;
display: inline-block;
white-space: normal;
font-weight: 600;
}
.two-col .centered-holder {
height: 100%;
width: 100%;
white-space: nowrap;
}
.two-col .centered-holder:after {
content: "";
display: inline-block;
height: 100%;
width: 1px;
overflow: hidden;
margin: 0 0 0 -5px;
vertical-align: middle;
}
.three-col {
background: url(../images/bg-02.jpg) no-repeat;
background-size: 100% auto;
display: table;
width: 100%;
font-size: 14px;
line-height: 24px;
}
.three-col .left-block {
float: left;
width: 33.33%;
}
.three-col .left-block .col {
width: 100%;
}
.three-col .right-block {
float: right;
width: 66.66%;
}
.three-col .right-block .col {
float: left;
width: 50%;
background: url(../images/bg-06.jpg) no-repeat;
background-size: cover;
}
.three-col .right-block .col:first-child {
float: right;
background: url(../images/bg-07.jpg) no-repeat;
background-size: cover;
}
.three-col .col {
text-align: center;
color: #f2f2f2;
padding: 35px 50px;
background: url(../images/bg-05.jpg) no-repeat;
background-size: cover;
}
.three-col .col:nth-child(2) {
vertical-align: middle;
background: url(../images/bg-06.jpg) no-repeat;
background-size: cover;
}
.three-col .col .img-holder {
margin: 0 0 28px;
}
.three-col .col .img-holder img {
width: 110px;
overflow: hidden;
vertical-align: top;
}
.three-col .col .centered-holder {
white-space: nowrap;
height: 100%;
}
.three-col .col .centered-holder:after {
content: "";
display: inline-block;
height: 100%;
width: 1px;
overflow: hidden;
margin: 0 0 0 -5px;
vertical-align: middle;
}
.three-col .col .title {
font-size: 20px;
display: block;
margin: 0 0 2px;
}
.three-col .col p {
margin: 0 0 30px;
}
.three-col .col .contact-list {
font-size: 0;
line-height: 0;
}
.three-col .col .contact-list li {
display: inline-block;
vertical-align: top;
font-size: 14px;
line-height: 1.2;
color: #1b307e;
font-weight: bold;
}
.three-col .col .contact-list li:before {
content: "|";
padding: 0 4px;
}
.three-col .col .contact-list li:first-child:before {
display: none;
}
.three-col .col .contact-list li a {
color: #1b307e;
text-decoration: none;
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.three-col .col .contact-list li a:hover {
opacity: .8;
}
.social-networks {
vertical-align: middle;
display: inline-block;
white-space: normal;
font-size: 0;
line-height: 0;
text-align: center;
}
.social-networks li {
display: inline-block;
vertical-align: top;
font-size: 79px;
color: #fff;
padding: 0 7px;
}
.social-networks a {
color: #fff;
text-decoration: none;
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.social-networks a:hover {
opacity: .8;
}
#footer {
background: #1b307e;
padding: 60px 30px;
}
#footer .logo {
margin: 0 auto 30px;
width: 114px;
}
#footer .logo img {
display: block;
}
.footer-row {
text-align: center;
color: #fff;
font-size: 0;
line-height: 0;
}
.footer-row .copy {
display: inline-block;
vertical-align: top;
font-size: 14px;
line-height: 1.2;
}
.footer-row .copy a {
text-decoration: none;
color: #fff;
}
.footer-row .copy a:hover {
text-decoration: underline;
}
.nav {
font-size: 0;
line-height: 0;
display: inline-block;
vertical-align: top;
}
.nav li {
display: inline-block;
vertical-align: top;
font-size: 14px;
line-height: 1.2;
padding: 0;
}
.nav li:before {
content: "|";
padding: 0 6px;
}
.nav a {
color: #fff;
text-decoration: none;
}
.nav a:hover {
text-decoration: underline;
}
.animated-text,
.animate-box,
.animated {
opacity: 0;
}
@media only screen and (orientation: landscape) {
.touch-device .top-block .bg-stretch {
bottom: -300px;
}
}
@media only screen and (min-width: 1025px) {
a[href^=tel],
a[href^=skype],
a[href^=sms] {
cursor: default;
pointer-events: none;
}
}
@media (max-width: 1599px) {
.top-block .bg-stretch {
bottom: -150px;
}
}
@media (max-width: 1299px) {
#header {
padding: 70px 0 50px;
}
.top-block .bg-stretch {
bottom: -50px;
}
}
@media (max-width: 1279px) {
.top-block {
font-size: 30px;
}
.carousel .mask .slide img {
width: 60%;
}
.two-col .col {
font-size: 22px; /*height: 378px;*/
}
.two-col .text-holder {
padding: 0 50px;
}
}
@media (max-width: 1199px) {
.social-networks li {
font-size: 50px;
}
}
@media (max-width: 1023px) {
.header {
min-height: auto;
}
.logo {
width: 300px;
}
.bottom-btn {
font-size: 50px;
}
.top-block {
font-size: 22px;
}
.top-block .description {
padding: 20px 20px 20px;
}
.cycle-gallery .btn-prev,
.cycle-gallery .btn-next {
left: 15px;
font-size: 35px;
}
.cycle-gallery .btn-next {
right: 15px;
left: auto;
}
.three-col .col {
padding: 30px 20px;
}
}
@media (max-width: 767px) {
#header {
padding: 35px 0 10px;
}
.header {
height: auto !important;
}
.logo {
width: 200px;
}
.top-block {
background: url(../images/bg-08.jpg) center top no-repeat;
background-size: cover;
font-size: 20px;
}
.top-block .description {
padding: 209px 20px 20px;
}
.top-block .bg-stretch {
bottom: 0;
}
.top-block {
height: auto !important;
}
.cycle-gallery .mask .slideset .slide .image-hold {
padding: 0 25%;
}
.cycle-gallery .btn-prev,
.cycle-gallery .btn-next {
left: 0;
font-size: 20px;
}
.cycle-gallery .btn-next {
right: 0;
left: auto;
}
.carousel .mask .slide {
padding: 0 20px;
}
.carousel .mask .slide img {
width: 50%;
}
.two-col .col {
width: 100%;
display: block;
height: auto !important;
padding: 30px 20px;
}
.two-col .text-holder {
padding: 0 20px;
}
.three-col {
display: block;
}
.three-col .left-block {
width: 100%;
float: none;
display: block;
}
.three-col .left-block .col {
height: auto !important;
}
.three-col .right-block .col {
height: auto !important;
width: 100%;
float: none;
display: block;
}
.three-col .right-block .col:first-child {
float: none;
display: block;
}
.three-col .right-block {
width: 100%;
float: none;
display: block;
}
.three-col .col {
width: 100%;
display: block;
}
.footer-row .copy {
display: block;
margin: 0 0 10px;
}
.nav li:first-child:before {
display: none;
}
}
@media (max-width: 479px) {
.touch-device .header {
height: auto;
min-height: auto;
}
.touch-device .top-block .bg-stretch img {
position: absolute;
bottom: 0;
left: 0;
}
.cycle-gallery .mask .slideset .slide .image-hold {
padding: 0 15%;
}
.carousel .mask .slide img {
width: 70%;
}
}
@-webkit-keyframes btn-anim {
0% {
top: 0;
}
50% {
top: 5px;
}
100% {
top: 0;
}
}
@keyframes btn-anim {
0% {
top: 0;
}
50% {
top: 5px;
}
100% {
top: 0;
}
}
// page init
jQuery(function() {
initAnchors();
initCycleCarousel();
initSameHeight();
});
jQuery(window).on('load', function() {
initAnimatedBlock();
initAnimatedLogo();
initAnimatedText();
initParallax();
});
function initParallax() {
var touchDeviceClass = 'touch-device';
var isTouchDevice = /Windows Phone/.test(navigator.userAgent) || ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
if (!isTouchDevice){
skrollr.init({
forceHeight: false,
smoothScrolling: false
});
} else {
jQuery('body').addClass(touchDeviceClass);
}
}
function initAnimatedText() {
var win = jQuery(window);
var animClass = 'slideInUp';
var animEndClass = 'animated-end';
var items = jQuery('.animated-text');
var animSpeed = 1000;
imagesLoaded(items.find('img'), function() {
items.each(function() {
var animBox = jQuery(this);
var offsetBox = animBox.data('offset');
var startOffset = '100%';
if (offsetBox !== undefined) {
startOffset = offsetBox;
}
var onScroll = function() {
if (animBox.offset().top + animBox.height() / 3 < win.scrollTop() + win.height() && !animBox.hasClass(animClass)) {
animBox.addClass(animClass);
animBox.velocity({
opacity: 1
}, {
duration: animSpeed,
complete: function(elements) {
animBox.addClass(animEndClass);
}
});
}
};
setTimeout(function() {
onScroll();
}, 200);
win.on('scroll resize orientationchange', onScroll);
});
});
}
function initAnimatedLogo() {
var animSpeed = 1500;
jQuery('.animate-box').each(function() {
var logo = jQuery(this);
logo.stop().animate({
opacity: 1
}, animSpeed);
});
}
function initAnimatedBlock() {
var win = jQuery(window);
var animClass = 'slideInUp';
var animEndClass = 'animated-end';
var items = jQuery('.animated');
var animSpeed = 1000;
imagesLoaded(items.find('img'), function() {
initSameHeight();
items.each(function() {
var animBox = jQuery(this);
var offsetBox = animBox.data('offset');
var delay = animBox.data('delay');
var startOffset = '100%';
if (offsetBox !== undefined) {
startOffset = offsetBox;
}
var onScroll = function() {
if (animBox.offset().top + animBox.height() / 3 < win.scrollTop() + win.height() && !animBox.hasClass(animClass)) {
animBox.addClass(animClass);
animBox.velocity({
translateY: startOffset
}, 0);
setTimeout(function() {
animBox.velocity({
opacity: 1,
translateY: 0
}, {
duration: animSpeed,
complete: function(elements) {
animBox.addClass(animEndClass);
}
});
}, delay);
}
};
setTimeout(function() {
onScroll();
}, 200);
win.on('scroll resize orientationchange', onScroll);
});
});
}
function imagesLoaded(imgs, callback) {
var counter = imgs.length;
imgs.each(function() {
if (this.complete){
counter--;
} else {
this.onload = function() {
counter--;
if (counter === 0 && typeof callback === 'function') callback();
};
}
});
if (counter === 0 && typeof callback === 'function') callback();
}
// cycle scroll gallery init
function initCycleCarousel() {
jQuery('.cycle-gallery').scrollAbsoluteGallery({
mask: '.mask',
slider: '.slideset',
slides: '.slide',
btnPrev: 'a.btn-prev',
btnNext: 'a.btn-next',
stretchSlideToMask: true,
pauseOnHover: true,
maskAutoSize: true,
autoRotation: false,
switchTime: 3000,
animSpeed: 500
});
}
// initialize smooth anchor links
function initAnchors() {
new SmoothScroll({
anchorLinks: '.bottom-btn'
});
}
// align blocks height
function initSameHeight() {
jQuery('.two-col').sameHeight({
elements: '.col',
flexible: true
});
jQuery('.three-col').sameHeight({
elements: '.col',
flexible: true
});
}
/*
* jQuery Cycle Carousel plugin
*/
;(function($){
function ScrollAbsoluteGallery(options) {
this.options = $.extend({
activeClass: 'active',
mask: 'div.slides-mask',
slider: '>ul',
slides: '>li',
btnPrev: '.btn-prev',
btnNext: '.btn-next',
pagerLinks: 'ul.pager > li',
generatePagination: false,
pagerList: '<ul>',
pagerListItem: '<li><a href="#"></a></li>',
pagerListItemText: 'a',
galleryReadyClass: 'gallery-js-ready',
currentNumber: 'span.current-num',
totalNumber: 'span.total-num',
maskAutoSize: false,
autoRotation: false,
pauseOnHover: false,
stretchSlideToMask: false,
switchTime: 3000,
animSpeed: 500,
handleTouch: true,
swipeThreshold: 15,
vertical: false
}, options);
this.init();
}
ScrollAbsoluteGallery.prototype = {
init: function() {
if(this.options.holder) {
this.findElements();
this.attachEvents();
this.makeCallback('onInit', this);
}
},
findElements: function() {
// find structure elements
this.holder = $(this.options.holder).addClass(this.options.galleryReadyClass);
this.mask = this.holder.find(this.options.mask);
this.slider = this.mask.find(this.options.slider);
this.slides = this.slider.find(this.options.slides);
this.btnPrev = this.holder.find(this.options.btnPrev);
this.btnNext = this.holder.find(this.options.btnNext);
// slide count display
this.currentNumber = this.holder.find(this.options.currentNumber);
this.totalNumber = this.holder.find(this.options.totalNumber);
// create gallery pagination
if(typeof this.options.generatePagination === 'string') {
this.pagerLinks = this.buildPagination();
} else {
this.pagerLinks = this.holder.find(this.options.pagerLinks);
}
// define index variables
this.sizeProperty = this.options.vertical ? 'height' : 'width';
this.positionProperty = this.options.vertical ? 'top' : 'left';
this.animProperty = this.options.vertical ? 'marginTop' : 'marginLeft';
this.slideSize = this.slides[this.sizeProperty]();
this.currentIndex = 0;
this.prevIndex = 0;
// reposition elements
this.options.maskAutoSize = this.options.vertical ? false : this.options.maskAutoSize;
if(this.options.vertical) {
this.mask.css({
height: this.slides.innerHeight()
});
}
if(this.options.maskAutoSize){
this.mask.css({
height: this.slider.height()
});
}
this.slider.css({
position: 'relative',
height: this.options.vertical ? this.slideSize * this.slides.length : '100%'
});
this.slides.css({
position: 'absolute'
}).css(this.positionProperty, -9999).eq(this.currentIndex).css(this.positionProperty, 0);
this.refreshState();
},
buildPagination: function() {
var pagerLinks = $();
if(!this.pagerHolder) {
this.pagerHolder = this.holder.find(this.options.generatePagination);
}
if(this.pagerHolder.length) {
this.pagerHolder.empty();
this.pagerList = $(this.options.pagerList).appendTo(this.pagerHolder);
for(var i = 0; i < this.slides.length; i++) {
$(this.options.pagerListItem).appendTo(this.pagerList).find(this.options.pagerListItemText).text(i+1);
}
pagerLinks = this.pagerList.children();
}
return pagerLinks;
},
attachEvents: function() {
// attach handlers
var self = this;
if(this.btnPrev.length) {
this.btnPrevHandler = function(e) {
e.preventDefault();
self.prevSlide();
};
this.btnPrev.click(this.btnPrevHandler);
}
if(this.btnNext.length) {
this.btnNextHandler = function(e) {
e.preventDefault();
self.nextSlide();
};
this.btnNext.click(this.btnNextHandler);
}
if(this.pagerLinks.length) {
this.pagerLinksHandler = function(e) {
e.preventDefault();
self.numSlide(self.pagerLinks.index(e.currentTarget));
};
this.pagerLinks.click(this.pagerLinksHandler);
}
// handle autorotation pause on hover
if(this.options.pauseOnHover) {
this.hoverHandler = function() {
clearTimeout(self.timer);
};
this.leaveHandler = function() {
self.autoRotate();
};
this.holder.bind({mouseenter: this.hoverHandler, mouseleave: this.leaveHandler});
}
// handle holder and slides dimensions
this.resizeHandler = function() {
if(!self.animating) {
if(self.options.stretchSlideToMask) {
self.resizeSlides();
}
self.resizeHolder();
self.setSlidesPosition(self.currentIndex);
}
};
$(window).bind('load resize orientationchange', this.resizeHandler);
if(self.options.stretchSlideToMask) {
self.resizeSlides();
}
// handle swipe on mobile devices
if(this.options.handleTouch && window.Hammer && this.mask.length && this.slides.length > 1 && isTouchDevice) {
this.swipeHandler = new Hammer.Manager(this.mask[0]);
this.swipeHandler.add(new Hammer.Pan({
direction: self.options.vertical ? Hammer.DIRECTION_VERTICAL : Hammer.DIRECTION_HORIZONTAL,
threshold: self.options.swipeThreshold
}));
this.swipeHandler.on('panstart', function() {
if(self.animating) {
self.swipeHandler.stop();
} else {
clearTimeout(self.timer);
}
}).on('panmove', function(e) {
self.swipeOffset = -self.slideSize + e[self.options.vertical ? 'deltaY' : 'deltaX'];
self.slider.css(self.animProperty, self.swipeOffset);
clearTimeout(self.timer);
}).on('panend', function(e) {
if(e.distance > self.options.swipeThreshold) {
if(e.offsetDirection === Hammer.DIRECTION_RIGHT || e.offsetDirection === Hammer.DIRECTION_DOWN) {
self.nextSlide();
} else {
self.prevSlide();
}
} else {
var tmpObj = {};
tmpObj[self.animProperty] = -self.slideSize;
self.slider.animate(tmpObj, {duration: self.options.animSpeed});
self.autoRotate();
}
self.swipeOffset = 0;
});
}
// start autorotation
this.autoRotate();
this.resizeHolder();
this.setSlidesPosition(this.currentIndex);
},
resizeSlides: function() {
this.slideSize = this.mask[this.options.vertical ? 'height' : 'width']();
this.slides.css(this.sizeProperty, this.slideSize);
},
resizeHolder: function() {
if(this.options.maskAutoSize) {
this.mask.css({
height: this.slides.eq(this.currentIndex).outerHeight(true)
});
}
},
prevSlide: function() {
if(!this.animating && this.slides.length > 1) {
this.direction = -1;
this.prevIndex = this.currentIndex;
if(this.currentIndex > 0) this.currentIndex--;
else this.currentIndex = this.slides.length - 1;
this.switchSlide();
}
},
nextSlide: function(fromAutoRotation) {
if(!this.animating && this.slides.length > 1) {
this.direction = 1;
this.prevIndex = this.currentIndex;
if(this.currentIndex < this.slides.length - 1) this.currentIndex++;
else this.currentIndex = 0;
this.switchSlide();
}
},
numSlide: function(c) {
if(!this.animating && this.currentIndex !== c && this.slides.length > 1) {
this.direction = c > this.currentIndex ? 1 : -1;
this.prevIndex = this.currentIndex;
this.currentIndex = c;
this.switchSlide();
}
},
preparePosition: function() {
// prepare slides position before animation
this.setSlidesPosition(this.prevIndex, this.direction < 0 ? this.currentIndex : null, this.direction > 0 ? this.currentIndex : null, this.direction);
},
setSlidesPosition: function(index, slideLeft, slideRight, direction) {
// reposition holder and nearest slides
if(this.slides.length > 1) {
var prevIndex = (typeof slideLeft === 'number' ? slideLeft : index > 0 ? index - 1 : this.slides.length - 1);
var nextIndex = (typeof slideRight === 'number' ? slideRight : index < this.slides.length - 1 ? index + 1 : 0);
this.slider.css(this.animProperty, this.swipeOffset ? this.swipeOffset : -this.slideSize);
this.slides.css(this.positionProperty, -9999).eq(index).css(this.positionProperty, this.slideSize);
if(prevIndex === nextIndex && typeof direction === 'number') {
var calcOffset = direction > 0 ? this.slideSize*2 : 0;
this.slides.eq(nextIndex).css(this.positionProperty, calcOffset);
} else {
this.slides.eq(prevIndex).css(this.positionProperty, 0);
this.slides.eq(nextIndex).css(this.positionProperty, this.slideSize*2);
}
}
},
switchSlide: function() {
// prepare positions and calculate offset
var self = this;
var oldSlide = this.slides.eq(this.prevIndex);
var newSlide = this.slides.eq(this.currentIndex);
this.animating = true;
// resize mask to fit slide
if(this.options.maskAutoSize) {
this.mask.animate({
height: newSlide.outerHeight(true)
}, {
duration: this.options.animSpeed
});
}
// start animation
var animProps = {};
animProps[this.animProperty] = this.direction > 0 ? -this.slideSize*2 : 0;
this.preparePosition();
this.slider.animate(animProps,{duration:this.options.animSpeed, complete:function() {
self.setSlidesPosition(self.currentIndex);
// start autorotation
self.animating = false;
self.autoRotate();
// onchange callback
self.makeCallback('onChange', self);
}});
// refresh classes
this.refreshState();
// onchange callback
this.makeCallback('onBeforeChange', this);
},
refreshState: function(initial) {
// slide change function
this.slides.removeClass(this.options.activeClass).eq(this.currentIndex).addClass(this.options.activeClass);
this.pagerLinks.removeClass(this.options.activeClass).eq(this.currentIndex).addClass(this.options.activeClass);
// display current slide number
this.currentNumber.html(this.currentIndex + 1);
this.totalNumber.html(this.slides.length);
// add class if not enough slides
this.holder.toggleClass('not-enough-slides', this.slides.length === 1);
},
autoRotate: function() {
var self = this;
clearTimeout(this.timer);
if(this.options.autoRotation) {
this.timer = setTimeout(function() {
self.nextSlide();
}, this.options.switchTime);
}
},
makeCallback: function(name) {
if(typeof this.options[name] === 'function') {
var args = Array.prototype.slice.call(arguments);
args.shift();
this.options[name].apply(this, args);
}
},
destroy: function() {
// destroy handler
this.btnPrev.unbind('click', this.btnPrevHandler);
this.btnNext.unbind('click', this.btnNextHandler);
this.pagerLinks.unbind('click', this.pagerLinksHandler);
this.holder.unbind('mouseenter', this.hoverHandler);
this.holder.unbind('mouseleave', this.leaveHandler);
$(window).unbind('load resize orientationchange', this.resizeHandler);
clearTimeout(this.timer);
// destroy swipe handler
if(this.swipeHandler) {
this.swipeHandler.destroy();
}
// remove inline styles, classes and pagination
this.holder.removeClass(this.options.galleryReadyClass);
this.slider.add(this.slides).removeAttr('style');
if(typeof this.options.generatePagination === 'string') {
this.pagerHolder.empty();
}
}
};
// detect device type
var isTouchDevice = /Windows Phone/.test(navigator.userAgent) || ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;
// jquery plugin
$.fn.scrollAbsoluteGallery = function(opt){
return this.each(function(){
$(this).data('ScrollAbsoluteGallery', new ScrollAbsoluteGallery($.extend(opt,{holder:this})));
});
};
}(jQuery));
/*!
* SmoothScroll module
*/
;(function($, exports) {
// private variables
var page,
win = $(window),
activeBlock, activeWheelHandler,
wheelEvents = ('onwheel' in document || document.documentMode >= 9 ? 'wheel' : 'mousewheel DOMMouseScroll');
// animation handlers
function scrollTo(offset, options, callback) {
// initialize variables
var scrollBlock;
if (document.body) {
if (typeof options === 'number') {
options = { duration: options };
} else {
options = options || {};
}
page = page || $('html, body');
scrollBlock = options.container || page;
} else {
return;
}
// treat single number as scrollTop
if (typeof offset === 'number') {
offset = { top: offset };
}
// handle mousewheel/trackpad while animation is active
if (activeBlock && activeWheelHandler) {
activeBlock.off(wheelEvents, activeWheelHandler);
}
if (options.wheelBehavior && options.wheelBehavior !== 'none') {
activeWheelHandler = function(e) {
if (options.wheelBehavior === 'stop') {
scrollBlock.off(wheelEvents, activeWheelHandler);
scrollBlock.stop();
} else if (options.wheelBehavior === 'ignore') {
e.preventDefault();
}
};
activeBlock = scrollBlock.on(wheelEvents, activeWheelHandler);
}
// start scrolling animation
scrollBlock.stop().animate({
scrollLeft: offset.left,
scrollTop: offset.top
}, options.duration, function() {
if (activeWheelHandler) {
scrollBlock.off(wheelEvents, activeWheelHandler);
}
if ($.isFunction(callback)) {
callback();
}
});
}
// smooth scroll contstructor
function SmoothScroll(options) {
this.options = $.extend({
anchorLinks: 'a[href^="#"]', // selector or jQuery object
container: null, // specify container for scrolling (default - whole page)
extraOffset: null, // function or fixed number
activeClasses: null, // null, "link", "parent"
easing: 'swing', // easing of scrolling
animMode: 'duration', // or "speed" mode
animDuration: 800, // total duration for scroll (any distance)
animSpeed: 1500, // pixels per second
anchorActiveClass: 'anchor-active',
sectionActiveClass: 'section-active',
wheelBehavior: 'stop', // "stop", "ignore" or "none"
useNativeAnchorScrolling: false // do not handle click in devices with native smooth scrolling
}, options);
this.init();
}
SmoothScroll.prototype = {
init: function() {
this.initStructure();
this.attachEvents();
},
initStructure: function() {
this.container = this.options.container ? $(this.options.container) : $('html,body');
this.scrollContainer = this.options.container ? this.container : win;
this.anchorLinks = $(this.options.anchorLinks);
},
getAnchorTarget: function(link) {
// get target block from link href
var targetId = $(link).attr('href');
return $(targetId.length > 1 ? targetId : 'html');
},
getTargetOffset: function(block) {
// get target offset
var blockOffset = block.offset().top;
if (this.options.container) {
blockOffset -= this.container.offset().top - this.container.prop('scrollTop');
}
// handle extra offset
if (typeof this.options.extraOffset === 'number') {
blockOffset -= this.options.extraOffset;
} else if (typeof this.options.extraOffset === 'function') {
blockOffset -= this.options.extraOffset(block);
}
return { top: blockOffset };
},
attachEvents: function() {
var self = this;
// handle active classes
if (this.options.activeClasses) {
// cache structure
this.anchorData = [];
this.anchorLinks.each(function() {
var link = jQuery(this),
targetBlock = self.getAnchorTarget(link),
anchorDataItem;
$.each(self.anchorData, function(index, item) {
if (item.block[0] === targetBlock[0]) {
anchorDataItem = item;
}
});
if (anchorDataItem) {
anchorDataItem.link = anchorDataItem.link.add(link);
} else {
self.anchorData.push({
link: link,
block: targetBlock
});
}
});
// add additional event handlers
this.resizeHandler = function() {
self.recalculateOffsets();
};
this.scrollHandler = function() {
self.refreshActiveClass();
};
this.recalculateOffsets();
this.scrollContainer.on('scroll', this.scrollHandler);
win.on('resize', this.resizeHandler);
}
// handle click event
this.clickHandler = function(e) {
self.onClick(e);
};
if (!this.options.useNativeAnchorScrolling) {
this.anchorLinks.on('click', this.clickHandler);
}
},
recalculateOffsets: function() {
var self = this;
$.each(this.anchorData, function(index, data) {
data.offset = self.getTargetOffset(data.block);
data.height = data.block.outerHeight();
});
this.refreshActiveClass();
},
refreshActiveClass: function() {
var self = this,
foundFlag = false,
containerHeight = this.container.prop('scrollHeight'),
viewPortHeight = this.scrollContainer.height(),
scrollTop = this.options.container ? this.container.prop('scrollTop') : win.scrollTop();
// user function instead of default handler
if (this.options.customScrollHandler) {
this.options.customScrollHandler.call(this, scrollTop, this.anchorData);
return;
}
// sort anchor data by offsets
this.anchorData.sort(function(a, b) {
return a.offset.top - b.offset.top;
});
function toggleActiveClass(anchor, block, state) {
anchor.toggleClass(self.options.anchorActiveClass, state);
block.toggleClass(self.options.sectionActiveClass, state);
}
// default active class handler
$.each(this.anchorData, function(index) {
var reverseIndex = self.anchorData.length - index - 1,
data = self.anchorData[reverseIndex],
anchorElement = (self.options.activeClasses === 'parent' ? data.link.parent() : data.link);
if (scrollTop >= containerHeight - viewPortHeight) {
// handle last section
if (reverseIndex === self.anchorData.length - 1) {
toggleActiveClass(anchorElement, data.block, true);
} else {
toggleActiveClass(anchorElement, data.block, false);
}
} else {
// handle other sections
if (!foundFlag && (scrollTop >= data.offset.top - 1 || reverseIndex === 0)) {
foundFlag = true;
toggleActiveClass(anchorElement, data.block, true);
} else {
toggleActiveClass(anchorElement, data.block, false);
}
}
});
},
calculateScrollDuration: function(offset) {
var distance;
if (this.options.animMode === 'speed') {
distance = Math.abs(this.scrollContainer.scrollTop() - offset.top);
return (distance / this.options.animSpeed) * 1000;
} else {
return this.options.animDuration;
}
},
onClick: function(e) {
var targetBlock = this.getAnchorTarget(e.currentTarget),
targetOffset = this.getTargetOffset(targetBlock);
e.preventDefault();
scrollTo(targetOffset, {
container: this.container,
wheelBehavior: this.options.wheelBehavior,
duration: this.calculateScrollDuration(targetOffset)
});
},
destroy: function() {
if (this.options.activeClasses) {
win.off('resize', this.resizeHandler);
this.scrollContainer.off('scroll', this.scrollHandler);
}
this.anchorLinks.off('click', this.clickHandler);
}
};
// public API
$.extend(SmoothScroll, {
scrollTo: function(blockOrOffset, durationOrOptions, callback) {
scrollTo(blockOrOffset, durationOrOptions, callback);
}
});
// export module
exports.SmoothScroll = SmoothScroll;
}(jQuery, this));
/*
* jQuery SameHeight plugin
*/
;(function($){
$.fn.sameHeight = function(opt) {
var options = $.extend({
skipClass: 'same-height-ignore',
leftEdgeClass: 'same-height-left',
rightEdgeClass: 'same-height-right',
elements: '>*',
flexible: false,
multiLine: false,
useMinHeight: false,
biggestHeight: false
},opt);
return this.each(function(){
var holder = $(this), postResizeTimer, ignoreResize;
var elements = holder.find(options.elements).not('.' + options.skipClass);
if(!elements.length) return;
// resize handler
function doResize() {
elements.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', '');
if(options.multiLine) {
// resize elements row by row
resizeElementsByRows(elements, options);
} else {
// resize elements by holder
resizeElements(elements, holder, options);
}
}
doResize();
// handle flexible layout / font resize
var delayedResizeHandler = function() {
if(!ignoreResize) {
ignoreResize = true;
doResize();
clearTimeout(postResizeTimer);
postResizeTimer = setTimeout(function() {
doResize();
setTimeout(function(){
ignoreResize = false;
}, 10);
}, 100);
}
};
// handle flexible/responsive layout
if(options.flexible) {
$(window).bind('resize orientationchange fontresize', delayedResizeHandler);
}
// handle complete page load including images and fonts
$(window).bind('load', delayedResizeHandler);
});
};
// detect css min-height support
var supportMinHeight = typeof document.documentElement.style.maxHeight !== 'undefined';
// get elements by rows
function resizeElementsByRows(boxes, options) {
var currentRow = $(), maxHeight, maxCalcHeight = 0, firstOffset = boxes.eq(0).offset().top;
boxes.each(function(ind){
var curItem = $(this);
if(curItem.offset().top === firstOffset) {
currentRow = currentRow.add(this);
} else {
maxHeight = getMaxHeight(currentRow);
maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
currentRow = curItem;
firstOffset = curItem.offset().top;
}
});
if(currentRow.length) {
maxHeight = getMaxHeight(currentRow);
maxCalcHeight = Math.max(maxCalcHeight, resizeElements(currentRow, maxHeight, options));
}
if(options.biggestHeight) {
boxes.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', maxCalcHeight);
}
}
// calculate max element height
function getMaxHeight(boxes) {
var maxHeight = 0;
boxes.each(function(){
maxHeight = Math.max(maxHeight, $(this).outerHeight());
});
return maxHeight;
}
// resize helper function
function resizeElements(boxes, parent, options) {
var calcHeight;
var parentHeight = typeof parent === 'number' ? parent : parent.height();
boxes.removeClass(options.leftEdgeClass).removeClass(options.rightEdgeClass).each(function(i){
var element = $(this);
var depthDiffHeight = 0;
var isBorderBox = element.css('boxSizing') === 'border-box' || element.css('-moz-box-sizing') === 'border-box' || element.css('-webkit-box-sizing') === 'border-box';
if(typeof parent !== 'number') {
element.parents().each(function(){
var tmpParent = $(this);
if(parent.is(this)) {
return false;
} else {
depthDiffHeight += tmpParent.outerHeight() - tmpParent.height();
}
});
}
calcHeight = parentHeight - depthDiffHeight;
calcHeight -= isBorderBox ? 0 : element.outerHeight() - element.height();
if(calcHeight > 0) {
element.css(options.useMinHeight && supportMinHeight ? 'minHeight' : 'height', calcHeight);
}
});
boxes.filter(':first').addClass(options.leftEdgeClass);
boxes.filter(':last').addClass(options.rightEdgeClass);
return calcHeight;
}
}(jQuery));
/*
* jQuery FontResize Event
*/
jQuery.onFontResize = (function($) {
$(function() {
var randomID = 'font-resize-frame-' + Math.floor(Math.random() * 1000);
var resizeFrame = $('<iframe>').attr('id', randomID).addClass('font-resize-helper');
// required styles
resizeFrame.css({
width: '100em',
height: '10px',
position: 'absolute',
borderWidth: 0,
top: '-9999px',
left: '-9999px'
}).appendTo('body');
// use native IE resize event if possible
if (window.attachEvent && !window.addEventListener) {
resizeFrame.bind('resize', function () {
$.onFontResize.trigger(resizeFrame[0].offsetWidth / 100);
});
}
// use script inside the iframe to detect resize for other browsers
else {
var doc = resizeFrame[0].contentWindow.document;
doc.open();
doc.write('<scri' + 'pt>window.onload = function(){var em = parent.jQuery("#' + randomID + '")[0];window.onresize = function(){if(parent.jQuery.onFontResize){parent.jQuery.onFontResize.trigger(em.offsetWidth / 100);}}};</scri' + 'pt>');
doc.close();
}
jQuery.onFontResize.initialSize = resizeFrame[0].offsetWidth / 100;
});
return {
// public method, so it can be called from within the iframe
trigger: function (em) {
$(window).trigger("fontresize", [em]);
}
};
}(jQuery));
/*
* Window Height CSS rules
*/
;(function() {
var styleSheet;
var getWindowHeight = function() {
return window.innerHeight || document.documentElement.clientHeight;
};
var createStyleTag = function() {
// create style tag
var styleTag = jQuery('<style>').appendTo('head');
styleSheet = styleTag.prop('sheet') || styleTag.prop('styleSheet');
// crossbrowser style handling
var addCSSRule = function(selector, rules, index) {
if(styleSheet.insertRule) {
styleSheet.insertRule(selector + '{' + rules + '}', index);
} else {
styleSheet.addRule(selector, rules, index);
}
};
// create style rules
addCSSRule('.win-min-height', 'min-height:0');
addCSSRule('.win-height', 'height:auto');
addCSSRule('.win-max-height', 'max-height:100%');
resizeHandler();
};
var resizeHandler = function() {
// handle changes in style rules
var currentWindowHeight = getWindowHeight(),
styleRules = styleSheet.cssRules || styleSheet.rules;
jQuery.each(styleRules, function(index, currentRule) {
var currentProperty = currentRule.selectorText.toLowerCase().replace('.win-', '').replace('-h','H');
currentRule.style[currentProperty] = currentWindowHeight + 'px';
});
};
createStyleTag();
jQuery(window).on('resize orientationchange', resizeHandler);
}());
/*! Hammer.JS - v2.0.4 - 2014-09-28
* http://hammerjs.github.io/
*
* Copyright (c) 2014 Jorik Tangelder;
* Licensed under the MIT license */
if(Object.create){!function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(k(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function h(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a}function i(a,b){return h(a,b,!0)}function j(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&h(d,c)}function k(a,b){return function(){return a.apply(b,arguments)}}function l(a,b){return typeof a==kb?a.apply(b?b[0]||d:d,b):a}function m(a,b){return a===d?b:a}function n(a,b,c){g(r(b),function(b){a.addEventListener(b,c,!1)})}function o(a,b,c){g(r(b),function(b){a.removeEventListener(b,c,!1)})}function p(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function q(a,b){return a.indexOf(b)>-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function t(a){return Array.prototype.slice.call(a,0)}function u(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];s(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ib.length;){if(c=ib[g],e=c?c+f:b,e in a)return e;g++}return d}function w(){return ob++}function x(a){var b=a.ownerDocument;return b.defaultView||b.parentWindow}function y(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){l(a.options.enable,[a])&&c.handler(b)},this.init()}function z(a){var b,c=a.options.inputClass;return new(b=c?c:rb?N:sb?Q:qb?S:M)(a,A)}function A(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&yb&&d-e===0,g=b&(Ab|Bb)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,B(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function B(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=E(b)),e>1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:lb(a.pointers[c].clientX),clientY:lb(a.pointers[c].clientY)},c++;return{timeStamp:nb(),pointers:b,center:F(b),deltaX:a.deltaX,deltaY:a.deltaY}}function F(a){var b=a.length;if(1===b)return{x:lb(a[0].clientX),y:lb(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ab|Bb)&&delete d[g[e].identifier],e++;return h.length?[u(f.concat(h),"identifier",!0),h]:void 0}function S(){y.apply(this,arguments);var a=k(this.handler,this);this.touch=new Q(this.manager,a),this.mouse=new M(this.manager,a)}function T(a,b){this.manager=a,this.set(b)}function U(a){if(q(a,bc))return bc;var b=q(a,cc),c=q(a,dc);return b&&c?cc+" "+dc:b||c?b?cc:dc:q(a,ac)?ac:_b}function V(a){this.id=w(),this.manager=null,this.options=i(a||{},this.defaults),this.options.enable=m(this.options.enable,!0),this.state=ec,this.simultaneous={},this.requireFail=[]}function W(a){return a&jc?"cancel":a&hc?"end":a&gc?"move":a&fc?"start":""}function X(a){return a==Gb?"down":a==Fb?"up":a==Db?"left":a==Eb?"right":""}function Y(a,b){var c=b.manager;return c?c.get(a):a}function Z(){V.apply(this,arguments)}function $(){Z.apply(this,arguments),this.pX=null,this.pY=null}function _(){Z.apply(this,arguments)}function ab(){V.apply(this,arguments),this._timer=null,this._input=null}function bb(){Z.apply(this,arguments)}function cb(){Z.apply(this,arguments)}function db(){V.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function eb(a,b){return b=b||{},b.recognizers=m(b.recognizers,eb.defaults.preset),new fb(a,b)}function fb(a,b){b=b||{},this.options=i(b,eb.defaults),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.element=a,this.input=z(this),this.touchAction=new T(this,this.options.touchAction),gb(this,!0),g(b.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function gb(a,b){var c=a.element;g(a.options.cssProps,function(a,d){c.style[v(c.style,d)]=b?a:""})}function hb(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var ib=["","webkit","moz","MS","ms","o"],jb=b.createElement("div"),kb="function",lb=Math.round,mb=Math.abs,nb=Date.now,ob=1,pb=/mobile|tablet|ip(ad|hone|od)|android/i,qb="ontouchstart"in a,rb=v(a,"PointerEvent")!==d,sb=qb&&pb.test(navigator.userAgent),tb="touch",ub="pen",vb="mouse",wb="kinect",xb=25,yb=1,zb=2,Ab=4,Bb=8,Cb=1,Db=2,Eb=4,Fb=8,Gb=16,Hb=Db|Eb,Ib=Fb|Gb,Jb=Hb|Ib,Kb=["x","y"],Lb=["clientX","clientY"];y.prototype={handler:function(){},init:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&o(this.element,this.evEl,this.domHandler),this.evTarget&&o(this.target,this.evTarget,this.domHandler),this.evWin&&o(x(this.element),this.evWin,this.domHandler)}};var Mb={mousedown:yb,mousemove:zb,mouseup:Ab},Nb="mousedown",Ob="mousemove mouseup";j(M,y,{handler:function(a){var b=Mb[a.type];b&yb&&0===a.button&&(this.pressed=!0),b&zb&&1!==a.which&&(b=Ab),this.pressed&&this.allow&&(b&Ab&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:vb,srcEvent:a}))}});var Pb={pointerdown:yb,pointermove:zb,pointerup:Ab,pointercancel:Bb,pointerout:Bb},Qb={2:tb,3:ub,4:vb,5:wb},Rb="pointerdown",Sb="pointermove pointerup pointercancel";a.MSPointerEvent&&(Rb="MSPointerDown",Sb="MSPointerMove MSPointerUp MSPointerCancel"),j(N,y,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=Pb[d],f=Qb[a.pointerType]||a.pointerType,g=f==tb,h=s(b,a.pointerId,"pointerId");e&yb&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(kc|ec)))return!1;a++}return!0},recognize:function(a){var b=h({},a);return l(this.options.enable,[this,b])?(this.state&(ic|jc|kc)&&(this.state=ec),this.state=this.process(b),void(this.state&(fc|gc|hc|jc)&&this.tryEmit(b))):(this.reset(),void(this.state=kc))},process:function(){},getTouchAction:function(){},reset:function(){}},j(Z,V,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(fc|gc),e=this.attrTest(a);return d&&(c&Bb||!e)?b|jc:d||e?c&Ab?b|hc:b&fc?b|gc:fc:kc}}),j($,Z,{defaults:{event:"pan",threshold:10,pointers:1,direction:Jb},getTouchAction:function(){var a=this.options.direction,b=[];return a&Hb&&b.push(dc),a&Ib&&b.push(cc),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&Hb?(e=0===f?Cb:0>f?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&yb&&0===this.count)return this.failTimeout();if(d&&f&&c){if(a.eventType!=Ab)return this.failTimeout();var g=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||I(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;var i=this.count%b.taps;if(0===i)return this.hasRequireFailures()?(this._timer=e(function(){this.state=ic,this.tryEmit()},b.interval,this),fc):ic}return kc},failTimeout:function(){return this._timer=e(function(){this.state=kc},this.options.interval,this),kc},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ic&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),eb.VERSION="2.0.4",eb.defaults={domEvents:!1,touchAction:$b,enable:!0,inputTarget:null,inputClass:null,preset:[[bb,{enable:!1}],[_,{enable:!1},["rotate"]],[cb,{direction:Hb}],[$,{direction:Hb},["swipe"]],[db],[db,{event:"doubletap",taps:2},["tap"]],[ab]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var lc=1,mc=2;fb.prototype={set:function(a){return h(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?mc:lc},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&ic)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===mc||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(fc|gc|hc)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof V)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(f(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,"remove",this))return this;var b=this.recognizers;return a=this.get(a),b.splice(s(b,a),1),this.touchAction.update(),this},on:function(a,b){var c=this.handlers;return g(r(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this},off:function(a,b){var c=this.handlers;return g(r(a),function(a){b?c[a].splice(s(c[a],b),1):delete c[a]}),this},emit:function(a,b){this.options.domEvents&&hb(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&gb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},h(eb,{INPUT_START:yb,INPUT_MOVE:zb,INPUT_END:Ab,INPUT_CANCEL:Bb,STATE_POSSIBLE:ec,STATE_BEGAN:fc,STATE_CHANGED:gc,STATE_ENDED:hc,STATE_RECOGNIZED:ic,STATE_CANCELLED:jc,STATE_FAILED:kc,DIRECTION_NONE:Cb,DIRECTION_LEFT:Db,DIRECTION_RIGHT:Eb,DIRECTION_UP:Fb,DIRECTION_DOWN:Gb,DIRECTION_HORIZONTAL:Hb,DIRECTION_VERTICAL:Ib,DIRECTION_ALL:Jb,Manager:fb,Input:y,TouchAction:T,TouchInput:Q,MouseInput:M,PointerEventInput:N,TouchMouseInput:S,SingleTouchInput:O,Recognizer:V,AttrRecognizer:Z,Tap:db,Pan:$,Swipe:cb,Pinch:_,Rotate:bb,Press:ab,on:n,off:o,each:g,merge:i,extend:h,inherit:j,bindFn:k,prefixed:v}),typeof define==kb&&define.amd?define(function(){return eb}):"undefined"!=typeof module&&module.exports?module.exports=eb:a[c]=eb}(window,document,"Hammer");}
/*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
!function(a){function b(a){var b=a.length,d=c.type(a);return"function"===d||c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||0===b||"number"==typeof b&&b>0&&b-1 in a}if(!a.jQuery){var c=function(a,b){return new c.fn.init(a,b)};c.isWindow=function(a){return null!=a&&a==a.window},c.type=function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a},c.isArray=Array.isArray||function(a){return"array"===c.type(a)},c.isPlainObject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(b in a);return void 0===b||f.call(a,b)},c.each=function(a,c,d){var e,f=0,g=a.length,h=b(a);if(d){if(h)for(;g>f&&(e=c.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=c.apply(a[f],d),e===!1)break}else if(h)for(;g>f&&(e=c.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=c.call(a[f],f,a[f]),e===!1)break;return a},c.data=function(a,b,e){if(void 0===e){var f=a[c.expando],g=f&&d[f];if(void 0===b)return g;if(g&&b in g)return g[b]}else if(void 0!==b){var f=a[c.expando]||(a[c.expando]=++c.uuid);return d[f]=d[f]||{},d[f][b]=e,e}},c.removeData=function(a,b){var e=a[c.expando],f=e&&d[e];f&&c.each(b,function(a,b){delete f[b]})},c.extend=function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for