diff --git a/fangija-zsyf/css/light7-swiper.css b/fangija-zsyf/css/light7-swiper.css
new file mode 100644
index 0000000..f2108bc
--- /dev/null
+++ b/fangija-zsyf/css/light7-swiper.css
@@ -0,0 +1,857 @@
+/*!
+ * =====================================================
+ * light7 V0.4.3 - http://light7.org/
+ *
+ * =====================================================
+ */
+
+/*.hairline(@position, @color) when (@position = top) {
+ &:before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: auto;
+ right: auto;
+ height: 1px;
+ width: 100%;
+ background-color: @color;
+ display: block;
+ z-index: 15;
+ transform-origin: 50% 0%;
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
+ transform: scaleY(0.5);
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 3) {
+ transform: scaleY(0.33);
+ }
+ }
+}
+.hairline(@position, @color) when (@position = left) {
+ &:before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: auto;
+ right: auto;
+ width: 1px;
+ height: 100%;
+ background-color: @color;
+ display: block;
+ z-index: 15;
+ transform-origin: 0% 50%;
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
+ transform: scaleY(0.5);
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 3) {
+ transform: scaleY(0.33);
+ }
+ }
+}
+.hairline(@position, @color) when (@position = bottom) {
+ &:after {
+ content: '';
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ right: auto;
+ top: auto;
+ height: 1px;
+ width: 100%;
+ background-color: @color;
+ display: block;
+ z-index: 15;
+ transform-origin: 50% 100%;
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
+ transform: scaleY(0.5);
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 3) {
+ transform: scaleY(0.33);
+ }
+ }
+}
+.hairline(@position, @color) when (@position = right) {
+ &:after {
+ content: '';
+ position: absolute;
+ right: 0;
+ top: 0;
+ left: auto;
+ bottom: auto;
+ width: 1px;
+ height: 100%;
+ background-color: @color;
+ display: block;
+ z-index: 15;
+ transform-origin: 100% 50%;
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
+ transform: scaleY(0.5);
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 3) {
+ transform: scaleY(0.33);
+ }
+ }
+}
+// For right and bottom
+.hairline-remove(@position) when not (@position = left) and not (@position = top) {
+ &:after {
+ display: none;
+ }
+}
+// For left and top
+.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
+ &:before {
+ display: none;
+ }
+}
+// For right and bottom
+.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
+ &:after {
+ background-color: @color;
+ }
+}
+// For left and top
+.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
+ &:before {
+ background-color: @color;
+ }
+}*/
+/*.transition(@d) {
+ -webkit-transition-duration: @d;
+ transition-duration: @d;
+}
+.delay(@d) {
+ -webkit-transition-delay: @d;
+ transition-delay: @d;
+}
+.transform(@t) {
+ -webkit-transform: @t;
+ transform: @t;
+}
+.transform-origin(@to) {
+ -webkit-transform-origin: @to;
+ transform-origin: @to;
+}
+.translate3d(@x:0, @y:0, @z:0) {
+ -webkit-transform: translate3d(@x,@y,@z);
+ transform: translate3d(@x,@y,@z);
+}
+.animation(@a) {
+ -webkit-animation: @a;
+ animation: @a;
+}
+.border-box(){
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.box-shadow(@bs) {
+ -webkit-box-shadow: @bs;
+ box-shadow: @bs;
+}
+.animation-name(@name) {
+ -webkit-animation-name: @name;
+ -moz-animation-name: @name;
+ animation-name: @name;
+}
+.animation-duration(@duration) {
+ -webkit-animation-duration: @duration;
+ -moz-animation-duration: @duration;
+ animation-duration: @duration;
+}
+.animation-direction(@direction) {
+ -webkit-animation-direction: @direction;
+ -moz-animation-direction: @direction;
+ animation-direction: @direction;
+}
+*/
+/* === Photo Browser === */
+.photo-browser {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10500;
+}
+.photo-browser .bar-tab .tab-item .icon {
+ width: 14px;
+ height: 14px;
+ margin-top: -5px;
+}
+.photo-browser .bar-tab ~ .photo-browser-captions {
+ bottom: 52px;
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.photo-browser.photo-browser-in {
+ display: block;
+ -webkit-animation: photoBrowserIn 400ms forwards;
+ -o-animation: photoBrowserIn 400ms forwards;
+ animation: photoBrowserIn 400ms forwards;
+}
+.photo-browser.photo-browser-out {
+ display: block;
+ -webkit-animation: photoBrowserOut 400ms forwards;
+ -o-animation: photoBrowserOut 400ms forwards;
+ animation: photoBrowserOut 400ms forwards;
+}
+html.with-statusbar-overlay .photo-browser {
+ height: -webkit-calc(100% - 1rem);
+ height: calc(100% - 1rem);
+ top: 1rem;
+}
+.popup > .photo-browser .navbar,
+body > .photo-browser .navbar,
+.popup > .photo-browser .toolbar,
+body > .photo-browser .toolbar {
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.photo-browser .page[data-page="photo-browser-slides"] {
+ background: none;
+}
+.photo-browser .page {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background: #efeff4;
+}
+.photo-browser .view {
+ overflow: hidden;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ position: relative;
+ width: 100%;
+ height: 100%;
+ z-index: 5000;
+}
+.page[data-page="photo-browser-slides"] .toolbar a {
+ color: #4cd964;
+}
+.photo-browser-popup {
+ background: none;
+}
+.photo-browser .navbar,
+.view[data-page="photo-browser-slides"] .navbar,
+.photo-browser .toolbar,
+.view[data-page="photo-browser-slides"] .toolbar {
+ background: rgba(247, 247, 247, 0.95);
+ -webkit-transition: 400ms;
+ -o-transition: 400ms;
+ transition: 400ms;
+}
+.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .navbar,
+.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .toolbar {
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.photo-browser-exposed .navbar,
+.photo-browser-exposed .toolbar {
+ opacity: 0;
+ visibility: hidden;
+ pointer-events: none;
+}
+.photo-browser-exposed .photo-browser-swiper-container {
+ background: #000;
+}
+.photo-browser-of {
+ margin: 0 0.25rem;
+}
+.photo-browser-captions {
+ pointer-events: none;
+ position: absolute;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ z-index: 10;
+ opacity: 1;
+ -webkit-transition: 400ms;
+ -o-transition: 400ms;
+ transition: 400ms;
+}
+.photo-browser-captions.photo-browser-captions-exposed {
+ opacity: 0;
+}
+.toolbar ~ .photo-browser-captions {
+ bottom: 2.2rem;
+ -webkit-transform: translate3d(0, 0rem, 0);
+ transform: translate3d(0, 0rem, 0);
+}
+.photo-browser-exposed .toolbar ~ .photo-browser-captions {
+ -webkit-transform: translate3d(0, 2.2rem, 0);
+ transform: translate3d(0, 2.2rem, 0);
+}
+.toolbar ~ .photo-browser-captions.photo-browser-captions-exposed {
+ transformt: ranslate3d(0, 0rem, 0);
+}
+.photo-browser-caption {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ -webkit-transition: 300ms;
+ -o-transition: 300ms;
+ transition: 300ms;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ opacity: 0;
+ padding: 0.2rem 0.25px;
+ width: 100%;
+ text-align: center;
+ color: #fff;
+ background: rgba(0, 0, 0, 0.8);
+}
+.photo-browser-caption:empty {
+ display: none;
+}
+.photo-browser-caption.photo-browser-caption-active {
+ opacity: 1;
+}
+.photo-browser-captions-light .photo-browser-caption {
+ background: rgba(255, 255, 255, 0.8);
+ color: #3d4145;
+}
+.photo-browser-exposed .photo-browser-caption {
+ color: #fff;
+ background: rgba(0, 0, 0, 0.8);
+}
+.photo-browser-swiper-container {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ background: #fff;
+ -webkit-transition: 400ms;
+ -o-transition: 400ms;
+ transition: 400ms;
+}
+.photo-browser-swiper-wrapper {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+}
+.photo-browser-link-inactive {
+ opacity: 0.3;
+}
+.photo-browser-slide {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ overflow: hidden;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-flex-shrink: 0;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.photo-browser-slide.transitioning {
+ -webkit-transition: 400ms;
+ -o-transition: 400ms;
+ transition: 400ms;
+}
+.photo-browser-slide span.photo-browser-zoom-container {
+ width: 100%;
+ text-align: center;
+ display: none;
+}
+.photo-browser-slide img {
+ width: auto;
+ height: auto;
+ max-width: 100%;
+ max-height: 100%;
+ display: none;
+}
+.photo-browser-slide.swiper-slide-active span.photo-browser-zoom-container,
+.photo-browser-slide.swiper-slide-next span.photo-browser-zoom-container,
+.photo-browser-slide.swiper-slide-prev span.photo-browser-zoom-container {
+ display: block;
+}
+.photo-browser-slide.swiper-slide-active img,
+.photo-browser-slide.swiper-slide-next img,
+.photo-browser-slide.swiper-slide-prev img {
+ display: inline;
+}
+.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader,
+.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader,
+.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader {
+ display: block;
+}
+.photo-browser-slide iframe {
+ width: 100%;
+ height: 100%;
+}
+.photo-browser-slide .preloader {
+ display: none;
+ position: absolute;
+ width: 2.1rem;
+ height: 2.1rem;
+ margin-left: -2.1rem;
+ margin-top: -2.1rem;
+ left: 50%;
+ top: 50%;
+}
+.photo-browser-dark .navbar,
+.photo-browser-dark .toolbar {
+ background: rgba(30, 30, 30, 0.8);
+ color: #fff;
+}
+.photo-browser-dark .navbar:before,
+.photo-browser-dark .toolbar:before {
+ display: none;
+}
+.photo-browser-dark .navbar:after,
+.photo-browser-dark .toolbar:after {
+ display: none;
+}
+.photo-browser-dark .navbar a,
+.photo-browser-dark .toolbar a {
+ color: #fff;
+}
+.photo-browser-dark .photo-browser-swiper-container {
+ background: #000;
+}
+@-webkit-keyframes photoBrowserIn {
+ 0% {
+ -webkit-transform: translate3d(0, 0, 0) scale(0.5);
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+ 100% {
+ -webkit-transform: translate3d(0, 0, 0) scale(1);
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+}
+@-o-keyframes photoBrowserIn {
+ 0% {
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+ 100% {
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+}
+@keyframes photoBrowserIn {
+ 0% {
+ -webkit-transform: translate3d(0, 0, 0) scale(0.5);
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+ 100% {
+ -webkit-transform: translate3d(0, 0, 0) scale(1);
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+}
+@-webkit-keyframes photoBrowserOut {
+ 0% {
+ -webkit-transform: translate3d(0, 0, 0) scale(1);
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+ 100% {
+ -webkit-transform: translate3d(0, 0, 0) scale(0.5);
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+}
+@-o-keyframes photoBrowserOut {
+ 0% {
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+ 100% {
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+}
+@keyframes photoBrowserOut {
+ 0% {
+ -webkit-transform: translate3d(0, 0, 0) scale(1);
+ transform: translate3d(0, 0, 0) scale(1);
+ opacity: 1;
+ }
+ 100% {
+ -webkit-transform: translate3d(0, 0, 0) scale(0.5);
+ transform: translate3d(0, 0, 0) scale(0.5);
+ opacity: 0;
+ }
+}
+/* === Swiper === */
+.swiper-container {
+ margin: 0 auto;
+ position: relative;
+ overflow: hidden;
+ padding-bottom: 30px;
+ /* Fix of Webkit flickering */
+ z-index: 1;
+}
+.swiper-container-no-flexbox .swiper-slide {
+ float: left;
+}
+.swiper-container-vertical > .swiper-wrapper {
+ -webkit-box-orient: vertical;
+ -ms-flex-direction: column;
+ -webkit-flex-direction: column;
+ flex-direction: column;
+}
+.swiper-wrapper {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-transform-style: preserve-3d;
+ -ms-transform-style: preserve-3d;
+ transform-style: preserve-3d;
+ -webkit-transition-property: -webkit-transform;
+ -o-transition-property: -o-transform;
+ transition-property: transform;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+.swiper-container-android .swiper-slide,
+.swiper-wrapper {
+ -webkit-transform: translate3d(0px, 0, 0);
+ -o-transform: translate(0px, 0px);
+ -ms-transform: translate3d(0px, 0, 0);
+ transform: translate3d(0px, 0, 0);
+}
+.swiper-container-multirow > .swiper-wrapper {
+ -webkit-box-lines: multiple;
+ -moz-box-lines: multiple;
+ -ms-fles-wrap: wrap;
+ -webkit-flex-wrap: wrap;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+}
+.swiper-container-free-mode > .swiper-wrapper {
+ -webkit-transition-timing-function: ease-out;
+ -o-transition-timing-function: ease-out;
+ transition-timing-function: ease-out;
+ margin: 0 auto;
+}
+.swiper-slide {
+ -webkit-transform-style: preserve-3d;
+ -ms-transform-style: preserve-3d;
+ transform-style: preserve-3d;
+ -webkit-flex-shrink: 0;
+ -ms-flex: 0 0 auto;
+ -webkit-flex-shrink: 0;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ width: 100%;
+ height: 100%;
+ position: relative;
+}
+/* a11y */
+.swiper-container .swiper-notification {
+ position: absolute;
+ left: 0;
+ top: 0;
+ pointer-events: none;
+ opacity: 0;
+ z-index: -1000;
+}
+/* IE10 Windows Phone 8 Fixes */
+.swiper-wp8-horizontal {
+ -ms-touch-action: pan-y;
+ touch-action: pan-y;
+}
+.swiper-wp8-vertical {
+ -ms-touch-action: pan-x;
+ touch-action: pan-x;
+}
+/* Arrows */
+.swiper-button-prev,
+.swiper-button-next {
+ position: absolute;
+ top: 50%;
+ width: 27px;
+ height: 44px;
+ margin-top: -22px;
+ z-index: 10;
+ cursor: pointer;
+ background-size: 27px 44px;
+ background-position: center;
+ background-repeat: no-repeat;
+}
+.swiper-button-prev.swiper-button-disabled,
+.swiper-button-next.swiper-button-disabled {
+ opacity: 0.35;
+ cursor: auto;
+ pointer-events: none;
+}
+.swiper-button-prev,
+.swiper-container-rtl .swiper-button-next {
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
+ left: 10px;
+ right: auto;
+}
+.swiper-button-next,
+.swiper-container-rtl .swiper-button-prev {
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
+ right: 10px;
+ left: auto;
+}
+/* Pagination Styles */
+.swiper-pagination {
+ position: absolute;
+ text-align: center;
+ -webkit-transition: 300ms;
+ -o-transition: 300ms;
+ transition: 300ms;
+ -webkit-transform: translate3d(0, 0, 0);
+ -ms-transform: translate3d(0, 0, 0);
+ -o-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ z-index: 10;
+}
+.swiper-pagination.swiper-pagination-hidden {
+ opacity: 0;
+}
+.swiper-pagination-bullet {
+ width: 8px;
+ height: 8px;
+ display: inline-block;
+ border-radius: 100%;
+ background: #000;
+ opacity: 0.2;
+}
+.swiper-pagination-bullet-active {
+ opacity: 1;
+ background: #007aff;
+}
+.swiper-container-vertical > .swiper-pagination {
+ right: 10px;
+ top: 50%;
+ -webkit-transform: translate3d(0px, -50%, 0);
+ -o-transform: translate(0px, -50%);
+ -ms-transform: translate3d(0px, -50%, 0);
+ transform: translate3d(0px, -50%, 0);
+}
+.swiper-container-vertical > .swiper-pagination .swiper-pagination-bullet {
+ margin: 5px 0;
+ display: block;
+}
+.swiper-container-horizontal > .swiper-pagination {
+ bottom: 10px;
+ left: 0;
+ width: 100%;
+}
+.swiper-container-horizontal > .swiper-pagination .swiper-pagination-bullet {
+ margin: 0 5px;
+}
+/* 3D Container */
+.swiper-container-3d {
+ -webkit-perspective: 1200px;
+ -o-perspective: 1200px;
+ perspective: 1200px;
+}
+.swiper-container-3d .swiper-wrapper,
+.swiper-container-3d .swiper-slide,
+.swiper-container-3d .swiper-slide-shadow-left,
+.swiper-container-3d .swiper-slide-shadow-right,
+.swiper-container-3d .swiper-slide-shadow-top,
+.swiper-container-3d .swiper-slide-shadow-bottom,
+.swiper-container-3d .swiper-cube-shadow {
+ -webkit-transform-style: preserve-3d;
+ -ms-transform-style: preserve-3d;
+ transform-style: preserve-3d;
+}
+.swiper-container-3d .swiper-slide-shadow-left,
+.swiper-container-3d .swiper-slide-shadow-right,
+.swiper-container-3d .swiper-slide-shadow-top,
+.swiper-container-3d .swiper-slide-shadow-bottom {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ pointer-events: none;
+ z-index: 10;
+}
+.swiper-container-3d .swiper-slide-shadow-left {
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ /* Safari 4+, Chrome */
+ background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Chrome 10+, Safari 5.1+, iOS 5+ */
+ /* Firefox 3.6-15 */
+ background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Opera 11.10-12.00 */
+ background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Firefox 16+, IE10, Opera 12.50+ */
+}
+.swiper-container-3d .swiper-slide-shadow-right {
+ background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ /* Safari 4+, Chrome */
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Chrome 10+, Safari 5.1+, iOS 5+ */
+ /* Firefox 3.6-15 */
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Opera 11.10-12.00 */
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Firefox 16+, IE10, Opera 12.50+ */
+}
+.swiper-container-3d .swiper-slide-shadow-top {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ /* Safari 4+, Chrome */
+ background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Chrome 10+, Safari 5.1+, iOS 5+ */
+ /* Firefox 3.6-15 */
+ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Opera 11.10-12.00 */
+ background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Firefox 16+, IE10, Opera 12.50+ */
+}
+.swiper-container-3d .swiper-slide-shadow-bottom {
+ background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ /* Safari 4+, Chrome */
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Chrome 10+, Safari 5.1+, iOS 5+ */
+ /* Firefox 3.6-15 */
+ background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Opera 11.10-12.00 */
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
+ /* Firefox 16+, IE10, Opera 12.50+ */
+}
+/* Coverflow */
+.swiper-container-coverflow .swiper-wrapper {
+ /* Windows 8 IE 10 fix */
+ -ms-perspective: 1200px;
+}
+/* Fade */
+.swiper-container-fade.swiper-container-free-mode .swiper-slide {
+ -webkit-transition-timing-function: ease-out;
+ -o-transition-timing-function: ease-out;
+ transition-timing-function: ease-out;
+}
+.swiper-container-fade .swiper-slide {
+ pointer-events: none;
+}
+.swiper-container-fade .swiper-slide-active {
+ pointer-events: auto;
+}
+/* Cube */
+.swiper-container-cube {
+ overflow: visible;
+}
+.swiper-container-cube .swiper-slide {
+ pointer-events: none;
+ visibility: hidden;
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ -o-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-backface-visibility: hidden;
+ -ms-backface-visibility: hidden;
+ backface-visibility: hidden;
+ width: 100%;
+ height: 100%;
+}
+.swiper-container-cube.swiper-container-rtl .swiper-slide {
+ -webkit-transform-origin: 100% 0;
+ -ms-transform-origin: 100% 0;
+ -o-transform-origin: 100% 0;
+ transform-origin: 100% 0;
+}
+.swiper-container-cube .swiper-slide-active,
+.swiper-container-cube .swiper-slide-next,
+.swiper-container-cube .swiper-slide-prev,
+.swiper-container-cube .swiper-slide-next + .swiper-slide {
+ pointer-events: auto;
+ visibility: visible;
+}
+.swiper-container-cube .swiper-cube-shadow {
+ position: absolute;
+ left: 0;
+ bottom: 0px;
+ width: 100%;
+ height: 100%;
+ background: #000;
+ opacity: 0.6;
+ -webkit-filter: blur(50px);
+ filter: blur(50px);
+}
+.swiper-container-cube.swiper-container-vertical .swiper-cube-shadow {
+ z-index: 0;
+}
+/* Scrollbar */
+.swiper-scrollbar {
+ border-radius: 10px;
+ position: relative;
+ -ms-touch-action: none;
+ background: rgba(0, 0, 0, 0.1);
+}
+.swiper-container-horizontal > .swiper-scrollbar {
+ position: absolute;
+ left: 1%;
+ bottom: 3px;
+ z-index: 50;
+ height: 5px;
+ width: 98%;
+}
+.swiper-container-vertical > .swiper-scrollbar {
+ position: absolute;
+ right: 3px;
+ top: 1%;
+ z-index: 50;
+ width: 5px;
+ height: 98%;
+}
+.swiper-scrollbar-drag {
+ height: 100%;
+ width: 100%;
+ position: relative;
+ background: rgba(0, 0, 0, 0.5);
+ border-radius: 10px;
+ left: 0;
+ top: 0;
+}
+.swiper-scrollbar-cursor-drag {
+ cursor: move;
+}
+/* Preloader */
+.swiper-slide .preloader {
+ width: 42px;
+ height: 42px;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ margin-left: -21px;
+ margin-top: -21px;
+ z-index: 10;
+}
+.swiper-slide img {
+ display: block;
+}
diff --git a/fangija-zsyf/css/light7-swiper.min.css b/fangija-zsyf/css/light7-swiper.min.css
new file mode 100644
index 0000000..807a268
--- /dev/null
+++ b/fangija-zsyf/css/light7-swiper.min.css
@@ -0,0 +1,115 @@
+/*!
+ * =====================================================
+ * light7 V0.4.3 - http://light7.org/
+ *
+ * =====================================================
+ */
+.photo-browser{position:absolute;left:0;top:0;width:100%;height:100%;z-index:10500}
+.photo-browser .bar-tab .tab-item .icon{width:14px;height:14px;margin-top:-5px}
+.photo-browser .bar-tab~.photo-browser-captions{bottom:52px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
+.photo-browser.photo-browser-in{display:block;-webkit-animation:photoBrowserIn .4s forwards;-o-animation:photoBrowserIn .4s forwards;animation:photoBrowserIn .4s forwards}
+.photo-browser.photo-browser-out{display:block;-webkit-animation:photoBrowserOut .4s forwards;-o-animation:photoBrowserOut .4s forwards;animation:photoBrowserOut .4s forwards}
+html.with-statusbar-overlay .photo-browser{height:-webkit-calc(100% - 1rem);height:calc(100% - 1rem);top:1rem}
+.popup>.photo-browser .navbar,.popup>.photo-browser .toolbar,body>.photo-browser .navbar,body>.photo-browser .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
+.photo-browser .page[data-page=photo-browser-slides]{background:0 0}
+.photo-browser .page{-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;background:#efeff4}
+.photo-browser .view{overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;width:100%;height:100%;z-index:5000}
+.page[data-page=photo-browser-slides] .toolbar a{color:#4cd964}
+.photo-browser-popup{background:0 0}
+.photo-browser .navbar,.photo-browser .toolbar,.view[data-page=photo-browser-slides] .navbar,.view[data-page=photo-browser-slides] .toolbar{background:rgba(247,247,247,.95);-webkit-transition:.4s;-o-transition:.4s;transition:.4s}
+.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .navbar,.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
+.photo-browser-exposed .navbar,.photo-browser-exposed .toolbar{opacity:0;visibility:hidden;pointer-events:none}
+.photo-browser-exposed .photo-browser-swiper-container{background:#000}
+.photo-browser-of{margin:0 .25rem}
+.photo-browser-captions{pointer-events:none;position:absolute;left:0;width:100%;bottom:0;z-index:10;opacity:1;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}
+.photo-browser-captions.photo-browser-captions-exposed{opacity:0}
+.toolbar~.photo-browser-captions{bottom:2.2rem;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
+.photo-browser-exposed .toolbar~.photo-browser-captions{-webkit-transform:translate3d(0,2.2rem,0);transform:translate3d(0,2.2rem,0)}
+.toolbar~.photo-browser-captions.photo-browser-captions-exposed{transformt:ranslate3d(0,0,0)}
+.photo-browser-caption{-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;position:absolute;bottom:0;left:0;opacity:0;padding:.2rem .25px;width:100%;text-align:center;color:#fff;background:rgba(0,0,0,.8)}
+.photo-browser-caption:empty{display:none}
+.photo-browser-caption.photo-browser-caption-active{opacity:1}
+.photo-browser-captions-light .photo-browser-caption{background:rgba(255,255,255,.8);color:#3d4145}
+.photo-browser-exposed .photo-browser-caption{color:#fff;background:rgba(0,0,0,.8)}
+.photo-browser-swiper-container{position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;background:#fff;-webkit-transition:.4s;-o-transition:.4s;transition:.4s}
+.photo-browser-swiper-wrapper{position:absolute;left:0;top:0;width:100%;height:100%;padding:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
+.photo-browser-link-inactive{opacity:.3}
+.photo-browser-slide{width:100%;height:100%;position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-moz-box-sizing:border-box;box-sizing:border-box}
+.photo-browser-slide.transitioning{-webkit-transition:.4s;-o-transition:.4s;transition:.4s}
+.photo-browser-slide span.photo-browser-zoom-container{width:100%;text-align:center;display:none}
+.photo-browser-slide img{width:auto;height:auto;max-width:100%;max-height:100%;display:none}
+.photo-browser-slide.swiper-slide-active span.photo-browser-zoom-container,.photo-browser-slide.swiper-slide-next span.photo-browser-zoom-container,.photo-browser-slide.swiper-slide-prev span.photo-browser-zoom-container{display:block}
+.photo-browser-slide.swiper-slide-active img,.photo-browser-slide.swiper-slide-next img,.photo-browser-slide.swiper-slide-prev img{display:inline}
+.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader{display:block}
+.photo-browser-slide iframe{width:100%;height:100%}
+.photo-browser-slide .preloader{display:none;position:absolute;width:2.1rem;height:2.1rem;margin-left:-2.1rem;margin-top:-2.1rem;left:50%;top:50%}
+.photo-browser-dark .navbar,.photo-browser-dark .toolbar{background:rgba(30,30,30,.8);color:#fff}
+.photo-browser-dark .navbar:before,.photo-browser-dark .toolbar:before{display:none}
+.photo-browser-dark .navbar:after,.photo-browser-dark .toolbar:after{display:none}
+.photo-browser-dark .navbar a,.photo-browser-dark .toolbar a{color:#fff}
+.photo-browser-dark .photo-browser-swiper-container{background:#000}
+@-webkit-keyframes photoBrowserIn{0%{-webkit-transform:translate3d(0,0,0) scale(.5);transform:translate3d(0,0,0) scale(.5);opacity:0}
+100%{-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1);opacity:1}
+}
+@-o-keyframes photoBrowserIn{0%{transform:translate3d(0,0,0) scale(.5);opacity:0}
+100%{transform:translate3d(0,0,0) scale(1);opacity:1}
+}
+@keyframes photoBrowserIn{0%{-webkit-transform:translate3d(0,0,0) scale(.5);transform:translate3d(0,0,0) scale(.5);opacity:0}
+100%{-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1);opacity:1}
+}
+@-webkit-keyframes photoBrowserOut{0%{-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1);opacity:1}
+100%{-webkit-transform:translate3d(0,0,0) scale(.5);transform:translate3d(0,0,0) scale(.5);opacity:0}
+}
+@-o-keyframes photoBrowserOut{0%{transform:translate3d(0,0,0) scale(1);opacity:1}
+100%{transform:translate3d(0,0,0) scale(.5);opacity:0}
+}
+@keyframes photoBrowserOut{0%{-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1);opacity:1}
+100%{-webkit-transform:translate3d(0,0,0) scale(.5);transform:translate3d(0,0,0) scale(.5);opacity:0}
+}
+.swiper-container{margin:0 auto;position:relative;overflow:hidden;padding-bottom:30px;z-index:1}
+.swiper-container-no-flexbox .swiper-slide{float:left}
+.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}
+.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-property:-webkit-transform;-o-transition-property:-o-transform;transition-property:transform;-moz-box-sizing:content-box;box-sizing:content-box}
+.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);-o-transform:translate(0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
+.swiper-container-multirow>.swiper-wrapper{-webkit-box-lines:multiple;-moz-box-lines:multiple;-ms-fles-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
+.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}
+.swiper-slide{-webkit-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-flex-shrink:0;-ms-flex:0 0 auto;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative}
+.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}
+.swiper-wp8-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}
+.swiper-wp8-vertical{-ms-touch-action:pan-x;touch-action:pan-x}
+.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}
+.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}
+.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}
+.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}
+.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}
+.swiper-pagination.swiper-pagination-hidden{opacity:0}
+.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}
+.swiper-pagination-bullet-active{opacity:1;background:#007aff}
+.swiper-container-vertical>.swiper-pagination{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);-o-transform:translate(0,-50%);-ms-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}
+.swiper-container-vertical>.swiper-pagination .swiper-pagination-bullet{margin:5px 0;display:block}
+.swiper-container-horizontal>.swiper-pagination{bottom:10px;left:0;width:100%}
+.swiper-container-horizontal>.swiper-pagination .swiper-pagination-bullet{margin:0 5px}
+.swiper-container-3d{-webkit-perspective:1200px;-o-perspective:1200px;perspective:1200px}
+.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}
+.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}
+.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}
+.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}
+.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}
+.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}
+.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
+.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}
+.swiper-container-fade .swiper-slide{pointer-events:none}
+.swiper-container-fade .swiper-slide-active{pointer-events:auto}
+.swiper-container-cube{overflow:visible}
+.swiper-container-cube .swiper-slide{pointer-events:none;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;-o-transform-origin:0 0;transform-origin:0 0;-webkit-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;width:100%;height:100%}
+.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;-o-transform-origin:100% 0;transform-origin:100% 0}
+.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}
+.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px)}
+.swiper-container-cube.swiper-container-vertical .swiper-cube-shadow{z-index:0}
+.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}
+.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}
+.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}
+.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}
+.swiper-scrollbar-cursor-drag{cursor:move}
+.swiper-slide .preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10}
+.swiper-slide img{display:block}
\ No newline at end of file
diff --git a/fangija-zsyf/css/main.css b/fangija-zsyf/css/main.css
index 31304a1..41a854b 100644
--- a/fangija-zsyf/css/main.css
+++ b/fangija-zsyf/css/main.css
@@ -996,11 +996,10 @@ input::-webkit-input-placeholder{
.cardRankingBox01 .cardRanking .card-footer{padding:0;border-right:solid 1px #e7e7e7;}
.cardRankingBox01 .cardRanking .card-footer em{color:#EB5F34;}
-.mod_control{position:absolute;top:11.7rem;left:50%;margin-left:-22px;z-index:10000;}
-.mod_tag{margin:0;padding:0;overflow:hidden;}
-.mod_tag li{float:left;width:8px;height:8px;border:solid 1px #d7d7d7;border-radius:50%;background-color:rgba(255,255,255,0.5);margin-right:10px;list-style:none;margin-top:0;padding:0;}
-.mod_tag li:last-child{margin-right:0;}
-.mod_tag .current{background:#F18D00;border:solid 1px #F18D00;}
+.swiper-container{height:auto;padding-bottom:0;}
+.swiper-pagination-bullet{background:none;border:solid 1px #d7d7d7;opacity:1;}
+.swiper-pagination-bullet-active{background:#F18D00;border:solid 1px #F18D00;}
+.swiper-container-horizontal > .swiper-pagination{top:11.2rem;bottom:inherit;}
/* 贷款 */
.banner{width:100%;height:80px;background:url(../images/banner.png);background-size:100%;margin-bottom:0.5rem;}
diff --git a/fangija-zsyf/fangija-zsyf/index.html b/fangija-zsyf/fangija-zsyf/index.html
deleted file mode 100644
index a9d1c8d..0000000
--- a/fangija-zsyf/fangija-zsyf/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/fangija-zsyf/js/light7-swiper.js b/fangija-zsyf/js/light7-swiper.js
new file mode 100644
index 0000000..df50240
--- /dev/null
+++ b/fangija-zsyf/js/light7-swiper.js
@@ -0,0 +1,4414 @@
+/*!
+ * =====================================================
+ * light7 V0.4.3 - http://light7.org/
+ *
+ * =====================================================
+ */
+/**
+ * Swiper 3.3.1
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
+ *
+ * http://www.idangero.us/swiper/
+ *
+ * Copyright 2016, Vladimir Kharlampidi
+ * The iDangero.us
+ * http://www.idangero.us/
+ *
+ * Licensed under MIT
+ *
+ * Released on: February 7, 2016
+ */
+/* global $:true, jQuery: true, Dom7:true, Modernizr: true, DocumentTouch: true */
+/* jshint unused:false */
+/*jshint forin: false */
+/*jshint bitwise: false*/
+(function ($) {
+ 'use strict';
+ /*===========================
+ Swiper
+ ===========================*/
+ var defaults = {
+ direction: 'horizontal',
+ touchEventsTarget: 'container',
+ initialSlide: 0,
+ speed: 300,
+ // autoplay
+ autoplay: false,
+ autoplayDisableOnInteraction: true,
+ autoplayStopOnLast: false,
+ // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
+ iOSEdgeSwipeDetection: false,
+ iOSEdgeSwipeThreshold: 20,
+ // Free mode
+ freeMode: false,
+ freeModeMomentum: true,
+ freeModeMomentumRatio: 1,
+ freeModeMomentumBounce: true,
+ freeModeMomentumBounceRatio: 1,
+ freeModeSticky: false,
+ freeModeMinimumVelocity: 0.02,
+ // Autoheight
+ autoHeight: false,
+ // Set wrapper width
+ setWrapperSize: false,
+ // Virtual Translate
+ virtualTranslate: false,
+ // Effects
+ effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
+ coverflow: {
+ rotate: 50,
+ stretch: 0,
+ depth: 100,
+ modifier: 1,
+ slideShadows : true
+ },
+ flip: {
+ slideShadows : true,
+ limitRotation: true
+ },
+ cube: {
+ slideShadows: true,
+ shadow: true,
+ shadowOffset: 20,
+ shadowScale: 0.94
+ },
+ fade: {
+ crossFade: false
+ },
+ // Parallax
+ parallax: false,
+ // Scrollbar
+ scrollbar: null,
+ scrollbarHide: true,
+ scrollbarDraggable: false,
+ scrollbarSnapOnRelease: false,
+ // Keyboard Mousewheel
+ keyboardControl: false,
+ mousewheelControl: false,
+ mousewheelReleaseOnEdges: false,
+ mousewheelInvert: false,
+ mousewheelForceToAxis: false,
+ mousewheelSensitivity: 1,
+ // Hash Navigation
+ hashnav: false,
+ // Breakpoints
+ breakpoints: undefined,
+ // Slides grid
+ spaceBetween: 0,
+ slidesPerView: 1,
+ slidesPerColumn: 1,
+ slidesPerColumnFill: 'column',
+ slidesPerGroup: 1,
+ centeredSlides: false,
+ slidesOffsetBefore: 0, // in px
+ slidesOffsetAfter: 0, // in px
+ // Round length
+ roundLengths: false,
+ // Touches
+ touchRatio: 1,
+ touchAngle: 45,
+ simulateTouch: true,
+ shortSwipes: true,
+ longSwipes: true,
+ longSwipesRatio: 0.5,
+ longSwipesMs: 300,
+ followFinger: true,
+ onlyExternal: false,
+ threshold: 0,
+ touchMoveStopPropagation: true,
+ // Unique Navigation Elements
+ uniqueNavElements: true,
+ // Pagination
+ pagination: null,
+ paginationElement: 'span',
+ paginationClickable: false,
+ paginationHide: false,
+ paginationBulletRender: null,
+ paginationProgressRender: null,
+ paginationFractionRender: null,
+ paginationCustomRender: null,
+ paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'
+ // Resistance
+ resistance: true,
+ resistanceRatio: 0.85,
+ // Next/prev buttons
+ nextButton: null,
+ prevButton: null,
+ // Progress
+ watchSlidesProgress: false,
+ watchSlidesVisibility: false,
+ // Cursor
+ grabCursor: false,
+ // Clicks
+ preventClicks: true,
+ preventClicksPropagation: true,
+ slideToClickedSlide: false,
+ // Lazy Loading
+ lazyLoading: false,
+ lazyLoadingInPrevNext: false,
+ lazyLoadingInPrevNextAmount: 1,
+ lazyLoadingOnTransitionStart: false,
+ // Images
+ preloadImages: true,
+ updateOnImagesReady: true,
+ // loop
+ loop: false,
+ loopAdditionalSlides: 0,
+ loopedSlides: null,
+ // Control
+ control: undefined,
+ controlInverse: false,
+ controlBy: 'slide', //or 'container'
+ // Swiping/no swiping
+ allowSwipeToPrev: true,
+ allowSwipeToNext: true,
+ swipeHandler: null, //'.swipe-handler',
+ noSwiping: true,
+ noSwipingClass: 'swiper-no-swiping',
+ // NS
+ slideClass: 'swiper-slide',
+ slideActiveClass: 'swiper-slide-active',
+ slideVisibleClass: 'swiper-slide-visible',
+ slideDuplicateClass: 'swiper-slide-duplicate',
+ slideNextClass: 'swiper-slide-next',
+ slidePrevClass: 'swiper-slide-prev',
+ wrapperClass: 'swiper-wrapper',
+ bulletClass: 'swiper-pagination-bullet',
+ bulletActiveClass: 'swiper-pagination-bullet-active',
+ buttonDisabledClass: 'swiper-button-disabled',
+ paginationCurrentClass: 'swiper-pagination-current',
+ paginationTotalClass: 'swiper-pagination-total',
+ paginationHiddenClass: 'swiper-pagination-hidden',
+ paginationProgressbarClass: 'swiper-pagination-progressbar',
+ // Observer
+ observer: false,
+ observeParents: false,
+ // Accessibility
+ a11y: false,
+ prevSlideMessage: 'Previous slide',
+ nextSlideMessage: 'Next slide',
+ firstSlideMessage: 'This is the first slide',
+ lastSlideMessage: 'This is the last slide',
+ paginationBulletMessage: 'Go to slide {{index}}',
+ // Callbacks
+ runCallbacksOnInit: true
+ /*
+ Callbacks:
+ onInit: function (swiper)
+ onDestroy: function (swiper)
+ onClick: function (swiper, e)
+ onTap: function (swiper, e)
+ onDoubleTap: function (swiper, e)
+ onSliderMove: function (swiper, e)
+ onSlideChangeStart: function (swiper)
+ onSlideChangeEnd: function (swiper)
+ onTransitionStart: function (swiper)
+ onTransitionEnd: function (swiper)
+ onImagesReady: function (swiper)
+ onProgress: function (swiper, progress)
+ onTouchStart: function (swiper, e)
+ onTouchMove: function (swiper, e)
+ onTouchMoveOpposite: function (swiper, e)
+ onTouchEnd: function (swiper, e)
+ onReachBeginning: function (swiper)
+ onReachEnd: function (swiper)
+ onSetTransition: function (swiper, duration)
+ onSetTranslate: function (swiper, translate)
+ onAutoplayStart: function (swiper)
+ onAutoplayStop: function (swiper),
+ onLazyImageLoad: function (swiper, slide, image)
+ onLazyImageReady: function (swiper, slide, image)
+ */
+
+ };
+ var Swiper = function (container, params) {
+ if (!(this instanceof Swiper)) return new Swiper(container, params);
+
+
+ var initialVirtualTranslate = params && params.virtualTranslate;
+
+ params = params || {};
+ var originalParams = {};
+ for (var param in params) {
+ if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {
+ originalParams[param] = {};
+ for (var deepParam in params[param]) {
+ originalParams[param][deepParam] = params[param][deepParam];
+ }
+ }
+ else {
+ originalParams[param] = params[param];
+ }
+ }
+ for (var def in defaults) {
+ if (typeof params[def] === 'undefined') {
+ params[def] = defaults[def];
+ }
+ else if (typeof params[def] === 'object') {
+ for (var deepDef in defaults[def]) {
+ if (typeof params[def][deepDef] === 'undefined') {
+ params[def][deepDef] = defaults[def][deepDef];
+ }
+ }
+ }
+ }
+
+ // Swiper
+ var s = this;
+
+ // Params
+ s.params = params;
+ s.originalParams = originalParams;
+
+ // Classname
+ s.classNames = [];
+ s.$ = $;
+
+ /*=========================
+ Breakpoints
+ ===========================*/
+ s.currentBreakpoint = undefined;
+ s.getActiveBreakpoint = function () {
+ //Get breakpoint for window width
+ if (!s.params.breakpoints) return false;
+ var breakpoint = false;
+ var points = [], point;
+ for ( point in s.params.breakpoints ) {
+ if (s.params.breakpoints.hasOwnProperty(point)) {
+ points.push(point);
+ }
+ }
+ points.sort(function (a, b) {
+ return parseInt(a, 10) > parseInt(b, 10);
+ });
+ for (var i = 0; i < points.length; i++) {
+ point = points[i];
+ if (point >= window.innerWidth && !breakpoint) {
+ breakpoint = point;
+ }
+ }
+ return breakpoint || 'max';
+ };
+ s.setBreakpoint = function () {
+ //Set breakpoint for window width and update parameters
+ var breakpoint = s.getActiveBreakpoint();
+ if (breakpoint && s.currentBreakpoint !== breakpoint) {
+ var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
+ var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
+ for ( var param in breakPointsParams ) {
+ s.params[param] = breakPointsParams[param];
+ }
+ s.currentBreakpoint = breakpoint;
+ if(needsReLoop && s.destroyLoop) {
+ s.reLoop(true);
+ }
+ }
+ };
+ // Set breakpoint on load
+ if (s.params.breakpoints) {
+ s.setBreakpoint();
+ }
+
+ /*=========================
+ Preparation - Define Container, Wrapper and Pagination
+ ===========================*/
+ s.container = $(container);
+ if (s.container.length === 0) return;
+ if (s.container.length > 1) {
+ var swipers = [];
+ s.container.each(function () {
+ var container = this;
+ swipers.push(new Swiper(this, params));
+ });
+ return swipers;
+ }
+
+ // Save instance in container HTML Element and in data
+ s.container[0].swiper = s;
+ s.container.data('swiper', s);
+
+ s.classNames.push('swiper-container-' + s.params.direction);
+
+ if (s.params.freeMode) {
+ s.classNames.push('swiper-container-free-mode');
+ }
+ if (!s.support.flexbox) {
+ s.classNames.push('swiper-container-no-flexbox');
+ s.params.slidesPerColumn = 1;
+ }
+ if (s.params.autoHeight) {
+ s.classNames.push('swiper-container-autoheight');
+ }
+ // Enable slides progress when required
+ if (s.params.parallax || s.params.watchSlidesVisibility) {
+ s.params.watchSlidesProgress = true;
+ }
+ // Coverflow / 3D
+ if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {
+ if (s.support.transforms3d) {
+ s.params.watchSlidesProgress = true;
+ s.classNames.push('swiper-container-3d');
+ }
+ else {
+ s.params.effect = 'slide';
+ }
+ }
+ if (s.params.effect !== 'slide') {
+ s.classNames.push('swiper-container-' + s.params.effect);
+ }
+ if (s.params.effect === 'cube') {
+ s.params.resistanceRatio = 0;
+ s.params.slidesPerView = 1;
+ s.params.slidesPerColumn = 1;
+ s.params.slidesPerGroup = 1;
+ s.params.centeredSlides = false;
+ s.params.spaceBetween = 0;
+ s.params.virtualTranslate = true;
+ s.params.setWrapperSize = false;
+ }
+ if (s.params.effect === 'fade' || s.params.effect === 'flip') {
+ s.params.slidesPerView = 1;
+ s.params.slidesPerColumn = 1;
+ s.params.slidesPerGroup = 1;
+ s.params.watchSlidesProgress = true;
+ s.params.spaceBetween = 0;
+ s.params.setWrapperSize = false;
+ if (typeof initialVirtualTranslate === 'undefined') {
+ s.params.virtualTranslate = true;
+ }
+ }
+
+ // Grab Cursor
+ if (s.params.grabCursor && s.support.touch) {
+ s.params.grabCursor = false;
+ }
+
+ // Wrapper
+ s.wrapper = s.container.children('.' + s.params.wrapperClass);
+
+ // Pagination
+ if (s.params.pagination) {
+ s.paginationContainer = $(s.params.pagination);
+ if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
+ s.paginationContainer = s.container.find(s.params.pagination);
+ }
+
+ if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
+ s.paginationContainer.addClass('swiper-pagination-clickable');
+ }
+ else {
+ s.params.paginationClickable = false;
+ }
+ s.paginationContainer.addClass('swiper-pagination-' + s.params.paginationType);
+ }
+ // Next/Prev Buttons
+ if (s.params.nextButton || s.params.prevButton) {
+ if (s.params.nextButton) {
+ s.nextButton = $(s.params.nextButton);
+ if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
+ s.nextButton = s.container.find(s.params.nextButton);
+ }
+ }
+ if (s.params.prevButton) {
+ s.prevButton = $(s.params.prevButton);
+ if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
+ s.prevButton = s.container.find(s.params.prevButton);
+ }
+ }
+ }
+
+ // Is Horizontal
+ s.isHorizontal = function () {
+ return s.params.direction === 'horizontal';
+ };
+ // s.isH = isH;
+
+ // RTL
+ s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');
+ if (s.rtl) {
+ s.classNames.push('swiper-container-rtl');
+ }
+
+ // Wrong RTL support
+ if (s.rtl) {
+ s.wrongRTL = s.wrapper.css('display') === '-webkit-box';
+ }
+
+ // Columns
+ if (s.params.slidesPerColumn > 1) {
+ s.classNames.push('swiper-container-multirow');
+ }
+
+ // Check for Android
+ if (s.device.android) {
+ s.classNames.push('swiper-container-android');
+ }
+
+ // Add classes
+ s.container.addClass(s.classNames.join(' '));
+
+ // Translate
+ s.translate = 0;
+
+ // Progress
+ s.progress = 0;
+
+ // Velocity
+ s.velocity = 0;
+
+ /*=========================
+ Locks, unlocks
+ ===========================*/
+ s.lockSwipeToNext = function () {
+ s.params.allowSwipeToNext = false;
+ };
+ s.lockSwipeToPrev = function () {
+ s.params.allowSwipeToPrev = false;
+ };
+ s.lockSwipes = function () {
+ s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;
+ };
+ s.unlockSwipeToNext = function () {
+ s.params.allowSwipeToNext = true;
+ };
+ s.unlockSwipeToPrev = function () {
+ s.params.allowSwipeToPrev = true;
+ };
+ s.unlockSwipes = function () {
+ s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;
+ };
+
+ /*=========================
+ Round helper
+ ===========================*/
+ function round(a) {
+ return Math.floor(a);
+ }
+ /*=========================
+ Set grab cursor
+ ===========================*/
+ if (s.params.grabCursor) {
+ s.container[0].style.cursor = 'move';
+ s.container[0].style.cursor = '-webkit-grab';
+ s.container[0].style.cursor = '-moz-grab';
+ s.container[0].style.cursor = 'grab';
+ }
+ /*=========================
+ Update on Images Ready
+ ===========================*/
+ s.imagesToLoad = [];
+ s.imagesLoaded = 0;
+
+ s.loadImage = function (imgElement, src, srcset, checkForComplete, callback) {
+ var image;
+ function onReady () {
+ if (callback) callback();
+ }
+ if (!imgElement.complete || !checkForComplete) {
+ if (src) {
+ image = new window.Image();
+ image.onload = onReady;
+ image.onerror = onReady;
+ if (srcset) {
+ image.srcset = srcset;
+ }
+ if (src) {
+ image.src = src;
+ }
+ } else {
+ onReady();
+ }
+
+ } else {//image already loaded...
+ onReady();
+ }
+ };
+ s.preloadImages = function () {
+ s.imagesToLoad = s.container.find('img');
+ function _onReady() {
+ if (typeof s === 'undefined' || s === null) return;
+ if (s.imagesLoaded !== undefined) s.imagesLoaded++;
+ if (s.imagesLoaded === s.imagesToLoad.length) {
+ if (s.params.updateOnImagesReady) s.update();
+ s.emit('onImagesReady', s);
+ }
+ }
+ for (var i = 0; i < s.imagesToLoad.length; i++) {
+ s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), true, _onReady);
+ }
+ };
+
+ /*=========================
+ Autoplay
+ ===========================*/
+ s.autoplayTimeoutId = undefined;
+ s.autoplaying = false;
+ s.autoplayPaused = false;
+ function autoplay() {
+ s.autoplayTimeoutId = setTimeout(function () {
+ if (s.params.loop) {
+ s.fixLoop();
+ s._slideNext();
+ s.emit('onAutoplay', s);
+ }
+ else {
+ if (!s.isEnd) {
+ s._slideNext();
+ s.emit('onAutoplay', s);
+ }
+ else {
+ if (!params.autoplayStopOnLast) {
+ s._slideTo(0);
+ s.emit('onAutoplay', s);
+ }
+ else {
+ s.stopAutoplay();
+ }
+ }
+ }
+ }, s.params.autoplay);
+ }
+ s.startAutoplay = function () {
+ if (typeof s.autoplayTimeoutId !== 'undefined') return false;
+ if (!s.params.autoplay) return false;
+ if (s.autoplaying) return false;
+ s.autoplaying = true;
+ s.emit('onAutoplayStart', s);
+ autoplay();
+ };
+ s.stopAutoplay = function (internal) {
+ if (!s.autoplayTimeoutId) return;
+ if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
+ s.autoplaying = false;
+ s.autoplayTimeoutId = undefined;
+ s.emit('onAutoplayStop', s);
+ };
+ s.pauseAutoplay = function (speed) {
+ if (s.autoplayPaused) return;
+ if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
+ s.autoplayPaused = true;
+ if (speed === 0) {
+ s.autoplayPaused = false;
+ autoplay();
+ }
+ else {
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.autoplayPaused = false;
+ if (!s.autoplaying) {
+ s.stopAutoplay();
+ }
+ else {
+ autoplay();
+ }
+ });
+ }
+ };
+ /*=========================
+ Min/Max Translate
+ ===========================*/
+ s.minTranslate = function () {
+ return (-s.snapGrid[0]);
+ };
+ s.maxTranslate = function () {
+ return (-s.snapGrid[s.snapGrid.length - 1]);
+ };
+ /*=========================
+ Slider/slides sizes
+ ===========================*/
+ s.updateAutoHeight = function () {
+ // Update Height
+ var slide = s.slides.eq(s.activeIndex)[0];
+ if (typeof slide !== 'undefined') {
+ var newHeight = slide.offsetHeight;
+ if (newHeight) s.wrapper.css('height', newHeight + 'px');
+ }
+ };
+ s.updateContainerSize = function () {
+ var width, height;
+ if (typeof s.params.width !== 'undefined') {
+ width = s.params.width;
+ }
+ else {
+ width = s.container[0].clientWidth;
+ }
+ if (typeof s.params.height !== 'undefined') {
+ height = s.params.height;
+ }
+ else {
+ height = s.container[0].clientHeight;
+ }
+ if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {
+ return;
+ }
+
+ //Subtract paddings
+ width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);
+ height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);
+
+ // Store values
+ s.width = width;
+ s.height = height;
+ s.size = s.isHorizontal() ? s.width : s.height;
+ };
+
+ s.updateSlidesSize = function () {
+ s.slides = s.wrapper.children('.' + s.params.slideClass);
+ s.snapGrid = [];
+ s.slidesGrid = [];
+ s.slidesSizesGrid = [];
+
+ var spaceBetween = s.params.spaceBetween,
+ slidePosition = -s.params.slidesOffsetBefore,
+ i,
+ prevSlideSize = 0,
+ index = 0;
+ if (typeof s.size === 'undefined') return;
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
+ spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;
+ }
+
+ s.virtualSize = -spaceBetween;
+ // reset margins
+ if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});
+ else s.slides.css({marginRight: '', marginBottom: ''});
+
+ var slidesNumberEvenToRows;
+ if (s.params.slidesPerColumn > 1) {
+ if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {
+ slidesNumberEvenToRows = s.slides.length;
+ }
+ else {
+ slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;
+ }
+ if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {
+ slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);
+ }
+ }
+
+ // Calc slides
+ var slideSize;
+ var slidesPerColumn = s.params.slidesPerColumn;
+ var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
+ var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);
+ for (i = 0; i < s.slides.length; i++) {
+ slideSize = 0;
+ var slide = s.slides.eq(i);
+ if (s.params.slidesPerColumn > 1) {
+ // Set slides order
+ var newSlideOrderIndex;
+ var column, row;
+ if (s.params.slidesPerColumnFill === 'column') {
+ column = Math.floor(i / slidesPerColumn);
+ row = i - column * slidesPerColumn;
+ if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {
+ if (++row >= slidesPerColumn) {
+ row = 0;
+ column++;
+ }
+ }
+ newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;
+ slide
+ .css({
+ '-webkit-box-ordinal-group': newSlideOrderIndex,
+ '-moz-box-ordinal-group': newSlideOrderIndex,
+ '-ms-flex-order': newSlideOrderIndex,
+ '-webkit-order': newSlideOrderIndex,
+ 'order': newSlideOrderIndex
+ });
+ }
+ else {
+ row = Math.floor(i / slidesPerRow);
+ column = i - row * slidesPerRow;
+ }
+ slide
+ .css({
+ 'margin-top': (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')
+ })
+ .attr('data-swiper-column', column)
+ .attr('data-swiper-row', row);
+
+ }
+ if (slide.css('display') === 'none') continue;
+ if (s.params.slidesPerView === 'auto') {
+ slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);
+ if (s.params.roundLengths) slideSize = round(slideSize);
+ }
+ else {
+ slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;
+ if (s.params.roundLengths) slideSize = round(slideSize);
+
+ if (s.isHorizontal()) {
+ s.slides[i].style.width = slideSize + 'px';
+ }
+ else {
+ s.slides[i].style.height = slideSize + 'px';
+ }
+ }
+ s.slides[i].swiperSlideSize = slideSize;
+ s.slidesSizesGrid.push(slideSize);
+
+
+ if (s.params.centeredSlides) {
+ slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
+ if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;
+ if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
+ if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
+ s.slidesGrid.push(slidePosition);
+ }
+ else {
+ if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
+ s.slidesGrid.push(slidePosition);
+ slidePosition = slidePosition + slideSize + spaceBetween;
+ }
+
+ s.virtualSize += slideSize + spaceBetween;
+
+ prevSlideSize = slideSize;
+
+ index ++;
+ }
+ s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;
+ var newSlidesGrid;
+
+ if (
+ s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {
+ s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ }
+ if (!s.support.flexbox || s.params.setWrapperSize) {
+ if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});
+ }
+
+ if (s.params.slidesPerColumn > 1) {
+ s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;
+ s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;
+ s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
+ if (s.params.centeredSlides) {
+ newSlidesGrid = [];
+ for (i = 0; i < s.snapGrid.length; i++) {
+ if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);
+ }
+ s.snapGrid = newSlidesGrid;
+ }
+ }
+
+ // Remove last grid elements depending on width
+ if (!s.params.centeredSlides) {
+ newSlidesGrid = [];
+ for (i = 0; i < s.snapGrid.length; i++) {
+ if (s.snapGrid[i] <= s.virtualSize - s.size) {
+ newSlidesGrid.push(s.snapGrid[i]);
+ }
+ }
+ s.snapGrid = newSlidesGrid;
+ if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {
+ s.snapGrid.push(s.virtualSize - s.size);
+ }
+ }
+ if (s.snapGrid.length === 0) s.snapGrid = [0];
+
+ if (s.params.spaceBetween !== 0) {
+ if (s.isHorizontal()) {
+ if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});
+ else s.slides.css({marginRight: spaceBetween + 'px'});
+ }
+ else s.slides.css({marginBottom: spaceBetween + 'px'});
+ }
+ if (s.params.watchSlidesProgress) {
+ s.updateSlidesOffset();
+ }
+ };
+ s.updateSlidesOffset = function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;
+ }
+ };
+
+ /*=========================
+ Slider/slides progress
+ ===========================*/
+ s.updateSlidesProgress = function (translate) {
+ if (typeof translate === 'undefined') {
+ translate = s.translate || 0;
+ }
+ if (s.slides.length === 0) return;
+ if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();
+
+ var offsetCenter = -translate;
+ if (s.rtl) offsetCenter = translate;
+
+ // Visible Slides
+ s.slides.removeClass(s.params.slideVisibleClass);
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides[i];
+ var slideProgress = (offsetCenter - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);
+ if (s.params.watchSlidesVisibility) {
+ var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
+ var slideAfter = slideBefore + s.slidesSizesGrid[i];
+ var isVisible =
+ (slideBefore >= 0 && slideBefore < s.size) ||
+ (slideAfter > 0 && slideAfter <= s.size) ||
+ (slideBefore <= 0 && slideAfter >= s.size);
+ if (isVisible) {
+ s.slides.eq(i).addClass(s.params.slideVisibleClass);
+ }
+ }
+ slide.progress = s.rtl ? -slideProgress : slideProgress;
+ }
+ };
+ s.updateProgress = function (translate) {
+ if (typeof translate === 'undefined') {
+ translate = s.translate || 0;
+ }
+ var translatesDiff = s.maxTranslate() - s.minTranslate();
+ var wasBeginning = s.isBeginning;
+ var wasEnd = s.isEnd;
+ if (translatesDiff === 0) {
+ s.progress = 0;
+ s.isBeginning = s.isEnd = true;
+ }
+ else {
+ s.progress = (translate - s.minTranslate()) / (translatesDiff);
+ s.isBeginning = s.progress <= 0;
+ s.isEnd = s.progress >= 1;
+ }
+ if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);
+ if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);
+
+ if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);
+ s.emit('onProgress', s, s.progress);
+ };
+ s.updateActiveIndex = function () {
+ var translate = s.rtl ? s.translate : -s.translate;
+ var newActiveIndex, i, snapIndex;
+ for (i = 0; i < s.slidesGrid.length; i ++) {
+ if (typeof s.slidesGrid[i + 1] !== 'undefined') {
+ if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {
+ newActiveIndex = i;
+ }
+ else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {
+ newActiveIndex = i + 1;
+ }
+ }
+ else {
+ if (translate >= s.slidesGrid[i]) {
+ newActiveIndex = i;
+ }
+ }
+ }
+ // Normalize slideIndex
+ if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;
+ // for (i = 0; i < s.slidesGrid.length; i++) {
+ // if (- translate >= s.slidesGrid[i]) {
+ // newActiveIndex = i;
+ // }
+ // }
+ snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);
+ if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;
+
+ if (newActiveIndex === s.activeIndex) {
+ return;
+ }
+ s.snapIndex = snapIndex;
+ s.previousIndex = s.activeIndex;
+ s.activeIndex = newActiveIndex;
+ s.updateClasses();
+ };
+
+ /*=========================
+ Classes
+ ===========================*/
+ s.updateClasses = function () {
+ s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass);
+ var activeSlide = s.slides.eq(s.activeIndex);
+ // Active classes
+ activeSlide.addClass(s.params.slideActiveClass);
+ // Next Slide
+ var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);
+ if (s.params.loop && nextSlide.length === 0) {
+ s.slides.eq(0).addClass(s.params.slideNextClass);
+ }
+ // Prev Slide
+ var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);
+ if (s.params.loop && prevSlide.length === 0) {
+ s.slides.eq(-1).addClass(s.params.slidePrevClass);
+ }
+
+ // Pagination
+ if (s.paginationContainer && s.paginationContainer.length > 0) {
+ // Current/Total
+ var current,
+ total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
+ if (s.params.loop) {
+ current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);
+ if (current > s.slides.length - 1 - s.loopedSlides * 2) {
+ current = current - (s.slides.length - s.loopedSlides * 2);
+ }
+ if (current > total - 1) current = current - total;
+ if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;
+ }
+ else {
+ if (typeof s.snapIndex !== 'undefined') {
+ current = s.snapIndex;
+ }
+ else {
+ current = s.activeIndex || 0;
+ }
+ }
+ // Types
+ if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {
+ s.bullets.removeClass(s.params.bulletActiveClass);
+ if (s.paginationContainer.length > 1) {
+ s.bullets.each(function () {
+ if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);
+ });
+ }
+ else {
+ s.bullets.eq(current).addClass(s.params.bulletActiveClass);
+ }
+ }
+ if (s.params.paginationType === 'fraction') {
+ s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);
+ s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);
+ }
+ if (s.params.paginationType === 'progress') {
+ var scale = (current + 1) / total,
+ scaleX = scale,
+ scaleY = 1;
+ if (!s.isHorizontal()) {
+ scaleY = scale;
+ scaleX = 1;
+ }
+ s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);
+ }
+ if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {
+ s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
+ }
+ }
+
+ // Next/active buttons
+ if (!s.params.loop) {
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ if (s.isBeginning) {
+ s.prevButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);
+ }
+ else {
+ s.prevButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);
+ }
+ }
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ if (s.isEnd) {
+ s.nextButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);
+ }
+ else {
+ s.nextButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);
+ }
+ }
+ }
+ };
+
+ /*=========================
+ Pagination
+ ===========================*/
+ s.updatePagination = function () {
+ if (!s.params.pagination) return;
+ if (s.paginationContainer && s.paginationContainer.length > 0) {
+ var paginationHTML = '';
+ if (s.params.paginationType === 'bullets') {
+ var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
+ for (var i = 0; i < numberOfBullets; i++) {
+ if (s.params.paginationBulletRender) {
+ paginationHTML += s.params.paginationBulletRender(i, s.params.bulletClass);
+ }
+ else {
+ paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '">' + s.params.paginationElement + '>';
+ }
+ }
+ s.paginationContainer.html(paginationHTML);
+ s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);
+ if (s.params.paginationClickable && s.params.a11y && s.a11y) {
+ s.a11y.initPagination();
+ }
+ }
+ if (s.params.paginationType === 'fraction') {
+ if (s.params.paginationFractionRender) {
+ paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);
+ }
+ else {
+ paginationHTML =
+ '' +
+ ' / ' +
+ '';
+ }
+ s.paginationContainer.html(paginationHTML);
+ }
+ if (s.params.paginationType === 'progress') {
+ if (s.params.paginationProgressRender) {
+ paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);
+ }
+ else {
+ paginationHTML = '';
+ }
+ s.paginationContainer.html(paginationHTML);
+ }
+ if (s.params.paginationType !== 'custom') {
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
+ }
+ }
+ };
+ /*=========================
+ Common update method
+ ===========================*/
+ s.update = function (updateTranslate) {
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ s.updateProgress();
+ s.updatePagination();
+ s.updateClasses();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ }
+ function forceSetTranslate() {
+ newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
+ s.setWrapperTranslate(newTranslate);
+ s.updateActiveIndex();
+ s.updateClasses();
+ }
+ if (updateTranslate) {
+ var translated, newTranslate;
+ if (s.controller && s.controller.spline) {
+ s.controller.spline = undefined;
+ }
+ if (s.params.freeMode) {
+ forceSetTranslate();
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ }
+ else {
+ if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
+ translated = s.slideTo(s.slides.length - 1, 0, false, true);
+ }
+ else {
+ translated = s.slideTo(s.activeIndex, 0, false, true);
+ }
+ if (!translated) {
+ forceSetTranslate();
+ }
+ }
+ }
+ else if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ };
+
+ /*=========================
+ Resize Handler
+ ===========================*/
+ s.onResize = function (forceUpdatePagination) {
+ //Breakpoints
+ if (s.params.breakpoints) {
+ s.setBreakpoint();
+ }
+
+ // Disable locks on resize
+ var allowSwipeToPrev = s.params.allowSwipeToPrev;
+ var allowSwipeToNext = s.params.allowSwipeToNext;
+ s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;
+
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ }
+ if (s.controller && s.controller.spline) {
+ s.controller.spline = undefined;
+ }
+ var slideChangedBySlideTo = false;
+ if (s.params.freeMode) {
+ var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
+ s.setWrapperTranslate(newTranslate);
+ s.updateActiveIndex();
+ s.updateClasses();
+
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ }
+ else {
+ s.updateClasses();
+ if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
+ slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);
+ }
+ else {
+ slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);
+ }
+ }
+ if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {
+ s.lazy.load();
+ }
+ // Return locks after resize
+ s.params.allowSwipeToPrev = allowSwipeToPrev;
+ s.params.allowSwipeToNext = allowSwipeToNext;
+ };
+
+ /*=========================
+ Events
+ ===========================*/
+
+ //Define Touch Events
+ var desktopEvents = ['mousedown', 'mousemove', 'mouseup'];
+ if (window.navigator.pointerEnabled) desktopEvents = ['pointerdown', 'pointermove', 'pointerup'];
+ else if (window.navigator.msPointerEnabled) desktopEvents = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
+ s.touchEvents = {
+ start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : desktopEvents[0],
+ move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : desktopEvents[1],
+ end : s.support.touch || !s.params.simulateTouch ? 'touchend' : desktopEvents[2]
+ };
+
+
+ // WP8 Touch Events Fix
+ if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {
+ (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);
+ }
+
+ // Attach/detach events
+ s.initEvents = function (detach) {
+ var actionDom = detach ? 'off' : 'on';
+ var action = detach ? 'removeEventListener' : 'addEventListener';
+ var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];
+ var target = s.support.touch ? touchEventsTarget : document;
+
+ var moveCapture = s.params.nested ? true : false;
+
+ //Touch Events
+ if (s.browser.ie) {
+ touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);
+ target[action](s.touchEvents.move, s.onTouchMove, moveCapture);
+ target[action](s.touchEvents.end, s.onTouchEnd, false);
+ }
+ else {
+ if (s.support.touch) {
+ touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);
+ touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);
+ touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, false);
+ }
+ if (params.simulateTouch && !s.device.ios && !s.device.android) {
+ touchEventsTarget[action]('mousedown', s.onTouchStart, false);
+ document[action]('mousemove', s.onTouchMove, moveCapture);
+ document[action]('mouseup', s.onTouchEnd, false);
+ }
+ }
+ window[action]('resize', s.onResize);
+
+ // Next, Prev, Index
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ s.nextButton[actionDom]('click', s.onClickNext);
+ if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);
+ }
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.prevButton[actionDom]('click', s.onClickPrev);
+ if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);
+ }
+ if (s.params.pagination && s.params.paginationClickable) {
+ s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);
+ if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);
+ }
+
+ // Prevent Links Clicks
+ if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);
+ };
+ s.attachEvents = function () {
+ s.initEvents();
+ };
+ s.detachEvents = function () {
+ s.initEvents(true);
+ };
+
+ /*=========================
+ Handle Clicks
+ ===========================*/
+ // Prevent Clicks
+ s.allowClick = true;
+ s.preventClicks = function (e) {
+ if (!s.allowClick) {
+ if (s.params.preventClicks) e.preventDefault();
+ if (s.params.preventClicksPropagation && s.animating) {
+ e.stopPropagation();
+ e.stopImmediatePropagation();
+ }
+ }
+ };
+ // Clicks
+ s.onClickNext = function (e) {
+ e.preventDefault();
+ if (s.isEnd && !s.params.loop) return;
+ s.slideNext();
+ };
+ s.onClickPrev = function (e) {
+ e.preventDefault();
+ if (s.isBeginning && !s.params.loop) return;
+ s.slidePrev();
+ };
+ s.onClickIndex = function (e) {
+ e.preventDefault();
+ var index = $(this).index() * s.params.slidesPerGroup;
+ if (s.params.loop) index = index + s.loopedSlides;
+ s.slideTo(index);
+ };
+
+ /*=========================
+ Handle Touches
+ ===========================*/
+ function findElementInEvent(e, selector) {
+ var el = $(e.target);
+ if (!el.is(selector)) {
+ if (typeof selector === 'string') {
+ el = el.parents(selector);
+ }
+ else if (selector.nodeType) {
+ var found;
+ el.parents().each(function (index, _el) {
+ if (_el === selector) found = selector;
+ });
+ if (!found) return undefined;
+ else return selector;
+ }
+ }
+ if (el.length === 0) {
+ return undefined;
+ }
+ return el[0];
+ }
+ s.updateClickedSlide = function (e) {
+ var slide = findElementInEvent(e, '.' + s.params.slideClass);
+ var slideFound = false;
+ if (slide) {
+ for (var i = 0; i < s.slides.length; i++) {
+ if (s.slides[i] === slide) slideFound = true;
+ }
+ }
+
+ if (slide && slideFound) {
+ s.clickedSlide = slide;
+ s.clickedIndex = $(slide).index();
+ }
+ else {
+ s.clickedSlide = undefined;
+ s.clickedIndex = undefined;
+ return;
+ }
+ if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {
+ var slideToIndex = s.clickedIndex,
+ realIndex,
+ duplicatedSlides;
+ if (s.params.loop) {
+ if (s.animating) return;
+ realIndex = $(s.clickedSlide).attr('data-swiper-slide-index');
+ if (s.params.centeredSlides) {
+ if ((slideToIndex < s.loopedSlides - s.params.slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + s.params.slidesPerView/2)) {
+ s.fixLoop();
+ slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.swiper-slide-duplicate)').eq(0).index();
+ setTimeout(function () {
+ s.slideTo(slideToIndex);
+ }, 0);
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ else {
+ if (slideToIndex > s.slides.length - s.params.slidesPerView) {
+ s.fixLoop();
+ slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.swiper-slide-duplicate)').eq(0).index();
+ setTimeout(function () {
+ s.slideTo(slideToIndex);
+ }, 0);
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ }
+ else {
+ s.slideTo(slideToIndex);
+ }
+ }
+ };
+
+ var isTouched,
+ isMoved,
+ allowTouchCallbacks,
+ touchStartTime,
+ isScrolling,
+ currentTranslate,
+ startTranslate,
+ allowThresholdMove,
+ // Form elements to match
+ formElements = 'input, select, textarea, button',
+ // Last click time
+ lastClickTime = Date.now(), clickTimeout,
+ //Velocities
+ velocities = [],
+ allowMomentumBounce;
+
+ // Animating Flag
+ s.animating = false;
+
+ // Touches information
+ s.touches = {
+ startX: 0,
+ startY: 0,
+ currentX: 0,
+ currentY: 0,
+ diff: 0
+ };
+
+ // Touch handlers
+ var isTouchEvent, startMoving;
+ s.onTouchStart = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ isTouchEvent = e.type === 'touchstart';
+ if (!isTouchEvent && 'which' in e && e.which === 3) return;
+ if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {
+ s.allowClick = true;
+ return;
+ }
+ if (s.params.swipeHandler) {
+ if (!findElementInEvent(e, s.params.swipeHandler)) return;
+ }
+
+ var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
+ var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
+
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
+ if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {
+ return;
+ }
+
+ isTouched = true;
+ isMoved = false;
+ allowTouchCallbacks = true;
+ isScrolling = undefined;
+ startMoving = undefined;
+ s.touches.startX = startX;
+ s.touches.startY = startY;
+ touchStartTime = Date.now();
+ s.allowClick = true;
+ s.updateContainerSize();
+ s.swipeDirection = undefined;
+ if (s.params.threshold > 0) allowThresholdMove = false;
+ if (e.type !== 'touchstart') {
+ var preventDefault = true;
+ if ($(e.target).is(formElements)) preventDefault = false;
+ if (document.activeElement && $(document.activeElement).is(formElements)) {
+ document.activeElement.blur();
+ }
+ if (preventDefault) {
+ e.preventDefault();
+ }
+ }
+ s.emit('onTouchStart', s, e);
+ };
+
+ s.onTouchMove = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ if (isTouchEvent && e.type === 'mousemove') return;
+ if (e.preventedByNestedSwiper) {
+ s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ return;
+ }
+ if (s.params.onlyExternal) {
+ // isMoved = true;
+ s.allowClick = false;
+ if (isTouched) {
+ s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ touchStartTime = Date.now();
+ }
+ return;
+ }
+ if (isTouchEvent && document.activeElement) {
+ if (e.target === document.activeElement && $(e.target).is(formElements)) {
+ isMoved = true;
+ s.allowClick = false;
+ return;
+ }
+ }
+ if (allowTouchCallbacks) {
+ s.emit('onTouchMove', s, e);
+ }
+ if (e.targetTouches && e.targetTouches.length > 1) return;
+
+ s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+
+ if (typeof isScrolling === 'undefined') {
+ var touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;
+ isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);
+ }
+ if (isScrolling) {
+ s.emit('onTouchMoveOpposite', s, e);
+ }
+ if (typeof startMoving === 'undefined' && s.browser.ieTouch) {
+ if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {
+ startMoving = true;
+ }
+ }
+ if (!isTouched) return;
+ if (isScrolling) {
+ isTouched = false;
+ return;
+ }
+ if (!startMoving && s.browser.ieTouch) {
+ return;
+ }
+ s.allowClick = false;
+ s.emit('onSliderMove', s, e);
+ e.preventDefault();
+ if (s.params.touchMoveStopPropagation && !s.params.nested) {
+ e.stopPropagation();
+ }
+
+ if (!isMoved) {
+ if (params.loop) {
+ s.fixLoop();
+ }
+ startTranslate = s.getWrapperTranslate();
+ s.setWrapperTransition(0);
+ if (s.animating) {
+ s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');
+ }
+ if (s.params.autoplay && s.autoplaying) {
+ if (s.params.autoplayDisableOnInteraction) {
+ s.stopAutoplay();
+ }
+ else {
+ s.pauseAutoplay();
+ }
+ }
+ allowMomentumBounce = false;
+ //Grab Cursor
+ if (s.params.grabCursor) {
+ s.container[0].style.cursor = 'move';
+ s.container[0].style.cursor = '-webkit-grabbing';
+ s.container[0].style.cursor = '-moz-grabbin';
+ s.container[0].style.cursor = 'grabbing';
+ }
+ }
+ isMoved = true;
+
+ var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
+
+ diff = diff * s.params.touchRatio;
+ if (s.rtl) diff = -diff;
+
+ s.swipeDirection = diff > 0 ? 'prev' : 'next';
+ currentTranslate = diff + startTranslate;
+
+ var disableParentSwiper = true;
+ if ((diff > 0 && currentTranslate > s.minTranslate())) {
+ disableParentSwiper = false;
+ if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);
+ }
+ else if (diff < 0 && currentTranslate < s.maxTranslate()) {
+ disableParentSwiper = false;
+ if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);
+ }
+
+ if (disableParentSwiper) {
+ e.preventedByNestedSwiper = true;
+ }
+
+ // Directions locks
+ if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {
+ currentTranslate = startTranslate;
+ }
+ if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {
+ currentTranslate = startTranslate;
+ }
+
+ if (!s.params.followFinger) return;
+
+ // Threshold
+ if (s.params.threshold > 0) {
+ if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {
+ if (!allowThresholdMove) {
+ allowThresholdMove = true;
+ s.touches.startX = s.touches.currentX;
+ s.touches.startY = s.touches.currentY;
+ currentTranslate = startTranslate;
+ s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
+ return;
+ }
+ }
+ else {
+ currentTranslate = startTranslate;
+ return;
+ }
+ }
+ // Update active index in free mode
+ if (s.params.freeMode || s.params.watchSlidesProgress) {
+ s.updateActiveIndex();
+ }
+ if (s.params.freeMode) {
+ //Velocity
+ if (velocities.length === 0) {
+ velocities.push({
+ position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],
+ time: touchStartTime
+ });
+ }
+ velocities.push({
+ position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],
+ time: (new window.Date()).getTime()
+ });
+ }
+ // Update progress
+ s.updateProgress(currentTranslate);
+ // Update translate
+ s.setWrapperTranslate(currentTranslate);
+ };
+ s.onTouchEnd = function (e) {
+ if (e.originalEvent) e = e.originalEvent;
+ if (allowTouchCallbacks) {
+ s.emit('onTouchEnd', s, e);
+ }
+ allowTouchCallbacks = false;
+ if (!isTouched) return;
+ //Return Grab Cursor
+ if (s.params.grabCursor && isMoved && isTouched) {
+ s.container[0].style.cursor = 'move';
+ s.container[0].style.cursor = '-webkit-grab';
+ s.container[0].style.cursor = '-moz-grab';
+ s.container[0].style.cursor = 'grab';
+ }
+
+ // Time diff
+ var touchEndTime = Date.now();
+ var timeDiff = touchEndTime - touchStartTime;
+
+ // Tap, doubleTap, Click
+ if (s.allowClick) {
+ s.updateClickedSlide(e);
+ s.emit('onTap', s, e);
+ if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {
+ if (clickTimeout) clearTimeout(clickTimeout);
+ clickTimeout = setTimeout(function () {
+ if (!s) return;
+ if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {
+ s.paginationContainer.toggleClass(s.params.paginationHiddenClass);
+ }
+ s.emit('onClick', s, e);
+ }, 300);
+
+ }
+ if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {
+ if (clickTimeout) clearTimeout(clickTimeout);
+ s.emit('onDoubleTap', s, e);
+ }
+ }
+
+ lastClickTime = Date.now();
+ setTimeout(function () {
+ if (s) s.allowClick = true;
+ }, 0);
+
+ if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {
+ isTouched = isMoved = false;
+ return;
+ }
+ isTouched = isMoved = false;
+
+ var currentPos;
+ if (s.params.followFinger) {
+ currentPos = s.rtl ? s.translate : -s.translate;
+ }
+ else {
+ currentPos = -currentTranslate;
+ }
+ if (s.params.freeMode) {
+ if (currentPos < -s.minTranslate()) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ else if (currentPos > -s.maxTranslate()) {
+ if (s.slides.length < s.snapGrid.length) {
+ s.slideTo(s.snapGrid.length - 1);
+ }
+ else {
+ s.slideTo(s.slides.length - 1);
+ }
+ return;
+ }
+
+ if (s.params.freeModeMomentum) {
+ if (velocities.length > 1) {
+ var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();
+
+ var distance = lastMoveEvent.position - velocityEvent.position;
+ var time = lastMoveEvent.time - velocityEvent.time;
+ s.velocity = distance / time;
+ s.velocity = s.velocity / 2;
+ if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {
+ s.velocity = 0;
+ }
+ // this implies that the user stopped moving a finger then released.
+ // There would be no events with distance zero, so the last event is stale.
+ if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {
+ s.velocity = 0;
+ }
+ } else {
+ s.velocity = 0;
+ }
+
+ velocities.length = 0;
+ var momentumDuration = 1000 * s.params.freeModeMomentumRatio;
+ var momentumDistance = s.velocity * momentumDuration;
+
+ var newPosition = s.translate + momentumDistance;
+ if (s.rtl) newPosition = - newPosition;
+ var doBounce = false;
+ var afterBouncePosition;
+ var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;
+ if (newPosition < s.maxTranslate()) {
+ if (s.params.freeModeMomentumBounce) {
+ if (newPosition + s.maxTranslate() < -bounceAmount) {
+ newPosition = s.maxTranslate() - bounceAmount;
+ }
+ afterBouncePosition = s.maxTranslate();
+ doBounce = true;
+ allowMomentumBounce = true;
+ }
+ else {
+ newPosition = s.maxTranslate();
+ }
+ }
+ else if (newPosition > s.minTranslate()) {
+ if (s.params.freeModeMomentumBounce) {
+ if (newPosition - s.minTranslate() > bounceAmount) {
+ newPosition = s.minTranslate() + bounceAmount;
+ }
+ afterBouncePosition = s.minTranslate();
+ doBounce = true;
+ allowMomentumBounce = true;
+ }
+ else {
+ newPosition = s.minTranslate();
+ }
+ }
+ else if (s.params.freeModeSticky) {
+ var j = 0,
+ nextSlide;
+ for (j = 0; j < s.snapGrid.length; j += 1) {
+ if (s.snapGrid[j] > -newPosition) {
+ nextSlide = j;
+ break;
+ }
+
+ }
+ if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {
+ newPosition = s.snapGrid[nextSlide];
+ } else {
+ newPosition = s.snapGrid[nextSlide - 1];
+ }
+ if (!s.rtl) newPosition = - newPosition;
+ }
+ //Fix duration
+ if (s.velocity !== 0) {
+ if (s.rtl) {
+ momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);
+ }
+ else {
+ momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);
+ }
+ }
+ else if (s.params.freeModeSticky) {
+ s.slideReset();
+ return;
+ }
+
+ if (s.params.freeModeMomentumBounce && doBounce) {
+ s.updateProgress(afterBouncePosition);
+ s.setWrapperTransition(momentumDuration);
+ s.setWrapperTranslate(newPosition);
+ s.onTransitionStart();
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s || !allowMomentumBounce) return;
+ s.emit('onMomentumBounce', s);
+
+ s.setWrapperTransition(s.params.speed);
+ s.setWrapperTranslate(afterBouncePosition);
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd();
+ });
+ });
+ } else if (s.velocity) {
+ s.updateProgress(newPosition);
+ s.setWrapperTransition(momentumDuration);
+ s.setWrapperTranslate(newPosition);
+ s.onTransitionStart();
+ if (!s.animating) {
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd();
+ });
+ }
+
+ } else {
+ s.updateProgress(newPosition);
+ }
+
+ s.updateActiveIndex();
+ }
+ if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {
+ s.updateProgress();
+ s.updateActiveIndex();
+ }
+ return;
+ }
+
+ // Find current slide
+ var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];
+ for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {
+ if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {
+ if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {
+ stopIndex = i;
+ groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];
+ }
+ }
+ else {
+ if (currentPos >= s.slidesGrid[i]) {
+ stopIndex = i;
+ groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];
+ }
+ }
+ }
+
+ // Find current slide size
+ var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;
+
+ if (timeDiff > s.params.longSwipesMs) {
+ // Long touches
+ if (!s.params.longSwipes) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ if (s.swipeDirection === 'next') {
+ if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);
+ else s.slideTo(stopIndex);
+
+ }
+ if (s.swipeDirection === 'prev') {
+ if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);
+ else s.slideTo(stopIndex);
+ }
+ }
+ else {
+ // Short swipes
+ if (!s.params.shortSwipes) {
+ s.slideTo(s.activeIndex);
+ return;
+ }
+ if (s.swipeDirection === 'next') {
+ s.slideTo(stopIndex + s.params.slidesPerGroup);
+
+ }
+ if (s.swipeDirection === 'prev') {
+ s.slideTo(stopIndex);
+ }
+ }
+ };
+ /*=========================
+ Transitions
+ ===========================*/
+ s._slideTo = function (slideIndex, speed) {
+ return s.slideTo(slideIndex, speed, true, true);
+ };
+ s.slideTo = function (slideIndex, speed, runCallbacks, internal) {
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (typeof slideIndex === 'undefined') slideIndex = 0;
+ if (slideIndex < 0) slideIndex = 0;
+ s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);
+ if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;
+
+ var translate = - s.snapGrid[s.snapIndex];
+ // Stop autoplay
+ if (s.params.autoplay && s.autoplaying) {
+ if (internal || !s.params.autoplayDisableOnInteraction) {
+ s.pauseAutoplay(speed);
+ }
+ else {
+ s.stopAutoplay();
+ }
+ }
+ // Update progress
+ s.updateProgress(translate);
+
+ // Normalize slideIndex
+ for (var i = 0; i < s.slidesGrid.length; i++) {
+ if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {
+ slideIndex = i;
+ }
+ }
+
+ // Directions locks
+ if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {
+ return false;
+ }
+ if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {
+ if ((s.activeIndex || 0) !== slideIndex ) return false;
+ }
+
+ // Update Index
+ if (typeof speed === 'undefined') speed = s.params.speed;
+ s.previousIndex = s.activeIndex || 0;
+ s.activeIndex = slideIndex;
+
+ if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {
+ // Update Height
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ s.updateClasses();
+ if (s.params.effect !== 'slide') {
+ s.setWrapperTranslate(translate);
+ }
+ return false;
+ }
+ s.updateClasses();
+ s.onTransitionStart(runCallbacks);
+
+ if (speed === 0) {
+ s.setWrapperTranslate(translate);
+ s.setWrapperTransition(0);
+ s.onTransitionEnd(runCallbacks);
+ }
+ else {
+ s.setWrapperTranslate(translate);
+ s.setWrapperTransition(speed);
+ if (!s.animating) {
+ s.animating = true;
+ s.wrapper.transitionEnd(function () {
+ if (!s) return;
+ s.onTransitionEnd(runCallbacks);
+ });
+ }
+
+ }
+
+ return true;
+ };
+
+ s.onTransitionStart = function (runCallbacks) {
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (s.params.autoHeight) {
+ s.updateAutoHeight();
+ }
+ if (s.lazy) s.lazy.onTransitionStart();
+ if (runCallbacks) {
+ s.emit('onTransitionStart', s);
+ if (s.activeIndex !== s.previousIndex) {
+ s.emit('onSlideChangeStart', s);
+ if (s.activeIndex > s.previousIndex) {
+ s.emit('onSlideNextStart', s);
+ }
+ else {
+ s.emit('onSlidePrevStart', s);
+ }
+ }
+
+ }
+ };
+ s.onTransitionEnd = function (runCallbacks) {
+ s.animating = false;
+ s.setWrapperTransition(0);
+ if (typeof runCallbacks === 'undefined') runCallbacks = true;
+ if (s.lazy) s.lazy.onTransitionEnd();
+ if (runCallbacks) {
+ s.emit('onTransitionEnd', s);
+ if (s.activeIndex !== s.previousIndex) {
+ s.emit('onSlideChangeEnd', s);
+ if (s.activeIndex > s.previousIndex) {
+ s.emit('onSlideNextEnd', s);
+ }
+ else {
+ s.emit('onSlidePrevEnd', s);
+ }
+ }
+ }
+ if (s.params.hashnav && s.hashnav) {
+ s.hashnav.setHash();
+ }
+
+ };
+ s.slideNext = function (runCallbacks, speed, internal) {
+ if (s.params.loop) {
+ if (s.animating) return false;
+ s.fixLoop();
+ var clientLeft = s.container[0].clientLeft;
+ return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
+ }
+ else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
+ };
+ s._slideNext = function (speed) {
+ return s.slideNext(true, speed, true);
+ };
+ s.slidePrev = function (runCallbacks, speed, internal) {
+ if (s.params.loop) {
+ if (s.animating) return false;
+ s.fixLoop();
+ var clientLeft = s.container[0].clientLeft;
+ return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
+ }
+ else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
+ };
+ s._slidePrev = function (speed) {
+ return s.slidePrev(true, speed, true);
+ };
+ s.slideReset = function (runCallbacks, speed, internal) {
+ return s.slideTo(s.activeIndex, speed, runCallbacks);
+ };
+
+ /*=========================
+ Translate/transition helpers
+ ===========================*/
+ s.setWrapperTransition = function (duration, byController) {
+ s.wrapper.transition(duration);
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ s.effects[s.params.effect].setTransition(duration);
+ }
+ if (s.params.parallax && s.parallax) {
+ s.parallax.setTransition(duration);
+ }
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.setTransition(duration);
+ }
+ if (s.params.control && s.controller) {
+ s.controller.setTransition(duration, byController);
+ }
+ s.emit('onSetTransition', s, duration);
+ };
+ s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {
+ var x = 0, y = 0, z = 0;
+ if (s.isHorizontal()) {
+ x = s.rtl ? -translate : translate;
+ }
+ else {
+ y = translate;
+ }
+
+ if (s.params.roundLengths) {
+ x = round(x);
+ y = round(y);
+ }
+
+ if (!s.params.virtualTranslate) {
+ if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');
+ else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');
+ }
+
+ s.translate = s.isHorizontal() ? x : y;
+
+ // Check if we need to update progress
+ var progress;
+ var translatesDiff = s.maxTranslate() - s.minTranslate();
+ if (translatesDiff === 0) {
+ progress = 0;
+ }
+ else {
+ progress = (translate - s.minTranslate()) / (translatesDiff);
+ }
+ if (progress !== s.progress) {
+ s.updateProgress(translate);
+ }
+
+ if (updateActiveIndex) s.updateActiveIndex();
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ s.effects[s.params.effect].setTranslate(s.translate);
+ }
+ if (s.params.parallax && s.parallax) {
+ s.parallax.setTranslate(s.translate);
+ }
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.setTranslate(s.translate);
+ }
+ if (s.params.control && s.controller) {
+ s.controller.setTranslate(s.translate, byController);
+ }
+ s.emit('onSetTranslate', s, s.translate);
+ };
+
+ s.getTranslate = function (el, axis) {
+ var matrix, curTransform, curStyle, transformMatrix;
+
+ // automatic axis detection
+ if (typeof axis === 'undefined') {
+ axis = 'x';
+ }
+
+ if (s.params.virtualTranslate) {
+ return s.rtl ? -s.translate : s.translate;
+ }
+
+ curStyle = window.getComputedStyle(el, null);
+ if (window.WebKitCSSMatrix) {
+ curTransform = curStyle.transform || curStyle.webkitTransform;
+ if (curTransform.split(',').length > 6) {
+ curTransform = curTransform.split(', ').map(function(a){
+ return a.replace(',','.');
+ }).join(', ');
+ }
+ // Some old versions of Webkit choke when 'none' is passed; pass
+ // empty string instead in this case
+ transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
+ }
+ else {
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
+ matrix = transformMatrix.toString().split(',');
+ }
+
+ if (axis === 'x') {
+ //Latest Chrome and webkits Fix
+ if (window.WebKitCSSMatrix)
+ curTransform = transformMatrix.m41;
+ //Crazy IE10 Matrix
+ else if (matrix.length === 16)
+ curTransform = parseFloat(matrix[12]);
+ //Normal Browsers
+ else
+ curTransform = parseFloat(matrix[4]);
+ }
+ if (axis === 'y') {
+ //Latest Chrome and webkits Fix
+ if (window.WebKitCSSMatrix)
+ curTransform = transformMatrix.m42;
+ //Crazy IE10 Matrix
+ else if (matrix.length === 16)
+ curTransform = parseFloat(matrix[13]);
+ //Normal Browsers
+ else
+ curTransform = parseFloat(matrix[5]);
+ }
+ if (s.rtl && curTransform) curTransform = -curTransform;
+ return curTransform || 0;
+ };
+ s.getWrapperTranslate = function (axis) {
+ if (typeof axis === 'undefined') {
+ axis = s.isHorizontal() ? 'x' : 'y';
+ }
+ return s.getTranslate(s.wrapper[0], axis);
+ };
+
+ /*=========================
+ Observer
+ ===========================*/
+ s.observers = [];
+ function initObserver(target, options) {
+ options = options || {};
+ // create an observer instance
+ var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
+ var observer = new ObserverFunc(function (mutations) {
+ mutations.forEach(function (mutation) {
+ s.onResize(true);
+ s.emit('onObserverUpdate', s, mutation);
+ });
+ });
+
+ observer.observe(target, {
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
+ childList: typeof options.childList === 'undefined' ? true : options.childList,
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData
+ });
+
+ s.observers.push(observer);
+ }
+ s.initObservers = function () {
+ if (s.params.observeParents) {
+ var containerParents = s.container.parents();
+ for (var i = 0; i < containerParents.length; i++) {
+ initObserver(containerParents[i]);
+ }
+ }
+
+ // Observe container
+ initObserver(s.container[0], {childList: false});
+
+ // Observe wrapper
+ initObserver(s.wrapper[0], {attributes: false});
+ };
+ s.disconnectObservers = function () {
+ for (var i = 0; i < s.observers.length; i++) {
+ s.observers[i].disconnect();
+ }
+ s.observers = [];
+ };
+ /*=========================
+ Loop
+ ===========================*/
+ // Create looped slides
+ s.createLoop = function () {
+ // Remove duplicated slides
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
+
+ var slides = s.wrapper.children('.' + s.params.slideClass);
+
+ if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;
+
+ s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);
+ s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;
+ if (s.loopedSlides > slides.length) {
+ s.loopedSlides = slides.length;
+ }
+
+ var prependSlides = [], appendSlides = [], i;
+ slides.each(function (index, el) {
+ var slide = $(this);
+ if (index < s.loopedSlides) appendSlides.push(el);
+ if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);
+ slide.attr('data-swiper-slide-index', index);
+ });
+ for (i = 0; i < appendSlides.length; i++) {
+ s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
+ }
+ for (i = prependSlides.length - 1; i >= 0; i--) {
+ s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
+ }
+ };
+ s.destroyLoop = function () {
+ s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
+ s.slides.removeAttr('data-swiper-slide-index');
+ };
+ s.reLoop = function (updatePosition) {
+ var oldIndex = s.activeIndex - s.loopedSlides;
+ s.destroyLoop();
+ s.createLoop();
+ s.updateSlidesSize();
+ if (updatePosition) {
+ s.slideTo(oldIndex + s.loopedSlides, 0, false);
+ }
+
+ };
+ s.fixLoop = function () {
+ var newIndex;
+ //Fix For Negative Oversliding
+ if (s.activeIndex < s.loopedSlides) {
+ newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;
+ newIndex = newIndex + s.loopedSlides;
+ s.slideTo(newIndex, 0, false, true);
+ }
+ //Fix For Positive Oversliding
+ else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {
+ newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;
+ newIndex = newIndex + s.loopedSlides;
+ s.slideTo(newIndex, 0, false, true);
+ }
+ };
+ /*=========================
+ Append/Prepend/Remove Slides
+ ===========================*/
+ s.appendSlide = function (slides) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ if (typeof slides === 'object' && slides.length) {
+ for (var i = 0; i < slides.length; i++) {
+ if (slides[i]) s.wrapper.append(slides[i]);
+ }
+ }
+ else {
+ s.wrapper.append(slides);
+ }
+ if (s.params.loop) {
+ s.createLoop();
+ }
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ };
+ s.prependSlide = function (slides) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ var newActiveIndex = s.activeIndex + 1;
+ if (typeof slides === 'object' && slides.length) {
+ for (var i = 0; i < slides.length; i++) {
+ if (slides[i]) s.wrapper.prepend(slides[i]);
+ }
+ newActiveIndex = s.activeIndex + slides.length;
+ }
+ else {
+ s.wrapper.prepend(slides);
+ }
+ if (s.params.loop) {
+ s.createLoop();
+ }
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ s.slideTo(newActiveIndex, 0, false);
+ };
+ s.removeSlide = function (slidesIndexes) {
+ if (s.params.loop) {
+ s.destroyLoop();
+ s.slides = s.wrapper.children('.' + s.params.slideClass);
+ }
+ var newActiveIndex = s.activeIndex,
+ indexToRemove;
+ if (typeof slidesIndexes === 'object' && slidesIndexes.length) {
+ for (var i = 0; i < slidesIndexes.length; i++) {
+ indexToRemove = slidesIndexes[i];
+ if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
+ if (indexToRemove < newActiveIndex) newActiveIndex--;
+ }
+ newActiveIndex = Math.max(newActiveIndex, 0);
+ }
+ else {
+ indexToRemove = slidesIndexes;
+ if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
+ if (indexToRemove < newActiveIndex) newActiveIndex--;
+ newActiveIndex = Math.max(newActiveIndex, 0);
+ }
+
+ if (s.params.loop) {
+ s.createLoop();
+ }
+
+ if (!(s.params.observer && s.support.observer)) {
+ s.update(true);
+ }
+ if (s.params.loop) {
+ s.slideTo(newActiveIndex + s.loopedSlides, 0, false);
+ }
+ else {
+ s.slideTo(newActiveIndex, 0, false);
+ }
+
+ };
+ s.removeAllSlides = function () {
+ var slidesIndexes = [];
+ for (var i = 0; i < s.slides.length; i++) {
+ slidesIndexes.push(i);
+ }
+ s.removeSlide(slidesIndexes);
+ };
+
+
+ /*=========================
+ Effects
+ ===========================*/
+ s.effects = {
+ fade: {
+ setTranslate: function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var offset = slide[0].swiperSlideOffset;
+ var tx = -offset;
+ if (!s.params.virtualTranslate) tx = tx - s.translate;
+ var ty = 0;
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ }
+ var slideOpacity = s.params.fade.crossFade ?
+ Math.max(1 - Math.abs(slide[0].progress), 0) :
+ 1 + Math.min(Math.max(slide[0].progress, -1), 0);
+ slide
+ .css({
+ opacity: slideOpacity
+ })
+ .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');
+
+ }
+
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration);
+ if (s.params.virtualTranslate && duration !== 0) {
+ var eventTriggered = false;
+ s.slides.transitionEnd(function () {
+ if (eventTriggered) return;
+ if (!s) return;
+ eventTriggered = true;
+ s.animating = false;
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
+ for (var i = 0; i < triggerEvents.length; i++) {
+ s.wrapper.trigger(triggerEvents[i]);
+ }
+ });
+ }
+ }
+ },
+ flip: {
+ setTranslate: function () {
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var progress = slide[0].progress;
+ if (s.params.flip.limitRotation) {
+ progress = Math.max(Math.min(slide[0].progress, 1), -1);
+ }
+ var offset = slide[0].swiperSlideOffset;
+ var rotate = -180 * progress,
+ rotateY = rotate,
+ rotateX = 0,
+ tx = -offset,
+ ty = 0;
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ rotateX = -rotateY;
+ rotateY = 0;
+ }
+ else if (s.rtl) {
+ rotateY = -rotateY;
+ }
+
+ slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;
+
+ if (s.params.flip.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
+ }
+
+ slide
+ .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');
+ }
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ if (s.params.virtualTranslate && duration !== 0) {
+ var eventTriggered = false;
+ s.slides.eq(s.activeIndex).transitionEnd(function () {
+ if (eventTriggered) return;
+ if (!s) return;
+ if (!$(this).hasClass(s.params.slideActiveClass)) return;
+ eventTriggered = true;
+ s.animating = false;
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
+ for (var i = 0; i < triggerEvents.length; i++) {
+ s.wrapper.trigger(triggerEvents[i]);
+ }
+ });
+ }
+ }
+ },
+ cube: {
+ setTranslate: function () {
+ var wrapperRotate = 0, cubeShadow;
+ if (s.params.cube.shadow) {
+ if (s.isHorizontal()) {
+ cubeShadow = s.wrapper.find('.swiper-cube-shadow');
+ if (cubeShadow.length === 0) {
+ cubeShadow = $('');
+ s.wrapper.append(cubeShadow);
+ }
+ cubeShadow.css({height: s.width + 'px'});
+ }
+ else {
+ cubeShadow = s.container.find('.swiper-cube-shadow');
+ if (cubeShadow.length === 0) {
+ cubeShadow = $('');
+ s.container.append(cubeShadow);
+ }
+ }
+ }
+ for (var i = 0; i < s.slides.length; i++) {
+ var slide = s.slides.eq(i);
+ var slideAngle = i * 90;
+ var round = Math.floor(slideAngle / 360);
+ if (s.rtl) {
+ slideAngle = -slideAngle;
+ round = Math.floor(-slideAngle / 360);
+ }
+ var progress = Math.max(Math.min(slide[0].progress, 1), -1);
+ var tx = 0, ty = 0, tz = 0;
+ if (i % 4 === 0) {
+ tx = - round * 4 * s.size;
+ tz = 0;
+ }
+ else if ((i - 1) % 4 === 0) {
+ tx = 0;
+ tz = - round * 4 * s.size;
+ }
+ else if ((i - 2) % 4 === 0) {
+ tx = s.size + round * 4 * s.size;
+ tz = s.size;
+ }
+ else if ((i - 3) % 4 === 0) {
+ tx = - s.size;
+ tz = 3 * s.size + s.size * 4 * round;
+ }
+ if (s.rtl) {
+ tx = -tx;
+ }
+
+ if (!s.isHorizontal()) {
+ ty = tx;
+ tx = 0;
+ }
+
+ var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';
+ if (progress <= 1 && progress > -1) {
+ wrapperRotate = i * 90 + progress * 90;
+ if (s.rtl) wrapperRotate = -i * 90 - progress * 90;
+ }
+ slide.transform(transform);
+ if (s.params.cube.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
+ }
+ }
+ s.wrapper.css({
+ '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
+ 'transform-origin': '50% 50% -' + (s.size / 2) + 'px'
+ });
+
+ if (s.params.cube.shadow) {
+ if (s.isHorizontal()) {
+ cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');
+ }
+ else {
+ var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
+ var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
+ var scale1 = s.params.cube.shadowScale,
+ scale2 = s.params.cube.shadowScale / multiplier,
+ offset = s.params.cube.shadowOffset;
+ cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');
+ }
+ }
+ var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;
+ s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ if (s.params.cube.shadow && !s.isHorizontal()) {
+ s.container.find('.swiper-cube-shadow').transition(duration);
+ }
+ }
+ },
+ coverflow: {
+ setTranslate: function () {
+ var transform = s.translate;
+ var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;
+ var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;
+ var translate = s.params.coverflow.depth;
+ //Each slide offset from center
+ for (var i = 0, length = s.slides.length; i < length; i++) {
+ var slide = s.slides.eq(i);
+ var slideSize = s.slidesSizesGrid[i];
+ var slideOffset = slide[0].swiperSlideOffset;
+ var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;
+
+ var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;
+ var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;
+ // var rotateZ = 0
+ var translateZ = -translate * Math.abs(offsetMultiplier);
+
+ var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);
+ var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;
+
+ //Fix for ultra small values
+ if (Math.abs(translateX) < 0.001) translateX = 0;
+ if (Math.abs(translateY) < 0.001) translateY = 0;
+ if (Math.abs(translateZ) < 0.001) translateZ = 0;
+ if (Math.abs(rotateY) < 0.001) rotateY = 0;
+ if (Math.abs(rotateX) < 0.001) rotateX = 0;
+
+ var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';
+
+ slide.transform(slideTransform);
+ slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
+ if (s.params.coverflow.slideShadows) {
+ //Set shadows
+ var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
+ var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
+ if (shadowBefore.length === 0) {
+ shadowBefore = $('');
+ slide.append(shadowBefore);
+ }
+ if (shadowAfter.length === 0) {
+ shadowAfter = $('');
+ slide.append(shadowAfter);
+ }
+ if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
+ if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
+ }
+ }
+
+ //Set correct perspective for IE10
+ if (s.browser.ie) {
+ var ws = s.wrapper[0].style;
+ ws.perspectiveOrigin = center + 'px 50%';
+ }
+ },
+ setTransition: function (duration) {
+ s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
+ }
+ }
+ };
+
+ /*=========================
+ Images Lazy Loading
+ ===========================*/
+ s.lazy = {
+ initialImageLoaded: false,
+ loadImageInSlide: function (index, loadInDuplicate) {
+ if (typeof index === 'undefined') return;
+ if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;
+ if (s.slides.length === 0) return;
+
+ var slide = s.slides.eq(index);
+ var img = slide.find('.swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)');
+ if (slide.hasClass('swiper-lazy') && !slide.hasClass('swiper-lazy-loaded') && !slide.hasClass('swiper-lazy-loading')) {
+ img = img.add(slide[0]);
+ }
+ if (img.length === 0) return;
+
+ img.each(function () {
+ var _img = $(this);
+ _img.addClass('swiper-lazy-loading');
+ var background = _img.attr('data-background');
+ var src = _img.attr('data-src'),
+ srcset = _img.attr('data-srcset');
+ s.loadImage(_img[0], (src || background), srcset, false, function () {
+ if (background) {
+ _img.css('background-image', 'url("' + background + '")');
+ _img.removeAttr('data-background');
+ }
+ else {
+ if (srcset) {
+ _img.attr('srcset', srcset);
+ _img.removeAttr('data-srcset');
+ }
+ if (src) {
+ _img.attr('src', src);
+ _img.removeAttr('data-src');
+ }
+
+ }
+
+ _img.addClass('swiper-lazy-loaded').removeClass('swiper-lazy-loading');
+ slide.find('.swiper-lazy-preloader, .preloader').remove();
+ if (s.params.loop && loadInDuplicate) {
+ var slideOriginalIndex = slide.attr('data-swiper-slide-index');
+ if (slide.hasClass(s.params.slideDuplicateClass)) {
+ var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')');
+ s.lazy.loadImageInSlide(originalSlide.index(), false);
+ }
+ else {
+ var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]');
+ s.lazy.loadImageInSlide(duplicatedSlide.index(), false);
+ }
+ }
+ s.emit('onLazyImageReady', s, slide[0], _img[0]);
+ });
+
+ s.emit('onLazyImageLoad', s, slide[0], _img[0]);
+ });
+
+ },
+ load: function () {
+ var i;
+ if (s.params.watchSlidesVisibility) {
+ s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {
+ s.lazy.loadImageInSlide($(this).index());
+ });
+ }
+ else {
+ if (s.params.slidesPerView > 1) {
+ for (i = s.activeIndex; i < s.activeIndex + s.params.slidesPerView ; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ }
+ else {
+ s.lazy.loadImageInSlide(s.activeIndex);
+ }
+ }
+ if (s.params.lazyLoadingInPrevNext) {
+ if (s.params.slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {
+ var amount = s.params.lazyLoadingInPrevNextAmount;
+ var spv = s.params.slidesPerView;
+ var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);
+ var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);
+ // Next Slides
+ for (i = s.activeIndex + s.params.slidesPerView; i < maxIndex; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ // Prev Slides
+ for (i = minIndex; i < s.activeIndex ; i++) {
+ if (s.slides[i]) s.lazy.loadImageInSlide(i);
+ }
+ }
+ else {
+ var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);
+ if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());
+
+ var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);
+ if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());
+ }
+ }
+ },
+ onTransitionStart: function () {
+ if (s.params.lazyLoading) {
+ if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {
+ s.lazy.load();
+ }
+ }
+ },
+ onTransitionEnd: function () {
+ if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {
+ s.lazy.load();
+ }
+ }
+ };
+
+
+ /*=========================
+ Scrollbar
+ ===========================*/
+ s.scrollbar = {
+ isTouched: false,
+ setDragPosition: function (e) {
+ var sb = s.scrollbar;
+ var x = 0, y = 0;
+ var translate;
+ var pointerPosition = s.isHorizontal() ?
+ ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :
+ ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;
+ var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;
+ var positionMin = -s.minTranslate() * sb.moveDivider;
+ var positionMax = -s.maxTranslate() * sb.moveDivider;
+ if (position < positionMin) {
+ position = positionMin;
+ }
+ else if (position > positionMax) {
+ position = positionMax;
+ }
+ position = -position / sb.moveDivider;
+ s.updateProgress(position);
+ s.setWrapperTranslate(position, true);
+ },
+ dragStart: function (e) {
+ var sb = s.scrollbar;
+ sb.isTouched = true;
+ e.preventDefault();
+ e.stopPropagation();
+
+ sb.setDragPosition(e);
+ clearTimeout(sb.dragTimeout);
+
+ sb.track.transition(0);
+ if (s.params.scrollbarHide) {
+ sb.track.css('opacity', 1);
+ }
+ s.wrapper.transition(100);
+ sb.drag.transition(100);
+ s.emit('onScrollbarDragStart', s);
+ },
+ dragMove: function (e) {
+ var sb = s.scrollbar;
+ if (!sb.isTouched) return;
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ sb.setDragPosition(e);
+ s.wrapper.transition(0);
+ sb.track.transition(0);
+ sb.drag.transition(0);
+ s.emit('onScrollbarDragMove', s);
+ },
+ dragEnd: function (e) {
+ var sb = s.scrollbar;
+ if (!sb.isTouched) return;
+ sb.isTouched = false;
+ if (s.params.scrollbarHide) {
+ clearTimeout(sb.dragTimeout);
+ sb.dragTimeout = setTimeout(function () {
+ sb.track.css('opacity', 0);
+ sb.track.transition(400);
+ }, 1000);
+
+ }
+ s.emit('onScrollbarDragEnd', s);
+ if (s.params.scrollbarSnapOnRelease) {
+ s.slideReset();
+ }
+ },
+ enableDraggable: function () {
+ var sb = s.scrollbar;
+ var target = s.support.touch ? sb.track : document;
+ $(sb.track).on(s.touchEvents.start, sb.dragStart);
+ $(target).on(s.touchEvents.move, sb.dragMove);
+ $(target).on(s.touchEvents.end, sb.dragEnd);
+ },
+ disableDraggable: function () {
+ var sb = s.scrollbar;
+ var target = s.support.touch ? sb.track : document;
+ $(sb.track).off(s.touchEvents.start, sb.dragStart);
+ $(target).off(s.touchEvents.move, sb.dragMove);
+ $(target).off(s.touchEvents.end, sb.dragEnd);
+ },
+ set: function () {
+ if (!s.params.scrollbar) return;
+ var sb = s.scrollbar;
+ sb.track = $(s.params.scrollbar);
+ if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {
+ sb.track = s.container.find(s.params.scrollbar);
+ }
+ sb.drag = sb.track.find('.swiper-scrollbar-drag');
+ if (sb.drag.length === 0) {
+ sb.drag = $('');
+ sb.track.append(sb.drag);
+ }
+ sb.drag[0].style.width = '';
+ sb.drag[0].style.height = '';
+ sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;
+
+ sb.divider = s.size / s.virtualSize;
+ sb.moveDivider = sb.divider * (sb.trackSize / s.size);
+ sb.dragSize = sb.trackSize * sb.divider;
+
+ if (s.isHorizontal()) {
+ sb.drag[0].style.width = sb.dragSize + 'px';
+ }
+ else {
+ sb.drag[0].style.height = sb.dragSize + 'px';
+ }
+
+ if (sb.divider >= 1) {
+ sb.track[0].style.display = 'none';
+ }
+ else {
+ sb.track[0].style.display = '';
+ }
+ if (s.params.scrollbarHide) {
+ sb.track[0].style.opacity = 0;
+ }
+ },
+ setTranslate: function () {
+ if (!s.params.scrollbar) return;
+ var diff;
+ var sb = s.scrollbar;
+ var translate = s.translate || 0;
+ var newPos;
+
+ var newSize = sb.dragSize;
+ newPos = (sb.trackSize - sb.dragSize) * s.progress;
+ if (s.rtl && s.isHorizontal()) {
+ newPos = -newPos;
+ if (newPos > 0) {
+ newSize = sb.dragSize - newPos;
+ newPos = 0;
+ }
+ else if (-newPos + sb.dragSize > sb.trackSize) {
+ newSize = sb.trackSize + newPos;
+ }
+ }
+ else {
+ if (newPos < 0) {
+ newSize = sb.dragSize + newPos;
+ newPos = 0;
+ }
+ else if (newPos + sb.dragSize > sb.trackSize) {
+ newSize = sb.trackSize - newPos;
+ }
+ }
+ if (s.isHorizontal()) {
+ if (s.support.transforms3d) {
+ sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');
+ }
+ else {
+ sb.drag.transform('translateX(' + (newPos) + 'px)');
+ }
+ sb.drag[0].style.width = newSize + 'px';
+ }
+ else {
+ if (s.support.transforms3d) {
+ sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');
+ }
+ else {
+ sb.drag.transform('translateY(' + (newPos) + 'px)');
+ }
+ sb.drag[0].style.height = newSize + 'px';
+ }
+ if (s.params.scrollbarHide) {
+ clearTimeout(sb.timeout);
+ sb.track[0].style.opacity = 1;
+ sb.timeout = setTimeout(function () {
+ sb.track[0].style.opacity = 0;
+ sb.track.transition(400);
+ }, 1000);
+ }
+ },
+ setTransition: function (duration) {
+ if (!s.params.scrollbar) return;
+ s.scrollbar.drag.transition(duration);
+ }
+ };
+
+ /*=========================
+ Controller
+ ===========================*/
+ s.controller = {
+ LinearSpline: function (x, y) {
+ this.x = x;
+ this.y = y;
+ this.lastIndex = x.length - 1;
+ // Given an x value (x2), return the expected y2 value:
+ // (x1,y1) is the known point before given value,
+ // (x3,y3) is the known point after given value.
+ var i1, i3;
+ var l = this.x.length;
+
+ this.interpolate = function (x2) {
+ if (!x2) return 0;
+
+ // Get the indexes of x1 and x3 (the array indexes before and after given x2):
+ i3 = binarySearch(this.x, x2);
+ i1 = i3 - 1;
+
+ // We have our indexes i1 & i3, so we can calculate already:
+ // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
+ return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];
+ };
+
+ var binarySearch = (function() {
+ var maxIndex, minIndex, guess;
+ return function(array, val) {
+ minIndex = -1;
+ maxIndex = array.length;
+ while (maxIndex - minIndex > 1)
+ if (array[guess = maxIndex + minIndex >> 1] <= val) {
+ minIndex = guess;
+ } else {
+ maxIndex = guess;
+ }
+ return maxIndex;
+ };
+ })();
+ },
+ //xxx: for now i will just save one spline function to to
+ getInterpolateFunction: function(c){
+ if(!s.controller.spline) s.controller.spline = s.params.loop ?
+ new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :
+ new s.controller.LinearSpline(s.snapGrid, c.snapGrid);
+ },
+ setTranslate: function (translate, byController) {
+ var controlled = s.params.control;
+ var multiplier, controlledTranslate;
+ function setControlledTranslate(c) {
+ // this will create an Interpolate function based on the snapGrids
+ // x is the Grid of the scrolled scroller and y will be the controlled scroller
+ // it makes sense to create this only once and recall it for the interpolation
+ // the function does a lot of value caching for performance
+ translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;
+ if (s.params.controlBy === 'slide') {
+ s.controller.getInterpolateFunction(c);
+ // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
+ // but it did not work out
+ controlledTranslate = -s.controller.spline.interpolate(-translate);
+ }
+
+ if(!controlledTranslate || s.params.controlBy === 'container'){
+ multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());
+ controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();
+ }
+
+ if (s.params.controlInverse) {
+ controlledTranslate = c.maxTranslate() - controlledTranslate;
+ }
+ c.updateProgress(controlledTranslate);
+ c.setWrapperTranslate(controlledTranslate, false, s);
+ c.updateActiveIndex();
+ }
+ if (s.isArray(controlled)) {
+ for (var i = 0; i < controlled.length; i++) {
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
+ setControlledTranslate(controlled[i]);
+ }
+ }
+ }
+ else if (controlled instanceof Swiper && byController !== controlled) {
+
+ setControlledTranslate(controlled);
+ }
+ },
+ setTransition: function (duration, byController) {
+ var controlled = s.params.control;
+ var i;
+ function setControlledTransition(c) {
+ c.setWrapperTransition(duration, s);
+ if (duration !== 0) {
+ c.onTransitionStart();
+ c.wrapper.transitionEnd(function(){
+ if (!controlled) return;
+ if (c.params.loop && s.params.controlBy === 'slide') {
+ c.fixLoop();
+ }
+ c.onTransitionEnd();
+
+ });
+ }
+ }
+ if (s.isArray(controlled)) {
+ for (i = 0; i < controlled.length; i++) {
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
+ setControlledTransition(controlled[i]);
+ }
+ }
+ }
+ else if (controlled instanceof Swiper && byController !== controlled) {
+ setControlledTransition(controlled);
+ }
+ }
+ };
+
+ /*=========================
+ Hash Navigation
+ ===========================*/
+ s.hashnav = {
+ init: function () {
+ if (!s.params.hashnav) return;
+ s.hashnav.initialized = true;
+ var hash = document.location.hash.replace('#', '');
+ if (!hash) return;
+ var speed = 0;
+ for (var i = 0, length = s.slides.length; i < length; i++) {
+ var slide = s.slides.eq(i);
+ var slideHash = slide.attr('data-hash');
+ if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {
+ var index = slide.index();
+ s.slideTo(index, speed, s.params.runCallbacksOnInit, true);
+ }
+ }
+ },
+ setHash: function () {
+ if (!s.hashnav.initialized || !s.params.hashnav) return;
+ document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || '';
+ }
+ };
+
+ /*=========================
+ Keyboard Control
+ ===========================*/
+ function handleKeyboard(e) {
+ if (e.originalEvent) e = e.originalEvent; //jquery fix
+ var kc = e.keyCode || e.charCode;
+ // Directions locks
+ if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) {
+ return false;
+ }
+ if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) {
+ return false;
+ }
+ if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
+ return;
+ }
+ if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
+ return;
+ }
+ if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {
+ var inView = false;
+ //Check that swiper should be inside of visible area of window
+ if (s.container.parents('.swiper-slide').length > 0 && s.container.parents('.swiper-slide-active').length === 0) {
+ return;
+ }
+ var windowScroll = {
+ left: window.pageXOffset,
+ top: window.pageYOffset
+ };
+ var windowWidth = window.innerWidth;
+ var windowHeight = window.innerHeight;
+ var swiperOffset = s.container.offset();
+ if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;
+ var swiperCoord = [
+ [swiperOffset.left, swiperOffset.top],
+ [swiperOffset.left + s.width, swiperOffset.top],
+ [swiperOffset.left, swiperOffset.top + s.height],
+ [swiperOffset.left + s.width, swiperOffset.top + s.height]
+ ];
+ for (var i = 0; i < swiperCoord.length; i++) {
+ var point = swiperCoord[i];
+ if (
+ point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&
+ point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight
+ ) {
+ inView = true;
+ }
+
+ }
+ if (!inView) return;
+ }
+ if (s.isHorizontal()) {
+ if (kc === 37 || kc === 39) {
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ }
+ if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();
+ if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();
+ }
+ else {
+ if (kc === 38 || kc === 40) {
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ }
+ if (kc === 40) s.slideNext();
+ if (kc === 38) s.slidePrev();
+ }
+ }
+ s.disableKeyboardControl = function () {
+ s.params.keyboardControl = false;
+ $(document).off('keydown', handleKeyboard);
+ };
+ s.enableKeyboardControl = function () {
+ s.params.keyboardControl = true;
+ $(document).on('keydown', handleKeyboard);
+ };
+
+
+ /*=========================
+ Mousewheel Control
+ ===========================*/
+ s.mousewheel = {
+ event: false,
+ lastScrollTime: (new window.Date()).getTime()
+ };
+ if (s.params.mousewheelControl) {
+ try {
+ new window.WheelEvent('wheel');
+ s.mousewheel.event = 'wheel';
+ } catch (e) {
+ if (window.WheelEvent || (s.container[0] && 'wheel' in s.container[0])) {
+ s.mousewheel.event = 'wheel';
+ }
+ }
+ if (!s.mousewheel.event && window.WheelEvent) {
+
+ }
+ if (!s.mousewheel.event && document.onmousewheel !== undefined) {
+ s.mousewheel.event = 'mousewheel';
+ }
+ if (!s.mousewheel.event) {
+ s.mousewheel.event = 'DOMMouseScroll';
+ }
+ }
+ function handleMousewheel(e) {
+ if (e.originalEvent) e = e.originalEvent; //jquery fix
+ var we = s.mousewheel.event;
+ var delta = 0;
+ var rtlFactor = s.rtl ? -1 : 1;
+
+ //WebKits
+ if (we === 'mousewheel') {
+ if (s.params.mousewheelForceToAxis) {
+ if (s.isHorizontal()) {
+ if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;
+ else return;
+ }
+ else {
+ if (Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX)) delta = e.wheelDeltaY;
+ else return;
+ }
+ }
+ else {
+ delta = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? - e.wheelDeltaX * rtlFactor : - e.wheelDeltaY;
+ }
+ }
+ //Old FireFox
+ else if (we === 'DOMMouseScroll') delta = -e.detail;
+ //New FireFox
+ else if (we === 'wheel') {
+ if (s.params.mousewheelForceToAxis) {
+ if (s.isHorizontal()) {
+ if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) delta = -e.deltaX * rtlFactor;
+ else return;
+ }
+ else {
+ if (Math.abs(e.deltaY) > Math.abs(e.deltaX)) delta = -e.deltaY;
+ else return;
+ }
+ }
+ else {
+ delta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? - e.deltaX * rtlFactor : - e.deltaY;
+ }
+ }
+ if (delta === 0) return;
+
+ if (s.params.mousewheelInvert) delta = -delta;
+
+ if (!s.params.freeMode) {
+ if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {
+ if (delta < 0) {
+ if ((!s.isEnd || s.params.loop) && !s.animating) s.slideNext();
+ else if (s.params.mousewheelReleaseOnEdges) return true;
+ }
+ else {
+ if ((!s.isBeginning || s.params.loop) && !s.animating) s.slidePrev();
+ else if (s.params.mousewheelReleaseOnEdges) return true;
+ }
+ }
+ s.mousewheel.lastScrollTime = (new window.Date()).getTime();
+
+ }
+ else {
+ //Freemode or scrollContainer:
+ var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;
+ var wasBeginning = s.isBeginning,
+ wasEnd = s.isEnd;
+
+ if (position >= s.minTranslate()) position = s.minTranslate();
+ if (position <= s.maxTranslate()) position = s.maxTranslate();
+
+ s.setWrapperTransition(0);
+ s.setWrapperTranslate(position);
+ s.updateProgress();
+ s.updateActiveIndex();
+
+ if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {
+ s.updateClasses();
+ }
+
+ if (s.params.freeModeSticky) {
+ clearTimeout(s.mousewheel.timeout);
+ s.mousewheel.timeout = setTimeout(function () {
+ s.slideReset();
+ }, 300);
+ }
+ else {
+ if (s.params.lazyLoading && s.lazy) {
+ s.lazy.load();
+ }
+ }
+
+ // Return page scroll on edge positions
+ if (position === 0 || position === s.maxTranslate()) return;
+ }
+ if (s.params.autoplay) s.stopAutoplay();
+
+ if (e.preventDefault) e.preventDefault();
+ else e.returnValue = false;
+ return false;
+ }
+ s.disableMousewheelControl = function () {
+ if (!s.mousewheel.event) return false;
+ s.container.off(s.mousewheel.event, handleMousewheel);
+ return true;
+ };
+
+ s.enableMousewheelControl = function () {
+ if (!s.mousewheel.event) return false;
+ s.container.on(s.mousewheel.event, handleMousewheel);
+ return true;
+ };
+
+
+ /*=========================
+ Parallax
+ ===========================*/
+ function setParallaxTransform(el, progress) {
+ el = $(el);
+ var p, pX, pY;
+ var rtlFactor = s.rtl ? -1 : 1;
+
+ p = el.attr('data-swiper-parallax') || '0';
+ pX = el.attr('data-swiper-parallax-x');
+ pY = el.attr('data-swiper-parallax-y');
+ if (pX || pY) {
+ pX = pX || '0';
+ pY = pY || '0';
+ }
+ else {
+ if (s.isHorizontal()) {
+ pX = p;
+ pY = '0';
+ }
+ else {
+ pY = p;
+ pX = '0';
+ }
+ }
+
+ if ((pX).indexOf('%') >= 0) {
+ pX = parseInt(pX, 10) * progress * rtlFactor + '%';
+ }
+ else {
+ pX = pX * progress * rtlFactor + 'px' ;
+ }
+ if ((pY).indexOf('%') >= 0) {
+ pY = parseInt(pY, 10) * progress + '%';
+ }
+ else {
+ pY = pY * progress + 'px' ;
+ }
+
+ el.transform('translate3d(' + pX + ', ' + pY + ',0px)');
+ }
+ s.parallax = {
+ setTranslate: function () {
+ s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
+ setParallaxTransform(this, s.progress);
+
+ });
+ s.slides.each(function () {
+ var slide = $(this);
+ slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {
+ var progress = Math.min(Math.max(slide[0].progress, -1), 1);
+ setParallaxTransform(this, progress);
+ });
+ });
+ },
+ setTransition: function (duration) {
+ if (typeof duration === 'undefined') duration = s.params.speed;
+ s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
+ var el = $(this);
+ var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;
+ if (duration === 0) parallaxDuration = 0;
+ el.transition(parallaxDuration);
+ });
+ }
+ };
+
+
+ /*=========================
+ Plugins API. Collect all and init all plugins
+ ===========================*/
+ s._plugins = [];
+ for (var plugin in s.plugins) {
+ var p = s.plugins[plugin](s, s.params[plugin]);
+ if (p) s._plugins.push(p);
+ }
+ // Method to call all plugins event/method
+ s.callPlugins = function (eventName) {
+ for (var i = 0; i < s._plugins.length; i++) {
+ if (eventName in s._plugins[i]) {
+ s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ }
+ };
+
+ /*=========================
+ Events/Callbacks/Plugins Emitter
+ ===========================*/
+ function normalizeEventName (eventName) {
+ if (eventName.indexOf('on') !== 0) {
+ if (eventName[0] !== eventName[0].toUpperCase()) {
+ eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);
+ }
+ else {
+ eventName = 'on' + eventName;
+ }
+ }
+ return eventName;
+ }
+ s.emitterEventListeners = {
+
+ };
+ s.emit = function (eventName) {
+ // Trigger callbacks
+ if (s.params[eventName]) {
+ s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ var i;
+ // Trigger events
+ if (s.emitterEventListeners[eventName]) {
+ for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
+ s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ }
+ }
+ // Trigger plugins
+ if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+ };
+ s.on = function (eventName, handler) {
+ eventName = normalizeEventName(eventName);
+ if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];
+ s.emitterEventListeners[eventName].push(handler);
+ return s;
+ };
+ s.off = function (eventName, handler) {
+ var i;
+ eventName = normalizeEventName(eventName);
+ if (typeof handler === 'undefined') {
+ // Remove all handlers for such event
+ s.emitterEventListeners[eventName] = [];
+ return s;
+ }
+ if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;
+ for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
+ if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);
+ }
+ return s;
+ };
+ s.once = function (eventName, handler) {
+ eventName = normalizeEventName(eventName);
+ var _handler = function () {
+ handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
+ s.off(eventName, _handler);
+ };
+ s.on(eventName, _handler);
+ return s;
+ };
+
+ // Accessibility tools
+ s.a11y = {
+ makeFocusable: function ($el) {
+ $el.attr('tabIndex', '0');
+ return $el;
+ },
+ addRole: function ($el, role) {
+ $el.attr('role', role);
+ return $el;
+ },
+
+ addLabel: function ($el, label) {
+ $el.attr('aria-label', label);
+ return $el;
+ },
+
+ disable: function ($el) {
+ $el.attr('aria-disabled', true);
+ return $el;
+ },
+
+ enable: function ($el) {
+ $el.attr('aria-disabled', false);
+ return $el;
+ },
+
+ onEnterKey: function (event) {
+ if (event.keyCode !== 13) return;
+ if ($(event.target).is(s.params.nextButton)) {
+ s.onClickNext(event);
+ if (s.isEnd) {
+ s.a11y.notify(s.params.lastSlideMessage);
+ }
+ else {
+ s.a11y.notify(s.params.nextSlideMessage);
+ }
+ }
+ else if ($(event.target).is(s.params.prevButton)) {
+ s.onClickPrev(event);
+ if (s.isBeginning) {
+ s.a11y.notify(s.params.firstSlideMessage);
+ }
+ else {
+ s.a11y.notify(s.params.prevSlideMessage);
+ }
+ }
+ if ($(event.target).is('.' + s.params.bulletClass)) {
+ $(event.target)[0].click();
+ }
+ },
+
+ liveRegion: $(''),
+
+ notify: function (message) {
+ var notification = s.a11y.liveRegion;
+ if (notification.length === 0) return;
+ notification.html('');
+ notification.html(message);
+ },
+ init: function () {
+ // Setup accessibility
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ s.a11y.makeFocusable(s.nextButton);
+ s.a11y.addRole(s.nextButton, 'button');
+ s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);
+ }
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.a11y.makeFocusable(s.prevButton);
+ s.a11y.addRole(s.prevButton, 'button');
+ s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);
+ }
+
+ $(s.container).append(s.a11y.liveRegion);
+ },
+ initPagination: function () {
+ if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {
+ s.bullets.each(function () {
+ var bullet = $(this);
+ s.a11y.makeFocusable(bullet);
+ s.a11y.addRole(bullet, 'button');
+ s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));
+ });
+ }
+ },
+ destroy: function () {
+ if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();
+ }
+ };
+
+
+ /*=========================
+ Init/Destroy
+ ===========================*/
+ s.init = function () {
+ if (s.params.loop) s.createLoop();
+ s.updateContainerSize();
+ s.updateSlidesSize();
+ s.updatePagination();
+ if (s.params.scrollbar && s.scrollbar) {
+ s.scrollbar.set();
+ if (s.params.scrollbarDraggable) {
+ s.scrollbar.enableDraggable();
+ }
+ }
+ if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
+ if (!s.params.loop) s.updateProgress();
+ s.effects[s.params.effect].setTranslate();
+ }
+ if (s.params.loop) {
+ s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);
+ }
+ else {
+ s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);
+ if (s.params.initialSlide === 0) {
+ if (s.parallax && s.params.parallax) s.parallax.setTranslate();
+ if (s.lazy && s.params.lazyLoading) {
+ s.lazy.load();
+ s.lazy.initialImageLoaded = true;
+ }
+ }
+ }
+ s.attachEvents();
+ if (s.params.observer && s.support.observer) {
+ s.initObservers();
+ }
+ if (s.params.preloadImages && !s.params.lazyLoading) {
+ s.preloadImages();
+ }
+ if (s.params.autoplay) {
+ s.startAutoplay();
+ }
+ if (s.params.keyboardControl) {
+ if (s.enableKeyboardControl) s.enableKeyboardControl();
+ }
+ if (s.params.mousewheelControl) {
+ if (s.enableMousewheelControl) s.enableMousewheelControl();
+ }
+ if (s.params.hashnav) {
+ if (s.hashnav) s.hashnav.init();
+ }
+ if (s.params.a11y && s.a11y) s.a11y.init();
+ s.emit('onInit', s);
+ };
+
+ // Cleanup dynamic styles
+ s.cleanupStyles = function () {
+ // Container
+ s.container.removeClass(s.classNames.join(' ')).removeAttr('style');
+
+ // Wrapper
+ s.wrapper.removeAttr('style');
+
+ // Slides
+ if (s.slides && s.slides.length) {
+ s.slides
+ .removeClass([
+ s.params.slideVisibleClass,
+ s.params.slideActiveClass,
+ s.params.slideNextClass,
+ s.params.slidePrevClass
+ ].join(' '))
+ .removeAttr('style')
+ .removeAttr('data-swiper-column')
+ .removeAttr('data-swiper-row');
+ }
+
+ // Pagination/Bullets
+ if (s.paginationContainer && s.paginationContainer.length) {
+ s.paginationContainer.removeClass(s.params.paginationHiddenClass);
+ }
+ if (s.bullets && s.bullets.length) {
+ s.bullets.removeClass(s.params.bulletActiveClass);
+ }
+
+ // Buttons
+ if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);
+ if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);
+
+ // Scrollbar
+ if (s.params.scrollbar && s.scrollbar) {
+ if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');
+ if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');
+ }
+ };
+
+ // Destroy
+ s.destroy = function (deleteInstance, cleanupStyles) {
+ // Detach evebts
+ s.detachEvents();
+ // Stop autoplay
+ s.stopAutoplay();
+ // Disable draggable
+ if (s.params.scrollbar && s.scrollbar) {
+ if (s.params.scrollbarDraggable) {
+ s.scrollbar.disableDraggable();
+ }
+ }
+ // Destroy loop
+ if (s.params.loop) {
+ s.destroyLoop();
+ }
+ // Cleanup styles
+ if (cleanupStyles) {
+ s.cleanupStyles();
+ }
+ // Disconnect observer
+ s.disconnectObservers();
+ // Disable keyboard/mousewheel
+ if (s.params.keyboardControl) {
+ if (s.disableKeyboardControl) s.disableKeyboardControl();
+ }
+ if (s.params.mousewheelControl) {
+ if (s.disableMousewheelControl) s.disableMousewheelControl();
+ }
+ // Disable a11y
+ if (s.params.a11y && s.a11y) s.a11y.destroy();
+ // Destroy callback
+ s.emit('onDestroy');
+ // Delete instance
+ if (deleteInstance !== false) s = null;
+ };
+
+ s.init();
+
+
+
+ // Return swiper instance
+ return s;
+ };
+
+
+ /*==================================================
+ Prototype
+ ====================================================*/
+ Swiper.prototype = {
+ isSafari: (function () {
+ var ua = navigator.userAgent.toLowerCase();
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
+ })(),
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),
+ isArray: function (arr) {
+ return Object.prototype.toString.apply(arr) === '[object Array]';
+ },
+ /*==================================================
+ Browser
+ ====================================================*/
+ browser: {
+ ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
+ ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1)
+ },
+ /*==================================================
+ Devices
+ ====================================================*/
+ device: (function () {
+ var ua = navigator.userAgent;
+ var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
+ var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
+ var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
+ var iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/);
+ return {
+ ios: ipad || iphone || ipod,
+ android: android
+ };
+ })(),
+ /*==================================================
+ Feature Detection
+ ====================================================*/
+ support: {
+ touch : (window.Modernizr && Modernizr.touch === true) || (function () {
+ return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
+ })(),
+
+ transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {
+ var div = document.createElement('div').style;
+ return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);
+ })(),
+
+ flexbox: (function () {
+ var div = document.createElement('div').style;
+ var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
+ for (var i = 0; i < styles.length; i++) {
+ if (styles[i] in div) return true;
+ }
+ })(),
+
+ observer: (function () {
+ return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
+ })()
+ },
+ /*==================================================
+ Plugins
+ ====================================================*/
+ plugins: {}
+ };
+
+
+ /*===========================
+ Get Dom libraries
+ ===========================*/
+ var addLibraryPlugin = function (lib) {
+ lib.fn.swiper = function (params) {
+ var firstInstance;
+ lib(this).each(function () {
+ var s = new Swiper(this, params);
+ if (!firstInstance) firstInstance = s;
+ });
+ return firstInstance;
+ };
+ };
+ var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];
+ for (var i = 0; i < swiperDomPlugins.length; i++) {
+ if (window[swiperDomPlugins[i]]) {
+ addLibraryPlugin(window[swiperDomPlugins[i]]);
+ }
+ }
+ // Required DOM Plugins
+ var domLib;
+ if (typeof Dom7 === 'undefined') {
+ domLib = window.Dom7 || window.Zepto || window.jQuery;
+ }
+ else {
+ domLib = Dom7;
+ }
+
+
+ if (domLib) {
+ if (!('transitionEnd' in domLib.fn)) {
+ domLib.fn.transitionEnd = function (callback) {
+ var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
+ i, j, dom = this;
+ function fireCallBack(e) {
+ /*jshint validthis:true */
+ if (e.target !== this) return;
+ callback.call(this, e);
+ for (i = 0; i < events.length; i++) {
+ dom.off(events[i], fireCallBack);
+ }
+ }
+ if (callback) {
+ for (i = 0; i < events.length; i++) {
+ dom.on(events[i], fireCallBack);
+ }
+ }
+ return this;
+ };
+ }
+ if (!('transform' in domLib.fn)) {
+ domLib.fn.transform = function (transform) {
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
+ }
+ return this;
+ };
+ }
+ if (!('transition' in domLib.fn)) {
+ domLib.fn.transition = function (duration) {
+ if (typeof duration !== 'string') {
+ duration = duration + 'ms';
+ }
+ for (var i = 0; i < this.length; i++) {
+ var elStyle = this[i].style;
+ elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
+ }
+ return this;
+ };
+ }
+ }
+
+ $.Swiper = Swiper;
+ $.Swiper.prototype.defaults = defaults;
+})($);
+
+/*===========================
+Framework7 Swiper Additions
+===========================*/
+/* global $:true */
++function($){
+ 'use strict';
+ $.Swiper.prototype.defaults.pagination = '.swiper-pagination';
+
+ $.swiper = function (container, params) {
+ return new $.Swiper(container, params);
+ };
+ $.fn.swiper = function (params) {
+ return new $.Swiper(this, params);
+ };
+ $.initSwiper = function (pageContainer) {
+ var page = $(pageContainer || document.body);
+ var swipers = page.find('.swiper-container');
+ if (swipers.length === 0) return;
+ for (var i = 0; i < swipers.length; i++) {
+ var swiper = swipers.eq(i);
+ var params;
+ if (swiper.data('swiper')) {
+ swiper.data("swiper").update(true);
+ continue;
+ }
+ else {
+ params = swiper.dataset();
+ }
+ $.swiper(swiper[0], params);
+ }
+ };
+ $.reinitSwiper = function (pageContainer) {
+ var page = $(pageContainer);
+ var sliders = page.find('.swiper-container');
+ if (sliders.length === 0) return;
+ for (var i = 0; i < sliders.length; i++) {
+ var sliderInstance = sliders[0].swiper;
+ if (sliderInstance) {
+ sliderInstance.update(true);
+ }
+ }
+ };
+
+}($);
+
+/*======================================================
+************ Photo Browser ************
+======================================================*/
+/* global $:true */
++function($){
+ 'use strict';
+ var PhotoBrowser = function (params) {
+
+ var pb = this, i;
+
+ var defaults = this.defaults;
+
+ params = params || {};
+ for (var def in defaults) {
+ if (typeof params[def] === 'undefined') {
+ params[def] = defaults[def];
+ }
+ }
+
+ pb.params = params;
+
+ var navbarTemplate = pb.params.navbarTemplate ||
+ '' +
+ '' +
+ ' ' + pb.params.ofText + '
' +
+ '';
+
+ var toolbarTemplate = pb.params.toolbarTemplate ||
+ '';
+
+ var template = pb.params.template ||
+ '' +
+ '{{navbar}}' +
+ '{{toolbar}}' +
+ '
' +
+ '{{captions}}' +
+ '
' +
+ '
' +
+ '{{photos}}' +
+ '
' +
+ '
' +
+ '
' +
+ '
';
+
+ var photoTemplate = !pb.params.lazyLoading ?
+ (pb.params.photoTemplate || '') :
+ (pb.params.photoLazyTemplate || '');
+
+ var captionsTheme = pb.params.captionsTheme || pb.params.theme;
+ var captionsTemplate = pb.params.captionsTemplate || '{{captions}}
';
+ var captionTemplate = pb.params.captionTemplate || '{{caption}}
';
+
+ var objectTemplate = pb.params.objectTemplate || '{{html}}
';
+ var photosHtml = '';
+ var captionsHtml = '';
+ for (i = 0; i < pb.params.photos.length; i ++) {
+ var photo = pb.params.photos[i];
+ var thisTemplate = '';
+
+ //check if photo is a string or string-like object, for backwards compatibility
+ if (typeof(photo) === 'string' || photo instanceof String) {
+
+ //check if "photo" is html object
+ if (photo.indexOf('<') >= 0 || photo.indexOf('>') >= 0) {
+ thisTemplate = objectTemplate.replace(/{{html}}/g, photo);
+ } else {
+ thisTemplate = photoTemplate.replace(/{{url}}/g, photo);
+ }
+
+ //photo is a string, thus has no caption, so remove the caption template placeholder
+ //otherwise check if photo is an object with a url property
+ } else if (typeof(photo) === 'object') {
+
+ //check if "photo" is html object
+ if (photo.hasOwnProperty('html') && photo.html.length > 0) {
+ thisTemplate = objectTemplate.replace(/{{html}}/g, photo.html);
+ } else if (photo.hasOwnProperty('url') && photo.url.length > 0) {
+ thisTemplate = photoTemplate.replace(/{{url}}/g, photo.url);
+ }
+
+ //check if photo has a caption
+ if (photo.hasOwnProperty('caption') && photo.caption.length > 0) {
+ captionsHtml += captionTemplate.replace(/{{caption}}/g, photo.caption).replace(/{{captionIndex}}/g, i);
+ } else {
+ thisTemplate = thisTemplate.replace(/{{caption}}/g, '');
+ }
+ }
+
+ photosHtml += thisTemplate;
+
+ }
+
+ var htmlTemplate = template
+ .replace('{{navbar}}', (pb.params.navbar ? navbarTemplate : ''))
+ .replace('{{noNavbar}}', (pb.params.navbar ? '' : 'no-navbar'))
+ .replace('{{photos}}', photosHtml)
+ .replace('{{captions}}', captionsTemplate.replace(/{{captions}}/g, captionsHtml))
+ .replace('{{toolbar}}', (pb.params.toolbar ? toolbarTemplate : ''));
+
+ pb.activeIndex = pb.params.initialSlide;
+ pb.openIndex = pb.activeIndex;
+ pb.opened = false;
+
+ pb.open = function (index) {
+ if (typeof index === 'undefined') index = pb.activeIndex;
+ index = parseInt(index, 10);
+ if (pb.opened && pb.swiper) {
+ pb.swiper.slideTo(index);
+ return;
+ }
+ pb.opened = true;
+ pb.openIndex = index;
+ // pb.initialLazyLoaded = false;
+ if (pb.params.type === 'standalone') {
+ $(pb.params.container).append(htmlTemplate);
+ }
+ if (pb.params.type === 'popup') {
+ pb.popup = $.popup('');
+ $(pb.popup).on('closed', pb.onPopupClose);
+ }
+ if (pb.params.type === 'page') {
+ $(document).on('pageBeforeInit', pb.onPageBeforeInit);
+ $(document).on('pageBeforeRemove', pb.onPageBeforeRemove);
+ if (!pb.params.view) pb.params.view = $.mainView;
+ pb.params.view.loadContent(htmlTemplate);
+ return;
+ }
+ pb.layout(pb.openIndex);
+ if (pb.params.onOpen) {
+ pb.params.onOpen(pb);
+ }
+
+ };
+ pb.close = function () {
+ pb.opened = false;
+ if (!pb.swiperContainer || pb.swiperContainer.length === 0) {
+ return;
+ }
+ if (pb.params.onClose) {
+ pb.params.onClose(pb);
+ }
+ // Detach events
+ pb.attachEvents(true);
+ // Delete from DOM
+ if (pb.params.type === 'standalone') {
+ pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () {
+ pb.container.remove();
+ });
+ }
+ // Destroy slider
+ pb.swiper.destroy();
+ // Delete references
+ pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = gestureSlide = gestureImg = gestureImgWrap = undefined;
+ };
+
+ pb.onPopupClose = function () {
+ pb.close();
+ $(pb.popup).off('pageBeforeInit', pb.onPopupClose);
+ };
+ pb.onPageBeforeInit = function (e) {
+ if (e.detail.page.name === 'photo-browser-slides') {
+ pb.layout(pb.openIndex);
+ }
+ $(document).off('pageBeforeInit', pb.onPageBeforeInit);
+ };
+ pb.onPageBeforeRemove = function (e) {
+ if (e.detail.page.name === 'photo-browser-slides') {
+ pb.close();
+ }
+ $(document).off('pageBeforeRemove', pb.onPageBeforeRemove);
+ };
+
+ pb.onSliderTransitionStart = function (swiper) {
+ pb.activeIndex = swiper.activeIndex;
+
+ var current = swiper.activeIndex + 1;
+ var total = swiper.slides.length;
+ if (pb.params.loop) {
+ total = total - 2;
+ current = current - swiper.loopedSlides;
+ if (current < 1) current = total + current;
+ if (current > total) current = current - total;
+ }
+ pb.container.find('.photo-browser-current').text(current);
+ pb.container.find('.photo-browser-total').text(total);
+
+ $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive');
+
+ if (swiper.isBeginning && !pb.params.loop) {
+ $('.photo-browser-prev').addClass('photo-browser-link-inactive');
+ }
+ if (swiper.isEnd && !pb.params.loop) {
+ $('.photo-browser-next').addClass('photo-browser-link-inactive');
+ }
+
+ // Update captions
+ if (pb.captions.length > 0) {
+ pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active');
+ var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex;
+ pb.captionsContainer.find('[data-caption-index="' + captionIndex + '"]').addClass('photo-browser-caption-active');
+ }
+
+
+ // Stop Video
+ var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video');
+ if (previousSlideVideo.length > 0) {
+ if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause();
+ }
+ // Callback
+ if (pb.params.onSlideChangeStart) pb.params.onSlideChangeStart(swiper);
+ };
+ pb.onSliderTransitionEnd = function (swiper) {
+ // Reset zoom
+ if (pb.params.zoom && gestureSlide && swiper.previousIndex !== swiper.activeIndex) {
+ gestureImg.transform('translate3d(0,0,0) scale(1)');
+ gestureImgWrap.transform('translate3d(0,0,0)');
+ gestureSlide = gestureImg = gestureImgWrap = undefined;
+ scale = currentScale = 1;
+ }
+ if (pb.params.onSlideChangeEnd) pb.params.onSlideChangeEnd(swiper);
+ };
+
+ pb.layout = function (index) {
+ if (pb.params.type === 'page') {
+ pb.container = $('.photo-browser-swiper-container').parents('.view');
+ }
+ else {
+ pb.container = $('.photo-browser');
+ }
+ if (pb.params.type === 'standalone') {
+ pb.container.addClass('photo-browser-in');
+ // $.sizeNavbars(pb.container);
+ }
+ pb.swiperContainer = pb.container.find('.photo-browser-swiper-container');
+ pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper');
+ pb.slides = pb.container.find('.photo-browser-slide');
+ pb.captionsContainer = pb.container.find('.photo-browser-captions');
+ pb.captions = pb.container.find('.photo-browser-caption');
+
+ var sliderSettings = {
+ nextButton: pb.params.nextButton || '.photo-browser-next',
+ prevButton: pb.params.prevButton || '.photo-browser-prev',
+ indexButton: pb.params.indexButton,
+ initialSlide: index,
+ spaceBetween: pb.params.spaceBetween,
+ speed: pb.params.speed,
+ loop: pb.params.loop,
+ lazyLoading: pb.params.lazyLoading,
+ lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext,
+ lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart,
+ preloadImages: pb.params.lazyLoading ? false : true,
+ onTap: function (swiper, e) {
+ if (pb.params.onTap) pb.params.onTap(swiper, e);
+ },
+ onClick: function (swiper, e) {
+ if (pb.params.exposition) pb.toggleExposition();
+ if (pb.params.onClick) pb.params.onClick(swiper, e);
+ },
+ onDoubleTap: function (swiper, e) {
+ pb.toggleZoom($(e.target).parents('.photo-browser-slide'));
+ if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e);
+ },
+ onTransitionStart: function (swiper) {
+ pb.onSliderTransitionStart(swiper);
+ },
+ onTransitionEnd: function (swiper) {
+ pb.onSliderTransitionEnd(swiper);
+ },
+ onLazyImageLoad: function (swiper, slide, img) {
+ if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img);
+ },
+ onLazyImageReady: function (swiper, slide, img) {
+ $(slide).removeClass('photo-browser-slide-lazy');
+ if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img);
+ }
+ };
+
+ if (pb.params.swipeToClose && pb.params.type !== 'page') {
+ sliderSettings.onTouchStart = pb.swipeCloseTouchStart;
+ sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove;
+ sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd;
+ }
+
+ pb.swiper = $.swiper(pb.swiperContainer, sliderSettings);
+ if (index === 0) {
+ pb.onSliderTransitionStart(pb.swiper);
+ }
+ pb.attachEvents();
+ };
+ pb.attachEvents = function (detach) {
+ var action = detach ? 'off' : 'on';
+ // Slide between photos
+
+ if (pb.params.zoom) {
+ var target = pb.params.loop ? pb.swiper.slides : pb.slides;
+ // Scale image
+ target[action]('gesturestart', pb.onSlideGestureStart);
+ target[action]('gesturechange', pb.onSlideGestureChange);
+ target[action]('gestureend', pb.onSlideGestureEnd);
+ // Move image
+ target[action]('touchstart', pb.onSlideTouchStart);
+ target[action]('touchmove', pb.onSlideTouchMove);
+ target[action]('touchend', pb.onSlideTouchEnd);
+ }
+ pb.container.find('.photo-browser-close-link')[action]('click', pb.close);
+ };
+
+ // Expose
+ pb.exposed = false;
+ pb.toggleExposition = function () {
+ if (pb.container) pb.container.toggleClass('photo-browser-exposed');
+ if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed');
+ pb.exposed = !pb.exposed;
+ };
+ pb.enableExposition = function () {
+ if (pb.container) pb.container.addClass('photo-browser-exposed');
+ if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed');
+ pb.exposed = true;
+ };
+ pb.disableExposition = function () {
+ if (pb.container) pb.container.removeClass('photo-browser-exposed');
+ if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed');
+ pb.exposed = false;
+ };
+
+ // Gestures
+ var gestureSlide, gestureImg, gestureImgWrap, scale = 1, currentScale = 1, isScaling = false;
+ pb.onSlideGestureStart = function () {
+ if (!gestureSlide) {
+ gestureSlide = $(this);
+ gestureImg = gestureSlide.find('img, svg, canvas');
+ gestureImgWrap = gestureImg.parent('.photo-browser-zoom-container');
+ if (gestureImgWrap.length === 0) {
+ gestureImg = undefined;
+ return;
+ }
+ }
+ gestureImg.transition(0);
+ isScaling = true;
+ };
+ pb.onSlideGestureChange = function (e) {
+ if (!gestureImg || gestureImg.length === 0) return;
+ scale = (e.scale || e.originalEvent.scale) * currentScale;
+ if (scale > pb.params.maxZoom) {
+ scale = pb.params.maxZoom - 1 + Math.pow((scale - pb.params.maxZoom + 1), 0.5);
+ }
+ if (scale < pb.params.minZoom) {
+ scale = pb.params.minZoom + 1 - Math.pow((pb.params.minZoom - scale + 1), 0.5);
+ }
+ gestureImg.transform('translate3d(0,0,0) scale(' + scale + ')');
+ };
+ pb.onSlideGestureEnd = function () {
+ if (!gestureImg || gestureImg.length === 0) return;
+ scale = Math.max(Math.min(scale, pb.params.maxZoom), pb.params.minZoom);
+ gestureImg.transition(pb.params.speed).transform('translate3d(0,0,0) scale(' + scale + ')');
+ currentScale = scale;
+ isScaling = false;
+ if (scale === 1) gestureSlide = undefined;
+ };
+ pb.toggleZoom = function () {
+ if (!gestureSlide) {
+ gestureSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);
+ gestureImg = gestureSlide.find('img, svg, canvas');
+ gestureImgWrap = gestureImg.parent('.photo-browser-zoom-container');
+ }
+ if (!gestureImg || gestureImg.length === 0) return;
+ gestureImgWrap.transition(300).transform('translate3d(0,0,0)');
+ if (scale && scale !== 1) {
+ scale = currentScale = 1;
+ gestureImg.transition(300).transform('translate3d(0,0,0) scale(1)');
+ gestureSlide = undefined;
+ }
+ else {
+ scale = currentScale = pb.params.maxZoom;
+ gestureImg.transition(300).transform('translate3d(0,0,0) scale(' + scale + ')');
+ }
+ };
+
+ var imageIsTouched, imageIsMoved, imageCurrentX, imageCurrentY, imageMinX, imageMinY, imageMaxX, imageMaxY, imageWidth, imageHeight, imageTouchesStart = {}, imageTouchesCurrent = {}, imageStartX, imageStartY, velocityPrevPositionX, velocityPrevTime, velocityX, velocityPrevPositionY, velocityY;
+
+ pb.onSlideTouchStart = function (e) {
+ if (!gestureImg || gestureImg.length === 0) return;
+ if (imageIsTouched) return;
+ if ($.device.os === 'android') e.preventDefault();
+ imageIsTouched = true;
+ imageTouchesStart = $.getTouchPosition(e);
+ };
+ pb.onSlideTouchMove = function (e) {
+ if (!gestureImg || gestureImg.length === 0) return;
+ pb.swiper.allowClick = false;
+ if (!imageIsTouched || !gestureSlide) return;
+
+ if (!imageIsMoved) {
+ imageWidth = gestureImg[0].offsetWidth;
+ imageHeight = gestureImg[0].offsetHeight;
+ imageStartX = $.getTranslate(gestureImgWrap[0], 'x') || 0;
+ imageStartY = $.getTranslate(gestureImgWrap[0], 'y') || 0;
+ gestureImgWrap.transition(0);
+ }
+ // Define if we need image drag
+ var scaledWidth = imageWidth * scale;
+ var scaledHeight = imageHeight * scale;
+
+ if (scaledWidth < pb.swiper.width && scaledHeight < pb.swiper.height) return;
+
+ imageMinX = Math.min((pb.swiper.width / 2 - scaledWidth / 2), 0);
+ imageMaxX = -imageMinX;
+ imageMinY = Math.min((pb.swiper.height / 2 - scaledHeight / 2), 0);
+ imageMaxY = -imageMinY;
+
+ imageTouchesCurrent = $.getTouchPosition(e);
+
+ if (!imageIsMoved && !isScaling) {
+ if (
+ (Math.floor(imageMinX) === Math.floor(imageStartX) && imageTouchesCurrent.x < imageTouchesStart.x) ||
+ (Math.floor(imageMaxX) === Math.floor(imageStartX) && imageTouchesCurrent.x > imageTouchesStart.x)
+ ) {
+ imageIsTouched = false;
+ return;
+ }
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ imageIsMoved = true;
+ imageCurrentX = imageTouchesCurrent.x - imageTouchesStart.x + imageStartX;
+ imageCurrentY = imageTouchesCurrent.y - imageTouchesStart.y + imageStartY;
+
+ if (imageCurrentX < imageMinX) {
+ imageCurrentX = imageMinX + 1 - Math.pow((imageMinX - imageCurrentX + 1), 0.8);
+ }
+ if (imageCurrentX > imageMaxX) {
+ imageCurrentX = imageMaxX - 1 + Math.pow((imageCurrentX - imageMaxX + 1), 0.8);
+ }
+
+ if (imageCurrentY < imageMinY) {
+ imageCurrentY = imageMinY + 1 - Math.pow((imageMinY - imageCurrentY + 1), 0.8);
+ }
+ if (imageCurrentY > imageMaxY) {
+ imageCurrentY = imageMaxY - 1 + Math.pow((imageCurrentY - imageMaxY + 1), 0.8);
+ }
+
+ //Velocity
+ if (!velocityPrevPositionX) velocityPrevPositionX = imageTouchesCurrent.x;
+ if (!velocityPrevPositionY) velocityPrevPositionY = imageTouchesCurrent.y;
+ if (!velocityPrevTime) velocityPrevTime = Date.now();
+ velocityX = (imageTouchesCurrent.x - velocityPrevPositionX) / (Date.now() - velocityPrevTime) / 2;
+ velocityY = (imageTouchesCurrent.y - velocityPrevPositionY) / (Date.now() - velocityPrevTime) / 2;
+ if (Math.abs(imageTouchesCurrent.x - velocityPrevPositionX) < 2) velocityX = 0;
+ if (Math.abs(imageTouchesCurrent.y - velocityPrevPositionY) < 2) velocityY = 0;
+ velocityPrevPositionX = imageTouchesCurrent.x;
+ velocityPrevPositionY = imageTouchesCurrent.y;
+ velocityPrevTime = Date.now();
+
+ gestureImgWrap.transform('translate3d(' + imageCurrentX + 'px, ' + imageCurrentY + 'px,0)');
+ };
+ pb.onSlideTouchEnd = function () {
+ if (!gestureImg || gestureImg.length === 0) return;
+ if (!imageIsTouched || !imageIsMoved) {
+ imageIsTouched = false;
+ imageIsMoved = false;
+ return;
+ }
+ imageIsTouched = false;
+ imageIsMoved = false;
+ var momentumDurationX = 300;
+ var momentumDurationY = 300;
+ var momentumDistanceX = velocityX * momentumDurationX;
+ var newPositionX = imageCurrentX + momentumDistanceX;
+ var momentumDistanceY = velocityY * momentumDurationY;
+ var newPositionY = imageCurrentY + momentumDistanceY;
+
+ //Fix duration
+ if (velocityX !== 0) momentumDurationX = Math.abs((newPositionX - imageCurrentX) / velocityX);
+ if (velocityY !== 0) momentumDurationY = Math.abs((newPositionY - imageCurrentY) / velocityY);
+ var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
+
+ imageCurrentX = newPositionX;
+ imageCurrentY = newPositionY;
+
+ // Define if we need image drag
+ var scaledWidth = imageWidth * scale;
+ var scaledHeight = imageHeight * scale;
+ imageMinX = Math.min((pb.swiper.width / 2 - scaledWidth / 2), 0);
+ imageMaxX = -imageMinX;
+ imageMinY = Math.min((pb.swiper.height / 2 - scaledHeight / 2), 0);
+ imageMaxY = -imageMinY;
+ imageCurrentX = Math.max(Math.min(imageCurrentX, imageMaxX), imageMinX);
+ imageCurrentY = Math.max(Math.min(imageCurrentY, imageMaxY), imageMinY);
+
+ gestureImgWrap.transition(momentumDuration).transform('translate3d(' + imageCurrentX + 'px, ' + imageCurrentY + 'px,0)');
+ };
+
+ // Swipe Up To Close
+ var swipeToCloseIsTouched = false;
+ var allowSwipeToClose = true;
+ var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart;
+ pb.swipeCloseTouchStart = function () {
+ if (!allowSwipeToClose) return;
+ swipeToCloseIsTouched = true;
+ };
+ pb.swipeCloseTouchMove = function (swiper, e) {
+ if (!swipeToCloseIsTouched) return;
+ if (!swipeToCloseStarted) {
+ swipeToCloseStarted = true;
+ swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);
+ swipeToCloseTimeStart = (new Date()).getTime();
+ }
+ e.preventDefault();
+ swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent;
+ var opacity = 1 - Math.abs(swipeToCloseDiff) / 300;
+ swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)');
+ pb.swiper.container.css('opacity', opacity).transition(0);
+ };
+ pb.swipeCloseTouchEnd = function () {
+ swipeToCloseIsTouched = false;
+ if (!swipeToCloseStarted) {
+ swipeToCloseStarted = false;
+ return;
+ }
+ swipeToCloseStarted = false;
+ allowSwipeToClose = false;
+ var diff = Math.abs(swipeToCloseDiff);
+ var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart;
+ if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) {
+ setTimeout(function () {
+ if (pb.params.type === 'standalone') {
+ pb.close();
+ }
+ if (pb.params.type === 'popup') {
+ $.closeModal(pb.popup);
+ }
+ if (pb.params.onSwipeToClose) {
+ pb.params.onSwipeToClose(pb);
+ }
+ allowSwipeToClose = true;
+ }, 0);
+ return;
+ }
+ if (diff !== 0) {
+ swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () {
+ allowSwipeToClose = true;
+ swipeToCloseActiveSlide.removeClass('transitioning');
+ });
+ }
+ else {
+ allowSwipeToClose = true;
+ }
+ pb.swiper.container.css('opacity', '').transition('');
+ swipeToCloseActiveSlide.transform('');
+ };
+
+ return pb;
+ };
+
+ PhotoBrowser.prototype = {
+ defaults: {
+ photos : [],
+ container: 'body',
+ initialSlide: 0,
+ spaceBetween: 20,
+ speed: 300,
+ zoom: true,
+ maxZoom: 3,
+ minZoom: 1,
+ exposition: true,
+ expositionHideCaptions: false,
+ type: 'standalone',
+ navbar: true,
+ toolbar: true,
+ theme: 'light',
+ swipeToClose: true,
+ backLinkText: 'Close',
+ ofText: 'of',
+ loop: false,
+ lazyLoading: false,
+ lazyLoadingInPrevNext: false,
+ lazyLoadingOnTransitionStart: false,
+ /*
+ Callbacks:
+ onLazyImageLoad(pb, slide, img)
+ onLazyImageReady(pb, slide, img)
+ onOpen(pb)
+ onClose(pb)
+ onSlideChangeStart(swiper)
+ onSlideChangeEnd(swiper)
+ onTap(swiper, e)
+ onClick(swiper, e)
+ onDoubleTap(swiper, e)
+ onSwipeToClose(pb)
+ */
+ }
+ };
+
+ $.photoBrowser = function (params) {
+ $.extend(params, $.photoBrowser.prototype.defaults);
+ return new PhotoBrowser(params);
+ };
+
+ $.photoBrowser.prototype = {
+ defaults: {}
+ };
+
+}($);
diff --git a/fangija-zsyf/js/light7-swiper.min.js b/fangija-zsyf/js/light7-swiper.min.js
new file mode 100644
index 0000000..7c62e26
--- /dev/null
+++ b/fangija-zsyf/js/light7-swiper.min.js
@@ -0,0 +1,9 @@
+/*!
+ * =====================================================
+ * light7 V0.4.3 - http://light7.org/
+ *
+ * =====================================================
+ */
+!function(a){"use strict";var b={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,hashnav:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},c=function(d,e){function f(a){return Math.floor(a)}function g(){t.autoplayTimeoutId=setTimeout(function(){t.params.loop?(t.fixLoop(),t._slideNext(),t.emit("onAutoplay",t)):t.isEnd?e.autoplayStopOnLast?t.stopAutoplay():(t._slideTo(0),t.emit("onAutoplay",t)):(t._slideNext(),t.emit("onAutoplay",t))},t.params.autoplay)}function h(b,c){var d=a(b.target);if(!d.is(c))if("string"==typeof c)d=d.parents(c);else if(c.nodeType){var e;return d.parents().each(function(a,b){b===c&&(e=c)}),e?c:void 0}if(0!==d.length)return d[0]}function i(a,b){b=b||{};var c=window.MutationObserver||window.WebkitMutationObserver,d=new c(function(a){a.forEach(function(a){t.onResize(!0),t.emit("onObserverUpdate",t,a)})});d.observe(a,{attributes:"undefined"==typeof b.attributes?!0:b.attributes,childList:"undefined"==typeof b.childList?!0:b.childList,characterData:"undefined"==typeof b.characterData?!0:b.characterData}),t.observers.push(d)}function j(a){a.originalEvent&&(a=a.originalEvent);var b=a.keyCode||a.charCode;if(!t.params.allowSwipeToNext&&(t.isHorizontal()&&39===b||!t.isHorizontal()&&40===b))return!1;if(!t.params.allowSwipeToPrev&&(t.isHorizontal()&&37===b||!t.isHorizontal()&&38===b))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===b||39===b||38===b||40===b){var c=!1;if(t.container.parents(".swiper-slide").length>0&&0===t.container.parents(".swiper-slide-active").length)return;var d={left:window.pageXOffset,top:window.pageYOffset},e=window.innerWidth,f=window.innerHeight,g=t.container.offset();t.rtl&&(g.left=g.left-t.container[0].scrollLeft);for(var h=[[g.left,g.top],[g.left+t.width,g.top],[g.left,g.top+t.height],[g.left+t.width,g.top+t.height]],i=0;i=d.left&&j[0]<=d.left+e&&j[1]>=d.top&&j[1]<=d.top+f&&(c=!0)}if(!c)return}t.isHorizontal()?((37===b||39===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(39===b&&!t.rtl||37===b&&t.rtl)&&t.slideNext(),(37===b&&!t.rtl||39===b&&t.rtl)&&t.slidePrev()):((38===b||40===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),40===b&&t.slideNext(),38===b&&t.slidePrev())}}function k(a){a.originalEvent&&(a=a.originalEvent);var b=t.mousewheel.event,c=0,d=t.rtl?-1:1;if("mousewheel"===b)if(t.params.mousewheelForceToAxis)if(t.isHorizontal()){if(!(Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)))return;c=a.wheelDeltaX*d}else{if(!(Math.abs(a.wheelDeltaY)>Math.abs(a.wheelDeltaX)))return;c=a.wheelDeltaY}else c=Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)?-a.wheelDeltaX*d:-a.wheelDeltaY;else if("DOMMouseScroll"===b)c=-a.detail;else if("wheel"===b)if(t.params.mousewheelForceToAxis)if(t.isHorizontal()){if(!(Math.abs(a.deltaX)>Math.abs(a.deltaY)))return;c=-a.deltaX*d}else{if(!(Math.abs(a.deltaY)>Math.abs(a.deltaX)))return;c=-a.deltaY}else c=Math.abs(a.deltaX)>Math.abs(a.deltaY)?-a.deltaX*d:-a.deltaY;if(0!==c){if(t.params.mousewheelInvert&&(c=-c),t.params.freeMode){var e=t.getWrapperTranslate()+c*t.params.mousewheelSensitivity,f=t.isBeginning,g=t.isEnd;if(e>=t.minTranslate()&&(e=t.minTranslate()),e<=t.maxTranslate()&&(e=t.maxTranslate()),t.setWrapperTransition(0),t.setWrapperTranslate(e),t.updateProgress(),t.updateActiveIndex(),(!f&&t.isBeginning||!g&&t.isEnd)&&t.updateClasses(),t.params.freeModeSticky?(clearTimeout(t.mousewheel.timeout),t.mousewheel.timeout=setTimeout(function(){t.slideReset()},300)):t.params.lazyLoading&&t.lazy&&t.lazy.load(),0===e||e===t.maxTranslate())return}else{if((new window.Date).getTime()-t.mousewheel.lastScrollTime>60)if(0>c)if(t.isEnd&&!t.params.loop||t.animating){if(t.params.mousewheelReleaseOnEdges)return!0}else t.slideNext();else if(t.isBeginning&&!t.params.loop||t.animating){if(t.params.mousewheelReleaseOnEdges)return!0}else t.slidePrev();t.mousewheel.lastScrollTime=(new window.Date).getTime()}return t.params.autoplay&&t.stopAutoplay(),a.preventDefault?a.preventDefault():a.returnValue=!1,!1}}function l(b,c){b=a(b);var d,e,f,g=t.rtl?-1:1;d=b.attr("data-swiper-parallax")||"0",e=b.attr("data-swiper-parallax-x"),f=b.attr("data-swiper-parallax-y"),e||f?(e=e||"0",f=f||"0"):t.isHorizontal()?(e=d,f="0"):(f=d,e="0"),e=e.indexOf("%")>=0?parseInt(e,10)*c*g+"%":e*c*g+"px",f=f.indexOf("%")>=0?parseInt(f,10)*c+"%":f*c+"px",b.transform("translate3d("+e+", "+f+",0px)")}function m(a){return 0!==a.indexOf("on")&&(a=a[0]!==a[0].toUpperCase()?"on"+a[0].toUpperCase()+a.substring(1):"on"+a),a}if(!(this instanceof c))return new c(d,e);var n=e&&e.virtualTranslate;e=e||{};var o={};for(var p in e)if("object"!=typeof e[p]||null===e[p]||(e[p].nodeType||e[p]===window||e[p]===document||"undefined"!=typeof Dom7&&e[p]instanceof Dom7||"undefined"!=typeof jQuery&&e[p]instanceof jQuery))o[p]=e[p];else{o[p]={};for(var q in e[p])o[p][q]=e[p][q]}for(var r in b)if("undefined"==typeof e[r])e[r]=b[r];else if("object"==typeof e[r])for(var s in b[r])"undefined"==typeof e[r][s]&&(e[r][s]=b[r][s]);var t=this;if(t.params=e,t.originalParams=o,t.classNames=[],t.$=a,t.currentBreakpoint=void 0,t.getActiveBreakpoint=function(){if(!t.params.breakpoints)return!1;var a,b=!1,c=[];for(a in t.params.breakpoints)t.params.breakpoints.hasOwnProperty(a)&&c.push(a);c.sort(function(a,b){return parseInt(a,10)>parseInt(b,10)});for(var d=0;d=window.innerWidth&&!b&&(b=a);return b||"max"},t.setBreakpoint=function(){var a=t.getActiveBreakpoint();if(a&&t.currentBreakpoint!==a){var b=a in t.params.breakpoints?t.params.breakpoints[a]:t.originalParams,c=t.params.loop&&b.slidesPerView!==t.params.slidesPerView;for(var d in b)t.params[d]=b[d];t.currentBreakpoint=a,c&&t.destroyLoop&&t.reLoop(!0)}},t.params.breakpoints&&t.setBreakpoint(),t.container=a(d),0!==t.container.length){if(t.container.length>1){var u=[];return t.container.each(function(){u.push(new c(this,e))}),u}t.container[0].swiper=t,t.container.data("swiper",t),t.classNames.push("swiper-container-"+t.params.direction),t.params.freeMode&&t.classNames.push("swiper-container-free-mode"),t.support.flexbox||(t.classNames.push("swiper-container-no-flexbox"),t.params.slidesPerColumn=1),t.params.autoHeight&&t.classNames.push("swiper-container-autoheight"),(t.params.parallax||t.params.watchSlidesVisibility)&&(t.params.watchSlidesProgress=!0),["cube","coverflow","flip"].indexOf(t.params.effect)>=0&&(t.support.transforms3d?(t.params.watchSlidesProgress=!0,t.classNames.push("swiper-container-3d")):t.params.effect="slide"),"slide"!==t.params.effect&&t.classNames.push("swiper-container-"+t.params.effect),"cube"===t.params.effect&&(t.params.resistanceRatio=0,t.params.slidesPerView=1,t.params.slidesPerColumn=1,t.params.slidesPerGroup=1,t.params.centeredSlides=!1,t.params.spaceBetween=0,t.params.virtualTranslate=!0,t.params.setWrapperSize=!1),("fade"===t.params.effect||"flip"===t.params.effect)&&(t.params.slidesPerView=1,t.params.slidesPerColumn=1,t.params.slidesPerGroup=1,t.params.watchSlidesProgress=!0,t.params.spaceBetween=0,t.params.setWrapperSize=!1,"undefined"==typeof n&&(t.params.virtualTranslate=!0)),t.params.grabCursor&&t.support.touch&&(t.params.grabCursor=!1),t.wrapper=t.container.children("."+t.params.wrapperClass),t.params.pagination&&(t.paginationContainer=a(t.params.pagination),t.params.uniqueNavElements&&"string"==typeof t.params.pagination&&t.paginationContainer.length>1&&1===t.container.find(t.params.pagination).length&&(t.paginationContainer=t.container.find(t.params.pagination)),"bullets"===t.params.paginationType&&t.params.paginationClickable?t.paginationContainer.addClass("swiper-pagination-clickable"):t.params.paginationClickable=!1,t.paginationContainer.addClass("swiper-pagination-"+t.params.paginationType)),(t.params.nextButton||t.params.prevButton)&&(t.params.nextButton&&(t.nextButton=a(t.params.nextButton),t.params.uniqueNavElements&&"string"==typeof t.params.nextButton&&t.nextButton.length>1&&1===t.container.find(t.params.nextButton).length&&(t.nextButton=t.container.find(t.params.nextButton))),t.params.prevButton&&(t.prevButton=a(t.params.prevButton),t.params.uniqueNavElements&&"string"==typeof t.params.prevButton&&t.prevButton.length>1&&1===t.container.find(t.params.prevButton).length&&(t.prevButton=t.container.find(t.params.prevButton)))),t.isHorizontal=function(){return"horizontal"===t.params.direction},t.rtl=t.isHorizontal()&&("rtl"===t.container[0].dir.toLowerCase()||"rtl"===t.container.css("direction")),t.rtl&&t.classNames.push("swiper-container-rtl"),t.rtl&&(t.wrongRTL="-webkit-box"===t.wrapper.css("display")),t.params.slidesPerColumn>1&&t.classNames.push("swiper-container-multirow"),t.device.android&&t.classNames.push("swiper-container-android"),t.container.addClass(t.classNames.join(" ")),t.translate=0,t.progress=0,t.velocity=0,t.lockSwipeToNext=function(){t.params.allowSwipeToNext=!1},t.lockSwipeToPrev=function(){t.params.allowSwipeToPrev=!1},t.lockSwipes=function(){t.params.allowSwipeToNext=t.params.allowSwipeToPrev=!1},t.unlockSwipeToNext=function(){t.params.allowSwipeToNext=!0},t.unlockSwipeToPrev=function(){t.params.allowSwipeToPrev=!0},t.unlockSwipes=function(){t.params.allowSwipeToNext=t.params.allowSwipeToPrev=!0},t.params.grabCursor&&(t.container[0].style.cursor="move",t.container[0].style.cursor="-webkit-grab",t.container[0].style.cursor="-moz-grab",t.container[0].style.cursor="grab"),t.imagesToLoad=[],t.imagesLoaded=0,t.loadImage=function(a,b,c,d,e){function f(){e&&e()}var g;a.complete&&d?f():b?(g=new window.Image,g.onload=f,g.onerror=f,c&&(g.srcset=c),b&&(g.src=b)):f()},t.preloadImages=function(){function a(){"undefined"!=typeof t&&null!==t&&(void 0!==t.imagesLoaded&&t.imagesLoaded++,t.imagesLoaded===t.imagesToLoad.length&&(t.params.updateOnImagesReady&&t.update(),t.emit("onImagesReady",t)))}t.imagesToLoad=t.container.find("img");for(var b=0;b=0&&(b=parseFloat(b.replace("%",""))/100*t.size),t.virtualSize=-b,t.rtl?t.slides.css({marginLeft:"",marginTop:""}):t.slides.css({marginRight:"",marginBottom:""});var g;t.params.slidesPerColumn>1&&(g=Math.floor(t.slides.length/t.params.slidesPerColumn)===t.slides.length/t.params.slidesPerColumn?t.slides.length:Math.ceil(t.slides.length/t.params.slidesPerColumn)*t.params.slidesPerColumn,"auto"!==t.params.slidesPerView&&"row"===t.params.slidesPerColumnFill&&(g=Math.max(g,t.params.slidesPerView*t.params.slidesPerColumn)));var h,i=t.params.slidesPerColumn,j=g/i,k=j-(t.params.slidesPerColumn*j-t.slides.length);for(a=0;a1){var m,n,o;"column"===t.params.slidesPerColumnFill?(n=Math.floor(a/i),o=a-n*i,(n>k||n===k&&o===i-1)&&++o>=i&&(o=0,n++),m=n+o*g/i,l.css({"-webkit-box-ordinal-group":m,"-moz-box-ordinal-group":m,"-ms-flex-order":m,"-webkit-order":m,order:m})):(o=Math.floor(a/j),n=a-o*j),l.css({"margin-top":0!==o&&t.params.spaceBetween&&t.params.spaceBetween+"px"}).attr("data-swiper-column",n).attr("data-swiper-row",o)}"none"!==l.css("display")&&("auto"===t.params.slidesPerView?(h=t.isHorizontal()?l.outerWidth(!0):l.outerHeight(!0),t.params.roundLengths&&(h=f(h))):(h=(t.size-(t.params.slidesPerView-1)*b)/t.params.slidesPerView,t.params.roundLengths&&(h=f(h)),t.isHorizontal()?t.slides[a].style.width=h+"px":t.slides[a].style.height=h+"px"),t.slides[a].swiperSlideSize=h,t.slidesSizesGrid.push(h),t.params.centeredSlides?(c=c+h/2+d/2+b,0===a&&(c=c-t.size/2-b),Math.abs(c)<.001&&(c=0),e%t.params.slidesPerGroup===0&&t.snapGrid.push(c),t.slidesGrid.push(c)):(e%t.params.slidesPerGroup===0&&t.snapGrid.push(c),t.slidesGrid.push(c),c=c+h+b),t.virtualSize+=h+b,d=h,e++)}t.virtualSize=Math.max(t.virtualSize,t.size)+t.params.slidesOffsetAfter;var p;if(t.rtl&&t.wrongRTL&&("slide"===t.params.effect||"coverflow"===t.params.effect)&&t.wrapper.css({width:t.virtualSize+t.params.spaceBetween+"px"}),(!t.support.flexbox||t.params.setWrapperSize)&&(t.isHorizontal()?t.wrapper.css({width:t.virtualSize+t.params.spaceBetween+"px"}):t.wrapper.css({height:t.virtualSize+t.params.spaceBetween+"px"})),t.params.slidesPerColumn>1&&(t.virtualSize=(h+t.params.spaceBetween)*g,t.virtualSize=Math.ceil(t.virtualSize/t.params.slidesPerColumn)-t.params.spaceBetween,t.wrapper.css({width:t.virtualSize+t.params.spaceBetween+"px"}),t.params.centeredSlides)){for(p=[],a=0;a1&&t.snapGrid.push(t.virtualSize-t.size)}0===t.snapGrid.length&&(t.snapGrid=[0]),0!==t.params.spaceBetween&&(t.isHorizontal()?t.rtl?t.slides.css({marginLeft:b+"px"}):t.slides.css({marginRight:b+"px"}):t.slides.css({marginBottom:b+"px"})),t.params.watchSlidesProgress&&t.updateSlidesOffset()}},t.updateSlidesOffset=function(){for(var a=0;a=0&&f0&&g<=t.size||0>=f&&g>=t.size;h&&t.slides.eq(c).addClass(t.params.slideVisibleClass)}d.progress=t.rtl?-e:e}}},t.updateProgress=function(a){"undefined"==typeof a&&(a=t.translate||0);var b=t.maxTranslate()-t.minTranslate(),c=t.isBeginning,d=t.isEnd;0===b?(t.progress=0,t.isBeginning=t.isEnd=!0):(t.progress=(a-t.minTranslate())/b,t.isBeginning=t.progress<=0,t.isEnd=t.progress>=1),t.isBeginning&&!c&&t.emit("onReachBeginning",t),t.isEnd&&!d&&t.emit("onReachEnd",t),t.params.watchSlidesProgress&&t.updateSlidesProgress(a),t.emit("onProgress",t,t.progress)},t.updateActiveIndex=function(){var a,b,c,d=t.rtl?t.translate:-t.translate;for(b=0;b=t.slidesGrid[b]&&d=t.slidesGrid[b]&&d=t.slidesGrid[b]&&(a=b);(0>a||"undefined"==typeof a)&&(a=0),c=Math.floor(a/t.params.slidesPerGroup),c>=t.snapGrid.length&&(c=t.snapGrid.length-1),a!==t.activeIndex&&(t.snapIndex=c,t.previousIndex=t.activeIndex,t.activeIndex=a,t.updateClasses())},t.updateClasses=function(){t.slides.removeClass(t.params.slideActiveClass+" "+t.params.slideNextClass+" "+t.params.slidePrevClass);var b=t.slides.eq(t.activeIndex);b.addClass(t.params.slideActiveClass);var c=b.next("."+t.params.slideClass).addClass(t.params.slideNextClass);t.params.loop&&0===c.length&&t.slides.eq(0).addClass(t.params.slideNextClass);var d=b.prev("."+t.params.slideClass).addClass(t.params.slidePrevClass);if(t.params.loop&&0===d.length&&t.slides.eq(-1).addClass(t.params.slidePrevClass),t.paginationContainer&&t.paginationContainer.length>0){var e,f=t.params.loop?Math.ceil((t.slides.length-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(e=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup),e>t.slides.length-1-2*t.loopedSlides&&(e-=t.slides.length-2*t.loopedSlides),e>f-1&&(e-=f),0>e&&"bullets"!==t.params.paginationType&&(e=f+e)):e="undefined"!=typeof t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===t.params.paginationType&&t.bullets&&t.bullets.length>0&&(t.bullets.removeClass(t.params.bulletActiveClass),t.paginationContainer.length>1?t.bullets.each(function(){a(this).index()===e&&a(this).addClass(t.params.bulletActiveClass)}):t.bullets.eq(e).addClass(t.params.bulletActiveClass)),"fraction"===t.params.paginationType&&(t.paginationContainer.find("."+t.params.paginationCurrentClass).text(e+1),t.paginationContainer.find("."+t.params.paginationTotalClass).text(f)),"progress"===t.params.paginationType){var g=(e+1)/f,h=g,i=1;t.isHorizontal()||(i=g,h=1),t.paginationContainer.find("."+t.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+h+") scaleY("+i+")").transition(t.params.speed)}"custom"===t.params.paginationType&&t.params.paginationCustomRender&&(t.paginationContainer.html(t.params.paginationCustomRender(t,e+1,f)),t.emit("onPaginationRendered",t,t.paginationContainer[0]))}t.params.loop||(t.params.prevButton&&t.prevButton&&t.prevButton.length>0&&(t.isBeginning?(t.prevButton.addClass(t.params.buttonDisabledClass),t.params.a11y&&t.a11y&&t.a11y.disable(t.prevButton)):(t.prevButton.removeClass(t.params.buttonDisabledClass),t.params.a11y&&t.a11y&&t.a11y.enable(t.prevButton))),t.params.nextButton&&t.nextButton&&t.nextButton.length>0&&(t.isEnd?(t.nextButton.addClass(t.params.buttonDisabledClass),t.params.a11y&&t.a11y&&t.a11y.disable(t.nextButton)):(t.nextButton.removeClass(t.params.buttonDisabledClass),t.params.a11y&&t.a11y&&t.a11y.enable(t.nextButton))))},t.updatePagination=function(){if(t.params.pagination&&t.paginationContainer&&t.paginationContainer.length>0){var a="";if("bullets"===t.params.paginationType){for(var b=t.params.loop?Math.ceil((t.slides.length-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length,c=0;b>c;c++)a+=t.params.paginationBulletRender?t.params.paginationBulletRender(c,t.params.bulletClass):"<"+t.params.paginationElement+' class="'+t.params.bulletClass+'">'+t.params.paginationElement+">";t.paginationContainer.html(a),t.bullets=t.paginationContainer.find("."+t.params.bulletClass),t.params.paginationClickable&&t.params.a11y&&t.a11y&&t.a11y.initPagination()}"fraction"===t.params.paginationType&&(a=t.params.paginationFractionRender?t.params.paginationFractionRender(t,t.params.paginationCurrentClass,t.params.paginationTotalClass):' / ',t.paginationContainer.html(a)),"progress"===t.params.paginationType&&(a=t.params.paginationProgressRender?t.params.paginationProgressRender(t,t.params.paginationProgressbarClass):'',t.paginationContainer.html(a)),"custom"!==t.params.paginationType&&t.emit("onPaginationRendered",t,t.paginationContainer[0])}},t.update=function(a){function b(){d=Math.min(Math.max(t.translate,t.maxTranslate()),t.minTranslate()),t.setWrapperTranslate(d),t.updateActiveIndex(),t.updateClasses()}if(t.updateContainerSize(),t.updateSlidesSize(),t.updateProgress(),t.updatePagination(),t.updateClasses(),t.params.scrollbar&&t.scrollbar&&t.scrollbar.set(),a){var c,d;t.controller&&t.controller.spline&&(t.controller.spline=void 0),t.params.freeMode?(b(),t.params.autoHeight&&t.updateAutoHeight()):(c=("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0),c||b())}else t.params.autoHeight&&t.updateAutoHeight()},t.onResize=function(a){t.params.breakpoints&&t.setBreakpoint();var b=t.params.allowSwipeToPrev,c=t.params.allowSwipeToNext;t.params.allowSwipeToPrev=t.params.allowSwipeToNext=!0,t.updateContainerSize(),t.updateSlidesSize(),("auto"===t.params.slidesPerView||t.params.freeMode||a)&&t.updatePagination(),t.params.scrollbar&&t.scrollbar&&t.scrollbar.set(),t.controller&&t.controller.spline&&(t.controller.spline=void 0);var d=!1;if(t.params.freeMode){var e=Math.min(Math.max(t.translate,t.maxTranslate()),t.minTranslate());t.setWrapperTranslate(e),t.updateActiveIndex(),t.updateClasses(),t.params.autoHeight&&t.updateAutoHeight()}else t.updateClasses(),d=("auto"===t.params.slidesPerView||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?t.slideTo(t.slides.length-1,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0);t.params.lazyLoading&&!d&&t.lazy&&t.lazy.load(),t.params.allowSwipeToPrev=b,t.params.allowSwipeToNext=c};var v=["mousedown","mousemove","mouseup"];window.navigator.pointerEnabled?v=["pointerdown","pointermove","pointerup"]:window.navigator.msPointerEnabled&&(v=["MSPointerDown","MSPointerMove","MSPointerUp"]),t.touchEvents={start:t.support.touch||!t.params.simulateTouch?"touchstart":v[0],move:t.support.touch||!t.params.simulateTouch?"touchmove":v[1],end:t.support.touch||!t.params.simulateTouch?"touchend":v[2]},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===t.params.touchEventsTarget?t.container:t.wrapper).addClass("swiper-wp8-"+t.params.direction),t.initEvents=function(a){var b=a?"off":"on",c=a?"removeEventListener":"addEventListener",d="container"===t.params.touchEventsTarget?t.container[0]:t.wrapper[0],f=t.support.touch?d:document,g=t.params.nested?!0:!1;t.browser.ie?(d[c](t.touchEvents.start,t.onTouchStart,!1),f[c](t.touchEvents.move,t.onTouchMove,g),f[c](t.touchEvents.end,t.onTouchEnd,!1)):(t.support.touch&&(d[c](t.touchEvents.start,t.onTouchStart,!1),d[c](t.touchEvents.move,t.onTouchMove,g),d[c](t.touchEvents.end,t.onTouchEnd,!1)),!e.simulateTouch||t.device.ios||t.device.android||(d[c]("mousedown",t.onTouchStart,!1),document[c]("mousemove",t.onTouchMove,g),document[c]("mouseup",t.onTouchEnd,!1))),window[c]("resize",t.onResize),t.params.nextButton&&t.nextButton&&t.nextButton.length>0&&(t.nextButton[b]("click",t.onClickNext),t.params.a11y&&t.a11y&&t.nextButton[b]("keydown",t.a11y.onEnterKey)),t.params.prevButton&&t.prevButton&&t.prevButton.length>0&&(t.prevButton[b]("click",t.onClickPrev),t.params.a11y&&t.a11y&&t.prevButton[b]("keydown",t.a11y.onEnterKey)),t.params.pagination&&t.params.paginationClickable&&(t.paginationContainer[b]("click","."+t.params.bulletClass,t.onClickIndex),t.params.a11y&&t.a11y&&t.paginationContainer[b]("keydown","."+t.params.bulletClass,t.a11y.onEnterKey)),(t.params.preventClicks||t.params.preventClicksPropagation)&&d[c]("click",t.preventClicks,!0)},t.attachEvents=function(){t.initEvents()},t.detachEvents=function(){t.initEvents(!0)},t.allowClick=!0,t.preventClicks=function(a){t.allowClick||(t.params.preventClicks&&a.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(a.stopPropagation(),a.stopImmediatePropagation()))},t.onClickNext=function(a){a.preventDefault(),(!t.isEnd||t.params.loop)&&t.slideNext()},t.onClickPrev=function(a){a.preventDefault(),(!t.isBeginning||t.params.loop)&&t.slidePrev()},t.onClickIndex=function(b){b.preventDefault();var c=a(this).index()*t.params.slidesPerGroup;t.params.loop&&(c+=t.loopedSlides),t.slideTo(c)},t.updateClickedSlide=function(b){var c=h(b,"."+t.params.slideClass),d=!1;if(c)for(var e=0;et.slides.length-t.loopedSlides+t.params.slidesPerView/2?(t.fixLoop(),g=t.wrapper.children("."+t.params.slideClass+'[data-swiper-slide-index="'+f+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout(function(){t.slideTo(g)},0)):t.slideTo(g):g>t.slides.length-t.params.slidesPerView?(t.fixLoop(),g=t.wrapper.children("."+t.params.slideClass+'[data-swiper-slide-index="'+f+'"]:not(.swiper-slide-duplicate)').eq(0).index(),setTimeout(function(){t.slideTo(g)},0)):t.slideTo(g)}else t.slideTo(g)}};var w,x,y,z,A,B,C,D,E,F,G="input, select, textarea, button",H=Date.now(),I=[];t.animating=!1,t.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var J,K;if(t.onTouchStart=function(b){if(b.originalEvent&&(b=b.originalEvent),J="touchstart"===b.type,J||!("which"in b)||3!==b.which){if(t.params.noSwiping&&h(b,"."+t.params.noSwipingClass))return void(t.allowClick=!0);if(!t.params.swipeHandler||h(b,t.params.swipeHandler)){var c=t.touches.currentX="touchstart"===b.type?b.targetTouches[0].pageX:b.pageX,d=t.touches.currentY="touchstart"===b.type?b.targetTouches[0].pageY:b.pageY;if(!(t.device.ios&&t.params.iOSEdgeSwipeDetection&&c<=t.params.iOSEdgeSwipeThreshold)){if(w=!0,x=!1,y=!0,A=void 0,K=void 0,t.touches.startX=c,t.touches.startY=d,z=Date.now(),t.allowClick=!0,t.updateContainerSize(),t.swipeDirection=void 0,t.params.threshold>0&&(D=!1),"touchstart"!==b.type){var e=!0;a(b.target).is(G)&&(e=!1),document.activeElement&&a(document.activeElement).is(G)&&document.activeElement.blur(),e&&b.preventDefault()}t.emit("onTouchStart",t,b)}}}},t.onTouchMove=function(b){if(b.originalEvent&&(b=b.originalEvent),!J||"mousemove"!==b.type){if(b.preventedByNestedSwiper)return t.touches.startX="touchmove"===b.type?b.targetTouches[0].pageX:b.pageX,void(t.touches.startY="touchmove"===b.type?b.targetTouches[0].pageY:b.pageY);if(t.params.onlyExternal)return t.allowClick=!1,void(w&&(t.touches.startX=t.touches.currentX="touchmove"===b.type?b.targetTouches[0].pageX:b.pageX,t.touches.startY=t.touches.currentY="touchmove"===b.type?b.targetTouches[0].pageY:b.pageY,z=Date.now()));if(J&&document.activeElement&&b.target===document.activeElement&&a(b.target).is(G))return x=!0,void(t.allowClick=!1);if(y&&t.emit("onTouchMove",t,b),!(b.targetTouches&&b.targetTouches.length>1)){if(t.touches.currentX="touchmove"===b.type?b.targetTouches[0].pageX:b.pageX,t.touches.currentY="touchmove"===b.type?b.targetTouches[0].pageY:b.pageY,"undefined"==typeof A){var c=180*Math.atan2(Math.abs(t.touches.currentY-t.touches.startY),Math.abs(t.touches.currentX-t.touches.startX))/Math.PI;A=t.isHorizontal()?c>t.params.touchAngle:90-c>t.params.touchAngle}if(A&&t.emit("onTouchMoveOpposite",t,b),"undefined"==typeof K&&t.browser.ieTouch&&(t.touches.currentX!==t.touches.startX||t.touches.currentY!==t.touches.startY)&&(K=!0),w){if(A)return void(w=!1);if(K||!t.browser.ieTouch){t.allowClick=!1,t.emit("onSliderMove",t,b),b.preventDefault(),t.params.touchMoveStopPropagation&&!t.params.nested&&b.stopPropagation(),x||(e.loop&&t.fixLoop(),C=t.getWrapperTranslate(),t.setWrapperTransition(0),t.animating&&t.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),t.params.autoplay&&t.autoplaying&&(t.params.autoplayDisableOnInteraction?t.stopAutoplay():t.pauseAutoplay()),F=!1,t.params.grabCursor&&(t.container[0].style.cursor="move",t.container[0].style.cursor="-webkit-grabbing",t.container[0].style.cursor="-moz-grabbin",t.container[0].style.cursor="grabbing")),x=!0;var d=t.touches.diff=t.isHorizontal()?t.touches.currentX-t.touches.startX:t.touches.currentY-t.touches.startY;d*=t.params.touchRatio,t.rtl&&(d=-d),t.swipeDirection=d>0?"prev":"next",B=d+C;var f=!0;if(d>0&&B>t.minTranslate()?(f=!1,t.params.resistance&&(B=t.minTranslate()-1+Math.pow(-t.minTranslate()+C+d,t.params.resistanceRatio))):0>d&&BB&&(B=C),!t.params.allowSwipeToPrev&&"prev"===t.swipeDirection&&B>C&&(B=C),t.params.followFinger){if(t.params.threshold>0){
+if(!(Math.abs(d)>t.params.threshold||D))return void(B=C);if(!D)return D=!0,t.touches.startX=t.touches.currentX,t.touches.startY=t.touches.currentY,B=C,void(t.touches.diff=t.isHorizontal()?t.touches.currentX-t.touches.startX:t.touches.currentY-t.touches.startY)}(t.params.freeMode||t.params.watchSlidesProgress)&&t.updateActiveIndex(),t.params.freeMode&&(0===I.length&&I.push({position:t.touches[t.isHorizontal()?"startX":"startY"],time:z}),I.push({position:t.touches[t.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),t.updateProgress(B),t.setWrapperTranslate(B)}}}}}},t.onTouchEnd=function(b){if(b.originalEvent&&(b=b.originalEvent),y&&t.emit("onTouchEnd",t,b),y=!1,w){t.params.grabCursor&&x&&w&&(t.container[0].style.cursor="move",t.container[0].style.cursor="-webkit-grab",t.container[0].style.cursor="-moz-grab",t.container[0].style.cursor="grab");var c=Date.now(),d=c-z;if(t.allowClick&&(t.updateClickedSlide(b),t.emit("onTap",t,b),300>d&&c-H>300&&(E&&clearTimeout(E),E=setTimeout(function(){t&&(t.params.paginationHide&&t.paginationContainer.length>0&&!a(b.target).hasClass(t.params.bulletClass)&&t.paginationContainer.toggleClass(t.params.paginationHiddenClass),t.emit("onClick",t,b))},300)),300>d&&300>c-H&&(E&&clearTimeout(E),t.emit("onDoubleTap",t,b))),H=Date.now(),setTimeout(function(){t&&(t.allowClick=!0)},0),!w||!x||!t.swipeDirection||0===t.touches.diff||B===C)return void(w=x=!1);w=x=!1;var e;if(e=t.params.followFinger?t.rtl?t.translate:-t.translate:-B,t.params.freeMode){if(e<-t.minTranslate())return void t.slideTo(t.activeIndex);if(e>-t.maxTranslate())return void(t.slides.length1){var f=I.pop(),g=I.pop(),h=f.position-g.position,i=f.time-g.time;t.velocity=h/i,t.velocity=t.velocity/2,Math.abs(t.velocity)150||(new window.Date).getTime()-f.time>300)&&(t.velocity=0)}else t.velocity=0;I.length=0;var j=1e3*t.params.freeModeMomentumRatio,k=t.velocity*j,l=t.translate+k;t.rtl&&(l=-l);var m,n=!1,o=20*Math.abs(t.velocity)*t.params.freeModeMomentumBounceRatio;if(lt.minTranslate())t.params.freeModeMomentumBounce?(l-t.minTranslate()>o&&(l=t.minTranslate()+o),m=t.minTranslate(),n=!0,F=!0):l=t.minTranslate();else if(t.params.freeModeSticky){var p,q=0;for(q=0;q-l){p=q;break}l=Math.abs(t.snapGrid[p]-l)=t.params.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex()))}var r,s=0,u=t.slidesSizesGrid[0];for(r=0;r=t.slidesGrid[r]&&e=t.slidesGrid[r]&&(s=r,u=t.slidesGrid[t.slidesGrid.length-1]-t.slidesGrid[t.slidesGrid.length-2]);var v=(e-t.slidesGrid[s])/u;if(d>t.params.longSwipesMs){if(!t.params.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(v>=t.params.longSwipesRatio?t.slideTo(s+t.params.slidesPerGroup):t.slideTo(s)),"prev"===t.swipeDirection&&(v>1-t.params.longSwipesRatio?t.slideTo(s+t.params.slidesPerGroup):t.slideTo(s))}else{if(!t.params.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(s+t.params.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(s)}}},t._slideTo=function(a,b){return t.slideTo(a,b,!0,!0)},t.slideTo=function(a,b,c,d){"undefined"==typeof c&&(c=!0),"undefined"==typeof a&&(a=0),0>a&&(a=0),t.snapIndex=Math.floor(a/t.params.slidesPerGroup),t.snapIndex>=t.snapGrid.length&&(t.snapIndex=t.snapGrid.length-1);var e=-t.snapGrid[t.snapIndex];t.params.autoplay&&t.autoplaying&&(d||!t.params.autoplayDisableOnInteraction?t.pauseAutoplay(b):t.stopAutoplay()),t.updateProgress(e);for(var f=0;f=Math.floor(100*t.slidesGrid[f])&&(a=f);return!t.params.allowSwipeToNext&&et.translate&&e>t.maxTranslate()&&(t.activeIndex||0)!==a?!1:("undefined"==typeof b&&(b=t.params.speed),t.previousIndex=t.activeIndex||0,t.activeIndex=a,t.rtl&&-e===t.translate||!t.rtl&&e===t.translate?(t.params.autoHeight&&t.updateAutoHeight(),t.updateClasses(),"slide"!==t.params.effect&&t.setWrapperTranslate(e),!1):(t.updateClasses(),t.onTransitionStart(c),0===b?(t.setWrapperTranslate(e),t.setWrapperTransition(0),t.onTransitionEnd(c)):(t.setWrapperTranslate(e),t.setWrapperTransition(b),t.animating||(t.animating=!0,t.wrapper.transitionEnd(function(){t&&t.onTransitionEnd(c)}))),!0))},t.onTransitionStart=function(a){"undefined"==typeof a&&(a=!0),t.params.autoHeight&&t.updateAutoHeight(),t.lazy&&t.lazy.onTransitionStart(),a&&(t.emit("onTransitionStart",t),t.activeIndex!==t.previousIndex&&(t.emit("onSlideChangeStart",t),t.activeIndex>t.previousIndex?t.emit("onSlideNextStart",t):t.emit("onSlidePrevStart",t)))},t.onTransitionEnd=function(a){t.animating=!1,t.setWrapperTransition(0),"undefined"==typeof a&&(a=!0),t.lazy&&t.lazy.onTransitionEnd(),a&&(t.emit("onTransitionEnd",t),t.activeIndex!==t.previousIndex&&(t.emit("onSlideChangeEnd",t),t.activeIndex>t.previousIndex?t.emit("onSlideNextEnd",t):t.emit("onSlidePrevEnd",t))),t.params.hashnav&&t.hashnav&&t.hashnav.setHash()},t.slideNext=function(a,b,c){if(t.params.loop){if(t.animating)return!1;t.fixLoop();t.container[0].clientLeft;return t.slideTo(t.activeIndex+t.params.slidesPerGroup,b,a,c)}return t.slideTo(t.activeIndex+t.params.slidesPerGroup,b,a,c)},t._slideNext=function(a){return t.slideNext(!0,a,!0)},t.slidePrev=function(a,b,c){if(t.params.loop){if(t.animating)return!1;t.fixLoop();t.container[0].clientLeft;return t.slideTo(t.activeIndex-1,b,a,c)}return t.slideTo(t.activeIndex-1,b,a,c)},t._slidePrev=function(a){return t.slidePrev(!0,a,!0)},t.slideReset=function(a,b,c){return t.slideTo(t.activeIndex,b,a)},t.setWrapperTransition=function(a,b){t.wrapper.transition(a),"slide"!==t.params.effect&&t.effects[t.params.effect]&&t.effects[t.params.effect].setTransition(a),t.params.parallax&&t.parallax&&t.parallax.setTransition(a),t.params.scrollbar&&t.scrollbar&&t.scrollbar.setTransition(a),t.params.control&&t.controller&&t.controller.setTransition(a,b),t.emit("onSetTransition",t,a)},t.setWrapperTranslate=function(a,b,c){var d=0,e=0,g=0;t.isHorizontal()?d=t.rtl?-a:a:e=a,t.params.roundLengths&&(d=f(d),e=f(e)),t.params.virtualTranslate||(t.support.transforms3d?t.wrapper.transform("translate3d("+d+"px, "+e+"px, "+g+"px)"):t.wrapper.transform("translate("+d+"px, "+e+"px)")),t.translate=t.isHorizontal()?d:e;var h,i=t.maxTranslate()-t.minTranslate();h=0===i?0:(a-t.minTranslate())/i,h!==t.progress&&t.updateProgress(a),b&&t.updateActiveIndex(),"slide"!==t.params.effect&&t.effects[t.params.effect]&&t.effects[t.params.effect].setTranslate(t.translate),t.params.parallax&&t.parallax&&t.parallax.setTranslate(t.translate),t.params.scrollbar&&t.scrollbar&&t.scrollbar.setTranslate(t.translate),t.params.control&&t.controller&&t.controller.setTranslate(t.translate,c),t.emit("onSetTranslate",t,t.translate)},t.getTranslate=function(a,b){var c,d,e,f;return"undefined"==typeof b&&(b="x"),t.params.virtualTranslate?t.rtl?-t.translate:t.translate:(e=window.getComputedStyle(a,null),window.WebKitCSSMatrix?(d=e.transform||e.webkitTransform,d.split(",").length>6&&(d=d.split(", ").map(function(a){return a.replace(",",".")}).join(", ")),f=new window.WebKitCSSMatrix("none"===d?"":d)):(f=e.MozTransform||e.OTransform||e.MsTransform||e.msTransform||e.transform||e.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),c=f.toString().split(",")),"x"===b&&(d=window.WebKitCSSMatrix?f.m41:16===c.length?parseFloat(c[12]):parseFloat(c[4])),"y"===b&&(d=window.WebKitCSSMatrix?f.m42:16===c.length?parseFloat(c[13]):parseFloat(c[5])),t.rtl&&d&&(d=-d),d||0)},t.getWrapperTranslate=function(a){return"undefined"==typeof a&&(a=t.isHorizontal()?"x":"y"),t.getTranslate(t.wrapper[0],a)},t.observers=[],t.initObservers=function(){if(t.params.observeParents)for(var a=t.container.parents(),b=0;bb.length&&(t.loopedSlides=b.length);var c,d=[],e=[];for(b.each(function(c,f){var g=a(this);c=b.length-t.loopedSlides&&d.push(f),g.attr("data-swiper-slide-index",c)}),c=0;c=0;c--)t.wrapper.prepend(a(d[c].cloneNode(!0)).addClass(t.params.slideDuplicateClass))},t.destroyLoop=function(){t.wrapper.children("."+t.params.slideClass+"."+t.params.slideDuplicateClass).remove(),t.slides.removeAttr("data-swiper-slide-index")},t.reLoop=function(a){var b=t.activeIndex-t.loopedSlides;t.destroyLoop(),t.createLoop(),t.updateSlidesSize(),a&&t.slideTo(b+t.loopedSlides,0,!1)},t.fixLoop=function(){var a;t.activeIndex=2*t.loopedSlides||t.activeIndex>t.slides.length-2*t.params.slidesPerView)&&(a=-t.slides.length+t.activeIndex+t.loopedSlides,a+=t.loopedSlides,t.slideTo(a,0,!1,!0))},t.appendSlide=function(a){if(t.params.loop&&t.destroyLoop(),"object"==typeof a&&a.length)for(var b=0;bb&&c--;c=Math.max(c,0)}else b=a,t.slides[b]&&t.slides.eq(b).remove(),c>b&&c--,c=Math.max(c,0);t.params.loop&&t.createLoop(),t.params.observer&&t.support.observer||t.update(!0),t.params.loop?t.slideTo(c+t.loopedSlides,0,!1):t.slideTo(c,0,!1)},t.removeAllSlides=function(){for(var a=[],b=0;b'),c.append(k)),0===l.length&&(l=a(''),c.append(l)),k.length&&(k[0].style.opacity=Math.max(-d,0)),l.length&&(l[0].style.opacity=Math.max(d,0))}c.transform("translate3d("+i+"px, "+j+"px, 0px) rotateX("+h+"deg) rotateY("+g+"deg)")}},setTransition:function(b){if(t.slides.transition(b).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(b),t.params.virtualTranslate&&0!==b){var c=!1;t.slides.eq(t.activeIndex).transitionEnd(function(){if(!c&&t&&a(this).hasClass(t.params.slideActiveClass)){c=!0,t.animating=!1;for(var b=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],d=0;d'),t.wrapper.append(b)),b.css({height:t.width+"px"})):(b=t.container.find(".swiper-cube-shadow"),0===b.length&&(b=a(''),t.container.append(b))));for(var d=0;d=h&&h>-1&&(c=90*d+90*h,t.rtl&&(c=90*-d-90*h)),e.transform(l),t.params.cube.slideShadows){var m=t.isHorizontal()?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),n=t.isHorizontal()?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===m.length&&(m=a(''),e.append(m)),0===n.length&&(n=a(''),e.append(n)),m.length&&(m[0].style.opacity=Math.max(-h,0)),n.length&&(n[0].style.opacity=Math.max(h,0))}}if(t.wrapper.css({"-webkit-transform-origin":"50% 50% -"+t.size/2+"px","-moz-transform-origin":"50% 50% -"+t.size/2+"px","-ms-transform-origin":"50% 50% -"+t.size/2+"px","transform-origin":"50% 50% -"+t.size/2+"px"}),t.params.cube.shadow)if(t.isHorizontal())b.transform("translate3d(0px, "+(t.width/2+t.params.cube.shadowOffset)+"px, "+-t.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+t.params.cube.shadowScale+")");else{var o=Math.abs(c)-90*Math.floor(Math.abs(c)/90),p=1.5-(Math.sin(2*o*Math.PI/360)/2+Math.cos(2*o*Math.PI/360)/2),q=t.params.cube.shadowScale,r=t.params.cube.shadowScale/p,s=t.params.cube.shadowOffset;b.transform("scale3d("+q+", 1, "+r+") translate3d(0px, "+(t.height/2+s)+"px, "+-t.height/2/r+"px) rotateX(-90deg)")}var u=t.isSafari||t.isUiWebView?-t.size/2:0;t.wrapper.transform("translate3d(0px,0,"+u+"px) rotateX("+(t.isHorizontal()?0:c)+"deg) rotateY("+(t.isHorizontal()?-c:0)+"deg)")},setTransition:function(a){t.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),t.params.cube.shadow&&!t.isHorizontal()&&t.container.find(".swiper-cube-shadow").transition(a)}},coverflow:{setTranslate:function(){for(var b=t.translate,c=t.isHorizontal()?-b+t.width/2:-b+t.height/2,d=t.isHorizontal()?t.params.coverflow.rotate:-t.params.coverflow.rotate,e=t.params.coverflow.depth,f=0,g=t.slides.length;g>f;f++){var h=t.slides.eq(f),i=t.slidesSizesGrid[f],j=h[0].swiperSlideOffset,k=(c-j-i/2)/i*t.params.coverflow.modifier,l=t.isHorizontal()?d*k:0,m=t.isHorizontal()?0:d*k,n=-e*Math.abs(k),o=t.isHorizontal()?0:t.params.coverflow.stretch*k,p=t.isHorizontal()?t.params.coverflow.stretch*k:0;Math.abs(p)<.001&&(p=0),Math.abs(o)<.001&&(o=0),Math.abs(n)<.001&&(n=0),Math.abs(l)<.001&&(l=0),Math.abs(m)<.001&&(m=0);var q="translate3d("+p+"px,"+o+"px,"+n+"px) rotateX("+m+"deg) rotateY("+l+"deg)";if(h.transform(q),h[0].style.zIndex=-Math.abs(Math.round(k))+1,t.params.coverflow.slideShadows){var r=t.isHorizontal()?h.find(".swiper-slide-shadow-left"):h.find(".swiper-slide-shadow-top"),s=t.isHorizontal()?h.find(".swiper-slide-shadow-right"):h.find(".swiper-slide-shadow-bottom");0===r.length&&(r=a(''),h.append(r)),0===s.length&&(s=a(''),h.append(s)),r.length&&(r[0].style.opacity=k>0?k:0),s.length&&(s[0].style.opacity=-k>0?-k:0)}}if(t.browser.ie){var u=t.wrapper[0].style;u.perspectiveOrigin=c+"px 50%"}},setTransition:function(a){t.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a)}}},t.lazy={initialImageLoaded:!1,loadImageInSlide:function(b,c){if("undefined"!=typeof b&&("undefined"==typeof c&&(c=!0),0!==t.slides.length)){var d=t.slides.eq(b),e=d.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)");!d.hasClass("swiper-lazy")||d.hasClass("swiper-lazy-loaded")||d.hasClass("swiper-lazy-loading")||(e=e.add(d[0])),0!==e.length&&e.each(function(){var b=a(this);b.addClass("swiper-lazy-loading");var e=b.attr("data-background"),f=b.attr("data-src"),g=b.attr("data-srcset");t.loadImage(b[0],f||e,g,!1,function(){if(e?(b.css("background-image",'url("'+e+'")'),b.removeAttr("data-background")):(g&&(b.attr("srcset",g),b.removeAttr("data-srcset")),f&&(b.attr("src",f),b.removeAttr("data-src"))),b.addClass("swiper-lazy-loaded").removeClass("swiper-lazy-loading"),d.find(".swiper-lazy-preloader, .preloader").remove(),t.params.loop&&c){var a=d.attr("data-swiper-slide-index");if(d.hasClass(t.params.slideDuplicateClass)){var h=t.wrapper.children('[data-swiper-slide-index="'+a+'"]:not(.'+t.params.slideDuplicateClass+")");t.lazy.loadImageInSlide(h.index(),!1)}else{var i=t.wrapper.children("."+t.params.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]');t.lazy.loadImageInSlide(i.index(),!1)}}t.emit("onLazyImageReady",t,d[0],b[0])}),t.emit("onLazyImageLoad",t,d[0],b[0])})}},load:function(){var b;if(t.params.watchSlidesVisibility)t.wrapper.children("."+t.params.slideVisibleClass).each(function(){t.lazy.loadImageInSlide(a(this).index())});else if(t.params.slidesPerView>1)for(b=t.activeIndex;b1||t.params.lazyLoadingInPrevNextAmount&&t.params.lazyLoadingInPrevNextAmount>1){var c=t.params.lazyLoadingInPrevNextAmount,d=t.params.slidesPerView,e=Math.min(t.activeIndex+d+Math.max(c,d),t.slides.length),f=Math.max(t.activeIndex-Math.max(d,c),0);for(b=t.activeIndex+t.params.slidesPerView;e>b;b++)t.slides[b]&&t.lazy.loadImageInSlide(b);for(b=f;b0&&t.lazy.loadImageInSlide(g.index());var h=t.wrapper.children("."+t.params.slidePrevClass);h.length>0&&t.lazy.loadImageInSlide(h.index())}},onTransitionStart:function(){t.params.lazyLoading&&(t.params.lazyLoadingOnTransitionStart||!t.params.lazyLoadingOnTransitionStart&&!t.lazy.initialImageLoaded)&&t.lazy.load()},onTransitionEnd:function(){t.params.lazyLoading&&!t.params.lazyLoadingOnTransitionStart&&t.lazy.load()}},t.scrollbar={isTouched:!1,setDragPosition:function(a){var b=t.scrollbar,c=t.isHorizontal()?"touchstart"===a.type||"touchmove"===a.type?a.targetTouches[0].pageX:a.pageX||a.clientX:"touchstart"===a.type||"touchmove"===a.type?a.targetTouches[0].pageY:a.pageY||a.clientY,d=c-b.track.offset()[t.isHorizontal()?"left":"top"]-b.dragSize/2,e=-t.minTranslate()*b.moveDivider,f=-t.maxTranslate()*b.moveDivider;e>d?d=e:d>f&&(d=f),d=-d/b.moveDivider,t.updateProgress(d),t.setWrapperTranslate(d,!0)},dragStart:function(a){var b=t.scrollbar;b.isTouched=!0,a.preventDefault(),a.stopPropagation(),b.setDragPosition(a),clearTimeout(b.dragTimeout),b.track.transition(0),t.params.scrollbarHide&&b.track.css("opacity",1),t.wrapper.transition(100),b.drag.transition(100),t.emit("onScrollbarDragStart",t)},dragMove:function(a){var b=t.scrollbar;b.isTouched&&(a.preventDefault?a.preventDefault():a.returnValue=!1,b.setDragPosition(a),t.wrapper.transition(0),b.track.transition(0),b.drag.transition(0),t.emit("onScrollbarDragMove",t))},dragEnd:function(a){var b=t.scrollbar;b.isTouched&&(b.isTouched=!1,t.params.scrollbarHide&&(clearTimeout(b.dragTimeout),b.dragTimeout=setTimeout(function(){b.track.css("opacity",0),b.track.transition(400)},1e3)),t.emit("onScrollbarDragEnd",t),t.params.scrollbarSnapOnRelease&&t.slideReset())},enableDraggable:function(){var b=t.scrollbar,c=t.support.touch?b.track:document;a(b.track).on(t.touchEvents.start,b.dragStart),a(c).on(t.touchEvents.move,b.dragMove),a(c).on(t.touchEvents.end,b.dragEnd)},disableDraggable:function(){var b=t.scrollbar,c=t.support.touch?b.track:document;a(b.track).off(t.touchEvents.start,b.dragStart),a(c).off(t.touchEvents.move,b.dragMove),a(c).off(t.touchEvents.end,b.dragEnd)},set:function(){if(t.params.scrollbar){var b=t.scrollbar;b.track=a(t.params.scrollbar),t.params.uniqueNavElements&&"string"==typeof t.params.scrollbar&&b.track.length>1&&1===t.container.find(t.params.scrollbar).length&&(b.track=t.container.find(t.params.scrollbar)),b.drag=b.track.find(".swiper-scrollbar-drag"),0===b.drag.length&&(b.drag=a(''),b.track.append(b.drag)),b.drag[0].style.width="",b.drag[0].style.height="",b.trackSize=t.isHorizontal()?b.track[0].offsetWidth:b.track[0].offsetHeight,b.divider=t.size/t.virtualSize,b.moveDivider=b.divider*(b.trackSize/t.size),b.dragSize=b.trackSize*b.divider,t.isHorizontal()?b.drag[0].style.width=b.dragSize+"px":b.drag[0].style.height=b.dragSize+"px",b.divider>=1?b.track[0].style.display="none":b.track[0].style.display="",t.params.scrollbarHide&&(b.track[0].style.opacity=0)}},setTranslate:function(){if(t.params.scrollbar){var a,b=t.scrollbar,c=(t.translate||0,b.dragSize);a=(b.trackSize-b.dragSize)*t.progress,t.rtl&&t.isHorizontal()?(a=-a,a>0?(c=b.dragSize-a,a=0):-a+b.dragSize>b.trackSize&&(c=b.trackSize+a)):0>a?(c=b.dragSize+a,a=0):a+b.dragSize>b.trackSize&&(c=b.trackSize-a),t.isHorizontal()?(t.support.transforms3d?b.drag.transform("translate3d("+a+"px, 0, 0)"):b.drag.transform("translateX("+a+"px)"),b.drag[0].style.width=c+"px"):(t.support.transforms3d?b.drag.transform("translate3d(0px, "+a+"px, 0)"):b.drag.transform("translateY("+a+"px)"),b.drag[0].style.height=c+"px"),t.params.scrollbarHide&&(clearTimeout(b.timeout),b.track[0].style.opacity=1,b.timeout=setTimeout(function(){b.track[0].style.opacity=0,b.track.transition(400)},1e3))}},setTransition:function(a){t.params.scrollbar&&t.scrollbar.drag.transition(a)}},t.controller={LinearSpline:function(a,b){this.x=a,this.y=b,this.lastIndex=a.length-1;var c,d;this.x.length;this.interpolate=function(a){return a?(d=e(this.x,a),c=d-1,(a-this.x[c])*(this.y[d]-this.y[c])/(this.x[d]-this.x[c])+this.y[c]):0};var e=function(){var a,b,c;return function(d,e){for(b=-1,a=d.length;a-b>1;)d[c=a+b>>1]<=e?b=c:a=c;return a}}()},getInterpolateFunction:function(a){t.controller.spline||(t.controller.spline=t.params.loop?new t.controller.LinearSpline(t.slidesGrid,a.slidesGrid):new t.controller.LinearSpline(t.snapGrid,a.snapGrid))},setTranslate:function(a,b){function d(b){a=b.rtl&&"horizontal"===b.params.direction?-t.translate:t.translate,"slide"===t.params.controlBy&&(t.controller.getInterpolateFunction(b),f=-t.controller.spline.interpolate(-a)),f&&"container"!==t.params.controlBy||(e=(b.maxTranslate()-b.minTranslate())/(t.maxTranslate()-t.minTranslate()),f=(a-t.minTranslate())*e+b.minTranslate()),t.params.controlInverse&&(f=b.maxTranslate()-f),b.updateProgress(f),b.setWrapperTranslate(f,!1,t),b.updateActiveIndex()}var e,f,g=t.params.control;if(t.isArray(g))for(var h=0;hc;c++){var e=t.slides.eq(c),f=e.attr("data-hash");if(f===a&&!e.hasClass(t.params.slideDuplicateClass)){var g=e.index();t.slideTo(g,b,t.params.runCallbacksOnInit,!0)}}}},setHash:function(){t.hashnav.initialized&&t.params.hashnav&&(document.location.hash=t.slides.eq(t.activeIndex).attr("data-hash")||"")}},t.disableKeyboardControl=function(){t.params.keyboardControl=!1,a(document).off("keydown",j)},t.enableKeyboardControl=function(){t.params.keyboardControl=!0,a(document).on("keydown",j)},t.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},t.params.mousewheelControl){try{new window.WheelEvent("wheel"),t.mousewheel.event="wheel"}catch(L){(window.WheelEvent||t.container[0]&&"wheel"in t.container[0])&&(t.mousewheel.event="wheel")}!t.mousewheel.event&&window.WheelEvent,t.mousewheel.event||void 0===document.onmousewheel||(t.mousewheel.event="mousewheel"),t.mousewheel.event||(t.mousewheel.event="DOMMouseScroll")}t.disableMousewheelControl=function(){return t.mousewheel.event?(t.container.off(t.mousewheel.event,k),!0):!1},t.enableMousewheelControl=function(){return t.mousewheel.event?(t.container.on(t.mousewheel.event,k),!0):!1},t.parallax={setTranslate:function(){t.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){l(this,t.progress)}),t.slides.each(function(){var b=a(this);b.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var a=Math.min(Math.max(b[0].progress,-1),1);l(this,a)})})},setTransition:function(b){"undefined"==typeof b&&(b=t.params.speed),t.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var c=a(this),d=parseInt(c.attr("data-swiper-parallax-duration"),10)||b;0===b&&(d=0),c.transition(d)})}},t._plugins=[];for(var M in t.plugins){var N=t.plugins[M](t,t.params[M]);N&&t._plugins.push(N)}return t.callPlugins=function(a){for(var b=0;b'),notify:function(a){var b=t.a11y.liveRegion;0!==b.length&&(b.html(""),b.html(a))},init:function(){t.params.nextButton&&t.nextButton&&t.nextButton.length>0&&(t.a11y.makeFocusable(t.nextButton),t.a11y.addRole(t.nextButton,"button"),t.a11y.addLabel(t.nextButton,t.params.nextSlideMessage)),t.params.prevButton&&t.prevButton&&t.prevButton.length>0&&(t.a11y.makeFocusable(t.prevButton),t.a11y.addRole(t.prevButton,"button"),t.a11y.addLabel(t.prevButton,t.params.prevSlideMessage)),a(t.container).append(t.a11y.liveRegion)},initPagination:function(){t.params.pagination&&t.params.paginationClickable&&t.bullets&&t.bullets.length&&t.bullets.each(function(){var b=a(this);t.a11y.makeFocusable(b),t.a11y.addRole(b,"button"),t.a11y.addLabel(b,t.params.paginationBulletMessage.replace(/{{index}}/,b.index()+1))})},destroy:function(){t.a11y.liveRegion&&t.a11y.liveRegion.length>0&&t.a11y.liveRegion.remove()}},t.init=function(){t.params.loop&&t.createLoop(),t.updateContainerSize(),t.updateSlidesSize(),t.updatePagination(),t.params.scrollbar&&t.scrollbar&&(t.scrollbar.set(),t.params.scrollbarDraggable&&t.scrollbar.enableDraggable()),"slide"!==t.params.effect&&t.effects[t.params.effect]&&(t.params.loop||t.updateProgress(),t.effects[t.params.effect].setTranslate()),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit):(t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit),0===t.params.initialSlide&&(t.parallax&&t.params.parallax&&t.parallax.setTranslate(),t.lazy&&t.params.lazyLoading&&(t.lazy.load(),t.lazy.initialImageLoaded=!0))),t.attachEvents(),t.params.observer&&t.support.observer&&t.initObservers(),t.params.preloadImages&&!t.params.lazyLoading&&t.preloadImages(),t.params.autoplay&&t.startAutoplay(),t.params.keyboardControl&&t.enableKeyboardControl&&t.enableKeyboardControl(),t.params.mousewheelControl&&t.enableMousewheelControl&&t.enableMousewheelControl(),t.params.hashnav&&t.hashnav&&t.hashnav.init(),t.params.a11y&&t.a11y&&t.a11y.init(),t.emit("onInit",t)},t.cleanupStyles=function(){t.container.removeClass(t.classNames.join(" ")).removeAttr("style"),
+t.wrapper.removeAttr("style"),t.slides&&t.slides.length&&t.slides.removeClass([t.params.slideVisibleClass,t.params.slideActiveClass,t.params.slideNextClass,t.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),t.paginationContainer&&t.paginationContainer.length&&t.paginationContainer.removeClass(t.params.paginationHiddenClass),t.bullets&&t.bullets.length&&t.bullets.removeClass(t.params.bulletActiveClass),t.params.prevButton&&a(t.params.prevButton).removeClass(t.params.buttonDisabledClass),t.params.nextButton&&a(t.params.nextButton).removeClass(t.params.buttonDisabledClass),t.params.scrollbar&&t.scrollbar&&(t.scrollbar.track&&t.scrollbar.track.length&&t.scrollbar.track.removeAttr("style"),t.scrollbar.drag&&t.scrollbar.drag.length&&t.scrollbar.drag.removeAttr("style"))},t.destroy=function(a,b){t.detachEvents(),t.stopAutoplay(),t.params.scrollbar&&t.scrollbar&&t.params.scrollbarDraggable&&t.scrollbar.disableDraggable(),t.params.loop&&t.destroyLoop(),b&&t.cleanupStyles(),t.disconnectObservers(),t.params.keyboardControl&&t.disableKeyboardControl&&t.disableKeyboardControl(),t.params.mousewheelControl&&t.disableMousewheelControl&&t.disableMousewheelControl(),t.params.a11y&&t.a11y&&t.a11y.destroy(),t.emit("onDestroy"),a!==!1&&(t=null)},t.init(),t}};c.prototype={isSafari:function(){var a=navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),isArray:function(a){return"[object Array]"===Object.prototype.toString.apply(a)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1},device:function(){var a=navigator.userAgent,b=a.match(/(Android);?[\s\/]+([\d.]+)?/),c=a.match(/(iPad).*OS\s([\d_]+)/),d=a.match(/(iPod)(.*OS\s([\d_]+))?/),e=!c&&a.match(/(iPhone\sOS)\s([\d_]+)/);return{ios:c||e||d,android:b}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var a=document.createElement("div").style;return"webkitPerspective"in a||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a}(),flexbox:function(){for(var a=document.createElement("div").style,b="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),c=0;c '+d.params.ofText+'
',h=d.params.toolbarTemplate||'',i=d.params.template||'',j=d.params.lazyLoading?d.params.photoLazyTemplate||'':d.params.photoTemplate||'',k=d.params.captionsTheme||d.params.theme,l=d.params.captionsTemplate||'{{captions}}
',m=d.params.captionTemplate||'{{caption}}
',n=d.params.objectTemplate||'{{html}}
',o="",p="";for(c=0;c=0||q.indexOf(">")>=0?n.replace(/{{html}}/g,q):j.replace(/{{url}}/g,q):"object"==typeof q&&(q.hasOwnProperty("html")&&q.html.length>0?r=n.replace(/{{html}}/g,q.html):q.hasOwnProperty("url")&&q.url.length>0&&(r=j.replace(/{{url}}/g,q.url)),q.hasOwnProperty("caption")&&q.caption.length>0?p+=m.replace(/{{caption}}/g,q.caption).replace(/{{captionIndex}}/g,c):r=r.replace(/{{caption}}/g,"")),o+=r}var s=i.replace("{{navbar}}",d.params.navbar?g:"").replace("{{noNavbar}}",d.params.navbar?"":"no-navbar").replace("{{photos}}",o).replace("{{captions}}",l.replace(/{{captions}}/g,p)).replace("{{toolbar}}",d.params.toolbar?h:"");d.activeIndex=d.params.initialSlide,d.openIndex=d.activeIndex,d.opened=!1,d.open=function(b){return"undefined"==typeof b&&(b=d.activeIndex),b=parseInt(b,10),d.opened&&d.swiper?void d.swiper.slideTo(b):(d.opened=!0,d.openIndex=b,"standalone"===d.params.type&&a(d.params.container).append(s),"popup"===d.params.type&&(d.popup=a.popup('"),a(d.popup).on("closed",d.onPopupClose)),"page"===d.params.type?(a(document).on("pageBeforeInit",d.onPageBeforeInit),a(document).on("pageBeforeRemove",d.onPageBeforeRemove),d.params.view||(d.params.view=a.mainView),void d.params.view.loadContent(s)):(d.layout(d.openIndex),void(d.params.onOpen&&d.params.onOpen(d))))},d.close=function(){d.opened=!1,d.swiperContainer&&0!==d.swiperContainer.length&&(d.params.onClose&&d.params.onClose(d),d.attachEvents(!0),"standalone"===d.params.type&&d.container.removeClass("photo-browser-in").addClass("photo-browser-out").animationEnd(function(){d.container.remove()}),d.swiper.destroy(),d.swiper=d.swiperContainer=d.swiperWrapper=d.slides=t=u=v=void 0)},d.onPopupClose=function(){d.close(),a(d.popup).off("pageBeforeInit",d.onPopupClose)},d.onPageBeforeInit=function(b){"photo-browser-slides"===b.detail.page.name&&d.layout(d.openIndex),a(document).off("pageBeforeInit",d.onPageBeforeInit)},d.onPageBeforeRemove=function(b){"photo-browser-slides"===b.detail.page.name&&d.close(),a(document).off("pageBeforeRemove",d.onPageBeforeRemove)},d.onSliderTransitionStart=function(b){d.activeIndex=b.activeIndex;var c=b.activeIndex+1,e=b.slides.length;if(d.params.loop&&(e-=2,c-=b.loopedSlides,1>c&&(c=e+c),c>e&&(c-=e)),d.container.find(".photo-browser-current").text(c),d.container.find(".photo-browser-total").text(e),a(".photo-browser-prev, .photo-browser-next").removeClass("photo-browser-link-inactive"),b.isBeginning&&!d.params.loop&&a(".photo-browser-prev").addClass("photo-browser-link-inactive"),b.isEnd&&!d.params.loop&&a(".photo-browser-next").addClass("photo-browser-link-inactive"),d.captions.length>0){d.captionsContainer.find(".photo-browser-caption-active").removeClass("photo-browser-caption-active");var f=d.params.loop?b.slides.eq(b.activeIndex).attr("data-swiper-slide-index"):d.activeIndex;d.captionsContainer.find('[data-caption-index="'+f+'"]').addClass("photo-browser-caption-active")}var g=b.slides.eq(b.previousIndex).find("video");g.length>0&&"pause"in g[0]&&g[0].pause(),d.params.onSlideChangeStart&&d.params.onSlideChangeStart(b)},d.onSliderTransitionEnd=function(a){d.params.zoom&&t&&a.previousIndex!==a.activeIndex&&(u.transform("translate3d(0,0,0) scale(1)"),v.transform("translate3d(0,0,0)"),t=u=v=void 0,w=x=1),d.params.onSlideChangeEnd&&d.params.onSlideChangeEnd(a)},d.layout=function(b){"page"===d.params.type?d.container=a(".photo-browser-swiper-container").parents(".view"):d.container=a(".photo-browser"),"standalone"===d.params.type&&d.container.addClass("photo-browser-in"),d.swiperContainer=d.container.find(".photo-browser-swiper-container"),d.swiperWrapper=d.container.find(".photo-browser-swiper-wrapper"),d.slides=d.container.find(".photo-browser-slide"),d.captionsContainer=d.container.find(".photo-browser-captions"),d.captions=d.container.find(".photo-browser-caption");var c={nextButton:d.params.nextButton||".photo-browser-next",prevButton:d.params.prevButton||".photo-browser-prev",indexButton:d.params.indexButton,initialSlide:b,spaceBetween:d.params.spaceBetween,speed:d.params.speed,loop:d.params.loop,lazyLoading:d.params.lazyLoading,lazyLoadingInPrevNext:d.params.lazyLoadingInPrevNext,lazyLoadingOnTransitionStart:d.params.lazyLoadingOnTransitionStart,preloadImages:d.params.lazyLoading?!1:!0,onTap:function(a,b){d.params.onTap&&d.params.onTap(a,b)},onClick:function(a,b){d.params.exposition&&d.toggleExposition(),d.params.onClick&&d.params.onClick(a,b)},onDoubleTap:function(b,c){d.toggleZoom(a(c.target).parents(".photo-browser-slide")),d.params.onDoubleTap&&d.params.onDoubleTap(b,c)},onTransitionStart:function(a){d.onSliderTransitionStart(a)},onTransitionEnd:function(a){d.onSliderTransitionEnd(a)},onLazyImageLoad:function(a,b,c){d.params.onLazyImageLoad&&d.params.onLazyImageLoad(d,b,c)},onLazyImageReady:function(b,c,e){a(c).removeClass("photo-browser-slide-lazy"),d.params.onLazyImageReady&&d.params.onLazyImageReady(d,c,e)}};d.params.swipeToClose&&"page"!==d.params.type&&(c.onTouchStart=d.swipeCloseTouchStart,c.onTouchMoveOpposite=d.swipeCloseTouchMove,c.onTouchEnd=d.swipeCloseTouchEnd),d.swiper=a.swiper(d.swiperContainer,c),0===b&&d.onSliderTransitionStart(d.swiper),d.attachEvents()},d.attachEvents=function(a){var b=a?"off":"on";if(d.params.zoom){var c=d.params.loop?d.swiper.slides:d.slides;c[b]("gesturestart",d.onSlideGestureStart),c[b]("gesturechange",d.onSlideGestureChange),c[b]("gestureend",d.onSlideGestureEnd),c[b]("touchstart",d.onSlideTouchStart),c[b]("touchmove",d.onSlideTouchMove),c[b]("touchend",d.onSlideTouchEnd)}d.container.find(".photo-browser-close-link")[b]("click",d.close)},d.exposed=!1,d.toggleExposition=function(){d.container&&d.container.toggleClass("photo-browser-exposed"),d.params.expositionHideCaptions&&d.captionsContainer.toggleClass("photo-browser-captions-exposed"),d.exposed=!d.exposed},d.enableExposition=function(){d.container&&d.container.addClass("photo-browser-exposed"),d.params.expositionHideCaptions&&d.captionsContainer.addClass("photo-browser-captions-exposed"),d.exposed=!0},d.disableExposition=function(){d.container&&d.container.removeClass("photo-browser-exposed"),d.params.expositionHideCaptions&&d.captionsContainer.removeClass("photo-browser-captions-exposed"),d.exposed=!1};var t,u,v,w=1,x=1,y=!1;d.onSlideGestureStart=function(){return t||(t=a(this),u=t.find("img, svg, canvas"),v=u.parent(".photo-browser-zoom-container"),0!==v.length)?(u.transition(0),void(y=!0)):void(u=void 0)},d.onSlideGestureChange=function(a){u&&0!==u.length&&(w=(a.scale||a.originalEvent.scale)*x,w>d.params.maxZoom&&(w=d.params.maxZoom-1+Math.pow(w-d.params.maxZoom+1,.5)),wQ.x))return void(z=!1);b.preventDefault(),b.stopPropagation(),A=!0,B=R.x-Q.x+J,C=R.y-Q.y+K,D>B&&(B=D+1-Math.pow(D-B+1,.8)),B>F&&(B=F-1+Math.pow(B-F+1,.8)),E>C&&(C=E+1-Math.pow(E-C+1,.8)),C>G&&(C=G-1+Math.pow(C-G+1,.8)),L||(L=R.x),O||(O=R.y),M||(M=Date.now()),N=(R.x-L)/(Date.now()-M)/2,P=(R.y-O)/(Date.now()-M)/2,Math.abs(R.x-L)<2&&(N=0),Math.abs(R.y-O)<2&&(P=0),L=R.x,O=R.y,M=Date.now(),v.transform("translate3d("+B+"px, "+C+"px,0)")}}},d.onSlideTouchEnd=function(){if(u&&0!==u.length){if(!z||!A)return z=!1,void(A=!1);z=!1,A=!1;var a=300,b=300,c=N*a,e=B+c,f=P*b,g=C+f;0!==N&&(a=Math.abs((e-B)/N)),0!==P&&(b=Math.abs((g-C)/P));var h=Math.max(a,b);B=e,C=g;var i=H*w,j=I*w;D=Math.min(d.swiper.width/2-i/2,0),F=-D,E=Math.min(d.swiper.height/2-j/2,0),G=-E,B=Math.max(Math.min(B,F),D),C=Math.max(Math.min(C,G),E),v.transition(h).transform("translate3d("+B+"px, "+C+"px,0)")}};var S,T,U,V,W,X=!1,Y=!0,Z=!1;return d.swipeCloseTouchStart=function(){Y&&(X=!0)},d.swipeCloseTouchMove=function(a,b){if(X){Z||(Z=!0,T="touchmove"===b.type?b.targetTouches[0].pageY:b.pageY,V=d.swiper.slides.eq(d.swiper.activeIndex),W=(new Date).getTime()),b.preventDefault(),U="touchmove"===b.type?b.targetTouches[0].pageY:b.pageY,S=T-U;var c=1-Math.abs(S)/300;V.transform("translate3d(0,"+-S+"px,0)"),d.swiper.container.css("opacity",c).transition(0)}},d.swipeCloseTouchEnd=function(){if(X=!1,!Z)return void(Z=!1);Z=!1,Y=!1;var b=Math.abs(S),c=(new Date).getTime()-W;return 300>c&&b>20||c>=300&&b>100?void setTimeout(function(){"standalone"===d.params.type&&d.close(),"popup"===d.params.type&&a.closeModal(d.popup),d.params.onSwipeToClose&&d.params.onSwipeToClose(d),Y=!0},0):(0!==b?V.addClass("transitioning").transitionEnd(function(){Y=!0,V.removeClass("transitioning")}):Y=!0,d.swiper.container.css("opacity","").transition(""),void V.transform(""))},d};b.prototype={defaults:{photos:[],container:"body",initialSlide:0,spaceBetween:20,speed:300,zoom:!0,maxZoom:3,minZoom:1,exposition:!0,expositionHideCaptions:!1,type:"standalone",navbar:!0,toolbar:!0,theme:"light",swipeToClose:!0,backLinkText:"Close",ofText:"of",loop:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingOnTransitionStart:!1}},a.photoBrowser=function(c){return a.extend(c,a.photoBrowser.prototype.defaults),new b(c)},a.photoBrowser.prototype={defaults:{}}}($);
\ No newline at end of file
diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js
new file mode 100644
index 0000000..6e52331
--- /dev/null
+++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js
@@ -0,0 +1,60 @@
+var cityIncreaseRankingData = {cityIncreaseRankingList:[]};
+
+Vue.component('city_increase_ranking',{
+ template:'',
+ data:function(){
+ return cityIncreaseRankingData;
+ },
+ methods:{
+ loadCityIncreaseRanking:function(){
+ axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
+ cityIncreaseRankingData.cityIncreaseRankingList = response.data.data;
+ }).catch(function(error){
+ console.log(error)
+ })
+ },
+ follow:function(city){
+ alert(city)
+ },
+ abolish:function(city){
+ alert(city)
+ }
+ },
+ mounted:function(){
+ this.loadCityIncreaseRanking();
+ }
+})
diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js
new file mode 100644
index 0000000..62a9fe5
--- /dev/null
+++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js
@@ -0,0 +1,79 @@
+var cityPotentialRankingData = {cityPotentialRankingList:[]};
+
+Vue.component('city_potential_ranking',{
+ template:'',
+ data:function(){
+ return cityPotentialRankingData;
+ },
+ methods:{
+ loadCityPotentialRanking:function(){
+ axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
+// alert(1)
+ list = response.data.data;
+ $(list).each(function(i){
+ var index = this.index;
+ var totalHalfStar = Math.round(Math.round(index/5)/2) //总半星
+ var starNum = Math.floor(totalHalfStar/2) //全星
+ var halfStarNum = totalHalfStar%2 //半星
+ var noneStarNum = 5-starNum-halfStarNum //空星
+ this.starNum = starNum;
+ this.halfStarNum = halfStarNum;
+ this.noneStarNum = noneStarNum;
+ })
+ cityPotentialRankingData.cityPotentialRankingList = response.data.data;
+
+ }).catch(function(error){
+ console.log(error)
+ })
+ },
+ follow:function(city){
+ alert(city)
+ },
+ abolish:function(city){
+ alert(city)
+ }
+ },
+ mounted:function(){
+ this.loadCityPotentialRanking();
+ }
+})
\ No newline at end of file
diff --git a/fangija-zsyf/views/house/new_file.js b/fangija-zsyf/views/component/myFocusComponent.js
similarity index 74%
rename from fangija-zsyf/views/house/new_file.js
rename to fangija-zsyf/views/component/myFocusComponent.js
index 7468f95..0d73287 100644
--- a/fangija-zsyf/views/house/new_file.js
+++ b/fangija-zsyf/views/component/myFocusComponent.js
@@ -22,9 +22,9 @@ Vue.component('my_focus',{
''+
''+
'
'+
- '
{{index}}
'+
+ '
{{index+1}}
'+
'
{{mf.city}}
'+
- '
{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.avgPrice+"元/㎡"}}
'+
+ '
{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.cityTopMonthAvgPrice+"元/㎡"}}
'+
'
'+
'{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":mf.oneMonthUpDownRange+"%"}}'+
'
'+
@@ -45,9 +45,9 @@ Vue.component('my_focus',{
methods:{
loadMyFocus:function(){
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
- myFocusDatas.myFocusList = response.data.data
+ myFocusDatas.myFocusList = response.data.data;
}).catch(function(error){
- alert(error);
+ //alert(2)
console.log(error)
})
}
@@ -56,23 +56,3 @@ Vue.component('my_focus',{
}
})
-
-//我的关注
-//var myFocus = new Vue({
-// el:"#myFocus",
-// data:{
-// myfocusList:[{num:1,city:"test1",avgPrice:"123",percent:"",ranking:"1"},
-// {num:2,city:"test2",avgPrice:"321",percent:"6.6",ranking:"2"}
-// ]
-// }
-//})
-
-//涨幅榜
-var tabCityRanking1 = new Vue({
- el:"tabCityRanking1"
-})
-
-//潜力绑
-var tabCityRanking2 = new Vue({
- el:"tabCityRanking2"
-})
diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html
index 9908f9e..bec6cae 100644
--- a/fangija-zsyf/views/house/houseDetail.html
+++ b/fangija-zsyf/views/house/houseDetail.html
@@ -10,6 +10,7 @@
+
@@ -52,481 +53,482 @@
房产行情
-
-
-
-
-
-
-
-
- 37%
-
-
-
- 63%
-
-
+
+
+
-
-
-
-
-
-
-
-
8.98%
+
+
+
+
+ 37%
+
+
+
+ 63%
+
+
-
-
-
-
-
-
-
房产热点城市
-
-
-

-
青岛
-
-
-

-
三亚
-
-
-

-
昆明
-
-
-
-
楼市资讯
-
-
-
-
-
-
-
-
-
-
-
-
-
-

城市报告

-
-
-
-
-
-
- -
-
-
总人口:2418.33万(2017年常住人口)
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
生产总值:30133.86亿元(2017年)
-
-
- -
-
-
人均生产总值:124536元(2017年)
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
著名景点:外滩、豫园、南京路、人民广场、静安寺、新天地、迪士尼乐园等
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
热门小区
-
-
-
-
-
-
-
68777元/㎡
+
+
+
+
+
+
+
+
+
+
+
+
+ 2.13%
+
+
+
+
+ 1.41%
+
+
+
+
+
+
城市均价分析
+
+
+
+
-
-
-
+
+

城市报告

+
+
+
+
+
+
+ -
+
+
总人口:2418.33万(2017年常住人口)
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
生产总值:30133.86亿元(2017年)
+
+
+ -
+
+
人均生产总值:124536元(2017年)
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
著名景点:外滩、豫园、南京路、人民广场、静安寺、新天地、迪士尼乐园等
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1877,38 +1464,32 @@ $.config = {router: false}
-
+
-
+
+
+