diff --git a/demo-thoitrang-1/images/arrow-left.png b/demo-thoitrang-1/images/arrow-left.png new file mode 100644 index 0000000..57681c0 Binary files /dev/null and b/demo-thoitrang-1/images/arrow-left.png differ diff --git a/demo-thoitrang-1/images/bg/Group 1.png b/demo-thoitrang-1/images/bg/Group 1.png new file mode 100644 index 0000000..8d435d6 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 1.png differ diff --git a/demo-thoitrang-1/images/bg/Group 10.png b/demo-thoitrang-1/images/bg/Group 10.png new file mode 100644 index 0000000..375fc92 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 10.png differ diff --git a/demo-thoitrang-1/images/bg/Group 11.png b/demo-thoitrang-1/images/bg/Group 11.png new file mode 100644 index 0000000..d242f1c Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 11.png differ diff --git a/demo-thoitrang-1/images/bg/Group 12.png b/demo-thoitrang-1/images/bg/Group 12.png new file mode 100644 index 0000000..c322ec6 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 12.png differ diff --git a/demo-thoitrang-1/images/bg/Group 13.png b/demo-thoitrang-1/images/bg/Group 13.png new file mode 100644 index 0000000..6c8b704 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 13.png differ diff --git a/demo-thoitrang-1/images/bg/Group 2.png b/demo-thoitrang-1/images/bg/Group 2.png new file mode 100644 index 0000000..239d669 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 2.png differ diff --git a/demo-thoitrang-1/images/bg/Group 5.png b/demo-thoitrang-1/images/bg/Group 5.png new file mode 100644 index 0000000..08763ae Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 5.png differ diff --git a/demo-thoitrang-1/images/bg/Group 6.png b/demo-thoitrang-1/images/bg/Group 6.png new file mode 100644 index 0000000..e2c9505 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 6.png differ diff --git a/demo-thoitrang-1/images/bg/Group 7.png b/demo-thoitrang-1/images/bg/Group 7.png new file mode 100644 index 0000000..a452fba Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 7.png differ diff --git a/demo-thoitrang-1/images/bg/Group 8.png b/demo-thoitrang-1/images/bg/Group 8.png new file mode 100644 index 0000000..d75dada Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 8.png differ diff --git a/demo-thoitrang-1/images/bg/Group 9.png b/demo-thoitrang-1/images/bg/Group 9.png new file mode 100644 index 0000000..8e7d3d6 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group 9.png differ diff --git a/demo-thoitrang-1/images/bg/Group-0.png b/demo-thoitrang-1/images/bg/Group-0.png new file mode 100644 index 0000000..fbd6f89 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Group-0.png differ diff --git a/demo-thoitrang-1/images/bg/Vector (1).png b/demo-thoitrang-1/images/bg/Vector (1).png new file mode 100644 index 0000000..e46fc56 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector (1).png differ diff --git a/demo-thoitrang-1/images/bg/Vector (2).png b/demo-thoitrang-1/images/bg/Vector (2).png new file mode 100644 index 0000000..a47ea1c Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector (2).png differ diff --git a/demo-thoitrang-1/images/bg/Vector (3).png b/demo-thoitrang-1/images/bg/Vector (3).png new file mode 100644 index 0000000..126ee01 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector (3).png differ diff --git a/demo-thoitrang-1/images/bg/Vector (Stroke) (1).png b/demo-thoitrang-1/images/bg/Vector (Stroke) (1).png new file mode 100644 index 0000000..e01cc3b Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector (Stroke) (1).png differ diff --git a/demo-thoitrang-1/images/bg/Vector (Stroke).png b/demo-thoitrang-1/images/bg/Vector (Stroke).png new file mode 100644 index 0000000..88184e2 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector (Stroke).png differ diff --git a/demo-thoitrang-1/images/bg/Vector-1.png b/demo-thoitrang-1/images/bg/Vector-1.png new file mode 100644 index 0000000..dccb9cc Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector-1.png differ diff --git a/demo-thoitrang-1/images/bg/Vector-2.png b/demo-thoitrang-1/images/bg/Vector-2.png new file mode 100644 index 0000000..085fa8e Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector-2.png differ diff --git a/demo-thoitrang-1/images/bg/Vector-3.png b/demo-thoitrang-1/images/bg/Vector-3.png new file mode 100644 index 0000000..7635ae5 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector-3.png differ diff --git a/demo-thoitrang-1/images/bg/Vector.png b/demo-thoitrang-1/images/bg/Vector.png new file mode 100644 index 0000000..12fa6e6 Binary files /dev/null and b/demo-thoitrang-1/images/bg/Vector.png differ diff --git a/demo-thoitrang-1/images/bg/image 17.png b/demo-thoitrang-1/images/bg/image 17.png new file mode 100644 index 0000000..41bb867 Binary files /dev/null and b/demo-thoitrang-1/images/bg/image 17.png differ diff --git a/demo-thoitrang-1/images/bg/image 5.png b/demo-thoitrang-1/images/bg/image 5.png new file mode 100644 index 0000000..888d84b Binary files /dev/null and b/demo-thoitrang-1/images/bg/image 5.png differ diff --git a/demo-thoitrang-1/images/bg/image as5.png b/demo-thoitrang-1/images/bg/image as5.png new file mode 100644 index 0000000..5774555 Binary files /dev/null and b/demo-thoitrang-1/images/bg/image as5.png differ diff --git a/demo-thoitrang-1/images/bg/next.png b/demo-thoitrang-1/images/bg/next.png new file mode 100644 index 0000000..cb78465 Binary files /dev/null and b/demo-thoitrang-1/images/bg/next.png differ diff --git a/demo-thoitrang-1/images/bg/view.png b/demo-thoitrang-1/images/bg/view.png new file mode 100644 index 0000000..7bdb987 Binary files /dev/null and b/demo-thoitrang-1/images/bg/view.png differ diff --git a/demo-thoitrang-1/images/cart-home-min.png b/demo-thoitrang-1/images/cart-home-min.png new file mode 100644 index 0000000..635951d Binary files /dev/null and b/demo-thoitrang-1/images/cart-home-min.png differ diff --git a/demo-thoitrang-1/images/cart-ticket.png b/demo-thoitrang-1/images/cart-ticket.png new file mode 100644 index 0000000..7286015 Binary files /dev/null and b/demo-thoitrang-1/images/cart-ticket.png differ diff --git a/demo-thoitrang-1/images/deal-icon-discount.png b/demo-thoitrang-1/images/deal-icon-discount.png new file mode 100644 index 0000000..bb4e1fb Binary files /dev/null and b/demo-thoitrang-1/images/deal-icon-discount.png differ diff --git a/demo-thoitrang-1/images/footer-bct.png b/demo-thoitrang-1/images/footer-bct.png new file mode 100644 index 0000000..720c242 Binary files /dev/null and b/demo-thoitrang-1/images/footer-bct.png differ diff --git a/demo-thoitrang-1/images/global/brand-1.png b/demo-thoitrang-1/images/global/brand-1.png new file mode 100644 index 0000000..2171104 Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-1.png differ diff --git a/demo-thoitrang-1/images/global/brand-2.png b/demo-thoitrang-1/images/global/brand-2.png new file mode 100644 index 0000000..5b3317b Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-2.png differ diff --git a/demo-thoitrang-1/images/global/brand-3.png b/demo-thoitrang-1/images/global/brand-3.png new file mode 100644 index 0000000..8d54f8a Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-3.png differ diff --git a/demo-thoitrang-1/images/global/brand-4.png b/demo-thoitrang-1/images/global/brand-4.png new file mode 100644 index 0000000..3f93a13 Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-4.png differ diff --git a/demo-thoitrang-1/images/global/brand-5.png b/demo-thoitrang-1/images/global/brand-5.png new file mode 100644 index 0000000..7ba1a26 Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-5.png differ diff --git a/demo-thoitrang-1/images/global/brand-6.png b/demo-thoitrang-1/images/global/brand-6.png new file mode 100644 index 0000000..097e1dd Binary files /dev/null and b/demo-thoitrang-1/images/global/brand-6.png differ diff --git a/demo-thoitrang-1/images/global/footer-1.png b/demo-thoitrang-1/images/global/footer-1.png new file mode 100644 index 0000000..fde8b98 Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-1.png differ diff --git a/demo-thoitrang-1/images/global/footer-2.png b/demo-thoitrang-1/images/global/footer-2.png new file mode 100644 index 0000000..6370426 Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-2.png differ diff --git a/demo-thoitrang-1/images/global/footer-3.png b/demo-thoitrang-1/images/global/footer-3.png new file mode 100644 index 0000000..482daba Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-3.png differ diff --git a/demo-thoitrang-1/images/global/footer-4.png b/demo-thoitrang-1/images/global/footer-4.png new file mode 100644 index 0000000..316e383 Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-4.png differ diff --git a/demo-thoitrang-1/images/global/footer-5.png b/demo-thoitrang-1/images/global/footer-5.png new file mode 100644 index 0000000..0cd1884 Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-5.png differ diff --git a/demo-thoitrang-1/images/global/footer-6.png b/demo-thoitrang-1/images/global/footer-6.png new file mode 100644 index 0000000..302a99a Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-6.png differ diff --git a/demo-thoitrang-1/images/global/footer-7.png b/demo-thoitrang-1/images/global/footer-7.png new file mode 100644 index 0000000..44f033b Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-7.png differ diff --git a/demo-thoitrang-1/images/global/footer-8.png b/demo-thoitrang-1/images/global/footer-8.png new file mode 100644 index 0000000..ee55bd3 Binary files /dev/null and b/demo-thoitrang-1/images/global/footer-8.png differ diff --git a/demo-thoitrang-1/images/homepage/banner-1.png b/demo-thoitrang-1/images/homepage/banner-1.png new file mode 100644 index 0000000..8540be5 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/banner-1.png differ diff --git a/demo-thoitrang-1/images/homepage/banner-2.png b/demo-thoitrang-1/images/homepage/banner-2.png new file mode 100644 index 0000000..44b3a0b Binary files /dev/null and b/demo-thoitrang-1/images/homepage/banner-2.png differ diff --git a/demo-thoitrang-1/images/homepage/comment-1.png b/demo-thoitrang-1/images/homepage/comment-1.png new file mode 100644 index 0000000..b0d641c Binary files /dev/null and b/demo-thoitrang-1/images/homepage/comment-1.png differ diff --git a/demo-thoitrang-1/images/homepage/comment-2.png b/demo-thoitrang-1/images/homepage/comment-2.png new file mode 100644 index 0000000..734bf66 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/comment-2.png differ diff --git a/demo-thoitrang-1/images/homepage/comment-3.png b/demo-thoitrang-1/images/homepage/comment-3.png new file mode 100644 index 0000000..9d5475c Binary files /dev/null and b/demo-thoitrang-1/images/homepage/comment-3.png differ diff --git a/demo-thoitrang-1/images/homepage/customer-avatar.png b/demo-thoitrang-1/images/homepage/customer-avatar.png new file mode 100644 index 0000000..48bd210 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/customer-avatar.png differ diff --git a/demo-thoitrang-1/images/homepage/slider.png b/demo-thoitrang-1/images/homepage/slider.png new file mode 100644 index 0000000..8e62659 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/slider.png differ diff --git a/demo-thoitrang-1/images/homepage/under-deal-1.png b/demo-thoitrang-1/images/homepage/under-deal-1.png new file mode 100644 index 0000000..a7e5b96 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/under-deal-1.png differ diff --git a/demo-thoitrang-1/images/homepage/under-deal-2.png b/demo-thoitrang-1/images/homepage/under-deal-2.png new file mode 100644 index 0000000..03ac5ab Binary files /dev/null and b/demo-thoitrang-1/images/homepage/under-deal-2.png differ diff --git a/demo-thoitrang-1/images/homepage/under-deal-3.png b/demo-thoitrang-1/images/homepage/under-deal-3.png new file mode 100644 index 0000000..76b3281 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/under-deal-3.png differ diff --git a/demo-thoitrang-1/images/homepage/under-deal-4.png b/demo-thoitrang-1/images/homepage/under-deal-4.png new file mode 100644 index 0000000..ba14e25 Binary files /dev/null and b/demo-thoitrang-1/images/homepage/under-deal-4.png differ diff --git a/demo-thoitrang-1/images/homepage/under-deal-big.png b/demo-thoitrang-1/images/homepage/under-deal-big.png new file mode 100644 index 0000000..37444ed Binary files /dev/null and b/demo-thoitrang-1/images/homepage/under-deal-big.png differ diff --git a/demo-thoitrang-1/images/icon-discount.png b/demo-thoitrang-1/images/icon-discount.png new file mode 100644 index 0000000..2d5a6cc Binary files /dev/null and b/demo-thoitrang-1/images/icon-discount.png differ diff --git a/demo-thoitrang-1/images/icon-mess.png b/demo-thoitrang-1/images/icon-mess.png new file mode 100644 index 0000000..2b4dda0 Binary files /dev/null and b/demo-thoitrang-1/images/icon-mess.png differ diff --git a/demo-thoitrang-1/images/icon-zalo.png b/demo-thoitrang-1/images/icon-zalo.png new file mode 100644 index 0000000..22e4849 Binary files /dev/null and b/demo-thoitrang-1/images/icon-zalo.png differ diff --git a/demo-thoitrang-1/images/logo.png b/demo-thoitrang-1/images/logo.png new file mode 100644 index 0000000..62e89fc Binary files /dev/null and b/demo-thoitrang-1/images/logo.png differ diff --git a/demo-thoitrang-1/images/no_image.jpg b/demo-thoitrang-1/images/no_image.jpg new file mode 100644 index 0000000..eeed0a7 Binary files /dev/null and b/demo-thoitrang-1/images/no_image.jpg differ diff --git a/demo-thoitrang-1/images/pd-icon-zalo.png b/demo-thoitrang-1/images/pd-icon-zalo.png new file mode 100644 index 0000000..4443c10 Binary files /dev/null and b/demo-thoitrang-1/images/pd-icon-zalo.png differ diff --git a/demo-thoitrang-1/images/product-1.png b/demo-thoitrang-1/images/product-1.png new file mode 100644 index 0000000..689757c Binary files /dev/null and b/demo-thoitrang-1/images/product-1.png differ diff --git a/demo-thoitrang-1/images/product-2.png b/demo-thoitrang-1/images/product-2.png new file mode 100644 index 0000000..726c721 Binary files /dev/null and b/demo-thoitrang-1/images/product-2.png differ diff --git a/demo-thoitrang-1/images/product-3.png b/demo-thoitrang-1/images/product-3.png new file mode 100644 index 0000000..09a08e3 Binary files /dev/null and b/demo-thoitrang-1/images/product-3.png differ diff --git a/demo-thoitrang-1/images/product-4.png b/demo-thoitrang-1/images/product-4.png new file mode 100644 index 0000000..b3a8d06 Binary files /dev/null and b/demo-thoitrang-1/images/product-4.png differ diff --git a/demo-thoitrang-1/images/product-5.png b/demo-thoitrang-1/images/product-5.png new file mode 100644 index 0000000..28a9420 Binary files /dev/null and b/demo-thoitrang-1/images/product-5.png differ diff --git a/demo-thoitrang-1/images/product-6.png b/demo-thoitrang-1/images/product-6.png new file mode 100644 index 0000000..0584828 Binary files /dev/null and b/demo-thoitrang-1/images/product-6.png differ diff --git a/demo-thoitrang-1/images/send-cart-face.png b/demo-thoitrang-1/images/send-cart-face.png new file mode 100644 index 0000000..3559f1f Binary files /dev/null and b/demo-thoitrang-1/images/send-cart-face.png differ diff --git a/demo-thoitrang-1/images/sprite.png b/demo-thoitrang-1/images/sprite.png new file mode 100644 index 0000000..2ffcadf Binary files /dev/null and b/demo-thoitrang-1/images/sprite.png differ diff --git a/demo-thoitrang-1/images/star-1.png b/demo-thoitrang-1/images/star-1.png new file mode 100644 index 0000000..d4596fc Binary files /dev/null and b/demo-thoitrang-1/images/star-1.png differ diff --git a/demo-thoitrang-1/images/star.png b/demo-thoitrang-1/images/star.png new file mode 100644 index 0000000..e97140e Binary files /dev/null and b/demo-thoitrang-1/images/star.png differ diff --git a/demo-thoitrang-1/images/star/Group 29.png b/demo-thoitrang-1/images/star/Group 29.png new file mode 100644 index 0000000..c528879 Binary files /dev/null and b/demo-thoitrang-1/images/star/Group 29.png differ diff --git a/demo-thoitrang-1/images/star/Group 30.png b/demo-thoitrang-1/images/star/Group 30.png new file mode 100644 index 0000000..87f39b5 Binary files /dev/null and b/demo-thoitrang-1/images/star/Group 30.png differ diff --git a/demo-thoitrang-1/images/star/Group 31.png b/demo-thoitrang-1/images/star/Group 31.png new file mode 100644 index 0000000..2e899a0 Binary files /dev/null and b/demo-thoitrang-1/images/star/Group 31.png differ diff --git a/demo-thoitrang-1/images/star/Group 32.png b/demo-thoitrang-1/images/star/Group 32.png new file mode 100644 index 0000000..29f9c7a Binary files /dev/null and b/demo-thoitrang-1/images/star/Group 32.png differ diff --git a/demo-thoitrang-1/images/star/Group 33.png b/demo-thoitrang-1/images/star/Group 33.png new file mode 100644 index 0000000..39d6148 Binary files /dev/null and b/demo-thoitrang-1/images/star/Group 33.png differ diff --git a/demo-thoitrang-1/images/star_rating.png b/demo-thoitrang-1/images/star_rating.png new file mode 100644 index 0000000..c4cba66 Binary files /dev/null and b/demo-thoitrang-1/images/star_rating.png differ diff --git a/demo-thoitrang-1/images/zalo.png b/demo-thoitrang-1/images/zalo.png new file mode 100644 index 0000000..a06672c Binary files /dev/null and b/demo-thoitrang-1/images/zalo.png differ diff --git a/demo-thoitrang-1/index-mobile.html b/demo-thoitrang-1/index-mobile.html new file mode 100644 index 0000000..76cfa0a --- /dev/null +++ b/demo-thoitrang-1/index-mobile.html @@ -0,0 +1,1311 @@ + + + + + + Local - Mobile + + + + + + + + +
+ + + + + + + + +
+ + + + +
+ + + + 0 + +
+ +
+
+ + +
+ + +
+
+ + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+
+

+ Hãy Đăng nhập để mua hàng nhanh hơn! +

+ + Tiếp tục mua hàng +
+ +
+
+

THÔNG TIN MUA HÀNG

+ + + + + +
+ + + +
+ + +
+ +
+

SẢN PHẨM (1 sản phẩm)

+ +
+
+ + + 1 + + + +
+ +
+ Bỉm quần Merries size M 58 miếng (6-11kg) + +
Kích thước: 30 miếng
+ +

290.000 ₫

+ +
+ + + +
+
+
+ +
Bỉm quần Merries size M 58 miếng (6-11kg)
Kích thước: 30 miếng

290.000 ₫

+
+ +
+

THANH TOÁN

+ + + + + + + + + + + + + + + + + + + + +
Tổng giá trị sản phẩm290.000 ₫
Tạm tính290.000 ₫
+
+ + +
+
Thành tiền290.000 ₫
+ +
+

HÌNH THỨC THANH TOÁN

+ + + + + + + + + + +
+ + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo-thoitrang-1/index.html b/demo-thoitrang-1/index.html new file mode 100644 index 0000000..eed7306 --- /dev/null +++ b/demo-thoitrang-1/index.html @@ -0,0 +1,1475 @@ + + + + + + Local + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

giảm thêm 15%

+

+ Nhập mã: VNWOW
+ ĐH ĐẦU TIÊN TỪ 700K +

+
+
+ +
+ + +
Thanh toán khi nhận hàng
+
+ +
+ + +
Miễn phí vận chuyển
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

Bạn có mã giảm giá?

+ Bấm vào đây để nhập mã của bạn +
+ +
+

Nếu bạn có mã giảm giá, vui lòng áp dụng bên dưới.

+ + + + +
+
+ +
+
+

Thông tin giao hàng

+ +
+ + + + + +
+ + + + + +
+ + +
+
+ +
+
+

Phương thức thanh toán

+ + + + + + + + + + +
+ +
+

Phương thức vận chuyển

+ + + + + + +
+
+
+ +
+

Đơn hàng của bạn

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Sản phẩm Tổng cộng
+ + + +
Giá bán + 212.500 +
Vận chuyển + 0 +
Tổng tiền + 212.500 +
+ Tiếp tục mua sắm + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo-thoitrang-1/js/lib.js b/demo-thoitrang-1/js/lib.js new file mode 100644 index 0000000..5230833 --- /dev/null +++ b/demo-thoitrang-1/js/lib.js @@ -0,0 +1,454 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("
",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&bi-g-f&&b",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='
',d=k.lazyLoad?a("
",{class:"owl-video-tn "+j,srcType:c}):a("
",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("
",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a(''),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('
').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1, +animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['',''],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('');else for(c=0;c"+this._thumbcontent[c]+"")},e.prototype.setActive=function(){this.owl_currentitem=this.owl._current-this.owl._clones.length/2,this.owl_currentitem===this.owl._items.length&&(this.owl_currentitem=0);var b=this.owl.options,c=b.thumbsPrerendered?a("."+b.thumbContainerClass+'[data-slider-id="'+this._identifier+'"]'):this._thumbcontent._thumbcontainer;c.children().filter(".active").removeClass("active"),c.children().eq(this.owl_currentitem).addClass("active")},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this.owl.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Thumbs=e}(window.Zepto||window.jQuery,window,document); + + +/** + * + * vanilla-lazyload@13.0.1 + * + **/ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).LazyLoad=e()}(this,(function(){"use strict";function t(){return(t=Object.assign||function(t){for(var e=1;e-1&&(k(t,e),m(t,r.class_loading)),h(t,e),function(t){c(t,"was-processed","true")}(t),p(r.callback_reveal,t,e))},O=function(t){var e=d(t);e&&(clearTimeout(e),u(t,null))},N=function(t,e,n){var r=n._settings;p(r.callback_enter,t,e,n),r.load_delay?function(t,e){var n=e._settings.load_delay,r=d(t);r||(r=setTimeout((function(){L(t,e),O(t)}),n),u(t,r))}(t,n):L(t,n)},C=function(t){return!!r&&(t._observer=new IntersectionObserver((function(e){e.forEach((function(e){return function(t){return t.isIntersecting||t.intersectionRatio>0}(e)?N(e.target,e,t):function(t,e,n){var r=n._settings;p(r.callback_exit,t,e,n),r.load_delay&&O(t)}(e.target,e,t)}))}),{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}),!0);var e},x=["IMG","IFRAME"],M=function(t){return Array.prototype.slice.call(t)},R=function(t,e){return function(t){return t.filter((function(t){return!l(t)}))}(M(t||function(t){return t.container.querySelectorAll(t.elements_selector)}(e)))},T=function(t){var e=t._settings,n=e.container.querySelectorAll("."+e.class_error);M(n).forEach((function(t){b(t,e.class_error),function(t){c(t,"was-processed",null)}(t)})),t.update()},j=function(n,r){var a;this._settings=function(e){return t({},o,e)}(n),this.loadingCount=0,C(this),this.update(r),a=this,e&&window.addEventListener("online",(function(t){T(a)}))};return j.prototype={update:function(t){var e,r=this,a=this._settings;(this._elements=R(t,a),!n&&this._observer)?(function(t){return t.use_native&&"loading"in HTMLImageElement.prototype}(a)&&((e=this)._elements.forEach((function(t){-1!==x.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),z(t,e))})),this._elements=R(t,a)),this._elements.forEach((function(t){r._observer.observe(t)}))):this.loadAll()},destroy:function(){var t=this;this._observer&&(this._elements.forEach((function(e){t._observer.unobserve(e)})),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){z(t,this,e)},loadAll:function(){var t=this;this._elements.forEach((function(e){L(e,t)}))}},e&&function(t,e){if(e)if(e.length)for(var n,r=0;n=e[r];r+=1)i(t,n);else i(t,e)}(j,window.lazyLoadOptions),j})); + +function countDownToNextDay(holder) { + const today = new Date(); + const tomorrow = new Date(today); + tomorrow.setDate(tomorrow.getDate() + 1); + tomorrow.setHours(0,0,0,0); // set hour + + var countDownDate = tomorrow.setDate(tomorrow.getDate() + 1); + + var x = setInterval(function() { + var now = new Date().getTime(); + var distance = countDownDate - now; + + var days = Math.floor(distance / (1000 * 60 * 60 * 24)); + var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + var seconds = Math.floor((distance % (1000 * 60)) / 1000); + + if(hours <=9) { + hours = "0" + hours + ""; + } else { + hours = '' + hours.toString().substr(0,1) + hours.toString().substr(1) + '' + } + if(minutes <=9) { + minutes = "0" + minutes + ""; + } else { + minutes = '' + minutes.toString().substr(0,1) + minutes.toString().substr(1) + '' + } + if(seconds <=9) { + seconds = "0" + seconds + ""; + } else { + seconds = '' + seconds.toString().substr(0,1) + seconds.toString().substr(1) + '' + } + var html = hours + minutes + seconds; + + $(holder).html(html); + + }, 1000); +} + +function show_time_left(time,holder) { + var amount = time; + hours = 0; + mins = 0; + secs = 0; + + var days = ''; + if (Math.floor(amount / (60 * 60 * 24)) > 0) { + days = Math.floor(amount / (60 * 60 * 24)); + + if (days <=9) { + days = "0" + "" + days + ""; + } else { + days = '' + days.toString().substr(0,1) + '' + days.toString().substr(1) + '' + } + } + + var hours = Math.floor((amount % ( 60 * 60 * 24)) / ( 60 * 60)); + if(hours <=9) { + hours = "0" + "" + hours + ""; + } else { + hours = '' + hours.toString().substr(0,1) + '' + hours.toString().substr(1) + '' + } + + var mins = Math.floor((amount % ( 60 * 60)) / ( 60)); + if(mins <=9) { + mins = "0" + "" + mins + ""; + } else { + mins = '' + mins.toString().substr(0,1) + '' + mins.toString().substr(1) + '' + } + + var secs = Math.floor(amount % 60); + if(secs <=9) { + secs = "0" + "" + secs + ""; + } else { + secs = '' + secs.toString().substr(0,1) + '' + secs.toString().substr(1) + '' + } + + + $(holder).html(days + ':' + hours + ':' + mins + ':' + secs) + + setTimeout(function() { + show_time_left(parseInt(time)-1,holder); + }, 1000); +} + +function checkContentHeight(height) { + $(".js-static-content").each(function(){ + var $row = $(this); + var $row_height = $row.height(); + + if ($row_height > height) { + $row.css("max-height", height); + $row.addClass("bg-content"); + $(".js-showmore-button").css("display","block"); + } + }); + + $(".js-showmore-button").click(function(){ + $(this).parents(".js-static-container").find(".js-static-content").css("max-height","unset"); + $(this).parents(".js-static-container").find(".js-static-content").removeClass("bg-content"); + $(this).parents(".js-static-container").find(".js-showless-button").css({"display": "block", "margin-top": "15px"}); + $(this).hide(); + + $('html, body').animate({ + scrollTop: $(this).parents(".js-static-container").find(".js-static-content").offset().top - 160 + },500); + }); + + $(".js-showless-button").click(function(){ + $(this).parents(".js-static-container").find(".js-static-content").css("max-height",height); + $(this).parents(".js-static-container").find(".js-static-content").addClass("bg-content"); + $(this).parents(".js-static-container").find(".js-showmore-button").css("display","block"); + $(this).hide(); + + $('html, body').animate({ + scrollTop: $(this).parents(".js-static-container").find(".js-static-content").offset().top - 160 + },800); + }); +} + +function tooltip(){ + var w_tooltip = $("#tooltip").width(); + var h_tooltip = 0; + var pad = 10; + var x_mouse = 0; + var y_mouse = 0; + var wrap_left = 0; + var wrap_right = 0; + var wrap_top = 0; + var wrap_bottom = 0; + + $(".p-item .p-img").mousemove(function(e){ + content_tooltip = $(this).parents(".p-item").find(".p-tooltip"); + if(content_tooltip.length == 0){ + return; + $("#tooltip").hide(); + } + + $("#tooltip").html(content_tooltip.html()); + + wrap_left = 0; + wrap_top = $(window).scrollTop(); + wrap_bottom = $(window).height(); + wrap_right = $(window).width(); + x_mouse = e.pageX; + y_mouse = e.pageY; + h_tooltip = $("#tooltip").height(); + + if(x_mouse + w_tooltip > wrap_right) $("#tooltip").css("left",x_mouse - w_tooltip - pad); + else $("#tooltip").css("left",x_mouse + pad); + + if(y_mouse - h_tooltip < wrap_top) $("#tooltip").css("top",wrap_top); + else $("#tooltip").css("top",y_mouse - h_tooltip - pad); + + $("#tooltip").show(); + }); + + $(".p-item .p-img").mouseout(function(){ + $("#tooltip").hide(); + }); +} + +function showCartSummary(display_node) { + var $status_container = $(display_node); + $status_container.html('...'); + Hura.Cart.getSummary().then(summary => { + $status_container.html(summary.total_item); + }); +} + +function check_login(){ + var error = ""; + var email = document.getElementById('email').value; + if (email.length < 6) error += "- Mời bạn nhập địa chỉ email\n"; + + var password = document.getElementById('password').value; + if (password.length == 0 ) error += "- Bạn cần nhập mật khẩu \n"; + + if (error != "") { + alert(error); + return false; + } + + Hura.User.login(email, password).then(function (data) { + //console.log(data); + if (data.status == 'error') { + alert(data.message); + } else { + alert("Đăng nhập thành công !"); + + location.href='/taikhoan'; + } + }); +} + +function check_field_registor() { + var error = ""; + var email = document.getElementById('email').value; + if (email.length < 6) error += "- Mời bạn nhập địa chỉ email\n"; + + var password = document.getElementById('password').value; + if (password.length < 6) error += "- Mật khẩu yếu\n"; + + var full_name = document.getElementById('full_name').value; + if (full_name.length < 2) error += "- Mời bạn nhập đúng tên\n"; + + var mobile = document.getElementById('tel').value; + if (mobile.length < 9) error += "- Mời bạn nhập đủ số điện thoại\n"; + + var address = document.getElementById('address').value; + if (address.length < 6) error += "- Mời bạn nhập địa chỉ\n"; + + var province = $("#ship_to_province option:checked").val(); + if (province == '') error += "- Mời bạn chọn tỉnh/Thành phố\n"; + + var district = $("#js-district-holder option:checked").val(); + if (district == '') error += "- Mời bạn chọn quận, huyện\n"; + + var pass = $("#password").val(); + var pass1 = $("#password1").val(); + + var sex = $('input[type="radio"]:checked').val() + if (pass1 != pass) { + error += '- Mật khẩu không trùng khớp. Vui lòng nhập lại'; + } + + if (error != "") { + alert(error); + return false; + } else { + + var registerParams = { + action_type: "register", + info : { + email : email, + name : full_name, + tel : mobile, + mobile : mobile, + sex : sex, + birthday : '', + password : password, + address : address, + province : province, + district : district + } + } + + Hura.Ajax.post('customer', registerParams).then(function (data) { + console.log(data); + if(data.status == 'error' && data.message == 'Email exist' ){ + alert('Email đã được sử dụng \n Vui lòng đăng ký lại ! ') + } else { + alert('Bạn đã đăng ký thành công ! ') + location.href="/dang-nhap"; + } + }) + + } +} + +function check_user_captcha(captcha){ + $('#check_captcha').html("... đang kiểm tra"); + + var params = { + captcha: captcha + }; + + Hura.Ajax.post('check-captcha', params).then(function (data) { + console.log(data); + $('#check_captcha').html(data); + }) +} + +function subscribe_newsletter(a){ + var email = $(a).val(); + + if(email.length > 3){ + var params = { + action : 'customer', + action_type: 'register-newsletter', + info : { + full_name: 'Khách hàng nhận bản tin', + email: email + } + }; + Hura.Ajax.post('customer', params).then(function (data) { + console.log(data); + if(data.status == 'success') { + alert("Quý khách đã đăng ký thành công"); + $(a).val("");} + else if(data.message == 'Email exist'){ + alert("Email này đã tồn tại"); + } + else { + alert('Lỗi xảy ra, vui lòng thử lại'); + } + }) + + }else{alert('Vui lòng nhập địa chỉ email');} +} + +function show_time_left(time,holder) { + var amount = time; + hours = 0; + mins = 0; + secs = 0; + + var days = Math.floor(amount / (60 * 60 * 24)); + hours = Math.floor((amount % ( 60 * 60 * 24)) / ( 60 * 60)); + mins = Math.floor((amount % ( 60 * 60)) / ( 60)); + secs = Math.floor(amount % 60); + + if(days <=9) days = days; + if(hours <=9) hours = "0"+hours; + if(mins <=9) mins = "0"+mins; + if(secs <=9) secs = "0"+secs; + + + $(holder).html(days + ' ngày ' + hours + ' : ' + mins + ' : ' + secs) + + setTimeout(function() { + show_time_left(parseInt(time)-1,holder); + }, 1000); +} + +function show_datetime_from_unix(int){ + var date = new Date(int*1000); + return date; +} + +function toTimestamp(strDate){ + var datum = Date.parse(strDate); + return datum/1000; +} + +function formatDate(a){ + var a = new Date(parseInt(a)*1000); + + var year = a.getFullYear(); + var month = a.getMonth()+1; + var date = a.getDate(); + var hour = a.getHours(); + var min = a.getMinutes(); + var sec = a.getSeconds(); + var time = date + '/' + month + '/' + year + ' ' + hour + ':' + min ; + return time; +} + +function GetURLParameter(sParam){ + var sPageURL = window.location.search.substring(1); + var sURLVariables = sPageURL.split('&'); + for (var i = 0; i < sURLVariables.length; i++) + { + var sParameterName = sURLVariables[i].split('='); + if (sParameterName[0] == sParam) + { + return sParameterName[1]; + } + } +} + +function validateEmail(sEmail) { + var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; + if (filter.test(sEmail)) { + return true; + } + else { + return false; + } +} + +function validatePhoneNumber(a){ + var number_regex1 = /^[0]\d{9}$/i; + var number_regex2 = /^[0]\d{10}$/i; + + if(number_regex1.test(a) == false && number_regex2.test(a) == false) return false; + return true; +} + +function formatCurrency(a) { + var b = parseFloat(a).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1.").toString(); + var len = b.length; + b = b.substring(0, len - 3); + return b; +} + +function isOnScreen(elem) { + // if the element doesn't exist, abort + if( elem.length == 0 ) { + return; + } + var $window = jQuery(window) + var viewport_top = $window.scrollTop() + var viewport_height = $window.height() + var viewport_bottom = viewport_top + viewport_height + var $elem = jQuery(elem) + var top = $elem.offset().top + var height = $elem.height() + var bottom = top + height + + return (top >= viewport_top && top < viewport_bottom) || + (bottom > viewport_top && bottom <= viewport_bottom) || + (height > viewport_height && top <= viewport_top && bottom >= viewport_bottom) +} + +function strToNumber(str) { + str += ''; //convert to str incase it's already a number + while(str.indexOf(".") > 0){ + str = str.replace('.',''); + } + var result = parseFloat(str); + return isNaN(result) ? 0 : result; +} + +function writeStringToPrice(str){ + str = (str+'').replace(/\./g, ""); + var first_group = str.substr(0,str.length % 3); + var remain_group = str.replace(first_group,""); + var num_group = remain_group.length/3; + var result = "", group_of_three; + + for(var i=0;i < num_group;i++){ + group_of_three = remain_group.substr(i*3,3); + result += group_of_three; + if(i !== (num_group-1)) result += "."; + } + + if(first_group.length > 0) { + return (result !== "") ? first_group + "." + result : first_group; + } + + return result; +} \ No newline at end of file diff --git a/demo-thoitrang-1/js/magiczoom.js b/demo-thoitrang-1/js/magiczoom.js new file mode 100644 index 0000000..93e201e --- /dev/null +++ b/demo-thoitrang-1/js/magiczoom.js @@ -0,0 +1,2 @@ +/*Magic Zoom v4.5.17*/ +(function(){if(window.magicJS){return}var b={version:"v2.7.4",UUID:0,storage:{},$uuid:function(d){return(d.$J_UUID||(d.$J_UUID=++a.UUID))},getStorage:function(d){return(a.storage[d]||(a.storage[d]={}))},$F:function(){},$false:function(){return false},defined:function(d){return(undefined!=d)},exists:function(d){return!!(d)},j1:function(d){if(!a.defined(d)){return false}if(d.$J_TYPE){return d.$J_TYPE}if(!!d.nodeType){if(1==d.nodeType){return"element"}if(3==d.nodeType){return"textnode"}}if(d.length&&d.item){return"collection"}if(d.length&&d.callee){return"arguments"}if((d instanceof window.Object||d instanceof window.Function)&&d.constructor===a.Class){return"class"}if(d instanceof window.Array){return"array"}if(d instanceof window.Function){return"function"}if(d instanceof window.String){return"string"}if(a.j21.trident){if(a.defined(d.cancelBubble)){return"event"}}else{if(d===window.event||d.constructor==window.Event||d.constructor==window.MouseEvent||d.constructor==window.UIEvent||d.constructor==window.KeyboardEvent||d.constructor==window.KeyEvent){return"event"}}if(d instanceof window.Date){return"date"}if(d instanceof window.RegExp){return"regexp"}if(d===window){return"window"}if(d===document){return"document"}return typeof(d)},extend:function(j,h){if(!(j instanceof window.Array)){j=[j]}for(var g=0,e=j.length;g-1}});b.implement(Function,{$J_TYPE:"function",j24:function(){var e=a.$A(arguments),d=this,f=e.shift();return function(){return d.apply(f||null,e.concat(a.$A(arguments)))}},j16:function(){var e=a.$A(arguments),d=this,f=e.shift();return function(g){return d.apply(f||null,$mjs([g||window.event]).concat(e))}},j27:function(){var e=a.$A(arguments),d=this,f=e.shift();return window.setTimeout(function(){return d.apply(d,e)},f||0)},j28:function(){var e=a.$A(arguments),d=this;return function(){return d.j27.apply(d,e)}},interval:function(){var e=a.$A(arguments),d=this,f=e.shift();return window.setInterval(function(){return d.apply(d,e)},f||0)}});var c=navigator.userAgent.toLowerCase();a.j21={features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},touchScreen:function(){return"ontouchstart"in window||(window.DocumentTouch&&document instanceof DocumentTouch)}(),mobile:c.match(/android|tablet|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(j21|link)|vodafone|wap|windows (ce|phone)|xda|xiino/)?true:false,engine:(window.opera)?"presto":!!(window.ActiveXObject)?"trident":(undefined!=document.getBoxObjectFor||null!=window.mozInnerScreenY)?"gecko":(null!=window.WebKitPoint||!navigator.taintEnabled)?"webkit":"unknown",version:"",ieMode:0,platform:c.match(/ip(?:ad|od|hone)/)?"ios":(c.match(/(?:webos|android)/)||navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),backCompat:document.compatMode&&"backcompat"==document.compatMode.toLowerCase(),getDoc:function(){return(document.compatMode&&"backcompat"==document.compatMode.toLowerCase())?document.body:document.documentElement},requestAnimationFrame:window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||undefined,cancelAnimationFrame:window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||undefined,ready:false,onready:function(){if(a.j21.ready){return}a.j21.ready=true;a.body=$mjs(document.body);a.win=$mjs(window);(function(){a.j21.css3Transformations={capable:false,prefix:""};if(typeof document.body.style.transform!=="undefined"){a.j21.css3Transformations.capable=true}else{var f="Webkit Moz O ms Khtml".split(" ");for(var e=0,d=f.length;e=this.finishTime){this.stopAnimation();this.render(1);this.options.onComplete.j27(10);return this}var c=this.options.transition((d-this.startTime)/this.options.duration);if(!this.options.forceAnimation&&b.j21.requestAnimationFrame){this.timer=b.j21.requestAnimationFrame.call(window,this.loopBind)}this.render(c)},render:function(c){var d={};for(var e in this.styles){if("opacity"===e){d[e]=Math.round(this.calc(this.styles[e][0],this.styles[e][1],c)*100)/100}else{d[e]=this.calc(this.styles[e][0],this.styles[e][1],c);if(this.options.roundCss){d[e]=Math.round(d[e])}}}this.options.onBeforeRender(d);this.set(d);this.options.onAfterRender(d)},set:function(c){return this.el.j6(c)}});b.FX.Transition={linear:function(c){return c},sineIn:function(c){return-(Math.cos(Math.PI*c)-1)/2},sineOut:function(c){return 1-b.FX.Transition.sineIn(1-c)},expoIn:function(c){return Math.pow(2,8*(c-1))},expoOut:function(c){return 1-b.FX.Transition.expoIn(1-c)},quadIn:function(c){return Math.pow(c,2)},quadOut:function(c){return 1-b.FX.Transition.quadIn(1-c)},cubicIn:function(c){return Math.pow(c,3)},cubicOut:function(c){return 1-b.FX.Transition.cubicIn(1-c)},backIn:function(d,c){c=c||1.618;return Math.pow(d,2)*((c+1)*d-c)},backOut:function(d,c){return 1-b.FX.Transition.backIn(1-d)},elasticIn:function(d,c){c=c||[];return Math.pow(2,10*--d)*Math.cos(20*d*Math.PI*(c[0]||1)/3)},elasticOut:function(d,c){return 1-b.FX.Transition.elasticIn(1-d,c)},bounceIn:function(e){for(var d=0,c=1;1;d+=c,c/=2){if(e>=(7-4*d)/11){return c*c-Math.pow((11-6*d-11*e)/4,2)}}},bounceOut:function(c){return 1-b.FX.Transition.bounceIn(1-c)},none:function(c){return 0}}})(magicJS);(function(b){if(!b){throw"MagicJS not found";return}if(b.PFX){return}var a=b.$;b.PFX=new b.Class(b.FX,{init:function(c,d){this.el_arr=c;this.options=b.extend(this.options,d);this.timer=false},start:function(c){this.$parent.start([]);this.styles_arr=c;return this},render:function(c){for(var d=0;d1)?arguments[1]:undefined))}else{e.zoom.start()}},update:function(h,e,g,f){if((h=$mjs(h))&&h.zoom){(null===e||""===e)&&(e=undefined);(null===g||""===g)&&(g=undefined);h.zoom.update(e,g,f);return true}return false},refresh:function(){c.$A(window.document.getElementsByTagName("A")).j14(function(e){if(e.className.has("MagicZoom"," ")){if(a.stop(e)){a.start.j27(100,e)}else{a.start(e)}}},this)},show:function(e){return a.zoomIn(e)},zoomIn:function(e){if((e=$mjs(e))&&e.zoom){return e.zoom.activate()}return false},zoomOut:function(e){if((e=$mjs(e))&&e.zoom){return e.zoom.pause()}return false},getXY:function(e){if((e=$mjs(e))&&e.zoom){return{x:e.zoom.options.x,y:e.zoom.options.y}}},x7:function(g){var f,e;f="";for(e=0;ethis.z7.width){this.z4.width=this.z7.width}if(this.z4.height>this.z7.height){this.z4.height=this.z7.height}this.z4.width=Math.round(this.z4.width);this.z4.height=Math.round(this.z4.height);this.z4.borderWidth=this.z4.self.j19("borderLeftWidth").j17();this.z4.self.j6({width:(this.z4.width-2*(c.j21.backCompat?0:this.z4.borderWidth))+"px",height:(this.z4.height-2*(c.j21.backCompat?0:this.z4.borderWidth))+"px"});if(!this.options.opacityReverse&&!this.options.rightClick){this.z4.self.j23(parseFloat(this.options.opacity/100));if(this.z4.z42){this.z4.self.removeChild(this.z4.z42);this.z4.z42=null}}else{if(this.z4.z42){this.z4.z42.src=this.z7.self.src}else{f=this.z7.self.cloneNode(false);f.unselectable="on";this.z4.z42=$mjs(this.z4.self.appendChild(f)).j6({position:"absolute",zIndex:5})}if(this.options.opacityReverse){this.z4.z42.j6(this.z7.self.j7());this.z4.self.j23(1);if(c.j21.ieMode&&c.j21.ieMode<9){this.z4.z42.j23(1)}}else{if(this.options.rightClick){this.z4.z42.j23(0.009)}this.z4.self.j23(parseFloat(this.options.opacity/100))}}},z43:function(h,f){if(!this.z30||h===undefined||h.skipAnimation){return false}if(!this.z4){return false}var i=(/touch/i).test(h.type)&&h.touches.length>1;var g=("touchend"==h.type&&!h.continueAnimation);if((!this.divTag||h.type!="mouseout")&&!i){$mjs(h).stop()}if(f===undefined){f=$mjs(h).j15()}if(this.z6===null||this.z6===undefined){this.z6=this.z7.getBox()}if(g||("mouseout"==h.type&&!this.c.hasChild(h.getRelated()))||i||f.x>this.z6.right||f.xthis.z6.bottom||f.y=this.z6.right){f.x=this.z6.right-this.z4.width/2}if((f.x-this.z4.width/2)<=this.z6.left){f.x=this.z6.left+this.z4.width/2}if((f.y+this.z4.height/2)>=this.z6.bottom){f.y=this.z6.bottom-this.z4.height/2}if((f.y-this.z4.height/2)<=this.z6.top){f.y=this.z6.top+this.z4.height/2}this.options.x=f.x-this.z6.left;this.options.y=f.y-this.z6.top;if(this.z44===null){this.z44=setTimeout(this.z16,10)}if(c.defined(this.hintVisible)&&this.hintVisible){this.hintVisible=false;this.hint.hide()}return true},show:function(i){if(i&&!this.z44){return}var o,l,h,g,n,m,k,j,f,e=this.options,p=this.z4;o=p.width/2;l=p.height/2;p.self.style.left=e.x-o+this.z7.border.left+"px";p.self.style.top=e.y-l+this.z7.border.top+"px";if(this.options.opacityReverse){p.z42.style.left="-"+(parseFloat(p.self.style.left)+p.borderWidth)+"px";p.z42.style.top="-"+(parseFloat(p.self.style.top)+p.borderWidth)+"px"}h=(this.options.x-o)*(this.z1.width/this.z7.width);g=(this.options.y-l)*(this.z1.height/this.z7.height);if(this.z1.width-h0){k=1}else{if(k>-1&&k<0){k=-1}}n+=k;j*=e.smoothingSpeed/100;if(j<1&&j>0){j=1}else{if(j>-1&&j<0){j=-1}}m+=j;this.z1.self.style.left=n+"px";this.z1.self.style.top=m+"px"}if(!p.z38){if(this.z2){this.z2.stop();this.z2.options.onComplete=c.$F;this.z2.options.duration=e.zoomFadeInSpeed;this.z47.self.j23(0);this.z2.start({opacity:[0,1]})}if(/^(left|right|top|bottom)$/i.test(e.zoomPosition)){this.z47.self.j32(c.body)}if(e.zoomPosition!="inner"){p.self.show()}this.z47.self.j6(this.adjustPosition(/^(left|right|top|bottom)$/i.test(e.zoomPosition)&&!this.options.alwaysShowZoom));if(e.opacityReverse){this.c.j6Prop("background-color",this.z4.bgColor);this.z7.self.j23(parseFloat((100-e.opacity)/100))}p.z38=true}if(this.z44){this.z44=setTimeout(this.z16,1000/e.fps)}},adjustPosition:function(m){var f=this.getViewPort(5),e=this.z7.self.j9(),j=this.options.zoomPosition,i=this.z47,g=this.options.zoomDistance,n=i.self.j7(),l=i.initTopPos,h=i.initLeftPos,k={left:i.initLeftPos,top:i.initTopPos};if("inner"===j||this.z47.custom){return k}m||(m=false);i.lastLeftPos+=(e[i.adjustX.edge]-this.z7Rect[i.adjustX.edge])/i.adjustX.ratio;i.z21+=(e[i.adjustY.edge]-this.z7Rect[i.adjustY.edge])/i.adjustY.ratio;this.z7Rect=e;k.left=h=i.lastLeftPos;k.top=l=i.z21;if(m){if("left"==j||"right"==j){if("left"==j&&f.left>h){k.left=(e.left-f.left>=n.width)?(e.left-n.width-2):(f.right-e.right-2>e.left-f.left-2)?(e.right+2):(e.left-n.width-2)}else{if("right"==j&&f.right=n.width)?(e.right+2):(e.left-f.left-2>f.right-e.right-2)?(e.left-n.width-2):(e.right+2)}}}else{if("top"==j||"bottom"==j){k.left=Math.max(f.left+2,Math.min(f.right,h+n.width)-n.width);if("top"==j&&f.top>l){k.top=(e.top-f.top>=n.height)?(e.top-n.height-2):(f.bottom-e.bottom-2>e.top-f.top-2)?(e.bottom+2):(e.top-n.height-2)}else{if("bottom"==j&&f.bottom=n.height)?(e.bottom+2):(e.top-f.top-2>f.bottom-e.bottom-2)?(e.top-n.height-2):(e.bottom+2)}}}}}return k},getViewPort:function(g){g=g||0;var f=(c.j21.touchScreen)?{width:window.innerWidth,height:window.innerHeight}:$mjs(window).j7(),e=$mjs(window).j10();return{left:e.x+g,right:e.x+f.width-g,top:e.y+g,bottom:e.y+f.height-g}},onresize:function(i){if(!this.z7||!this.z7.ready){return}var g,f,h={width:this.z7.width,height:this.z7.height};this.z7.z13();if(this.z47.custom){f=$mjs(this.z47.self.parentNode).j7();if(/%$/i.test(this.z47.initWidth)){this.options.zoomWidth=(parseInt(this.z47.initWidth)/100)*f.width}if(/%$/i.test(this.z47.initHeight)){this.options.zoomHeight=(parseInt(this.z47.initHeight)/100)*f.height}}else{if("inner"===this.options.zoomPosition){this.options.zoomWidth=this.z7.width;this.options.zoomHeight=this.z7.height}else{this.options.zoomWidth*=this.z7.width/h.width;this.options.zoomHeight*=this.z7.height/h.height}}g=this.z47.z41.j7();this.zoomViewHeight=this.options.zoomHeight-g.height;if(this.options.showTitle=="bottom"){$mjs(this.z1.self.parentNode).j6Prop("height",this.options.zoomHeight-g.height)}this.z47.self.j6("inner"==this.options.zoomPosition?{}:{height:this.options.zoomHeight+"px",width:this.options.zoomWidth+"px"});if(c.j21.trident4&&this.z47.z23){this.z47.z23.j6({width:this.options.zoomWidth,height:this.options.zoomHeight})}if(this.options.opacityReverse&&this.z4.z42){this.z4.z42.j6(this.z7.self.j7())}this.z4.height=this.zoomViewHeight/(this.z1.height/this.z7.height);this.z4.width=this.options.zoomWidth/(this.z1.width/this.z7.width);if(this.z4.width>this.z7.width){this.z4.width=this.z7.width}if(this.z4.height>this.z7.height){this.z4.height=this.z7.height}this.z4.width=Math.round(this.z4.width);this.z4.height=Math.round(this.z4.height);this.z4.borderWidth=this.z4.self.j19("borderLeftWidth").j17();this.z4.self.j6({width:(this.z4.width-2*(c.j21.backCompat?0:this.z4.borderWidth))+"px",height:(this.z4.height-2*(c.j21.backCompat?0:this.z4.borderWidth))+"px"});if(this.z4.z38){this.z47.self.j6(this.adjustPosition(/^(left|right|top|bottom)$/i.test(this.options.zoomPosition)&&!this.options.alwaysShowZoom));this.options.x*=this.z7.width/h.width;this.options.y*=this.z7.height/h.height;this.show()}},activate:function(f,g){f=(c.defined(f))?f:true;this.activatedEx=true;if(!this.z1){this.z18();return}if(this.options.disableZoom){return}this.z30=true;if(f){if(c.defined(g)){this.z43(g);return}if(!this.options.preservePosition){this.options.x=this.z7.width/2;this.options.y=this.z7.height/2}this.show()}},pause:function(){var e=this.z4&&this.z4.z38;if(this.z44){clearTimeout(this.z44);this.z44=null}if(!this.options.alwaysShowZoom&&this.z4&&this.z4.z38){this.z4.z38=false;this.z4.self.hide();if(this.z2){this.z2.stop();this.z2.options.onComplete=this.z47.z22;this.z2.options.duration=this.options.zoomFadeOutSpeed;var f=this.z47.self.j19("opacity");this.z2.start({opacity:[f,0]})}else{this.z47.hide()}if(this.options.opacityReverse){this.c.j6Prop("background-color","");this.z7.self.j23(1)}}this.z6=null;if(this.options.clickToActivate){this.z30=false}if(this.options.dragMode){this.z45=false}if(this.hint){this.hintVisible=true;this.hint.show()}},mousedown:function(i){var f=i.getButton(),h=(/touch/i).test(i.type),j=c.now();if(3==f){return true}if(h){if(i.targetTouches.length>1){return}this.c.j30("magiczoom:event:lastTap",{id:i.targetTouches[0].identifier,x:i.targetTouches[0].clientX,y:i.targetTouches[0].clientY,ts:j});if(this.z1&&this.z1.ready&&!this.z30){return}}if(!(h&&i.touches.length>1)){$mjs(i).stop()}if("click"==this.options.initializeOn&&!this.z7){this.initMouseEvent=i;this.z18();return}if("mouseover"==this.options.initializeOn&&!this.z7&&(i.type=="mouseover"||i.type=="touchstart")){this.initMouseEvent=i;this.z18();this.c.je2("mouseover",this.z14);return}if(this.options.disableZoom){return}if(this.z7&&!this.z1.ready){return}if(this.z1&&this.options.clickToDeactivate&&this.z30&&!h){this.z30=false;this.pause();return}if(this.z1&&!this.z30){this.activate(true,i);i.stopImmediatePropagation&&i.stopImmediatePropagation()}if(this.z30&&this.options.dragMode){this.z45=true;if(!this.options.moveOnClick){if(this.z6===null||this.z6===undefined){this.z6=this.z7.getBox()}var g=i.j15();this.ddx=g.x-this.options.x-this.z6.left;this.ddy=g.y-this.options.y-this.z6.top;if(Math.abs(this.ddx)>this.z4.width/2||Math.abs(this.ddy)>this.z4.height/2){this.z45=false;return}}else{this.z43(i)}}},mouseup:function(i){var f=i.getButton(),h=(/touch/i).test(i.type),k=c.now(),j=null,g=this.options.preservePosition;if(3==f){return true}if(h){j=this.c.j29("magiczoom:event:lastTap");if(!j||i.targetTouches.length>1){return}if(j.id==i.changedTouches[0].identifier&&k-j.ts<=200&&Math.sqrt(Math.pow(i.changedTouches[0].clientX-j.x,2)+Math.pow(i.changedTouches[0].clientY-j.y,2))<=15){if(this.z1&&this.z1.ready&&!this.z30){if(this.z6===null||this.z6===undefined){this.z6=this.z7.getBox()}this.options.preservePosition=true;this.options.x=i.j15().x-this.z6.left;this.options.y=i.j15().y-this.z6.top;this.activate(true);this.options.preservePosition=g;this.options.dragMode&&(this.z45=true);this.ddx=0;this.ddy=0;i.continueAnimation=true;i.zoomActivation=true;i.stopImmediatePropagation&&i.stopImmediatePropagation()}$mjs(i).stop();return}}$mjs(i).stop();if(this.options.dragMode){this.z45=false}}};if(c.j21.trident){try{document.execCommand("BackgroundImageCache",false,true)}catch(b){}}$mjs(document).je1("domready",function(){c.insertCSS(".mz-tmp-clone","margin: 0 !important;border: 0 !important;padding: 0 !important;position: relative !important;height: 0 !important;min-height: 0 !important;z-index: -1;opacity: 0;","mz-css");$mjs(document).je1("mousemove",a.z8);a.refresh()});return a})(magicJS); \ No newline at end of file diff --git a/demo-thoitrang-1/js/mmenu.js b/demo-thoitrang-1/js/mmenu.js new file mode 100644 index 0000000..0b91e95 --- /dev/null +++ b/demo-thoitrang-1/js/mmenu.js @@ -0,0 +1,16 @@ +/*! + * jQuery mmenu v7.2.2 + * @requires jQuery 1.7.0 or later + * + * mmenu.frebsite.nl + * + * Copyright (c) Fred Heusschen + * www.frebsite.nl + * + * License: CC-BY-NC-4.0 + * http://creativecommons.org/licenses/by-nc/4.0/ + */ +!function(h){var n,p,o,a,t,f="mmenu",e="7.2.2";h[f]&&h[f].version>e||(h[f]=function(t,e,n){return this.$menu=t,this._api=["bind","getInstance","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=e,this.conf=n,this.vars={},this.cbck={},this.mtch={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initWrappers(),this._initAddons(),this._initExtensions(),this._initHooks(),this._initMenu(),this._initPanels(),this._initOpened(),this._initAnchors(),this._initMatchMedia(),"function"==typeof this.___debug&&this.___debug(),this},h[f].version=e,h[f].uniqueId=0,h[f].wrappers={},h[f].addons={},h[f].defaults={hooks:{},extensions:[],wrappers:[],navbar:{add:!0,title:"Menu",titleLink:"parent"},onClick:{setSelected:!0},slidingSubmenus:!0},h[f].configuration={classNames:{divider:"Divider",inset:"Inset",nolistview:"NoListview",nopanel:"NoPanel",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,language:null,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},h[f].prototype={getInstance:function(){return this},initPanels:function(t){this._initPanels(t)},openPanel:function(t,e){if(this.trigger("openPanel:before",t),t&&t.length&&(t.is("."+p.panel)||(t=t.closest("."+p.panel)),t.is("."+p.panel))){var n=this;if("boolean"!=typeof e&&(e=!0),t.parent("."+p.listitem+"_vertical").length)t.parents("."+p.listitem+"_vertical").addClass(p.listitem+"_opened").children("."+p.panel).removeClass(p.hidden),this.openPanel(t.parents("."+p.panel).not(function(){return h(this).parent("."+p.listitem+"_vertical").length}).first()),this.trigger("openPanel:start",t),this.trigger("openPanel:finish",t);else{if(t.hasClass(p.panel+"_opened"))return;var i=this.$pnls.children("."+p.panel),s=this.$pnls.children("."+p.panel+"_opened");if(!h[f].support.csstransitions)return s.addClass(p.hidden).removeClass(p.panel+"_opened"),t.removeClass(p.hidden).addClass(p.panel+"_opened"),this.trigger("openPanel:start",t),void this.trigger("openPanel:finish",t);i.not(t).removeClass(p.panel+"_opened-parent");for(var a=t.data(o.parent);a;)(a=a.closest("."+p.panel)).parent("."+p.listitem+"_vertical").length||a.addClass(p.panel+"_opened-parent"),a=a.data(o.parent);i.removeClass(p.panel+"_highest").not(s).not(t).addClass(p.hidden),t.removeClass(p.hidden);var r=function(){s.removeClass(p.panel+"_opened"),t.addClass(p.panel+"_opened"),t.hasClass(p.panel+"_opened-parent")?(s.addClass(p.panel+"_highest"),t.removeClass(p.panel+"_opened-parent")):(s.addClass(p.panel+"_opened-parent"),t.addClass(p.panel+"_highest")),n.trigger("openPanel:start",t)},l=function(){s.removeClass(p.panel+"_highest").addClass(p.hidden),t.removeClass(p.panel+"_highest"),n.trigger("openPanel:finish",t)};e&&!t.hasClass(p.panel+"_noanimation")?setTimeout(function(){n.__transitionend(t,function(){l()},n.conf.transitionDuration),r()},n.conf.openingInterval):(r(),l())}this.trigger("openPanel:after",t)}},closePanel:function(t){this.trigger("closePanel:before",t);var e=t.parent();e.hasClass(p.listitem+"_vertical")&&(e.removeClass(p.listitem+"_opened"),t.addClass(p.hidden),this.trigger("closePanel",t)),this.trigger("closePanel:after",t)},closeAllPanels:function(t){this.trigger("closeAllPanels:before"),this.$pnls.find("."+p.listview).children().removeClass(p.listitem+"_selected").filter("."+p.listitem+"_vertical").removeClass(p.listitem+"_opened");var e=this.$pnls.children("."+p.panel),n=t&&t.length?t:e.first();this.$pnls.children("."+p.panel).not(n).removeClass(p.panel+"_opened").removeClass(p.panel+"_opened-parent").removeClass(p.panel+"_highest").addClass(p.hidden),this.openPanel(n,!1),this.trigger("closeAllPanels:after")},togglePanel:function(t){var e=t.parent();e.hasClass(p.listitem+"_vertical")&&this[e.hasClass(p.listitem+"_opened")?"closePanel":"openPanel"](t)},setSelected:function(t){this.trigger("setSelected:before",t),this.$menu.find("."+p.listitem+"_selected").removeClass(p.listitem+"_selected"),t.addClass(p.listitem+"_selected"),this.trigger("setSelected:after",t)},bind:function(t,e){this.cbck[t]=this.cbck[t]||[],this.cbck[t].push(e)},trigger:function(){var t=Array.prototype.slice.call(arguments),e=t.shift();if(this.cbck[e])for(var n=0,i=this.cbck[e].length;n').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.addClass(p.menu).parent().addClass(p.wrapper),this.trigger("initMenu:after")},_initPanels:function(t){this.trigger("initPanels:before",t),t=t||this.$pnls.children(this.conf.panelNodetype);var i=h(),s=this,a=function(t){t.filter(s.conf.panelNodetype).each(function(t){var e=s._initPanel(h(this));if(e){s._initNavbar(e),s._initListview(e),i=i.add(e);var n=e.children("."+p.listview).children("li").children(s.conf.panelNodetype).add(e.children("."+s.conf.classNames.panel));n.length&&a(n)}})};a(t),this.trigger("initPanels:after",i)},_initPanel:function(t){this.trigger("initPanel:before",t);if(t.hasClass(p.panel))return t;if(this.__refactorClass(t,this.conf.classNames.panel,p.panel),this.__refactorClass(t,this.conf.classNames.nopanel,p.nopanel),this.__refactorClass(t,this.conf.classNames.inset,p.listview+"_inset"),t.filter("."+p.listview+"_inset").addClass(p.nopanel),t.hasClass(p.nopanel))return!1;var e=t.hasClass(this.conf.classNames.vertical)||!this.opts.slidingSubmenus;t.removeClass(this.conf.classNames.vertical);var n=t.attr("id")||this.__getUniqueId();t.is("ul, ol")&&(t.removeAttr("id"),t.wrap("
"),t=t.parent()),t.attr("id",n),t.addClass(p.panel+" "+p.hidden);var i=t.parent("li");return e?i.addClass(p.listitem+"_vertical"):t.appendTo(this.$pnls),i.length&&(i.data(o.child,t),t.data(o.parent,i)),this.trigger("initPanel:after",t),t},_initNavbar:function(t){if(this.trigger("initNavbar:before",t),!t.children("."+p.navbar).length){var e=t.data(o.parent),n=h('
'),i=this.__getPanelTitle(t,this.opts.navbar.title),s="";if(e&&e.length){if(e.hasClass(p.listitem+"_vertical"))return;if(e.parent().is("."+p.listview))var a=e.children("a, span").not("."+p.btn+"_next");else a=e.closest("."+p.panel).find('a[href="#'+t.attr("id")+'"]');var r=(e=(a=a.first()).closest("."+p.panel)).attr("id");switch(i=this.__getPanelTitle(t,h(""+a.text()+"").text()),this.opts.navbar.titleLink){case"anchor":s=a.attr("href");break;case"parent":s="#"+r}n.append('')}else if(!this.opts.navbar.title)return;this.opts.navbar.add&&t.addClass(p.panel+"_has-navbar"),n.append('"+i+"").prependTo(t),this.trigger("initNavbar:after",t)}},_initListview:function(t){this.trigger("initListview:before",t);var e=this.__childAddBack(t,"ul, ol");this.__refactorClass(e,this.conf.classNames.nolistview,p.nolistview);var n=e.not("."+p.nolistview).addClass(p.listview).children().addClass(p.listitem);this.__refactorClass(n,this.conf.classNames.selected,p.listitem+"_selected"),this.__refactorClass(n,this.conf.classNames.divider,p.listitem+"_divider"),this.__refactorClass(n,this.conf.classNames.spacer,p.listitem+"_spacer"),n.children("a, span").not("."+p.btn).addClass(p.listitem+"__text");var i=t.data(o.parent);if(i&&i.is("."+p.listitem)&&!i.children("."+p.btn).length){var s=i.children("a, span").first(),a=h('');a.insertAfter(s),s.is("span")&&(a.addClass(p.listitem+"__text").html(s.html()),s.remove())}this.trigger("initListview:after",t)},_initOpened:function(){this.trigger("initOpened:before");var t=this.$pnls.find("."+p.listitem+"_selected").removeClass(p.listitem+"_selected").last().addClass(p.listitem+"_selected"),e=t.length?t.closest("."+p.panel):this.$pnls.children("."+p.panel).first();this.openPanel(e,!1),this.trigger("initOpened:after")},_initAnchors:function(){this.trigger("initAnchors:before");var c=this;t.$body.on(a.click+"-oncanvas","a[href]",function(t){var e=h(this),n=e.attr("href"),i=c.$menu.find(e).length,s=e.is("."+p.listitem+" > a"),a=e.is('[rel="external"]')||e.is('[target="_blank"]');if(i&&1").parent())),e.addClass(s.page+" "+s.slideout).each(function(){r(this).attr("id",r(this).attr("id")||t.__getUniqueId())}),a.$page=e,this.trigger("setPage:after",e)},r[t].prototype["_initWindow_"+p]=function(){a.$wndw.off(o.keydown+"-"+p).on(o.keydown+"-"+p,function(e){if(a.$html.hasClass(s.wrapper+"_opened")&&9==e.keyCode)return e.preventDefault(),!1});var i=0;a.$wndw.off(o.resize+"-"+p).on(o.resize+"-"+p,function(e,t){if(1==a.$page.length&&(t||a.$html.hasClass(s.wrapper+"_opened"))){var n=a.$wndw.height();(t||n!=i)&&(i=n,a.$page.css("minHeight",n))}})},r[t].prototype._initBlocker=function(){var t=this,e=this.opts[p],n=this.conf[p];this.trigger("initBlocker:before"),e.blockUI&&(a.$blck||(a.$blck=r('
').append("")),a.$blck.appendTo(n.menu.insertSelector).off(o.touchstart+"-"+p+" "+o.touchmove+"-"+p).on(o.touchstart+"-"+p+" "+o.touchmove+"-"+p,function(e){e.preventDefault(),e.stopPropagation(),a.$blck.trigger(o.mousedown+"-"+p)}).off(o.mousedown+"-"+p).on(o.mousedown+"-"+p,function(e){e.preventDefault(),a.$html.hasClass(s.wrapper+"_modal")||(t.closeAllOthers(),t.close())}),this.trigger("initBlocker:after"))}}(jQuery); +!function(n){var s,o,i="mmenu",e="screenReader";n[i].addons[e]={setup:function(){var r=this,t=this.opts[e],a=this.conf[e];n[i].glbl,"boolean"==typeof t&&(t={aria:t,text:t}),"object"!=typeof t&&(t={}),(t=this.opts[e]=n.extend(!0,{},n[i].defaults[e],t)).aria&&(this.bind("initAddons:after",function(){this.bind("initMenu:after",function(){this.trigger("initMenu:after:sr-aria")}),this.bind("initNavbar:after",function(){this.trigger("initNavbar:after:sr-aria",arguments[0])}),this.bind("openPanel:start",function(){this.trigger("openPanel:start:sr-aria",arguments[0])}),this.bind("close:start",function(){this.trigger("close:start:sr-aria")}),this.bind("close:finish",function(){this.trigger("close:finish:sr-aria")}),this.bind("open:start",function(){this.trigger("open:start:sr-aria")}),this.bind("initOpened:after",function(){this.trigger("initOpened:after:sr-aria")})}),this.bind("updateListview",function(){this.$pnls.find("."+s.listview).children().each(function(){r.__sr_aria(n(this),"hidden",n(this).is("."+s.hidden))})}),this.bind("openPanel:start",function(t){var i=this.$menu.find("."+s.panel).not(t).not(t.parents("."+s.panel)),n=t.add(t.find("."+s.listitem+"_vertical ."+s.listitem+"_opened").children("."+s.panel));this.__sr_aria(i,"hidden",!0),this.__sr_aria(n,"hidden",!1)}),this.bind("closePanel",function(t){this.__sr_aria(t,"hidden",!0)}),this.bind("initPanels:after",function(t){var i=t.find("."+s.btn).each(function(){r.__sr_aria(n(this),"owns",n(this).attr("href").replace("#",""))});this.__sr_aria(i,"haspopup",!0)}),this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar);this.__sr_aria(i,"hidden",!t.hasClass(s.panel+"_has-navbar"))}),t.text&&"parent"==this.opts.navbar.titleLink&&this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar),n=!!i.children("."+s.btn+"_prev").length;this.__sr_aria(i.children("."+s.title),"hidden",n)})),t.text&&(this.bind("initAddons:after",function(){this.bind("setPage:after",function(){this.trigger("setPage:after:sr-text",arguments[0])}),this.bind("initBlocker:after",function(){this.trigger("initBlocker:after:sr-text")})}),this.bind("initNavbar:after",function(t){var i=t.children("."+s.navbar),n=this.i18n(a.text.closeSubmenu);i.children("."+s.btn+"_prev").html(this.__sr_text(n))}),this.bind("initListview:after",function(t){var i=t.data(o.parent);if(i&&i.length){var n=i.children("."+s.btn+"_next"),e=this.i18n(a.text[n.parent().is("."+s.listitem+"_vertical")?"toggleSubmenu":"openSubmenu"]);n.append(r.__sr_text(e))}}))},add:function(){s=n[i]._c,o=n[i]._d,n[i]._e,s.add("sronly")},clickAnchor:function(t,i){}},n[i].defaults[e]={aria:!0,text:!0},n[i].configuration[e]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}},n[i].prototype.__sr_aria=function(t,i,n){t.prop("aria-"+i,n)[n?"attr":"removeAttr"]("aria-"+i,n)},n[i].prototype.__sr_role=function(t,i){t.prop("role",i)[i?"attr":"removeAttr"]("role",i)},n[i].prototype.__sr_text=function(t){return''+t+""}}(jQuery); +!function(n){var e,r,s,t="mmenu",i="scrollBugFix";n[t].addons[i]={setup:function(){var o=this.opts[i];this.conf[i];s=n[t].glbl,n[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof o&&(o={fix:o}),"object"!=typeof o&&(o={}),(o=this.opts[i]=n.extend(!0,{},n[t].defaults[i],o)).fix&&(this.bind("open:start",function(){this.$pnls.children("."+e.panel+"_opened").scrollTop(0)}),this.bind("initMenu:after",function(){this["_initWindow_"+i]()})))},add:function(){e=n[t]._c,n[t]._d,r=n[t]._e},clickAnchor:function(o,t){}},n[t].defaults[i]={fix:!0},n[t].prototype["_initWindow_"+i]=function(){var o=this;n(document).off(r.touchmove+"-"+i).on(r.touchmove+"-"+i,function(o){s.$html.hasClass(e.wrapper+"_opened")&&o.preventDefault()});var t=!1;s.$body.off(r.touchstart+"-"+i).on(r.touchstart+"-"+i,"."+e.panels+"> ."+e.panel,function(o){s.$html.hasClass(e.wrapper+"_opened")&&(t||(t=!0,0===o.currentTarget.scrollTop?o.currentTarget.scrollTop=1:o.currentTarget.scrollHeight===o.currentTarget.scrollTop+o.currentTarget.offsetHeight&&(o.currentTarget.scrollTop-=1),t=!1))}).off(r.touchmove+"-"+i).on(r.touchmove+"-"+i,"."+e.panels+"> ."+e.panel,function(o){s.$html.hasClass(e.wrapper+"_opened")&&n(this)[0].scrollHeight>n(this).innerHeight()&&o.stopPropagation()}),s.$wndw.off(r.orientationchange+"-"+i).on(r.orientationchange+"-"+i,function(){o.$pnls.children("."+e.panel+"_opened").scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})}}(jQuery); \ No newline at end of file diff --git a/demo-thoitrang-1/js/scrollToFixed.js b/demo-thoitrang-1/js/scrollToFixed.js new file mode 100644 index 0000000..3c022aa --- /dev/null +++ b/demo-thoitrang-1/js/scrollToFixed.js @@ -0,0 +1 @@ +(function(a){a.isScrollToFixed=function(b){return !!a(b).data("ScrollToFixed")};a.ScrollToFixed=function(d,i){var m=this;m.$el=a(d);m.el=d;m.$el.data("ScrollToFixed",m);var c=false;var H=m.$el;var I;var F;var k;var e;var z;var E=0;var r=0;var j=-1;var f=-1;var u=null;var A;var g;function v(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");f=-1;E=H.offset().top;r=H.offset().left;if(m.options.offsets){r+=(H.offset().left-H.position().left)}if(j==-1){j=r}I=H.css("position");c=true;if(m.options.bottom!=-1){H.trigger("preFixed.ScrollToFixed");x();H.trigger("fixed.ScrollToFixed")}}function o(){var J=m.options.limit;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function q(){return I==="fixed"}function y(){return I==="absolute"}function h(){return !(q()||y())}function x(){if(!q()){var J=H[0].getBoundingClientRect();u.css({display:H.css("display"),width:J.width,height:J.height,"float":H.css("float")});cssOptions={"z-index":m.options.zIndex,position:"fixed",top:m.options.bottom==-1?t():"",bottom:m.options.bottom==-1?"":m.options.bottom,"margin-left":"0px"};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);H.addClass(m.options.baseClassName);if(m.options.className){H.addClass(m.options.className)}I="fixed"}}function b(){var K=o();var J=r;if(m.options.removeOffsets){J="";K=K-E}cssOptions={position:"absolute",top:K,left:J,"margin-left":"0px",bottom:""};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);I="absolute"}function l(){if(!h()){f=-1;u.css("display","none");H.css({"z-index":z,width:"",position:F,left:"",top:e,"margin-left":""});H.removeClass("scroll-to-fixed-fixed");if(m.options.className){H.removeClass(m.options.className)}I=null}}function w(J){if(J!=f){H.css("left",r-J);f=J}}function t(){var J=m.options.marginTop;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function B(){if(!a.isScrollToFixed(H)||H.is(":hidden")){return}var M=c;var L=h();if(!c){v()}else{if(h()){E=H.offset().top;r=H.offset().left}}var J=a(window).scrollLeft();var N=a(window).scrollTop();var K=o();if(m.options.minWidth&&a(window).width()m.options.maxWidth){if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}else{if(m.options.bottom==-1){if(K>0&&N>=K-t()){if(!L&&(!y()||!M)){p();H.trigger("preAbsolute.ScrollToFixed");b();H.trigger("unfixed.ScrollToFixed")}}else{if(N>=E-t()){if(!q()||!M){p();H.trigger("preFixed.ScrollToFixed");x();f=-1;H.trigger("fixed.ScrollToFixed")}w(J)}else{if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}}}else{if(K>0){if(N+a(window).height()-H.outerHeight(true)>=K-(t()||-n())){if(q()){p();H.trigger("preUnfixed.ScrollToFixed");if(F==="absolute"){b()}else{l()}H.trigger("unfixed.ScrollToFixed")}}else{if(!q()){p();H.trigger("preFixed.ScrollToFixed");x()}w(J);H.trigger("fixed.ScrollToFixed")}}else{w(J)}}}}}function n(){if(!m.options.bottom){return 0}return m.options.bottom}function p(){var J=H.css("position");if(J=="absolute"){H.trigger("postAbsolute.ScrollToFixed")}else{if(J=="fixed"){H.trigger("postFixed.ScrollToFixed")}else{H.trigger("postUnfixed.ScrollToFixed")}}}var D=function(J){if(H.is(":visible")){c=false;B()}};var G=function(J){(!!window.requestAnimationFrame)?requestAnimationFrame(B):B()};var C=function(){var K=document.body;if(document.createElement&&K&&K.appendChild&&K.removeChild){var M=document.createElement("div");if(!M.getBoundingClientRect){return null}M.innerHTML="x";M.style.cssText="position:fixed;top:100px;";K.appendChild(M);var N=K.style.height,O=K.scrollTop;K.style.height="3000px";K.scrollTop=500;var J=M.getBoundingClientRect().top;K.style.height=N;var L=(J===100);K.removeChild(M);K.scrollTop=O;return L}return null};var s=function(J){J=J||window.event;if(J.preventDefault){J.preventDefault()}J.returnValue=false};m.init=function(){m.options=a.extend({},a.ScrollToFixed.defaultOptions,i);z=H.css("z-index");m.$el.css("z-index",m.options.zIndex);u=a("
");I=H.css("position");F=H.css("position");k=H.css("float");e=H.css("top");if(h()){m.$el.after(u)}a(window).bind("resize.ScrollToFixed",D);a(window).bind("scroll.ScrollToFixed",G);if("ontouchmove" in window){a(window).bind("touchmove.ScrollToFixed",B)}if(m.options.preFixed){H.bind("preFixed.ScrollToFixed",m.options.preFixed)}if(m.options.postFixed){H.bind("postFixed.ScrollToFixed",m.options.postFixed)}if(m.options.preUnfixed){H.bind("preUnfixed.ScrollToFixed",m.options.preUnfixed)}if(m.options.postUnfixed){H.bind("postUnfixed.ScrollToFixed",m.options.postUnfixed)}if(m.options.preAbsolute){H.bind("preAbsolute.ScrollToFixed",m.options.preAbsolute)}if(m.options.postAbsolute){H.bind("postAbsolute.ScrollToFixed",m.options.postAbsolute)}if(m.options.fixed){H.bind("fixed.ScrollToFixed",m.options.fixed)}if(m.options.unfixed){H.bind("unfixed.ScrollToFixed",m.options.unfixed)}if(m.options.spacerClass){u.addClass(m.options.spacerClass)}H.bind("resize.ScrollToFixed",function(){u.height(H.height())});H.bind("scroll.ScrollToFixed",function(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");B()});H.bind("detach.ScrollToFixed",function(J){s(J);H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");a(window).unbind("resize.ScrollToFixed",D);a(window).unbind("scroll.ScrollToFixed",G);H.unbind(".ScrollToFixed");u.remove();m.$el.removeData("ScrollToFixed")});D()};m.init()};a.ScrollToFixed.defaultOptions={marginTop:0,limit:0,bottom:-1,zIndex:1000,baseClassName:"scroll-to-fixed-fixed"};a.fn.scrollToFixed=function(b){return this.each(function(){(new a.ScrollToFixed(this,b))})}})(jQuery); \ No newline at end of file diff --git a/demo-thoitrang-1/js/slick.js b/demo-thoitrang-1/js/slick.js new file mode 100644 index 0000000..3d40881 --- /dev/null +++ b/demo-thoitrang-1/js/slick.js @@ -0,0 +1,231 @@ +!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('