YITH WooCommerce Zoom Magnifier - Version 1.3.8

Version Description

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Zoom Magnifier
Version 1.3.8
Comparing to
See all releases

Code changes from version 1.3.7 to 1.3.8

README.txt CHANGED
@@ -1,183 +1,188 @@
1
- === YITH WooCommerce Zoom Magnifier ===
2
-
3
- Contributors: yithemes
4
- Tags: zoom, magnifier, slider, carousel, woocommerce
5
- Requires at least: 4.0
6
- Tested up to: 5.0.2
7
- Stable tag: 1.3.7
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
- Documentation: https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/
11
-
12
- YITH WooCommerce Zoom Magnifier add zoom effect to product images and a customizable image slider.
13
-
14
- == Description ==
15
-
16
- = Improve the user experience, improve your sales =
17
-
18
- Offer to your visitors a chance to inspect in detail the quality of your products. With YITH WooCommerce Zoom Magnifier you can add a zoom effect to all your product images.
19
- The Wordpress plugin also adds a slider below the featured image with your product gallery images.
20
-
21
- = Main features =
22
-
23
- * Show a bigger size product image on mouseover.
24
- * Customize zoom area width and height and the size of the image to show as zoomed image.
25
- * Enable or disable it on mobile devices.
26
- * Add a slider showing product image thumbnails.
27
- * Customize the slider behavior.
28
-
29
- For a more detailed list of options and features of the plugin, please look at the [official documentation](https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/ "Yith WooCommerce Zoom Magnifier official documentation").
30
-
31
- Discover all the features of the plugin and install it in your theme: the result will be extremely satisfying.
32
-
33
- == Installation ==
34
- Important: First of all, you have to download and activate WooCommerce plugin, which is mandatory for Yith WooCommerce Zoom Magnifier to be working.
35
-
36
- 1. Unzip the downloaded zip file.
37
- 2. Upload the plugin folder into the `wp-content/plugins/` directory of your WordPress site.
38
- 3. Activate `YITH WooCommerce Zoom Magnifier` from Plugins page
39
-
40
- = Configuration =
41
-
42
- YITH WooCommerce Zoom Magnifier will add a new tab called "Zoom Magnifier" in "YIT Plugins" menu item. There, you will find all Yithemes plugins with quick access to plugin setting page.
43
-
44
- == Screenshots ==
45
-
46
- 1. The General plugin settings page. You can disable the plugin for mobile devices.
47
- 2. The Magnifier settings page. Choose the size of the zoom area, the size of the image to be shown in zoom area and the its position (on the right or over the image).
48
- 3. The slider settings page. You can choose to use the slider for product image thumbnails, set how many images to show within the slider, and the behavior of the slider, choosing if circular, infinite or standard carousel.
49
- 4. The zoom applied to a product image, showing zoomed image on the right side.
50
- 5. The zoom applied to a product image, showing zoomed image over the same image.
51
- 6. Choose how many items the slider should show, the image thumbnails will fit the available width.
52
-
53
- == Changelog ==
54
-
55
- = Version 1.3.7 - Released: Dec 24, 2018 =
56
-
57
- * Update: plugin framework
58
- * Fix: Undefined variable "block_args"
59
-
60
- = Version 1.3.6 - Released: Dec 12, 2018 =
61
-
62
- * New: Support to WordPress 5.0
63
- * Update: plugin framework version 3.1.10
64
-
65
- = Version 1.3.5 - Released: Oct 23, 2018 =
66
-
67
- * New: Support to WooCommerce 3.5.0
68
- * Update: plugin framework
69
- * Update: plugin description
70
- * Update: plugin links
71
- * Dev: extra class if featured audio plugin is enabled
72
-
73
- = Version 1.3.4 - Released: June 26, 2018 =
74
-
75
- * Fix: click thumbnails and zoom them
76
-
77
- = Version 1.3.3 - Released: June 22, 2018 =
78
-
79
- * Update: documentation link
80
- * Fix: choosing variation
81
- * Dev: include 'wp-admin/includes/plugin.php'
82
-
83
- = Version 1.3.2 - Released: Mar 06, 2018 =
84
-
85
- * New: support to WooCommerce 3.3.3
86
- * Update: plugin framework 3.0.13
87
- * Fix: Wrong documentation link.
88
- * Fix: Remove old plugin framework.
89
-
90
- = Version 1.3.1 - Released: Feb 07, 2018 =
91
-
92
- * New: support to WooCommerce 3.3.1
93
- * New: support to WordPress 4.9.4
94
- * Update: plugin framework 3.0.12
95
-
96
- = Version 1.3.0 - Released: Dec 11, 2017 =
97
-
98
- * Update: YITH Plugin Framework to version 3.0
99
- * New: support for WooCommerce 3.2.3
100
- * New: tested up to WordPress 4.9
101
-
102
- = Version 1.2.30 - Released: Aug 11, 2017 =
103
-
104
- * New: support for WooCommerce 3.1.
105
- * New: tested up to WordPress 4.8.
106
- * Update: YITH Plugin Framework.
107
-
108
- = Version 1.2.29 - Released: Apr 30, 2017 =
109
-
110
- * Update: YITH Plugin Framework.
111
- * Tweak: tested up to WordPress 4.7.4.
112
- * Tweak: changed plugin tags.
113
-
114
- = Version 1.2.28 - Released: Apr 06, 2017 =
115
-
116
- * Fix: Javascript error when a product variation do not have its own image set.
117
-
118
- = Version 1.2.27 - Released: Apr 05, 2017 =
119
-
120
- * Fix: Variation images not shown properly.
121
-
122
- = Version 1.2.26 - Released: Mar 28, 2017 =
123
-
124
- * Fix: YITH Plugin Framework initialization that prevents the plugin update.
125
-
126
- = Version 1.2.25 - Released: Mar 08, 2017 =
127
-
128
- * Fix: removed unused class.yith-wcmg.php file
129
- * Fix: removed hook 'admin_print_footer_scripts' in class.yith-wcmg-admin.php
130
-
131
- = Version 1.2.24 - Released: Mar 06, 2017 =
132
-
133
- * New: Support to WooCommerce 2.7.0-RC1
134
- * Update: YITH Plugin Framework
135
-
136
- = Version 1.2.23 - Released: Jan 16, 2017 =
137
-
138
- * New: WordPress 4.7 ready
139
-
140
- = Version 1.2.22 - Released: Nov 08, 2016 =
141
-
142
- * Updated: Compatibility to WordPress up to 4.6.x
143
- * Updated: YITH Plugin-fw
144
-
145
- = Version 1.2.21 - Released: Aug 09, 2016 =
146
-
147
- * Fixed: Javascript error on property 'msie'
148
-
149
- = Version 1.2.20 - Released: Jun 13, 2016 =
150
-
151
- * Added: spanish localization
152
- * Updated: WooCommerce 2.6 100% compatible
153
-
154
- = Version 1.2.19 - Released: May 04, 2016 =
155
-
156
- * Fixed: missing YITH Plugin FW files
157
-
158
- == Suggestions ==
159
-
160
- If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
161
-
162
- == Translators ==
163
-
164
- = Available Languages =
165
- * English (Default)
166
- * Italian
167
- * Spanish
168
-
169
- If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
170
- [use](https://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
171
-
172
- == Documentation ==
173
-
174
- Full documentation is available [here](https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/).
175
-
176
- == Upgrade notice ==
177
-
178
- = Version 1.3.2 - Released: Mar 06, 2018 =
179
-
180
- * New: support to WooCommerce 3.3.3
181
- * Update: plugin framework 3.0.13
182
- * Fix: Wrong documentation link.
 
 
 
 
 
183
  * Fix: Remove old plugin framework.
1
+ === YITH WooCommerce Zoom Magnifier ===
2
+
3
+ Contributors: yithemes
4
+ Tags: zoom, magnifier, slider, carousel, woocommerce
5
+ Requires at least: 4.0
6
+ Tested up to: 5.1.0
7
+ Stable tag: 1.3.8
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+ Documentation: https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/
11
+
12
+ YITH WooCommerce Zoom Magnifier add zoom effect to product images and a customizable image slider.
13
+
14
+ == Description ==
15
+
16
+ = Improve the user experience, improve your sales =
17
+
18
+ Offer to your visitors a chance to inspect in detail the quality of your products. With YITH WooCommerce Zoom Magnifier you can add a zoom effect to all your product images.
19
+ The Wordpress plugin also adds a slider below the featured image with your product gallery images.
20
+
21
+ = Main features =
22
+
23
+ * Show a bigger size product image on mouseover.
24
+ * Customize zoom area width and height and the size of the image to show as zoomed image.
25
+ * Enable or disable it on mobile devices.
26
+ * Add a slider showing product image thumbnails.
27
+ * Customize the slider behavior.
28
+
29
+ For a more detailed list of options and features of the plugin, please look at the [official documentation](https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/ "Yith WooCommerce Zoom Magnifier official documentation").
30
+
31
+ Discover all the features of the plugin and install it in your theme: the result will be extremely satisfying.
32
+
33
+ == Installation ==
34
+ Important: First of all, you have to download and activate WooCommerce plugin, which is mandatory for Yith WooCommerce Zoom Magnifier to be working.
35
+
36
+ 1. Unzip the downloaded zip file.
37
+ 2. Upload the plugin folder into the `wp-content/plugins/` directory of your WordPress site.
38
+ 3. Activate `YITH WooCommerce Zoom Magnifier` from Plugins page
39
+
40
+ = Configuration =
41
+
42
+ YITH WooCommerce Zoom Magnifier will add a new tab called "Zoom Magnifier" in "YIT Plugins" menu item. There, you will find all Yithemes plugins with quick access to plugin setting page.
43
+
44
+ == Screenshots ==
45
+
46
+ 1. The General plugin settings page. You can disable the plugin for mobile devices.
47
+ 2. The Magnifier settings page. Choose the size of the zoom area, the size of the image to be shown in zoom area and the its position (on the right or over the image).
48
+ 3. The slider settings page. You can choose to use the slider for product image thumbnails, set how many images to show within the slider, and the behavior of the slider, choosing if circular, infinite or standard carousel.
49
+ 4. The zoom applied to a product image, showing zoomed image on the right side.
50
+ 5. The zoom applied to a product image, showing zoomed image over the same image.
51
+ 6. Choose how many items the slider should show, the image thumbnails will fit the available width.
52
+
53
+ == Changelog ==
54
+
55
+ = Version 1.3.8 - Released: Feb 28, 2018 =
56
+
57
+ * Update: plugin framework
58
+ * Fix: Undefined variable "block_args"
59
+
60
+ = Version 1.3.7 - Released: Dec 24, 2018 =
61
+
62
+ * Update: plugin framework
63
+ * Fix: Undefined variable "block_args"
64
+
65
+ = Version 1.3.6 - Released: Dec 12, 2018 =
66
+
67
+ * New: Support to WordPress 5.0
68
+ * Update: plugin framework version 3.1.10
69
+
70
+ = Version 1.3.5 - Released: Oct 23, 2018 =
71
+
72
+ * New: Support to WooCommerce 3.5.0
73
+ * Update: plugin framework
74
+ * Update: plugin description
75
+ * Update: plugin links
76
+ * Dev: extra class if featured audio plugin is enabled
77
+
78
+ = Version 1.3.4 - Released: June 26, 2018 =
79
+
80
+ * Fix: click thumbnails and zoom them
81
+
82
+ = Version 1.3.3 - Released: June 22, 2018 =
83
+
84
+ * Update: documentation link
85
+ * Fix: choosing variation
86
+ * Dev: include 'wp-admin/includes/plugin.php'
87
+
88
+ = Version 1.3.2 - Released: Mar 06, 2018 =
89
+
90
+ * New: support to WooCommerce 3.3.3
91
+ * Update: plugin framework 3.0.13
92
+ * Fix: Wrong documentation link.
93
+ * Fix: Remove old plugin framework.
94
+
95
+ = Version 1.3.1 - Released: Feb 07, 2018 =
96
+
97
+ * New: support to WooCommerce 3.3.1
98
+ * New: support to WordPress 4.9.4
99
+ * Update: plugin framework 3.0.12
100
+
101
+ = Version 1.3.0 - Released: Dec 11, 2017 =
102
+
103
+ * Update: YITH Plugin Framework to version 3.0
104
+ * New: support for WooCommerce 3.2.3
105
+ * New: tested up to WordPress 4.9
106
+
107
+ = Version 1.2.30 - Released: Aug 11, 2017 =
108
+
109
+ * New: support for WooCommerce 3.1.
110
+ * New: tested up to WordPress 4.8.
111
+ * Update: YITH Plugin Framework.
112
+
113
+ = Version 1.2.29 - Released: Apr 30, 2017 =
114
+
115
+ * Update: YITH Plugin Framework.
116
+ * Tweak: tested up to WordPress 4.7.4.
117
+ * Tweak: changed plugin tags.
118
+
119
+ = Version 1.2.28 - Released: Apr 06, 2017 =
120
+
121
+ * Fix: Javascript error when a product variation do not have its own image set.
122
+
123
+ = Version 1.2.27 - Released: Apr 05, 2017 =
124
+
125
+ * Fix: Variation images not shown properly.
126
+
127
+ = Version 1.2.26 - Released: Mar 28, 2017 =
128
+
129
+ * Fix: YITH Plugin Framework initialization that prevents the plugin update.
130
+
131
+ = Version 1.2.25 - Released: Mar 08, 2017 =
132
+
133
+ * Fix: removed unused class.yith-wcmg.php file
134
+ * Fix: removed hook 'admin_print_footer_scripts' in class.yith-wcmg-admin.php
135
+
136
+ = Version 1.2.24 - Released: Mar 06, 2017 =
137
+
138
+ * New: Support to WooCommerce 2.7.0-RC1
139
+ * Update: YITH Plugin Framework
140
+
141
+ = Version 1.2.23 - Released: Jan 16, 2017 =
142
+
143
+ * New: WordPress 4.7 ready
144
+
145
+ = Version 1.2.22 - Released: Nov 08, 2016 =
146
+
147
+ * Updated: Compatibility to WordPress up to 4.6.x
148
+ * Updated: YITH Plugin-fw
149
+
150
+ = Version 1.2.21 - Released: Aug 09, 2016 =
151
+
152
+ * Fixed: Javascript error on property 'msie'
153
+
154
+ = Version 1.2.20 - Released: Jun 13, 2016 =
155
+
156
+ * Added: spanish localization
157
+ * Updated: WooCommerce 2.6 100% compatible
158
+
159
+ = Version 1.2.19 - Released: May 04, 2016 =
160
+
161
+ * Fixed: missing YITH Plugin FW files
162
+
163
+ == Suggestions ==
164
+
165
+ If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
166
+
167
+ == Translators ==
168
+
169
+ = Available Languages =
170
+ * English (Default)
171
+ * Italian
172
+ * Spanish
173
+
174
+ If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
175
+ [use](https://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
176
+
177
+ == Documentation ==
178
+
179
+ Full documentation is available [here](https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/).
180
+
181
+ == Upgrade notice ==
182
+
183
+ = Version 1.3.2 - Released: Mar 06, 2018 =
184
+
185
+ * New: support to WooCommerce 3.3.3
186
+ * Update: plugin framework 3.0.13
187
+ * Fix: Wrong documentation link.
188
  * Fix: Remove old plugin framework.
assets/css/admin.css CHANGED
@@ -1,20 +1,20 @@
1
- .yith_woocommerce_slider {
2
- width: 300px;
3
- float: left
4
- }
5
- .yith_woocommerce_slider_value {
6
- margin-top: -5px;
7
- margin-left: 10px;
8
- width: 50px;
9
- float: left;
10
- text-align: center;
11
- font-weight: bold;
12
- }
13
-
14
- .yith_banner {
15
- margin-top: 10px;
16
- }
17
-
18
- #eg-wrap .select_fake {/* solve back-end conflict with Essential Grid */
19
- height: 24px;
20
  }
1
+ .yith_woocommerce_slider {
2
+ width: 300px;
3
+ float: left
4
+ }
5
+ .yith_woocommerce_slider_value {
6
+ margin-top: -5px;
7
+ margin-left: 10px;
8
+ width: 50px;
9
+ float: left;
10
+ text-align: center;
11
+ font-weight: bold;
12
+ }
13
+
14
+ .yith_banner {
15
+ margin-top: 10px;
16
+ }
17
+
18
+ #eg-wrap .select_fake {/* solve back-end conflict with Essential Grid */
19
+ height: 24px;
20
  }
assets/css/frontend.css CHANGED
@@ -1,65 +1,65 @@
1
- /* gallery */
2
- .yith_magnifier_gallery {
3
- margin: 0;
4
- padding: 0;
5
- }
6
-
7
- .yith_magnifier_gallery li {
8
- position: relative;
9
- float: left;
10
- display: block;
11
- }
12
-
13
- .yith_magnifier_gallery li.last {
14
- margin-right: 0;
15
- }
16
-
17
- .yith_magnifier_gallery li a {
18
- width: 100% !important;
19
- display: block;
20
- margin-top: 10px;
21
- height: auto !important;
22
- }
23
-
24
- /* next/prev */
25
- .single-product.woocommerce .thumbnails {
26
- position: relative;
27
- }
28
-
29
- .single-product.woocommerce .thumbnails #slider-prev,
30
- .single-product.woocommerce .thumbnails #slider-next {
31
- display: none !important;
32
- cursor: pointer;
33
- width: 27px;
34
- height: 26px;
35
- background: url('../images/slider-arrow.png') no-repeat left center;
36
- position: absolute;
37
- top: 48%;
38
- margin-top: -2px;
39
- }
40
-
41
- .single-product.woocommerce .thumbnails #slider-prev {
42
- background-position: left center;
43
- left: 0px;
44
- }
45
-
46
- .single-product.woocommerce .thumbnails #slider-next {
47
- background-position: right center;
48
- right: 0px;
49
- }
50
-
51
- .single-product.woocommerce .thumbnails:hover #slider-prev,
52
- .single-product.woocommerce .thumbnails:hover #slider-next {
53
- display: block !important;
54
- }
55
-
56
- span.onsale {
57
- z-index: 10000
58
- }
59
-
60
- div.pp_woocommerce a.pp_expand {
61
- display: inline;
62
- bottom: 10px;
63
- top: initial;
64
- left: 10px;
65
  }
1
+ /* gallery */
2
+ .yith_magnifier_gallery {
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+
7
+ .yith_magnifier_gallery li {
8
+ position: relative;
9
+ float: left;
10
+ display: block;
11
+ }
12
+
13
+ .yith_magnifier_gallery li.last {
14
+ margin-right: 0;
15
+ }
16
+
17
+ .yith_magnifier_gallery li a {
18
+ width: 100% !important;
19
+ display: block;
20
+ margin-top: 10px;
21
+ height: auto !important;
22
+ }
23
+
24
+ /* next/prev */
25
+ .single-product.woocommerce .thumbnails {
26
+ position: relative;
27
+ }
28
+
29
+ .single-product.woocommerce .thumbnails #slider-prev,
30
+ .single-product.woocommerce .thumbnails #slider-next {
31
+ display: none !important;
32
+ cursor: pointer;
33
+ width: 27px;
34
+ height: 26px;
35
+ background: url('../images/slider-arrow.png') no-repeat left center;
36
+ position: absolute;
37
+ top: 48%;
38
+ margin-top: -2px;
39
+ }
40
+
41
+ .single-product.woocommerce .thumbnails #slider-prev {
42
+ background-position: left center;
43
+ left: 0px;
44
+ }
45
+
46
+ .single-product.woocommerce .thumbnails #slider-next {
47
+ background-position: right center;
48
+ right: 0px;
49
+ }
50
+
51
+ .single-product.woocommerce .thumbnails:hover #slider-prev,
52
+ .single-product.woocommerce .thumbnails:hover #slider-next {
53
+ display: block !important;
54
+ }
55
+
56
+ span.onsale {
57
+ z-index: 10000
58
+ }
59
+
60
+ div.pp_woocommerce a.pp_expand {
61
+ display: inline;
62
+ bottom: 10px;
63
+ top: initial;
64
+ left: 10px;
65
  }
assets/css/yith_magnifier.css CHANGED
@@ -1,70 +1,70 @@
1
- .yith_magnifier_zoom_wrap {
2
- top: 0;
3
- position: relative;
4
- }
5
-
6
- .yith_magnifier_loading {
7
- color:white;
8
- background:#222;
9
- padding:3px;
10
- border:1px solid #000;
11
- position: absolute;
12
- text-align: center;
13
- top: 10%;
14
- z-index: 9999;
15
- }
16
-
17
- .yith_magnifier_zoom {
18
- position: relative;
19
- display: block;
20
- }
21
-
22
- .yith_magnifier_zoom img {
23
- display: block;
24
- }
25
-
26
- .yith_magnifier_mousetrap {
27
- z-index: 999;
28
- position: absolute;
29
- width: 0px;
30
- height :0px;
31
- left: 0;
32
- top: 0;
33
- }
34
-
35
- /* ie fix */
36
- .ie .yith_magnifier_mousetrap {
37
- background-image: url(".");
38
- }
39
-
40
- .yith_magnifier_lens {
41
- display: none;
42
- z-index:98;
43
- position:absolute;
44
- overflow: hidden;
45
-
46
- border: 1px solid #ccc;
47
- }
48
-
49
- .yith_magnifier_lens img {
50
- width: auto !important;
51
- max-width: none !important;
52
-
53
- -webkit-transition: all ease-in-out 0s !important;
54
- -moz-transition: all ease-in-out 0s !important;
55
- -o-transition: all ease-in-out 0s !important;
56
- transition: all ease-in-out 0s !important;
57
- }
58
-
59
- .yith_magnifier_zoom_magnifier {
60
- display:none;
61
- position:absolute;
62
- z-index: 99;
63
-
64
- border:4px solid #ccc;
65
- overflow:hidden;
66
- }
67
-
68
- .yith_magnifier_gallery {
69
- list-style: none;
70
- }
1
+ .yith_magnifier_zoom_wrap {
2
+ top: 0;
3
+ position: relative;
4
+ }
5
+
6
+ .yith_magnifier_loading {
7
+ color:white;
8
+ background:#222;
9
+ padding:3px;
10
+ border:1px solid #000;
11
+ position: absolute;
12
+ text-align: center;
13
+ top: 10%;
14
+ z-index: 9999;
15
+ }
16
+
17
+ .yith_magnifier_zoom {
18
+ position: relative;
19
+ display: block;
20
+ }
21
+
22
+ .yith_magnifier_zoom img {
23
+ display: block;
24
+ }
25
+
26
+ .yith_magnifier_mousetrap {
27
+ z-index: 999;
28
+ position: absolute;
29
+ width: 0px;
30
+ height :0px;
31
+ left: 0;
32
+ top: 0;
33
+ }
34
+
35
+ /* ie fix */
36
+ .ie .yith_magnifier_mousetrap {
37
+ background-image: url(".");
38
+ }
39
+
40
+ .yith_magnifier_lens {
41
+ display: none;
42
+ z-index:98;
43
+ position:absolute;
44
+ overflow: hidden;
45
+
46
+ border: 1px solid #ccc;
47
+ }
48
+
49
+ .yith_magnifier_lens img {
50
+ width: auto !important;
51
+ max-width: none !important;
52
+
53
+ -webkit-transition: all ease-in-out 0s !important;
54
+ -moz-transition: all ease-in-out 0s !important;
55
+ -o-transition: all ease-in-out 0s !important;
56
+ transition: all ease-in-out 0s !important;
57
+ }
58
+
59
+ .yith_magnifier_zoom_magnifier {
60
+ display:none;
61
+ position:absolute;
62
+ z-index: 99;
63
+
64
+ border:4px solid #ccc;
65
+ overflow:hidden;
66
+ }
67
+
68
+ .yith_magnifier_gallery {
69
+ list-style: none;
70
+ }
assets/js/jquery.carouFredSel.js CHANGED
@@ -1,4254 +1,4254 @@
1
- /*
2
- * jQuery carouFredSel 6.2.1
3
- * Demo's and documentation:
4
- * caroufredsel.dev7studios.com
5
- *
6
- * Copyright (c) 2013 Fred Heusschen
7
- * www.frebsite.nl
8
- *
9
- * Dual licensed under the MIT and GPL licenses.
10
- * http://en.wikipedia.org/wiki/MIT_License
11
- * http://en.wikipedia.org/wiki/GNU_General_Public_License
12
- */
13
-
14
-
15
- (function($) {
16
-
17
-
18
- // LOCAL
19
-
20
- if ( $.fn.carouFredSel )
21
- {
22
- return;
23
- }
24
-
25
- $.fn.caroufredsel = $.fn.carouFredSel = function(options, configs)
26
- {
27
-
28
- // no element
29
- if (this.length == 0)
30
- {
31
- debug( true, 'No element found for "' + this.selector + '".' );
32
- return this;
33
- }
34
-
35
- // multiple elements
36
- if (this.length > 1)
37
- {
38
- return this.each(function() {
39
- $(this).carouFredSel(options, configs);
40
- });
41
- }
42
-
43
-
44
- var $cfs = this,
45
- $tt0 = this[0],
46
- starting_position = false;
47
-
48
- if ($cfs.data('_cfs_isCarousel'))
49
- {
50
- starting_position = $cfs.triggerHandler('_cfs_triggerEvent', 'currentPosition');
51
- $cfs.trigger('_cfs_triggerEvent', ['destroy', true]);
52
- }
53
-
54
- var FN = {};
55
-
56
- FN._init = function(o, setOrig, start)
57
- {
58
- o = go_getObject($tt0, o);
59
-
60
- o.items = go_getItemsObject($tt0, o.items);
61
- o.scroll = go_getScrollObject($tt0, o.scroll);
62
- o.auto = go_getAutoObject($tt0, o.auto);
63
- o.prev = go_getPrevNextObject($tt0, o.prev);
64
- o.next = go_getPrevNextObject($tt0, o.next);
65
- o.pagination = go_getPaginationObject($tt0, o.pagination);
66
- o.swipe = go_getSwipeObject($tt0, o.swipe);
67
- o.mousewheel = go_getMousewheelObject($tt0, o.mousewheel);
68
-
69
- if (setOrig)
70
- {
71
- opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
72
- }
73
-
74
- opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
75
- opts.d = cf_getDimensions(opts);
76
-
77
- crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev';
78
-
79
- var a_itm = $cfs.children(),
80
- avail_primary = ms_getParentSize($wrp, opts, 'width');
81
-
82
- if (is_true(opts.cookie))
83
- {
84
- opts.cookie = 'caroufredsel_cookie_' + conf.serialNumber;
85
- }
86
-
87
- opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
88
-
89
- // complement items and sizes
90
- opts.items = in_complementItems(opts.items, opts, a_itm, start);
91
- opts[opts.d['width']] = in_complementPrimarySize(opts[opts.d['width']], opts, a_itm);
92
- opts[opts.d['height']] = in_complementSecondarySize(opts[opts.d['height']], opts, a_itm);
93
-
94
- // primary size not set for a responsive carousel
95
- if (opts.responsive)
96
- {
97
- if (!is_percentage(opts[opts.d['width']]))
98
- {
99
- opts[opts.d['width']] = '100%';
100
- }
101
- }
102
-
103
- // primary size is percentage
104
- if (is_percentage(opts[opts.d['width']]))
105
- {
106
- crsl.upDateOnWindowResize = true;
107
- crsl.primarySizePercentage = opts[opts.d['width']];
108
- opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
109
- if (!opts.items.visible)
110
- {
111
- opts.items.visibleConf.variable = true;
112
- }
113
- }
114
-
115
- if (opts.responsive)
116
- {
117
- opts.usePadding = false;
118
- opts.padding = [0, 0, 0, 0];
119
- opts.align = false;
120
- opts.items.visibleConf.variable = false;
121
- }
122
- else
123
- {
124
- // visible-items not set
125
- if (!opts.items.visible)
126
- {
127
- opts = in_complementVisibleItems(opts, avail_primary);
128
- }
129
-
130
- // primary size not set -> calculate it or set to "variable"
131
- if (!opts[opts.d['width']])
132
- {
133
- if (!opts.items.visibleConf.variable && is_number(opts.items[opts.d['width']]) && opts.items.filter == '*')
134
- {
135
- opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
136
- opts.align = false;
137
- }
138
- else
139
- {
140
- opts[opts.d['width']] = 'variable';
141
- }
142
- }
143
- // align not set -> set to center if primary size is number
144
- if (is_undefined(opts.align))
145
- {
146
- opts.align = (is_number(opts[opts.d['width']]))
147
- ? 'center'
148
- : false;
149
- }
150
- // set variabe visible-items
151
- if (opts.items.visibleConf.variable)
152
- {
153
- opts.items.visible = gn_getVisibleItemsNext(a_itm, opts, 0);
154
- }
155
- }
156
-
157
- // set visible items by filter
158
- if (opts.items.filter != '*' && !opts.items.visibleConf.variable)
159
- {
160
- opts.items.visibleConf.org = opts.items.visible;
161
- opts.items.visible = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
162
- }
163
-
164
- opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0);
165
- opts.items.visibleConf.old = opts.items.visible;
166
-
167
- if (opts.responsive)
168
- {
169
- if (!opts.items.visibleConf.min)
170
- {
171
- opts.items.visibleConf.min = opts.items.visible;
172
- }
173
- if (!opts.items.visibleConf.max)
174
- {
175
- opts.items.visibleConf.max = opts.items.visible;
176
- }
177
- opts = in_getResponsiveValues(opts, a_itm, avail_primary);
178
- }
179
- else
180
- {
181
- opts.padding = cf_getPadding(opts.padding);
182
-
183
- if (opts.align == 'top')
184
- {
185
- opts.align = 'left';
186
- }
187
- else if (opts.align == 'bottom')
188
- {
189
- opts.align = 'right';
190
- }
191
-
192
- switch (opts.align)
193
- {
194
- // align: center, left or right
195
- case 'center':
196
- case 'left':
197
- case 'right':
198
- if (opts[opts.d['width']] != 'variable')
199
- {
200
- opts = in_getAlignPadding(opts, a_itm);
201
- opts.usePadding = true;
202
- }
203
- break;
204
-
205
- // padding
206
- default:
207
- opts.align = false;
208
- opts.usePadding = (
209
- opts.padding[0] == 0 &&
210
- opts.padding[1] == 0 &&
211
- opts.padding[2] == 0 &&
212
- opts.padding[3] == 0
213
- ) ? false : true;
214
- break;
215
- }
216
- }
217
-
218
- if (!is_number(opts.scroll.duration))
219
- {
220
- opts.scroll.duration = 500;
221
- }
222
- if (is_undefined(opts.scroll.items))
223
- {
224
- opts.scroll.items = (opts.responsive || opts.items.visibleConf.variable || opts.items.filter != '*')
225
- ? 'visible'
226
- : opts.items.visible;
227
- }
228
-
229
- opts.auto = $.extend(true, {}, opts.scroll, opts.auto);
230
- opts.prev = $.extend(true, {}, opts.scroll, opts.prev);
231
- opts.next = $.extend(true, {}, opts.scroll, opts.next);
232
- opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination);
233
- // swipe and mousewheel extend later on, per direction
234
-
235
- opts.auto = go_complementAutoObject($tt0, opts.auto);
236
- opts.prev = go_complementPrevNextObject($tt0, opts.prev);
237
- opts.next = go_complementPrevNextObject($tt0, opts.next);
238
- opts.pagination = go_complementPaginationObject($tt0, opts.pagination);
239
- opts.swipe = go_complementSwipeObject($tt0, opts.swipe);
240
- opts.mousewheel = go_complementMousewheelObject($tt0, opts.mousewheel);
241
-
242
- if (opts.synchronise)
243
- {
244
- opts.synchronise = cf_getSynchArr(opts.synchronise);
245
- }
246
-
247
-
248
- // DEPRECATED
249
- if (opts.auto.onPauseStart)
250
- {
251
- opts.auto.onTimeoutStart = opts.auto.onPauseStart;
252
- deprecated('auto.onPauseStart', 'auto.onTimeoutStart');
253
- }
254
- if (opts.auto.onPausePause)
255
- {
256
- opts.auto.onTimeoutPause = opts.auto.onPausePause;
257
- deprecated('auto.onPausePause', 'auto.onTimeoutPause');
258
- }
259
- if (opts.auto.onPauseEnd)
260
- {
261
- opts.auto.onTimeoutEnd = opts.auto.onPauseEnd;
262
- deprecated('auto.onPauseEnd', 'auto.onTimeoutEnd');
263
- }
264
- if (opts.auto.pauseDuration)
265
- {
266
- opts.auto.timeoutDuration = opts.auto.pauseDuration;
267
- deprecated('auto.pauseDuration', 'auto.timeoutDuration');
268
- }
269
- // /DEPRECATED
270
-
271
-
272
- }; // /init
273
-
274
-
275
- FN._build = function() {
276
- $cfs.data('_cfs_isCarousel', true);
277
-
278
- var a_itm = $cfs.children(),
279
- orgCSS = in_mapCss($cfs, ['textAlign', 'float', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'width', 'height', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft']),
280
- newPosition = 'relative';
281
-
282
- switch (orgCSS.position)
283
- {
284
- case 'absolute':
285
- case 'fixed':
286
- newPosition = orgCSS.position;
287
- break;
288
- }
289
-
290
- if (conf.wrapper == 'parent')
291
- {
292
- sz_storeOrigCss($wrp);
293
- }
294
- else
295
- {
296
- $wrp.css(orgCSS);
297
- }
298
- $wrp.css({
299
- 'overflow' : 'hidden',
300
- 'position' : newPosition
301
- });
302
-
303
- sz_storeOrigCss($cfs);
304
- $cfs.data('_cfs_origCssZindex', orgCSS.zIndex);
305
- $cfs.css({
306
- 'textAlign' : 'left',
307
- 'float' : 'none',
308
- 'position' : 'absolute',
309
- 'top' : 0,
310
- 'right' : 'auto',
311
- 'bottom' : 'auto',
312
- 'left' : 0,
313
- 'marginTop' : 0,
314
- 'marginRight' : 0,
315
- 'marginBottom' : 0,
316
- 'marginLeft' : 0
317
- });
318
-
319
- sz_storeMargin(a_itm, opts);
320
- sz_storeOrigCss(a_itm);
321
- if (opts.responsive)
322
- {
323
- sz_setResponsiveSizes(opts, a_itm);
324
- }
325
-
326
- }; // /build
327
-
328
-
329
- FN._bind_events = function() {
330
- FN._unbind_events();
331
-
332
-
333
- // stop event
334
- $cfs.bind(cf_e('stop', conf), function(e, imm) {
335
- e.stopPropagation();
336
-
337
- // button
338
- if (!crsl.isStopped)
339
- {
340
- if (opts.auto.button)
341
- {
342
- opts.auto.button.addClass(cf_c('stopped', conf));
343
- }
344
- }
345
-
346
- // set stopped
347
- crsl.isStopped = true;
348
-
349
- if (opts.auto.play)
350
- {
351
- opts.auto.play = false;
352
- $cfs.trigger(cf_e('pause', conf), imm);
353
- }
354
- return true;
355
- });
356
-
357
-
358
- // finish event
359
- $cfs.bind(cf_e('finish', conf), function(e) {
360
- e.stopPropagation();
361
- if (crsl.isScrolling)
362
- {
363
- sc_stopScroll(scrl);
364
- }
365
- return true;
366
- });
367
-
368
-
369
- // pause event
370
- $cfs.bind(cf_e('pause', conf), function(e, imm, res) {
371
- e.stopPropagation();
372
- tmrs = sc_clearTimers(tmrs);
373
-
374
- // immediately pause
375
- if (imm && crsl.isScrolling)
376
- {
377
- scrl.isStopped = true;
378
- var nst = getTime() - scrl.startTime;
379
- scrl.duration -= nst;
380
- if (scrl.pre)
381
- {
382
- scrl.pre.duration -= nst;
383
- }
384
- if (scrl.post)
385
- {
386
- scrl.post.duration -= nst;
387
- }
388
- sc_stopScroll(scrl, false);
389
- }
390
-
391
- // update remaining pause-time
392
- if (!crsl.isPaused && !crsl.isScrolling)
393
- {
394
- if (res)
395
- {
396
- tmrs.timePassed += getTime() - tmrs.startTime;
397
- }
398
- }
399
-
400
- // button
401
- if (!crsl.isPaused)
402
- {
403
- if (opts.auto.button)
404
- {
405
- opts.auto.button.addClass(cf_c('paused', conf));
406
- }
407
- }
408
-
409
- // set paused
410
- crsl.isPaused = true;
411
-
412
- // pause pause callback
413
- if (opts.auto.onTimeoutPause)
414
- {
415
- var dur1 = opts.auto.timeoutDuration - tmrs.timePassed,
416
- perc = 100 - Math.ceil( dur1 * 100 / opts.auto.timeoutDuration );
417
-
418
- opts.auto.onTimeoutPause.call($tt0, perc, dur1);
419
- }
420
- return true;
421
- });
422
-
423
-
424
- // play event
425
- $cfs.bind(cf_e('play', conf), function(e, dir, del, res) {
426
- e.stopPropagation();
427
- tmrs = sc_clearTimers(tmrs);
428
-
429
- // sort params
430
- var v = [dir, del, res],
431
- t = ['string', 'number', 'boolean'],
432
- a = cf_sortParams(v, t);
433
-
434
- dir = a[0];
435
- del = a[1];
436
- res = a[2];
437
-
438
- if (dir != 'prev' && dir != 'next')
439
- {
440
- dir = crsl.direction;
441
- }
442
- if (!is_number(del))
443
- {
444
- del = 0;
445
- }
446
- if (!is_boolean(res))
447
- {
448
- res = false;
449
- }
450
-
451
- // stopped?
452
- if (res)
453
- {
454
- crsl.isStopped = false;
455
- opts.auto.play = true;
456
- }
457
- if (!opts.auto.play)
458
- {
459
- e.stopImmediatePropagation();
460
- return debug(conf, 'Carousel stopped: Not scrolling.');
461
- }
462
-
463
- // button
464
- if (crsl.isPaused)
465
- {
466
- if (opts.auto.button)
467
- {
468
- opts.auto.button.removeClass(cf_c('stopped', conf));
469
- opts.auto.button.removeClass(cf_c('paused', conf));
470
- }
471
- }
472
-
473
- // set playing
474
- crsl.isPaused = false;
475
- tmrs.startTime = getTime();
476
-
477
- // timeout the scrolling
478
- var dur1 = opts.auto.timeoutDuration + del;
479
- dur2 = dur1 - tmrs.timePassed;
480
- perc = 100 - Math.ceil(dur2 * 100 / dur1);
481
-
482
- if (opts.auto.progress)
483
- {
484
- tmrs.progress = setInterval(function() {
485
- var pasd = getTime() - tmrs.startTime + tmrs.timePassed,
486
- perc = Math.ceil(pasd * 100 / dur1);
487
- opts.auto.progress.updater.call(opts.auto.progress.bar[0], perc);
488
- }, opts.auto.progress.interval);
489
- }
490
-
491
- tmrs.auto = setTimeout(function() {
492
- if (opts.auto.progress)
493
- {
494
- opts.auto.progress.updater.call(opts.auto.progress.bar[0], 100);
495
- }
496
- if (opts.auto.onTimeoutEnd)
497
- {
498
- opts.auto.onTimeoutEnd.call($tt0, perc, dur2);
499
- }
500
- if (crsl.isScrolling)
501
- {
502
- $cfs.trigger(cf_e('play', conf), dir);
503
- }
504
- else
505
- {
506
- $cfs.trigger(cf_e(dir, conf), opts.auto);
507
- }
508
- }, dur2);
509
-
510
- // pause start callback
511
- if (opts.auto.onTimeoutStart)
512
- {
513
- opts.auto.onTimeoutStart.call($tt0, perc, dur2);
514
- }
515
-
516
- return true;
517
- });
518
-
519
-
520
- // resume event
521
- $cfs.bind(cf_e('resume', conf), function(e) {
522
- e.stopPropagation();
523
- if (scrl.isStopped)
524
- {
525
- scrl.isStopped = false;
526
- crsl.isPaused = false;
527
- crsl.isScrolling = true;
528
- scrl.startTime = getTime();
529
- sc_startScroll(scrl, conf);
530
- }
531
- else
532
- {
533
- $cfs.trigger(cf_e('play', conf));
534
- }
535
- return true;
536
- });
537
-
538
-
539
- // prev + next events
540
- $cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb, que) {
541
- e.stopPropagation();
542
-
543
- // stopped or hidden carousel, don't scroll, don't queue
544
- if (crsl.isStopped || $cfs.is(':hidden'))
545
- {
546
- e.stopImmediatePropagation();
547
- return debug(conf, 'Carousel stopped or hidden: Not scrolling.');
548
- }
549
-
550
- // not enough items
551
- var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1;
552
- if (minimum > itms.total)
553
- {
554
- e.stopImmediatePropagation();
555
- return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');
556
- }
557
-
558
- // get config
559
- var v = [obj, num, clb, que],
560
- t = ['object', 'number/string', 'function', 'boolean'],
561
- a = cf_sortParams(v, t);
562
-
563
- obj = a[0];
564
- num = a[1];
565
- clb = a[2];
566
- que = a[3];
567
-
568
- var eType = e.type.slice(conf.events.prefix.length);
569
-
570
- if (!is_object(obj))
571
- {
572
- obj = {};
573
- }
574
- if (is_function(clb))
575
- {
576
- obj.onAfter = clb;
577
- }
578
- if (is_boolean(que))
579
- {
580
- obj.queue = que;
581
- }
582
- obj = $.extend(true, {}, opts[eType], obj);
583
-
584
- // test conditions callback
585
- if (obj.conditions && !obj.conditions.call($tt0, eType))
586
- {
587
- e.stopImmediatePropagation();
588
- return debug(conf, 'Callback "conditions" returned false.');
589
- }
590
-
591
- if (!is_number(num))
592
- {
593
- if (opts.items.filter != '*')
594
- {
595
- num = 'visible';
596
- }
597
- else
598
- {
599
- var arr = [num, obj.items, opts[eType].items];
600
- for (var a = 0, l = arr.length; a < l; a++)
601
- {
602
- if (is_number(arr[a]) || arr[a] == 'page' || arr[a] == 'visible') {
603
- num = arr[a];
604
- break;
605
- }
606
- }
607
- }
608
- switch(num) {
609
- case 'page':
610
- e.stopImmediatePropagation();
611
- return $cfs.triggerHandler(cf_e(eType+'Page', conf), [obj, clb]);
612
- break;
613
-
614
- case 'visible':
615
- if (!opts.items.visibleConf.variable && opts.items.filter == '*')
616
- {
617
- num = opts.items.visible;
618
- }
619
- break;
620
- }
621
- }
622
-
623
- // resume animation, add current to queue
624
- if (scrl.isStopped)
625
- {
626
- $cfs.trigger(cf_e('resume', conf));
627
- $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
628
- e.stopImmediatePropagation();
629
- return debug(conf, 'Carousel resumed scrolling.');
630
- }
631
-
632
- // queue if scrolling
633
- if (obj.duration > 0)
634
- {
635
- if (crsl.isScrolling)
636
- {
637
- if (obj.queue)
638
- {
639
- if (obj.queue == 'last')
640
- {
641
- queu = [];
642
- }
643
- if (obj.queue != 'first' || queu.length == 0)
644
- {
645
- $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
646
- }
647
- }
648
- e.stopImmediatePropagation();
649
- return debug(conf, 'Carousel currently scrolling.');
650
- }
651
- }
652
-
653
- tmrs.timePassed = 0;
654
- $cfs.trigger(cf_e('slide_'+eType, conf), [obj, num]);
655
-
656
- // synchronise
657
- if (opts.synchronise)
658
- {
659
- var s = opts.synchronise,
660
- c = [obj, num];
661
-
662
- for (var j = 0, l = s.length; j < l; j++) {
663
- var d = eType;
664
- if (!s[j][2])
665
- {
666
- d = (d == 'prev') ? 'next' : 'prev';
667
- }
668
- if (!s[j][1])
669
- {
670
- c[0] = s[j][0].triggerHandler('_cfs_triggerEvent', ['configuration', d]);
671
- }
672
- c[1] = num + s[j][3];
673
- s[j][0].trigger('_cfs_triggerEvent', ['slide_'+d, c]);
674
- }
675
- }
676
- return true;
677
- });
678
-
679
-
680
- // prev event
681
- $cfs.bind(cf_e('slide_prev', conf), function(e, sO, nI) {
682
- e.stopPropagation();
683
- var a_itm = $cfs.children();
684
-
685
- // non-circular at start, scroll to end
686
- if (!opts.circular)
687
- {
688
- if (itms.first == 0)
689
- {
690
- if (opts.infinite)
691
- {
692
- $cfs.trigger(cf_e('next', conf), itms.total-1);
693
- }
694
- return e.stopImmediatePropagation();
695
- }
696
- }
697
-
698
- sz_resetMargin(a_itm, opts);
699
-
700
- // find number of items to scroll
701
- if (!is_number(nI))
702
- {
703
- if (opts.items.visibleConf.variable)
704
- {
705
- nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1);
706
- }
707
- else if (opts.items.filter != '*')
708
- {
709
- var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
710
- nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI);
711
- }
712
- else
713
- {
714
- nI = opts.items.visible;
715
- }
716
- nI = cf_getAdjust(nI, opts, sO.items, $tt0);
717
- }
718
-
719
- // prevent non-circular from scrolling to far
720
- if (!opts.circular)
721
- {
722
- if (itms.total - nI < itms.first)
723
- {
724
- nI = itms.total - itms.first;
725
- }
726
- }
727
-
728
- // set new number of visible items
729
- opts.items.visibleConf.old = opts.items.visible;
730
- if (opts.items.visibleConf.variable)
731
- {
732
- var vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
733
- if (opts.items.visible+nI <= vI && nI < itms.total)
734
- {
735
- nI++;
736
- vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
737
- }
738
- opts.items.visible = vI;
739
- }
740
- else if (opts.items.filter != '*')
741
- {
742
- var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI);
743
- opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
744
- }
745
-
746
- sz_resetMargin(a_itm, opts, true);
747
-
748
- // scroll 0, don't scroll
749
- if (nI == 0)
750
- {
751
- e.stopImmediatePropagation();
752
- return debug(conf, '0 items to scroll: Not scrolling.');
753
- }
754
- debug(conf, 'Scrolling '+nI+' items backward.');
755
-
756
-
757
- // save new config
758
- itms.first += nI;
759
- while (itms.first >= itms.total)
760
- {
761
- itms.first -= itms.total;
762
- }
763
-
764
- // non-circular callback
765
- if (!opts.circular)
766
- {
767
- if (itms.first == 0 && sO.onEnd)
768
- {
769
- sO.onEnd.call($tt0, 'prev');
770
- }
771
- if (!opts.infinite)
772
- {
773
- nv_enableNavi(opts, itms.first, conf);
774
- }
775
- }
776
-
777
- // rearrange items
778
- $cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs);
779
- if (itms.total < opts.items.visible + nI)
780
- {
781
- $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
782
- }
783
-
784
- // the needed items
785
- var a_itm = $cfs.children(),
786
- i_old = gi_getOldItemsPrev(a_itm, opts, nI),
787
- i_new = gi_getNewItemsPrev(a_itm, opts),
788
- i_cur_l = a_itm.eq(nI-1),
789
- i_old_l = i_old.last(),
790
- i_new_l = i_new.last();
791
-
792
- sz_resetMargin(a_itm, opts);
793
-
794
- var pL = 0,
795
- pR = 0;
796
-
797
- if (opts.align)
798
- {
799
- var p = cf_getAlignPadding(i_new, opts);
800
- pL = p[0];
801
- pR = p[1];
802
- }
803
- var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0;
804
-
805
- // hide items for fx directscroll
806
- var hiddenitems = false,
807
- i_skp = $();
808
- if (opts.items.visible < nI)
809
- {
810
- i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
811
- if (sO.fx == 'directscroll')
812
- {
813
- var orgW = opts.items[opts.d['width']];
814
- hiddenitems = i_skp;
815
- i_cur_l = i_new_l;
816
- sc_hideHiddenItems(hiddenitems);
817
- opts.items[opts.d['width']] = 'variable';
818
- }
819
- }
820
- // save new sizes
821
- var $cf2 = false,
822
- i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
823
- w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
824
- i_siz_vis = 0,
825
- a_cfs = {},
826
- a_wsz = {},
827
- a_cur = {},
828
- a_old = {},
829
- a_new = {},
830
- a_lef = {},
831
- a_lef_vis = {},
832
- a_dur = sc_getDuration(sO, opts, nI, i_siz);
833
-
834
- switch(sO.fx)
835
- {
836
- case 'cover':
837
- case 'cover-fade':
838
- i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visible), opts, 'width');
839
- break;
840
- }
841
-
842
- if (hiddenitems)
843
- {
844
- opts.items[opts.d['width']] = orgW;
845
- }
846
-
847
- sz_resetMargin(a_itm, opts, true);
848
- if (pR >= 0)
849
- {
850
- sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
851
- }
852
- if (pL >= 0)
853
- {
854
- sz_resetMargin(i_cur_l, opts, opts.padding[opts.d[3]]);
855
- }
856
-
857
- if (opts.align)
858
- {
859
- opts.padding[opts.d[1]] = pR;
860
- opts.padding[opts.d[3]] = pL;
861
- }
862
-
863
- a_lef[opts.d['left']] = -(i_siz - oL);
864
- a_lef_vis[opts.d['left']] = -(i_siz_vis - oL);
865
- a_wsz[opts.d['left']] = w_siz[opts.d['width']];
866
-
867
- // scrolling functions
868
- var _s_wrapper = function() {},
869
- _a_wrapper = function() {},
870
- _s_paddingold = function() {},
871
- _a_paddingold = function() {},
872
- _s_paddingnew = function() {},
873
- _a_paddingnew = function() {},
874
- _s_paddingcur = function() {},
875
- _a_paddingcur = function() {},
876
- _onafter = function() {},
877
- _moveitems = function() {},
878
- _position = function() {};
879
-
880
- // clone carousel
881
- switch(sO.fx)
882
- {
883
- case 'crossfade':
884
- case 'cover':
885
- case 'cover-fade':
886
- case 'uncover':
887
- case 'uncover-fade':
888
- $cf2 = $cfs.clone(true).appendTo($wrp);
889
- break;
890
- }
891
- switch(sO.fx)
892
- {
893
- case 'crossfade':
894
- case 'uncover':
895
- case 'uncover-fade':
896
- $cf2.children().slice(0, nI).remove();
897
- $cf2.children().slice(opts.items.visibleConf.old).remove();
898
- break;
899
-
900
- case 'cover':
901
- case 'cover-fade':
902
- $cf2.children().slice(opts.items.visible).remove();
903
- $cf2.css(a_lef_vis);
904
- break;
905
- }
906
-
907
- $cfs.css(a_lef);
908
-
909
- // reset all scrolls
910
- scrl = sc_setScroll(a_dur, sO.easing, conf);
911
-
912
- // animate / set carousel
913
- a_cfs[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
914
-
915
- // animate / set wrapper
916
- if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
917
- {
918
- _s_wrapper = function() {
919
- $wrp.css(w_siz);
920
- };
921
- _a_wrapper = function() {
922
- scrl.anims.push([$wrp, w_siz]);
923
- };
924
- }
925
-
926
- // animate / set items
927
- if (opts.usePadding)
928
- {
929
- if (i_new_l.not(i_cur_l).length)
930
- {
931
- a_cur[opts.d['marginRight']] = i_cur_l.data('_cfs_origCssMargin');
932
-
933
- if (pL < 0)
934
- {
935
- i_cur_l.css(a_cur);
936
- }
937
- else
938
- {
939
- _s_paddingcur = function() {
940
- i_cur_l.css(a_cur);
941
- };
942
- _a_paddingcur = function() {
943
- scrl.anims.push([i_cur_l, a_cur]);
944
- };
945
- }
946
- }
947
- switch(sO.fx)
948
- {
949
- case 'cover':
950
- case 'cover-fade':
951
- $cf2.children().eq(nI-1).css(a_cur);
952
- break;
953
- }
954
-
955
- if (i_new_l.not(i_old_l).length)
956
- {
957
- a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
958
- _s_paddingold = function() {
959
- i_old_l.css(a_old);
960
- };
961
- _a_paddingold = function() {
962
- scrl.anims.push([i_old_l, a_old]);
963
- };
964
- }
965
-
966
- if (pR >= 0)
967
- {
968
- a_new[opts.d['marginRight']] = i_new_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]];
969
- _s_paddingnew = function() {
970
- i_new_l.css(a_new);
971
- };
972
- _a_paddingnew = function() {
973
- scrl.anims.push([i_new_l, a_new]);
974
- };
975
- }
976
- }
977
-
978
- // set position
979
- _position = function() {
980
- $cfs.css(a_cfs);
981
- };
982
-
983
-
984
- var overFill = opts.items.visible+nI-itms.total;
985
-
986
- // rearrange items
987
- _moveitems = function() {
988
- if (overFill > 0)
989
- {
990
- $cfs.children().slice(itms.total).remove();
991
- i_old = $( $cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat( $cfs.children().slice(0, overFill).get() ) );
992
- }
993
- sc_showHiddenItems(hiddenitems);
994
-
995
- if (opts.usePadding)
996
- {
997
- var l_itm = $cfs.children().eq(opts.items.visible+nI-1);
998
- l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
999
- }
1000
- };
1001
-
1002
-
1003
- var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'prev', a_dur, w_siz);
1004
-
1005
- // fire onAfter callbacks
1006
- _onafter = function() {
1007
- sc_afterScroll($cfs, $cf2, sO);
1008
- crsl.isScrolling = false;
1009
- clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
1010
- queu = sc_fireQueue($cfs, queu, conf);
1011
-
1012
- if (!crsl.isPaused)
1013
- {
1014
- $cfs.trigger(cf_e('play', conf));
1015
- }
1016
- };
1017
-
1018
- // fire onBefore callback
1019
- crsl.isScrolling = true;
1020
- tmrs = sc_clearTimers(tmrs);
1021
- clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
1022
-
1023
- switch(sO.fx)
1024
- {
1025
- case 'none':
1026
- $cfs.css(a_cfs);
1027
- _s_wrapper();
1028
- _s_paddingold();
1029
- _s_paddingnew();
1030
- _s_paddingcur();
1031
- _position();
1032
- _moveitems();
1033
- _onafter();
1034
- break;
1035
-
1036
- case 'fade':
1037
- scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
1038
- _s_wrapper();
1039
- _s_paddingold();
1040
- _s_paddingnew();
1041
- _s_paddingcur();
1042
- _position();
1043
- _moveitems();
1044
- scrl = sc_setScroll(a_dur, sO.easing, conf);
1045
- scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1046
- sc_startScroll(scrl, conf);
1047
- }]);
1048
- break;
1049
-
1050
- case 'crossfade':
1051
- $cfs.css({ 'opacity': 0 });
1052
- scrl.anims.push([$cf2, { 'opacity': 0 }]);
1053
- scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1054
- _a_wrapper();
1055
- _s_paddingold();
1056
- _s_paddingnew();
1057
- _s_paddingcur();
1058
- _position();
1059
- _moveitems();
1060
- break;
1061
-
1062
- case 'cover':
1063
- scrl.anims.push([$cf2, a_cfs, function() {
1064
- _s_paddingold();
1065
- _s_paddingnew();
1066
- _s_paddingcur();
1067
- _position();
1068
- _moveitems();
1069
- _onafter();
1070
- }]);
1071
- _a_wrapper();
1072
- break;
1073
-
1074
- case 'cover-fade':
1075
- scrl.anims.push([$cfs, { 'opacity': 0 }]);
1076
- scrl.anims.push([$cf2, a_cfs, function() {
1077
- _s_paddingold();
1078
- _s_paddingnew();
1079
- _s_paddingcur();
1080
- _position();
1081
- _moveitems();
1082
- _onafter();
1083
- }]);
1084
- _a_wrapper();
1085
- break;
1086
-
1087
- case 'uncover':
1088
- scrl.anims.push([$cf2, a_wsz, _onafter]);
1089
- _a_wrapper();
1090
- _s_paddingold();
1091
- _s_paddingnew();
1092
- _s_paddingcur();
1093
- _position();
1094
- _moveitems();
1095
- break;
1096
-
1097
- case 'uncover-fade':
1098
- $cfs.css({ 'opacity': 0 });
1099
- scrl.anims.push([$cfs, { 'opacity': 1 }]);
1100
- scrl.anims.push([$cf2, a_wsz, _onafter]);
1101
- _a_wrapper();
1102
- _s_paddingold();
1103
- _s_paddingnew();
1104
- _s_paddingcur();
1105
- _position();
1106
- _moveitems();
1107
- break;
1108
-
1109
- default:
1110
- scrl.anims.push([$cfs, a_cfs, function() {
1111
- _moveitems();
1112
- _onafter();
1113
- }]);
1114
- _a_wrapper();
1115
- _a_paddingold();
1116
- _a_paddingnew();
1117
- _a_paddingcur();
1118
- break;
1119
- }
1120
-
1121
- sc_startScroll(scrl, conf);
1122
- cf_setCookie(opts.cookie, $cfs, conf);
1123
-
1124
- $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
1125
-
1126
- return true;
1127
- });
1128
-
1129
-
1130
- // next event
1131
- $cfs.bind(cf_e('slide_next', conf), function(e, sO, nI) {
1132
- e.stopPropagation();
1133
- var a_itm = $cfs.children();
1134
-
1135
- // non-circular at end, scroll to start
1136
- if (!opts.circular)
1137
- {
1138
- if (itms.first == opts.items.visible)
1139
- {
1140
- if (opts.infinite)
1141
- {
1142
- $cfs.trigger(cf_e('prev', conf), itms.total-1);
1143
- }
1144
- return e.stopImmediatePropagation();
1145
- }
1146
- }
1147
-
1148
- sz_resetMargin(a_itm, opts);
1149
-
1150
- // find number of items to scroll
1151
- if (!is_number(nI))
1152
- {
1153
- if (opts.items.filter != '*')
1154
- {
1155
- var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
1156
- nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI);
1157
- }
1158
- else
1159
- {
1160
- nI = opts.items.visible;
1161
- }
1162
- nI = cf_getAdjust(nI, opts, sO.items, $tt0);
1163
- }
1164
-
1165
- var lastItemNr = (itms.first == 0) ? itms.total : itms.first;
1166
-
1167
- // prevent non-circular from scrolling to far
1168
- if (!opts.circular)
1169
- {
1170
- if (opts.items.visibleConf.variable)
1171
- {
1172
- var vI = gn_getVisibleItemsNext(a_itm, opts, nI),
1173
- xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1);
1174
- }
1175
- else
1176
- {
1177
- var vI = opts.items.visible,
1178
- xI = opts.items.visible;
1179
- }
1180
-
1181
- if (nI + vI > lastItemNr)
1182
- {
1183
- nI = lastItemNr - xI;
1184
- }
1185
- }
1186
-
1187
- // set new number of visible items
1188
- opts.items.visibleConf.old = opts.items.visible;
1189
- if (opts.items.visibleConf.variable)
1190
- {
1191
- var vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
1192
- while (opts.items.visible-nI >= vI && nI < itms.total)
1193
- {
1194
- nI++;
1195
- vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
1196
- }
1197
- opts.items.visible = vI;
1198
- }
1199
- else if (opts.items.filter != '*')
1200
- {
1201
- var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI);
1202
- opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
1203
- }
1204
-
1205
- sz_resetMargin(a_itm, opts, true);
1206
-
1207
- // scroll 0, don't scroll
1208
- if (nI == 0)
1209
- {
1210
- e.stopImmediatePropagation();
1211
- return debug(conf, '0 items to scroll: Not scrolling.');
1212
- }
1213
- debug(conf, 'Scrolling '+nI+' items forward.');
1214
-
1215
-
1216
- // save new config
1217
- itms.first -= nI;
1218
- while (itms.first < 0)
1219
- {
1220
- itms.first += itms.total;
1221
- }
1222
-
1223
- // non-circular callback
1224
- if (!opts.circular)
1225
- {
1226
- if (itms.first == opts.items.visible && sO.onEnd)
1227
- {
1228
- sO.onEnd.call($tt0, 'next');
1229
- }
1230
- if (!opts.infinite)
1231
- {
1232
- nv_enableNavi(opts, itms.first, conf);
1233
- }
1234
- }
1235
-
1236
- // rearrange items
1237
- if (itms.total < opts.items.visible+nI)
1238
- {
1239
- $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
1240
- }
1241
-
1242
- // the needed items
1243
- var a_itm = $cfs.children(),
1244
- i_old = gi_getOldItemsNext(a_itm, opts),
1245
- i_new = gi_getNewItemsNext(a_itm, opts, nI),
1246
- i_cur_l = a_itm.eq(nI-1),
1247
- i_old_l = i_old.last(),
1248
- i_new_l = i_new.last();
1249
-
1250
- sz_resetMargin(a_itm, opts);
1251
-
1252
- var pL = 0,
1253
- pR = 0;
1254
-
1255
- if (opts.align)
1256
- {
1257
- var p = cf_getAlignPadding(i_new, opts);
1258
- pL = p[0];
1259
- pR = p[1];
1260
- }
1261
-
1262
- // hide items for fx directscroll
1263
- var hiddenitems = false,
1264
- i_skp = $();
1265
- if (opts.items.visibleConf.old < nI)
1266
- {
1267
- i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
1268
- if (sO.fx == 'directscroll')
1269
- {
1270
- var orgW = opts.items[opts.d['width']];
1271
- hiddenitems = i_skp;
1272
- i_cur_l = i_old_l;
1273
- sc_hideHiddenItems(hiddenitems);
1274
- opts.items[opts.d['width']] = 'variable';
1275
- }
1276
- }
1277
- // save new sizes
1278
- var $cf2 = false,
1279
- i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
1280
- w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
1281
- i_siz_vis = 0,
1282
- a_cfs = {},
1283
- a_cfs_vis = {},
1284
- a_cur = {},
1285
- a_old = {},
1286
- a_lef = {},
1287
- a_dur = sc_getDuration(sO, opts, nI, i_siz);
1288
-
1289
- switch(sO.fx)
1290
- {
1291
- case 'uncover':
1292
- case 'uncover-fade':
1293
- i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visibleConf.old), opts, 'width');
1294
- break;
1295
- }
1296
-
1297
- if (hiddenitems)
1298
- {
1299
- opts.items[opts.d['width']] = orgW;
1300
- }
1301
-
1302
- if (opts.align)
1303
- {
1304
- if (opts.padding[opts.d[1]] < 0)
1305
- {
1306
- opts.padding[opts.d[1]] = 0;
1307
- }
1308
- }
1309
- sz_resetMargin(a_itm, opts, true);
1310
- sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
1311
-
1312
- if (opts.align)
1313
- {
1314
- opts.padding[opts.d[1]] = pR;
1315
- opts.padding[opts.d[3]] = pL;
1316
- }
1317
-
1318
- a_lef[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
1319
-
1320
- // scrolling functions
1321
- var _s_wrapper = function() {},
1322
- _a_wrapper = function() {},
1323
- _s_paddingold = function() {},
1324
- _a_paddingold = function() {},
1325
- _s_paddingcur = function() {},
1326
- _a_paddingcur = function() {},
1327
- _onafter = function() {},
1328
- _moveitems = function() {},
1329
- _position = function() {};
1330
-
1331
- // clone carousel
1332
- switch(sO.fx)
1333
- {
1334
- case 'crossfade':
1335
- case 'cover':
1336
- case 'cover-fade':
1337
- case 'uncover':
1338
- case 'uncover-fade':
1339
- $cf2 = $cfs.clone(true).appendTo($wrp);
1340
- $cf2.children().slice(opts.items.visibleConf.old).remove();
1341
- break;
1342
- }
1343
- switch(sO.fx)
1344
- {
1345
- case 'crossfade':
1346
- case 'cover':
1347
- case 'cover-fade':
1348
- $cfs.css('zIndex', 1);
1349
- $cf2.css('zIndex', 0);
1350
- break;
1351
- }
1352
-
1353
- // reset all scrolls
1354
- scrl = sc_setScroll(a_dur, sO.easing, conf);
1355
-
1356
- // animate / set carousel
1357
- a_cfs[opts.d['left']] = -i_siz;
1358
- a_cfs_vis[opts.d['left']] = -i_siz_vis;
1359
-
1360
- if (pL < 0)
1361
- {
1362
- a_cfs[opts.d['left']] += pL;
1363
- }
1364
-
1365
- // animate / set wrapper
1366
- if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
1367
- {
1368
- _s_wrapper = function() {
1369
- $wrp.css(w_siz);
1370
- };
1371
- _a_wrapper = function() {
1372
- scrl.anims.push([$wrp, w_siz]);
1373
- };
1374
- }
1375
-
1376
- // animate / set items
1377
- if (opts.usePadding)
1378
- {
1379
- var i_new_l_m = i_new_l.data('_cfs_origCssMargin');
1380
-
1381
- if (pR >= 0)
1382
- {
1383
- i_new_l_m += opts.padding[opts.d[1]];
1384
- }
1385
- i_new_l.css(opts.d['marginRight'], i_new_l_m);
1386
-
1387
- if (i_cur_l.not(i_old_l).length)
1388
- {
1389
- a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
1390
- }
1391
- _s_paddingold = function() {
1392
- i_old_l.css(a_old);
1393
- };
1394
- _a_paddingold = function() {
1395
- scrl.anims.push([i_old_l, a_old]);
1396
- };
1397
-
1398
- var i_cur_l_m = i_cur_l.data('_cfs_origCssMargin');
1399
- if (pL > 0)
1400
- {
1401
- i_cur_l_m += opts.padding[opts.d[3]];
1402
- }
1403
-
1404
- a_cur[opts.d['marginRight']] = i_cur_l_m;
1405
-
1406
- _s_paddingcur = function() {
1407
- i_cur_l.css(a_cur);
1408
- };
1409
- _a_paddingcur = function() {
1410
- scrl.anims.push([i_cur_l, a_cur]);
1411
- };
1412
- }
1413
-
1414
- // set position
1415
- _position = function() {
1416
- $cfs.css(a_lef);
1417
- };
1418
-
1419
-
1420
- var overFill = opts.items.visible+nI-itms.total;
1421
-
1422
- // rearrange items
1423
- _moveitems = function() {
1424
- if (overFill > 0)
1425
- {
1426
- $cfs.children().slice(itms.total).remove();
1427
- }
1428
- var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last();
1429
- if (overFill > 0)
1430
- {
1431
- i_new = gi_getCurrentItems(a_itm, opts);
1432
- }
1433
- sc_showHiddenItems(hiddenitems);
1434
-
1435
- if (opts.usePadding)
1436
- {
1437
- if (itms.total < opts.items.visible+nI) {
1438
- var i_cur_l = $cfs.children().eq(opts.items.visible-1);
1439
- i_cur_l.css(opts.d['marginRight'], i_cur_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]);
1440
- }
1441
- l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
1442
- }
1443
- };
1444
-
1445
-
1446
- var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'next', a_dur, w_siz);
1447
-
1448
- // fire onAfter callbacks
1449
- _onafter = function() {
1450
- $cfs.css('zIndex', $cfs.data('_cfs_origCssZindex'));
1451
- sc_afterScroll($cfs, $cf2, sO);
1452
- crsl.isScrolling = false;
1453
- clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
1454
- queu = sc_fireQueue($cfs, queu, conf);
1455
-
1456
- if (!crsl.isPaused)
1457
- {
1458
- $cfs.trigger(cf_e('play', conf));
1459
- }
1460
- };
1461
-
1462
- // fire onBefore callbacks
1463
- crsl.isScrolling = true;
1464
- tmrs = sc_clearTimers(tmrs);
1465
- clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
1466
-
1467
- switch(sO.fx)
1468
- {
1469
- case 'none':
1470
- $cfs.css(a_cfs);
1471
- _s_wrapper();
1472
- _s_paddingold();
1473
- _s_paddingcur();
1474
- _position();
1475
- _moveitems();
1476
- _onafter();
1477
- break;
1478
-
1479
- case 'fade':
1480
- scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
1481
- _s_wrapper();
1482
- _s_paddingold();
1483
- _s_paddingcur();
1484
- _position();
1485
- _moveitems();
1486
- scrl = sc_setScroll(a_dur, sO.easing, conf);
1487
- scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1488
- sc_startScroll(scrl, conf);
1489
- }]);
1490
- break;
1491
-
1492
- case 'crossfade':
1493
- $cfs.css({ 'opacity': 0 });
1494
- scrl.anims.push([$cf2, { 'opacity': 0 }]);
1495
- scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1496
- _a_wrapper();
1497
- _s_paddingold();
1498
- _s_paddingcur();
1499
- _position();
1500
- _moveitems();
1501
- break;
1502
-
1503
- case 'cover':
1504
- $cfs.css(opts.d['left'], $wrp[opts.d['width']]());
1505
- scrl.anims.push([$cfs, a_lef, _onafter]);
1506
- _a_wrapper();
1507
- _s_paddingold();
1508
- _s_paddingcur();
1509
- _moveitems();
1510
- break;
1511
-
1512
- case 'cover-fade':
1513
- $cfs.css(opts.d['left'], $wrp[opts.d['width']]());
1514
- scrl.anims.push([$cf2, { 'opacity': 0 }]);
1515
- scrl.anims.push([$cfs, a_lef, _onafter]);
1516
- _a_wrapper();
1517
- _s_paddingold();
1518
- _s_paddingcur();
1519
- _moveitems();
1520
- break;
1521
-
1522
- case 'uncover':
1523
- scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
1524
- _a_wrapper();
1525
- _s_paddingold();
1526
- _s_paddingcur();
1527
- _position();
1528
- _moveitems();
1529
- break;
1530
-
1531
- case 'uncover-fade':
1532
- $cfs.css({ 'opacity': 0 });
1533
- scrl.anims.push([$cfs, { 'opacity': 1 }]);
1534
- scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
1535
- _a_wrapper();
1536
- _s_paddingold();
1537
- _s_paddingcur();
1538
- _position();
1539
- _moveitems();
1540
- break;
1541
-
1542
- default:
1543
- scrl.anims.push([$cfs, a_cfs, function() {
1544
- _position();
1545
- _moveitems();
1546
- _onafter();
1547
- }]);
1548
- _a_wrapper();
1549
- _a_paddingold();
1550
- _a_paddingcur();
1551
- break;
1552
- }
1553
-
1554
- sc_startScroll(scrl, conf);
1555
- cf_setCookie(opts.cookie, $cfs, conf);
1556
-
1557
- $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
1558
-
1559
- return true;
1560
- });
1561
-
1562
-
1563
- // slideTo event
1564
- $cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) {
1565
- e.stopPropagation();
1566
-
1567
- var v = [num, dev, org, obj, dir, clb],
1568
- t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'],
1569
- a = cf_sortParams(v, t);
1570
-
1571
- obj = a[3];
1572
- dir = a[4];
1573
- clb = a[5];
1574
-
1575
- num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs);
1576
-
1577
- if (num == 0)
1578
- {
1579
- return false;
1580
- }
1581
- if (!is_object(obj))
1582
- {
1583
- obj = false;
1584
- }
1585
-
1586
- if (dir != 'prev' && dir != 'next')
1587
- {
1588
- if (opts.circular)
1589
- {
1590
- dir = (num <= itms.total / 2) ? 'next' : 'prev';
1591
- }
1592
- else
1593
- {
1594
- dir = (itms.first == 0 || itms.first > num) ? 'next' : 'prev';
1595
- }
1596
- }
1597
-
1598
- if (dir == 'prev')
1599
- {
1600
- num = itms.total-num;
1601
- }
1602
- $cfs.trigger(cf_e(dir, conf), [obj, num, clb]);
1603
-
1604
- return true;
1605
- });
1606
-
1607
-
1608
- // prevPage event
1609
- $cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) {
1610
- e.stopPropagation();
1611
- var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
1612
- return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]);
1613
- });
1614
-
1615
-
1616
- // nextPage event
1617
- $cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) {
1618
- e.stopPropagation();
1619
- var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
1620
- return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]);
1621
- });
1622
-
1623
-
1624
- // slideToPage event
1625
- $cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) {
1626
- e.stopPropagation();
1627
- if (!is_number(pag))
1628
- {
1629
- pag = $cfs.triggerHandler(cf_e('currentPage', conf));
1630
- }
1631
- var ipp = opts.pagination.items || opts.items.visible,
1632
- max = Math.ceil(itms.total / ipp)-1;
1633
-
1634
- if (pag < 0)
1635
- {
1636
- pag = max;
1637
- }
1638
- if (pag > max)
1639
- {
1640
- pag = 0;
1641
- }
1642
- return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]);
1643
- });
1644
-
1645
- // jumpToStart event
1646
- $cfs.bind(cf_e('jumpToStart', conf), function(e, s) {
1647
- e.stopPropagation();
1648
- if (s)
1649
- {
1650
- s = gn_getItemIndex(s, 0, true, itms, $cfs);
1651
- }
1652
- else
1653
- {
1654
- s = 0;
1655
- }
1656
-
1657
- s += itms.first;
1658
- if (s != 0)
1659
- {
1660
- if (itms.total > 0)
1661
- {
1662
- while (s > itms.total)
1663
- {
1664
- s -= itms.total;
1665
- }
1666
- }
1667
- $cfs.prepend($cfs.children().slice(s, itms.total));
1668
- }
1669
- return true;
1670
- });
1671
-
1672
-
1673
- // synchronise event
1674
- $cfs.bind(cf_e('synchronise', conf), function(e, s) {
1675
- e.stopPropagation();
1676
- if (s)
1677
- {
1678
- s = cf_getSynchArr(s);
1679
- }
1680
- else if (opts.synchronise)
1681
- {
1682
- s = opts.synchronise;
1683
- }
1684
- else
1685
- {
1686
- return debug(conf, 'No carousel to synchronise.');
1687
- }
1688
-
1689
- var n = $cfs.triggerHandler(cf_e('currentPosition', conf)),
1690
- x = true;
1691
-
1692
- for (var j = 0, l = s.length; j < l; j++)
1693
- {
1694
- if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true]))
1695
- {
1696
- x = false;
1697
- }
1698
- }
1699
- return x;
1700
- });
1701
-
1702
-
1703
- // queue event
1704
- $cfs.bind(cf_e('queue', conf), function(e, dir, opt) {
1705
- e.stopPropagation();
1706
- if (is_function(dir))
1707
- {
1708
- dir.call($tt0, queu);
1709
- }
1710
- else if (is_array(dir))
1711
- {
1712
- queu = dir;
1713
- }
1714
- else if (!is_undefined(dir))
1715
- {
1716
- queu.push([dir, opt]);
1717
- }
1718
- return queu;
1719
- });
1720
-
1721
-
1722
- // insertItem event
1723
- $cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) {
1724
- e.stopPropagation();
1725
-
1726
- var v = [itm, num, org, dev],
1727
- t = ['string/object', 'string/number/object', 'boolean', 'number'],
1728
- a = cf_sortParams(v, t);
1729
-
1730
- itm = a[0];
1731
- num = a[1];
1732
- org = a[2];
1733
- dev = a[3];
1734
-
1735
- if (is_object(itm) && !is_jquery(itm))
1736
- {
1737
- itm = $(itm);
1738
- }
1739
- else if (is_string(itm))
1740
- {
1741
- itm = $(itm);
1742
- }
1743
- if (!is_jquery(itm) || itm.length == 0)
1744
- {
1745
- return debug(conf, 'Not a valid object.');
1746
- }
1747
-
1748
- if (is_undefined(num))
1749
- {
1750
- num = 'end';
1751
- }
1752
-
1753
- sz_storeMargin(itm, opts);
1754
- sz_storeOrigCss(itm);
1755
-
1756
- var orgNum = num,
1757
- before = 'before';
1758
-
1759
- if (num == 'end')
1760
- {
1761
- if (org)
1762
- {
1763
- if (itms.first == 0)
1764
- {
1765
- num = itms.total-1;
1766
- before = 'after';
1767
- }
1768
- else
1769
- {
1770
- num = itms.first;
1771
- itms.first += itm.length;
1772
- }
1773
- if (num < 0)
1774
- {
1775
- num = 0;
1776
- }
1777
- }
1778
- else
1779
- {
1780
- num = itms.total-1;
1781
- before = 'after';
1782
- }
1783
- }
1784
- else
1785
- {
1786
- num = gn_getItemIndex(num, dev, org, itms, $cfs);
1787
- }
1788
-
1789
- var $cit = $cfs.children().eq(num);
1790
- if ($cit.length)
1791
- {
1792
- $cit[before](itm);
1793
- }
1794
- else
1795
- {
1796
- debug(conf, 'Correct insert-position not found! Appending item to the end.');
1797
- $cfs.append(itm);
1798
- }
1799
-
1800
- if (orgNum != 'end' && !org)
1801
- {
1802
- if (num < itms.first)
1803
- {
1804
- itms.first += itm.length;
1805
- }
1806
- }
1807
- itms.total = $cfs.children().length;
1808
- if (itms.first >= itms.total)
1809
- {
1810
- itms.first -= itms.total;
1811
- }
1812
-
1813
- $cfs.trigger(cf_e('updateSizes', conf));
1814
- $cfs.trigger(cf_e('linkAnchors', conf));
1815
-
1816
- return true;
1817
- });
1818
-
1819
-
1820
- // removeItem event
1821
- $cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) {
1822
- e.stopPropagation();
1823
-
1824
- var v = [num, org, dev],
1825
- t = ['string/number/object', 'boolean', 'number'],
1826
- a = cf_sortParams(v, t);
1827
-
1828
- num = a[0];
1829
- org = a[1];
1830
- dev = a[2];
1831
-
1832
- var removed = false;
1833
-
1834
- if (num instanceof $ && num.length > 1)
1835
- {
1836
- $removed = $();
1837
- num.each(function(i, el) {
1838
- var $rem = $cfs.trigger(cf_e('removeItem', conf), [$(this), org, dev]);
1839
- if ( $rem )
1840
- {
1841
- $removed = $removed.add($rem);
1842
- }
1843
- });
1844
- return $removed;
1845
- }
1846
-
1847
- if (is_undefined(num) || num == 'end')
1848
- {
1849
- $removed = $cfs.children().last();
1850
- }
1851
- else
1852
- {
1853
- num = gn_getItemIndex(num, dev, org, itms, $cfs);
1854
- var $removed = $cfs.children().eq(num);
1855
- if ( $removed.length )
1856
- {
1857
- if (num < itms.first)
1858
- {
1859
- itms.first -= $removed.length;
1860
- }
1861
- }
1862
- }
1863
- if ( $removed && $removed.length )
1864
- {
1865
- $removed.detach();
1866
- itms.total = $cfs.children().length;
1867
- $cfs.trigger(cf_e('updateSizes', conf));
1868
- }
1869
-
1870
- return $removed;
1871
- });
1872
-
1873
-
1874
- // onBefore and onAfter event
1875
- $cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) {
1876
- e.stopPropagation();
1877
- var eType = e.type.slice(conf.events.prefix.length);
1878
- if (is_array(fn))
1879
- {
1880
- clbk[eType] = fn;
1881
- }
1882
- if (is_function(fn))
1883
- {
1884
- clbk[eType].push(fn);
1885
- }
1886
- return clbk[eType];
1887
- });
1888
-
1889
-
1890
- // currentPosition event
1891
- $cfs.bind(cf_e('currentPosition', conf), function(e, fn) {
1892
- e.stopPropagation();
1893
- if (itms.first == 0)
1894
- {
1895
- var val = 0;
1896
- }
1897
- else
1898
- {
1899
- var val = itms.total - itms.first;
1900
- }
1901
- if (is_function(fn))
1902
- {
1903
- fn.call($tt0, val);
1904
- }
1905
- return val;
1906
- });
1907
-
1908
-
1909
- // currentPage event
1910
- $cfs.bind(cf_e('currentPage', conf), function(e, fn) {
1911
- e.stopPropagation();
1912
- var ipp = opts.pagination.items || opts.items.visible,
1913
- max = Math.ceil(itms.total/ipp-1),
1914
- nr;
1915
- if (itms.first == 0)
1916
- {
1917
- nr = 0;
1918
- }
1919
- else if (itms.first < itms.total % ipp)
1920
- {
1921
- nr = 0;
1922
- }
1923
- else if (itms.first == ipp && !opts.circular)
1924
- {
1925
- nr = max;
1926
- }
1927
- else
1928
- {
1929
- nr = Math.round((itms.total-itms.first)/ipp);
1930
- }
1931
- if (nr < 0)
1932
- {
1933
- nr = 0;
1934
- }
1935
- if (nr > max)
1936
- {
1937
- nr = max;
1938
- }
1939
- if (is_function(fn))
1940
- {
1941
- fn.call($tt0, nr);
1942
- }
1943
- return nr;
1944
- });
1945
-
1946
-
1947
- // currentVisible event
1948
- $cfs.bind(cf_e('currentVisible', conf), function(e, fn) {
1949
- e.stopPropagation();
1950
- var $i = gi_getCurrentItems($cfs.children(), opts);
1951
- if (is_function(fn))
1952
- {
1953
- fn.call($tt0, $i);
1954
- }
1955
- return $i;
1956
- });
1957
-
1958
-
1959
- // slice event
1960
- $cfs.bind(cf_e('slice', conf), function(e, f, l, fn) {
1961
- e.stopPropagation();
1962
-
1963
- if (itms.total == 0)
1964
- {
1965
- return false;
1966
- }
1967
-
1968
- var v = [f, l, fn],
1969
- t = ['number', 'number', 'function'],
1970
- a = cf_sortParams(v, t);
1971
-
1972
- f = (is_number(a[0])) ? a[0] : 0;
1973
- l = (is_number(a[1])) ? a[1] : itms.total;
1974
- fn = a[2];
1975
-
1976
- f += itms.first;
1977
- l += itms.first;
1978
-
1979
- if (items.total > 0)
1980
- {
1981
- while (f > itms.total)
1982
- {
1983
- f -= itms.total;
1984
- }
1985
- while (l > itms.total)
1986
- {
1987
- l -= itms.total;
1988
- }
1989
- while (f < 0)
1990
- {
1991
- f += itms.total;
1992
- }
1993
- while (l < 0)
1994
- {
1995
- l += itms.total;
1996
- }
1997
- }
1998
- var $iA = $cfs.children(),
1999
- $i;
2000
-
2001
- if (l > f)
2002
- {
2003
- $i = $iA.slice(f, l);
2004
- }
2005
- else
2006
- {
2007
- $i = $( $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() ) );
2008
- }
2009
-
2010
- if (is_function(fn))
2011
- {
2012
- fn.call($tt0, $i);
2013
- }
2014
- return $i;
2015
- });
2016
-
2017
-
2018
- // isPaused, isStopped and isScrolling events
2019
- $cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) {
2020
- e.stopPropagation();
2021
- var eType = e.type.slice(conf.events.prefix.length),
2022
- value = crsl[eType];
2023
- if (is_function(fn))
2024
- {
2025
- fn.call($tt0, value);
2026
- }
2027
- return value;
2028
- });
2029
-
2030
-
2031
- // configuration event
2032
- $cfs.bind(cf_e('configuration', conf), function(e, a, b, c) {
2033
- e.stopPropagation();
2034
- var reInit = false;
2035
-
2036
- // return entire configuration-object
2037
- if (is_function(a))
2038
- {
2039
- a.call($tt0, opts);
2040
- }
2041
- // set multiple options via object
2042
- else if (is_object(a))
2043
- {
2044
- opts_orig = $.extend(true, {}, opts_orig, a);
2045
- if (b !== false) reInit = true;
2046
- else opts = $.extend(true, {}, opts, a);
2047
-
2048
- }
2049
- else if (!is_undefined(a))
2050
- {
2051
-
2052
- // callback function for specific option
2053
- if (is_function(b))
2054
- {
2055
- var val = eval('opts.'+a);
2056
- if (is_undefined(val))
2057
- {
2058
- val = '';
2059
- }
2060
- b.call($tt0, val);
2061
- }
2062
- // set individual option
2063
- else if (!is_undefined(b))
2064
- {
2065
- if (typeof c !== 'boolean') c = true;
2066
- eval('opts_orig.'+a+' = b');
2067
- if (c !== false) reInit = true;
2068
- else eval('opts.'+a+' = b');
2069
- }
2070
- // return value for specific option
2071
- else
2072
- {
2073
- return eval('opts.'+a);
2074
- }
2075
- }
2076
- if (reInit)
2077
- {
2078
- sz_resetMargin($cfs.children(), opts);
2079
- FN._init(opts_orig);
2080
- FN._bind_buttons();
2081
- var sz = sz_setSizes($cfs, opts);
2082
- $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
2083
- }
2084
- return opts;
2085
- });
2086
-
2087
-
2088
- // linkAnchors event
2089
- $cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) {
2090
- e.stopPropagation();
2091
-
2092
- if (is_undefined($con))
2093
- {
2094
- $con = $('body');
2095
- }
2096
- else if (is_string($con))
2097
- {
2098
- $con = $($con);
2099
- }
2100
- if (!is_jquery($con) || $con.length == 0)
2101
- {
2102
- return debug(conf, 'Not a valid object.');
2103
- }
2104
- if (!is_string(sel))
2105
- {
2106
- sel = 'a.caroufredsel';
2107
- }
2108
-
2109
- $con.find(sel).each(function() {
2110
- var h = this.hash || '';
2111
- if (h.length > 0 && $cfs.children().index($(h)) != -1)
2112
- {
2113
- $(this).unbind('click').click(function(e) {
2114
- e.preventDefault();
2115
- $cfs.trigger(cf_e('slideTo', conf), h);
2116
- });
2117
- }
2118
- });
2119
- return true;
2120
- });
2121
-
2122
-
2123
- // updatePageStatus event
2124
- $cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) {
2125
- e.stopPropagation();
2126
- if (!opts.pagination.container)
2127
- {
2128
- return;
2129
- }
2130
-
2131
- var ipp = opts.pagination.items || opts.items.visible,
2132
- pgs = Math.ceil(itms.total/ipp);
2133
-
2134
- if (build)
2135
- {
2136
- if (opts.pagination.anchorBuilder)
2137
- {
2138
- opts.pagination.container.children().remove();
2139
- opts.pagination.container.each(function() {
2140
- for (var a = 0; a < pgs; a++)
2141
- {
2142
- var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) );
2143
- $(this).append(opts.pagination.anchorBuilder.call(i[0], a+1));
2144
- }
2145
- });
2146
- }
2147
- opts.pagination.container.each(function() {
2148
- $(this).children().unbind(opts.pagination.event).each(function(a) {
2149
- $(this).bind(opts.pagination.event, function(e) {
2150
- e.preventDefault();
2151
- $cfs.trigger(cf_e('slideTo', conf), [a*ipp, -opts.pagination.deviation, true, opts.pagination]);
2152
- });
2153
- });
2154
- });
2155
- }
2156
-
2157
- var selected = $cfs.triggerHandler(cf_e('currentPage', conf)) + opts.pagination.deviation;
2158
- if (selected >= pgs)
2159
- {
2160
- selected = 0;
2161
- }
2162
- if (selected < 0)
2163
- {
2164
- selected = pgs-1;
2165
- }
2166
- opts.pagination.container.each(function() {
2167
- $(this).children().removeClass(cf_c('selected', conf)).eq(selected).addClass(cf_c('selected', conf));
2168
- });
2169
- return true;
2170
- });
2171
-
2172
-
2173
- // updateSizes event
2174
- $cfs.bind(cf_e('updateSizes', conf), function(e) {
2175
- var vI = opts.items.visible,
2176
- a_itm = $cfs.children(),
2177
- avail_primary = ms_getParentSize($wrp, opts, 'width');
2178
-
2179
- itms.total = a_itm.length;
2180
-
2181
- if (crsl.primarySizePercentage)
2182
- {
2183
- opts.maxDimension = avail_primary;
2184
- opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
2185
- }
2186
- else
2187
- {
2188
- opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
2189
- }
2190
-
2191
- if (opts.responsive)
2192
- {
2193
- opts.items.width = opts.items.sizesConf.width;
2194
- opts.items.height = opts.items.sizesConf.height;
2195
- opts = in_getResponsiveValues(opts, a_itm, avail_primary);
2196
- vI = opts.items.visible;
2197
- sz_setResponsiveSizes(opts, a_itm);
2198
- }
2199
- else if (opts.items.visibleConf.variable)
2200
- {
2201
- vI = gn_getVisibleItemsNext(a_itm, opts, 0);
2202
- }
2203
- else if (opts.items.filter != '*')
2204
- {
2205
- vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
2206
- }
2207
-
2208
- if (!opts.circular && itms.first != 0 && vI > itms.first) {
2209
- if (opts.items.visibleConf.variable)
2210
- {
2211
- var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first;
2212
- }
2213
- else if (opts.items.filter != '*')
2214
- {
2215
- var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first;
2216
- }
2217
- else
2218
- {
2219
- var nI = opts.items.visible - itms.first;
2220
- }
2221
- debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.');
2222
- $cfs.trigger(cf_e('prev', conf), nI);
2223
- }
2224
-
2225
- opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
2226
- opts.items.visibleConf.old = opts.items.visible;
2227
- opts = in_getAlignPadding(opts, a_itm);
2228
-
2229
- var sz = sz_setSizes($cfs, opts);
2230
- $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
2231
- nv_showNavi(opts, itms.total, conf);
2232
- nv_enableNavi(opts, itms.first, conf);
2233
-
2234
- return sz;
2235
- });
2236
-
2237
-
2238
- // destroy event
2239
- $cfs.bind(cf_e('destroy', conf), function(e, orgOrder) {
2240
- e.stopPropagation();
2241
- tmrs = sc_clearTimers(tmrs);
2242
-
2243
- $cfs.data('_cfs_isCarousel', false);
2244
- $cfs.trigger(cf_e('finish', conf));
2245
- if (orgOrder)
2246
- {
2247
- $cfs.trigger(cf_e('jumpToStart', conf));
2248
- }
2249
- sz_restoreOrigCss($cfs.children());
2250
- sz_restoreOrigCss($cfs);
2251
- FN._unbind_events();
2252
- FN._unbind_buttons();
2253
- if (conf.wrapper == 'parent')
2254
- {
2255
- sz_restoreOrigCss($wrp);
2256
- }
2257
- else
2258
- {
2259
- $wrp.replaceWith($cfs);
2260
- }
2261
-
2262
- return true;
2263
- });
2264
-
2265
-
2266
- // debug event
2267
- $cfs.bind(cf_e('debug', conf), function(e) {
2268
- debug(conf, 'Carousel width: ' + opts.width);
2269
- debug(conf, 'Carousel height: ' + opts.height);
2270
- debug(conf, 'Item widths: ' + opts.items.width);
2271
- debug(conf, 'Item heights: ' + opts.items.height);
2272
- debug(conf, 'Number of items visible: ' + opts.items.visible);
2273
- if (opts.auto.play)
2274
- {
2275
- debug(conf, 'Number of items scrolled automatically: ' + opts.auto.items);
2276
- }
2277
- if (opts.prev.button)
2278
- {
2279
- debug(conf, 'Number of items scrolled backward: ' + opts.prev.items);
2280
- }
2281
- if (opts.next.button)
2282
- {
2283
- debug(conf, 'Number of items scrolled forward: ' + opts.next.items);
2284
- }
2285
- return conf.debug;
2286
- });
2287
-
2288
-
2289
- // triggerEvent, making prefixed and namespaced events accessible from outside
2290
- $cfs.bind('_cfs_triggerEvent', function(e, n, o) {
2291
- e.stopPropagation();
2292
- return $cfs.triggerHandler(cf_e(n, conf), o);
2293
- });
2294
- }; // /bind_events
2295
-
2296
-
2297
- FN._unbind_events = function() {
2298
- $cfs.unbind(cf_e('', conf));
2299
- $cfs.unbind(cf_e('', conf, false));
2300
- $cfs.unbind('_cfs_triggerEvent');
2301
- }; // /unbind_events
2302
-
2303
-
2304
- FN._bind_buttons = function() {
2305
- FN._unbind_buttons();
2306
- nv_showNavi(opts, itms.total, conf);
2307
- nv_enableNavi(opts, itms.first, conf);
2308
-
2309
- if (opts.auto.pauseOnHover)
2310
- {
2311
- var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover);
2312
- $wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2313
- .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2314
- }
2315
-
2316
- // play button
2317
- if (opts.auto.button)
2318
- {
2319
- opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) {
2320
- e.preventDefault();
2321
- var ev = false,
2322
- pC = null;
2323
-
2324
- if (crsl.isPaused)
2325
- {
2326
- ev = 'play';
2327
- }
2328
- else if (opts.auto.pauseOnEvent)
2329
- {
2330
- ev = 'pause';
2331
- pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);
2332
- }
2333
- if (ev)
2334
- {
2335
- $cfs.trigger(cf_e(ev, conf), pC);
2336
- }
2337
- });
2338
- }
2339
-
2340
- // prev button
2341
- if (opts.prev.button)
2342
- {
2343
- opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
2344
- e.preventDefault();
2345
- $cfs.trigger(cf_e('prev', conf));
2346
- });
2347
- if (opts.prev.pauseOnHover)
2348
- {
2349
- var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover);
2350
- opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2351
- .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2352
- }
2353
- }
2354
-
2355
- // next butotn
2356
- if (opts.next.button)
2357
- {
2358
- opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
2359
- e.preventDefault();
2360
- $cfs.trigger(cf_e('next', conf));
2361
- });
2362
- if (opts.next.pauseOnHover)
2363
- {
2364
- var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover);
2365
- opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2366
- .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2367
- }
2368
- }
2369
-
2370
- // pagination
2371
- if (opts.pagination.container)
2372
- {
2373
- if (opts.pagination.pauseOnHover)
2374
- {
2375
- var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);
2376
- opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2377
- .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2378
- }
2379
- }
2380
-
2381
- // prev/next keys
2382
- if (opts.prev.key || opts.next.key)
2383
- {
2384
- $(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
2385
- var k = e.keyCode;
2386
- if (k == opts.next.key)
2387
- {
2388
- e.preventDefault();
2389
- $cfs.trigger(cf_e('next', conf));
2390
- }
2391
- if (k == opts.prev.key)
2392
- {
2393
- e.preventDefault();
2394
- $cfs.trigger(cf_e('prev', conf));
2395
- }
2396
- });
2397
- }
2398
-
2399
- // pagination keys
2400
- if (opts.pagination.keys)
2401
- {
2402
- $(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
2403
- var k = e.keyCode;
2404
- if (k >= 49 && k < 58)
2405
- {
2406
- k = (k-49) * opts.items.visible;
2407
- if (k <= itms.total)
2408
- {
2409
- e.preventDefault();
2410
- $cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]);
2411
- }
2412
- }
2413
- });
2414
- }
2415
-
2416
- // swipe
2417
- if ($.fn.swipe)
2418
- {
2419
- var isTouch = 'ontouchstart' in window;
2420
- if ((isTouch && opts.swipe.onTouch) || (!isTouch && opts.swipe.onMouse))
2421
- {
2422
- var scP = $.extend(true, {}, opts.prev, opts.swipe),
2423
- scN = $.extend(true, {}, opts.next, opts.swipe),
2424
- swP = function() { $cfs.trigger(cf_e('prev', conf), [scP]) },
2425
- swN = function() { $cfs.trigger(cf_e('next', conf), [scN]) };
2426
-
2427
- switch (opts.direction)
2428
- {
2429
- case 'up':
2430
- case 'down':
2431
- opts.swipe.options.swipeUp = swN;
2432
- opts.swipe.options.swipeDown = swP;
2433
- break;
2434
- default:
2435
- opts.swipe.options.swipeLeft = swN;
2436
- opts.swipe.options.swipeRight = swP;
2437
- }
2438
- if (crsl.swipe)
2439
- {
2440
- $cfs.swipe('destroy');
2441
- }
2442
- $wrp.swipe(opts.swipe.options);
2443
- $wrp.css('cursor', 'move');
2444
- crsl.swipe = true;
2445
- }
2446
- }
2447
-
2448
- // mousewheel
2449
- if ($.fn.mousewheel)
2450
- {
2451
-
2452
- if (opts.mousewheel)
2453
- {
2454
- var mcP = $.extend(true, {}, opts.prev, opts.mousewheel),
2455
- mcN = $.extend(true, {}, opts.next, opts.mousewheel);
2456
-
2457
- if (crsl.mousewheel)
2458
- {
2459
- $wrp.unbind(cf_e('mousewheel', conf, false));
2460
- }
2461
- $wrp.bind(cf_e('mousewheel', conf, false), function(e, delta) {
2462
- e.preventDefault();
2463
- if (delta > 0)
2464
- {
2465
- $cfs.trigger(cf_e('prev', conf), [mcP]);
2466
- }
2467
- else
2468
- {
2469
- $cfs.trigger(cf_e('next', conf), [mcN]);
2470
- }
2471
- });
2472
- crsl.mousewheel = true;
2473
- }
2474
- }
2475
-
2476
- if (opts.auto.play)
2477
- {
2478
- $cfs.trigger(cf_e('play', conf), opts.auto.delay);
2479
- }
2480
-
2481
- if (crsl.upDateOnWindowResize)
2482
- {
2483
- var resizeFn = function(e) {
2484
- $cfs.trigger(cf_e('finish', conf));
2485
- if (opts.auto.pauseOnResize && !crsl.isPaused)
2486
- {
2487
- $cfs.trigger(cf_e('play', conf));
2488
- }
2489
- sz_resetMargin($cfs.children(), opts);
2490
- $cfs.trigger(cf_e('updateSizes', conf));
2491
- };
2492
-
2493
- var $w = $(window),
2494
- onResize = null;
2495
-
2496
- if ($.debounce && conf.onWindowResize == 'debounce')
2497
- {
2498
- onResize = $.debounce(200, resizeFn);
2499
- }
2500
- else if ($.throttle && conf.onWindowResize == 'throttle')
2501
- {
2502
- onResize = $.throttle(300, resizeFn);
2503
- }
2504
- else
2505
- {
2506
- var _windowWidth = 0,
2507
- _windowHeight = 0;
2508
-
2509
- onResize = function() {
2510
- var nw = $w.width(),
2511
- nh = $w.height();
2512
-
2513
- if (nw != _windowWidth || nh != _windowHeight)
2514
- {
2515
- resizeFn();
2516
- _windowWidth = nw;
2517
- _windowHeight = nh;
2518
- }
2519
- };
2520
- }
2521
- $w.bind(cf_e('resize', conf, false, true, true), onResize);
2522
- }
2523
- }; // /bind_buttons
2524
-
2525
-
2526
- FN._unbind_buttons = function() {
2527
- var ns1 = cf_e('', conf),
2528
- ns2 = cf_e('', conf, false);
2529
- ns3 = cf_e('', conf, false, true, true);
2530
-
2531
- $(document).unbind(ns3);
2532
- $(window).unbind(ns3);
2533
- $wrp.unbind(ns2);
2534
-
2535
- if (opts.auto.button)
2536
- {
2537
- opts.auto.button.unbind(ns2);
2538
- }
2539
- if (opts.prev.button)
2540
- {
2541
- opts.prev.button.unbind(ns2);
2542
- }
2543
- if (opts.next.button)
2544
- {
2545
- opts.next.button.unbind(ns2);
2546
- }
2547
- if (opts.pagination.container)
2548
- {
2549
- opts.pagination.container.unbind(ns2);
2550
- if (opts.pagination.anchorBuilder)
2551
- {
2552
- opts.pagination.container.children().remove();
2553
- }
2554
- }
2555
- if (crsl.swipe)
2556
- {
2557
- $cfs.swipe('destroy');
2558
- $wrp.css('cursor', 'default');
2559
- crsl.swipe = false;
2560
- }
2561
- if (crsl.mousewheel)
2562
- {
2563
- crsl.mousewheel = false;
2564
- }
2565
-
2566
- nv_showNavi(opts, 'hide', conf);
2567
- nv_enableNavi(opts, 'removeClass', conf);
2568
-
2569
- }; // /unbind_buttons
2570
-
2571
-
2572
-
2573
- // START
2574
-
2575
- if (is_boolean(configs))
2576
- {
2577
- configs = {
2578
- 'debug': configs
2579
- };
2580
- }
2581
-
2582
- // set vars
2583
- var crsl = {
2584
- 'direction' : 'next',
2585
- 'isPaused' : true,
2586
- 'isScrolling' : false,
2587
- 'isStopped' : false,
2588
- 'mousewheel' : false,
2589
- 'swipe' : false
2590
- },
2591
- itms = {
2592
- 'total' : $cfs.children().length,
2593
- 'first' : 0
2594
- },
2595
- tmrs = {
2596
- 'auto' : null,
2597
- 'progress' : null,
2598
- 'startTime' : getTime(),
2599
- 'timePassed' : 0
2600
- },
2601
- scrl = {
2602
- 'isStopped' : false,
2603
- 'duration' : 0,
2604
- 'startTime' : 0,
2605
- 'easing' : '',
2606
- 'anims' : []
2607
- },
2608
- clbk = {
2609
- 'onBefore' : [],
2610
- 'onAfter' : []
2611
- },
2612
- queu = [],
2613
- conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs),
2614
- opts = {},
2615
- opts_orig = $.extend(true, {}, options),
2616
- $wrp = (conf.wrapper == 'parent')
2617
- ? $cfs.parent()
2618
- : $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();
2619
-
2620
-
2621
- conf.selector = $cfs.selector;
2622
- conf.serialNumber = $.fn.carouFredSel.serialNumber++;
2623
-
2624
- conf.transition = (conf.transition && $.fn.transition) ? 'transition' : 'animate';
2625
-
2626
- // create carousel
2627
- FN._init(opts_orig, true, starting_position);
2628
- FN._build();
2629
- FN._bind_events();
2630
- FN._bind_buttons();
2631
-
2632
- // find item to start
2633
- if (is_array(opts.items.start))
2634
- {
2635
- var start_arr = opts.items.start;
2636
- }
2637
- else
2638
- {
2639
- var start_arr = [];
2640
- if (opts.items.start != 0)
2641
- {
2642
- start_arr.push(opts.items.start);
2643
- }
2644
- }
2645
- if (opts.cookie)
2646
- {
2647
- start_arr.unshift(parseInt(cf_getCookie(opts.cookie), 10));
2648
- }
2649
-
2650
- if (start_arr.length > 0)
2651
- {
2652
- for (var a = 0, l = start_arr.length; a < l; a++)
2653
- {
2654
- var s = start_arr[a];
2655
- if (s == 0)
2656
- {
2657
- continue;
2658
- }
2659
- if (s === true)
2660
- {
2661
- s = window.location.hash;
2662
- if (s.length < 1)
2663
- {
2664
- continue;
2665
- }
2666
- }
2667
- else if (s === 'random')
2668
- {
2669
- s = Math.floor(Math.random()*itms.total);
2670
- }
2671
- if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }]))
2672
- {
2673
- break;
2674
- }
2675
- }
2676
- }
2677
- var siz = sz_setSizes($cfs, opts),
2678
- itm = gi_getCurrentItems($cfs.children(), opts);
2679
-
2680
- if (opts.onCreate)
2681
- {
2682
- opts.onCreate.call($tt0, {
2683
- 'width': siz.width,
2684
- 'height': siz.height,
2685
- 'items': itm
2686
- });
2687
- }
2688
-
2689
- $cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
2690
- $cfs.trigger(cf_e('linkAnchors', conf));
2691
-
2692
- if (conf.debug)
2693
- {
2694
- $cfs.trigger(cf_e('debug', conf));
2695
- }
2696
-
2697
- return $cfs;
2698
- };
2699
-
2700
-
2701
-
2702
- // GLOBAL PUBLIC
2703
-
2704
- $.fn.carouFredSel.serialNumber = 1;
2705
- $.fn.carouFredSel.defaults = {
2706
- 'synchronise' : false,
2707
- 'infinite' : true,
2708
- 'circular' : true,
2709
- 'responsive' : false,
2710
- 'direction' : 'left',
2711
- 'items' : {
2712
- 'start' : 0
2713
- },
2714
- 'scroll' : {
2715
- 'easing' : 'swing',
2716
- 'duration' : 500,
2717
- 'pauseOnHover' : false,
2718
- 'event' : 'click',
2719
- 'queue' : false
2720
- }
2721
- };
2722
- $.fn.carouFredSel.configs = {
2723
- 'debug' : false,
2724
- 'transition' : false,
2725
- 'onWindowResize': 'throttle',
2726
- 'events' : {
2727
- 'prefix' : '',
2728
- 'namespace' : 'cfs'
2729
- },
2730
- 'wrapper' : {
2731
- 'element' : 'div',
2732
- 'classname' : 'caroufredsel_wrapper'
2733
- },
2734
- 'classnames' : {}
2735
- };
2736
- $.fn.carouFredSel.pageAnchorBuilder = function(nr) {
2737
- return '<a href="#"><span>'+nr+'</span></a>';
2738
- };
2739
- $.fn.carouFredSel.progressbarUpdater = function(perc) {
2740
- $(this).css('width', perc+'%');
2741
- };
2742
-
2743
- $.fn.carouFredSel.cookie = {
2744
- get: function(n) {
2745
- n += '=';
2746
- var ca = document.cookie.split(';');
2747
- for (var a = 0, l = ca.length; a < l; a++)
2748
- {
2749
- var c = ca[a];
2750
- while (c.charAt(0) == ' ')
2751
- {
2752
- c = c.slice(1);
2753
- }
2754
- if (c.indexOf(n) == 0)
2755
- {
2756
- return c.slice(n.length);
2757
- }
2758
- }
2759
- return 0;
2760
- },
2761
- set: function(n, v, d) {
2762
- var e = "";
2763
- if (d)
2764
- {
2765
- var date = new Date();
2766
- date.setTime(date.getTime() + (d * 24 * 60 * 60 * 1000));
2767
- e = "; expires=" + date.toGMTString();
2768
- }
2769
- document.cookie = n + '=' + v + e + '; path=/';
2770
- },
2771
- remove: function(n) {
2772
- $.fn.carouFredSel.cookie.set(n, "", -1);
2773
- }
2774
- };
2775
-
2776
-
2777
- // GLOBAL PRIVATE
2778
-
2779
- // scrolling functions
2780
- function sc_setScroll(d, e, c) {
2781
- if (c.transition == 'transition')
2782
- {
2783
- if (e == 'swing')
2784
- {
2785
- e = 'ease';
2786
- }
2787
- }
2788
- return {
2789
- anims: [],
2790
- duration: d,
2791
- orgDuration: d,
2792
- easing: e,
2793
- startTime: getTime()
2794
- };
2795
- }
2796
- function sc_startScroll(s, c) {
2797
- for (var a = 0, l = s.anims.length; a < l; a++)
2798
- {
2799
- var b = s.anims[a];
2800
- if (!b)
2801
- {
2802
- continue;
2803
- }
2804
- b[0][c.transition](b[1], s.duration, s.easing, b[2]);
2805
- }
2806
- }
2807
- function sc_stopScroll(s, finish) {
2808
- if (!is_boolean(finish))
2809
- {
2810
- finish = true;
2811
- }
2812
- if (is_object(s.pre))
2813
- {
2814
- sc_stopScroll(s.pre, finish);
2815
- }
2816
- for (var a = 0, l = s.anims.length; a < l; a++)
2817
- {
2818
- var b = s.anims[a];
2819
- b[0].stop(true);
2820
- if (finish)
2821
- {
2822
- b[0].css(b[1]);
2823
- if (is_function(b[2]))
2824
- {
2825
- b[2]();
2826
- }
2827
- }
2828
- }
2829
- if (is_object(s.post))
2830
- {
2831
- sc_stopScroll(s.post, finish);
2832
- }
2833
- }
2834
- function sc_afterScroll( $c, $c2, o ) {
2835
- if ($c2)
2836
- {
2837
- $c2.remove();
2838
- }
2839
-
2840
- switch(o.fx) {
2841
- case 'fade':
2842
- case 'crossfade':
2843
- case 'cover-fade':
2844
- case 'uncover-fade':
2845
- $c.css('opacity', 1);
2846
- $c.css('filter', '');
2847
- break;
2848
- }
2849
- }
2850
- function sc_fireCallbacks($t, o, b, a, c) {
2851
- if (o[b])
2852
- {
2853
- o[b].call($t, a);
2854
- }
2855
- if (c[b].length)
2856
- {
2857
- for (var i = 0, l = c[b].length; i < l; i++)
2858
- {
2859
- c[b][i].call($t, a);
2860
- }
2861
- }
2862
- return [];
2863
- }
2864
- function sc_fireQueue($c, q, c) {
2865
-
2866
- if (q.length)
2867
- {
2868
- $c.trigger(cf_e(q[0][0], c), q[0][1]);
2869
- q.shift();
2870
- }
2871
- return q;
2872
- }
2873
- function sc_hideHiddenItems(hiddenitems) {
2874
- hiddenitems.each(function() {
2875
- var hi = $(this);
2876
- hi.data('_cfs_isHidden', hi.is(':hidden')).hide();
2877
- });
2878
- }
2879
- function sc_showHiddenItems(hiddenitems) {
2880
- if (hiddenitems)
2881
- {
2882
- hiddenitems.each(function() {
2883
- var hi = $(this);
2884
- if (!hi.data('_cfs_isHidden'))
2885
- {
2886
- hi.show();
2887
- }
2888
- });
2889
- }
2890
- }
2891
- function sc_clearTimers(t) {
2892
- if (t.auto)
2893
- {
2894
- clearTimeout(t.auto);
2895
- }
2896
- if (t.progress)
2897
- {
2898
- clearInterval(t.progress);
2899
- }
2900
- return t;
2901
- }
2902
- function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) {
2903
- return {
2904
- 'width': w_siz.width,
2905
- 'height': w_siz.height,
2906
- 'items': {
2907
- 'old': i_old,
2908
- 'skipped': i_skp,
2909
- 'visible': i_new
2910
- },
2911
- 'scroll': {
2912
- 'items': s_itm,
2913
- 'direction': s_dir,
2914
- 'duration': s_dur
2915
- }
2916
- };
2917
- }
2918
- function sc_getDuration( sO, o, nI, siz ) {
2919
- var dur = sO.duration;
2920
- if (sO.fx == 'none')
2921
- {
2922
- return 0;
2923
- }
2924
- if (dur == 'auto')
2925
- {
2926
- dur = o.scroll.duration / o.scroll.items * nI;
2927
- }
2928
- else if (dur < 10)
2929
- {
2930
- dur = siz / dur;
2931
- }
2932
- if (dur < 1)
2933
- {
2934
- return 0;
2935
- }
2936
- if (sO.fx == 'fade')
2937
- {
2938
- dur = dur / 2;
2939
- }
2940
- return Math.round(dur);
2941
- }
2942
-
2943
- // navigation functions
2944
- function nv_showNavi(o, t, c) {
2945
- var minimum = (is_number(o.items.minimum)) ? o.items.minimum : o.items.visible + 1;
2946
- if (t == 'show' || t == 'hide')
2947
- {
2948
- var f = t;
2949
- }
2950
- else if (minimum > t)
2951
- {
2952
- debug(c, 'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.');
2953
- var f = 'hide';
2954
- }
2955
- else
2956
- {
2957
- var f = 'show';
2958
- }
2959
- var s = (f == 'show') ? 'removeClass' : 'addClass',
2960
- h = cf_c('hidden', c);
2961
-
2962
- if (o.auto.button)
2963
- {
2964
- o.auto.button[f]()[s](h);
2965
- }
2966
- if (o.prev.button)
2967
- {
2968
- o.prev.button[f]()[s](h);
2969
- }
2970
- if (o.next.button)
2971
- {
2972
- o.next.button[f]()[s](h);
2973
- }
2974
- if (o.pagination.container)
2975
- {
2976
- o.pagination.container[f]()[s](h);
2977
- }
2978
- }
2979
- function nv_enableNavi(o, f, c) {
2980
- if (o.circular || o.infinite) return;
2981
- var fx = (f == 'removeClass' || f == 'addClass') ? f : false,
2982
- di = cf_c('disabled', c);
2983
-
2984
- if (o.auto.button && fx)
2985
- {
2986
- o.auto.button[fx](di);
2987
- }
2988
- if (o.prev.button)
2989
- {
2990
- var fn = fx || (f == 0) ? 'addClass' : 'removeClass';
2991
- o.prev.button[fn](di);
2992
- }
2993
- if (o.next.button)
2994
- {
2995
- var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass';
2996
- o.next.button[fn](di);
2997
- }
2998
- }
2999
-
3000
- // get object functions
3001
- function go_getObject($tt, obj) {
3002
- if (is_function(obj))
3003
- {
3004
- obj = obj.call($tt);
3005
- }
3006
- else if (is_undefined(obj))
3007
- {
3008
- obj = {};
3009
- }
3010
- return obj;
3011
- }
3012
- function go_getItemsObject($tt, obj) {
3013
- obj = go_getObject($tt, obj);
3014
- if (is_number(obj))
3015
- {
3016
- obj = {
3017
- 'visible': obj
3018
- };
3019
- }
3020
- else if (obj == 'variable')
3021
- {
3022
- obj = {
3023
- 'visible': obj,
3024
- 'width': obj,
3025
- 'height': obj
3026
- };
3027
- }
3028
- else if (!is_object(obj))
3029
- {
3030
- obj = {};
3031
- }
3032
- return obj;
3033
- }
3034
- function go_getScrollObject($tt, obj) {
3035
- obj = go_getObject($tt, obj);
3036
- if (is_number(obj))
3037
- {
3038
- if (obj <= 50)
3039
- {
3040
- obj = {
3041
- 'items': obj
3042
- };
3043
- }
3044
- else
3045
- {
3046
- obj = {
3047
- 'duration': obj
3048
- };
3049
- }
3050
- }
3051
- else if (is_string(obj))
3052
- {
3053
- obj = {
3054
- 'easing': obj
3055
- };
3056
- }
3057
- else if (!is_object(obj))
3058
- {
3059
- obj = {};
3060
- }
3061
- return obj;
3062
- }
3063
- function go_getNaviObject($tt, obj) {
3064
- obj = go_getObject($tt, obj);
3065
- if (is_string(obj))
3066
- {
3067
- var temp = cf_getKeyCode(obj);
3068
- if (temp == -1)
3069
- {
3070
- obj = $(obj);
3071
- }
3072
- else
3073
- {
3074
- obj = temp;
3075
- }
3076
- }
3077
- return obj;
3078
- }
3079
-
3080
- function go_getAutoObject($tt, obj) {
3081
- obj = go_getNaviObject($tt, obj);
3082
- if (is_jquery(obj))
3083
- {
3084
- obj = {
3085
- 'button': obj
3086
- };
3087
- }
3088
- else if (is_boolean(obj))
3089
- {
3090
- obj = {
3091
- 'play': obj
3092
- };
3093
- }
3094
- else if (is_number(obj))
3095
- {
3096
- obj = {
3097
- 'timeoutDuration': obj
3098
- };
3099
- }
3100
- if (obj.progress)
3101
- {
3102
- if (is_string(obj.progress) || is_jquery(obj.progress))
3103
- {
3104
- obj.progress = {
3105
- 'bar': obj.progress
3106
- };
3107
- }
3108
- }
3109
- return obj;
3110
- }
3111
- function go_complementAutoObject($tt, obj) {
3112
- if (is_function(obj.button))
3113
- {
3114
- obj.button = obj.button.call($tt);
3115
- }
3116
- if (is_string(obj.button))
3117
- {
3118
- obj.button = $(obj.button);
3119
- }
3120
- if (!is_boolean(obj.play))
3121
- {
3122
- obj.play = true;
3123
- }
3124
- if (!is_number(obj.delay))
3125
- {
3126
- obj.delay = 0;
3127
- }
3128
- if (is_undefined(obj.pauseOnEvent))
3129
- {
3130
- obj.pauseOnEvent = true;
3131
- }
3132
- if (!is_boolean(obj.pauseOnResize))
3133
- {
3134
- obj.pauseOnResize = true;
3135
- }
3136
- if (!is_number(obj.timeoutDuration))
3137
- {
3138
- obj.timeoutDuration = (obj.duration < 10)
3139
- ? 2500
3140
- : obj.duration * 5;
3141
- }
3142
- if (obj.progress)
3143
- {
3144
- if (is_function(obj.progress.bar))
3145
- {
3146
- obj.progress.bar = obj.progress.bar.call($tt);
3147
- }
3148
- if (is_string(obj.progress.bar))
3149
- {
3150
- obj.progress.bar = $(obj.progress.bar);
3151
- }
3152
- if (obj.progress.bar)
3153
- {
3154
- if (!is_function(obj.progress.updater))
3155
- {
3156
- obj.progress.updater = $.fn.carouFredSel.progressbarUpdater;
3157
- }
3158
- if (!is_number(obj.progress.interval))
3159
- {
3160
- obj.progress.interval = 50;
3161
- }
3162
- }
3163
- else
3164
- {
3165
- obj.progress = false;
3166
- }
3167
- }
3168
- return obj;
3169
- }
3170
-
3171
- function go_getPrevNextObject($tt, obj) {
3172
- obj = go_getNaviObject($tt, obj);
3173
- if (is_jquery(obj))
3174
- {
3175
- obj = {
3176
- 'button': obj
3177
- };
3178
- }
3179
- else if (is_number(obj))
3180
- {
3181
- obj = {
3182
- 'key': obj
3183
- };
3184
- }
3185
- return obj;
3186
- }
3187
- function go_complementPrevNextObject($tt, obj) {
3188
- if (is_function(obj.button))
3189
- {
3190
- obj.button = obj.button.call($tt);
3191
- }
3192
- if (is_string(obj.button))
3193
- {
3194
- obj.button = $(obj.button);
3195
- }
3196
- if (is_string(obj.key))
3197
- {
3198
- obj.key = cf_getKeyCode(obj.key);
3199
- }
3200
- return obj;
3201
- }
3202
-
3203
- function go_getPaginationObject($tt, obj) {
3204
- obj = go_getNaviObject($tt, obj);
3205
- if (is_jquery(obj))
3206
- {
3207
- obj = {
3208
- 'container': obj
3209
- };
3210
- }
3211
- else if (is_boolean(obj))
3212
- {
3213
- obj = {
3214
- 'keys': obj
3215
- };
3216
- }
3217
- return obj;
3218
- }
3219
- function go_complementPaginationObject($tt, obj) {
3220
- if (is_function(obj.container))
3221
- {
3222
- obj.container = obj.container.call($tt);
3223
- }
3224
- if (is_string(obj.container))
3225
- {
3226
- obj.container = $(obj.container);
3227
- }
3228
- if (!is_number(obj.items))
3229
- {
3230
- obj.items = false;
3231
- }
3232
- if (!is_boolean(obj.keys))
3233
- {
3234
- obj.keys = false;
3235
- }
3236
- if (!is_function(obj.anchorBuilder) && !is_false(obj.anchorBuilder))
3237
- {
3238
- obj.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder;
3239
- }
3240
- if (!is_number(obj.deviation))
3241
- {
3242
- obj.deviation = 0;
3243
- }
3244
- return obj;
3245
- }
3246
-
3247
- function go_getSwipeObject($tt, obj) {
3248
- if (is_function(obj))
3249
- {
3250
- obj = obj.call($tt);
3251
- }
3252
- if (is_undefined(obj))
3253
- {
3254
- obj = {
3255
- 'onTouch': false
3256
- };
3257
- }
3258
- if (is_true(obj))
3259
- {
3260
- obj = {
3261
- 'onTouch': obj
3262
- };
3263
- }
3264
- else if (is_number(obj))
3265
- {
3266
- obj = {
3267
- 'items': obj
3268
- };
3269
- }
3270
- return obj;
3271
- }
3272
- function go_complementSwipeObject($tt, obj) {
3273
- if (!is_boolean(obj.onTouch))
3274
- {
3275
- obj.onTouch = true;
3276
- }
3277
- if (!is_boolean(obj.onMouse))
3278
- {
3279
- obj.onMouse = false;
3280
- }
3281
- if (!is_object(obj.options))
3282
- {
3283
- obj.options = {};
3284
- }
3285
- if (!is_boolean(obj.options.triggerOnTouchEnd))
3286
- {
3287
- obj.options.triggerOnTouchEnd = false;
3288
- }
3289
- return obj;
3290
- }
3291
- function go_getMousewheelObject($tt, obj) {
3292
- if (is_function(obj))
3293
- {
3294
- obj = obj.call($tt);
3295
- }
3296
- if (is_true(obj))
3297
- {
3298
- obj = {};
3299
- }
3300
- else if (is_number(obj))
3301
- {
3302
- obj = {
3303
- 'items': obj
3304
- };
3305
- }
3306
- else if (is_undefined(obj))
3307
- {
3308
- obj = false;
3309
- }
3310
- return obj;
3311
- }
3312
- function go_complementMousewheelObject($tt, obj) {
3313
- return obj;
3314
- }
3315
-
3316
- // get number functions
3317
- function gn_getItemIndex(num, dev, org, items, $cfs) {
3318
- if (is_string(num))
3319
- {
3320
- num = $(num, $cfs);
3321
- }
3322
-
3323
- if (is_object(num))
3324
- {
3325
- num = $(num, $cfs);
3326
- }
3327
- if (is_jquery(num))
3328
- {
3329
- num = $cfs.children().index(num);
3330
- if (!is_boolean(org))
3331
- {
3332
- org = false;
3333
- }
3334
- }
3335
- else
3336
- {
3337
- if (!is_boolean(org))
3338
- {
3339
- org = true;
3340
- }
3341
- }
3342
- if (!is_number(num))
3343
- {
3344
- num = 0;
3345
- }
3346
- if (!is_number(dev))
3347
- {
3348
- dev = 0;
3349
- }
3350
-
3351
- if (org)
3352
- {
3353
- num += items.first;
3354
- }
3355
- num += dev;
3356
- if (items.total > 0)
3357
- {
3358
- while (num >= items.total)
3359
- {
3360
- num -= items.total;
3361
- }
3362
- while (num < 0)
3363
- {
3364
- num += items.total;
3365
- }
3366
- }
3367
- return num;
3368
- }
3369
-
3370
- // items prev
3371
- function gn_getVisibleItemsPrev(i, o, s) {
3372
- var t = 0,
3373
- x = 0;
3374
-
3375
- for (var a = s; a >= 0; a--)
3376
- {
3377
- var j = i.eq(a);
3378
- t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
3379
- if (t > o.maxDimension)
3380
- {
3381
- return x;
3382
- }
3383
- if (a == 0)
3384
- {
3385
- a = i.length;
3386
- }
3387
- x++;
3388
- }
3389
- }
3390
- function gn_getVisibleItemsPrevFilter(i, o, s) {
3391
- return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s);
3392
- }
3393
- function gn_getScrollItemsPrevFilter(i, o, s, m) {
3394
- return gn_getItemsPrevFilter(i, o.items.filter, m, s);
3395
- }
3396
- function gn_getItemsPrevFilter(i, f, m, s) {
3397
- var t = 0,
3398
- x = 0;
3399
-
3400
- for (var a = s, l = i.length; a >= 0; a--)
3401
- {
3402
- x++;
3403
- if (x == l)
3404
- {
3405
- return x;
3406
- }
3407
-
3408
- var j = i.eq(a);
3409
- if (j.is(f))
3410
- {
3411
- t++;
3412
- if (t == m)
3413
- {
3414
- return x;
3415
- }
3416
- }
3417
- if (a == 0)
3418
- {
3419
- a = l;
3420
- }
3421
- }
3422
- }
3423
-
3424
- function gn_getVisibleOrg($c, o) {
3425
- return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length;
3426
- }
3427
-
3428
- // items next
3429
- function gn_getVisibleItemsNext(i, o, s) {
3430
- var t = 0,
3431
- x = 0;
3432
-
3433
- for (var a = s, l = i.length-1; a <= l; a++)
3434
- {
3435
- var j = i.eq(a);
3436
-
3437
- t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
3438
- if (t > o.maxDimension)
3439
- {
3440
- return x;
3441
- }
3442
-
3443
- x++;
3444
- if (x == l+1)
3445
- {
3446
- return x;
3447
- }
3448
- if (a == l)
3449
- {
3450
- a = -1;
3451
- }
3452
- }
3453
- }
3454
- function gn_getVisibleItemsNextTestCircular(i, o, s, l) {
3455
- var v = gn_getVisibleItemsNext(i, o, s);
3456
- if (!o.circular)
3457
- {
3458
- if (s + v > l)
3459
- {
3460
- v = l - s;
3461
- }
3462
- }
3463
- return v;
3464
- }
3465
- function gn_getVisibleItemsNextFilter(i, o, s) {
3466
- return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular);
3467
- }
3468
- function gn_getScrollItemsNextFilter(i, o, s, m) {
3469
- return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1;
3470
- }
3471
- function gn_getItemsNextFilter(i, f, m, s, c) {
3472
- var t = 0,
3473
- x = 0;
3474
-
3475
- for (var a = s, l = i.length-1; a <= l; a++)
3476
- {
3477
- x++;
3478
- if (x >= l)
3479
- {
3480
- return x;
3481
- }
3482
-
3483
- var j = i.eq(a);
3484
- if (j.is(f))
3485
- {
3486
- t++;
3487
- if (t == m)
3488
- {
3489
- return x;
3490
- }
3491
- }
3492
- if (a == l)
3493
- {
3494
- a = -1;
3495
- }
3496
- }
3497
- }
3498
-
3499
- // get items functions
3500
- function gi_getCurrentItems(i, o) {
3501
- return i.slice(0, o.items.visible);
3502
- }
3503
- function gi_getOldItemsPrev(i, o, n) {
3504
- return i.slice(n, o.items.visibleConf.old+n);
3505
- }
3506
- function gi_getNewItemsPrev(i, o) {
3507
- return i.slice(0, o.items.visible);
3508
- }
3509
- function gi_getOldItemsNext(i, o) {
3510
- return i.slice(0, o.items.visibleConf.old);
3511
- }
3512
- function gi_getNewItemsNext(i, o, n) {
3513
- return i.slice(n, o.items.visible+n);
3514
- }
3515
-
3516
- // sizes functions
3517
- function sz_storeMargin(i, o, d) {
3518
- if (o.usePadding)
3519
- {
3520
- if (!is_string(d))
3521
- {
3522
- d = '_cfs_origCssMargin';
3523
- }
3524
- i.each(function() {
3525
- var j = $(this),
3526
- m = parseInt(j.css(o.d['marginRight']), 10);
3527
- if (!is_number(m))
3528
- {
3529
- m = 0;
3530
- }
3531
- j.data(d, m);
3532
- });
3533
- }
3534
- }
3535
- function sz_resetMargin(i, o, m) {
3536
- if (o.usePadding)
3537
- {
3538
- var x = (is_boolean(m)) ? m : false;
3539
- if (!is_number(m))
3540
- {
3541
- m = 0;
3542
- }
3543
- sz_storeMargin(i, o, '_cfs_tempCssMargin');
3544
- i.each(function() {
3545
- var j = $(this);
3546
- j.css(o.d['marginRight'], ((x) ? j.data('_cfs_tempCssMargin') : m + j.data('_cfs_origCssMargin')));
3547
- });
3548
- }
3549
- }
3550
- function sz_storeOrigCss(i) {
3551
- i.each(function() {
3552
- var j = $(this);
3553
- j.data('_cfs_origCss', j.attr('style') || '');
3554
- });
3555
- }
3556
- function sz_restoreOrigCss(i) {
3557
- i.each(function() {
3558
- var j = $(this);
3559
- j.attr('style', j.data('_cfs_origCss') || '');
3560
- });
3561
- }
3562
- function sz_setResponsiveSizes(o, all) {
3563
- var visb = o.items.visible,
3564
- newS = o.items[o.d['width']],
3565
- seco = o[o.d['height']],
3566
- secp = is_percentage(seco);
3567
-
3568
- all.each(function() {
3569
- var $t = $(this),
3570
- nw = newS - ms_getPaddingBorderMargin($t, o, 'Width');
3571
-
3572
- $t[o.d['width']](nw);
3573
- if (secp)
3574
- {
3575
- $t[o.d['height']](ms_getPercentage(nw, seco));
3576
- }
3577
- });
3578
- }
3579
- function sz_setSizes($c, o) {
3580
- var $w = $c.parent(),
3581
- $i = $c.children(),
3582
- $v = gi_getCurrentItems($i, o),
3583
- sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, false);
3584
-
3585
- $w.css(sz);
3586
-
3587
- if (o.usePadding)
3588
- {
3589
- var p = o.padding,
3590
- r = p[o.d[1]];
3591
-
3592
- if (o.align && r < 0)
3593
- {
3594
- r = 0;
3595
- }
3596
- var $l = $v.last();
3597
- $l.css(o.d['marginRight'], $l.data('_cfs_origCssMargin') + r);
3598
- $c.css(o.d['top'], p[o.d[0]]);
3599
- $c.css(o.d['left'], p[o.d[3]]);
3600
- }
3601
-
3602
- $c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2));
3603
- $c.css(o.d['height'], ms_getLargestSize($i, o, 'height'));
3604
- return sz;
3605
- }
3606
-
3607
- // measuring functions
3608
- function ms_getSizes(i, o, wrapper) {
3609
- return [ms_getTotalSize(i, o, 'width', wrapper), ms_getLargestSize(i, o, 'height', wrapper)];
3610
- }
3611
- function ms_getLargestSize(i, o, dim, wrapper) {
3612
- if (!is_boolean(wrapper))
3613
- {
3614
- wrapper = false;
3615
- }
3616
- if (is_number(o[o.d[dim]]) && wrapper)
3617
- {
3618
- return o[o.d[dim]];
3619
- }
3620
- if (is_number(o.items[o.d[dim]]))
3621
- {
3622
- return o.items[o.d[dim]];
3623
- }
3624
- dim = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight';
3625
- return ms_getTrueLargestSize(i, o, dim);
3626
- }
3627
- function ms_getTrueLargestSize(i, o, dim) {
3628
- var s = 0;
3629
-
3630
- for (var a = 0, l = i.length; a < l; a++)
3631
- {
3632
- var j = i.eq(a);
3633
-
3634
- var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
3635
- if (s < m)
3636
- {
3637
- s = m;
3638
- }
3639
- }
3640
- return s;
3641
- }
3642
-
3643
- function ms_getTotalSize(i, o, dim, wrapper) {
3644
- if (!is_boolean(wrapper))
3645
- {
3646
- wrapper = false;
3647
- }
3648
- if (is_number(o[o.d[dim]]) && wrapper)
3649
- {
3650
- return o[o.d[dim]];
3651
- }
3652
- if (is_number(o.items[o.d[dim]]))
3653
- {
3654
- return o.items[o.d[dim]] * i.length;
3655
- }
3656
-
3657
- var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight',
3658
- s = 0;
3659
-
3660
- for (var a = 0, l = i.length; a < l; a++)
3661
- {
3662
- var j = i.eq(a);
3663
- s += (j.is(':visible')) ? j[o.d[d]](true) : 0;
3664
- }
3665
- return s;
3666
- }
3667
- function ms_getParentSize($w, o, d) {
3668
- var isVisible = $w.is(':visible');
3669
- if (isVisible)
3670
- {
3671
- $w.hide();
3672
- }
3673
- var s = $w.parent()[o.d[d]]();
3674
- if (isVisible)
3675
- {
3676
- $w.show();
3677
- }
3678
- return s;
3679
- }
3680
- function ms_getMaxDimension(o, a) {
3681
- return (is_number(o[o.d['width']])) ? o[o.d['width']] : a;
3682
- }
3683
- function ms_hasVariableSizes(i, o, dim) {
3684
- var s = false,
3685
- v = false;
3686
-
3687
- for (var a = 0, l = i.length; a < l; a++)
3688
- {
3689
- var j = i.eq(a);
3690
-
3691
- var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
3692
- if (s === false)
3693
- {
3694
- s = c;
3695
- }
3696
- else if (s != c)
3697
- {
3698
- v = true;
3699
- }
3700
- if (s == 0)
3701
- {
3702
- v = true;
3703
- }
3704
- }
3705
- return v;
3706
- }
3707
- function ms_getPaddingBorderMargin(i, o, d) {
3708
- return i[o.d['outer'+d]](true) - i[o.d[d.toLowerCase()]]();
3709
- }
3710
- function ms_getPercentage(s, o) {
3711
- if (is_percentage(o))
3712
- {
3713
- o = parseInt( o.slice(0, -1), 10 );
3714
- if (!is_number(o))
3715
- {
3716
- return s;
3717
- }
3718
- s *= o/100;
3719
- }
3720
- return s;
3721
- }
3722
-
3723
- // config functions
3724
- function cf_e(n, c, pf, ns, rd) {
3725
- if (!is_boolean(pf))
3726
- {
3727
- pf = true;
3728
- }
3729
- if (!is_boolean(ns))
3730
- {
3731
- ns = true;
3732
- }
3733
- if (!is_boolean(rd))
3734
- {
3735
- rd = false;
3736
- }
3737
-
3738
- if (pf)
3739
- {
3740
- n = c.events.prefix + n;
3741
- }
3742
- if (ns)
3743
- {
3744
- n = n +'.'+ c.events.namespace;
3745
- }
3746
- if (ns && rd)
3747
- {
3748
- n += c.serialNumber;
3749
- }
3750
-
3751
- return n;
3752
- }
3753
- function cf_c(n, c) {
3754
- return (is_string(c.classnames[n])) ? c.classnames[n] : n;
3755
- }
3756
- function cf_mapWrapperSizes(ws, o, p) {
3757
-
3758
- if (!is_boolean(p))
3759
- {
3760
- p = true;
3761
- }
3762
- var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0];
3763
- var wra = {};
3764
-
3765
- wra[o.d['width']] = ws[0] + pad[1] + pad[3];
3766
- wra[o.d['height']] = ws[1] + pad[0] + pad[2];
3767
-
3768
- return wra;
3769
- }
3770
- function cf_sortParams(vals, typs) {
3771
- var arr = [];
3772
- for (var a = 0, l1 = vals.length; a < l1; a++)
3773
- {
3774
- for (var b = 0, l2 = typs.length; b < l2; b++)
3775
- {
3776
- if (typs[b].indexOf(typeof vals[a]) > -1 && is_undefined(arr[b]))
3777
- {
3778
- arr[b] = vals[a];
3779
- break;
3780
- }
3781
- }
3782
- }
3783
- return arr;
3784
- }
3785
- function cf_getPadding(p) {
3786
- if (is_undefined(p))
3787
- {
3788
- return [0, 0, 0, 0];
3789
- }
3790
- if (is_number(p))
3791
- {
3792
- return [p, p, p, p];
3793
- }
3794
- if (is_string(p))
3795
- {
3796
- p = p.split('px').join('').split('em').join('').split(' ');
3797
- }
3798
-
3799
- if (!is_array(p))
3800
- {
3801
- return [0, 0, 0, 0];
3802
- }
3803
- for (var i = 0; i < 4; i++)
3804
- {
3805
- p[i] = parseInt(p[i], 10);
3806
- }
3807
- switch (p.length)
3808
- {
3809
- case 0:
3810
- return [0, 0, 0, 0];
3811
- case 1:
3812
- return [p[0], p[0], p[0], p[0]];
3813
- case 2:
3814
- return [p[0], p[1], p[0], p[1]];
3815
- case 3:
3816
- return [p[0], p[1], p[2], p[1]];
3817
- default:
3818
- return [p[0], p[1], p[2], p[3]];
3819
- }
3820
- }
3821
- function cf_getAlignPadding(itm, o) {
3822
- var x = (is_number(o[o.d['width']])) ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0;
3823
- switch (o.align)
3824
- {
3825
- case 'left':
3826
- return [0, x];
3827
- case 'right':
3828
- return [x, 0];
3829
- case 'center':
3830
- default:
3831
- return [Math.ceil(x/2), Math.floor(x/2)];
3832
- }
3833
- }
3834
- function cf_getDimensions(o) {
3835
- var dm = [
3836
- ['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3],
3837
- ['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0]
3838
- ];
3839
-
3840
- var dl = dm[0].length,
3841
- dx = (o.direction == 'right' || o.direction == 'left') ? 0 : 1;
3842
-
3843
- var dimensions = {};
3844
- for (var d = 0; d < dl; d++)
3845
- {
3846
- dimensions[dm[0][d]] = dm[dx][d];
3847
- }
3848
- return dimensions;
3849
- }
3850
- function cf_getAdjust(x, o, a, $t) {
3851
- var v = x;
3852
- if (is_function(a))
3853
- {
3854
- v = a.call($t, v);
3855
-
3856
- }
3857
- else if (is_string(a))
3858
- {
3859
- var p = a.split('+'),
3860
- m = a.split('-');
3861
-
3862
- if (m.length > p.length)
3863
- {
3864
- var neg = true,
3865
- sta = m[0],
3866
- adj = m[1];
3867
- }
3868
- else
3869
- {
3870
- var neg = false,
3871
- sta = p[0],
3872
- adj = p[1];
3873
- }
3874
-
3875
- switch(sta)
3876
- {
3877
- case 'even':
3878
- v = (x % 2 == 1) ? x-1 : x;
3879
- break;
3880
- case 'odd':
3881
- v = (x % 2 == 0) ? x-1 : x;
3882
- break;
3883
- default:
3884
- v = x;
3885
- break;
3886
- }
3887
- adj = parseInt(adj, 10);
3888
- if (is_number(adj))
3889
- {
3890
- if (neg)
3891
- {
3892
- adj = -adj;
3893
- }
3894
- v += adj;
3895
- }
3896
- }
3897
- if (!is_number(v) || v < 1)
3898
- {
3899
- v = 1;
3900
- }
3901
- return v;
3902
- }
3903
- function cf_getItemsAdjust(x, o, a, $t) {
3904
- return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf);
3905
- }
3906
- function cf_getItemAdjustMinMax(v, i) {
3907
- if (is_number(i.min) && v < i.min)
3908
- {
3909
- v = i.min;
3910
- }
3911
- if (is_number(i.max) && v > i.max)
3912
- {
3913
- v = i.max;
3914
- }
3915
- if (v < 1)
3916
- {
3917
- v = 1;
3918
- }
3919
- return v;
3920
- }
3921
- function cf_getSynchArr(s) {
3922
- if (!is_array(s))
3923
- {
3924
- s = [[s]];
3925
- }
3926
- if (!is_array(s[0]))
3927
- {
3928
- s = [s];
3929
- }
3930
- for (var j = 0, l = s.length; j < l; j++)
3931
- {
3932
- if (is_string(s[j][0]))
3933
- {
3934
- s[j][0] = $(s[j][0]);
3935
- }
3936
- if (!is_boolean(s[j][1]))
3937
- {
3938
- s[j][1] = true;
3939
- }
3940
- if (!is_boolean(s[j][2]))
3941
- {
3942
- s[j][2] = true;
3943
- }
3944
- if (!is_number(s[j][3]))
3945
- {
3946
- s[j][3] = 0;
3947
- }
3948
- }
3949
- return s;
3950
- }
3951
- function cf_getKeyCode(k) {
3952
- if (k == 'right')
3953
- {
3954
- return 39;
3955
- }
3956
- if (k == 'left')
3957
- {
3958
- return 37;
3959
- }
3960
- if (k == 'up')
3961
- {
3962
- return 38;
3963
- }
3964
- if (k == 'down')
3965
- {
3966
- return 40;
3967
- }
3968
- return -1;
3969
- }
3970
- function cf_setCookie(n, $c, c) {
3971
- if (n)
3972
- {
3973
- var v = $c.triggerHandler(cf_e('currentPosition', c));
3974
- $.fn.carouFredSel.cookie.set(n, v);
3975
- }
3976
- }
3977
- function cf_getCookie(n) {
3978
- var c = $.fn.carouFredSel.cookie.get(n);
3979
- return (c == '') ? 0 : c;
3980
- }
3981
-
3982
- // init function
3983
- function in_mapCss($elem, props) {
3984
- var css = {};
3985
- for (var p = 0, l = props.length; p < l; p++)
3986
- {
3987
- css[props[p]] = $elem.css(props[p]);
3988
- }
3989
- return css;
3990
- }
3991
- function in_complementItems(obj, opt, itm, sta) {
3992
- if (!is_object(obj.visibleConf))
3993
- {
3994
- obj.visibleConf = {};
3995
- }
3996
- if (!is_object(obj.sizesConf))
3997
- {
3998
- obj.sizesConf = {};
3999
- }
4000
-
4001
- if (obj.start == 0 && is_number(sta))
4002
- {
4003
- obj.start = sta;
4004
- }
4005
-
4006
- // visible items
4007
- if (is_object(obj.visible))
4008
- {
4009
- obj.visibleConf.min = obj.visible.min;
4010
- obj.visibleConf.max = obj.visible.max;
4011
- obj.visible = false;
4012
- }
4013
- else if (is_string(obj.visible))
4014
- {
4015
- // variable visible items
4016
- if (obj.visible == 'variable')
4017
- {
4018
- obj.visibleConf.variable = true;
4019
- }
4020
- // adjust string visible items
4021
- else
4022
- {
4023
- obj.visibleConf.adjust = obj.visible;
4024
- }
4025
- obj.visible = false;
4026
- }
4027
- else if (is_function(obj.visible))
4028
- {
4029
- obj.visibleConf.adjust = obj.visible;
4030
- obj.visible = false;
4031
- }
4032
-
4033
- // set items filter
4034
- if (!is_string(obj.filter))
4035
- {
4036
- obj.filter = (itm.filter(':hidden').length > 0) ? ':visible' : '*';
4037
- }
4038
-
4039
- // primary item-size not set
4040
- if (!obj[opt.d['width']])
4041
- {
4042
- // responsive carousel -> set to largest
4043
- if (opt.responsive)
4044
- {
4045
- debug(true, 'Set a '+opt.d['width']+' for the items!');
4046
- obj[opt.d['width']] = ms_getTrueLargestSize(itm, opt, 'outerWidth');
4047
- }
4048
- // non-responsive -> measure it or set to "variable"
4049
- else
4050
- {
4051
- obj[opt.d['width']] = (ms_hasVariableSizes(itm, opt, 'outerWidth'))
4052
- ? 'variable'
4053
- : itm[opt.d['outerWidth']](true);
4054
- }
4055
- }
4056
-
4057
- // secondary item-size not set -> measure it or set to "variable"
4058
- if (!obj[opt.d['height']])
4059
- {
4060
- obj[opt.d['height']] = (ms_hasVariableSizes(itm, opt, 'outerHeight'))
4061
- ? 'variable'
4062
- : itm[opt.d['outerHeight']](true);
4063
- }
4064
-
4065
- obj.sizesConf.width = obj.width;
4066
- obj.sizesConf.height = obj.height;
4067
- return obj;
4068
- }
4069
- function in_complementVisibleItems(opt, avl) {
4070
- // primary item-size variable -> set visible items variable
4071
- if (opt.items[opt.d['width']] == 'variable')
4072
- {
4073
- opt.items.visibleConf.variable = true;
4074
- }
4075
- if (!opt.items.visibleConf.variable) {
4076
- // primary size is number -> calculate visible-items
4077
- if (is_number(opt[opt.d['width']]))
4078
- {
4079
- opt.items.visible = Math.floor(opt[opt.d['width']] / opt.items[opt.d['width']]);
4080
- }
4081
- // measure and calculate primary size and visible-items
4082
- else
4083
- {
4084
- opt.items.visible = Math.floor(avl / opt.items[opt.d['width']]);
4085
- opt[opt.d['width']] = opt.items.visible * opt.items[opt.d['width']];
4086
- if (!opt.items.visibleConf.adjust)
4087
- {
4088
- opt.align = false;
4089
- }
4090
- }
4091
- if (opt.items.visible == 'Infinity' || opt.items.visible < 1)
4092
- {
4093
- debug(true, 'Not a valid number of visible items: Set to "variable".');
4094
- opt.items.visibleConf.variable = true;
4095
- }
4096
- }
4097
- return opt;
4098
- }
4099
- function in_complementPrimarySize(obj, opt, all) {
4100
- // primary size set to auto -> measure largest item-size and set it
4101
- if (obj == 'auto')
4102
- {
4103
- obj = ms_getTrueLargestSize(all, opt, 'outerWidth');
4104
- }
4105
- return obj;
4106
- }
4107
- function in_complementSecondarySize(obj, opt, all) {
4108
- // secondary size set to auto -> measure largest item-size and set it
4109
- if (obj == 'auto')
4110
- {
4111
- obj = ms_getTrueLargestSize(all, opt, 'outerHeight');
4112
- }
4113
- // secondary size not set -> set to secondary item-size
4114
- if (!obj)
4115
- {
4116
- obj = opt.items[opt.d['height']];
4117
- }
4118
- return obj;
4119
- }
4120
- function in_getAlignPadding(o, all) {
4121
- var p = cf_getAlignPadding(gi_getCurrentItems(all, o), o);
4122
- o.padding[o.d[1]] = p[1];
4123
- o.padding[o.d[3]] = p[0];
4124
- return o;
4125
- }
4126
- function in_getResponsiveValues(o, all, avl) {
4127
-
4128
- var visb = cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']] / o.items[o.d['width']]), o.items.visibleConf);
4129
- if (visb > all.length)
4130
- {
4131
- visb = all.length;
4132
- }
4133
-
4134
- var newS = Math.floor(o[o.d['width']]/visb);
4135
-
4136
- o.items.visible = visb;
4137
- o.items[o.d['width']] = newS;
4138
- o[o.d['width']] = visb * newS;
4139
- return o;
4140
- }
4141
-
4142
-
4143
- // buttons functions
4144
- function bt_pauseOnHoverConfig(p) {
4145
- if (is_string(p))
4146
- {
4147
- var i = (p.indexOf('immediate') > -1) ? true : false,
4148
- r = (p.indexOf('resume') > -1) ? true : false;
4149
- }
4150
- else
4151
- {
4152
- var i = r = false;
4153
- }
4154
- return [i, r];
4155
- }
4156
- function bt_mousesheelNumber(mw) {
4157
- return (is_number(mw)) ? mw : null
4158
- }
4159
-
4160
- // helper functions
4161
- function is_null(a) {
4162
- return (a === null);
4163
- }
4164
- function is_undefined(a) {
4165
- return (is_null(a) || typeof a == 'undefined' || a === '' || a === 'undefined');
4166
- }
4167
- function is_array(a) {
4168
- return (a instanceof Array);
4169
- }
4170
- function is_jquery(a) {
4171
- return (a instanceof jQuery);
4172
- }
4173
- function is_object(a) {
4174
- return ((a instanceof Object || typeof a == 'object') && !is_null(a) && !is_jquery(a) && !is_array(a) && !is_function(a));
4175
- }
4176
- function is_number(a) {
4177
- return ((a instanceof Number || typeof a == 'number') && !isNaN(a));
4178
- }
4179
- function is_string(a) {
4180
- return ((a instanceof String || typeof a == 'string') && !is_undefined(a) && !is_true(a) && !is_false(a));
4181
- }
4182
- function is_function(a) {
4183
- return (a instanceof Function || typeof a == 'function');
4184
- }
4185
- function is_boolean(a) {
4186
- return (a instanceof Boolean || typeof a == 'boolean' || is_true(a) || is_false(a));
4187
- }
4188
- function is_true(a) {
4189
- return (a === true || a === 'true');
4190
- }
4191
- function is_false(a) {
4192
- return (a === false || a === 'false');
4193
- }
4194
- function is_percentage(x) {
4195
- return (is_string(x) && x.slice(-1) == '%');
4196
- }
4197
-
4198
-
4199
- function getTime() {
4200
- return new Date().getTime();
4201
- }
4202
-
4203
- function deprecated( o, n ) {
4204
- debug(true, o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.');
4205
- }
4206
- function debug(d, m) {
4207
- if (!is_undefined(window.console) && !is_undefined(window.console.log))
4208
- {
4209
- if (is_object(d))
4210
- {
4211
- var s = ' ('+d.selector+')';
4212
- d = d.debug;
4213
- }
4214
- else
4215
- {
4216
- var s = '';
4217
- }
4218
- if (!d)
4219
- {
4220
- return false;
4221
- }
4222
-
4223
- if (is_string(m))
4224
- {
4225
- m = 'carouFredSel'+s+': ' + m;
4226
- }
4227
- else
4228
- {
4229
- m = ['carouFredSel'+s+':', m];
4230
- }
4231
- window.console.log(m);
4232
- }
4233
- return false;
4234
- }
4235
-
4236
-
4237
-
4238
- // EASING FUNCTIONS
4239
- $.extend($.easing, {
4240
- 'quadratic': function(t) {
4241
- var t2 = t * t;
4242
- return t * (-t2 * t + 4 * t2 - 6 * t + 4);
4243
- },
4244
- 'cubic': function(t) {
4245
- return t * (4 * t * t - 9 * t + 6);
4246
- },
4247
- 'elastic': function(t) {
4248
- var t2 = t * t;
4249
- return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15);
4250
- }
4251
- });
4252
-
4253
-
4254
  })(jQuery);
1
+ /*
2
+ * jQuery carouFredSel 6.2.1
3
+ * Demo's and documentation:
4
+ * caroufredsel.dev7studios.com
5
+ *
6
+ * Copyright (c) 2013 Fred Heusschen
7
+ * www.frebsite.nl
8
+ *
9
+ * Dual licensed under the MIT and GPL licenses.
10
+ * http://en.wikipedia.org/wiki/MIT_License
11
+ * http://en.wikipedia.org/wiki/GNU_General_Public_License
12
+ */
13
+
14
+
15
+ (function($) {
16
+
17
+
18
+ // LOCAL
19
+
20
+ if ( $.fn.carouFredSel )
21
+ {
22
+ return;
23
+ }
24
+
25
+ $.fn.caroufredsel = $.fn.carouFredSel = function(options, configs)
26
+ {
27
+
28
+ // no element
29
+ if (this.length == 0)
30
+ {
31
+ debug( true, 'No element found for "' + this.selector + '".' );
32
+ return this;
33
+ }
34
+
35
+ // multiple elements
36
+ if (this.length > 1)
37
+ {
38
+ return this.each(function() {
39
+ $(this).carouFredSel(options, configs);
40
+ });
41
+ }
42
+
43
+
44
+ var $cfs = this,
45
+ $tt0 = this[0],
46
+ starting_position = false;
47
+
48
+ if ($cfs.data('_cfs_isCarousel'))
49
+ {
50
+ starting_position = $cfs.triggerHandler('_cfs_triggerEvent', 'currentPosition');
51
+ $cfs.trigger('_cfs_triggerEvent', ['destroy', true]);
52
+ }
53
+
54
+ var FN = {};
55
+
56
+ FN._init = function(o, setOrig, start)
57
+ {
58
+ o = go_getObject($tt0, o);
59
+
60
+ o.items = go_getItemsObject($tt0, o.items);
61
+ o.scroll = go_getScrollObject($tt0, o.scroll);
62
+ o.auto = go_getAutoObject($tt0, o.auto);
63
+ o.prev = go_getPrevNextObject($tt0, o.prev);
64
+ o.next = go_getPrevNextObject($tt0, o.next);
65
+ o.pagination = go_getPaginationObject($tt0, o.pagination);
66
+ o.swipe = go_getSwipeObject($tt0, o.swipe);
67
+ o.mousewheel = go_getMousewheelObject($tt0, o.mousewheel);
68
+
69
+ if (setOrig)
70
+ {
71
+ opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
72
+ }
73
+
74
+ opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
75
+ opts.d = cf_getDimensions(opts);
76
+
77
+ crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev';
78
+
79
+ var a_itm = $cfs.children(),
80
+ avail_primary = ms_getParentSize($wrp, opts, 'width');
81
+
82
+ if (is_true(opts.cookie))
83
+ {
84
+ opts.cookie = 'caroufredsel_cookie_' + conf.serialNumber;
85
+ }
86
+
87
+ opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
88
+
89
+ // complement items and sizes
90
+ opts.items = in_complementItems(opts.items, opts, a_itm, start);
91
+ opts[opts.d['width']] = in_complementPrimarySize(opts[opts.d['width']], opts, a_itm);
92
+ opts[opts.d['height']] = in_complementSecondarySize(opts[opts.d['height']], opts, a_itm);
93
+
94
+ // primary size not set for a responsive carousel
95
+ if (opts.responsive)
96
+ {
97
+ if (!is_percentage(opts[opts.d['width']]))
98
+ {
99
+ opts[opts.d['width']] = '100%';
100
+ }
101
+ }
102
+
103
+ // primary size is percentage
104
+ if (is_percentage(opts[opts.d['width']]))
105
+ {
106
+ crsl.upDateOnWindowResize = true;
107
+ crsl.primarySizePercentage = opts[opts.d['width']];
108
+ opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
109
+ if (!opts.items.visible)
110
+ {
111
+ opts.items.visibleConf.variable = true;
112
+ }
113
+ }
114
+
115
+ if (opts.responsive)
116
+ {
117
+ opts.usePadding = false;
118
+ opts.padding = [0, 0, 0, 0];
119
+ opts.align = false;
120
+ opts.items.visibleConf.variable = false;
121
+ }
122
+ else
123
+ {
124
+ // visible-items not set
125
+ if (!opts.items.visible)
126
+ {
127
+ opts = in_complementVisibleItems(opts, avail_primary);
128
+ }
129
+
130
+ // primary size not set -> calculate it or set to "variable"
131
+ if (!opts[opts.d['width']])
132
+ {
133
+ if (!opts.items.visibleConf.variable && is_number(opts.items[opts.d['width']]) && opts.items.filter == '*')
134
+ {
135
+ opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
136
+ opts.align = false;
137
+ }
138
+ else
139
+ {
140
+ opts[opts.d['width']] = 'variable';
141
+ }
142
+ }
143
+ // align not set -> set to center if primary size is number
144
+ if (is_undefined(opts.align))
145
+ {
146
+ opts.align = (is_number(opts[opts.d['width']]))
147
+ ? 'center'
148
+ : false;
149
+ }
150
+ // set variabe visible-items
151
+ if (opts.items.visibleConf.variable)
152
+ {
153
+ opts.items.visible = gn_getVisibleItemsNext(a_itm, opts, 0);
154
+ }
155
+ }
156
+
157
+ // set visible items by filter
158
+ if (opts.items.filter != '*' && !opts.items.visibleConf.variable)
159
+ {
160
+ opts.items.visibleConf.org = opts.items.visible;
161
+ opts.items.visible = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
162
+ }
163
+
164
+ opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0);
165
+ opts.items.visibleConf.old = opts.items.visible;
166
+
167
+ if (opts.responsive)
168
+ {
169
+ if (!opts.items.visibleConf.min)
170
+ {
171
+ opts.items.visibleConf.min = opts.items.visible;
172
+ }
173
+ if (!opts.items.visibleConf.max)
174
+ {
175
+ opts.items.visibleConf.max = opts.items.visible;
176
+ }
177
+ opts = in_getResponsiveValues(opts, a_itm, avail_primary);
178
+ }
179
+ else
180
+ {
181
+ opts.padding = cf_getPadding(opts.padding);
182
+
183
+ if (opts.align == 'top')
184
+ {
185
+ opts.align = 'left';
186
+ }
187
+ else if (opts.align == 'bottom')
188
+ {
189
+ opts.align = 'right';
190
+ }
191
+
192
+ switch (opts.align)
193
+ {
194
+ // align: center, left or right
195
+ case 'center':
196
+ case 'left':
197
+ case 'right':
198
+ if (opts[opts.d['width']] != 'variable')
199
+ {
200
+ opts = in_getAlignPadding(opts, a_itm);
201
+ opts.usePadding = true;
202
+ }
203
+ break;
204
+
205
+ // padding
206
+ default:
207
+ opts.align = false;
208
+ opts.usePadding = (
209
+ opts.padding[0] == 0 &&
210
+ opts.padding[1] == 0 &&
211
+ opts.padding[2] == 0 &&
212
+ opts.padding[3] == 0
213
+ ) ? false : true;
214
+ break;
215
+ }
216
+ }
217
+
218
+ if (!is_number(opts.scroll.duration))
219
+ {
220
+ opts.scroll.duration = 500;
221
+ }
222
+ if (is_undefined(opts.scroll.items))
223
+ {
224
+ opts.scroll.items = (opts.responsive || opts.items.visibleConf.variable || opts.items.filter != '*')
225
+ ? 'visible'
226
+ : opts.items.visible;
227
+ }
228
+
229
+ opts.auto = $.extend(true, {}, opts.scroll, opts.auto);
230
+ opts.prev = $.extend(true, {}, opts.scroll, opts.prev);
231
+ opts.next = $.extend(true, {}, opts.scroll, opts.next);
232
+ opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination);
233
+ // swipe and mousewheel extend later on, per direction
234
+
235
+ opts.auto = go_complementAutoObject($tt0, opts.auto);
236
+ opts.prev = go_complementPrevNextObject($tt0, opts.prev);
237
+ opts.next = go_complementPrevNextObject($tt0, opts.next);
238
+ opts.pagination = go_complementPaginationObject($tt0, opts.pagination);
239
+ opts.swipe = go_complementSwipeObject($tt0, opts.swipe);
240
+ opts.mousewheel = go_complementMousewheelObject($tt0, opts.mousewheel);
241
+
242
+ if (opts.synchronise)
243
+ {
244
+ opts.synchronise = cf_getSynchArr(opts.synchronise);
245
+ }
246
+
247
+
248
+ // DEPRECATED
249
+ if (opts.auto.onPauseStart)
250
+ {
251
+ opts.auto.onTimeoutStart = opts.auto.onPauseStart;
252
+ deprecated('auto.onPauseStart', 'auto.onTimeoutStart');
253
+ }
254
+ if (opts.auto.onPausePause)
255
+ {
256
+ opts.auto.onTimeoutPause = opts.auto.onPausePause;
257
+ deprecated('auto.onPausePause', 'auto.onTimeoutPause');
258
+ }
259
+ if (opts.auto.onPauseEnd)
260
+ {
261
+ opts.auto.onTimeoutEnd = opts.auto.onPauseEnd;
262
+ deprecated('auto.onPauseEnd', 'auto.onTimeoutEnd');
263
+ }
264
+ if (opts.auto.pauseDuration)
265
+ {
266
+ opts.auto.timeoutDuration = opts.auto.pauseDuration;
267
+ deprecated('auto.pauseDuration', 'auto.timeoutDuration');
268
+ }
269
+ // /DEPRECATED
270
+
271
+
272
+ }; // /init
273
+
274
+
275
+ FN._build = function() {
276
+ $cfs.data('_cfs_isCarousel', true);
277
+
278
+ var a_itm = $cfs.children(),
279
+ orgCSS = in_mapCss($cfs, ['textAlign', 'float', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'width', 'height', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft']),
280
+ newPosition = 'relative';
281
+
282
+ switch (orgCSS.position)
283
+ {
284
+ case 'absolute':
285
+ case 'fixed':
286
+ newPosition = orgCSS.position;
287
+ break;
288
+ }
289
+
290
+ if (conf.wrapper == 'parent')
291
+ {
292
+ sz_storeOrigCss($wrp);
293
+ }
294
+ else
295
+ {
296
+ $wrp.css(orgCSS);
297
+ }
298
+ $wrp.css({
299
+ 'overflow' : 'hidden',
300
+ 'position' : newPosition
301
+ });
302
+
303
+ sz_storeOrigCss($cfs);
304
+ $cfs.data('_cfs_origCssZindex', orgCSS.zIndex);
305
+ $cfs.css({
306
+ 'textAlign' : 'left',
307
+ 'float' : 'none',
308
+ 'position' : 'absolute',
309
+ 'top' : 0,
310
+ 'right' : 'auto',
311
+ 'bottom' : 'auto',
312
+ 'left' : 0,
313
+ 'marginTop' : 0,
314
+ 'marginRight' : 0,
315
+ 'marginBottom' : 0,
316
+ 'marginLeft' : 0
317
+ });
318
+
319
+ sz_storeMargin(a_itm, opts);
320
+ sz_storeOrigCss(a_itm);
321
+ if (opts.responsive)
322
+ {
323
+ sz_setResponsiveSizes(opts, a_itm);
324
+ }
325
+
326
+ }; // /build
327
+
328
+
329
+ FN._bind_events = function() {
330
+ FN._unbind_events();
331
+
332
+
333
+ // stop event
334
+ $cfs.bind(cf_e('stop', conf), function(e, imm) {
335
+ e.stopPropagation();
336
+
337
+ // button
338
+ if (!crsl.isStopped)
339
+ {
340
+ if (opts.auto.button)
341
+ {
342
+ opts.auto.button.addClass(cf_c('stopped', conf));
343
+ }
344
+ }
345
+
346
+ // set stopped
347
+ crsl.isStopped = true;
348
+
349
+ if (opts.auto.play)
350
+ {
351
+ opts.auto.play = false;
352
+ $cfs.trigger(cf_e('pause', conf), imm);
353
+ }
354
+ return true;
355
+ });
356
+
357
+
358
+ // finish event
359
+ $cfs.bind(cf_e('finish', conf), function(e) {
360
+ e.stopPropagation();
361
+ if (crsl.isScrolling)
362
+ {
363
+ sc_stopScroll(scrl);
364
+ }
365
+ return true;
366
+ });
367
+
368
+
369
+ // pause event
370
+ $cfs.bind(cf_e('pause', conf), function(e, imm, res) {
371
+ e.stopPropagation();
372
+ tmrs = sc_clearTimers(tmrs);
373
+
374
+ // immediately pause
375
+ if (imm && crsl.isScrolling)
376
+ {
377
+ scrl.isStopped = true;
378
+ var nst = getTime() - scrl.startTime;
379
+ scrl.duration -= nst;
380
+ if (scrl.pre)
381
+ {
382
+ scrl.pre.duration -= nst;
383
+ }
384
+ if (scrl.post)
385
+ {
386
+ scrl.post.duration -= nst;
387
+ }
388
+ sc_stopScroll(scrl, false);
389
+ }
390
+
391
+ // update remaining pause-time
392
+ if (!crsl.isPaused && !crsl.isScrolling)
393
+ {
394
+ if (res)
395
+ {
396
+ tmrs.timePassed += getTime() - tmrs.startTime;
397
+ }
398
+ }
399
+
400
+ // button
401
+ if (!crsl.isPaused)
402
+ {
403
+ if (opts.auto.button)
404
+ {
405
+ opts.auto.button.addClass(cf_c('paused', conf));
406
+ }
407
+ }
408
+
409
+ // set paused
410
+ crsl.isPaused = true;
411
+
412
+ // pause pause callback
413
+ if (opts.auto.onTimeoutPause)
414
+ {
415
+ var dur1 = opts.auto.timeoutDuration - tmrs.timePassed,
416
+ perc = 100 - Math.ceil( dur1 * 100 / opts.auto.timeoutDuration );
417
+
418
+ opts.auto.onTimeoutPause.call($tt0, perc, dur1);
419
+ }
420
+ return true;
421
+ });
422
+
423
+
424
+ // play event
425
+ $cfs.bind(cf_e('play', conf), function(e, dir, del, res) {
426
+ e.stopPropagation();
427
+ tmrs = sc_clearTimers(tmrs);
428
+
429
+ // sort params
430
+ var v = [dir, del, res],
431
+ t = ['string', 'number', 'boolean'],
432
+ a = cf_sortParams(v, t);
433
+
434
+ dir = a[0];
435
+ del = a[1];
436
+ res = a[2];
437
+
438
+ if (dir != 'prev' && dir != 'next')
439
+ {
440
+ dir = crsl.direction;
441
+ }
442
+ if (!is_number(del))
443
+ {
444
+ del = 0;
445
+ }
446
+ if (!is_boolean(res))
447
+ {
448
+ res = false;
449
+ }
450
+
451
+ // stopped?
452
+ if (res)
453
+ {
454
+ crsl.isStopped = false;
455
+ opts.auto.play = true;
456
+ }
457
+ if (!opts.auto.play)
458
+ {
459
+ e.stopImmediatePropagation();
460
+ return debug(conf, 'Carousel stopped: Not scrolling.');
461
+ }
462
+
463
+ // button
464
+ if (crsl.isPaused)
465
+ {
466
+ if (opts.auto.button)
467
+ {
468
+ opts.auto.button.removeClass(cf_c('stopped', conf));
469
+ opts.auto.button.removeClass(cf_c('paused', conf));
470
+ }
471
+ }
472
+
473
+ // set playing
474
+ crsl.isPaused = false;
475
+ tmrs.startTime = getTime();
476
+
477
+ // timeout the scrolling
478
+ var dur1 = opts.auto.timeoutDuration + del;
479
+ dur2 = dur1 - tmrs.timePassed;
480
+ perc = 100 - Math.ceil(dur2 * 100 / dur1);
481
+
482
+ if (opts.auto.progress)
483
+ {
484
+ tmrs.progress = setInterval(function() {
485
+ var pasd = getTime() - tmrs.startTime + tmrs.timePassed,
486
+ perc = Math.ceil(pasd * 100 / dur1);
487
+ opts.auto.progress.updater.call(opts.auto.progress.bar[0], perc);
488
+ }, opts.auto.progress.interval);
489
+ }
490
+
491
+ tmrs.auto = setTimeout(function() {
492
+ if (opts.auto.progress)
493
+ {
494
+ opts.auto.progress.updater.call(opts.auto.progress.bar[0], 100);
495
+ }
496
+ if (opts.auto.onTimeoutEnd)
497
+ {
498
+ opts.auto.onTimeoutEnd.call($tt0, perc, dur2);
499
+ }
500
+ if (crsl.isScrolling)
501
+ {
502
+ $cfs.trigger(cf_e('play', conf), dir);
503
+ }
504
+ else
505
+ {
506
+ $cfs.trigger(cf_e(dir, conf), opts.auto);
507
+ }
508
+ }, dur2);
509
+
510
+ // pause start callback
511
+ if (opts.auto.onTimeoutStart)
512
+ {
513
+ opts.auto.onTimeoutStart.call($tt0, perc, dur2);
514
+ }
515
+
516
+ return true;
517
+ });
518
+
519
+
520
+ // resume event
521
+ $cfs.bind(cf_e('resume', conf), function(e) {
522
+ e.stopPropagation();
523
+ if (scrl.isStopped)
524
+ {
525
+ scrl.isStopped = false;
526
+ crsl.isPaused = false;
527
+ crsl.isScrolling = true;
528
+ scrl.startTime = getTime();
529
+ sc_startScroll(scrl, conf);
530
+ }
531
+ else
532
+ {
533
+ $cfs.trigger(cf_e('play', conf));
534
+ }
535
+ return true;
536
+ });
537
+
538
+
539
+ // prev + next events
540
+ $cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb, que) {
541
+ e.stopPropagation();
542
+
543
+ // stopped or hidden carousel, don't scroll, don't queue
544
+ if (crsl.isStopped || $cfs.is(':hidden'))
545
+ {
546
+ e.stopImmediatePropagation();
547
+ return debug(conf, 'Carousel stopped or hidden: Not scrolling.');
548
+ }
549
+
550
+ // not enough items
551
+ var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1;
552
+ if (minimum > itms.total)
553
+ {
554
+ e.stopImmediatePropagation();
555
+ return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');
556
+ }
557
+
558
+ // get config
559
+ var v = [obj, num, clb, que],
560
+ t = ['object', 'number/string', 'function', 'boolean'],
561
+ a = cf_sortParams(v, t);
562
+
563
+ obj = a[0];
564
+ num = a[1];
565
+ clb = a[2];
566
+ que = a[3];
567
+
568
+ var eType = e.type.slice(conf.events.prefix.length);
569
+
570
+ if (!is_object(obj))
571
+ {
572
+ obj = {};
573
+ }
574
+ if (is_function(clb))
575
+ {
576
+ obj.onAfter = clb;
577
+ }
578
+ if (is_boolean(que))
579
+ {
580
+ obj.queue = que;
581
+ }
582
+ obj = $.extend(true, {}, opts[eType], obj);
583
+
584
+ // test conditions callback
585
+ if (obj.conditions && !obj.conditions.call($tt0, eType))
586
+ {
587
+ e.stopImmediatePropagation();
588
+ return debug(conf, 'Callback "conditions" returned false.');
589
+ }
590
+
591
+ if (!is_number(num))
592
+ {
593
+ if (opts.items.filter != '*')
594
+ {
595
+ num = 'visible';
596
+ }
597
+ else
598
+ {
599
+ var arr = [num, obj.items, opts[eType].items];
600
+ for (var a = 0, l = arr.length; a < l; a++)
601
+ {
602
+ if (is_number(arr[a]) || arr[a] == 'page' || arr[a] == 'visible') {
603
+ num = arr[a];
604
+ break;
605
+ }
606
+ }
607
+ }
608
+ switch(num) {
609
+ case 'page':
610
+ e.stopImmediatePropagation();
611
+ return $cfs.triggerHandler(cf_e(eType+'Page', conf), [obj, clb]);
612
+ break;
613
+
614
+ case 'visible':
615
+ if (!opts.items.visibleConf.variable && opts.items.filter == '*')
616
+ {
617
+ num = opts.items.visible;
618
+ }
619
+ break;
620
+ }
621
+ }
622
+
623
+ // resume animation, add current to queue
624
+ if (scrl.isStopped)
625
+ {
626
+ $cfs.trigger(cf_e('resume', conf));
627
+ $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
628
+ e.stopImmediatePropagation();
629
+ return debug(conf, 'Carousel resumed scrolling.');
630
+ }
631
+
632
+ // queue if scrolling
633
+ if (obj.duration > 0)
634
+ {
635
+ if (crsl.isScrolling)
636
+ {
637
+ if (obj.queue)
638
+ {
639
+ if (obj.queue == 'last')
640
+ {
641
+ queu = [];
642
+ }
643
+ if (obj.queue != 'first' || queu.length == 0)
644
+ {
645
+ $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
646
+ }
647
+ }
648
+ e.stopImmediatePropagation();
649
+ return debug(conf, 'Carousel currently scrolling.');
650
+ }
651
+ }
652
+
653
+ tmrs.timePassed = 0;
654
+ $cfs.trigger(cf_e('slide_'+eType, conf), [obj, num]);
655
+
656
+ // synchronise
657
+ if (opts.synchronise)
658
+ {
659
+ var s = opts.synchronise,
660
+ c = [obj, num];
661
+
662
+ for (var j = 0, l = s.length; j < l; j++) {
663
+ var d = eType;
664
+ if (!s[j][2])
665
+ {
666
+ d = (d == 'prev') ? 'next' : 'prev';
667
+ }
668
+ if (!s[j][1])
669
+ {
670
+ c[0] = s[j][0].triggerHandler('_cfs_triggerEvent', ['configuration', d]);
671
+ }
672
+ c[1] = num + s[j][3];
673
+ s[j][0].trigger('_cfs_triggerEvent', ['slide_'+d, c]);
674
+ }
675
+ }
676
+ return true;
677
+ });
678
+
679
+
680
+ // prev event
681
+ $cfs.bind(cf_e('slide_prev', conf), function(e, sO, nI) {
682
+ e.stopPropagation();
683
+ var a_itm = $cfs.children();
684
+
685
+ // non-circular at start, scroll to end
686
+ if (!opts.circular)
687
+ {
688
+ if (itms.first == 0)
689
+ {
690
+ if (opts.infinite)
691
+ {
692
+ $cfs.trigger(cf_e('next', conf), itms.total-1);
693
+ }
694
+ return e.stopImmediatePropagation();
695
+ }
696
+ }
697
+
698
+ sz_resetMargin(a_itm, opts);
699
+
700
+ // find number of items to scroll
701
+ if (!is_number(nI))
702
+ {
703
+ if (opts.items.visibleConf.variable)
704
+ {
705
+ nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1);
706
+ }
707
+ else if (opts.items.filter != '*')
708
+ {
709
+ var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
710
+ nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI);
711
+ }
712
+ else
713
+ {
714
+ nI = opts.items.visible;
715
+ }
716
+ nI = cf_getAdjust(nI, opts, sO.items, $tt0);
717
+ }
718
+
719
+ // prevent non-circular from scrolling to far
720
+ if (!opts.circular)
721
+ {
722
+ if (itms.total - nI < itms.first)
723
+ {
724
+ nI = itms.total - itms.first;
725
+ }
726
+ }
727
+
728
+ // set new number of visible items
729
+ opts.items.visibleConf.old = opts.items.visible;
730
+ if (opts.items.visibleConf.variable)
731
+ {
732
+ var vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
733
+ if (opts.items.visible+nI <= vI && nI < itms.total)
734
+ {
735
+ nI++;
736
+ vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
737
+ }
738
+ opts.items.visible = vI;
739
+ }
740
+ else if (opts.items.filter != '*')
741
+ {
742
+ var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI);
743
+ opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
744
+ }
745
+
746
+ sz_resetMargin(a_itm, opts, true);
747
+
748
+ // scroll 0, don't scroll
749
+ if (nI == 0)
750
+ {
751
+ e.stopImmediatePropagation();
752
+ return debug(conf, '0 items to scroll: Not scrolling.');
753
+ }
754
+ debug(conf, 'Scrolling '+nI+' items backward.');
755
+
756
+
757
+ // save new config
758
+ itms.first += nI;
759
+ while (itms.first >= itms.total)
760
+ {
761
+ itms.first -= itms.total;
762
+ }
763
+
764
+ // non-circular callback
765
+ if (!opts.circular)
766
+ {
767
+ if (itms.first == 0 && sO.onEnd)
768
+ {
769
+ sO.onEnd.call($tt0, 'prev');
770
+ }
771
+ if (!opts.infinite)
772
+ {
773
+ nv_enableNavi(opts, itms.first, conf);
774
+ }
775
+ }
776
+
777
+ // rearrange items
778
+ $cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs);
779
+ if (itms.total < opts.items.visible + nI)
780
+ {
781
+ $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
782
+ }
783
+
784
+ // the needed items
785
+ var a_itm = $cfs.children(),
786
+ i_old = gi_getOldItemsPrev(a_itm, opts, nI),
787
+ i_new = gi_getNewItemsPrev(a_itm, opts),
788
+ i_cur_l = a_itm.eq(nI-1),
789
+ i_old_l = i_old.last(),
790
+ i_new_l = i_new.last();
791
+
792
+ sz_resetMargin(a_itm, opts);
793
+
794
+ var pL = 0,
795
+ pR = 0;
796
+
797
+ if (opts.align)
798
+ {
799
+ var p = cf_getAlignPadding(i_new, opts);
800
+ pL = p[0];
801
+ pR = p[1];
802
+ }
803
+ var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0;
804
+
805
+ // hide items for fx directscroll
806
+ var hiddenitems = false,
807
+ i_skp = $();
808
+ if (opts.items.visible < nI)
809
+ {
810
+ i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
811
+ if (sO.fx == 'directscroll')
812
+ {
813
+ var orgW = opts.items[opts.d['width']];
814
+ hiddenitems = i_skp;
815
+ i_cur_l = i_new_l;
816
+ sc_hideHiddenItems(hiddenitems);
817
+ opts.items[opts.d['width']] = 'variable';
818
+ }
819
+ }
820
+ // save new sizes
821
+ var $cf2 = false,
822
+ i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
823
+ w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
824
+ i_siz_vis = 0,
825
+ a_cfs = {},
826
+ a_wsz = {},
827
+ a_cur = {},
828
+ a_old = {},
829
+ a_new = {},
830
+ a_lef = {},
831
+ a_lef_vis = {},
832
+ a_dur = sc_getDuration(sO, opts, nI, i_siz);
833
+
834
+ switch(sO.fx)
835
+ {
836
+ case 'cover':
837
+ case 'cover-fade':
838
+ i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visible), opts, 'width');
839
+ break;
840
+ }
841
+
842
+ if (hiddenitems)
843
+ {
844
+ opts.items[opts.d['width']] = orgW;
845
+ }
846
+
847
+ sz_resetMargin(a_itm, opts, true);
848
+ if (pR >= 0)
849
+ {
850
+ sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
851
+ }
852
+ if (pL >= 0)
853
+ {
854
+ sz_resetMargin(i_cur_l, opts, opts.padding[opts.d[3]]);
855
+ }
856
+
857
+ if (opts.align)
858
+ {
859
+ opts.padding[opts.d[1]] = pR;
860
+ opts.padding[opts.d[3]] = pL;
861
+ }
862
+
863
+ a_lef[opts.d['left']] = -(i_siz - oL);
864
+ a_lef_vis[opts.d['left']] = -(i_siz_vis - oL);
865
+ a_wsz[opts.d['left']] = w_siz[opts.d['width']];
866
+
867
+ // scrolling functions
868
+ var _s_wrapper = function() {},
869
+ _a_wrapper = function() {},
870
+ _s_paddingold = function() {},
871
+ _a_paddingold = function() {},
872
+ _s_paddingnew = function() {},
873
+ _a_paddingnew = function() {},
874
+ _s_paddingcur = function() {},
875
+ _a_paddingcur = function() {},
876
+ _onafter = function() {},
877
+ _moveitems = function() {},
878
+ _position = function() {};
879
+
880
+ // clone carousel
881
+ switch(sO.fx)
882
+ {
883
+ case 'crossfade':
884
+ case 'cover':
885
+ case 'cover-fade':
886
+ case 'uncover':
887
+ case 'uncover-fade':
888
+ $cf2 = $cfs.clone(true).appendTo($wrp);
889
+ break;
890
+ }
891
+ switch(sO.fx)
892
+ {
893
+ case 'crossfade':
894
+ case 'uncover':
895
+ case 'uncover-fade':
896
+ $cf2.children().slice(0, nI).remove();
897
+ $cf2.children().slice(opts.items.visibleConf.old).remove();
898
+ break;
899
+
900
+ case 'cover':
901
+ case 'cover-fade':
902
+ $cf2.children().slice(opts.items.visible).remove();
903
+ $cf2.css(a_lef_vis);
904
+ break;
905
+ }
906
+
907
+ $cfs.css(a_lef);
908
+
909
+ // reset all scrolls
910
+ scrl = sc_setScroll(a_dur, sO.easing, conf);
911
+
912
+ // animate / set carousel
913
+ a_cfs[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
914
+
915
+ // animate / set wrapper
916
+ if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
917
+ {
918
+ _s_wrapper = function() {
919
+ $wrp.css(w_siz);
920
+ };
921
+ _a_wrapper = function() {
922
+ scrl.anims.push([$wrp, w_siz]);
923
+ };
924
+ }
925
+
926
+ // animate / set items
927
+ if (opts.usePadding)
928
+ {
929
+ if (i_new_l.not(i_cur_l).length)
930
+ {
931
+ a_cur[opts.d['marginRight']] = i_cur_l.data('_cfs_origCssMargin');
932
+
933
+ if (pL < 0)
934
+ {
935
+ i_cur_l.css(a_cur);
936
+ }
937
+ else
938
+ {
939
+ _s_paddingcur = function() {
940
+ i_cur_l.css(a_cur);
941
+ };
942
+ _a_paddingcur = function() {
943
+ scrl.anims.push([i_cur_l, a_cur]);
944
+ };
945
+ }
946
+ }
947
+ switch(sO.fx)
948
+ {
949
+ case 'cover':
950
+ case 'cover-fade':
951
+ $cf2.children().eq(nI-1).css(a_cur);
952
+ break;
953
+ }
954
+
955
+ if (i_new_l.not(i_old_l).length)
956
+ {
957
+ a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
958
+ _s_paddingold = function() {
959
+ i_old_l.css(a_old);
960
+ };
961
+ _a_paddingold = function() {
962
+ scrl.anims.push([i_old_l, a_old]);
963
+ };
964
+ }
965
+
966
+ if (pR >= 0)
967
+ {
968
+ a_new[opts.d['marginRight']] = i_new_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]];
969
+ _s_paddingnew = function() {
970
+ i_new_l.css(a_new);
971
+ };
972
+ _a_paddingnew = function() {
973
+ scrl.anims.push([i_new_l, a_new]);
974
+ };
975
+ }
976
+ }
977
+
978
+ // set position
979
+ _position = function() {
980
+ $cfs.css(a_cfs);
981
+ };
982
+
983
+
984
+ var overFill = opts.items.visible+nI-itms.total;
985
+
986
+ // rearrange items
987
+ _moveitems = function() {
988
+ if (overFill > 0)
989
+ {
990
+ $cfs.children().slice(itms.total).remove();
991
+ i_old = $( $cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat( $cfs.children().slice(0, overFill).get() ) );
992
+ }
993
+ sc_showHiddenItems(hiddenitems);
994
+
995
+ if (opts.usePadding)
996
+ {
997
+ var l_itm = $cfs.children().eq(opts.items.visible+nI-1);
998
+ l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
999
+ }
1000
+ };
1001
+
1002
+
1003
+ var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'prev', a_dur, w_siz);
1004
+
1005
+ // fire onAfter callbacks
1006
+ _onafter = function() {
1007
+ sc_afterScroll($cfs, $cf2, sO);
1008
+ crsl.isScrolling = false;
1009
+ clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
1010
+ queu = sc_fireQueue($cfs, queu, conf);
1011
+
1012
+ if (!crsl.isPaused)
1013
+ {
1014
+ $cfs.trigger(cf_e('play', conf));
1015
+ }
1016
+ };
1017
+
1018
+ // fire onBefore callback
1019
+ crsl.isScrolling = true;
1020
+ tmrs = sc_clearTimers(tmrs);
1021
+ clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
1022
+
1023
+ switch(sO.fx)
1024
+ {
1025
+ case 'none':
1026
+ $cfs.css(a_cfs);
1027
+ _s_wrapper();
1028
+ _s_paddingold();
1029
+ _s_paddingnew();
1030
+ _s_paddingcur();
1031
+ _position();
1032
+ _moveitems();
1033
+ _onafter();
1034
+ break;
1035
+
1036
+ case 'fade':
1037
+ scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
1038
+ _s_wrapper();
1039
+ _s_paddingold();
1040
+ _s_paddingnew();
1041
+ _s_paddingcur();
1042
+ _position();
1043
+ _moveitems();
1044
+ scrl = sc_setScroll(a_dur, sO.easing, conf);
1045
+ scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1046
+ sc_startScroll(scrl, conf);
1047
+ }]);
1048
+ break;
1049
+
1050
+ case 'crossfade':
1051
+ $cfs.css({ 'opacity': 0 });
1052
+ scrl.anims.push([$cf2, { 'opacity': 0 }]);
1053
+ scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1054
+ _a_wrapper();
1055
+ _s_paddingold();
1056
+ _s_paddingnew();
1057
+ _s_paddingcur();
1058
+ _position();
1059
+ _moveitems();
1060
+ break;
1061
+
1062
+ case 'cover':
1063
+ scrl.anims.push([$cf2, a_cfs, function() {
1064
+ _s_paddingold();
1065
+ _s_paddingnew();
1066
+ _s_paddingcur();
1067
+ _position();
1068
+ _moveitems();
1069
+ _onafter();
1070
+ }]);
1071
+ _a_wrapper();
1072
+ break;
1073
+
1074
+ case 'cover-fade':
1075
+ scrl.anims.push([$cfs, { 'opacity': 0 }]);
1076
+ scrl.anims.push([$cf2, a_cfs, function() {
1077
+ _s_paddingold();
1078
+ _s_paddingnew();
1079
+ _s_paddingcur();
1080
+ _position();
1081
+ _moveitems();
1082
+ _onafter();
1083
+ }]);
1084
+ _a_wrapper();
1085
+ break;
1086
+
1087
+ case 'uncover':
1088
+ scrl.anims.push([$cf2, a_wsz, _onafter]);
1089
+ _a_wrapper();
1090
+ _s_paddingold();
1091
+ _s_paddingnew();
1092
+ _s_paddingcur();
1093
+ _position();
1094
+ _moveitems();
1095
+ break;
1096
+
1097
+ case 'uncover-fade':
1098
+ $cfs.css({ 'opacity': 0 });
1099
+ scrl.anims.push([$cfs, { 'opacity': 1 }]);
1100
+ scrl.anims.push([$cf2, a_wsz, _onafter]);
1101
+ _a_wrapper();
1102
+ _s_paddingold();
1103
+ _s_paddingnew();
1104
+ _s_paddingcur();
1105
+ _position();
1106
+ _moveitems();
1107
+ break;
1108
+
1109
+ default:
1110
+ scrl.anims.push([$cfs, a_cfs, function() {
1111
+ _moveitems();
1112
+ _onafter();
1113
+ }]);
1114
+ _a_wrapper();
1115
+ _a_paddingold();
1116
+ _a_paddingnew();
1117
+ _a_paddingcur();
1118
+ break;
1119
+ }
1120
+
1121
+ sc_startScroll(scrl, conf);
1122
+ cf_setCookie(opts.cookie, $cfs, conf);
1123
+
1124
+ $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
1125
+
1126
+ return true;
1127
+ });
1128
+
1129
+
1130
+ // next event
1131
+ $cfs.bind(cf_e('slide_next', conf), function(e, sO, nI) {
1132
+ e.stopPropagation();
1133
+ var a_itm = $cfs.children();
1134
+
1135
+ // non-circular at end, scroll to start
1136
+ if (!opts.circular)
1137
+ {
1138
+ if (itms.first == opts.items.visible)
1139
+ {
1140
+ if (opts.infinite)
1141
+ {
1142
+ $cfs.trigger(cf_e('prev', conf), itms.total-1);
1143
+ }
1144
+ return e.stopImmediatePropagation();
1145
+ }
1146
+ }
1147
+
1148
+ sz_resetMargin(a_itm, opts);
1149
+
1150
+ // find number of items to scroll
1151
+ if (!is_number(nI))
1152
+ {
1153
+ if (opts.items.filter != '*')
1154
+ {
1155
+ var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
1156
+ nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI);
1157
+ }
1158
+ else
1159
+ {
1160
+ nI = opts.items.visible;
1161
+ }
1162
+ nI = cf_getAdjust(nI, opts, sO.items, $tt0);
1163
+ }
1164
+
1165
+ var lastItemNr = (itms.first == 0) ? itms.total : itms.first;
1166
+
1167
+ // prevent non-circular from scrolling to far
1168
+ if (!opts.circular)
1169
+ {
1170
+ if (opts.items.visibleConf.variable)
1171
+ {
1172
+ var vI = gn_getVisibleItemsNext(a_itm, opts, nI),
1173
+ xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1);
1174
+ }
1175
+ else
1176
+ {
1177
+ var vI = opts.items.visible,
1178
+ xI = opts.items.visible;
1179
+ }
1180
+
1181
+ if (nI + vI > lastItemNr)
1182
+ {
1183
+ nI = lastItemNr - xI;
1184
+ }
1185
+ }
1186
+
1187
+ // set new number of visible items
1188
+ opts.items.visibleConf.old = opts.items.visible;
1189
+ if (opts.items.visibleConf.variable)
1190
+ {
1191
+ var vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
1192
+ while (opts.items.visible-nI >= vI && nI < itms.total)
1193
+ {
1194
+ nI++;
1195
+ vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
1196
+ }
1197
+ opts.items.visible = vI;
1198
+ }
1199
+ else if (opts.items.filter != '*')
1200
+ {
1201
+ var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI);
1202
+ opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
1203
+ }
1204
+
1205
+ sz_resetMargin(a_itm, opts, true);
1206
+
1207
+ // scroll 0, don't scroll
1208
+ if (nI == 0)
1209
+ {
1210
+ e.stopImmediatePropagation();
1211
+ return debug(conf, '0 items to scroll: Not scrolling.');
1212
+ }
1213
+ debug(conf, 'Scrolling '+nI+' items forward.');
1214
+
1215
+
1216
+ // save new config
1217
+ itms.first -= nI;
1218
+ while (itms.first < 0)
1219
+ {
1220
+ itms.first += itms.total;
1221
+ }
1222
+
1223
+ // non-circular callback
1224
+ if (!opts.circular)
1225
+ {
1226
+ if (itms.first == opts.items.visible && sO.onEnd)
1227
+ {
1228
+ sO.onEnd.call($tt0, 'next');
1229
+ }
1230
+ if (!opts.infinite)
1231
+ {
1232
+ nv_enableNavi(opts, itms.first, conf);
1233
+ }
1234
+ }
1235
+
1236
+ // rearrange items
1237
+ if (itms.total < opts.items.visible+nI)
1238
+ {
1239
+ $cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
1240
+ }
1241
+
1242
+ // the needed items
1243
+ var a_itm = $cfs.children(),
1244
+ i_old = gi_getOldItemsNext(a_itm, opts),
1245
+ i_new = gi_getNewItemsNext(a_itm, opts, nI),
1246
+ i_cur_l = a_itm.eq(nI-1),
1247
+ i_old_l = i_old.last(),
1248
+ i_new_l = i_new.last();
1249
+
1250
+ sz_resetMargin(a_itm, opts);
1251
+
1252
+ var pL = 0,
1253
+ pR = 0;
1254
+
1255
+ if (opts.align)
1256
+ {
1257
+ var p = cf_getAlignPadding(i_new, opts);
1258
+ pL = p[0];
1259
+ pR = p[1];
1260
+ }
1261
+
1262
+ // hide items for fx directscroll
1263
+ var hiddenitems = false,
1264
+ i_skp = $();
1265
+ if (opts.items.visibleConf.old < nI)
1266
+ {
1267
+ i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
1268
+ if (sO.fx == 'directscroll')
1269
+ {
1270
+ var orgW = opts.items[opts.d['width']];
1271
+ hiddenitems = i_skp;
1272
+ i_cur_l = i_old_l;
1273
+ sc_hideHiddenItems(hiddenitems);
1274
+ opts.items[opts.d['width']] = 'variable';
1275
+ }
1276
+ }
1277
+ // save new sizes
1278
+ var $cf2 = false,
1279
+ i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
1280
+ w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
1281
+ i_siz_vis = 0,
1282
+ a_cfs = {},
1283
+ a_cfs_vis = {},
1284
+ a_cur = {},
1285
+ a_old = {},
1286
+ a_lef = {},
1287
+ a_dur = sc_getDuration(sO, opts, nI, i_siz);
1288
+
1289
+ switch(sO.fx)
1290
+ {
1291
+ case 'uncover':
1292
+ case 'uncover-fade':
1293
+ i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visibleConf.old), opts, 'width');
1294
+ break;
1295
+ }
1296
+
1297
+ if (hiddenitems)
1298
+ {
1299
+ opts.items[opts.d['width']] = orgW;
1300
+ }
1301
+
1302
+ if (opts.align)
1303
+ {
1304
+ if (opts.padding[opts.d[1]] < 0)
1305
+ {
1306
+ opts.padding[opts.d[1]] = 0;
1307
+ }
1308
+ }
1309
+ sz_resetMargin(a_itm, opts, true);
1310
+ sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
1311
+
1312
+ if (opts.align)
1313
+ {
1314
+ opts.padding[opts.d[1]] = pR;
1315
+ opts.padding[opts.d[3]] = pL;
1316
+ }
1317
+
1318
+ a_lef[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
1319
+
1320
+ // scrolling functions
1321
+ var _s_wrapper = function() {},
1322
+ _a_wrapper = function() {},
1323
+ _s_paddingold = function() {},
1324
+ _a_paddingold = function() {},
1325
+ _s_paddingcur = function() {},
1326
+ _a_paddingcur = function() {},
1327
+ _onafter = function() {},
1328
+ _moveitems = function() {},
1329
+ _position = function() {};
1330
+
1331
+ // clone carousel
1332
+ switch(sO.fx)
1333
+ {
1334
+ case 'crossfade':
1335
+ case 'cover':
1336
+ case 'cover-fade':
1337
+ case 'uncover':
1338
+ case 'uncover-fade':
1339
+ $cf2 = $cfs.clone(true).appendTo($wrp);
1340
+ $cf2.children().slice(opts.items.visibleConf.old).remove();
1341
+ break;
1342
+ }
1343
+ switch(sO.fx)
1344
+ {
1345
+ case 'crossfade':
1346
+ case 'cover':
1347
+ case 'cover-fade':
1348
+ $cfs.css('zIndex', 1);
1349
+ $cf2.css('zIndex', 0);
1350
+ break;
1351
+ }
1352
+
1353
+ // reset all scrolls
1354
+ scrl = sc_setScroll(a_dur, sO.easing, conf);
1355
+
1356
+ // animate / set carousel
1357
+ a_cfs[opts.d['left']] = -i_siz;
1358
+ a_cfs_vis[opts.d['left']] = -i_siz_vis;
1359
+
1360
+ if (pL < 0)
1361
+ {
1362
+ a_cfs[opts.d['left']] += pL;
1363
+ }
1364
+
1365
+ // animate / set wrapper
1366
+ if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
1367
+ {
1368
+ _s_wrapper = function() {
1369
+ $wrp.css(w_siz);
1370
+ };
1371
+ _a_wrapper = function() {
1372
+ scrl.anims.push([$wrp, w_siz]);
1373
+ };
1374
+ }
1375
+
1376
+ // animate / set items
1377
+ if (opts.usePadding)
1378
+ {
1379
+ var i_new_l_m = i_new_l.data('_cfs_origCssMargin');
1380
+
1381
+ if (pR >= 0)
1382
+ {
1383
+ i_new_l_m += opts.padding[opts.d[1]];
1384
+ }
1385
+ i_new_l.css(opts.d['marginRight'], i_new_l_m);
1386
+
1387
+ if (i_cur_l.not(i_old_l).length)
1388
+ {
1389
+ a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
1390
+ }
1391
+ _s_paddingold = function() {
1392
+ i_old_l.css(a_old);
1393
+ };
1394
+ _a_paddingold = function() {
1395
+ scrl.anims.push([i_old_l, a_old]);
1396
+ };
1397
+
1398
+ var i_cur_l_m = i_cur_l.data('_cfs_origCssMargin');
1399
+ if (pL > 0)
1400
+ {
1401
+ i_cur_l_m += opts.padding[opts.d[3]];
1402
+ }
1403
+
1404
+ a_cur[opts.d['marginRight']] = i_cur_l_m;
1405
+
1406
+ _s_paddingcur = function() {
1407
+ i_cur_l.css(a_cur);
1408
+ };
1409
+ _a_paddingcur = function() {
1410
+ scrl.anims.push([i_cur_l, a_cur]);
1411
+ };
1412
+ }
1413
+
1414
+ // set position
1415
+ _position = function() {
1416
+ $cfs.css(a_lef);
1417
+ };
1418
+
1419
+
1420
+ var overFill = opts.items.visible+nI-itms.total;
1421
+
1422
+ // rearrange items
1423
+ _moveitems = function() {
1424
+ if (overFill > 0)
1425
+ {
1426
+ $cfs.children().slice(itms.total).remove();
1427
+ }
1428
+ var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last();
1429
+ if (overFill > 0)
1430
+ {
1431
+ i_new = gi_getCurrentItems(a_itm, opts);
1432
+ }
1433
+ sc_showHiddenItems(hiddenitems);
1434
+
1435
+ if (opts.usePadding)
1436
+ {
1437
+ if (itms.total < opts.items.visible+nI) {
1438
+ var i_cur_l = $cfs.children().eq(opts.items.visible-1);
1439
+ i_cur_l.css(opts.d['marginRight'], i_cur_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]);
1440
+ }
1441
+ l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
1442
+ }
1443
+ };
1444
+
1445
+
1446
+ var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'next', a_dur, w_siz);
1447
+
1448
+ // fire onAfter callbacks
1449
+ _onafter = function() {
1450
+ $cfs.css('zIndex', $cfs.data('_cfs_origCssZindex'));
1451
+ sc_afterScroll($cfs, $cf2, sO);
1452
+ crsl.isScrolling = false;
1453
+ clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
1454
+ queu = sc_fireQueue($cfs, queu, conf);
1455
+
1456
+ if (!crsl.isPaused)
1457
+ {
1458
+ $cfs.trigger(cf_e('play', conf));
1459
+ }
1460
+ };
1461
+
1462
+ // fire onBefore callbacks
1463
+ crsl.isScrolling = true;
1464
+ tmrs = sc_clearTimers(tmrs);
1465
+ clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
1466
+
1467
+ switch(sO.fx)
1468
+ {
1469
+ case 'none':
1470
+ $cfs.css(a_cfs);
1471
+ _s_wrapper();
1472
+ _s_paddingold();
1473
+ _s_paddingcur();
1474
+ _position();
1475
+ _moveitems();
1476
+ _onafter();
1477
+ break;
1478
+
1479
+ case 'fade':
1480
+ scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
1481
+ _s_wrapper();
1482
+ _s_paddingold();
1483
+ _s_paddingcur();
1484
+ _position();
1485
+ _moveitems();
1486
+ scrl = sc_setScroll(a_dur, sO.easing, conf);
1487
+ scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1488
+ sc_startScroll(scrl, conf);
1489
+ }]);
1490
+ break;
1491
+
1492
+ case 'crossfade':
1493
+ $cfs.css({ 'opacity': 0 });
1494
+ scrl.anims.push([$cf2, { 'opacity': 0 }]);
1495
+ scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
1496
+ _a_wrapper();
1497
+ _s_paddingold();
1498
+ _s_paddingcur();
1499
+ _position();
1500
+ _moveitems();
1501
+ break;
1502
+
1503
+ case 'cover':
1504
+ $cfs.css(opts.d['left'], $wrp[opts.d['width']]());
1505
+ scrl.anims.push([$cfs, a_lef, _onafter]);
1506
+ _a_wrapper();
1507
+ _s_paddingold();
1508
+ _s_paddingcur();
1509
+ _moveitems();
1510
+ break;
1511
+
1512
+ case 'cover-fade':
1513
+ $cfs.css(opts.d['left'], $wrp[opts.d['width']]());
1514
+ scrl.anims.push([$cf2, { 'opacity': 0 }]);
1515
+ scrl.anims.push([$cfs, a_lef, _onafter]);
1516
+ _a_wrapper();
1517
+ _s_paddingold();
1518
+ _s_paddingcur();
1519
+ _moveitems();
1520
+ break;
1521
+
1522
+ case 'uncover':
1523
+ scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
1524
+ _a_wrapper();
1525
+ _s_paddingold();
1526
+ _s_paddingcur();
1527
+ _position();
1528
+ _moveitems();
1529
+ break;
1530
+
1531
+ case 'uncover-fade':
1532
+ $cfs.css({ 'opacity': 0 });
1533
+ scrl.anims.push([$cfs, { 'opacity': 1 }]);
1534
+ scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
1535
+ _a_wrapper();
1536
+ _s_paddingold();
1537
+ _s_paddingcur();
1538
+ _position();
1539
+ _moveitems();
1540
+ break;
1541
+
1542
+ default:
1543
+ scrl.anims.push([$cfs, a_cfs, function() {
1544
+ _position();
1545
+ _moveitems();
1546
+ _onafter();
1547
+ }]);
1548
+ _a_wrapper();
1549
+ _a_paddingold();
1550
+ _a_paddingcur();
1551
+ break;
1552
+ }
1553
+
1554
+ sc_startScroll(scrl, conf);
1555
+ cf_setCookie(opts.cookie, $cfs, conf);
1556
+
1557
+ $cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
1558
+
1559
+ return true;
1560
+ });
1561
+
1562
+
1563
+ // slideTo event
1564
+ $cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) {
1565
+ e.stopPropagation();
1566
+
1567
+ var v = [num, dev, org, obj, dir, clb],
1568
+ t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'],
1569
+ a = cf_sortParams(v, t);
1570
+
1571
+ obj = a[3];
1572
+ dir = a[4];
1573
+ clb = a[5];
1574
+
1575
+ num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs);
1576
+
1577
+ if (num == 0)
1578
+ {
1579
+ return false;
1580
+ }
1581
+ if (!is_object(obj))
1582
+ {
1583
+ obj = false;
1584
+ }
1585
+
1586
+ if (dir != 'prev' && dir != 'next')
1587
+ {
1588
+ if (opts.circular)
1589
+ {
1590
+ dir = (num <= itms.total / 2) ? 'next' : 'prev';
1591
+ }
1592
+ else
1593
+ {
1594
+ dir = (itms.first == 0 || itms.first > num) ? 'next' : 'prev';
1595
+ }
1596
+ }
1597
+
1598
+ if (dir == 'prev')
1599
+ {
1600
+ num = itms.total-num;
1601
+ }
1602
+ $cfs.trigger(cf_e(dir, conf), [obj, num, clb]);
1603
+
1604
+ return true;
1605
+ });
1606
+
1607
+
1608
+ // prevPage event
1609
+ $cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) {
1610
+ e.stopPropagation();
1611
+ var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
1612
+ return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]);
1613
+ });
1614
+
1615
+
1616
+ // nextPage event
1617
+ $cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) {
1618
+ e.stopPropagation();
1619
+ var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
1620
+ return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]);
1621
+ });
1622
+
1623
+
1624
+ // slideToPage event
1625
+ $cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) {
1626
+ e.stopPropagation();
1627
+ if (!is_number(pag))
1628
+ {
1629
+ pag = $cfs.triggerHandler(cf_e('currentPage', conf));
1630
+ }
1631
+ var ipp = opts.pagination.items || opts.items.visible,
1632
+ max = Math.ceil(itms.total / ipp)-1;
1633
+
1634
+ if (pag < 0)
1635
+ {
1636
+ pag = max;
1637
+ }
1638
+ if (pag > max)
1639
+ {
1640
+ pag = 0;
1641
+ }
1642
+ return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]);
1643
+ });
1644
+
1645
+ // jumpToStart event
1646
+ $cfs.bind(cf_e('jumpToStart', conf), function(e, s) {
1647
+ e.stopPropagation();
1648
+ if (s)
1649
+ {
1650
+ s = gn_getItemIndex(s, 0, true, itms, $cfs);
1651
+ }
1652
+ else
1653
+ {
1654
+ s = 0;
1655
+ }
1656
+
1657
+ s += itms.first;
1658
+ if (s != 0)
1659
+ {
1660
+ if (itms.total > 0)
1661
+ {
1662
+ while (s > itms.total)
1663
+ {
1664
+ s -= itms.total;
1665
+ }
1666
+ }
1667
+ $cfs.prepend($cfs.children().slice(s, itms.total));
1668
+ }
1669
+ return true;
1670
+ });
1671
+
1672
+
1673
+ // synchronise event
1674
+ $cfs.bind(cf_e('synchronise', conf), function(e, s) {
1675
+ e.stopPropagation();
1676
+ if (s)
1677
+ {
1678
+ s = cf_getSynchArr(s);
1679
+ }
1680
+ else if (opts.synchronise)
1681
+ {
1682
+ s = opts.synchronise;
1683
+ }
1684
+ else
1685
+ {
1686
+ return debug(conf, 'No carousel to synchronise.');
1687
+ }
1688
+
1689
+ var n = $cfs.triggerHandler(cf_e('currentPosition', conf)),
1690
+ x = true;
1691
+
1692
+ for (var j = 0, l = s.length; j < l; j++)
1693
+ {
1694
+ if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true]))
1695
+ {
1696
+ x = false;
1697
+ }
1698
+ }
1699
+ return x;
1700
+ });
1701
+
1702
+
1703
+ // queue event
1704
+ $cfs.bind(cf_e('queue', conf), function(e, dir, opt) {
1705
+ e.stopPropagation();
1706
+ if (is_function(dir))
1707
+ {
1708
+ dir.call($tt0, queu);
1709
+ }
1710
+ else if (is_array(dir))
1711
+ {
1712
+ queu = dir;
1713
+ }
1714
+ else if (!is_undefined(dir))
1715
+ {
1716
+ queu.push([dir, opt]);
1717
+ }
1718
+ return queu;
1719
+ });
1720
+
1721
+
1722
+ // insertItem event
1723
+ $cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) {
1724
+ e.stopPropagation();
1725
+
1726
+ var v = [itm, num, org, dev],
1727
+ t = ['string/object', 'string/number/object', 'boolean', 'number'],
1728
+ a = cf_sortParams(v, t);
1729
+
1730
+ itm = a[0];
1731
+ num = a[1];
1732
+ org = a[2];
1733
+ dev = a[3];
1734
+
1735
+ if (is_object(itm) && !is_jquery(itm))
1736
+ {
1737
+ itm = $(itm);
1738
+ }
1739
+ else if (is_string(itm))
1740
+ {
1741
+ itm = $(itm);
1742
+ }
1743
+ if (!is_jquery(itm) || itm.length == 0)
1744
+ {
1745
+ return debug(conf, 'Not a valid object.');
1746
+ }
1747
+
1748
+ if (is_undefined(num))
1749
+ {
1750
+ num = 'end';
1751
+ }
1752
+
1753
+ sz_storeMargin(itm, opts);
1754
+ sz_storeOrigCss(itm);
1755
+
1756
+ var orgNum = num,
1757
+ before = 'before';
1758
+
1759
+ if (num == 'end')
1760
+ {
1761
+ if (org)
1762
+ {
1763
+ if (itms.first == 0)
1764
+ {
1765
+ num = itms.total-1;
1766
+ before = 'after';
1767
+ }
1768
+ else
1769
+ {
1770
+ num = itms.first;
1771
+ itms.first += itm.length;
1772
+ }
1773
+ if (num < 0)
1774
+ {
1775
+ num = 0;
1776
+ }
1777
+ }
1778
+ else
1779
+ {
1780
+ num = itms.total-1;
1781
+ before = 'after';
1782
+ }
1783
+ }
1784
+ else
1785
+ {
1786
+ num = gn_getItemIndex(num, dev, org, itms, $cfs);
1787
+ }
1788
+
1789
+ var $cit = $cfs.children().eq(num);
1790
+ if ($cit.length)
1791
+ {
1792
+ $cit[before](itm);
1793
+ }
1794
+ else
1795
+ {
1796
+ debug(conf, 'Correct insert-position not found! Appending item to the end.');
1797
+ $cfs.append(itm);
1798
+ }
1799
+
1800
+ if (orgNum != 'end' && !org)
1801
+ {
1802
+ if (num < itms.first)
1803
+ {
1804
+ itms.first += itm.length;
1805
+ }
1806
+ }
1807
+ itms.total = $cfs.children().length;
1808
+ if (itms.first >= itms.total)
1809
+ {
1810
+ itms.first -= itms.total;
1811
+ }
1812
+
1813
+ $cfs.trigger(cf_e('updateSizes', conf));
1814
+ $cfs.trigger(cf_e('linkAnchors', conf));
1815
+
1816
+ return true;
1817
+ });
1818
+
1819
+
1820
+ // removeItem event
1821
+ $cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) {
1822
+ e.stopPropagation();
1823
+
1824
+ var v = [num, org, dev],
1825
+ t = ['string/number/object', 'boolean', 'number'],
1826
+ a = cf_sortParams(v, t);
1827
+
1828
+ num = a[0];
1829
+ org = a[1];
1830
+ dev = a[2];
1831
+
1832
+ var removed = false;
1833
+
1834
+ if (num instanceof $ && num.length > 1)
1835
+ {
1836
+ $removed = $();
1837
+ num.each(function(i, el) {
1838
+ var $rem = $cfs.trigger(cf_e('removeItem', conf), [$(this), org, dev]);
1839
+ if ( $rem )
1840
+ {
1841
+ $removed = $removed.add($rem);
1842
+ }
1843
+ });
1844
+ return $removed;
1845
+ }
1846
+
1847
+ if (is_undefined(num) || num == 'end')
1848
+ {
1849
+ $removed = $cfs.children().last();
1850
+ }
1851
+ else
1852
+ {
1853
+ num = gn_getItemIndex(num, dev, org, itms, $cfs);
1854
+ var $removed = $cfs.children().eq(num);
1855
+ if ( $removed.length )
1856
+ {
1857
+ if (num < itms.first)
1858
+ {
1859
+ itms.first -= $removed.length;
1860
+ }
1861
+ }
1862
+ }
1863
+ if ( $removed && $removed.length )
1864
+ {
1865
+ $removed.detach();
1866
+ itms.total = $cfs.children().length;
1867
+ $cfs.trigger(cf_e('updateSizes', conf));
1868
+ }
1869
+
1870
+ return $removed;
1871
+ });
1872
+
1873
+
1874
+ // onBefore and onAfter event
1875
+ $cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) {
1876
+ e.stopPropagation();
1877
+ var eType = e.type.slice(conf.events.prefix.length);
1878
+ if (is_array(fn))
1879
+ {
1880
+ clbk[eType] = fn;
1881
+ }
1882
+ if (is_function(fn))
1883
+ {
1884
+ clbk[eType].push(fn);
1885
+ }
1886
+ return clbk[eType];
1887
+ });
1888
+
1889
+
1890
+ // currentPosition event
1891
+ $cfs.bind(cf_e('currentPosition', conf), function(e, fn) {
1892
+ e.stopPropagation();
1893
+ if (itms.first == 0)
1894
+ {
1895
+ var val = 0;
1896
+ }
1897
+ else
1898
+ {
1899
+ var val = itms.total - itms.first;
1900
+ }
1901
+ if (is_function(fn))
1902
+ {
1903
+ fn.call($tt0, val);
1904
+ }
1905
+ return val;
1906
+ });
1907
+
1908
+
1909
+ // currentPage event
1910
+ $cfs.bind(cf_e('currentPage', conf), function(e, fn) {
1911
+ e.stopPropagation();
1912
+ var ipp = opts.pagination.items || opts.items.visible,
1913
+ max = Math.ceil(itms.total/ipp-1),
1914
+ nr;
1915
+ if (itms.first == 0)
1916
+ {
1917
+ nr = 0;
1918
+ }
1919
+ else if (itms.first < itms.total % ipp)
1920
+ {
1921
+ nr = 0;
1922
+ }
1923
+ else if (itms.first == ipp && !opts.circular)
1924
+ {
1925
+ nr = max;
1926
+ }
1927
+ else
1928
+ {
1929
+ nr = Math.round((itms.total-itms.first)/ipp);
1930
+ }
1931
+ if (nr < 0)
1932
+ {
1933
+ nr = 0;
1934
+ }
1935
+ if (nr > max)
1936
+ {
1937
+ nr = max;
1938
+ }
1939
+ if (is_function(fn))
1940
+ {
1941
+ fn.call($tt0, nr);
1942
+ }
1943
+ return nr;
1944
+ });
1945
+
1946
+
1947
+ // currentVisible event
1948
+ $cfs.bind(cf_e('currentVisible', conf), function(e, fn) {
1949
+ e.stopPropagation();
1950
+ var $i = gi_getCurrentItems($cfs.children(), opts);
1951
+ if (is_function(fn))
1952
+ {
1953
+ fn.call($tt0, $i);
1954
+ }
1955
+ return $i;
1956
+ });
1957
+
1958
+
1959
+ // slice event
1960
+ $cfs.bind(cf_e('slice', conf), function(e, f, l, fn) {
1961
+ e.stopPropagation();
1962
+
1963
+ if (itms.total == 0)
1964
+ {
1965
+ return false;
1966
+ }
1967
+
1968
+ var v = [f, l, fn],
1969
+ t = ['number', 'number', 'function'],
1970
+ a = cf_sortParams(v, t);
1971
+
1972
+ f = (is_number(a[0])) ? a[0] : 0;
1973
+ l = (is_number(a[1])) ? a[1] : itms.total;
1974
+ fn = a[2];
1975
+
1976
+ f += itms.first;
1977
+ l += itms.first;
1978
+
1979
+ if (items.total > 0)
1980
+ {
1981
+ while (f > itms.total)
1982
+ {
1983
+ f -= itms.total;
1984
+ }
1985
+ while (l > itms.total)
1986
+ {
1987
+ l -= itms.total;
1988
+ }
1989
+ while (f < 0)
1990
+ {
1991
+ f += itms.total;
1992
+ }
1993
+ while (l < 0)
1994
+ {
1995
+ l += itms.total;
1996
+ }
1997
+ }
1998
+ var $iA = $cfs.children(),
1999
+ $i;
2000
+
2001
+ if (l > f)
2002
+ {
2003
+ $i = $iA.slice(f, l);
2004
+ }
2005
+ else
2006
+ {
2007
+ $i = $( $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() ) );
2008
+ }
2009
+
2010
+ if (is_function(fn))
2011
+ {
2012
+ fn.call($tt0, $i);
2013
+ }
2014
+ return $i;
2015
+ });
2016
+
2017
+
2018
+ // isPaused, isStopped and isScrolling events
2019
+ $cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) {
2020
+ e.stopPropagation();
2021
+ var eType = e.type.slice(conf.events.prefix.length),
2022
+ value = crsl[eType];
2023
+ if (is_function(fn))
2024
+ {
2025
+ fn.call($tt0, value);
2026
+ }
2027
+ return value;
2028
+ });
2029
+
2030
+
2031
+ // configuration event
2032
+ $cfs.bind(cf_e('configuration', conf), function(e, a, b, c) {
2033
+ e.stopPropagation();
2034
+ var reInit = false;
2035
+
2036
+ // return entire configuration-object
2037
+ if (is_function(a))
2038
+ {
2039
+ a.call($tt0, opts);
2040
+ }
2041
+ // set multiple options via object
2042
+ else if (is_object(a))
2043
+ {
2044
+ opts_orig = $.extend(true, {}, opts_orig, a);
2045
+ if (b !== false) reInit = true;
2046
+ else opts = $.extend(true, {}, opts, a);
2047
+
2048
+ }
2049
+ else if (!is_undefined(a))
2050
+ {
2051
+
2052
+ // callback function for specific option
2053
+ if (is_function(b))
2054
+ {
2055
+ var val = eval('opts.'+a);
2056
+ if (is_undefined(val))
2057
+ {
2058
+ val = '';
2059
+ }
2060
+ b.call($tt0, val);
2061
+ }
2062
+ // set individual option
2063
+ else if (!is_undefined(b))
2064
+ {
2065
+ if (typeof c !== 'boolean') c = true;
2066
+ eval('opts_orig.'+a+' = b');
2067
+ if (c !== false) reInit = true;
2068
+ else eval('opts.'+a+' = b');
2069
+ }
2070
+ // return value for specific option
2071
+ else
2072
+ {
2073
+ return eval('opts.'+a);
2074
+ }
2075
+ }
2076
+ if (reInit)
2077
+ {
2078
+ sz_resetMargin($cfs.children(), opts);
2079
+ FN._init(opts_orig);
2080
+ FN._bind_buttons();
2081
+ var sz = sz_setSizes($cfs, opts);
2082
+ $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
2083
+ }
2084
+ return opts;
2085
+ });
2086
+
2087
+
2088
+ // linkAnchors event
2089
+ $cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) {
2090
+ e.stopPropagation();
2091
+
2092
+ if (is_undefined($con))
2093
+ {
2094
+ $con = $('body');
2095
+ }
2096
+ else if (is_string($con))
2097
+ {
2098
+ $con = $($con);
2099
+ }
2100
+ if (!is_jquery($con) || $con.length == 0)
2101
+ {
2102
+ return debug(conf, 'Not a valid object.');
2103
+ }
2104
+ if (!is_string(sel))
2105
+ {
2106
+ sel = 'a.caroufredsel';
2107
+ }
2108
+
2109
+ $con.find(sel).each(function() {
2110
+ var h = this.hash || '';
2111
+ if (h.length > 0 && $cfs.children().index($(h)) != -1)
2112
+ {
2113
+ $(this).unbind('click').click(function(e) {
2114
+ e.preventDefault();
2115
+ $cfs.trigger(cf_e('slideTo', conf), h);
2116
+ });
2117
+ }
2118
+ });
2119
+ return true;
2120
+ });
2121
+
2122
+
2123
+ // updatePageStatus event
2124
+ $cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) {
2125
+ e.stopPropagation();
2126
+ if (!opts.pagination.container)
2127
+ {
2128
+ return;
2129
+ }
2130
+
2131
+ var ipp = opts.pagination.items || opts.items.visible,
2132
+ pgs = Math.ceil(itms.total/ipp);
2133
+
2134
+ if (build)
2135
+ {
2136
+ if (opts.pagination.anchorBuilder)
2137
+ {
2138
+ opts.pagination.container.children().remove();
2139
+ opts.pagination.container.each(function() {
2140
+ for (var a = 0; a < pgs; a++)
2141
+ {
2142
+ var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) );
2143
+ $(this).append(opts.pagination.anchorBuilder.call(i[0], a+1));
2144
+ }
2145
+ });
2146
+ }
2147
+ opts.pagination.container.each(function() {
2148
+ $(this).children().unbind(opts.pagination.event).each(function(a) {
2149
+ $(this).bind(opts.pagination.event, function(e) {
2150
+ e.preventDefault();
2151
+ $cfs.trigger(cf_e('slideTo', conf), [a*ipp, -opts.pagination.deviation, true, opts.pagination]);
2152
+ });
2153
+ });
2154
+ });
2155
+ }
2156
+
2157
+ var selected = $cfs.triggerHandler(cf_e('currentPage', conf)) + opts.pagination.deviation;
2158
+ if (selected >= pgs)
2159
+ {
2160
+ selected = 0;
2161
+ }
2162
+ if (selected < 0)
2163
+ {
2164
+ selected = pgs-1;
2165
+ }
2166
+ opts.pagination.container.each(function() {
2167
+ $(this).children().removeClass(cf_c('selected', conf)).eq(selected).addClass(cf_c('selected', conf));
2168
+ });
2169
+ return true;
2170
+ });
2171
+
2172
+
2173
+ // updateSizes event
2174
+ $cfs.bind(cf_e('updateSizes', conf), function(e) {
2175
+ var vI = opts.items.visible,
2176
+ a_itm = $cfs.children(),
2177
+ avail_primary = ms_getParentSize($wrp, opts, 'width');
2178
+
2179
+ itms.total = a_itm.length;
2180
+
2181
+ if (crsl.primarySizePercentage)
2182
+ {
2183
+ opts.maxDimension = avail_primary;
2184
+ opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
2185
+ }
2186
+ else
2187
+ {
2188
+ opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
2189
+ }
2190
+
2191
+ if (opts.responsive)
2192
+ {
2193
+ opts.items.width = opts.items.sizesConf.width;
2194
+ opts.items.height = opts.items.sizesConf.height;
2195
+ opts = in_getResponsiveValues(opts, a_itm, avail_primary);
2196
+ vI = opts.items.visible;
2197
+ sz_setResponsiveSizes(opts, a_itm);
2198
+ }
2199
+ else if (opts.items.visibleConf.variable)
2200
+ {
2201
+ vI = gn_getVisibleItemsNext(a_itm, opts, 0);
2202
+ }
2203
+ else if (opts.items.filter != '*')
2204
+ {
2205
+ vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
2206
+ }
2207
+
2208
+ if (!opts.circular && itms.first != 0 && vI > itms.first) {
2209
+ if (opts.items.visibleConf.variable)
2210
+ {
2211
+ var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first;
2212
+ }
2213
+ else if (opts.items.filter != '*')
2214
+ {
2215
+ var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first;
2216
+ }
2217
+ else
2218
+ {
2219
+ var nI = opts.items.visible - itms.first;
2220
+ }
2221
+ debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.');
2222
+ $cfs.trigger(cf_e('prev', conf), nI);
2223
+ }
2224
+
2225
+ opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
2226
+ opts.items.visibleConf.old = opts.items.visible;
2227
+ opts = in_getAlignPadding(opts, a_itm);
2228
+
2229
+ var sz = sz_setSizes($cfs, opts);
2230
+ $cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
2231
+ nv_showNavi(opts, itms.total, conf);
2232
+ nv_enableNavi(opts, itms.first, conf);
2233
+
2234
+ return sz;
2235
+ });
2236
+
2237
+
2238
+ // destroy event
2239
+ $cfs.bind(cf_e('destroy', conf), function(e, orgOrder) {
2240
+ e.stopPropagation();
2241
+ tmrs = sc_clearTimers(tmrs);
2242
+
2243
+ $cfs.data('_cfs_isCarousel', false);
2244
+ $cfs.trigger(cf_e('finish', conf));
2245
+ if (orgOrder)
2246
+ {
2247
+ $cfs.trigger(cf_e('jumpToStart', conf));
2248
+ }
2249
+ sz_restoreOrigCss($cfs.children());
2250
+ sz_restoreOrigCss($cfs);
2251
+ FN._unbind_events();
2252
+ FN._unbind_buttons();
2253
+ if (conf.wrapper == 'parent')
2254
+ {
2255
+ sz_restoreOrigCss($wrp);
2256
+ }
2257
+ else
2258
+ {
2259
+ $wrp.replaceWith($cfs);
2260
+ }
2261
+
2262
+ return true;
2263
+ });
2264
+
2265
+
2266
+ // debug event
2267
+ $cfs.bind(cf_e('debug', conf), function(e) {
2268
+ debug(conf, 'Carousel width: ' + opts.width);
2269
+ debug(conf, 'Carousel height: ' + opts.height);
2270
+ debug(conf, 'Item widths: ' + opts.items.width);
2271
+ debug(conf, 'Item heights: ' + opts.items.height);
2272
+ debug(conf, 'Number of items visible: ' + opts.items.visible);
2273
+ if (opts.auto.play)
2274
+ {
2275
+ debug(conf, 'Number of items scrolled automatically: ' + opts.auto.items);
2276
+ }
2277
+ if (opts.prev.button)
2278
+ {
2279
+ debug(conf, 'Number of items scrolled backward: ' + opts.prev.items);
2280
+ }
2281
+ if (opts.next.button)
2282
+ {
2283
+ debug(conf, 'Number of items scrolled forward: ' + opts.next.items);
2284
+ }
2285
+ return conf.debug;
2286
+ });
2287
+
2288
+
2289
+ // triggerEvent, making prefixed and namespaced events accessible from outside
2290
+ $cfs.bind('_cfs_triggerEvent', function(e, n, o) {
2291
+ e.stopPropagation();
2292
+ return $cfs.triggerHandler(cf_e(n, conf), o);
2293
+ });
2294
+ }; // /bind_events
2295
+
2296
+
2297
+ FN._unbind_events = function() {
2298
+ $cfs.unbind(cf_e('', conf));
2299
+ $cfs.unbind(cf_e('', conf, false));
2300
+ $cfs.unbind('_cfs_triggerEvent');
2301
+ }; // /unbind_events
2302
+
2303
+
2304
+ FN._bind_buttons = function() {
2305
+ FN._unbind_buttons();
2306
+ nv_showNavi(opts, itms.total, conf);
2307
+ nv_enableNavi(opts, itms.first, conf);
2308
+
2309
+ if (opts.auto.pauseOnHover)
2310
+ {
2311
+ var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover);
2312
+ $wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2313
+ .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2314
+ }
2315
+
2316
+ // play button
2317
+ if (opts.auto.button)
2318
+ {
2319
+ opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) {
2320
+ e.preventDefault();
2321
+ var ev = false,
2322
+ pC = null;
2323
+
2324
+ if (crsl.isPaused)
2325
+ {
2326
+ ev = 'play';
2327
+ }
2328
+ else if (opts.auto.pauseOnEvent)
2329
+ {
2330
+ ev = 'pause';
2331
+ pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);
2332
+ }
2333
+ if (ev)
2334
+ {
2335
+ $cfs.trigger(cf_e(ev, conf), pC);
2336
+ }
2337
+ });
2338
+ }
2339
+
2340
+ // prev button
2341
+ if (opts.prev.button)
2342
+ {
2343
+ opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
2344
+ e.preventDefault();
2345
+ $cfs.trigger(cf_e('prev', conf));
2346
+ });
2347
+ if (opts.prev.pauseOnHover)
2348
+ {
2349
+ var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover);
2350
+ opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2351
+ .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2352
+ }
2353
+ }
2354
+
2355
+ // next butotn
2356
+ if (opts.next.button)
2357
+ {
2358
+ opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
2359
+ e.preventDefault();
2360
+ $cfs.trigger(cf_e('next', conf));
2361
+ });
2362
+ if (opts.next.pauseOnHover)
2363
+ {
2364
+ var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover);
2365
+ opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2366
+ .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2367
+ }
2368
+ }
2369
+
2370
+ // pagination
2371
+ if (opts.pagination.container)
2372
+ {
2373
+ if (opts.pagination.pauseOnHover)
2374
+ {
2375
+ var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);
2376
+ opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
2377
+ .bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
2378
+ }
2379
+ }
2380
+
2381
+ // prev/next keys
2382
+ if (opts.prev.key || opts.next.key)
2383
+ {
2384
+ $(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
2385
+ var k = e.keyCode;
2386
+ if (k == opts.next.key)
2387
+ {
2388
+ e.preventDefault();
2389
+ $cfs.trigger(cf_e('next', conf));
2390
+ }
2391
+ if (k == opts.prev.key)
2392
+ {
2393
+ e.preventDefault();
2394
+ $cfs.trigger(cf_e('prev', conf));
2395
+ }
2396
+ });
2397
+ }
2398
+
2399
+ // pagination keys
2400
+ if (opts.pagination.keys)
2401
+ {
2402
+ $(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
2403
+ var k = e.keyCode;
2404
+ if (k >= 49 && k < 58)
2405
+ {
2406
+ k = (k-49) * opts.items.visible;
2407
+ if (k <= itms.total)
2408
+ {
2409
+ e.preventDefault();
2410
+ $cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]);
2411
+ }
2412
+ }
2413
+ });
2414
+ }
2415
+
2416
+ // swipe
2417
+ if ($.fn.swipe)
2418
+ {
2419
+ var isTouch = 'ontouchstart' in window;
2420
+ if ((isTouch && opts.swipe.onTouch) || (!isTouch && opts.swipe.onMouse))
2421
+ {
2422
+ var scP = $.extend(true, {}, opts.prev, opts.swipe),
2423
+ scN = $.extend(true, {}, opts.next, opts.swipe),
2424
+ swP = function() { $cfs.trigger(cf_e('prev', conf), [scP]) },
2425
+ swN = function() { $cfs.trigger(cf_e('next', conf), [scN]) };
2426
+
2427
+ switch (opts.direction)
2428
+ {
2429
+ case 'up':
2430
+ case 'down':
2431
+ opts.swipe.options.swipeUp = swN;
2432
+ opts.swipe.options.swipeDown = swP;
2433
+ break;
2434
+ default:
2435
+ opts.swipe.options.swipeLeft = swN;
2436
+ opts.swipe.options.swipeRight = swP;
2437
+ }
2438
+ if (crsl.swipe)
2439
+ {
2440
+ $cfs.swipe('destroy');
2441
+ }
2442
+ $wrp.swipe(opts.swipe.options);
2443
+ $wrp.css('cursor', 'move');
2444
+ crsl.swipe = true;
2445
+ }
2446
+ }
2447
+
2448
+ // mousewheel
2449
+ if ($.fn.mousewheel)
2450
+ {
2451
+
2452
+ if (opts.mousewheel)
2453
+ {
2454
+ var mcP = $.extend(true, {}, opts.prev, opts.mousewheel),
2455
+ mcN = $.extend(true, {}, opts.next, opts.mousewheel);
2456
+
2457
+ if (crsl.mousewheel)
2458
+ {
2459
+ $wrp.unbind(cf_e('mousewheel', conf, false));
2460
+ }
2461
+ $wrp.bind(cf_e('mousewheel', conf, false), function(e, delta) {
2462
+ e.preventDefault();
2463
+ if (delta > 0)
2464
+ {
2465
+ $cfs.trigger(cf_e('prev', conf), [mcP]);
2466
+ }
2467
+ else
2468
+ {
2469
+ $cfs.trigger(cf_e('next', conf), [mcN]);
2470
+ }
2471
+ });
2472
+ crsl.mousewheel = true;
2473
+ }
2474
+ }
2475
+
2476
+ if (opts.auto.play)
2477
+ {
2478
+ $cfs.trigger(cf_e('play', conf), opts.auto.delay);
2479
+ }
2480
+
2481
+ if (crsl.upDateOnWindowResize)
2482
+ {
2483
+ var resizeFn = function(e) {
2484
+ $cfs.trigger(cf_e('finish', conf));
2485
+ if (opts.auto.pauseOnResize && !crsl.isPaused)
2486
+ {
2487
+ $cfs.trigger(cf_e('play', conf));
2488
+ }
2489
+ sz_resetMargin($cfs.children(), opts);
2490
+ $cfs.trigger(cf_e('updateSizes', conf));
2491
+ };
2492
+
2493
+ var $w = $(window),
2494
+ onResize = null;
2495
+
2496
+ if ($.debounce && conf.onWindowResize == 'debounce')
2497
+ {
2498
+ onResize = $.debounce(200, resizeFn);
2499
+ }
2500
+ else if ($.throttle && conf.onWindowResize == 'throttle')
2501
+ {
2502
+ onResize = $.throttle(300, resizeFn);
2503
+ }
2504
+ else
2505
+ {
2506
+ var _windowWidth = 0,
2507
+ _windowHeight = 0;
2508
+
2509
+ onResize = function() {
2510
+ var nw = $w.width(),
2511
+ nh = $w.height();
2512
+
2513
+ if (nw != _windowWidth || nh != _windowHeight)
2514
+ {
2515
+ resizeFn();
2516
+ _windowWidth = nw;
2517
+ _windowHeight = nh;
2518
+ }
2519
+ };
2520
+ }
2521
+ $w.bind(cf_e('resize', conf, false, true, true), onResize);
2522
+ }
2523
+ }; // /bind_buttons
2524
+
2525
+
2526
+ FN._unbind_buttons = function() {
2527
+ var ns1 = cf_e('', conf),
2528
+ ns2 = cf_e('', conf, false);
2529
+ ns3 = cf_e('', conf, false, true, true);
2530
+
2531
+ $(document).unbind(ns3);
2532
+ $(window).unbind(ns3);
2533
+ $wrp.unbind(ns2);
2534
+
2535
+ if (opts.auto.button)
2536
+ {
2537
+ opts.auto.button.unbind(ns2);
2538
+ }
2539
+ if (opts.prev.button)
2540
+ {
2541
+ opts.prev.button.unbind(ns2);
2542
+ }
2543
+ if (opts.next.button)
2544
+ {
2545
+ opts.next.button.unbind(ns2);
2546
+ }
2547
+ if (opts.pagination.container)
2548
+ {
2549
+ opts.pagination.container.unbind(ns2);
2550
+ if (opts.pagination.anchorBuilder)
2551
+ {
2552
+ opts.pagination.container.children().remove();
2553
+ }
2554
+ }
2555
+ if (crsl.swipe)
2556
+ {
2557
+ $cfs.swipe('destroy');
2558
+ $wrp.css('cursor', 'default');
2559
+ crsl.swipe = false;
2560
+ }
2561
+ if (crsl.mousewheel)
2562
+ {
2563
+ crsl.mousewheel = false;
2564
+ }
2565
+
2566
+ nv_showNavi(opts, 'hide', conf);
2567
+ nv_enableNavi(opts, 'removeClass', conf);
2568
+
2569
+ }; // /unbind_buttons
2570
+
2571
+
2572
+
2573
+ // START
2574
+
2575
+ if (is_boolean(configs))
2576
+ {
2577
+ configs = {
2578
+ 'debug': configs
2579
+ };
2580
+ }
2581
+
2582
+ // set vars
2583
+ var crsl = {
2584
+ 'direction' : 'next',
2585
+ 'isPaused' : true,
2586
+ 'isScrolling' : false,
2587
+ 'isStopped' : false,
2588
+ 'mousewheel' : false,
2589
+ 'swipe' : false
2590
+ },
2591
+ itms = {
2592
+ 'total' : $cfs.children().length,
2593
+ 'first' : 0
2594
+ },
2595
+ tmrs = {
2596
+ 'auto' : null,
2597
+ 'progress' : null,
2598
+ 'startTime' : getTime(),
2599
+ 'timePassed' : 0
2600
+ },
2601
+ scrl = {
2602
+ 'isStopped' : false,
2603
+ 'duration' : 0,
2604
+ 'startTime' : 0,
2605
+ 'easing' : '',
2606
+ 'anims' : []
2607
+ },
2608
+ clbk = {
2609
+ 'onBefore' : [],
2610
+ 'onAfter' : []
2611
+ },
2612
+ queu = [],
2613
+ conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs),
2614
+ opts = {},
2615
+ opts_orig = $.extend(true, {}, options),
2616
+ $wrp = (conf.wrapper == 'parent')
2617
+ ? $cfs.parent()
2618
+ : $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();
2619
+
2620
+
2621
+ conf.selector = $cfs.selector;
2622
+ conf.serialNumber = $.fn.carouFredSel.serialNumber++;
2623
+
2624
+ conf.transition = (conf.transition && $.fn.transition) ? 'transition' : 'animate';
2625
+
2626
+ // create carousel
2627
+ FN._init(opts_orig, true, starting_position);
2628
+ FN._build();
2629
+ FN._bind_events();
2630
+ FN._bind_buttons();
2631
+
2632
+ // find item to start
2633
+ if (is_array(opts.items.start))
2634
+ {
2635
+ var start_arr = opts.items.start;
2636
+ }
2637
+ else
2638
+ {
2639
+ var start_arr = [];
2640
+ if (opts.items.start != 0)
2641
+ {
2642
+ start_arr.push(opts.items.start);
2643
+ }
2644
+ }
2645
+ if (opts.cookie)
2646
+ {
2647
+ start_arr.unshift(parseInt(cf_getCookie(opts.cookie), 10));
2648
+ }
2649
+
2650
+ if (start_arr.length > 0)
2651
+ {
2652
+ for (var a = 0, l = start_arr.length; a < l; a++)
2653
+ {
2654
+ var s = start_arr[a];
2655
+ if (s == 0)
2656
+ {
2657
+ continue;
2658
+ }
2659
+ if (s === true)
2660
+ {
2661
+ s = window.location.hash;
2662
+ if (s.length < 1)
2663
+ {
2664
+ continue;
2665
+ }
2666
+ }
2667
+ else if (s === 'random')
2668
+ {
2669
+ s = Math.floor(Math.random()*itms.total);
2670
+ }
2671
+ if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }]))
2672
+ {
2673
+ break;
2674
+ }
2675
+ }
2676
+ }
2677
+ var siz = sz_setSizes($cfs, opts),
2678
+ itm = gi_getCurrentItems($cfs.children(), opts);
2679
+
2680
+ if (opts.onCreate)
2681
+ {
2682
+ opts.onCreate.call($tt0, {
2683
+ 'width': siz.width,
2684
+ 'height': siz.height,
2685
+ 'items': itm
2686
+ });
2687
+ }
2688
+
2689
+ $cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
2690
+ $cfs.trigger(cf_e('linkAnchors', conf));
2691
+
2692
+ if (conf.debug)
2693
+ {
2694
+ $cfs.trigger(cf_e('debug', conf));
2695
+ }
2696
+
2697
+ return $cfs;
2698
+ };
2699
+
2700
+
2701
+
2702
+ // GLOBAL PUBLIC
2703
+
2704
+ $.fn.carouFredSel.serialNumber = 1;
2705
+ $.fn.carouFredSel.defaults = {
2706
+ 'synchronise' : false,
2707
+ 'infinite' : true,
2708
+ 'circular' : true,
2709
+ 'responsive' : false,
2710
+ 'direction' : 'left',
2711
+ 'items' : {
2712
+ 'start' : 0
2713
+ },
2714
+ 'scroll' : {
2715
+ 'easing' : 'swing',
2716
+ 'duration' : 500,
2717
+ 'pauseOnHover' : false,
2718
+ 'event' : 'click',
2719
+ 'queue' : false
2720
+ }
2721
+ };
2722
+ $.fn.carouFredSel.configs = {
2723
+ 'debug' : false,
2724
+ 'transition' : false,
2725
+ 'onWindowResize': 'throttle',
2726
+ 'events' : {
2727
+ 'prefix' : '',
2728
+ 'namespace' : 'cfs'
2729
+ },
2730
+ 'wrapper' : {
2731
+ 'element' : 'div',
2732
+ 'classname' : 'caroufredsel_wrapper'
2733
+ },
2734
+ 'classnames' : {}
2735
+ };
2736
+ $.fn.carouFredSel.pageAnchorBuilder = function(nr) {
2737
+ return '<a href="#"><span>'+nr+'</span></a>';
2738
+ };
2739
+ $.fn.carouFredSel.progressbarUpdater = function(perc) {
2740
+ $(this).css('width', perc+'%');
2741
+ };
2742
+
2743
+ $.fn.carouFredSel.cookie = {
2744
+ get: function(n) {
2745
+ n += '=';
2746
+ var ca = document.cookie.split(';');
2747
+ for (var a = 0, l = ca.length; a < l; a++)
2748
+ {
2749
+ var c = ca[a];
2750
+ while (c.charAt(0) == ' ')
2751
+ {
2752
+ c = c.slice(1);
2753
+ }
2754
+ if (c.indexOf(n) == 0)
2755
+ {
2756
+ return c.slice(n.length);
2757
+ }
2758
+ }
2759
+ return 0;
2760
+ },
2761
+ set: function(n, v, d) {
2762
+ var e = "";
2763
+ if (d)
2764
+ {
2765
+ var date = new Date();
2766
+ date.setTime(date.getTime() + (d * 24 * 60 * 60 * 1000));
2767
+ e = "; expires=" + date.toGMTString();
2768
+ }
2769
+ document.cookie = n + '=' + v + e + '; path=/';
2770
+ },
2771
+ remove: function(n) {
2772
+ $.fn.carouFredSel.cookie.set(n, "", -1);
2773
+ }
2774
+ };
2775
+
2776
+
2777
+ // GLOBAL PRIVATE
2778
+
2779
+ // scrolling functions
2780
+ function sc_setScroll(d, e, c) {
2781
+ if (c.transition == 'transition')
2782
+ {
2783
+ if (e == 'swing')
2784
+ {
2785
+ e = 'ease';
2786
+ }
2787
+ }
2788
+ return {
2789
+ anims: [],
2790
+ duration: d,
2791
+ orgDuration: d,
2792
+ easing: e,
2793
+ startTime: getTime()
2794
+ };
2795
+ }
2796
+ function sc_startScroll(s, c) {
2797
+ for (var a = 0, l = s.anims.length; a < l; a++)
2798
+ {
2799
+ var b = s.anims[a];
2800
+ if (!b)
2801
+ {
2802
+ continue;
2803
+ }
2804
+ b[0][c.transition](b[1], s.duration, s.easing, b[2]);
2805
+ }
2806
+ }
2807
+ function sc_stopScroll(s, finish) {
2808
+ if (!is_boolean(finish))
2809
+ {
2810
+ finish = true;
2811
+ }
2812
+ if (is_object(s.pre))
2813
+ {
2814
+ sc_stopScroll(s.pre, finish);
2815
+ }
2816
+ for (var a = 0, l = s.anims.length; a < l; a++)
2817
+ {
2818
+ var b = s.anims[a];
2819
+ b[0].stop(true);
2820
+ if (finish)
2821
+ {
2822
+ b[0].css(b[1]);
2823
+ if (is_function(b[2]))
2824
+ {
2825
+ b[2]();
2826
+ }
2827
+ }
2828
+ }
2829
+ if (is_object(s.post))
2830
+ {
2831
+ sc_stopScroll(s.post, finish);
2832
+ }
2833
+ }
2834
+ function sc_afterScroll( $c, $c2, o ) {
2835
+ if ($c2)
2836
+ {
2837
+ $c2.remove();
2838
+ }
2839
+
2840
+ switch(o.fx) {
2841
+ case 'fade':
2842
+ case 'crossfade':
2843
+ case 'cover-fade':
2844
+ case 'uncover-fade':
2845
+ $c.css('opacity', 1);
2846
+ $c.css('filter', '');
2847
+ break;
2848
+ }
2849
+ }
2850
+ function sc_fireCallbacks($t, o, b, a, c) {
2851
+ if (o[b])
2852
+ {
2853
+ o[b].call($t, a);
2854
+ }
2855
+ if (c[b].length)
2856
+ {
2857
+ for (var i = 0, l = c[b].length; i < l; i++)
2858
+ {
2859
+ c[b][i].call($t, a);
2860
+ }
2861
+ }
2862
+ return [];
2863
+ }
2864
+ function sc_fireQueue($c, q, c) {
2865
+
2866
+ if (q.length)
2867
+ {
2868
+ $c.trigger(cf_e(q[0][0], c), q[0][1]);
2869
+ q.shift();
2870
+ }
2871
+ return q;
2872
+ }
2873
+ function sc_hideHiddenItems(hiddenitems) {
2874
+ hiddenitems.each(function() {
2875
+ var hi = $(this);
2876
+ hi.data('_cfs_isHidden', hi.is(':hidden')).hide();
2877
+ });
2878
+ }
2879
+ function sc_showHiddenItems(hiddenitems) {
2880
+ if (hiddenitems)
2881
+ {
2882
+ hiddenitems.each(function() {
2883
+ var hi = $(this);
2884
+ if (!hi.data('_cfs_isHidden'))
2885
+ {
2886
+ hi.show();
2887
+ }
2888
+ });
2889
+ }
2890
+ }
2891
+ function sc_clearTimers(t) {
2892
+ if (t.auto)
2893
+ {
2894
+ clearTimeout(t.auto);
2895
+ }
2896
+ if (t.progress)
2897
+ {
2898
+ clearInterval(t.progress);
2899
+ }
2900
+ return t;
2901
+ }
2902
+ function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) {
2903
+ return {
2904
+ 'width': w_siz.width,
2905
+ 'height': w_siz.height,
2906
+ 'items': {
2907
+ 'old': i_old,
2908
+ 'skipped': i_skp,
2909
+ 'visible': i_new
2910
+ },
2911
+ 'scroll': {
2912
+ 'items': s_itm,
2913
+ 'direction': s_dir,
2914
+ 'duration': s_dur
2915
+ }
2916
+ };
2917
+ }
2918
+ function sc_getDuration( sO, o, nI, siz ) {
2919
+ var dur = sO.duration;
2920
+ if (sO.fx == 'none')
2921
+ {
2922
+ return 0;
2923
+ }
2924
+ if (dur == 'auto')
2925
+ {
2926
+ dur = o.scroll.duration / o.scroll.items * nI;
2927
+ }
2928
+ else if (dur < 10)
2929
+ {
2930
+ dur = siz / dur;
2931
+ }
2932
+ if (dur < 1)
2933
+ {
2934
+ return 0;
2935
+ }
2936
+ if (sO.fx == 'fade')
2937
+ {
2938
+ dur = dur / 2;
2939
+ }
2940
+ return Math.round(dur);
2941
+ }
2942
+
2943
+ // navigation functions
2944
+ function nv_showNavi(o, t, c) {
2945
+ var minimum = (is_number(o.items.minimum)) ? o.items.minimum : o.items.visible + 1;
2946
+ if (t == 'show' || t == 'hide')
2947
+ {
2948
+ var f = t;
2949
+ }
2950
+ else if (minimum > t)
2951
+ {
2952
+ debug(c, 'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.');
2953
+ var f = 'hide';
2954
+ }
2955
+ else
2956
+ {
2957
+ var f = 'show';
2958
+ }
2959
+ var s = (f == 'show') ? 'removeClass' : 'addClass',
2960
+ h = cf_c('hidden', c);
2961
+
2962
+ if (o.auto.button)
2963
+ {
2964
+ o.auto.button[f]()[s](h);
2965
+ }
2966
+ if (o.prev.button)
2967
+ {
2968
+ o.prev.button[f]()[s](h);
2969
+ }
2970
+ if (o.next.button)
2971
+ {
2972
+ o.next.button[f]()[s](h);
2973
+ }
2974
+ if (o.pagination.container)
2975
+ {
2976
+ o.pagination.container[f]()[s](h);
2977
+ }
2978
+ }
2979
+ function nv_enableNavi(o, f, c) {
2980
+ if (o.circular || o.infinite) return;
2981
+ var fx = (f == 'removeClass' || f == 'addClass') ? f : false,
2982
+ di = cf_c('disabled', c);
2983
+
2984
+ if (o.auto.button && fx)
2985
+ {
2986
+ o.auto.button[fx](di);
2987
+ }
2988
+ if (o.prev.button)
2989
+ {
2990
+ var fn = fx || (f == 0) ? 'addClass' : 'removeClass';
2991
+ o.prev.button[fn](di);
2992
+ }
2993
+ if (o.next.button)
2994
+ {
2995
+ var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass';
2996
+ o.next.button[fn](di);
2997
+ }
2998
+ }
2999
+
3000
+ // get object functions
3001
+ function go_getObject($tt, obj) {
3002
+ if (is_function(obj))
3003
+ {
3004
+ obj = obj.call($tt);
3005
+ }
3006
+ else if (is_undefined(obj))
3007
+ {
3008
+ obj = {};
3009
+ }
3010
+ return obj;
3011
+ }
3012
+ function go_getItemsObject($tt, obj) {
3013
+ obj = go_getObject($tt, obj);
3014
+ if (is_number(obj))
3015
+ {
3016
+ obj = {
3017
+ 'visible': obj
3018
+ };
3019
+ }
3020
+ else if (obj == 'variable')
3021
+ {
3022
+ obj = {
3023
+ 'visible': obj,
3024
+ 'width': obj,
3025
+ 'height': obj
3026
+ };
3027
+ }
3028
+ else if (!is_object(obj))
3029
+ {
3030
+ obj = {};
3031
+ }
3032
+ return obj;
3033
+ }
3034
+ function go_getScrollObject($tt, obj) {
3035
+ obj = go_getObject($tt, obj);
3036
+ if (is_number(obj))
3037
+ {
3038
+ if (obj <= 50)
3039
+ {
3040
+ obj = {
3041
+ 'items': obj
3042
+ };
3043
+ }
3044
+ else
3045
+ {
3046
+ obj = {
3047
+ 'duration': obj
3048
+ };
3049
+ }
3050
+ }
3051
+ else if (is_string(obj))
3052
+ {
3053
+ obj = {
3054
+ 'easing': obj
3055
+ };
3056
+ }
3057
+ else if (!is_object(obj))
3058
+ {
3059
+ obj = {};
3060
+ }
3061
+ return obj;
3062
+ }
3063
+ function go_getNaviObject($tt, obj) {
3064
+ obj = go_getObject($tt, obj);
3065
+ if (is_string(obj))
3066
+ {
3067
+ var temp = cf_getKeyCode(obj);
3068
+ if (temp == -1)
3069
+ {
3070
+ obj = $(obj);
3071
+ }
3072
+ else
3073
+ {
3074
+ obj = temp;
3075
+ }
3076
+ }
3077
+ return obj;
3078
+ }
3079
+
3080
+ function go_getAutoObject($tt, obj) {
3081
+ obj = go_getNaviObject($tt, obj);
3082
+ if (is_jquery(obj))
3083
+ {
3084
+ obj = {
3085
+ 'button': obj
3086
+ };
3087
+ }
3088
+ else if (is_boolean(obj))
3089
+ {
3090
+ obj = {
3091
+ 'play': obj
3092
+ };
3093
+ }
3094
+ else if (is_number(obj))
3095
+ {
3096
+ obj = {
3097
+ 'timeoutDuration': obj
3098
+ };
3099
+ }
3100
+ if (obj.progress)
3101
+ {
3102
+ if (is_string(obj.progress) || is_jquery(obj.progress))
3103
+ {
3104
+ obj.progress = {
3105
+ 'bar': obj.progress
3106
+ };
3107
+ }
3108
+ }
3109
+ return obj;
3110
+ }
3111
+ function go_complementAutoObject($tt, obj) {
3112
+ if (is_function(obj.button))
3113
+ {
3114
+ obj.button = obj.button.call($tt);
3115
+ }
3116
+ if (is_string(obj.button))
3117
+ {
3118
+ obj.button = $(obj.button);
3119
+ }
3120
+ if (!is_boolean(obj.play))
3121
+ {
3122
+ obj.play = true;
3123
+ }
3124
+ if (!is_number(obj.delay))
3125
+ {
3126
+ obj.delay = 0;
3127
+ }
3128
+ if (is_undefined(obj.pauseOnEvent))
3129
+ {
3130
+ obj.pauseOnEvent = true;
3131
+ }
3132
+ if (!is_boolean(obj.pauseOnResize))
3133
+ {
3134
+ obj.pauseOnResize = true;
3135
+ }
3136
+ if (!is_number(obj.timeoutDuration))
3137
+ {
3138
+ obj.timeoutDuration = (obj.duration < 10)
3139
+ ? 2500
3140
+ : obj.duration * 5;
3141
+ }
3142
+ if (obj.progress)
3143
+ {
3144
+ if (is_function(obj.progress.bar))
3145
+ {
3146
+ obj.progress.bar = obj.progress.bar.call($tt);
3147
+ }
3148
+ if (is_string(obj.progress.bar))
3149
+ {
3150
+ obj.progress.bar = $(obj.progress.bar);
3151
+ }
3152
+ if (obj.progress.bar)
3153
+ {
3154
+ if (!is_function(obj.progress.updater))
3155
+ {
3156
+ obj.progress.updater = $.fn.carouFredSel.progressbarUpdater;
3157
+ }
3158
+ if (!is_number(obj.progress.interval))
3159
+ {
3160
+ obj.progress.interval = 50;
3161
+ }
3162
+ }
3163
+ else
3164
+ {
3165
+ obj.progress = false;
3166
+ }
3167
+ }
3168
+ return obj;
3169
+ }
3170
+
3171
+ function go_getPrevNextObject($tt, obj) {
3172
+ obj = go_getNaviObject($tt, obj);
3173
+ if (is_jquery(obj))
3174
+ {
3175
+ obj = {
3176
+ 'button': obj
3177
+ };
3178
+ }
3179
+ else if (is_number(obj))
3180
+ {
3181
+ obj = {
3182
+ 'key': obj
3183
+ };
3184
+ }
3185
+ return obj;
3186
+ }
3187
+ function go_complementPrevNextObject($tt, obj) {
3188
+ if (is_function(obj.button))
3189
+ {
3190
+ obj.button = obj.button.call($tt);
3191
+ }
3192
+ if (is_string(obj.button))
3193
+ {
3194
+ obj.button = $(obj.button);
3195
+ }
3196
+ if (is_string(obj.key))
3197
+ {
3198
+ obj.key = cf_getKeyCode(obj.key);
3199
+ }
3200
+ return obj;
3201
+ }
3202
+
3203
+ function go_getPaginationObject($tt, obj) {
3204
+ obj = go_getNaviObject($tt, obj);
3205
+ if (is_jquery(obj))
3206
+ {
3207
+ obj = {
3208
+ 'container': obj
3209
+ };
3210
+ }
3211
+ else if (is_boolean(obj))
3212
+ {
3213
+ obj = {
3214
+ 'keys': obj
3215
+ };
3216
+ }
3217
+ return obj;
3218
+ }
3219
+ function go_complementPaginationObject($tt, obj) {
3220
+ if (is_function(obj.container))
3221
+ {
3222
+ obj.container = obj.container.call($tt);
3223
+ }
3224
+ if (is_string(obj.container))
3225
+ {
3226
+ obj.container = $(obj.container);
3227
+ }
3228
+ if (!is_number(obj.items))
3229
+ {
3230
+ obj.items = false;
3231
+ }
3232
+ if (!is_boolean(obj.keys))
3233
+ {
3234
+ obj.keys = false;
3235
+ }
3236
+ if (!is_function(obj.anchorBuilder) && !is_false(obj.anchorBuilder))
3237
+ {
3238
+ obj.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder;
3239
+ }
3240
+ if (!is_number(obj.deviation))
3241
+ {
3242
+ obj.deviation = 0;
3243
+ }
3244
+ return obj;
3245
+ }
3246
+
3247
+ function go_getSwipeObject($tt, obj) {
3248
+ if (is_function(obj))
3249
+ {
3250
+ obj = obj.call($tt);
3251
+ }
3252
+ if (is_undefined(obj))
3253
+ {
3254
+ obj = {
3255
+ 'onTouch': false
3256
+ };
3257
+ }
3258
+ if (is_true(obj))
3259
+ {
3260
+ obj = {
3261
+ 'onTouch': obj
3262
+ };
3263
+ }
3264
+ else if (is_number(obj))
3265
+ {
3266
+ obj = {
3267
+ 'items': obj
3268
+ };
3269
+ }
3270
+ return obj;
3271
+ }
3272
+ function go_complementSwipeObject($tt, obj) {
3273
+ if (!is_boolean(obj.onTouch))
3274
+ {
3275
+ obj.onTouch = true;
3276
+ }
3277
+ if (!is_boolean(obj.onMouse))
3278
+ {
3279
+ obj.onMouse = false;
3280
+ }
3281
+ if (!is_object(obj.options))
3282
+ {
3283
+ obj.options = {};
3284
+ }
3285
+ if (!is_boolean(obj.options.triggerOnTouchEnd))
3286
+ {
3287
+ obj.options.triggerOnTouchEnd = false;
3288
+ }
3289
+ return obj;
3290
+ }
3291
+ function go_getMousewheelObject($tt, obj) {
3292
+ if (is_function(obj))
3293
+ {
3294
+ obj = obj.call($tt);
3295
+ }
3296
+ if (is_true(obj))
3297
+ {
3298
+ obj = {};
3299
+ }
3300
+ else if (is_number(obj))
3301
+ {
3302
+ obj = {
3303
+ 'items': obj
3304
+ };
3305
+ }
3306
+ else if (is_undefined(obj))
3307
+ {
3308
+ obj = false;
3309
+ }
3310
+ return obj;
3311
+ }
3312
+ function go_complementMousewheelObject($tt, obj) {
3313
+ return obj;
3314
+ }
3315
+
3316
+ // get number functions
3317
+ function gn_getItemIndex(num, dev, org, items, $cfs) {
3318
+ if (is_string(num))
3319
+ {
3320
+ num = $(num, $cfs);
3321
+ }
3322
+
3323
+ if (is_object(num))
3324
+ {
3325
+ num = $(num, $cfs);
3326
+ }
3327
+ if (is_jquery(num))
3328
+ {
3329
+ num = $cfs.children().index(num);
3330
+ if (!is_boolean(org))
3331
+ {
3332
+ org = false;
3333
+ }
3334
+ }
3335
+ else
3336
+ {
3337
+ if (!is_boolean(org))
3338
+ {
3339
+ org = true;
3340
+ }
3341
+ }
3342
+ if (!is_number(num))
3343
+ {
3344
+ num = 0;
3345
+ }
3346
+ if (!is_number(dev))
3347
+ {
3348
+ dev = 0;
3349
+ }
3350
+
3351
+ if (org)
3352
+ {
3353
+ num += items.first;
3354
+ }
3355
+ num += dev;
3356
+ if (items.total > 0)
3357
+ {
3358
+ while (num >= items.total)
3359
+ {
3360
+ num -= items.total;
3361
+ }
3362
+ while (num < 0)
3363
+ {
3364
+ num += items.total;
3365
+ }
3366
+ }
3367
+ return num;
3368
+ }
3369
+
3370
+ // items prev
3371
+ function gn_getVisibleItemsPrev(i, o, s) {
3372
+ var t = 0,
3373
+ x = 0;
3374
+
3375
+ for (var a = s; a >= 0; a--)
3376
+ {
3377
+ var j = i.eq(a);
3378
+ t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
3379
+ if (t > o.maxDimension)
3380
+ {
3381
+ return x;
3382
+ }
3383
+ if (a == 0)
3384
+ {
3385
+ a = i.length;
3386
+ }
3387
+ x++;
3388
+ }
3389
+ }
3390
+ function gn_getVisibleItemsPrevFilter(i, o, s) {
3391
+ return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s);
3392
+ }
3393
+ function gn_getScrollItemsPrevFilter(i, o, s, m) {
3394
+ return gn_getItemsPrevFilter(i, o.items.filter, m, s);
3395
+ }
3396
+ function gn_getItemsPrevFilter(i, f, m, s) {
3397
+ var t = 0,
3398
+ x = 0;
3399
+
3400
+ for (var a = s, l = i.length; a >= 0; a--)
3401
+ {
3402
+ x++;
3403
+ if (x == l)
3404
+ {
3405
+ return x;
3406
+ }
3407
+
3408
+ var j = i.eq(a);
3409
+ if (j.is(f))
3410
+ {
3411
+ t++;
3412
+ if (t == m)
3413
+ {
3414
+ return x;
3415
+ }
3416
+ }
3417
+ if (a == 0)
3418
+ {
3419
+ a = l;
3420
+ }
3421
+ }
3422
+ }
3423
+
3424
+ function gn_getVisibleOrg($c, o) {
3425
+ return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length;
3426
+ }
3427
+
3428
+ // items next
3429
+ function gn_getVisibleItemsNext(i, o, s) {
3430
+ var t = 0,
3431
+ x = 0;
3432
+
3433
+ for (var a = s, l = i.length-1; a <= l; a++)
3434
+ {
3435
+ var j = i.eq(a);
3436
+
3437
+ t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
3438
+ if (t > o.maxDimension)
3439
+ {
3440
+ return x;
3441
+ }
3442
+
3443
+ x++;
3444
+ if (x == l+1)
3445
+ {
3446
+ return x;
3447
+ }
3448
+ if (a == l)
3449
+ {
3450
+ a = -1;
3451
+ }
3452
+ }
3453
+ }
3454
+ function gn_getVisibleItemsNextTestCircular(i, o, s, l) {
3455
+ var v = gn_getVisibleItemsNext(i, o, s);
3456
+ if (!o.circular)
3457
+ {
3458
+ if (s + v > l)
3459
+ {
3460
+ v = l - s;
3461
+ }
3462
+ }
3463
+ return v;
3464
+ }
3465
+ function gn_getVisibleItemsNextFilter(i, o, s) {
3466
+ return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular);
3467
+ }
3468
+ function gn_getScrollItemsNextFilter(i, o, s, m) {
3469
+ return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1;
3470
+ }
3471
+ function gn_getItemsNextFilter(i, f, m, s, c) {
3472
+ var t = 0,
3473
+ x = 0;
3474
+
3475
+ for (var a = s, l = i.length-1; a <= l; a++)
3476
+ {
3477
+ x++;
3478
+ if (x >= l)
3479
+ {
3480
+ return x;
3481
+ }
3482
+
3483
+ var j = i.eq(a);
3484
+ if (j.is(f))
3485
+ {
3486
+ t++;
3487
+ if (t == m)
3488
+ {
3489
+ return x;
3490
+ }
3491
+ }
3492
+ if (a == l)
3493
+ {
3494
+ a = -1;
3495
+ }
3496
+ }
3497
+ }
3498
+
3499
+ // get items functions
3500
+ function gi_getCurrentItems(i, o) {
3501
+ return i.slice(0, o.items.visible);
3502
+ }
3503
+ function gi_getOldItemsPrev(i, o, n) {
3504
+ return i.slice(n, o.items.visibleConf.old+n);
3505
+ }
3506
+ function gi_getNewItemsPrev(i, o) {
3507
+ return i.slice(0, o.items.visible);
3508
+ }
3509
+ function gi_getOldItemsNext(i, o) {
3510
+ return i.slice(0, o.items.visibleConf.old);
3511
+ }
3512
+ function gi_getNewItemsNext(i, o, n) {
3513
+ return i.slice(n, o.items.visible+n);
3514
+ }
3515
+
3516
+ // sizes functions
3517
+ function sz_storeMargin(i, o, d) {
3518
+ if (o.usePadding)
3519
+ {
3520
+ if (!is_string(d))
3521
+ {
3522
+ d = '_cfs_origCssMargin';
3523
+ }
3524
+ i.each(function() {
3525
+ var j = $(this),
3526
+ m = parseInt(j.css(o.d['marginRight']), 10);
3527
+ if (!is_number(m))
3528
+ {
3529
+ m = 0;
3530
+ }
3531
+ j.data(d, m);
3532
+ });
3533
+ }
3534
+ }
3535
+ function sz_resetMargin(i, o, m) {
3536
+ if (o.usePadding)
3537
+ {
3538
+ var x = (is_boolean(m)) ? m : false;
3539
+ if (!is_number(m))
3540
+ {
3541
+ m = 0;
3542
+ }
3543
+ sz_storeMargin(i, o, '_cfs_tempCssMargin');
3544
+ i.each(function() {
3545
+ var j = $(this);
3546
+ j.css(o.d['marginRight'], ((x) ? j.data('_cfs_tempCssMargin') : m + j.data('_cfs_origCssMargin')));
3547
+ });
3548
+ }
3549
+ }
3550
+ function sz_storeOrigCss(i) {
3551
+ i.each(function() {
3552
+ var j = $(this);
3553
+ j.data('_cfs_origCss', j.attr('style') || '');
3554
+ });
3555
+ }
3556
+ function sz_restoreOrigCss(i) {
3557
+ i.each(function() {
3558
+ var j = $(this);
3559
+ j.attr('style', j.data('_cfs_origCss') || '');
3560
+ });
3561
+ }
3562
+ function sz_setResponsiveSizes(o, all) {
3563
+ var visb = o.items.visible,
3564
+ newS = o.items[o.d['width']],
3565
+ seco = o[o.d['height']],
3566
+ secp = is_percentage(seco);
3567
+
3568
+ all.each(function() {
3569
+ var $t = $(this),
3570
+ nw = newS - ms_getPaddingBorderMargin($t, o, 'Width');
3571
+
3572
+ $t[o.d['width']](nw);
3573
+ if (secp)
3574
+ {
3575
+ $t[o.d['height']](ms_getPercentage(nw, seco));
3576
+ }
3577
+ });
3578
+ }
3579
+ function sz_setSizes($c, o) {
3580
+ var $w = $c.parent(),
3581
+ $i = $c.children(),
3582
+ $v = gi_getCurrentItems($i, o),
3583
+ sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, false);
3584
+
3585
+ $w.css(sz);
3586
+
3587
+ if (o.usePadding)
3588
+ {
3589
+ var p = o.padding,
3590
+ r = p[o.d[1]];
3591
+
3592
+ if (o.align && r < 0)
3593
+ {
3594
+ r = 0;
3595
+ }
3596
+ var $l = $v.last();
3597
+ $l.css(o.d['marginRight'], $l.data('_cfs_origCssMargin') + r);
3598
+ $c.css(o.d['top'], p[o.d[0]]);
3599
+ $c.css(o.d['left'], p[o.d[3]]);
3600
+ }
3601
+
3602
+ $c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2));
3603
+ $c.css(o.d['height'], ms_getLargestSize($i, o, 'height'));
3604
+ return sz;
3605
+ }
3606
+
3607
+ // measuring functions
3608
+ function ms_getSizes(i, o, wrapper) {
3609
+ return [ms_getTotalSize(i, o, 'width', wrapper), ms_getLargestSize(i, o, 'height', wrapper)];
3610
+ }
3611
+ function ms_getLargestSize(i, o, dim, wrapper) {
3612
+ if (!is_boolean(wrapper))
3613
+ {
3614
+ wrapper = false;
3615
+ }
3616
+ if (is_number(o[o.d[dim]]) && wrapper)
3617
+ {
3618
+ return o[o.d[dim]];
3619
+ }
3620
+ if (is_number(o.items[o.d[dim]]))
3621
+ {
3622
+ return o.items[o.d[dim]];
3623
+ }
3624
+ dim = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight';
3625
+ return ms_getTrueLargestSize(i, o, dim);
3626
+ }
3627
+ function ms_getTrueLargestSize(i, o, dim) {
3628
+ var s = 0;
3629
+
3630
+ for (var a = 0, l = i.length; a < l; a++)
3631
+ {
3632
+ var j = i.eq(a);
3633
+
3634
+ var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
3635
+ if (s < m)
3636
+ {
3637
+ s = m;
3638
+ }
3639
+ }
3640
+ return s;
3641
+ }
3642
+
3643
+ function ms_getTotalSize(i, o, dim, wrapper) {
3644
+ if (!is_boolean(wrapper))
3645
+ {
3646
+ wrapper = false;
3647
+ }
3648
+ if (is_number(o[o.d[dim]]) && wrapper)
3649
+ {
3650
+ return o[o.d[dim]];
3651
+ }
3652
+ if (is_number(o.items[o.d[dim]]))
3653
+ {
3654
+ return o.items[o.d[dim]] * i.length;
3655
+ }
3656
+
3657
+ var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight',
3658
+ s = 0;
3659
+
3660
+ for (var a = 0, l = i.length; a < l; a++)
3661
+ {
3662
+ var j = i.eq(a);
3663
+ s += (j.is(':visible')) ? j[o.d[d]](true) : 0;
3664
+ }
3665
+ return s;
3666
+ }
3667
+ function ms_getParentSize($w, o, d) {
3668
+ var isVisible = $w.is(':visible');
3669
+ if (isVisible)
3670
+ {
3671
+ $w.hide();
3672
+ }
3673
+ var s = $w.parent()[o.d[d]]();
3674
+ if (isVisible)
3675
+ {
3676
+ $w.show();
3677
+ }
3678
+ return s;
3679
+ }
3680
+ function ms_getMaxDimension(o, a) {
3681
+ return (is_number(o[o.d['width']])) ? o[o.d['width']] : a;
3682
+ }
3683
+ function ms_hasVariableSizes(i, o, dim) {
3684
+ var s = false,
3685
+ v = false;
3686
+
3687
+ for (var a = 0, l = i.length; a < l; a++)
3688
+ {
3689
+ var j = i.eq(a);
3690
+
3691
+ var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
3692
+ if (s === false)
3693
+ {
3694
+ s = c;
3695
+ }
3696
+ else if (s != c)
3697
+ {
3698
+ v = true;
3699
+ }
3700
+ if (s == 0)
3701
+ {
3702
+ v = true;
3703
+ }
3704
+ }
3705
+ return v;
3706
+ }
3707
+ function ms_getPaddingBorderMargin(i, o, d) {
3708
+ return i[o.d['outer'+d]](true) - i[o.d[d.toLowerCase()]]();
3709
+ }
3710
+ function ms_getPercentage(s, o) {
3711
+ if (is_percentage(o))
3712
+ {
3713
+ o = parseInt( o.slice(0, -1), 10 );
3714
+ if (!is_number(o))
3715
+ {
3716
+ return s;
3717
+ }
3718
+ s *= o/100;
3719
+ }
3720
+ return s;
3721
+ }
3722
+
3723
+ // config functions
3724
+ function cf_e(n, c, pf, ns, rd) {
3725
+ if (!is_boolean(pf))
3726
+ {
3727
+ pf = true;
3728
+ }
3729
+ if (!is_boolean(ns))
3730
+ {
3731
+ ns = true;
3732
+ }
3733
+ if (!is_boolean(rd))
3734
+ {
3735
+ rd = false;
3736
+ }
3737
+
3738
+ if (pf)
3739
+ {
3740
+ n = c.events.prefix + n;
3741
+ }
3742
+ if (ns)
3743
+ {
3744
+ n = n +'.'+ c.events.namespace;
3745
+ }
3746
+ if (ns && rd)
3747
+ {
3748
+ n += c.serialNumber;
3749
+ }
3750
+
3751
+ return n;
3752
+ }
3753
+ function cf_c(n, c) {
3754
+ return (is_string(c.classnames[n])) ? c.classnames[n] : n;
3755
+ }
3756
+ function cf_mapWrapperSizes(ws, o, p) {
3757
+
3758
+ if (!is_boolean(p))
3759
+ {
3760
+ p = true;
3761
+ }
3762
+ var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0];
3763
+ var wra = {};
3764
+
3765
+ wra[o.d['width']] = ws[0] + pad[1] + pad[3];
3766
+ wra[o.d['height']] = ws[1] + pad[0] + pad[2];
3767
+
3768
+ return wra;
3769
+ }
3770
+ function cf_sortParams(vals, typs) {
3771
+ var arr = [];
3772
+ for (var a = 0, l1 = vals.length; a < l1; a++)
3773
+ {
3774
+ for (var b = 0, l2 = typs.length; b < l2; b++)
3775
+ {
3776
+ if (typs[b].indexOf(typeof vals[a]) > -1 && is_undefined(arr[b]))
3777
+ {
3778
+ arr[b] = vals[a];
3779
+ break;
3780
+ }
3781
+ }
3782
+ }
3783
+ return arr;
3784
+ }
3785
+ function cf_getPadding(p) {
3786
+ if (is_undefined(p))
3787
+ {
3788
+ return [0, 0, 0, 0];
3789
+ }
3790
+ if (is_number(p))
3791
+ {
3792
+ return [p, p, p, p];
3793
+ }
3794
+ if (is_string(p))
3795
+ {
3796
+ p = p.split('px').join('').split('em').join('').split(' ');
3797
+ }
3798
+
3799
+ if (!is_array(p))
3800
+ {
3801
+ return [0, 0, 0, 0];
3802
+ }
3803
+ for (var i = 0; i < 4; i++)
3804
+ {
3805
+ p[i] = parseInt(p[i], 10);
3806
+ }
3807
+ switch (p.length)
3808
+ {
3809
+ case 0:
3810
+ return [0, 0, 0, 0];
3811
+ case 1:
3812
+ return [p[0], p[0], p[0], p[0]];
3813
+ case 2:
3814
+ return [p[0], p[1], p[0], p[1]];
3815
+ case 3:
3816
+ return [p[0], p[1], p[2], p[1]];
3817
+ default:
3818
+ return [p[0], p[1], p[2], p[3]];
3819
+ }
3820
+ }
3821
+ function cf_getAlignPadding(itm, o) {
3822
+ var x = (is_number(o[o.d['width']])) ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0;
3823
+ switch (o.align)
3824
+ {
3825
+ case 'left':
3826
+ return [0, x];
3827
+ case 'right':
3828
+ return [x, 0];
3829
+ case 'center':
3830
+ default:
3831
+ return [Math.ceil(x/2), Math.floor(x/2)];
3832
+ }
3833
+ }
3834
+ function cf_getDimensions(o) {
3835
+ var dm = [
3836
+ ['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3],
3837
+ ['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0]
3838
+ ];
3839
+
3840
+ var dl = dm[0].length,
3841
+ dx = (o.direction == 'right' || o.direction == 'left') ? 0 : 1;
3842
+
3843
+ var dimensions = {};
3844
+ for (var d = 0; d < dl; d++)
3845
+ {
3846
+ dimensions[dm[0][d]] = dm[dx][d];
3847
+ }
3848
+ return dimensions;
3849
+ }
3850
+ function cf_getAdjust(x, o, a, $t) {
3851
+ var v = x;
3852
+ if (is_function(a))
3853
+ {
3854
+ v = a.call($t, v);
3855
+
3856
+ }
3857
+ else if (is_string(a))
3858
+ {
3859
+ var p = a.split('+'),
3860
+ m = a.split('-');
3861
+
3862
+ if (m.length > p.length)
3863
+ {
3864
+ var neg = true,
3865
+ sta = m[0],
3866
+ adj = m[1];
3867
+ }
3868
+ else
3869
+ {
3870
+ var neg = false,
3871
+ sta = p[0],
3872
+ adj = p[1];
3873
+ }
3874
+
3875
+ switch(sta)
3876
+ {
3877
+ case 'even':
3878
+ v = (x % 2 == 1) ? x-1 : x;
3879
+ break;
3880
+ case 'odd':
3881
+ v = (x % 2 == 0) ? x-1 : x;
3882
+ break;
3883
+ default:
3884
+ v = x;
3885
+ break;
3886
+ }
3887
+ adj = parseInt(adj, 10);
3888
+ if (is_number(adj))
3889
+ {
3890
+ if (neg)
3891
+ {
3892
+ adj = -adj;
3893
+ }
3894
+ v += adj;
3895
+ }
3896
+ }
3897
+ if (!is_number(v) || v < 1)
3898
+ {
3899
+ v = 1;
3900
+ }
3901
+ return v;
3902
+ }
3903
+ function cf_getItemsAdjust(x, o, a, $t) {
3904
+ return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf);
3905
+ }
3906
+ function cf_getItemAdjustMinMax(v, i) {
3907
+ if (is_number(i.min) && v < i.min)
3908
+ {
3909
+ v = i.min;
3910
+ }
3911
+ if (is_number(i.max) && v > i.max)
3912
+ {
3913
+ v = i.max;
3914
+ }
3915
+ if (v < 1)
3916
+ {
3917
+ v = 1;
3918
+ }
3919
+ return v;
3920
+ }
3921
+ function cf_getSynchArr(s) {
3922
+ if (!is_array(s))
3923
+ {
3924
+ s = [[s]];
3925
+ }
3926
+ if (!is_array(s[0]))
3927
+ {
3928
+ s = [s];
3929
+ }
3930
+ for (var j = 0, l = s.length; j < l; j++)
3931
+ {
3932
+ if (is_string(s[j][0]))
3933
+ {
3934
+ s[j][0] = $(s[j][0]);
3935
+ }
3936
+ if (!is_boolean(s[j][1]))
3937
+ {
3938
+ s[j][1] = true;
3939
+ }
3940
+ if (!is_boolean(s[j][2]))
3941
+ {
3942
+ s[j][2] = true;
3943
+ }
3944
+ if (!is_number(s[j][3]))
3945
+ {
3946
+ s[j][3] = 0;
3947
+ }
3948
+ }
3949
+ return s;
3950
+ }
3951
+ function cf_getKeyCode(k) {
3952
+ if (k == 'right')
3953
+ {
3954
+ return 39;
3955
+ }
3956
+ if (k == 'left')
3957
+ {
3958
+ return 37;
3959
+ }
3960
+ if (k == 'up')
3961
+ {
3962
+ return 38;
3963
+ }
3964
+ if (k == 'down')
3965
+ {
3966
+ return 40;
3967
+ }
3968
+ return -1;
3969
+ }
3970
+ function cf_setCookie(n, $c, c) {
3971
+ if (n)
3972
+ {
3973
+ var v = $c.triggerHandler(cf_e('currentPosition', c));
3974
+ $.fn.carouFredSel.cookie.set(n, v);
3975
+ }
3976
+ }
3977
+ function cf_getCookie(n) {
3978
+ var c = $.fn.carouFredSel.cookie.get(n);
3979
+ return (c == '') ? 0 : c;
3980
+ }
3981
+
3982
+ // init function
3983
+ function in_mapCss($elem, props) {
3984
+ var css = {};
3985
+ for (var p = 0, l = props.length; p < l; p++)
3986
+ {
3987
+ css[props[p]] = $elem.css(props[p]);
3988
+ }
3989
+ return css;
3990
+ }
3991
+ function in_complementItems(obj, opt, itm, sta) {
3992
+ if (!is_object(obj.visibleConf))
3993
+ {
3994
+ obj.visibleConf = {};
3995
+ }
3996
+ if (!is_object(obj.sizesConf))
3997
+ {
3998
+ obj.sizesConf = {};
3999
+ }
4000
+
4001
+ if (obj.start == 0 && is_number(sta))
4002
+ {
4003
+ obj.start = sta;
4004
+ }
4005
+
4006
+ // visible items
4007
+ if (is_object(obj.visible))
4008
+ {
4009
+ obj.visibleConf.min = obj.visible.min;
4010
+ obj.visibleConf.max = obj.visible.max;
4011
+ obj.visible = false;
4012
+ }
4013
+ else if (is_string(obj.visible))
4014
+ {
4015
+ // variable visible items
4016
+ if (obj.visible == 'variable')
4017
+ {
4018
+ obj.visibleConf.variable = true;
4019
+ }
4020
+ // adjust string visible items
4021
+ else
4022
+ {
4023
+ obj.visibleConf.adjust = obj.visible;
4024
+ }
4025
+ obj.visible = false;
4026
+ }
4027
+ else if (is_function(obj.visible))
4028
+ {
4029
+ obj.visibleConf.adjust = obj.visible;
4030
+ obj.visible = false;
4031
+ }
4032
+
4033
+ // set items filter
4034
+ if (!is_string(obj.filter))
4035
+ {
4036
+ obj.filter = (itm.filter(':hidden').length > 0) ? ':visible' : '*';
4037
+ }
4038
+
4039
+ // primary item-size not set
4040
+ if (!obj[opt.d['width']])
4041
+ {
4042
+ // responsive carousel -> set to largest
4043
+ if (opt.responsive)
4044
+ {
4045
+ debug(true, 'Set a '+opt.d['width']+' for the items!');
4046
+ obj[opt.d['width']] = ms_getTrueLargestSize(itm, opt, 'outerWidth');
4047
+ }
4048
+ // non-responsive -> measure it or set to "variable"
4049
+ else
4050
+ {
4051
+ obj[opt.d['width']] = (ms_hasVariableSizes(itm, opt, 'outerWidth'))
4052
+ ? 'variable'
4053
+ : itm[opt.d['outerWidth']](true);
4054
+ }
4055
+ }
4056
+
4057
+ // secondary item-size not set -> measure it or set to "variable"
4058
+ if (!obj[opt.d['height']])
4059
+ {
4060
+ obj[opt.d['height']] = (ms_hasVariableSizes(itm, opt, 'outerHeight'))
4061
+ ? 'variable'
4062
+ : itm[opt.d['outerHeight']](true);
4063
+ }
4064
+
4065
+ obj.sizesConf.width = obj.width;
4066
+ obj.sizesConf.height = obj.height;
4067
+ return obj;
4068
+ }
4069
+ function in_complementVisibleItems(opt, avl) {
4070
+ // primary item-size variable -> set visible items variable
4071
+ if (opt.items[opt.d['width']] == 'variable')
4072
+ {
4073
+ opt.items.visibleConf.variable = true;
4074
+ }
4075
+ if (!opt.items.visibleConf.variable) {
4076
+ // primary size is number -> calculate visible-items
4077
+ if (is_number(opt[opt.d['width']]))
4078
+ {
4079
+ opt.items.visible = Math.floor(opt[opt.d['width']] / opt.items[opt.d['width']]);
4080
+ }
4081
+ // measure and calculate primary size and visible-items
4082
+ else
4083
+ {
4084
+ opt.items.visible = Math.floor(avl / opt.items[opt.d['width']]);
4085
+ opt[opt.d['width']] = opt.items.visible * opt.items[opt.d['width']];
4086
+ if (!opt.items.visibleConf.adjust)
4087
+ {
4088
+ opt.align = false;
4089
+ }
4090
+ }
4091
+ if (opt.items.visible == 'Infinity' || opt.items.visible < 1)
4092
+ {
4093
+ debug(true, 'Not a valid number of visible items: Set to "variable".');
4094
+ opt.items.visibleConf.variable = true;
4095
+ }
4096
+ }
4097
+ return opt;
4098
+ }
4099
+ function in_complementPrimarySize(obj, opt, all) {
4100
+ // primary size set to auto -> measure largest item-size and set it
4101
+ if (obj == 'auto')
4102
+ {
4103
+ obj = ms_getTrueLargestSize(all, opt, 'outerWidth');
4104
+ }
4105
+ return obj;
4106
+ }
4107
+ function in_complementSecondarySize(obj, opt, all) {
4108
+ // secondary size set to auto -> measure largest item-size and set it
4109
+ if (obj == 'auto')
4110
+ {
4111
+ obj = ms_getTrueLargestSize(all, opt, 'outerHeight');
4112
+ }
4113
+ // secondary size not set -> set to secondary item-size
4114
+ if (!obj)
4115
+ {
4116
+ obj = opt.items[opt.d['height']];
4117
+ }
4118
+ return obj;
4119
+ }
4120
+ function in_getAlignPadding(o, all) {
4121
+ var p = cf_getAlignPadding(gi_getCurrentItems(all, o), o);
4122
+ o.padding[o.d[1]] = p[1];
4123
+ o.padding[o.d[3]] = p[0];
4124
+ return o;
4125
+ }
4126
+ function in_getResponsiveValues(o, all, avl) {
4127
+
4128
+ var visb = cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']] / o.items[o.d['width']]), o.items.visibleConf);
4129
+ if (visb > all.length)
4130
+ {
4131
+ visb = all.length;
4132
+ }
4133
+
4134
+ var newS = Math.floor(o[o.d['width']]/visb);
4135
+
4136
+ o.items.visible = visb;
4137
+ o.items[o.d['width']] = newS;
4138
+ o[o.d['width']] = visb * newS;
4139
+ return o;
4140
+ }
4141
+
4142
+
4143
+ // buttons functions
4144
+ function bt_pauseOnHoverConfig(p) {
4145
+ if (is_string(p))
4146
+ {
4147
+ var i = (p.indexOf('immediate') > -1) ? true : false,
4148
+ r = (p.indexOf('resume') > -1) ? true : false;
4149
+ }
4150
+ else
4151
+ {
4152
+ var i = r = false;
4153
+ }
4154
+ return [i, r];
4155
+ }
4156
+ function bt_mousesheelNumber(mw) {
4157
+ return (is_number(mw)) ? mw : null
4158
+ }
4159
+
4160
+ // helper functions
4161
+ function is_null(a) {
4162
+ return (a === null);
4163
+ }
4164
+ function is_undefined(a) {
4165
+ return (is_null(a) || typeof a == 'undefined' || a === '' || a === 'undefined');
4166
+ }
4167
+ function is_array(a) {
4168
+ return (a instanceof Array);
4169
+ }
4170
+ function is_jquery(a) {
4171
+ return (a instanceof jQuery);
4172
+ }
4173
+ function is_object(a) {
4174
+ return ((a instanceof Object || typeof a == 'object') && !is_null(a) && !is_jquery(a) && !is_array(a) && !is_function(a));
4175
+ }
4176
+ function is_number(a) {
4177
+ return ((a instanceof Number || typeof a == 'number') && !isNaN(a));
4178
+ }
4179
+ function is_string(a) {
4180
+ return ((a instanceof String || typeof a == 'string') && !is_undefined(a) && !is_true(a) && !is_false(a));
4181
+ }
4182
+ function is_function(a) {
4183
+ return (a instanceof Function || typeof a == 'function');
4184
+ }
4185
+ function is_boolean(a) {
4186
+ return (a instanceof Boolean || typeof a == 'boolean' || is_true(a) || is_false(a));
4187
+ }
4188
+ function is_true(a) {
4189
+ return (a === true || a === 'true');
4190
+ }
4191
+ function is_false(a) {
4192
+ return (a === false || a === 'false');
4193
+ }
4194
+ function is_percentage(x) {
4195
+ return (is_string(x) && x.slice(-1) == '%');
4196
+ }
4197
+
4198
+
4199
+ function getTime() {
4200
+ return new Date().getTime();
4201
+ }
4202
+
4203
+ function deprecated( o, n ) {
4204
+ debug(true, o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.');
4205
+ }
4206
+ function debug(d, m) {
4207
+ if (!is_undefined(window.console) && !is_undefined(window.console.log))
4208
+ {
4209
+ if (is_object(d))
4210
+ {
4211
+ var s = ' ('+d.selector+')';
4212
+ d = d.debug;
4213
+ }
4214
+ else
4215
+ {
4216
+ var s = '';
4217
+ }
4218
+ if (!d)
4219
+ {
4220
+ return false;
4221
+ }
4222
+
4223
+ if (is_string(m))
4224
+ {
4225
+ m = 'carouFredSel'+s+': ' + m;
4226
+ }
4227
+ else
4228
+ {
4229
+ m = ['carouFredSel'+s+':', m];
4230
+ }
4231
+ window.console.log(m);
4232
+ }
4233
+ return false;
4234
+ }
4235
+
4236
+
4237
+
4238
+ // EASING FUNCTIONS
4239
+ $.extend($.easing, {
4240
+ 'quadratic': function(t) {
4241
+ var t2 = t * t;
4242
+ return t * (-t2 * t + 4 * t2 - 6 * t + 4);
4243
+ },
4244
+ 'cubic': function(t) {
4245
+ return t * (4 * t * t - 9 * t + 6);
4246
+ },
4247
+ 'elastic': function(t) {
4248
+ var t2 = t * t;
4249
+ return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15);
4250
+ }
4251
+ });
4252
+
4253
+
4254
  })(jQuery);
assets/js/jquery.carouFredSel.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function($){function sc_setScroll(t,e,s){return"transition"==s.transition&&"swing"==e&&(e="ease"),{anims:[],duration:t,orgDuration:t,easing:e,startTime:getTime()}}function sc_startScroll(t,e){for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o&&o[0][e.transition](o[1],t.duration,t.easing,o[2])}}function sc_stopScroll(t,e){is_boolean(e)||(e=!0),is_object(t.pre)&&sc_stopScroll(t.pre,e);for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o[0].stop(!0),e&&(o[0].css(o[1]),is_function(o[2])&&o[2]())}is_object(t.post)&&sc_stopScroll(t.post,e)}function sc_afterScroll(t,e,s){switch(e&&e.remove(),s.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":t.css("opacity",1),t.css("filter","")}}function sc_fireCallbacks(t,e,s,i,o){if(e[s]&&e[s].call(t,i),o[s].length)for(var n=0,r=o[s].length;r>n;n++)o[s][n].call(t,i);return[]}function sc_fireQueue(t,e,s){return e.length&&(t.trigger(cf_e(e[0][0],s),e[0][1]),e.shift()),e}function sc_hideHiddenItems(t){t.each(function(){var t=$(this);t.data("_cfs_isHidden",t.is(":hidden")).hide()})}function sc_showHiddenItems(t){t&&t.each(function(){var t=$(this);t.data("_cfs_isHidden")||t.show()})}function sc_clearTimers(t){return t.auto&&clearTimeout(t.auto),t.progress&&clearInterval(t.progress),t}function sc_mapCallbackArguments(t,e,s,i,o,n,r){return{width:r.width,height:r.height,items:{old:t,skipped:e,visible:s},scroll:{items:i,direction:o,duration:n}}}function sc_getDuration(t,e,s,i){var o=t.duration;return"none"==t.fx?0:("auto"==o?o=e.scroll.duration/e.scroll.items*s:10>o&&(o=i/o),1>o?0:("fade"==t.fx&&(o/=2),Math.round(o)))}function nv_showNavi(t,e,s){var i=is_number(t.items.minimum)?t.items.minimum:t.items.visible+1;if("show"==e||"hide"==e)var o=e;else if(i>e){debug(s,"Not enough items ("+e+" total, "+i+" needed): Hiding navigation.");var o="hide"}else var o="show";var n="show"==o?"removeClass":"addClass",r=cf_c("hidden",s);t.auto.button&&t.auto.button[o]()[n](r),t.prev.button&&t.prev.button[o]()[n](r),t.next.button&&t.next.button[o]()[n](r),t.pagination.container&&t.pagination.container[o]()[n](r)}function nv_enableNavi(t,e,s){if(!t.circular&&!t.infinite){var i="removeClass"==e||"addClass"==e?e:!1,o=cf_c("disabled",s);if(t.auto.button&&i&&t.auto.button[i](o),t.prev.button){var n=i||0==e?"addClass":"removeClass";t.prev.button[n](o)}if(t.next.button){var n=i||e==t.items.visible?"addClass":"removeClass";t.next.button[n](o)}}}function go_getObject(t,e){return is_function(e)?e=e.call(t):is_undefined(e)&&(e={}),e}function go_getItemsObject(t,e){return e=go_getObject(t,e),is_number(e)?e={visible:e}:"variable"==e?e={visible:e,width:e,height:e}:is_object(e)||(e={}),e}function go_getScrollObject(t,e){return e=go_getObject(t,e),is_number(e)?e=50>=e?{items:e}:{duration:e}:is_string(e)?e={easing:e}:is_object(e)||(e={}),e}function go_getNaviObject(t,e){if(e=go_getObject(t,e),is_string(e)){var s=cf_getKeyCode(e);e=-1==s?$(e):s}return e}function go_getAutoObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_boolean(e)?e={play:e}:is_number(e)&&(e={timeoutDuration:e}),e.progress&&(is_string(e.progress)||is_jquery(e.progress))&&(e.progress={bar:e.progress}),e}function go_complementAutoObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_boolean(e.play)||(e.play=!0),is_number(e.delay)||(e.delay=0),is_undefined(e.pauseOnEvent)&&(e.pauseOnEvent=!0),is_boolean(e.pauseOnResize)||(e.pauseOnResize=!0),is_number(e.timeoutDuration)||(e.timeoutDuration=e.duration<10?2500:5*e.duration),e.progress&&(is_function(e.progress.bar)&&(e.progress.bar=e.progress.bar.call(t)),is_string(e.progress.bar)&&(e.progress.bar=$(e.progress.bar)),e.progress.bar?(is_function(e.progress.updater)||(e.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(e.progress.interval)||(e.progress.interval=50)):e.progress=!1),e}function go_getPrevNextObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_number(e)&&(e={key:e}),e}function go_complementPrevNextObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_string(e.key)&&(e.key=cf_getKeyCode(e.key)),e}function go_getPaginationObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={container:e}:is_boolean(e)&&(e={keys:e}),e}function go_complementPaginationObject(t,e){return is_function(e.container)&&(e.container=e.container.call(t)),is_string(e.container)&&(e.container=$(e.container)),is_number(e.items)||(e.items=!1),is_boolean(e.keys)||(e.keys=!1),is_function(e.anchorBuilder)||is_false(e.anchorBuilder)||(e.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(e.deviation)||(e.deviation=0),e}function go_getSwipeObject(t,e){return is_function(e)&&(e=e.call(t)),is_undefined(e)&&(e={onTouch:!1}),is_true(e)?e={onTouch:e}:is_number(e)&&(e={items:e}),e}function go_complementSwipeObject(t,e){return is_boolean(e.onTouch)||(e.onTouch=!0),is_boolean(e.onMouse)||(e.onMouse=!1),is_object(e.options)||(e.options={}),is_boolean(e.options.triggerOnTouchEnd)||(e.options.triggerOnTouchEnd=!1),e}function go_getMousewheelObject(t,e){return is_function(e)&&(e=e.call(t)),is_true(e)?e={}:is_number(e)?e={items:e}:is_undefined(e)&&(e=!1),e}function go_complementMousewheelObject(t,e){return e}function gn_getItemIndex(t,e,s,i,o){if(is_string(t)&&(t=$(t,o)),is_object(t)&&(t=$(t,o)),is_jquery(t)?(t=o.children().index(t),is_boolean(s)||(s=!1)):is_boolean(s)||(s=!0),is_number(t)||(t=0),is_number(e)||(e=0),s&&(t+=i.first),t+=e,i.total>0){for(;t>=i.total;)t-=i.total;for(;0>t;)t+=i.total}return t}function gn_getVisibleItemsPrev(t,e,s){for(var i=0,o=0,n=s;n>=0;n--){var r=t.eq(n);if(i+=r.is(":visible")?r[e.d.outerWidth](!0):0,i>e.maxDimension)return o;0==n&&(n=t.length),o++}}function gn_getVisibleItemsPrevFilter(t,e,s){return gn_getItemsPrevFilter(t,e.items.filter,e.items.visibleConf.org,s)}function gn_getScrollItemsPrevFilter(t,e,s,i){return gn_getItemsPrevFilter(t,e.items.filter,i,s)}function gn_getItemsPrevFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length;r>=0;r--){if(n++,n==c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;0==r&&(r=c)}}function gn_getVisibleOrg(t,e){return e.items.visibleConf.org||t.children().slice(0,e.items.visible).filter(e.items.filter).length}function gn_getVisibleItemsNext(t,e,s){for(var i=0,o=0,n=s,r=t.length-1;r>=n;n++){var c=t.eq(n);if(i+=c.is(":visible")?c[e.d.outerWidth](!0):0,i>e.maxDimension)return o;if(o++,o==r+1)return o;n==r&&(n=-1)}}function gn_getVisibleItemsNextTestCircular(t,e,s,i){var o=gn_getVisibleItemsNext(t,e,s);return e.circular||s+o>i&&(o=i-s),o}function gn_getVisibleItemsNextFilter(t,e,s){return gn_getItemsNextFilter(t,e.items.filter,e.items.visibleConf.org,s,e.circular)}function gn_getScrollItemsNextFilter(t,e,s,i){return gn_getItemsNextFilter(t,e.items.filter,i+1,s,e.circular)-1}function gn_getItemsNextFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length-1;c>=r;r++){if(n++,n>=c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;r==c&&(r=-1)}}function gi_getCurrentItems(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsPrev(t,e,s){return t.slice(s,e.items.visibleConf.old+s)}function gi_getNewItemsPrev(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsNext(t,e){return t.slice(0,e.items.visibleConf.old)}function gi_getNewItemsNext(t,e,s){return t.slice(s,e.items.visible+s)}function sz_storeMargin(t,e,s){e.usePadding&&(is_string(s)||(s="_cfs_origCssMargin"),t.each(function(){var t=$(this),i=parseInt(t.css(e.d.marginRight),10);is_number(i)||(i=0),t.data(s,i)}))}function sz_resetMargin(t,e,s){if(e.usePadding){var i=is_boolean(s)?s:!1;is_number(s)||(s=0),sz_storeMargin(t,e,"_cfs_tempCssMargin"),t.each(function(){var t=$(this);t.css(e.d.marginRight,i?t.data("_cfs_tempCssMargin"):s+t.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(t){t.each(function(){var t=$(this);t.data("_cfs_origCss",t.attr("style")||"")})}function sz_restoreOrigCss(t){t.each(function(){var t=$(this);t.attr("style",t.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(t,e){var s=(t.items.visible,t.items[t.d.width]),i=t[t.d.height],o=is_percentage(i);e.each(function(){var e=$(this),n=s-ms_getPaddingBorderMargin(e,t,"Width");e[t.d.width](n),o&&e[t.d.height](ms_getPercentage(n,i))})}function sz_setSizes(t,e){var s=t.parent(),i=t.children(),o=gi_getCurrentItems(i,e),n=cf_mapWrapperSizes(ms_getSizes(o,e,!0),e,!1);if(s.css(n),e.usePadding){var r=e.padding,c=r[e.d[1]];e.align&&0>c&&(c=0);var a=o.last();a.css(e.d.marginRight,a.data("_cfs_origCssMargin")+c),t.css(e.d.top,r[e.d[0]]),t.css(e.d.left,r[e.d[3]])}return t.css(e.d.width,n[e.d.width]+2*ms_getTotalSize(i,e,"width")),t.css(e.d.height,ms_getLargestSize(i,e,"height")),n}function ms_getSizes(t,e,s){return[ms_getTotalSize(t,e,"width",s),ms_getLargestSize(t,e,"height",s)]}function ms_getLargestSize(t,e,s,i){return is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i?e[e.d[s]]:is_number(e.items[e.d[s]])?e.items[e.d[s]]:(s=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(t,e,s))}function ms_getTrueLargestSize(t,e,s){for(var i=0,o=0,n=t.length;n>o;o++){var r=t.eq(o),c=r.is(":visible")?r[e.d[s]](!0):0;c>i&&(i=c)}return i}function ms_getTotalSize(t,e,s,i){if(is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i)return e[e.d[s]];if(is_number(e.items[e.d[s]]))return e.items[e.d[s]]*t.length;for(var o=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",n=0,r=0,c=t.length;c>r;r++){var a=t.eq(r);n+=a.is(":visible")?a[e.d[o]](!0):0}return n}function ms_getParentSize(t,e,s){var i=t.is(":visible");i&&t.hide();var o=t.parent()[e.d[s]]();return i&&t.show(),o}function ms_getMaxDimension(t,e){return is_number(t[t.d.width])?t[t.d.width]:e}function ms_hasVariableSizes(t,e,s){for(var i=!1,o=!1,n=0,r=t.length;r>n;n++){var c=t.eq(n),a=c.is(":visible")?c[e.d[s]](!0):0;i===!1?i=a:i!=a&&(o=!0),0==i&&(o=!0)}return o}function ms_getPaddingBorderMargin(t,e,s){return t[e.d["outer"+s]](!0)-t[e.d[s.toLowerCase()]]()}function ms_getPercentage(t,e){if(is_percentage(e)){if(e=parseInt(e.slice(0,-1),10),!is_number(e))return t;t*=e/100}return t}function cf_e(t,e,s,i,o){return is_boolean(s)||(s=!0),is_boolean(i)||(i=!0),is_boolean(o)||(o=!1),s&&(t=e.events.prefix+t),i&&(t=t+"."+e.events.namespace),i&&o&&(t+=e.serialNumber),t}function cf_c(t,e){return is_string(e.classnames[t])?e.classnames[t]:t}function cf_mapWrapperSizes(t,e,s){is_boolean(s)||(s=!0);var i=e.usePadding&&s?e.padding:[0,0,0,0],o={};return o[e.d.width]=t[0]+i[1]+i[3],o[e.d.height]=t[1]+i[0]+i[2],o}function cf_sortParams(t,e){for(var s=[],i=0,o=t.length;o>i;i++)for(var n=0,r=e.length;r>n;n++)if(e[n].indexOf(typeof t[i])>-1&&is_undefined(s[n])){s[n]=t[i];break}return s}function cf_getPadding(t){if(is_undefined(t))return[0,0,0,0];if(is_number(t))return[t,t,t,t];if(is_string(t)&&(t=t.split("px").join("").split("em").join("").split(" ")),!is_array(t))return[0,0,0,0];for(var e=0;4>e;e++)t[e]=parseInt(t[e],10);switch(t.length){case 0:return[0,0,0,0];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];default:return[t[0],t[1],t[2],t[3]]}}function cf_getAlignPadding(t,e){var s=is_number(e[e.d.width])?Math.ceil(e[e.d.width]-ms_getTotalSize(t,e,"width")):0;switch(e.align){case"left":return[0,s];case"right":return[s,0];case"center":default:return[Math.ceil(s/2),Math.floor(s/2)]}}function cf_getDimensions(t){for(var e=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],s=e[0].length,i="right"==t.direction||"left"==t.direction?0:1,o={},n=0;s>n;n++)o[e[0][n]]=e[i][n];return o}function cf_getAdjust(t,e,s,i){var o=t;if(is_function(s))o=s.call(i,o);else if(is_string(s)){var n=s.split("+"),r=s.split("-");if(r.length>n.length)var c=!0,a=r[0],f=r[1];else var c=!1,a=n[0],f=n[1];switch(a){case"even":o=t%2==1?t-1:t;break;case"odd":o=t%2==0?t-1:t;break;default:o=t}f=parseInt(f,10),is_number(f)&&(c&&(f=-f),o+=f)}return(!is_number(o)||1>o)&&(o=1),o}function cf_getItemsAdjust(t,e,s,i){return cf_getItemAdjustMinMax(cf_getAdjust(t,e,s,i),e.items.visibleConf)}function cf_getItemAdjustMinMax(t,e){return is_number(e.min)&&t<e.min&&(t=e.min),is_number(e.max)&&t>e.max&&(t=e.max),1>t&&(t=1),t}function cf_getSynchArr(t){is_array(t)||(t=[[t]]),is_array(t[0])||(t=[t]);for(var e=0,s=t.length;s>e;e++)is_string(t[e][0])&&(t[e][0]=$(t[e][0])),is_boolean(t[e][1])||(t[e][1]=!0),is_boolean(t[e][2])||(t[e][2]=!0),is_number(t[e][3])||(t[e][3]=0);return t}function cf_getKeyCode(t){return"right"==t?39:"left"==t?37:"up"==t?38:"down"==t?40:-1}function cf_setCookie(t,e,s){if(t){var i=e.triggerHandler(cf_e("currentPosition",s));$.fn.carouFredSel.cookie.set(t,i)}}function cf_getCookie(t){var e=$.fn.carouFredSel.cookie.get(t);return""==e?0:e}function in_mapCss(t,e){for(var s={},i=0,o=e.length;o>i;i++)s[e[i]]=t.css(e[i]);return s}function in_complementItems(t,e,s,i){return is_object(t.visibleConf)||(t.visibleConf={}),is_object(t.sizesConf)||(t.sizesConf={}),0==t.start&&is_number(i)&&(t.start=i),is_object(t.visible)?(t.visibleConf.min=t.visible.min,t.visibleConf.max=t.visible.max,t.visible=!1):is_string(t.visible)?("variable"==t.visible?t.visibleConf.variable=!0:t.visibleConf.adjust=t.visible,t.visible=!1):is_function(t.visible)&&(t.visibleConf.adjust=t.visible,t.visible=!1),is_string(t.filter)||(t.filter=s.filter(":hidden").length>0?":visible":"*"),t[e.d.width]||(e.responsive?(debug(!0,"Set a "+e.d.width+" for the items!"),t[e.d.width]=ms_getTrueLargestSize(s,e,"outerWidth")):t[e.d.width]=ms_hasVariableSizes(s,e,"outerWidth")?"variable":s[e.d.outerWidth](!0)),t[e.d.height]||(t[e.d.height]=ms_hasVariableSizes(s,e,"outerHeight")?"variable":s[e.d.outerHeight](!0)),t.sizesConf.width=t.width,t.sizesConf.height=t.height,t}function in_complementVisibleItems(t,e){return"variable"==t.items[t.d.width]&&(t.items.visibleConf.variable=!0),t.items.visibleConf.variable||(is_number(t[t.d.width])?t.items.visible=Math.floor(t[t.d.width]/t.items[t.d.width]):(t.items.visible=Math.floor(e/t.items[t.d.width]),t[t.d.width]=t.items.visible*t.items[t.d.width],t.items.visibleConf.adjust||(t.align=!1)),("Infinity"==t.items.visible||t.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),t.items.visibleConf.variable=!0)),t}function in_complementPrimarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerWidth")),t}function in_complementSecondarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerHeight")),t||(t=e.items[e.d.height]),t}function in_getAlignPadding(t,e){var s=cf_getAlignPadding(gi_getCurrentItems(e,t),t);return t.padding[t.d[1]]=s[1],t.padding[t.d[3]]=s[0],t}function in_getResponsiveValues(t,e){var s=cf_getItemAdjustMinMax(Math.ceil(t[t.d.width]/t.items[t.d.width]),t.items.visibleConf);s>e.length&&(s=e.length);var i=Math.floor(t[t.d.width]/s);return t.items.visible=s,t.items[t.d.width]=i,t[t.d.width]=s*i,t}function bt_pauseOnHoverConfig(t){if(is_string(t))var e=t.indexOf("immediate")>-1?!0:!1,s=t.indexOf("resume")>-1?!0:!1;else var e=s=!1;return[e,s]}function bt_mousesheelNumber(t){return is_number(t)?t:null}function is_null(t){return null===t}function is_undefined(t){return is_null(t)||"undefined"==typeof t||""===t||"undefined"===t}function is_array(t){return t instanceof Array}function is_jquery(t){return t instanceof jQuery}function is_object(t){return(t instanceof Object||"object"==typeof t)&&!is_null(t)&&!is_jquery(t)&&!is_array(t)&&!is_function(t)}function is_number(t){return(t instanceof Number||"number"==typeof t)&&!isNaN(t)}function is_string(t){return(t instanceof String||"string"==typeof t)&&!is_undefined(t)&&!is_true(t)&&!is_false(t)}function is_function(t){return t instanceof Function||"function"==typeof t}function is_boolean(t){return t instanceof Boolean||"boolean"==typeof t||is_true(t)||is_false(t)}function is_true(t){return t===!0||"true"===t}function is_false(t){return t===!1||"false"===t}function is_percentage(t){return is_string(t)&&"%"==t.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(t,e){debug(!0,t+" is DEPRECATED, support for it will be removed. Use "+e+" instead.")}function debug(t,e){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(t)){var s=" ("+t.selector+")";t=t.debug}else var s="";if(!t)return!1;e=is_string(e)?"carouFredSel"+s+": "+e:["carouFredSel"+s+":",e],window.console.log(e)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(t,e,s){t=go_getObject($tt0,t),t.items=go_getItemsObject($tt0,t.items),t.scroll=go_getScrollObject($tt0,t.scroll),t.auto=go_getAutoObject($tt0,t.auto),t.prev=go_getPrevNextObject($tt0,t.prev),t.next=go_getPrevNextObject($tt0,t.next),t.pagination=go_getPaginationObject($tt0,t.pagination),t.swipe=go_getSwipeObject($tt0,t.swipe),t.mousewheel=go_getMousewheelObject($tt0,t.mousewheel),e&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,t)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,t),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var i=$cfs.children(),o=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,o),opts.items=in_complementItems(opts.items,opts,i,s),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,i),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,i),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(o,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,o)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(i,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(i,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,i,o);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,i),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var t=$cfs.children(),e=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),s="relative";switch(e.position){case"absolute":case"fixed":s=e.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(e),$wrp.css({overflow:"hidden",position:s}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",e.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(t,opts),sz_storeOrigCss(t),opts.responsive&&sz_setResponsiveSizes(opts,t)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(t,e){return t.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),e)),!0}),$cfs.bind(cf_e("finish",conf),function(t){return t.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(t,e,s){if(t.stopPropagation(),tmrs=sc_clearTimers(tmrs),e&&crsl.isScrolling){scrl.isStopped=!0;var i=getTime()-scrl.startTime;scrl.duration-=i,scrl.pre&&(scrl.pre.duration-=i),scrl.post&&(scrl.post.duration-=i),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||s&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var o=opts.auto.timeoutDuration-tmrs.timePassed,n=100-Math.ceil(100*o/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,n,o)}return!0}),$cfs.bind(cf_e("play",conf),function(t,e,s,i){t.stopPropagation(),tmrs=sc_clearTimers(tmrs);var o=[e,s,i],n=["string","number","boolean"],r=cf_sortParams(o,n);if(e=r[0],s=r[1],i=r[2],"prev"!=e&&"next"!=e&&(e=crsl.direction),is_number(s)||(s=0),is_boolean(i)||(i=!1),i&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return t.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var c=opts.auto.timeoutDuration+s;return dur2=c-tmrs.timePassed,perc=100-Math.ceil(100*dur2/c),opts.auto.progress&&(tmrs.progress=setInterval(function(){var t=getTime()-tmrs.startTime+tmrs.timePassed,e=Math.ceil(100*t/c);opts.auto.progress.updater.call(opts.auto.progress.bar[0],e)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),e):$cfs.trigger(cf_e(e,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(t){return t.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(t,e,s,i,o){if(t.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return t.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var n=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(n>itms.total)return t.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+n+" needed): Not scrolling.");var r=[e,s,i,o],c=["object","number/string","function","boolean"],a=cf_sortParams(r,c);e=a[0],s=a[1],i=a[2],o=a[3];var f=t.type.slice(conf.events.prefix.length);if(is_object(e)||(e={}),is_function(i)&&(e.onAfter=i),is_boolean(o)&&(e.queue=o),e=$.extend(!0,{},opts[f],e),e.conditions&&!e.conditions.call($tt0,f))return t.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(s)){if("*"!=opts.items.filter)s="visible";else for(var l=[s,e.items,opts[f].items],a=0,u=l.length;u>a;a++)if(is_number(l[a])||"page"==l[a]||"visible"==l[a]){s=l[a];break}switch(s){case"page":return t.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(f+"Page",conf),[e,i]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(s=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]]),t.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(e.duration>0&&crsl.isScrolling)return e.queue&&("last"==e.queue&&(queu=[]),("first"!=e.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]])),t.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+f,conf),[e,s]),opts.synchronise)for(var p=opts.synchronise,d=[e,s],g=0,u=p.length;u>g;g++){var m=f;p[g][2]||(m="prev"==m?"next":"prev"),p[g][1]||(d[0]=p[g][0].triggerHandler("_cfs_triggerEvent",["configuration",m])),d[1]=s+p[g][3],p[g][0].trigger("_cfs_triggerEvent",["slide_"+m,d])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if(opts.items.visibleConf.variable)s=gn_getVisibleItemsPrev(i,opts,itms.total-1);else if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsPrevFilter(i,opts,itms.total-1,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}if(opts.circular||itms.total-s<itms.first&&(s=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){var n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible+s<=n&&s<itms.total&&(s++,n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=n}else if("*"!=opts.items.filter){var n=gn_getVisibleItemsNextFilter(i,opts,itms.total-s);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items backward."),itms.first+=s;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&e.onEnd&&e.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-s,itms.total).prependTo($cfs),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),r=gi_getOldItemsPrev(i,opts,s),c=gi_getNewItemsPrev(i,opts),a=i.eq(s-1),f=r.last(),l=c.last();sz_resetMargin(i,opts);var u=0,p=0;if(opts.align){var d=cf_getAlignPadding(c,opts);u=d[0],p=d[1]}var g=0>u?opts.padding[opts.d[3]]:0,m=!1,_=$();if(opts.items.visible<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,a=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(c,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z={},j={},N=sc_getDuration(e,opts,s,h);switch(e.fx){case"cover":case"cover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visible),opts,"width")}m&&(opts.items[opts.d.width]=b),sz_resetMargin(i,opts,!0),p>=0&&sz_resetMargin(f,opts,opts.padding[opts.d[1]]),u>=0&&sz_resetMargin(a,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=p,opts.padding[opts.d[3]]=u),z[opts.d.left]=-(h-g),j[opts.d.left]=-(P-g),x[opts.d.left]=w[opts.d.width];var k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){},q=function(){},D=function(){},V=function(){},R=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp)}switch(e.fx){case"crossfade":case"uncover":case"uncover-fade":v.children().slice(0,s).remove(),v.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":v.children().slice(opts.items.visible).remove(),v.css(j)}if($cfs.css(z),scrl=sc_setScroll(N,e.easing,conf),C[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(k=function(){$wrp.css(w)},O=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){switch(l.not(a).length&&(S[opts.d.marginRight]=a.data("_cfs_origCssMargin"),0>u?a.css(S):(H=function(){a.css(S)},q=function(){scrl.anims.push([a,S])})),e.fx){case"cover":case"cover-fade":v.children().eq(s-1).css(S)}l.not(f).length&&(y[opts.d.marginRight]=f.data("_cfs_origCssMargin"),T=function(){f.css(y)},M=function(){scrl.anims.push([f,y])}),p>=0&&(I[opts.d.marginRight]=l.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],F=function(){l.css(I)},A=function(){scrl.anims.push([l,I])})}R=function(){$cfs.css(C)};var E=opts.items.visible+s-itms.total;V=function(){if(E>0&&($cfs.children().slice(itms.total).remove(),r=$($cfs.children().slice(itms.total-(opts.items.visible-E)).get().concat($cfs.children().slice(0,E).get()))),sc_showHiddenItems(m),opts.usePadding){var t=$cfs.children().eq(opts.items.visible+s-1);t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var W=sc_mapCallbackArguments(r,_,c,s,"prev",N,w);switch(D=function(){sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",W,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",W,clbk),e.fx){case"none":$cfs.css(C),k(),T(),F(),H(),R(),V(),D();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){k(),T(),F(),H(),R(),V(),scrl=sc_setScroll(N,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},D]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},D]),O(),T(),F(),H(),R(),V();break;case"cover":scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"uncover":scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;default:scrl.anims.push([$cfs,C,function(){V(),D()}]),O(),M(),A(),q()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0
2
  }),$cfs.bind(cf_e("slide_next",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsNextFilter(i,opts,0,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}var n=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var r=gn_getVisibleItemsNext(i,opts,s),o=gn_getVisibleItemsPrev(i,opts,n-1);else var r=opts.items.visible,o=opts.items.visible;s+r>n&&(s=n-o)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-s>=r&&s<itms.total;)s++,r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=r}else if("*"!=opts.items.filter){var r=gn_getVisibleItemsNextFilter(i,opts,s);opts.items.visible=cf_getItemsAdjust(r,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items forward."),itms.first-=s;itms.first<0;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&e.onEnd&&e.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),c=gi_getOldItemsNext(i,opts),a=gi_getNewItemsNext(i,opts,s),f=i.eq(s-1),l=c.last(),u=a.last();sz_resetMargin(i,opts);var p=0,d=0;if(opts.align){var g=cf_getAlignPadding(a,opts);p=g[0],d=g[1]}var m=!1,_=$();if(opts.items.visibleConf.old<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,f=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(a,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z=sc_getDuration(e,opts,s,h);switch(e.fx){case"uncover":case"uncover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visibleConf.old),opts,"width")}m&&(opts.items[opts.d.width]=b),opts.align&&opts.padding[opts.d[1]]<0&&(opts.padding[opts.d[1]]=0),sz_resetMargin(i,opts,!0),sz_resetMargin(l,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=d,opts.padding[opts.d[3]]=p),I[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var j=function(){},N=function(){},k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp),v.children().slice(opts.items.visibleConf.old).remove()}switch(e.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),v.css("zIndex",0)}if(scrl=sc_setScroll(z,e.easing,conf),C[opts.d.left]=-h,x[opts.d.left]=-P,0>p&&(C[opts.d.left]+=p),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(j=function(){$wrp.css(w)},N=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){var q=u.data("_cfs_origCssMargin");d>=0&&(q+=opts.padding[opts.d[1]]),u.css(opts.d.marginRight,q),f.not(l).length&&(y[opts.d.marginRight]=l.data("_cfs_origCssMargin")),k=function(){l.css(y)},O=function(){scrl.anims.push([l,y])};var D=f.data("_cfs_origCssMargin");p>0&&(D+=opts.padding[opts.d[3]]),S[opts.d.marginRight]=D,T=function(){f.css(S)},M=function(){scrl.anims.push([f,S])}}H=function(){$cfs.css(I)};var V=opts.items.visible+s-itms.total;A=function(){V>0&&$cfs.children().slice(itms.total).remove();var t=$cfs.children().slice(0,s).appendTo($cfs).last();if(V>0&&(a=gi_getCurrentItems(i,opts)),sc_showHiddenItems(m),opts.usePadding){if(itms.total<opts.items.visible+s){var e=$cfs.children().eq(opts.items.visible-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var R=sc_mapCallbackArguments(c,_,a,s,"next",z,w);switch(F=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",R,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",R,clbk),e.fx){case"none":$cfs.css(C),j(),k(),T(),H(),A(),F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){j(),k(),T(),H(),A(),scrl=sc_setScroll(z,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},F]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},F]),N(),k(),T(),H(),A();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"uncover":scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;default:scrl.anims.push([$cfs,C,function(){H(),A(),F()}]),N(),O(),M()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0}),$cfs.bind(cf_e("slideTo",conf),function(t,e,s,i,o,n,r){t.stopPropagation();var c=[e,s,i,o,n,r],a=["string/number/object","number","boolean","object","string","function"],f=cf_sortParams(c,a);return o=f[3],n=f[4],r=f[5],e=gn_getItemIndex(f[0],f[1],f[2],itms,$cfs),0==e?!1:(is_object(o)||(o=!1),"prev"!=n&&"next"!=n&&(n=opts.circular?e<=itms.total/2?"next":"prev":0==itms.first||itms.first>e?"next":"prev"),"prev"==n&&(e=itms.total-e),$cfs.trigger(cf_e(n,conf),[o,e,r]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i-1,e,"prev",s])}),$cfs.bind(cf_e("nextPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i+1,e,"next",s])}),$cfs.bind(cf_e("slideToPage",conf),function(t,e,s,i,o){t.stopPropagation(),is_number(e)||(e=$cfs.triggerHandler(cf_e("currentPage",conf)));var n=opts.pagination.items||opts.items.visible,r=Math.ceil(itms.total/n)-1;return 0>e&&(e=r),e>r&&(e=0),$cfs.triggerHandler(cf_e("slideTo",conf),[e*n,0,!0,s,i,o])}),$cfs.bind(cf_e("jumpToStart",conf),function(t,e){if(t.stopPropagation(),e=e?gn_getItemIndex(e,0,!0,itms,$cfs):0,e+=itms.first,0!=e){if(itms.total>0)for(;e>itms.total;)e-=itms.total;$cfs.prepend($cfs.children().slice(e,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(t,e){if(t.stopPropagation(),e)e=cf_getSynchArr(e);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");e=opts.synchronise}for(var s=$cfs.triggerHandler(cf_e("currentPosition",conf)),i=!0,o=0,n=e.length;n>o;o++)e[o][0].triggerHandler(cf_e("slideTo",conf),[s,e[o][3],!0])||(i=!1);return i}),$cfs.bind(cf_e("queue",conf),function(t,e,s){return t.stopPropagation(),is_function(e)?e.call($tt0,queu):is_array(e)?queu=e:is_undefined(e)||queu.push([e,s]),queu}),$cfs.bind(cf_e("insertItem",conf),function(t,e,s,i,o){t.stopPropagation();var n=[e,s,i,o],r=["string/object","string/number/object","boolean","number"],c=cf_sortParams(n,r);if(e=c[0],s=c[1],i=c[2],o=c[3],is_object(e)&&!is_jquery(e)?e=$(e):is_string(e)&&(e=$(e)),!is_jquery(e)||0==e.length)return debug(conf,"Not a valid object.");is_undefined(s)&&(s="end"),sz_storeMargin(e,opts),sz_storeOrigCss(e);var a=s,f="before";"end"==s?i?(0==itms.first?(s=itms.total-1,f="after"):(s=itms.first,itms.first+=e.length),0>s&&(s=0)):(s=itms.total-1,f="after"):s=gn_getItemIndex(s,o,i,itms,$cfs);var l=$cfs.children().eq(s);return l.length?l[f](e):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(e)),"end"==a||i||s<itms.first&&(itms.first+=e.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(t,e,s,i){t.stopPropagation();var o=[e,s,i],n=["string/number/object","boolean","number"],r=cf_sortParams(o,n);e=r[0],s=r[1],i=r[2];if(e instanceof $&&e.length>1)return c=$(),e.each(function(){var t=$cfs.trigger(cf_e("removeItem",conf),[$(this),s,i]);t&&(c=c.add(t))}),c;if(is_undefined(e)||"end"==e)c=$cfs.children().last();else{e=gn_getItemIndex(e,i,s,itms,$cfs);var c=$cfs.children().eq(e);c.length&&e<itms.first&&(itms.first-=c.length)}return c&&c.length&&(c.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),c}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length);return is_array(e)&&(clbk[s]=e),is_function(e)&&clbk[s].push(e),clbk[s]}),$cfs.bind(cf_e("currentPosition",conf),function(t,e){if(t.stopPropagation(),0==itms.first)var s=0;else var s=itms.total-itms.first;return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentPage",conf),function(t,e){t.stopPropagation();var s,i=opts.pagination.items||opts.items.visible,o=Math.ceil(itms.total/i-1);return s=0==itms.first?0:itms.first<itms.total%i?0:itms.first!=i||opts.circular?Math.round((itms.total-itms.first)/i):o,0>s&&(s=0),s>o&&(s=o),is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentVisible",conf),function(t,e){t.stopPropagation();var s=gi_getCurrentItems($cfs.children(),opts);return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("slice",conf),function(t,e,s,i){if(t.stopPropagation(),0==itms.total)return!1;var o=[e,s,i],n=["number","number","function"],r=cf_sortParams(o,n);if(e=is_number(r[0])?r[0]:0,s=is_number(r[1])?r[1]:itms.total,i=r[2],e+=itms.first,s+=itms.first,items.total>0){for(;e>itms.total;)e-=itms.total;for(;s>itms.total;)s-=itms.total;for(;0>e;)e+=itms.total;for(;0>s;)s+=itms.total}var c,a=$cfs.children();return c=s>e?a.slice(e,s):$(a.slice(e,itms.total).get().concat(a.slice(0,s).get())),is_function(i)&&i.call($tt0,c),c}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length),i=crsl[s];return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(t,e,s){return t.stopPropagation(),is_undefined(e)?e=$("body"):is_string(e)&&(e=$(e)),is_jquery(e)&&0!=e.length?(is_string(s)||(s="a.caroufredsel"),e.find(s).each(function(){var t=this.hash||"";t.length>0&&-1!=$cfs.children().index($(t))&&$(this).unbind("click").click(function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),t)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(t,e){if(t.stopPropagation(),opts.pagination.container){var s=opts.pagination.items||opts.items.visible,i=Math.ceil(itms.total/s);e&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var t=0;i>t;t++){var e=$cfs.children().eq(gn_getItemIndex(t*s,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(t){$(this).bind(opts.pagination.event,function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[t*s,-opts.pagination.deviation,!0,opts.pagination])})})}));var o=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return o>=i&&(o=0),0>o&&(o=i-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(o).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var t=opts.items.visible,e=$cfs.children(),s=ms_getParentSize($wrp,opts,"width");if(itms.total=e.length,crsl.primarySizePercentage?(opts.maxDimension=s,opts[opts.d.width]=ms_getPercentage(s,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,s),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,e,s),t=opts.items.visible,sz_setResponsiveSizes(opts,e)):opts.items.visibleConf.variable?t=gn_getVisibleItemsNext(e,opts,0):"*"!=opts.items.filter&&(t=gn_getVisibleItemsNextFilter(e,opts,0)),!opts.circular&&0!=itms.first&&t>itms.first){if(opts.items.visibleConf.variable)var i=gn_getVisibleItemsPrev(e,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var i=gn_getVisibleItemsPrevFilter(e,opts,itms.first)-itms.first;else var i=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+i+" items backward."),$cfs.trigger(cf_e("prev",conf),i)}opts.items.visible=cf_getItemsAdjust(t,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,e);var o=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,o]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),o}),$cfs.bind(cf_e("destroy",conf),function(t,e){return t.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),e&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(t,e,s){return t.stopPropagation(),$cfs.triggerHandler(cf_e(e,conf),s)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(t){t.preventDefault();var e=!1,s=null;crsl.isPaused?e="play":opts.auto.pauseOnEvent&&(e="pause",s=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),e&&$cfs.trigger(cf_e(e,conf),s)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e==opts.next.key&&(t.preventDefault(),$cfs.trigger(cf_e("next",conf))),e==opts.prev.key&&(t.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e>=49&&58>e&&(e=(e-49)*opts.items.visible,e<=itms.total&&(t.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[e,0,!0,opts.pagination])))}),$.fn.swipe){var e="ontouchstart"in window;if(e&&opts.swipe.onTouch||!e&&opts.swipe.onMouse){var s=$.extend(!0,{},opts.prev,opts.swipe),i=$.extend(!0,{},opts.next,opts.swipe),o=function(){$cfs.trigger(cf_e("prev",conf),[s])},n=function(){$cfs.trigger(cf_e("next",conf),[i])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=n,opts.swipe.options.swipeDown=o;break;default:opts.swipe.options.swipeLeft=n,opts.swipe.options.swipeRight=o}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var r=$.extend(!0,{},opts.prev,opts.mousewheel),c=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(t,e){t.preventDefault(),e>0?$cfs.trigger(cf_e("prev",conf),[r]):$cfs.trigger(cf_e("next",conf),[c])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var a=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},f=$(window),l=null;if($.debounce&&"debounce"==conf.onWindowResize)l=$.debounce(200,a);else if($.throttle&&"throttle"==conf.onWindowResize)l=$.throttle(300,a);else{var u=0,p=0;l=function(){var t=f.width(),e=f.height();(t!=u||e!=p)&&(a(),u=t,p=e)}}f.bind(cf_e("resize",conf,!1,!0,!0),l)}},FN._unbind_buttons=function(){var t=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(t),opts.auto.button&&opts.auto.button.unbind(t),opts.prev.button&&opts.prev.button.unbind(t),opts.next.button&&opts.next.button.unbind(t),opts.pagination.container&&(opts.pagination.container.unbind(t),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,s.length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(t){return'<a href="#"><span>'+t+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(t){$(this).css("width",t+"%")},$.fn.carouFredSel.cookie={get:function(t){t+="=";for(var e=document.cookie.split(";"),s=0,i=e.length;i>s;s++){for(var o=e[s];" "==o.charAt(0);)o=o.slice(1);if(0==o.indexOf(t))return o.slice(t.length)}return 0},set:function(t,e,s){var i="";if(s){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=t+"="+e+i+"; path=/"},remove:function(t){$.fn.carouFredSel.cookie.set(t,"",-1)}},$.extend($.easing,{quadratic:function(t){var e=t*t;return t*(-e*t+4*e-6*t+4)},cubic:function(t){return t*(4*t*t-9*t+6)},elastic:function(t){var e=t*t;return t*(33*e*e-106*e*t+126*e-67*t+15)}}))}(jQuery);
1
+ !function($){function sc_setScroll(t,e,s){return"transition"==s.transition&&"swing"==e&&(e="ease"),{anims:[],duration:t,orgDuration:t,easing:e,startTime:getTime()}}function sc_startScroll(t,e){for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o&&o[0][e.transition](o[1],t.duration,t.easing,o[2])}}function sc_stopScroll(t,e){is_boolean(e)||(e=!0),is_object(t.pre)&&sc_stopScroll(t.pre,e);for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o[0].stop(!0),e&&(o[0].css(o[1]),is_function(o[2])&&o[2]())}is_object(t.post)&&sc_stopScroll(t.post,e)}function sc_afterScroll(t,e,s){switch(e&&e.remove(),s.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":t.css("opacity",1),t.css("filter","")}}function sc_fireCallbacks(t,e,s,i,o){if(e[s]&&e[s].call(t,i),o[s].length)for(var n=0,r=o[s].length;r>n;n++)o[s][n].call(t,i);return[]}function sc_fireQueue(t,e,s){return e.length&&(t.trigger(cf_e(e[0][0],s),e[0][1]),e.shift()),e}function sc_hideHiddenItems(t){t.each(function(){var t=$(this);t.data("_cfs_isHidden",t.is(":hidden")).hide()})}function sc_showHiddenItems(t){t&&t.each(function(){var t=$(this);t.data("_cfs_isHidden")||t.show()})}function sc_clearTimers(t){return t.auto&&clearTimeout(t.auto),t.progress&&clearInterval(t.progress),t}function sc_mapCallbackArguments(t,e,s,i,o,n,r){return{width:r.width,height:r.height,items:{old:t,skipped:e,visible:s},scroll:{items:i,direction:o,duration:n}}}function sc_getDuration(t,e,s,i){var o=t.duration;return"none"==t.fx?0:("auto"==o?o=e.scroll.duration/e.scroll.items*s:10>o&&(o=i/o),1>o?0:("fade"==t.fx&&(o/=2),Math.round(o)))}function nv_showNavi(t,e,s){var i=is_number(t.items.minimum)?t.items.minimum:t.items.visible+1;if("show"==e||"hide"==e)var o=e;else if(i>e){debug(s,"Not enough items ("+e+" total, "+i+" needed): Hiding navigation.");var o="hide"}else var o="show";var n="show"==o?"removeClass":"addClass",r=cf_c("hidden",s);t.auto.button&&t.auto.button[o]()[n](r),t.prev.button&&t.prev.button[o]()[n](r),t.next.button&&t.next.button[o]()[n](r),t.pagination.container&&t.pagination.container[o]()[n](r)}function nv_enableNavi(t,e,s){if(!t.circular&&!t.infinite){var i="removeClass"==e||"addClass"==e?e:!1,o=cf_c("disabled",s);if(t.auto.button&&i&&t.auto.button[i](o),t.prev.button){var n=i||0==e?"addClass":"removeClass";t.prev.button[n](o)}if(t.next.button){var n=i||e==t.items.visible?"addClass":"removeClass";t.next.button[n](o)}}}function go_getObject(t,e){return is_function(e)?e=e.call(t):is_undefined(e)&&(e={}),e}function go_getItemsObject(t,e){return e=go_getObject(t,e),is_number(e)?e={visible:e}:"variable"==e?e={visible:e,width:e,height:e}:is_object(e)||(e={}),e}function go_getScrollObject(t,e){return e=go_getObject(t,e),is_number(e)?e=50>=e?{items:e}:{duration:e}:is_string(e)?e={easing:e}:is_object(e)||(e={}),e}function go_getNaviObject(t,e){if(e=go_getObject(t,e),is_string(e)){var s=cf_getKeyCode(e);e=-1==s?$(e):s}return e}function go_getAutoObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_boolean(e)?e={play:e}:is_number(e)&&(e={timeoutDuration:e}),e.progress&&(is_string(e.progress)||is_jquery(e.progress))&&(e.progress={bar:e.progress}),e}function go_complementAutoObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_boolean(e.play)||(e.play=!0),is_number(e.delay)||(e.delay=0),is_undefined(e.pauseOnEvent)&&(e.pauseOnEvent=!0),is_boolean(e.pauseOnResize)||(e.pauseOnResize=!0),is_number(e.timeoutDuration)||(e.timeoutDuration=e.duration<10?2500:5*e.duration),e.progress&&(is_function(e.progress.bar)&&(e.progress.bar=e.progress.bar.call(t)),is_string(e.progress.bar)&&(e.progress.bar=$(e.progress.bar)),e.progress.bar?(is_function(e.progress.updater)||(e.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(e.progress.interval)||(e.progress.interval=50)):e.progress=!1),e}function go_getPrevNextObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_number(e)&&(e={key:e}),e}function go_complementPrevNextObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_string(e.key)&&(e.key=cf_getKeyCode(e.key)),e}function go_getPaginationObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={container:e}:is_boolean(e)&&(e={keys:e}),e}function go_complementPaginationObject(t,e){return is_function(e.container)&&(e.container=e.container.call(t)),is_string(e.container)&&(e.container=$(e.container)),is_number(e.items)||(e.items=!1),is_boolean(e.keys)||(e.keys=!1),is_function(e.anchorBuilder)||is_false(e.anchorBuilder)||(e.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(e.deviation)||(e.deviation=0),e}function go_getSwipeObject(t,e){return is_function(e)&&(e=e.call(t)),is_undefined(e)&&(e={onTouch:!1}),is_true(e)?e={onTouch:e}:is_number(e)&&(e={items:e}),e}function go_complementSwipeObject(t,e){return is_boolean(e.onTouch)||(e.onTouch=!0),is_boolean(e.onMouse)||(e.onMouse=!1),is_object(e.options)||(e.options={}),is_boolean(e.options.triggerOnTouchEnd)||(e.options.triggerOnTouchEnd=!1),e}function go_getMousewheelObject(t,e){return is_function(e)&&(e=e.call(t)),is_true(e)?e={}:is_number(e)?e={items:e}:is_undefined(e)&&(e=!1),e}function go_complementMousewheelObject(t,e){return e}function gn_getItemIndex(t,e,s,i,o){if(is_string(t)&&(t=$(t,o)),is_object(t)&&(t=$(t,o)),is_jquery(t)?(t=o.children().index(t),is_boolean(s)||(s=!1)):is_boolean(s)||(s=!0),is_number(t)||(t=0),is_number(e)||(e=0),s&&(t+=i.first),t+=e,i.total>0){for(;t>=i.total;)t-=i.total;for(;0>t;)t+=i.total}return t}function gn_getVisibleItemsPrev(t,e,s){for(var i=0,o=0,n=s;n>=0;n--){var r=t.eq(n);if(i+=r.is(":visible")?r[e.d.outerWidth](!0):0,i>e.maxDimension)return o;0==n&&(n=t.length),o++}}function gn_getVisibleItemsPrevFilter(t,e,s){return gn_getItemsPrevFilter(t,e.items.filter,e.items.visibleConf.org,s)}function gn_getScrollItemsPrevFilter(t,e,s,i){return gn_getItemsPrevFilter(t,e.items.filter,i,s)}function gn_getItemsPrevFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length;r>=0;r--){if(n++,n==c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;0==r&&(r=c)}}function gn_getVisibleOrg(t,e){return e.items.visibleConf.org||t.children().slice(0,e.items.visible).filter(e.items.filter).length}function gn_getVisibleItemsNext(t,e,s){for(var i=0,o=0,n=s,r=t.length-1;r>=n;n++){var c=t.eq(n);if(i+=c.is(":visible")?c[e.d.outerWidth](!0):0,i>e.maxDimension)return o;if(o++,o==r+1)return o;n==r&&(n=-1)}}function gn_getVisibleItemsNextTestCircular(t,e,s,i){var o=gn_getVisibleItemsNext(t,e,s);return e.circular||s+o>i&&(o=i-s),o}function gn_getVisibleItemsNextFilter(t,e,s){return gn_getItemsNextFilter(t,e.items.filter,e.items.visibleConf.org,s,e.circular)}function gn_getScrollItemsNextFilter(t,e,s,i){return gn_getItemsNextFilter(t,e.items.filter,i+1,s,e.circular)-1}function gn_getItemsNextFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length-1;c>=r;r++){if(n++,n>=c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;r==c&&(r=-1)}}function gi_getCurrentItems(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsPrev(t,e,s){return t.slice(s,e.items.visibleConf.old+s)}function gi_getNewItemsPrev(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsNext(t,e){return t.slice(0,e.items.visibleConf.old)}function gi_getNewItemsNext(t,e,s){return t.slice(s,e.items.visible+s)}function sz_storeMargin(t,e,s){e.usePadding&&(is_string(s)||(s="_cfs_origCssMargin"),t.each(function(){var t=$(this),i=parseInt(t.css(e.d.marginRight),10);is_number(i)||(i=0),t.data(s,i)}))}function sz_resetMargin(t,e,s){if(e.usePadding){var i=is_boolean(s)?s:!1;is_number(s)||(s=0),sz_storeMargin(t,e,"_cfs_tempCssMargin"),t.each(function(){var t=$(this);t.css(e.d.marginRight,i?t.data("_cfs_tempCssMargin"):s+t.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(t){t.each(function(){var t=$(this);t.data("_cfs_origCss",t.attr("style")||"")})}function sz_restoreOrigCss(t){t.each(function(){var t=$(this);t.attr("style",t.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(t,e){var s=(t.items.visible,t.items[t.d.width]),i=t[t.d.height],o=is_percentage(i);e.each(function(){var e=$(this),n=s-ms_getPaddingBorderMargin(e,t,"Width");e[t.d.width](n),o&&e[t.d.height](ms_getPercentage(n,i))})}function sz_setSizes(t,e){var s=t.parent(),i=t.children(),o=gi_getCurrentItems(i,e),n=cf_mapWrapperSizes(ms_getSizes(o,e,!0),e,!1);if(s.css(n),e.usePadding){var r=e.padding,c=r[e.d[1]];e.align&&0>c&&(c=0);var a=o.last();a.css(e.d.marginRight,a.data("_cfs_origCssMargin")+c),t.css(e.d.top,r[e.d[0]]),t.css(e.d.left,r[e.d[3]])}return t.css(e.d.width,n[e.d.width]+2*ms_getTotalSize(i,e,"width")),t.css(e.d.height,ms_getLargestSize(i,e,"height")),n}function ms_getSizes(t,e,s){return[ms_getTotalSize(t,e,"width",s),ms_getLargestSize(t,e,"height",s)]}function ms_getLargestSize(t,e,s,i){return is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i?e[e.d[s]]:is_number(e.items[e.d[s]])?e.items[e.d[s]]:(s=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(t,e,s))}function ms_getTrueLargestSize(t,e,s){for(var i=0,o=0,n=t.length;n>o;o++){var r=t.eq(o),c=r.is(":visible")?r[e.d[s]](!0):0;c>i&&(i=c)}return i}function ms_getTotalSize(t,e,s,i){if(is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i)return e[e.d[s]];if(is_number(e.items[e.d[s]]))return e.items[e.d[s]]*t.length;for(var o=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",n=0,r=0,c=t.length;c>r;r++){var a=t.eq(r);n+=a.is(":visible")?a[e.d[o]](!0):0}return n}function ms_getParentSize(t,e,s){var i=t.is(":visible");i&&t.hide();var o=t.parent()[e.d[s]]();return i&&t.show(),o}function ms_getMaxDimension(t,e){return is_number(t[t.d.width])?t[t.d.width]:e}function ms_hasVariableSizes(t,e,s){for(var i=!1,o=!1,n=0,r=t.length;r>n;n++){var c=t.eq(n),a=c.is(":visible")?c[e.d[s]](!0):0;i===!1?i=a:i!=a&&(o=!0),0==i&&(o=!0)}return o}function ms_getPaddingBorderMargin(t,e,s){return t[e.d["outer"+s]](!0)-t[e.d[s.toLowerCase()]]()}function ms_getPercentage(t,e){if(is_percentage(e)){if(e=parseInt(e.slice(0,-1),10),!is_number(e))return t;t*=e/100}return t}function cf_e(t,e,s,i,o){return is_boolean(s)||(s=!0),is_boolean(i)||(i=!0),is_boolean(o)||(o=!1),s&&(t=e.events.prefix+t),i&&(t=t+"."+e.events.namespace),i&&o&&(t+=e.serialNumber),t}function cf_c(t,e){return is_string(e.classnames[t])?e.classnames[t]:t}function cf_mapWrapperSizes(t,e,s){is_boolean(s)||(s=!0);var i=e.usePadding&&s?e.padding:[0,0,0,0],o={};return o[e.d.width]=t[0]+i[1]+i[3],o[e.d.height]=t[1]+i[0]+i[2],o}function cf_sortParams(t,e){for(var s=[],i=0,o=t.length;o>i;i++)for(var n=0,r=e.length;r>n;n++)if(e[n].indexOf(typeof t[i])>-1&&is_undefined(s[n])){s[n]=t[i];break}return s}function cf_getPadding(t){if(is_undefined(t))return[0,0,0,0];if(is_number(t))return[t,t,t,t];if(is_string(t)&&(t=t.split("px").join("").split("em").join("").split(" ")),!is_array(t))return[0,0,0,0];for(var e=0;4>e;e++)t[e]=parseInt(t[e],10);switch(t.length){case 0:return[0,0,0,0];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];default:return[t[0],t[1],t[2],t[3]]}}function cf_getAlignPadding(t,e){var s=is_number(e[e.d.width])?Math.ceil(e[e.d.width]-ms_getTotalSize(t,e,"width")):0;switch(e.align){case"left":return[0,s];case"right":return[s,0];case"center":default:return[Math.ceil(s/2),Math.floor(s/2)]}}function cf_getDimensions(t){for(var e=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],s=e[0].length,i="right"==t.direction||"left"==t.direction?0:1,o={},n=0;s>n;n++)o[e[0][n]]=e[i][n];return o}function cf_getAdjust(t,e,s,i){var o=t;if(is_function(s))o=s.call(i,o);else if(is_string(s)){var n=s.split("+"),r=s.split("-");if(r.length>n.length)var c=!0,a=r[0],f=r[1];else var c=!1,a=n[0],f=n[1];switch(a){case"even":o=t%2==1?t-1:t;break;case"odd":o=t%2==0?t-1:t;break;default:o=t}f=parseInt(f,10),is_number(f)&&(c&&(f=-f),o+=f)}return(!is_number(o)||1>o)&&(o=1),o}function cf_getItemsAdjust(t,e,s,i){return cf_getItemAdjustMinMax(cf_getAdjust(t,e,s,i),e.items.visibleConf)}function cf_getItemAdjustMinMax(t,e){return is_number(e.min)&&t<e.min&&(t=e.min),is_number(e.max)&&t>e.max&&(t=e.max),1>t&&(t=1),t}function cf_getSynchArr(t){is_array(t)||(t=[[t]]),is_array(t[0])||(t=[t]);for(var e=0,s=t.length;s>e;e++)is_string(t[e][0])&&(t[e][0]=$(t[e][0])),is_boolean(t[e][1])||(t[e][1]=!0),is_boolean(t[e][2])||(t[e][2]=!0),is_number(t[e][3])||(t[e][3]=0);return t}function cf_getKeyCode(t){return"right"==t?39:"left"==t?37:"up"==t?38:"down"==t?40:-1}function cf_setCookie(t,e,s){if(t){var i=e.triggerHandler(cf_e("currentPosition",s));$.fn.carouFredSel.cookie.set(t,i)}}function cf_getCookie(t){var e=$.fn.carouFredSel.cookie.get(t);return""==e?0:e}function in_mapCss(t,e){for(var s={},i=0,o=e.length;o>i;i++)s[e[i]]=t.css(e[i]);return s}function in_complementItems(t,e,s,i){return is_object(t.visibleConf)||(t.visibleConf={}),is_object(t.sizesConf)||(t.sizesConf={}),0==t.start&&is_number(i)&&(t.start=i),is_object(t.visible)?(t.visibleConf.min=t.visible.min,t.visibleConf.max=t.visible.max,t.visible=!1):is_string(t.visible)?("variable"==t.visible?t.visibleConf.variable=!0:t.visibleConf.adjust=t.visible,t.visible=!1):is_function(t.visible)&&(t.visibleConf.adjust=t.visible,t.visible=!1),is_string(t.filter)||(t.filter=s.filter(":hidden").length>0?":visible":"*"),t[e.d.width]||(e.responsive?(debug(!0,"Set a "+e.d.width+" for the items!"),t[e.d.width]=ms_getTrueLargestSize(s,e,"outerWidth")):t[e.d.width]=ms_hasVariableSizes(s,e,"outerWidth")?"variable":s[e.d.outerWidth](!0)),t[e.d.height]||(t[e.d.height]=ms_hasVariableSizes(s,e,"outerHeight")?"variable":s[e.d.outerHeight](!0)),t.sizesConf.width=t.width,t.sizesConf.height=t.height,t}function in_complementVisibleItems(t,e){return"variable"==t.items[t.d.width]&&(t.items.visibleConf.variable=!0),t.items.visibleConf.variable||(is_number(t[t.d.width])?t.items.visible=Math.floor(t[t.d.width]/t.items[t.d.width]):(t.items.visible=Math.floor(e/t.items[t.d.width]),t[t.d.width]=t.items.visible*t.items[t.d.width],t.items.visibleConf.adjust||(t.align=!1)),("Infinity"==t.items.visible||t.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),t.items.visibleConf.variable=!0)),t}function in_complementPrimarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerWidth")),t}function in_complementSecondarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerHeight")),t||(t=e.items[e.d.height]),t}function in_getAlignPadding(t,e){var s=cf_getAlignPadding(gi_getCurrentItems(e,t),t);return t.padding[t.d[1]]=s[1],t.padding[t.d[3]]=s[0],t}function in_getResponsiveValues(t,e){var s=cf_getItemAdjustMinMax(Math.ceil(t[t.d.width]/t.items[t.d.width]),t.items.visibleConf);s>e.length&&(s=e.length);var i=Math.floor(t[t.d.width]/s);return t.items.visible=s,t.items[t.d.width]=i,t[t.d.width]=s*i,t}function bt_pauseOnHoverConfig(t){if(is_string(t))var e=t.indexOf("immediate")>-1?!0:!1,s=t.indexOf("resume")>-1?!0:!1;else var e=s=!1;return[e,s]}function bt_mousesheelNumber(t){return is_number(t)?t:null}function is_null(t){return null===t}function is_undefined(t){return is_null(t)||"undefined"==typeof t||""===t||"undefined"===t}function is_array(t){return t instanceof Array}function is_jquery(t){return t instanceof jQuery}function is_object(t){return(t instanceof Object||"object"==typeof t)&&!is_null(t)&&!is_jquery(t)&&!is_array(t)&&!is_function(t)}function is_number(t){return(t instanceof Number||"number"==typeof t)&&!isNaN(t)}function is_string(t){return(t instanceof String||"string"==typeof t)&&!is_undefined(t)&&!is_true(t)&&!is_false(t)}function is_function(t){return t instanceof Function||"function"==typeof t}function is_boolean(t){return t instanceof Boolean||"boolean"==typeof t||is_true(t)||is_false(t)}function is_true(t){return t===!0||"true"===t}function is_false(t){return t===!1||"false"===t}function is_percentage(t){return is_string(t)&&"%"==t.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(t,e){debug(!0,t+" is DEPRECATED, support for it will be removed. Use "+e+" instead.")}function debug(t,e){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(t)){var s=" ("+t.selector+")";t=t.debug}else var s="";if(!t)return!1;e=is_string(e)?"carouFredSel"+s+": "+e:["carouFredSel"+s+":",e],window.console.log(e)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(t,e,s){t=go_getObject($tt0,t),t.items=go_getItemsObject($tt0,t.items),t.scroll=go_getScrollObject($tt0,t.scroll),t.auto=go_getAutoObject($tt0,t.auto),t.prev=go_getPrevNextObject($tt0,t.prev),t.next=go_getPrevNextObject($tt0,t.next),t.pagination=go_getPaginationObject($tt0,t.pagination),t.swipe=go_getSwipeObject($tt0,t.swipe),t.mousewheel=go_getMousewheelObject($tt0,t.mousewheel),e&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,t)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,t),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var i=$cfs.children(),o=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,o),opts.items=in_complementItems(opts.items,opts,i,s),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,i),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,i),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(o,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,o)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(i,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(i,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,i,o);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,i),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var t=$cfs.children(),e=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),s="relative";switch(e.position){case"absolute":case"fixed":s=e.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(e),$wrp.css({overflow:"hidden",position:s}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",e.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(t,opts),sz_storeOrigCss(t),opts.responsive&&sz_setResponsiveSizes(opts,t)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(t,e){return t.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),e)),!0}),$cfs.bind(cf_e("finish",conf),function(t){return t.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(t,e,s){if(t.stopPropagation(),tmrs=sc_clearTimers(tmrs),e&&crsl.isScrolling){scrl.isStopped=!0;var i=getTime()-scrl.startTime;scrl.duration-=i,scrl.pre&&(scrl.pre.duration-=i),scrl.post&&(scrl.post.duration-=i),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||s&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var o=opts.auto.timeoutDuration-tmrs.timePassed,n=100-Math.ceil(100*o/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,n,o)}return!0}),$cfs.bind(cf_e("play",conf),function(t,e,s,i){t.stopPropagation(),tmrs=sc_clearTimers(tmrs);var o=[e,s,i],n=["string","number","boolean"],r=cf_sortParams(o,n);if(e=r[0],s=r[1],i=r[2],"prev"!=e&&"next"!=e&&(e=crsl.direction),is_number(s)||(s=0),is_boolean(i)||(i=!1),i&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return t.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var c=opts.auto.timeoutDuration+s;return dur2=c-tmrs.timePassed,perc=100-Math.ceil(100*dur2/c),opts.auto.progress&&(tmrs.progress=setInterval(function(){var t=getTime()-tmrs.startTime+tmrs.timePassed,e=Math.ceil(100*t/c);opts.auto.progress.updater.call(opts.auto.progress.bar[0],e)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),e):$cfs.trigger(cf_e(e,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(t){return t.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(t,e,s,i,o){if(t.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return t.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var n=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(n>itms.total)return t.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+n+" needed): Not scrolling.");var r=[e,s,i,o],c=["object","number/string","function","boolean"],a=cf_sortParams(r,c);e=a[0],s=a[1],i=a[2],o=a[3];var f=t.type.slice(conf.events.prefix.length);if(is_object(e)||(e={}),is_function(i)&&(e.onAfter=i),is_boolean(o)&&(e.queue=o),e=$.extend(!0,{},opts[f],e),e.conditions&&!e.conditions.call($tt0,f))return t.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(s)){if("*"!=opts.items.filter)s="visible";else for(var l=[s,e.items,opts[f].items],a=0,u=l.length;u>a;a++)if(is_number(l[a])||"page"==l[a]||"visible"==l[a]){s=l[a];break}switch(s){case"page":return t.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(f+"Page",conf),[e,i]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(s=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]]),t.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(e.duration>0&&crsl.isScrolling)return e.queue&&("last"==e.queue&&(queu=[]),("first"!=e.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]])),t.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+f,conf),[e,s]),opts.synchronise)for(var p=opts.synchronise,d=[e,s],g=0,u=p.length;u>g;g++){var m=f;p[g][2]||(m="prev"==m?"next":"prev"),p[g][1]||(d[0]=p[g][0].triggerHandler("_cfs_triggerEvent",["configuration",m])),d[1]=s+p[g][3],p[g][0].trigger("_cfs_triggerEvent",["slide_"+m,d])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if(opts.items.visibleConf.variable)s=gn_getVisibleItemsPrev(i,opts,itms.total-1);else if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsPrevFilter(i,opts,itms.total-1,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}if(opts.circular||itms.total-s<itms.first&&(s=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){var n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible+s<=n&&s<itms.total&&(s++,n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=n}else if("*"!=opts.items.filter){var n=gn_getVisibleItemsNextFilter(i,opts,itms.total-s);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items backward."),itms.first+=s;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&e.onEnd&&e.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-s,itms.total).prependTo($cfs),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),r=gi_getOldItemsPrev(i,opts,s),c=gi_getNewItemsPrev(i,opts),a=i.eq(s-1),f=r.last(),l=c.last();sz_resetMargin(i,opts);var u=0,p=0;if(opts.align){var d=cf_getAlignPadding(c,opts);u=d[0],p=d[1]}var g=0>u?opts.padding[opts.d[3]]:0,m=!1,_=$();if(opts.items.visible<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,a=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(c,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z={},j={},N=sc_getDuration(e,opts,s,h);switch(e.fx){case"cover":case"cover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visible),opts,"width")}m&&(opts.items[opts.d.width]=b),sz_resetMargin(i,opts,!0),p>=0&&sz_resetMargin(f,opts,opts.padding[opts.d[1]]),u>=0&&sz_resetMargin(a,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=p,opts.padding[opts.d[3]]=u),z[opts.d.left]=-(h-g),j[opts.d.left]=-(P-g),x[opts.d.left]=w[opts.d.width];var k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){},q=function(){},D=function(){},V=function(){},R=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp)}switch(e.fx){case"crossfade":case"uncover":case"uncover-fade":v.children().slice(0,s).remove(),v.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":v.children().slice(opts.items.visible).remove(),v.css(j)}if($cfs.css(z),scrl=sc_setScroll(N,e.easing,conf),C[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(k=function(){$wrp.css(w)},O=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){switch(l.not(a).length&&(S[opts.d.marginRight]=a.data("_cfs_origCssMargin"),0>u?a.css(S):(H=function(){a.css(S)},q=function(){scrl.anims.push([a,S])})),e.fx){case"cover":case"cover-fade":v.children().eq(s-1).css(S)}l.not(f).length&&(y[opts.d.marginRight]=f.data("_cfs_origCssMargin"),T=function(){f.css(y)},M=function(){scrl.anims.push([f,y])}),p>=0&&(I[opts.d.marginRight]=l.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],F=function(){l.css(I)},A=function(){scrl.anims.push([l,I])})}R=function(){$cfs.css(C)};var E=opts.items.visible+s-itms.total;V=function(){if(E>0&&($cfs.children().slice(itms.total).remove(),r=$($cfs.children().slice(itms.total-(opts.items.visible-E)).get().concat($cfs.children().slice(0,E).get()))),sc_showHiddenItems(m),opts.usePadding){var t=$cfs.children().eq(opts.items.visible+s-1);t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var W=sc_mapCallbackArguments(r,_,c,s,"prev",N,w);switch(D=function(){sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",W,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",W,clbk),e.fx){case"none":$cfs.css(C),k(),T(),F(),H(),R(),V(),D();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){k(),T(),F(),H(),R(),V(),scrl=sc_setScroll(N,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},D]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},D]),O(),T(),F(),H(),R(),V();break;case"cover":scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"uncover":scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;default:scrl.anims.push([$cfs,C,function(){V(),D()}]),O(),M(),A(),q()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0
2
  }),$cfs.bind(cf_e("slide_next",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsNextFilter(i,opts,0,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}var n=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var r=gn_getVisibleItemsNext(i,opts,s),o=gn_getVisibleItemsPrev(i,opts,n-1);else var r=opts.items.visible,o=opts.items.visible;s+r>n&&(s=n-o)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-s>=r&&s<itms.total;)s++,r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=r}else if("*"!=opts.items.filter){var r=gn_getVisibleItemsNextFilter(i,opts,s);opts.items.visible=cf_getItemsAdjust(r,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items forward."),itms.first-=s;itms.first<0;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&e.onEnd&&e.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),c=gi_getOldItemsNext(i,opts),a=gi_getNewItemsNext(i,opts,s),f=i.eq(s-1),l=c.last(),u=a.last();sz_resetMargin(i,opts);var p=0,d=0;if(opts.align){var g=cf_getAlignPadding(a,opts);p=g[0],d=g[1]}var m=!1,_=$();if(opts.items.visibleConf.old<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,f=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(a,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z=sc_getDuration(e,opts,s,h);switch(e.fx){case"uncover":case"uncover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visibleConf.old),opts,"width")}m&&(opts.items[opts.d.width]=b),opts.align&&opts.padding[opts.d[1]]<0&&(opts.padding[opts.d[1]]=0),sz_resetMargin(i,opts,!0),sz_resetMargin(l,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=d,opts.padding[opts.d[3]]=p),I[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var j=function(){},N=function(){},k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp),v.children().slice(opts.items.visibleConf.old).remove()}switch(e.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),v.css("zIndex",0)}if(scrl=sc_setScroll(z,e.easing,conf),C[opts.d.left]=-h,x[opts.d.left]=-P,0>p&&(C[opts.d.left]+=p),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(j=function(){$wrp.css(w)},N=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){var q=u.data("_cfs_origCssMargin");d>=0&&(q+=opts.padding[opts.d[1]]),u.css(opts.d.marginRight,q),f.not(l).length&&(y[opts.d.marginRight]=l.data("_cfs_origCssMargin")),k=function(){l.css(y)},O=function(){scrl.anims.push([l,y])};var D=f.data("_cfs_origCssMargin");p>0&&(D+=opts.padding[opts.d[3]]),S[opts.d.marginRight]=D,T=function(){f.css(S)},M=function(){scrl.anims.push([f,S])}}H=function(){$cfs.css(I)};var V=opts.items.visible+s-itms.total;A=function(){V>0&&$cfs.children().slice(itms.total).remove();var t=$cfs.children().slice(0,s).appendTo($cfs).last();if(V>0&&(a=gi_getCurrentItems(i,opts)),sc_showHiddenItems(m),opts.usePadding){if(itms.total<opts.items.visible+s){var e=$cfs.children().eq(opts.items.visible-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var R=sc_mapCallbackArguments(c,_,a,s,"next",z,w);switch(F=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",R,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",R,clbk),e.fx){case"none":$cfs.css(C),j(),k(),T(),H(),A(),F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){j(),k(),T(),H(),A(),scrl=sc_setScroll(z,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},F]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},F]),N(),k(),T(),H(),A();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"uncover":scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;default:scrl.anims.push([$cfs,C,function(){H(),A(),F()}]),N(),O(),M()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0}),$cfs.bind(cf_e("slideTo",conf),function(t,e,s,i,o,n,r){t.stopPropagation();var c=[e,s,i,o,n,r],a=["string/number/object","number","boolean","object","string","function"],f=cf_sortParams(c,a);return o=f[3],n=f[4],r=f[5],e=gn_getItemIndex(f[0],f[1],f[2],itms,$cfs),0==e?!1:(is_object(o)||(o=!1),"prev"!=n&&"next"!=n&&(n=opts.circular?e<=itms.total/2?"next":"prev":0==itms.first||itms.first>e?"next":"prev"),"prev"==n&&(e=itms.total-e),$cfs.trigger(cf_e(n,conf),[o,e,r]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i-1,e,"prev",s])}),$cfs.bind(cf_e("nextPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i+1,e,"next",s])}),$cfs.bind(cf_e("slideToPage",conf),function(t,e,s,i,o){t.stopPropagation(),is_number(e)||(e=$cfs.triggerHandler(cf_e("currentPage",conf)));var n=opts.pagination.items||opts.items.visible,r=Math.ceil(itms.total/n)-1;return 0>e&&(e=r),e>r&&(e=0),$cfs.triggerHandler(cf_e("slideTo",conf),[e*n,0,!0,s,i,o])}),$cfs.bind(cf_e("jumpToStart",conf),function(t,e){if(t.stopPropagation(),e=e?gn_getItemIndex(e,0,!0,itms,$cfs):0,e+=itms.first,0!=e){if(itms.total>0)for(;e>itms.total;)e-=itms.total;$cfs.prepend($cfs.children().slice(e,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(t,e){if(t.stopPropagation(),e)e=cf_getSynchArr(e);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");e=opts.synchronise}for(var s=$cfs.triggerHandler(cf_e("currentPosition",conf)),i=!0,o=0,n=e.length;n>o;o++)e[o][0].triggerHandler(cf_e("slideTo",conf),[s,e[o][3],!0])||(i=!1);return i}),$cfs.bind(cf_e("queue",conf),function(t,e,s){return t.stopPropagation(),is_function(e)?e.call($tt0,queu):is_array(e)?queu=e:is_undefined(e)||queu.push([e,s]),queu}),$cfs.bind(cf_e("insertItem",conf),function(t,e,s,i,o){t.stopPropagation();var n=[e,s,i,o],r=["string/object","string/number/object","boolean","number"],c=cf_sortParams(n,r);if(e=c[0],s=c[1],i=c[2],o=c[3],is_object(e)&&!is_jquery(e)?e=$(e):is_string(e)&&(e=$(e)),!is_jquery(e)||0==e.length)return debug(conf,"Not a valid object.");is_undefined(s)&&(s="end"),sz_storeMargin(e,opts),sz_storeOrigCss(e);var a=s,f="before";"end"==s?i?(0==itms.first?(s=itms.total-1,f="after"):(s=itms.first,itms.first+=e.length),0>s&&(s=0)):(s=itms.total-1,f="after"):s=gn_getItemIndex(s,o,i,itms,$cfs);var l=$cfs.children().eq(s);return l.length?l[f](e):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(e)),"end"==a||i||s<itms.first&&(itms.first+=e.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(t,e,s,i){t.stopPropagation();var o=[e,s,i],n=["string/number/object","boolean","number"],r=cf_sortParams(o,n);e=r[0],s=r[1],i=r[2];if(e instanceof $&&e.length>1)return c=$(),e.each(function(){var t=$cfs.trigger(cf_e("removeItem",conf),[$(this),s,i]);t&&(c=c.add(t))}),c;if(is_undefined(e)||"end"==e)c=$cfs.children().last();else{e=gn_getItemIndex(e,i,s,itms,$cfs);var c=$cfs.children().eq(e);c.length&&e<itms.first&&(itms.first-=c.length)}return c&&c.length&&(c.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),c}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length);return is_array(e)&&(clbk[s]=e),is_function(e)&&clbk[s].push(e),clbk[s]}),$cfs.bind(cf_e("currentPosition",conf),function(t,e){if(t.stopPropagation(),0==itms.first)var s=0;else var s=itms.total-itms.first;return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentPage",conf),function(t,e){t.stopPropagation();var s,i=opts.pagination.items||opts.items.visible,o=Math.ceil(itms.total/i-1);return s=0==itms.first?0:itms.first<itms.total%i?0:itms.first!=i||opts.circular?Math.round((itms.total-itms.first)/i):o,0>s&&(s=0),s>o&&(s=o),is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentVisible",conf),function(t,e){t.stopPropagation();var s=gi_getCurrentItems($cfs.children(),opts);return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("slice",conf),function(t,e,s,i){if(t.stopPropagation(),0==itms.total)return!1;var o=[e,s,i],n=["number","number","function"],r=cf_sortParams(o,n);if(e=is_number(r[0])?r[0]:0,s=is_number(r[1])?r[1]:itms.total,i=r[2],e+=itms.first,s+=itms.first,items.total>0){for(;e>itms.total;)e-=itms.total;for(;s>itms.total;)s-=itms.total;for(;0>e;)e+=itms.total;for(;0>s;)s+=itms.total}var c,a=$cfs.children();return c=s>e?a.slice(e,s):$(a.slice(e,itms.total).get().concat(a.slice(0,s).get())),is_function(i)&&i.call($tt0,c),c}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length),i=crsl[s];return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(t,e,s){return t.stopPropagation(),is_undefined(e)?e=$("body"):is_string(e)&&(e=$(e)),is_jquery(e)&&0!=e.length?(is_string(s)||(s="a.caroufredsel"),e.find(s).each(function(){var t=this.hash||"";t.length>0&&-1!=$cfs.children().index($(t))&&$(this).unbind("click").click(function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),t)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(t,e){if(t.stopPropagation(),opts.pagination.container){var s=opts.pagination.items||opts.items.visible,i=Math.ceil(itms.total/s);e&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var t=0;i>t;t++){var e=$cfs.children().eq(gn_getItemIndex(t*s,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(t){$(this).bind(opts.pagination.event,function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[t*s,-opts.pagination.deviation,!0,opts.pagination])})})}));var o=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return o>=i&&(o=0),0>o&&(o=i-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(o).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var t=opts.items.visible,e=$cfs.children(),s=ms_getParentSize($wrp,opts,"width");if(itms.total=e.length,crsl.primarySizePercentage?(opts.maxDimension=s,opts[opts.d.width]=ms_getPercentage(s,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,s),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,e,s),t=opts.items.visible,sz_setResponsiveSizes(opts,e)):opts.items.visibleConf.variable?t=gn_getVisibleItemsNext(e,opts,0):"*"!=opts.items.filter&&(t=gn_getVisibleItemsNextFilter(e,opts,0)),!opts.circular&&0!=itms.first&&t>itms.first){if(opts.items.visibleConf.variable)var i=gn_getVisibleItemsPrev(e,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var i=gn_getVisibleItemsPrevFilter(e,opts,itms.first)-itms.first;else var i=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+i+" items backward."),$cfs.trigger(cf_e("prev",conf),i)}opts.items.visible=cf_getItemsAdjust(t,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,e);var o=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,o]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),o}),$cfs.bind(cf_e("destroy",conf),function(t,e){return t.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),e&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(t,e,s){return t.stopPropagation(),$cfs.triggerHandler(cf_e(e,conf),s)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(t){t.preventDefault();var e=!1,s=null;crsl.isPaused?e="play":opts.auto.pauseOnEvent&&(e="pause",s=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),e&&$cfs.trigger(cf_e(e,conf),s)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e==opts.next.key&&(t.preventDefault(),$cfs.trigger(cf_e("next",conf))),e==opts.prev.key&&(t.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e>=49&&58>e&&(e=(e-49)*opts.items.visible,e<=itms.total&&(t.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[e,0,!0,opts.pagination])))}),$.fn.swipe){var e="ontouchstart"in window;if(e&&opts.swipe.onTouch||!e&&opts.swipe.onMouse){var s=$.extend(!0,{},opts.prev,opts.swipe),i=$.extend(!0,{},opts.next,opts.swipe),o=function(){$cfs.trigger(cf_e("prev",conf),[s])},n=function(){$cfs.trigger(cf_e("next",conf),[i])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=n,opts.swipe.options.swipeDown=o;break;default:opts.swipe.options.swipeLeft=n,opts.swipe.options.swipeRight=o}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var r=$.extend(!0,{},opts.prev,opts.mousewheel),c=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(t,e){t.preventDefault(),e>0?$cfs.trigger(cf_e("prev",conf),[r]):$cfs.trigger(cf_e("next",conf),[c])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var a=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},f=$(window),l=null;if($.debounce&&"debounce"==conf.onWindowResize)l=$.debounce(200,a);else if($.throttle&&"throttle"==conf.onWindowResize)l=$.throttle(300,a);else{var u=0,p=0;l=function(){var t=f.width(),e=f.height();(t!=u||e!=p)&&(a(),u=t,p=e)}}f.bind(cf_e("resize",conf,!1,!0,!0),l)}},FN._unbind_buttons=function(){var t=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(t),opts.auto.button&&opts.auto.button.unbind(t),opts.prev.button&&opts.prev.button.unbind(t),opts.next.button&&opts.next.button.unbind(t),opts.pagination.container&&(opts.pagination.container.unbind(t),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,s.length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(t){return'<a href="#"><span>'+t+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(t){$(this).css("width",t+"%")},$.fn.carouFredSel.cookie={get:function(t){t+="=";for(var e=document.cookie.split(";"),s=0,i=e.length;i>s;s++){for(var o=e[s];" "==o.charAt(0);)o=o.slice(1);if(0==o.indexOf(t))return o.slice(t.length)}return 0},set:function(t,e,s){var i="";if(s){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=t+"="+e+i+"; path=/"},remove:function(t){$.fn.carouFredSel.cookie.set(t,"",-1)}},$.extend($.easing,{quadratic:function(t){var e=t*t;return t*(-e*t+4*e-6*t+4)},cubic:function(t){return t*(4*t*t-9*t+6)},elastic:function(t){var e=t*t;return t*(33*e*e-106*e*t+126*e-67*t+15)}}))}(jQuery);
assets/js/ywzm_frontend.js CHANGED
@@ -1,60 +1,60 @@
1
- /**
2
- * frontend.js
3
- *
4
- * @author Your Inspiration Themes
5
- * @package YITH WooCommerce Zoom Magnifier
6
- */
7
- jQuery(document).ready(function ($) {
8
-
9
- var yith_wcmg = $('.images');
10
- var yith_wcmg_zoom = $('.yith_magnifier_zoom');
11
- var yith_wcmg_image = $('.yith_magnifier_zoom img').first();
12
-
13
- var yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href');
14
- var yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
15
-
16
- if (typeof yith_magnifier_options == 'undefined') {
17
- return false;
18
- }
19
-
20
- yith_wcmg.yith_magnifier(yith_magnifier_options);
21
-
22
- $(document).on('found_variation', 'form.variations_form', function (event, variation) {
23
-
24
- var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
25
-
26
- var image_src = yith_wcmg_default_image;
27
- if (ywzm_data.wc_before_3_0) {
28
- if (variation.image_src) {
29
- image_src = variation.image_src;
30
- }
31
- }
32
- else if (variation.image.src) {
33
- image_src = variation.image.src;
34
- }
35
-
36
- yith_wcmg_zoom.attr('href', image_magnifier);
37
- yith_wcmg_image.attr('src', image_src);
38
- yith_wcmg_image.attr('srcset', image_src);
39
- yith_wcmg_image.attr('src-orig', image_src);
40
-
41
- if (yith_wcmg.data('yith_magnifier')) {
42
- yith_wcmg.yith_magnifier('destroy');
43
- }
44
-
45
- yith_wcmg.yith_magnifier(yith_magnifier_options);
46
- }).on('reset_image', function (event) {
47
- yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
48
- yith_wcmg_image.attr('src', yith_wcmg_default_image);
49
- yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
50
- yith_wcmg_image.attr('src-orig', yith_wcmg_default_image);
51
-
52
- if (yith_wcmg.data('yith_magnifier')) {
53
- yith_wcmg.yith_magnifier('destroy');
54
- }
55
-
56
- yith_wcmg.yith_magnifier(yith_magnifier_options);
57
- });
58
-
59
- $('form.variations_form .variations select').trigger('change');
60
  });
1
+ /**
2
+ * frontend.js
3
+ *
4
+ * @author Your Inspiration Themes
5
+ * @package YITH WooCommerce Zoom Magnifier
6
+ */
7
+ jQuery(document).ready(function ($) {
8
+
9
+ var yith_wcmg = $('.images');
10
+ var yith_wcmg_zoom = $('.yith_magnifier_zoom');
11
+ var yith_wcmg_image = $('.yith_magnifier_zoom img').first();
12
+
13
+ var yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href');
14
+ var yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
15
+
16
+ if (typeof yith_magnifier_options == 'undefined') {
17
+ return false;
18
+ }
19
+
20
+ yith_wcmg.yith_magnifier(yith_magnifier_options);
21
+
22
+ $(document).on('found_variation', 'form.variations_form', function (event, variation) {
23
+
24
+ var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
25
+
26
+ var image_src = yith_wcmg_default_image;
27
+ if (ywzm_data.wc_before_3_0) {
28
+ if (variation.image_src) {
29
+ image_src = variation.image_src;
30
+ }
31
+ }
32
+ else if (variation.image.src) {
33
+ image_src = variation.image.src;
34
+ }
35
+
36
+ yith_wcmg_zoom.attr('href', image_magnifier);
37
+ yith_wcmg_image.attr('src', image_src);
38
+ yith_wcmg_image.attr('srcset', image_src);
39
+ yith_wcmg_image.attr('src-orig', image_src);
40
+
41
+ if (yith_wcmg.data('yith_magnifier')) {
42
+ yith_wcmg.yith_magnifier('destroy');
43
+ }
44
+
45
+ yith_wcmg.yith_magnifier(yith_magnifier_options);
46
+ }).on('reset_image', function (event) {
47
+ yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
48
+ yith_wcmg_image.attr('src', yith_wcmg_default_image);
49
+ yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
50
+ yith_wcmg_image.attr('src-orig', yith_wcmg_default_image);
51
+
52
+ if (yith_wcmg.data('yith_magnifier')) {
53
+ yith_wcmg.yith_magnifier('destroy');
54
+ }
55
+
56
+ yith_wcmg.yith_magnifier(yith_magnifier_options);
57
+ });
58
+
59
+ $('form.variations_form .variations select').trigger('change');
60
  });
changelog.txt CHANGED
@@ -1,191 +1,191 @@
1
- === YITH WooCommerce Zoom Magnifier ===
2
-
3
- == Changelog History ==
4
-
5
- = Version 1.2.18 - Released: May 02, 2016 =
6
-
7
- * Updated: plugin compatible with WordPress 4.5
8
- * Updated: plugin author name
9
- * Updated: YITH Plugin Framework
10
-
11
- = Version 1.2.17 - Released: Feb 24, 2016 =
12
-
13
- * Updated: YITH Plugin FW
14
- * Fixed: removed trailing comma in JS script that break the page rendering on old IE browser
15
-
16
- = Version 1.2.16 - Released: Jan 18, 2016 =
17
-
18
- * Updated: YITH Plugin FW loading remove unused YIT constant
19
- * Added: filter yith_ywzm_zoom_wrap_additional_css for customizing CSS class for the wrapping div
20
- * Updated: plugin ready for WooCommerce 2.5
21
-
22
- = Version 1.2.15 - Released: Jan 04, 2016 =
23
-
24
- * Fixed: Cannot redeclare yith_ywzm_install_woocommerce_admin_notice() when the plugin is loaded from YITH Essential Kit
25
-
26
- = Version 1.2.14 - Released: Dec 29, 2015 =
27
-
28
- * Added: Compatibility with YIT WooCommerce Featured Audio & Video Content
29
-
30
- = Version 1.2.13 - Released: Dec 21, 2015 =
31
-
32
- * Fixed: multiple wrap of zoom element with the div with class yith_magnifier_zoom_wrap
33
- * Updated: jquery-ui.css is no more linked as external resource but shipped within the plugin, as wordpress.org asked
34
-
35
- = Version 1.2.12 - Released: Oct 29, 2015 =
36
-
37
- * Updated: YITH plugin framework
38
-
39
- = Version 1.2.11 - Released: Oct 23, 2015 =
40
-
41
- * Updated: compatibility with YITH WooCommerce Quick View.
42
-
43
- = Version 1.2.10 - Released: Sep 24, 2015 =
44
-
45
- * Updated: changed text domain as translate.wordpress.org requisite.
46
-
47
- = Version 1.2.9 - Released: Sep 04, 2015 =
48
-
49
- * Updated: Languages file
50
- * Fixed: Changed plugin text domain from yit to ywmz
51
- * Fixed: featured image shown one time on slider.
52
- * Fixed: div not shown if loading text is empty.
53
-
54
- = Version 1.2.8 - Released: Sep 01, 2015 =
55
-
56
- * Fixed: removed deprecated woocommerce_update_option_X hook.
57
-
58
- = Version 1.2.7 - Released: Aug 27, 2015 =
59
-
60
- * Fixed: resolved XSS vulnerability.
61
-
62
- = Version 1.2.6 - Released: Aug 12, 2015 =
63
-
64
- * Tweak: update YITH Plugin framework.
65
-
66
- = Version 1.2.5 - Released: Jul 23, 2015 =
67
-
68
- * Added: italian language.
69
-
70
- = Version 1.2.4 - Released: Jun 26, 2015 =
71
-
72
- * Added: support to srcset and src-orig attributes.
73
-
74
- = Version 1.2.3 - Released: May 29, 2015 =
75
-
76
- * Added: included jquery-migrate as prerequisite.
77
-
78
- = Version 1.2.2 - Released: May 22, 2015 =
79
-
80
- * Fixed: CSS fix for EssentialGrid conflicts.
81
-
82
- = Version 1.2.1 - Released: May 04, 2015 =
83
-
84
- * Fixed: removed z-index that made the zoom area hiding other elements in certain themes.
85
-
86
- = Version 1.2.0 - Released: Apr 22, 2015 =
87
-
88
- * Fix : security issue (https://make.wordpress.org/plugins/2015/04/20/fixing-add_query_arg-and-remove_query_arg-usage/)
89
- * Tweak : support up to Wordpress 4.2
90
-
91
- = 1.1.8 =
92
-
93
- * Fixed: compatibility with some YITHEMES themes.
94
-
95
- = 1.1.7 =
96
-
97
- * Fixed: Unwanted expand link on product image.
98
-
99
- = 1.1.6 =
100
-
101
- * Added: the plugin can be disabled on mobile devices.
102
-
103
- = 1.1.5 =
104
-
105
- * Fixed: multiple wrap
106
-
107
- = 1.1.4 =
108
-
109
- * Tweak: WooCommerce 2.2. support
110
- * Fixed: Placeholder in product without featured image
111
- * Fixed: Slider items number options doesn't work
112
-
113
- = 1.1.3 =
114
-
115
- * Added: Support to WC 2.2.2
116
- * Updated: Plugin Core Framework
117
-
118
- = 1.1.2 =
119
-
120
- * Restored: Image size options on WC 2.1.x
121
- * Fixed: Items number option on thumb slider
122
- * Fixed: Hard crop issue on WC 2.1.x
123
-
124
- = 1.1.1 =
125
-
126
- * Fixed: Thumbnails slider direction on single product page
127
-
128
- = 1.1.0 =
129
-
130
- * Added: Support to WooCommerce 2.1.x
131
-
132
- = 1.0.8 =
133
-
134
- * Added: ability to change the slider programmatically
135
-
136
- = 1.0.7 =
137
-
138
- * Fixed: zoomed image did not change when select a variation
139
-
140
- = 1.0.6 =
141
-
142
- * Removed white space from frontend.php
143
-
144
- = 1.0.5 =
145
-
146
- * Fixed: magnifier override the plugin for featured video
147
-
148
- = 1.0.4 =
149
-
150
- * Minor bugs fixes
151
-
152
- = 1.0.3 =
153
-
154
- * Added ability to load the plugin even when WooCommerce is installed in a different folder
155
-
156
- = 1.0.2 =
157
-
158
- * Fixed fatal error to yit_debug with yit themes
159
-
160
- = 1.0.1 =
161
-
162
- * Optimized images
163
- * Updated internal framework
164
-
165
- = 1.0.0 =
166
-
167
- * Initial release
168
-
169
- == Suggestions ==
170
-
171
- If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
172
-
173
- == Translators ==
174
-
175
- = Available Languages =
176
- * English (Default)
177
- * Italian
178
- * Spanish
179
-
180
- If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
181
- [use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
182
-
183
- == Documentation ==
184
-
185
- Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
186
-
187
- == Upgrade notice ==
188
-
189
- = 1.0.0 =
190
-
191
  Initial release
1
+ === YITH WooCommerce Zoom Magnifier ===
2
+
3
+ == Changelog History ==
4
+
5
+ = Version 1.2.18 - Released: May 02, 2016 =
6
+
7
+ * Updated: plugin compatible with WordPress 4.5
8
+ * Updated: plugin author name
9
+ * Updated: YITH Plugin Framework
10
+
11
+ = Version 1.2.17 - Released: Feb 24, 2016 =
12
+
13
+ * Updated: YITH Plugin FW
14
+ * Fixed: removed trailing comma in JS script that break the page rendering on old IE browser
15
+
16
+ = Version 1.2.16 - Released: Jan 18, 2016 =
17
+
18
+ * Updated: YITH Plugin FW loading remove unused YIT constant
19
+ * Added: filter yith_ywzm_zoom_wrap_additional_css for customizing CSS class for the wrapping div
20
+ * Updated: plugin ready for WooCommerce 2.5
21
+
22
+ = Version 1.2.15 - Released: Jan 04, 2016 =
23
+
24
+ * Fixed: Cannot redeclare yith_ywzm_install_woocommerce_admin_notice() when the plugin is loaded from YITH Essential Kit
25
+
26
+ = Version 1.2.14 - Released: Dec 29, 2015 =
27
+
28
+ * Added: Compatibility with YIT WooCommerce Featured Audio & Video Content
29
+
30
+ = Version 1.2.13 - Released: Dec 21, 2015 =
31
+
32
+ * Fixed: multiple wrap of zoom element with the div with class yith_magnifier_zoom_wrap
33
+ * Updated: jquery-ui.css is no more linked as external resource but shipped within the plugin, as wordpress.org asked
34
+
35
+ = Version 1.2.12 - Released: Oct 29, 2015 =
36
+
37
+ * Updated: YITH plugin framework
38
+
39
+ = Version 1.2.11 - Released: Oct 23, 2015 =
40
+
41
+ * Updated: compatibility with YITH WooCommerce Quick View.
42
+
43
+ = Version 1.2.10 - Released: Sep 24, 2015 =
44
+
45
+ * Updated: changed text domain as translate.wordpress.org requisite.
46
+
47
+ = Version 1.2.9 - Released: Sep 04, 2015 =
48
+
49
+ * Updated: Languages file
50
+ * Fixed: Changed plugin text domain from yit to ywmz
51
+ * Fixed: featured image shown one time on slider.
52
+ * Fixed: div not shown if loading text is empty.
53
+
54
+ = Version 1.2.8 - Released: Sep 01, 2015 =
55
+
56
+ * Fixed: removed deprecated woocommerce_update_option_X hook.
57
+
58
+ = Version 1.2.7 - Released: Aug 27, 2015 =
59
+
60
+ * Fixed: resolved XSS vulnerability.
61
+
62
+ = Version 1.2.6 - Released: Aug 12, 2015 =
63
+
64
+ * Tweak: update YITH Plugin framework.
65
+
66
+ = Version 1.2.5 - Released: Jul 23, 2015 =
67
+
68
+ * Added: italian language.
69
+
70
+ = Version 1.2.4 - Released: Jun 26, 2015 =
71
+
72
+ * Added: support to srcset and src-orig attributes.
73
+
74
+ = Version 1.2.3 - Released: May 29, 2015 =
75
+
76
+ * Added: included jquery-migrate as prerequisite.
77
+
78
+ = Version 1.2.2 - Released: May 22, 2015 =
79
+
80
+ * Fixed: CSS fix for EssentialGrid conflicts.
81
+
82
+ = Version 1.2.1 - Released: May 04, 2015 =
83
+
84
+ * Fixed: removed z-index that made the zoom area hiding other elements in certain themes.
85
+
86
+ = Version 1.2.0 - Released: Apr 22, 2015 =
87
+
88
+ * Fix : security issue (https://make.wordpress.org/plugins/2015/04/20/fixing-add_query_arg-and-remove_query_arg-usage/)
89
+ * Tweak : support up to Wordpress 4.2
90
+
91
+ = 1.1.8 =
92
+
93
+ * Fixed: compatibility with some YITHEMES themes.
94
+
95
+ = 1.1.7 =
96
+
97
+ * Fixed: Unwanted expand link on product image.
98
+
99
+ = 1.1.6 =
100
+
101
+ * Added: the plugin can be disabled on mobile devices.
102
+
103
+ = 1.1.5 =
104
+
105
+ * Fixed: multiple wrap
106
+
107
+ = 1.1.4 =
108
+
109
+ * Tweak: WooCommerce 2.2. support
110
+ * Fixed: Placeholder in product without featured image
111
+ * Fixed: Slider items number options doesn't work
112
+
113
+ = 1.1.3 =
114
+
115
+ * Added: Support to WC 2.2.2
116
+ * Updated: Plugin Core Framework
117
+
118
+ = 1.1.2 =
119
+
120
+ * Restored: Image size options on WC 2.1.x
121
+ * Fixed: Items number option on thumb slider
122
+ * Fixed: Hard crop issue on WC 2.1.x
123
+
124
+ = 1.1.1 =
125
+
126
+ * Fixed: Thumbnails slider direction on single product page
127
+
128
+ = 1.1.0 =
129
+
130
+ * Added: Support to WooCommerce 2.1.x
131
+
132
+ = 1.0.8 =
133
+
134
+ * Added: ability to change the slider programmatically
135
+
136
+ = 1.0.7 =
137
+
138
+ * Fixed: zoomed image did not change when select a variation
139
+
140
+ = 1.0.6 =
141
+
142
+ * Removed white space from frontend.php
143
+
144
+ = 1.0.5 =
145
+
146
+ * Fixed: magnifier override the plugin for featured video
147
+
148
+ = 1.0.4 =
149
+
150
+ * Minor bugs fixes
151
+
152
+ = 1.0.3 =
153
+
154
+ * Added ability to load the plugin even when WooCommerce is installed in a different folder
155
+
156
+ = 1.0.2 =
157
+
158
+ * Fixed fatal error to yit_debug with yit themes
159
+
160
+ = 1.0.1 =
161
+
162
+ * Optimized images
163
+ * Updated internal framework
164
+
165
+ = 1.0.0 =
166
+
167
+ * Initial release
168
+
169
+ == Suggestions ==
170
+
171
+ If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
172
+
173
+ == Translators ==
174
+
175
+ = Available Languages =
176
+ * English (Default)
177
+ * Italian
178
+ * Spanish
179
+
180
+ If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
181
+ [use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
182
+
183
+ == Documentation ==
184
+
185
+ Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
186
+
187
+ == Upgrade notice ==
188
+
189
+ = 1.0.0 =
190
+
191
  Initial release
class.yith-wcmg-admin.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
- /**
3
- * Admin class
4
- *
5
- * @author Your Inspiration Themes
6
- * @package YITH WooCommerce Zoom Magnifier
7
- * @version 1.1.2
8
- */
9
-
10
- if ( ! defined( 'YITH_WCMG' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
-
14
- if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
15
- /**
16
- * Admin class.
17
- * The class manage all the admin behaviors.
18
- *
19
- * @since 1.0.0
20
- */
21
- class YITH_WCMG_Admin {
22
- /**
23
- * Plugin options
24
- *
25
- * @var array
26
- * @access public
27
- * @since 1.0.0
28
- */
29
- public $options = array();
30
-
31
- /**
32
- * Various links
33
- *
34
- * @var string
35
- * @access public
36
- * @since 1.0.0
37
- */
38
- public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
39
-
40
- /**
41
- * Constructor
42
- *
43
- * @access public
44
- * @since 1.0.0
45
- */
46
- public function __construct( ) {
47
-
48
- //Actions
49
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
50
-
51
- add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
52
-
53
- add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
54
-
55
- add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
56
-
57
- // YITH WCMG Loaded
58
- do_action( 'yith_wcmg_loaded' );
59
- }
60
-
61
- /**
62
- * Add Zoom Image size to Woocommerce -> Catalog
63
- *
64
- * @access public
65
- *
66
- * @param array $settings
67
- *
68
- * @return array
69
- */
70
- public function add_catalog_image_size( $settings ) {
71
- $tmp = $settings[count( $settings ) - 1];
72
- unset( $settings[count( $settings ) - 1] );
73
-
74
- $settings[] = array(
75
- 'name' => __( 'Image Size', 'yith-woocommerce-zoom-magnifier' ),
76
- 'desc' => __( 'The size of the images used within the magnifier box', 'yith-woocommerce-zoom-magnifier' ),
77
- 'id' => 'woocommerce_magnifier_image',
78
- 'css' => '',
79
- 'type' => 'image_width',
80
- 'default' => array(
81
- 'width' => 600,
82
- 'height' => 600,
83
- 'crop' => true
84
- ),
85
- 'std' => array(
86
- 'width' => 600,
87
- 'height' => 600,
88
- 'crop' => true
89
- ),
90
- 'desc_tip' => true
91
- );
92
- $settings[] = $tmp;
93
- return $settings;
94
- }
95
-
96
- /**
97
- * Enqueue admin styles and scripts
98
- *
99
- * @access public
100
- * @return void
101
- * @since 1.0.0
102
- */
103
- public function enqueue_styles_scripts() {
104
- wp_enqueue_script( 'jquery-ui' );
105
- wp_enqueue_script( 'jquery-ui-core' );
106
- wp_enqueue_script( 'jquery-ui-mouse' );
107
- wp_enqueue_script( 'jquery-ui-slider' );
108
-
109
- wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
110
- }
111
- }
112
  }
1
+ <?php
2
+ /**
3
+ * Admin class
4
+ *
5
+ * @author Your Inspiration Themes
6
+ * @package YITH WooCommerce Zoom Magnifier
7
+ * @version 1.1.2
8
+ */
9
+
10
+ if ( ! defined( 'YITH_WCMG' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
15
+ /**
16
+ * Admin class.
17
+ * The class manage all the admin behaviors.
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class YITH_WCMG_Admin {
22
+ /**
23
+ * Plugin options
24
+ *
25
+ * @var array
26
+ * @access public
27
+ * @since 1.0.0
28
+ */
29
+ public $options = array();
30
+
31
+ /**
32
+ * Various links
33
+ *
34
+ * @var string
35
+ * @access public
36
+ * @since 1.0.0
37
+ */
38
+ public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
39
+
40
+ /**
41
+ * Constructor
42
+ *
43
+ * @access public
44
+ * @since 1.0.0
45
+ */
46
+ public function __construct( ) {
47
+
48
+ //Actions
49
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
50
+
51
+ add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
52
+
53
+ add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
54
+
55
+ add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
56
+
57
+ // YITH WCMG Loaded
58
+ do_action( 'yith_wcmg_loaded' );
59
+ }
60
+
61
+ /**
62
+ * Add Zoom Image size to Woocommerce -> Catalog
63
+ *
64
+ * @access public
65
+ *
66
+ * @param array $settings
67
+ *
68
+ * @return array
69
+ */
70
+ public function add_catalog_image_size( $settings ) {
71
+ $tmp = $settings[count( $settings ) - 1];
72
+ unset( $settings[count( $settings ) - 1] );
73
+
74
+ $settings[] = array(
75
+ 'name' => __( 'Image Size', 'yith-woocommerce-zoom-magnifier' ),
76
+ 'desc' => __( 'The size of the images used within the magnifier box', 'yith-woocommerce-zoom-magnifier' ),
77
+ 'id' => 'woocommerce_magnifier_image',
78
+ 'css' => '',
79
+ 'type' => 'image_width',
80
+ 'default' => array(
81
+ 'width' => 600,
82
+ 'height' => 600,
83
+ 'crop' => true
84
+ ),
85
+ 'std' => array(
86
+ 'width' => 600,
87
+ 'height' => 600,
88
+ 'crop' => true
89
+ ),
90
+ 'desc_tip' => true
91
+ );
92
+ $settings[] = $tmp;
93
+ return $settings;
94
+ }
95
+
96
+ /**
97
+ * Enqueue admin styles and scripts
98
+ *
99
+ * @access public
100
+ * @return void
101
+ * @since 1.0.0
102
+ */
103
+ public function enqueue_styles_scripts() {
104
+ wp_enqueue_script( 'jquery-ui' );
105
+ wp_enqueue_script( 'jquery-ui-core' );
106
+ wp_enqueue_script( 'jquery-ui-mouse' );
107
+ wp_enqueue_script( 'jquery-ui-slider' );
108
+
109
+ wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
110
+ }
111
+ }
112
  }
class.yith-wcmg-frontend.php CHANGED
@@ -1,173 +1,173 @@
1
- <?php
2
- /**
3
- * Frontend class
4
- *
5
- * @author Your Inspiration Themes
6
- * @package YITH WooCommerce Zoom Magnifier
7
- * @version 1.1.2
8
- */
9
-
10
- if ( ! defined ( 'YITH_WCMG' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
-
14
- if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
15
- /**
16
- * Admin class.
17
- * The class manage all the Frontend behaviors.
18
- *
19
- * @since 1.0.0
20
- */
21
- class YITH_WCMG_Frontend {
22
-
23
-
24
- /**
25
- * Constructor
26
- *
27
- * @access public
28
- * @since 1.0.0
29
- */
30
- public function __construct() {
31
-
32
- // add the action only when the loop is initializate
33
- add_action ( 'template_redirect', array( $this, 'render' ) );
34
-
35
- }
36
-
37
- public function render() {
38
- if ( yith_wcmg_is_enabled () && ! apply_filters ( 'yith_wczm_featured_video_enabled', false ) ) {
39
- //change the templates
40
- remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
41
- remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
42
- add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
43
- add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
44
-
45
- //custom styles and javascripts
46
- add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
47
-
48
- //add attributes to product variations
49
- add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
50
- }
51
- }
52
-
53
-
54
- /**
55
- * Change product-single.php template
56
- *
57
- * @access public
58
- * @return void
59
- * @since 1.0.0
60
- */
61
- public function show_product_images() {
62
-
63
- /** FIX WOO 2.1 */
64
- $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
65
- $wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
66
- }
67
-
68
-
69
- /**
70
- * Change product-thumbnails.php template
71
- *
72
- * @access public
73
- * @return void
74
- * @since 1.0.0
75
- */
76
- public function show_product_thumbnails() {
77
-
78
- /** FIX WOO 2.1 */
79
- $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
80
-
81
- $wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
82
- }
83
-
84
-
85
- /**
86
- * Enqueue styles and scripts
87
- *
88
- * @access public
89
- * @return void
90
- * @since 1.0.0
91
- */
92
- public function enqueue_styles_scripts() {
93
- global $post;
94
-
95
- $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
96
-
97
- wp_register_script ( 'ywzm-magnifier-slider',
98
- YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
99
- array(
100
- 'jquery',
101
- 'jquery-migrate',
102
- ),
103
- '6.2.1',
104
- true );
105
-
106
- wp_register_script ( 'ywzm-magnifier',
107
- YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
108
- array( 'jquery' ),
109
- YITH_YWZM_VERSION,
110
- true );
111
-
112
- wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
113
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
114
- ) ) );
115
-
116
- wp_register_script ( 'ywzm_frontend',
117
- YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
118
- array(
119
- 'jquery',
120
- 'ywzm-magnifier',
121
- ),
122
- YITH_YWZM_VERSION,
123
- true );
124
-
125
- wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
126
-
127
- if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
128
-
129
- wp_localize_script ( 'ywzm_frontend',
130
- 'ywzm_data', array(
131
- 'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
132
- )
133
- );
134
-
135
- // Enqueue PrettyPhoto style and script
136
- $wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
137
-
138
- // Enqueue scripts
139
- wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
140
- wp_enqueue_script ( 'ywzm-magnifier-slider' );
141
- wp_enqueue_script ( 'ywzm-magnifier' );
142
- wp_enqueue_script ( 'ywzm_frontend' );
143
-
144
- // Enqueue Style
145
- $css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
146
- wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
147
- wp_enqueue_style ( 'ywzm-magnifier' );
148
- wp_enqueue_style ( 'ywzm_frontend', $css );
149
- }
150
- }
151
-
152
-
153
- /**
154
- * Add attributes to product variations
155
- *
156
- * @param array $data
157
- * @param WC_Product_Variable $wc_prod
158
- * @param WC_Product_Variation $variation
159
- *
160
- * @return mixed
161
- */
162
- public function available_variation( $data, $wc_prod, $variation ) {
163
-
164
- $attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
165
- $attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
166
-
167
- $data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
168
-
169
- return $data;
170
- }
171
-
172
- }
173
- }
1
+ <?php
2
+ /**
3
+ * Frontend class
4
+ *
5
+ * @author Your Inspiration Themes
6
+ * @package YITH WooCommerce Zoom Magnifier
7
+ * @version 1.1.2
8
+ */
9
+
10
+ if ( ! defined ( 'YITH_WCMG' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
15
+ /**
16
+ * Admin class.
17
+ * The class manage all the Frontend behaviors.
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class YITH_WCMG_Frontend {
22
+
23
+
24
+ /**
25
+ * Constructor
26
+ *
27
+ * @access public
28
+ * @since 1.0.0
29
+ */
30
+ public function __construct() {
31
+
32
+ // add the action only when the loop is initializate
33
+ add_action ( 'template_redirect', array( $this, 'render' ) );
34
+
35
+ }
36
+
37
+ public function render() {
38
+ if ( yith_wcmg_is_enabled () && ! apply_filters ( 'yith_wczm_featured_video_enabled', false ) ) {
39
+ //change the templates
40
+ remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
41
+ remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
42
+ add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
43
+ add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
44
+
45
+ //custom styles and javascripts
46
+ add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
47
+
48
+ //add attributes to product variations
49
+ add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
50
+ }
51
+ }
52
+
53
+
54
+ /**
55
+ * Change product-single.php template
56
+ *
57
+ * @access public
58
+ * @return void
59
+ * @since 1.0.0
60
+ */
61
+ public function show_product_images() {
62
+
63
+ /** FIX WOO 2.1 */
64
+ $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
65
+ $wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
66
+ }
67
+
68
+
69
+ /**
70
+ * Change product-thumbnails.php template
71
+ *
72
+ * @access public
73
+ * @return void
74
+ * @since 1.0.0
75
+ */
76
+ public function show_product_thumbnails() {
77
+
78
+ /** FIX WOO 2.1 */
79
+ $wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
80
+
81
+ $wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
82
+ }
83
+
84
+
85
+ /**
86
+ * Enqueue styles and scripts
87
+ *
88
+ * @access public
89
+ * @return void
90
+ * @since 1.0.0
91
+ */
92
+ public function enqueue_styles_scripts() {
93
+ global $post;
94
+
95
+ $suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
96
+
97
+ wp_register_script ( 'ywzm-magnifier-slider',
98
+ YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
99
+ array(
100
+ 'jquery',
101
+ 'jquery-migrate',
102
+ ),
103
+ '6.2.1',
104
+ true );
105
+
106
+ wp_register_script ( 'ywzm-magnifier',
107
+ YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
108
+ array( 'jquery' ),
109
+ YITH_YWZM_VERSION,
110
+ true );
111
+
112
+ wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
113
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
114
+ ) ) );
115
+
116
+ wp_register_script ( 'ywzm_frontend',
117
+ YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
118
+ array(
119
+ 'jquery',
120
+ 'ywzm-magnifier',
121
+ ),
122
+ YITH_YWZM_VERSION,
123
+ true );
124
+
125
+ wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
126
+
127
+ if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
128
+
129
+ wp_localize_script ( 'ywzm_frontend',
130
+ 'ywzm_data', array(
131
+ 'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
132
+ )
133
+ );
134
+
135
+ // Enqueue PrettyPhoto style and script
136
+ $wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
137
+
138
+ // Enqueue scripts
139
+ wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
140
+ wp_enqueue_script ( 'ywzm-magnifier-slider' );
141
+ wp_enqueue_script ( 'ywzm-magnifier' );
142
+ wp_enqueue_script ( 'ywzm_frontend' );
143
+
144
+ // Enqueue Style
145
+ $css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
146
+ wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
147
+ wp_enqueue_style ( 'ywzm-magnifier' );
148
+ wp_enqueue_style ( 'ywzm_frontend', $css );
149
+ }
150
+ }
151
+
152
+
153
+ /**
154
+ * Add attributes to product variations
155
+ *
156
+ * @param array $data
157
+ * @param WC_Product_Variable $wc_prod
158
+ * @param WC_Product_Variation $variation
159
+ *
160
+ * @return mixed
161
+ */
162
+ public function available_variation( $data, $wc_prod, $variation ) {
163
+
164
+ $attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
165
+ $attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
166
+
167
+ $data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
168
+
169
+ return $data;
170
+ }
171
+
172
+ }
173
+ }
functions.yith-wcmg.php CHANGED
@@ -1,78 +1,78 @@
1
- <?php
2
- /**
3
- * Functions
4
- *
5
- * @author Your Inspiration Themes
6
- * @package YITH WooCommerce Zoom Magnifier
7
- * @version 1.1.2
8
- */
9
-
10
- if ( ! defined ( 'YITH_WCMG' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
-
14
- if ( ! function_exists ( 'yith_wcmg_is_enabled' ) ) {
15
- /**
16
- * Check if the plugin is enabled for the current context
17
- *
18
- * @return bool
19
- * @since 1.0.0
20
- */
21
- function yith_wcmg_is_enabled () {
22
- if ( wp_is_mobile () ) {
23
- return ( 'yes' == get_option ( 'yith_wcmg_enable_mobile' ) );
24
- }
25
-
26
- return get_option ( 'yith_wcmg_enable_plugin' ) == 'yes';
27
- }
28
- }
29
-
30
- if ( ! function_exists ( 'yit_shop_single_w' ) ) {
31
- /**
32
- * Return the shop_single image width
33
- *
34
- * @return integer
35
- * @since 1.0.0
36
- */
37
- function yit_shop_single_w () {
38
- $size = yit_get_image_size ( 'shop_single' );
39
-
40
- return $size[ 'width' ];
41
- }
42
- }
43
-
44
- if ( ! function_exists ( 'yit_shop_thumbnail_w' ) ) {
45
- /**
46
- * Return the shop_thumbnail image width
47
- *
48
- * @return integer
49
- * @since 1.0.0
50
- */
51
- function yit_shop_thumbnail_w () {
52
- $size = yit_get_image_size ( 'shop_thumbnail' );
53
-
54
- return $size[ 'width' ];
55
- }
56
- }
57
-
58
- /* FIX TO WOOCOMMERCE 2.1 */
59
- if ( ! function_exists ( 'yit_get_image_size' ) ) {
60
- /**
61
- * Get default image size
62
- *
63
- * @param array $size current size
64
- *
65
- * @return array
66
- * @author Lorenzo Giuffrida
67
- * @since 1.0.0
68
- */
69
- function yit_get_image_size ( $size ) {
70
- if ( function_exists ( 'wc_get_image_size' ) ) {
71
- return wc_get_image_size ( $size );
72
- } else {
73
- global $woocommerce;
74
-
75
- return $woocommerce->get_image_size ( $size );
76
- }
77
- }
78
- }
1
+ <?php
2
+ /**
3
+ * Functions
4
+ *
5
+ * @author Your Inspiration Themes
6
+ * @package YITH WooCommerce Zoom Magnifier
7
+ * @version 1.1.2
8
+ */
9
+
10
+ if ( ! defined ( 'YITH_WCMG' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+ if ( ! function_exists ( 'yith_wcmg_is_enabled' ) ) {
15
+ /**
16
+ * Check if the plugin is enabled for the current context
17
+ *
18
+ * @return bool
19
+ * @since 1.0.0
20
+ */
21
+ function yith_wcmg_is_enabled () {
22
+ if ( wp_is_mobile () ) {
23
+ return ( 'yes' == get_option ( 'yith_wcmg_enable_mobile' ) );
24
+ }
25
+
26
+ return get_option ( 'yith_wcmg_enable_plugin' ) == 'yes';
27
+ }
28
+ }
29
+
30
+ if ( ! function_exists ( 'yit_shop_single_w' ) ) {
31
+ /**
32
+ * Return the shop_single image width
33
+ *
34
+ * @return integer
35
+ * @since 1.0.0
36
+ */
37
+ function yit_shop_single_w () {
38
+ $size = yit_get_image_size ( 'shop_single' );
39
+
40
+ return $size[ 'width' ];
41
+ }
42
+ }
43
+
44
+ if ( ! function_exists ( 'yit_shop_thumbnail_w' ) ) {
45
+ /**
46
+ * Return the shop_thumbnail image width
47
+ *
48
+ * @return integer
49
+ * @since 1.0.0
50
+ */
51
+ function yit_shop_thumbnail_w () {
52
+ $size = yit_get_image_size ( 'shop_thumbnail' );
53
+
54
+ return $size[ 'width' ];
55
+ }
56
+ }
57
+
58
+ /* FIX TO WOOCOMMERCE 2.1 */
59
+ if ( ! function_exists ( 'yit_get_image_size' ) ) {
60
+ /**
61
+ * Get default image size
62
+ *
63
+ * @param array $size current size
64
+ *
65
+ * @return array
66
+ * @author Lorenzo Giuffrida
67
+ * @since 1.0.0
68
+ */
69
+ function yit_get_image_size ( $size ) {
70
+ if ( function_exists ( 'wc_get_image_size' ) ) {
71
+ return wc_get_image_size ( $size );
72
+ } else {
73
+ global $woocommerce;
74
+
75
+ return $woocommerce->get_image_size ( $size );
76
+ }
77
+ }
78
+ }
init.php CHANGED
@@ -1,164 +1,164 @@
1
- <?php
2
- /**
3
- * Plugin Name: YITH WooCommerce Zoom Magnifier
4
- * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
- * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.3.7
7
- * Author: YITH
8
- * Author URI: https://yithemes.com/
9
- * Text Domain: yith-woocommerce-zoom-magnifier
10
- * Domain Path: /languages/
11
- * WC requires at least: 3.3.0
12
- * WC tested up to: 3.5.x
13
- **/
14
-
15
- /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
16
-
17
- This program is free software; you can redistribute it and/or modify
18
- it under the terms of the GNU General Public License, version 2, as
19
- published by the Free Software Foundation.
20
-
21
- This program is distributed in the hope that it will be useful,
22
- but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
- GNU General Public License for more details.
25
-
26
- You should have received a copy of the GNU General Public License
27
- along with this program; if not, write to the Free Software
28
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
- */
30
-
31
- if ( ! defined ( 'ABSPATH' ) ) {
32
- exit;
33
- } // Exit if accessed directly
34
-
35
- if ( ! function_exists( 'is_plugin_active' ) ) {
36
- if ( ! function_exists( 'get_plugin_data' ) ) {
37
- require_once(ABSPATH . 'wp-admin/includes/plugin.php');
38
- }
39
- }
40
-
41
- if ( ! function_exists ( 'yith_ywzm_install_woocommerce_admin_notice' ) ) {
42
- /**
43
- * WooCommerce is not enabled, the plugin will not be effective
44
- *
45
- * @author Lorenzo Giuffrida
46
- * @since 1.0.0
47
- */
48
- function yith_ywzm_install_woocommerce_admin_notice () {
49
- ?>
50
- <div class="error">
51
- <p><?php _e ( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
52
- </div>
53
- <?php
54
- }
55
- }
56
-
57
- if ( ! function_exists ( 'yith_ywzm_install_free_admin_notice' ) ) {
58
- /**
59
- * Unable to activate the free version while the premium version is active
60
- *
61
- * @author Lorenzo Giuffrida
62
- * @since 1.0.0
63
- */
64
- function yith_ywzm_install_free_admin_notice () {
65
- ?>
66
- <div class="error">
67
- <p><?php _e ( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
68
- </div>
69
- <?php
70
- }
71
- }
72
-
73
- if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
74
- require_once 'plugin-fw/yit-plugin-registration-hook.php';
75
- }
76
-
77
- register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
78
-
79
- defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
- defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
- defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.7' );
82
- defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
83
- defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
84
- defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
85
- defined ( 'YITH_YWZM_ASSETS_URL' ) || define ( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
86
- defined ( 'YITH_YWZM_TEMPLATE_DIR' ) || define ( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
87
- defined ( 'YITH_YWZM_ASSETS_IMAGES_URL' ) || define ( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
88
- defined ( 'YITH_YWZM_LIB_DIR' ) || define ( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
89
-
90
- /* Plugin Framework Version Check */
91
- if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) && file_exists ( YITH_YWZM_DIR . 'plugin-fw/init.php' ) ) {
92
- require_once ( YITH_YWZM_DIR . 'plugin-fw/init.php' );
93
- }
94
- yit_maybe_plugin_fw_loader ( YITH_YWZM_DIR );
95
-
96
- if ( ! function_exists ( 'yith_ywzm_init' ) ) {
97
- /**
98
- * Init the plugin
99
- *
100
- * @author Lorenzo Giuffrida
101
- * @since 1.0.0
102
- */
103
- function yith_ywzm_init () {
104
-
105
- /**
106
- * Load text domain and start plugin
107
- */
108
- load_plugin_textdomain ( 'yith-woocommerce-zoom-magnifier', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' );
109
-
110
- add_option ( 'yith_wcmg_slider_direction', apply_filters ( 'yith_wcmg_slider_direction', 'left' ) );
111
-
112
- define ( 'YITH_WCMG', true );
113
- define ( 'YITH_WCMG_URL', plugin_dir_url ( __FILE__ ) );
114
-
115
- // Load required classes and functions
116
- require_once ( 'functions.yith-wcmg.php' );
117
- require_once ( 'class.yith-wcmg-admin.php' );
118
- require_once ( 'class.yith-wcmg-frontend.php' );
119
-
120
- require_once ( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
121
- require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
122
- require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
123
-
124
- YITH_YWZM_Plugin_FW_Loader::get_instance ();
125
-
126
- // Let's start the game!
127
- global $yith_wcmg;
128
-
129
- $yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
130
- }
131
- }
132
- add_action ( 'yith_ywzm_init', 'yith_ywzm_init' );
133
-
134
- if ( ! function_exists ( 'yith_ywzm_install' ) ) {
135
- /**
136
- * install the plugin
137
- *
138
- * @author Lorenzo Giuffrida
139
- * @since 1.0.0
140
- */
141
- function yith_ywzm_install () {
142
-
143
- if ( ! function_exists ( 'WC' ) ) {
144
- add_action ( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
145
- } elseif ( defined ( 'YITH_YWZM_PREMIUM' ) ) {
146
- add_action ( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
147
- deactivate_plugins ( plugin_basename ( __FILE__ ) );
148
- } else {
149
- do_action ( 'yith_ywzm_init' );
150
- }
151
-
152
- }
153
- }
154
-
155
- add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
156
-
157
- /*add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', 'test', 10 );
158
-
159
- add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', 'test', 10 );
160
-
161
- function test(){
162
-
163
- error_log( 'testing -> ' . print_r( 'test yeaaaaaaaah', true ) );
164
  }*/
1
+ <?php
2
+ /**
3
+ * Plugin Name: YITH WooCommerce Zoom Magnifier
4
+ * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
5
+ * Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.3.8
7
+ * Author: YITH
8
+ * Author URI: https://yithemes.com/
9
+ * Text Domain: yith-woocommerce-zoom-magnifier
10
+ * Domain Path: /languages/
11
+ * WC requires at least: 3.3.0
12
+ * WC tested up to: 3.5.x
13
+ **/
14
+
15
+ /* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
16
+
17
+ This program is free software; you can redistribute it and/or modify
18
+ it under the terms of the GNU General Public License, version 2, as
19
+ published by the Free Software Foundation.
20
+
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
+
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program; if not, write to the Free Software
28
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
+ */
30
+
31
+ if ( ! defined ( 'ABSPATH' ) ) {
32
+ exit;
33
+ } // Exit if accessed directly
34
+
35
+ if ( ! function_exists( 'is_plugin_active' ) ) {
36
+ if ( ! function_exists( 'get_plugin_data' ) ) {
37
+ require_once(ABSPATH . 'wp-admin/includes/plugin.php');
38
+ }
39
+ }
40
+
41
+ if ( ! function_exists ( 'yith_ywzm_install_woocommerce_admin_notice' ) ) {
42
+ /**
43
+ * WooCommerce is not enabled, the plugin will not be effective
44
+ *
45
+ * @author Lorenzo Giuffrida
46
+ * @since 1.0.0
47
+ */
48
+ function yith_ywzm_install_woocommerce_admin_notice () {
49
+ ?>
50
+ <div class="error">
51
+ <p><?php _e ( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
52
+ </div>
53
+ <?php
54
+ }
55
+ }
56
+
57
+ if ( ! function_exists ( 'yith_ywzm_install_free_admin_notice' ) ) {
58
+ /**
59
+ * Unable to activate the free version while the premium version is active
60
+ *
61
+ * @author Lorenzo Giuffrida
62
+ * @since 1.0.0
63
+ */
64
+ function yith_ywzm_install_free_admin_notice () {
65
+ ?>
66
+ <div class="error">
67
+ <p><?php _e ( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
68
+ </div>
69
+ <?php
70
+ }
71
+ }
72
+
73
+ if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
74
+ require_once 'plugin-fw/yit-plugin-registration-hook.php';
75
+ }
76
+
77
+ register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
78
+
79
+ defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
80
+ defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
81
+ defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.8' );
82
+ defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
83
+ defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
84
+ defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
85
+ defined ( 'YITH_YWZM_ASSETS_URL' ) || define ( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
86
+ defined ( 'YITH_YWZM_TEMPLATE_DIR' ) || define ( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
87
+ defined ( 'YITH_YWZM_ASSETS_IMAGES_URL' ) || define ( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
88
+ defined ( 'YITH_YWZM_LIB_DIR' ) || define ( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
89
+
90
+ /* Plugin Framework Version Check */
91
+ if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) && file_exists ( YITH_YWZM_DIR . 'plugin-fw/init.php' ) ) {
92
+ require_once ( YITH_YWZM_DIR . 'plugin-fw/init.php' );
93
+ }
94
+ yit_maybe_plugin_fw_loader ( YITH_YWZM_DIR );
95
+
96
+ if ( ! function_exists ( 'yith_ywzm_init' ) ) {
97
+ /**
98
+ * Init the plugin
99
+ *
100
+ * @author Lorenzo Giuffrida
101
+ * @since 1.0.0
102
+ */
103
+ function yith_ywzm_init () {
104
+
105
+ /**
106
+ * Load text domain and start plugin
107
+ */
108
+ load_plugin_textdomain ( 'yith-woocommerce-zoom-magnifier', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' );
109
+
110
+ add_option ( 'yith_wcmg_slider_direction', apply_filters ( 'yith_wcmg_slider_direction', 'left' ) );
111
+
112
+ define ( 'YITH_WCMG', true );
113
+ define ( 'YITH_WCMG_URL', plugin_dir_url ( __FILE__ ) );
114
+
115
+ // Load required classes and functions
116
+ require_once ( 'functions.yith-wcmg.php' );
117
+ require_once ( 'class.yith-wcmg-admin.php' );
118
+ require_once ( 'class.yith-wcmg-frontend.php' );
119
+
120
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
121
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
122
+ require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
123
+
124
+ YITH_YWZM_Plugin_FW_Loader::get_instance ();
125
+
126
+ // Let's start the game!
127
+ global $yith_wcmg;
128
+
129
+ $yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
130
+ }
131
+ }
132
+ add_action ( 'yith_ywzm_init', 'yith_ywzm_init' );
133
+
134
+ if ( ! function_exists ( 'yith_ywzm_install' ) ) {
135
+ /**
136
+ * install the plugin
137
+ *
138
+ * @author Lorenzo Giuffrida
139
+ * @since 1.0.0
140
+ */
141
+ function yith_ywzm_install () {
142
+
143
+ if ( ! function_exists ( 'WC' ) ) {
144
+ add_action ( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
145
+ } elseif ( defined ( 'YITH_YWZM_PREMIUM' ) ) {
146
+ add_action ( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
147
+ deactivate_plugins ( plugin_basename ( __FILE__ ) );
148
+ } else {
149
+ do_action ( 'yith_ywzm_init' );
150
+ }
151
+
152
+ }
153
+ }
154
+
155
+ add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
156
+
157
+ /*add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', 'test', 10 );
158
+
159
+ add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', 'test', 10 );
160
+
161
+ function test(){
162
+
163
+ error_log( 'testing -> ' . print_r( 'test yeaaaaaaaah', true ) );
164
  }*/
languages/yith-woocommerce-zoom-magnifier-es_ES.po CHANGED
@@ -1,489 +1,489 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: YITH WooCommerce Order Tracking\n"
4
- "POT-Creation-Date: 2016-06-13 16:57+0200\n"
5
- "PO-Revision-Date: 2016-06-13 16:57+0200\n"
6
- "Last-Translator: \n"
7
- "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
- "Language: es_ES\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.4\n"
13
- "X-Poedit-Basepath: ..\n"
14
- "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
- "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
-
21
- #: class.yith-wcmg-admin.php:81
22
- msgid "Image Size"
23
- msgstr "Tamaño de la imagen"
24
-
25
- #: class.yith-wcmg-admin.php:82 plugin-options/general-options.php:17
26
- msgid "The size of the images used within the magnifier box"
27
- msgstr "El tamaño de las imágenes usadas dentro de la caja de zoom"
28
-
29
- #: init.php:50
30
- msgid ""
31
- "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
32
- "WooCommerce in order to work."
33
- msgstr ""
34
- "YITH WooCommerce Zoom Magnifier está habilitado pero no es efectivo. "
35
- "Requiere WooCommerce para funcionar."
36
-
37
- #: init.php:66
38
- msgid ""
39
- "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
40
- "you are using the premium one."
41
- msgstr ""
42
-
43
- #: lib/class.yith-ywzm-custom-types.php:159
44
- msgid "Do you want to hard crop the image?"
45
- msgstr "¿Quieres recortar la imagen?"
46
-
47
- #: lib/class.yith-ywzm-plugin-fw-loader.php:124
48
- msgid "General"
49
- msgstr "General"
50
-
51
- #: lib/class.yith-ywzm-plugin-fw-loader.php:127
52
- #: lib/class.yith-ywzm-plugin-fw-loader.php:191
53
- msgid "Premium Version"
54
- msgstr "Versión Premium"
55
-
56
- #: lib/class.yith-ywzm-plugin-fw-loader.php:129
57
- msgid "Product exclusion list"
58
- msgstr ""
59
-
60
- #: lib/class.yith-ywzm-plugin-fw-loader.php:188
61
- msgid "Settings"
62
- msgstr "Ajustes"
63
-
64
- #: lib/class.yith-ywzm-plugin-fw-loader.php:216
65
- msgid "Plugin Documentation"
66
- msgstr "Documentación del Plugin"
67
-
68
- #: lib/class.yith-ywzm-plugin-fw-loader.php:229
69
- msgid ""
70
- "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
71
- "version with many new options, discover it now."
72
- msgstr ""
73
- "YITH WooCommerce Zoom Magnifier está disponible en una espectacular versión "
74
- "PREMIUM con muchas nuevas opciones, descúbrela ahora."
75
-
76
- #: lib/class.yith-ywzm-plugin-fw-loader.php:230
77
- msgid "Premium version"
78
- msgstr "Versión Pemium"
79
-
80
- #: lib/class.yith-ywzm-plugin-fw-loader.php:237
81
- #: plugin-options/general-options.php:217
82
- msgid "YITH WooCommerce Zoom Magnifier"
83
- msgstr "YITH WooCommerce Zoom Magnifier"
84
-
85
- #: lib/class.yith-ywzm-plugin-fw-loader.php:238
86
- msgid ""
87
- "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
88
- "<br> From this menu you can access all settings of the YITH plugins "
89
- "activated."
90
- msgstr ""
91
- "En la pestaña YITH Plugins puedes encontrar opciones de YITH WooCommerce "
92
- "Zoom Magnifier. <br> Desde este menú puedes acceder a todos los ajustes de "
93
- "los plugin YITH activados."
94
-
95
- #: plugin-options/general-options.php:16
96
- msgid "Image size"
97
- msgstr "Tamaño de imagen"
98
-
99
- #: plugin-options/general-options.php:36
100
- msgid "General Settings"
101
- msgstr "Ajustes Generales"
102
-
103
- #: plugin-options/general-options.php:42
104
- msgid "Activate YITH WooCommerce Zoom Magnifier"
105
- msgstr "Activar YITH WooCommerce Zoom Magnifier"
106
-
107
- #: plugin-options/general-options.php:43
108
- msgid "Activate the plugin or use the WooCommerce default product image."
109
- msgstr ""
110
- "Activar el plugin o usar la imagen de producto por defecto de WooComerce."
111
-
112
- #: plugin-options/general-options.php:50
113
- msgid "Activate on mobile device"
114
- msgstr "Activar en dispositivos móviles"
115
-
116
- #: plugin-options/general-options.php:51
117
- msgid ""
118
- "Set if zoom and slider functionalities should be shown also on mobile "
119
- "devices."
120
- msgstr ""
121
- "Establecer si las funcionalidades del zoom y el deslizador deberían "
122
- "mostrarse también en dispositivos móviles."
123
-
124
- #: plugin-options/general-options.php:59
125
- msgid "Forced Image Size"
126
- msgstr "Tamaño de imagen obligatiorio"
127
-
128
- #: plugin-options/general-options.php:60
129
- msgid ""
130
- "If disabled, you will able to customize the sizes of the zoomed images. "
131
- "Disable it at your own risk; the magnifier could not properly work with "
132
- "images out of proportion."
133
- msgstr ""
134
- "Si está deshabilitado, podrás personalizar los tamaños de las imágenes "
135
- "aumentadas. Desactívalo bajo tu propio riesgo, la lupa no funciona "
136
- "correctamente con imágenes desproporcionadas."
137
-
138
- #: plugin-options/general-options.php:74
139
- msgid "Magnifier Settings"
140
- msgstr "Ajustes del xoom"
141
-
142
- #: plugin-options/general-options.php:80
143
- msgid "Zoom Box Width"
144
- msgstr "Ancho del cuadro de zoom"
145
-
146
- #: plugin-options/general-options.php:81
147
- msgid "The width of the magnifier box (default: auto)"
148
- msgstr "El ancho del cuadro de zoom (por defecto: auto)"
149
-
150
- #: plugin-options/general-options.php:88
151
- msgid "Zoom Box Height"
152
- msgstr "Altura del cuadro de zoom"
153
-
154
- #: plugin-options/general-options.php:89
155
- msgid "The height of the magnifier box (default: auto)"
156
- msgstr "La altura del cuadro de zoom (por defecto: auto)"
157
-
158
- #: plugin-options/general-options.php:97
159
- msgid "Zoom Box Position"
160
- msgstr "Posición del cuadro de zoom"
161
-
162
- #: plugin-options/general-options.php:98
163
- msgid "The magnifier position"
164
- msgstr "La posición del cuadro de zoom"
165
-
166
- #: plugin-options/general-options.php:104
167
- msgid "Right"
168
- msgstr "Derecha"
169
-
170
- #: plugin-options/general-options.php:105
171
- #: plugin-options/general-options.php:117
172
- msgid "Inside"
173
- msgstr "Dentro"
174
-
175
- #: plugin-options/general-options.php:109
176
- msgid "Zoom Box Position for mobile devices"
177
- msgstr "Posición del cuadro de zoom en dispositivos móviles"
178
-
179
- #: plugin-options/general-options.php:110
180
- msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
181
- msgstr "La posición del zoom en dispositivos móviles (iPhone, Android, etc.)"
182
-
183
- #: plugin-options/general-options.php:116
184
- msgid "Default"
185
- msgstr "Por defecto"
186
-
187
- #: plugin-options/general-options.php:118
188
- msgid "Disable"
189
- msgstr "Deshabilitar"
190
-
191
- #: plugin-options/general-options.php:122
192
- msgid "Loading label"
193
- msgstr "Etiqueta de cargando"
194
-
195
- #: plugin-options/general-options.php:125
196
- #: plugin-options/general-options.php:126
197
- msgid "Loading..."
198
- msgstr "Cargando..."
199
-
200
- #: plugin-options/general-options.php:131
201
- msgid "Lens Opacity"
202
- msgstr "Opacidad de la lente"
203
-
204
- #: plugin-options/general-options.php:142
205
- msgid "Blur"
206
- msgstr "Difuminar"
207
-
208
- #: plugin-options/general-options.php:143
209
- msgid "Add a blur effect to the small image on mouse hover."
210
- msgstr ""
211
- "Añadir un efecto de disolverse a la imagen pequeña con el evento hover del "
212
- "ratón."
213
-
214
- #: plugin-options/general-options.php:154
215
- msgid "Slider Settings"
216
- msgstr "Ajustes de Deslizador"
217
-
218
- #: plugin-options/general-options.php:160
219
- msgid "Activate Slider"
220
- msgstr "Activar Deslizador"
221
-
222
- #: plugin-options/general-options.php:161
223
- msgid "Activate Thumbnail Slider."
224
- msgstr "Activar miniatura de Deslizador."
225
-
226
- #: plugin-options/general-options.php:168
227
- msgid "Activate Responsive Slider"
228
- msgstr "Activar Deslizador Responsive"
229
-
230
- #: plugin-options/general-options.php:169
231
- msgid ""
232
- "This option fits the thumbnails within the available space. Disable it if "
233
- "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
234
- msgstr ""
235
- "Esta opción ajusta las miniaturas dentro del espacio disponible. "
236
- "Deshabilítala si quieres administrar libremente las miniaturas (p.ej.: "
237
- "añadir márgenes, rellenos, etc.)"
238
-
239
- #: plugin-options/general-options.php:176
240
- msgid "Items"
241
- msgstr "Elementos"
242
-
243
- #: plugin-options/general-options.php:177
244
- msgid "Number of items to show"
245
- msgstr "Número de elementos que se muestran"
246
-
247
- #: plugin-options/general-options.php:187
248
- msgid "Circular carousel"
249
- msgstr "Carrusel circular"
250
-
251
- #: plugin-options/general-options.php:188
252
- msgid "It defines whether the carousel should be circular."
253
- msgstr "Define si el carrusel debe ser circular"
254
-
255
- #: plugin-options/general-options.php:195
256
- msgid "Infinite carousel"
257
- msgstr "Carrusel infinito"
258
-
259
- #: plugin-options/general-options.php:196
260
- msgid ""
261
- "It defines whether the carousel should be infinite. Note: It is possible to "
262
- "create a non-circular, infinite carousel, but it is not possible to create a "
263
- "circular, non-infinite carousel."
264
- msgstr ""
265
- "Define si el carrusel debe ser infinito. Nota: es posible crear un carrusel "
266
- "infinito no circular, pero no es posible crear un carrusel circular no "
267
- "infinito."
268
-
269
- #: plugin-options/general-options.php:214
270
- msgid "Upgrade to the PREMIUM VERSION"
271
- msgstr "Actualiza a la VERSIÓN PREMIUM"
272
-
273
- #: plugin-options/general-options.php:218
274
- msgid "Discover The Advanced Features"
275
- msgstr "Descubre las características avanzadas"
276
-
277
- #: plugin-options/general-options.php:219
278
- msgid ""
279
- "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
280
- "from all features!"
281
- msgstr ""
282
- "¡Actualiza a la VERSIÓN PREMIUM de YITH WOOCOMMERCE ZOOM MAGNIFIER para "
283
- "beneficiarte de todas las características!"
284
-
285
- #: plugin-options/general-options.php:223
286
- msgid ""
287
- "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
288
- "action"
289
- msgstr ""
290
- "Ver cómo es el plugin YITH WooCommerce Zoom Magnifier con todas sus "
291
- "características premium en acción"
292
-
293
- #: plugin-options/general-options.php:225
294
- msgid "Get Support and Pro Features"
295
- msgstr "Hazte con Características Pro y Soporte"
296
-
297
- #: plugin-options/general-options.php:226
298
- msgid ""
299
- "Purchasing the premium version of the plugin, you will take advantage of the "
300
- "advanced features of the product, and you will get one year of free updates "
301
- "and support through our platform available 24h/24."
302
- msgstr ""
303
- "Comprando la versión premium del plugin, obtendrás las ventajas de las "
304
- "características avanzadas del producto, y tendrás un año de actualizaciones "
305
- "gratuitas y de soporte a través de nuestra plataforma disponible 24h/24."
306
-
307
- #: templates/admin/premium.php:193
308
- #, php-format
309
- msgid ""
310
- "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
311
- "Magnifier %2$s to benefit from all features!"
312
- msgstr ""
313
-
314
- #: templates/admin/premium.php:196
315
- #, php-format
316
- msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
317
- msgstr ""
318
-
319
- #: templates/admin/premium.php:202
320
- #, php-format
321
- msgid "%1$sPremium Features%2$s"
322
- msgstr ""
323
-
324
- #: templates/admin/premium.php:210
325
- msgid "ZOOM BOX POSITION"
326
- msgstr ""
327
-
328
- #: templates/admin/premium.php:213
329
- #, php-format
330
- msgid ""
331
- "Choose where you want to show the %1$szoomed version%2$s of the image of "
332
- "your products. Place it above or below the original image, on its left or "
333
- "its right, or you can even place it over it.$2$s"
334
- msgstr ""
335
-
336
- #: templates/admin/premium.php:223
337
- msgid "ENLARGE THE IMAGES"
338
- msgstr ""
339
-
340
- #: templates/admin/premium.php:225
341
- msgid ""
342
- "Just one click and the product image will appear in a bigger size in a modal "
343
- "window. A further chance to let users analyze in a better way what you sell."
344
- msgstr ""
345
-
346
- #: templates/admin/premium.php:240
347
- msgid "EXCLUDE PRODUCTS"
348
- msgstr ""
349
-
350
- #: templates/admin/premium.php:242
351
- msgid ""
352
- "Tailored options to limit the plugin features only to certain products. Some "
353
- "of these could have too small images to be zoomed, or maybe being part of "
354
- "categories that do not imply zoomed images. Select the products and the "
355
- "categories to exclude and delete all your problems"
356
- msgstr ""
357
-
358
- #: templates/admin/premium.php:251
359
- #, php-format
360
- msgid ""
361
- "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
362
- "%2$s to benefit from all features!"
363
- msgstr ""
364
-
365
- #: templates/admin/premium.php:254
366
- #, php-format
367
- msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
368
- msgstr ""
369
-
370
- #: yit-common/yith-panel.php:429
371
- msgid "Select a date"
372
- msgstr "Selecciona una fecha"
373
-
374
- #: yit-common/yith-panel.php:430
375
- msgid "Hours"
376
- msgstr "Horas"
377
-
378
- #: yit-common/yith-panel.php:431 yit-common/yith-panel.php:432
379
- msgid "Minutes"
380
- msgstr "Minutos"
381
-
382
- #: yit-common/yith-panel.php:440
383
- msgid "Upload"
384
- msgstr "Actualizar"
385
-
386
- #: yit-common/yith-panel.php:477
387
- msgid "px"
388
- msgstr "px"
389
-
390
- #: yit-common/yith-panel.php:479
391
- msgid "em"
392
- msgstr "em"
393
-
394
- #: yit-common/yith-panel.php:481
395
- msgid "pt"
396
- msgstr "pt"
397
-
398
- #: yit-common/yith-panel.php:483
399
- msgid "rem"
400
- msgstr "rem"
401
-
402
- #: yit-common/yith-panel.php:495
403
- msgid "Select a font family"
404
- msgstr "Selecciona un tipo de fuente"
405
-
406
- #: yit-common/yith-panel.php:505
407
- msgid "Regular"
408
- msgstr "Normal"
409
-
410
- #: yit-common/yith-panel.php:507
411
- msgid "Bold"
412
- msgstr "Negrita"
413
-
414
- #: yit-common/yith-panel.php:509
415
- msgid "Extra bold"
416
- msgstr "Extra negrita"
417
-
418
- #: yit-common/yith-panel.php:511
419
- msgid "Italic"
420
- msgstr "Cursiva"
421
-
422
- #: yit-common/yith-panel.php:513
423
- msgid "Italic bold"
424
- msgstr "Negrita cursiva"
425
-
426
- #: yit-common/yith-panel.php:529
427
- msgid "Click to preview"
428
- msgstr "Haz click para previsualizar"
429
-
430
- #~ msgid "product"
431
- #~ msgstr "praducto"
432
-
433
- #~ msgid "products"
434
- #~ msgstr "productos"
435
-
436
- #~ msgid "Remove from exclusions"
437
- #~ msgstr "Quitar de las exclusiones"
438
-
439
- #~ msgid "Edit product"
440
- #~ msgstr "Editar producto"
441
-
442
- #~ msgid "Remove from list"
443
- #~ msgstr "Eliminar de la lista"
444
-
445
- #~ msgid "%s product removed successfully"
446
- #~ msgid_plural "%s products removed successfully"
447
- #~ msgstr[0] "El producto %s ha sido eliminado con éxito"
448
- #~ msgstr[1] "Los productos %s han sido eliminados con éxito"
449
-
450
- #~ msgid "%s product added successfully"
451
- #~ msgid_plural "%s products added successfully"
452
- #~ msgstr[0] "El producto %s ha sido añadido con éxito"
453
- #~ msgstr[1] "Los productos %s han sido añadidos con éxito"
454
-
455
- #~ msgid "Product updated successfully"
456
- #~ msgstr "Producto actualizado con éxito"
457
-
458
- #~ msgid "Single Product Exclusion List"
459
- #~ msgstr "Lista de Exclusión de Productos"
460
-
461
- #~ msgid "Add Products"
462
- #~ msgstr "Añadir productos"
463
-
464
- #~ msgid "Products to exclude"
465
- #~ msgstr "Productos para excluir"
466
-
467
- #~ msgid "Add product exclusion"
468
- #~ msgstr "Añadir exclusión de producto"
469
-
470
- #~ msgid "Return to exclusion list"
471
- #~ msgstr "Devolver a la lista de exclusión"
472
-
473
- #~ msgid "Select at least one product"
474
- #~ msgstr "Selecciona al menos un producto"
475
-
476
- #~ msgid "Exclude product categories"
477
- #~ msgstr "Excluir categorías de productos"
478
-
479
- #~ msgid "Top"
480
- #~ msgstr "Arriba"
481
-
482
- #~ msgid "Bottom"
483
- #~ msgstr "Abajo"
484
-
485
- #~ msgid "Left"
486
- #~ msgstr "Izquierda"
487
-
488
- #~ msgid "Product"
489
- #~ msgstr "Producto"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: YITH WooCommerce Order Tracking\n"
4
+ "POT-Creation-Date: 2016-06-13 16:57+0200\n"
5
+ "PO-Revision-Date: 2016-06-13 16:57+0200\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
+ "Language: es_ES\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
+ "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
16
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
+
21
+ #: class.yith-wcmg-admin.php:81
22
+ msgid "Image Size"
23
+ msgstr "Tamaño de la imagen"
24
+
25
+ #: class.yith-wcmg-admin.php:82 plugin-options/general-options.php:17
26
+ msgid "The size of the images used within the magnifier box"
27
+ msgstr "El tamaño de las imágenes usadas dentro de la caja de zoom"
28
+
29
+ #: init.php:50
30
+ msgid ""
31
+ "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
32
+ "WooCommerce in order to work."
33
+ msgstr ""
34
+ "YITH WooCommerce Zoom Magnifier está habilitado pero no es efectivo. "
35
+ "Requiere WooCommerce para funcionar."
36
+
37
+ #: init.php:66
38
+ msgid ""
39
+ "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
40
+ "you are using the premium one."
41
+ msgstr ""
42
+
43
+ #: lib/class.yith-ywzm-custom-types.php:159
44
+ msgid "Do you want to hard crop the image?"
45
+ msgstr "¿Quieres recortar la imagen?"
46
+
47
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:124
48
+ msgid "General"
49
+ msgstr "General"
50
+
51
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:127
52
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:191
53
+ msgid "Premium Version"
54
+ msgstr "Versión Premium"
55
+
56
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:129
57
+ msgid "Product exclusion list"
58
+ msgstr ""
59
+
60
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:188
61
+ msgid "Settings"
62
+ msgstr "Ajustes"
63
+
64
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:216
65
+ msgid "Plugin Documentation"
66
+ msgstr "Documentación del Plugin"
67
+
68
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:229
69
+ msgid ""
70
+ "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
71
+ "version with many new options, discover it now."
72
+ msgstr ""
73
+ "YITH WooCommerce Zoom Magnifier está disponible en una espectacular versión "
74
+ "PREMIUM con muchas nuevas opciones, descúbrela ahora."
75
+
76
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:230
77
+ msgid "Premium version"
78
+ msgstr "Versión Pemium"
79
+
80
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:237
81
+ #: plugin-options/general-options.php:217
82
+ msgid "YITH WooCommerce Zoom Magnifier"
83
+ msgstr "YITH WooCommerce Zoom Magnifier"
84
+
85
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:238
86
+ msgid ""
87
+ "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
88
+ "<br> From this menu you can access all settings of the YITH plugins "
89
+ "activated."
90
+ msgstr ""
91
+ "En la pestaña YITH Plugins puedes encontrar opciones de YITH WooCommerce "
92
+ "Zoom Magnifier. <br> Desde este menú puedes acceder a todos los ajustes de "
93
+ "los plugin YITH activados."
94
+
95
+ #: plugin-options/general-options.php:16
96
+ msgid "Image size"
97
+ msgstr "Tamaño de imagen"
98
+
99
+ #: plugin-options/general-options.php:36
100
+ msgid "General Settings"
101
+ msgstr "Ajustes Generales"
102
+
103
+ #: plugin-options/general-options.php:42
104
+ msgid "Activate YITH WooCommerce Zoom Magnifier"
105
+ msgstr "Activar YITH WooCommerce Zoom Magnifier"
106
+
107
+ #: plugin-options/general-options.php:43
108
+ msgid "Activate the plugin or use the WooCommerce default product image."
109
+ msgstr ""
110
+ "Activar el plugin o usar la imagen de producto por defecto de WooComerce."
111
+
112
+ #: plugin-options/general-options.php:50
113
+ msgid "Activate on mobile device"
114
+ msgstr "Activar en dispositivos móviles"
115
+
116
+ #: plugin-options/general-options.php:51
117
+ msgid ""
118
+ "Set if zoom and slider functionalities should be shown also on mobile "
119
+ "devices."
120
+ msgstr ""
121
+ "Establecer si las funcionalidades del zoom y el deslizador deberían "
122
+ "mostrarse también en dispositivos móviles."
123
+
124
+ #: plugin-options/general-options.php:59
125
+ msgid "Forced Image Size"
126
+ msgstr "Tamaño de imagen obligatiorio"
127
+
128
+ #: plugin-options/general-options.php:60
129
+ msgid ""
130
+ "If disabled, you will able to customize the sizes of the zoomed images. "
131
+ "Disable it at your own risk; the magnifier could not properly work with "
132
+ "images out of proportion."
133
+ msgstr ""
134
+ "Si está deshabilitado, podrás personalizar los tamaños de las imágenes "
135
+ "aumentadas. Desactívalo bajo tu propio riesgo, la lupa no funciona "
136
+ "correctamente con imágenes desproporcionadas."
137
+
138
+ #: plugin-options/general-options.php:74
139
+ msgid "Magnifier Settings"
140
+ msgstr "Ajustes del xoom"
141
+
142
+ #: plugin-options/general-options.php:80
143
+ msgid "Zoom Box Width"
144
+ msgstr "Ancho del cuadro de zoom"
145
+
146
+ #: plugin-options/general-options.php:81
147
+ msgid "The width of the magnifier box (default: auto)"
148
+ msgstr "El ancho del cuadro de zoom (por defecto: auto)"
149
+
150
+ #: plugin-options/general-options.php:88
151
+ msgid "Zoom Box Height"
152
+ msgstr "Altura del cuadro de zoom"
153
+
154
+ #: plugin-options/general-options.php:89
155
+ msgid "The height of the magnifier box (default: auto)"
156
+ msgstr "La altura del cuadro de zoom (por defecto: auto)"
157
+
158
+ #: plugin-options/general-options.php:97
159
+ msgid "Zoom Box Position"
160
+ msgstr "Posición del cuadro de zoom"
161
+
162
+ #: plugin-options/general-options.php:98
163
+ msgid "The magnifier position"
164
+ msgstr "La posición del cuadro de zoom"
165
+
166
+ #: plugin-options/general-options.php:104
167
+ msgid "Right"
168
+ msgstr "Derecha"
169
+
170
+ #: plugin-options/general-options.php:105
171
+ #: plugin-options/general-options.php:117
172
+ msgid "Inside"
173
+ msgstr "Dentro"
174
+
175
+ #: plugin-options/general-options.php:109
176
+ msgid "Zoom Box Position for mobile devices"
177
+ msgstr "Posición del cuadro de zoom en dispositivos móviles"
178
+
179
+ #: plugin-options/general-options.php:110
180
+ msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
181
+ msgstr "La posición del zoom en dispositivos móviles (iPhone, Android, etc.)"
182
+
183
+ #: plugin-options/general-options.php:116
184
+ msgid "Default"
185
+ msgstr "Por defecto"
186
+
187
+ #: plugin-options/general-options.php:118
188
+ msgid "Disable"
189
+ msgstr "Deshabilitar"
190
+
191
+ #: plugin-options/general-options.php:122
192
+ msgid "Loading label"
193
+ msgstr "Etiqueta de cargando"
194
+
195
+ #: plugin-options/general-options.php:125
196
+ #: plugin-options/general-options.php:126
197
+ msgid "Loading..."
198
+ msgstr "Cargando..."
199
+
200
+ #: plugin-options/general-options.php:131
201
+ msgid "Lens Opacity"
202
+ msgstr "Opacidad de la lente"
203
+
204
+ #: plugin-options/general-options.php:142
205
+ msgid "Blur"
206
+ msgstr "Difuminar"
207
+
208
+ #: plugin-options/general-options.php:143
209
+ msgid "Add a blur effect to the small image on mouse hover."
210
+ msgstr ""
211
+ "Añadir un efecto de disolverse a la imagen pequeña con el evento hover del "
212
+ "ratón."
213
+
214
+ #: plugin-options/general-options.php:154
215
+ msgid "Slider Settings"
216
+ msgstr "Ajustes de Deslizador"
217
+
218
+ #: plugin-options/general-options.php:160
219
+ msgid "Activate Slider"
220
+ msgstr "Activar Deslizador"
221
+
222
+ #: plugin-options/general-options.php:161
223
+ msgid "Activate Thumbnail Slider."
224
+ msgstr "Activar miniatura de Deslizador."
225
+
226
+ #: plugin-options/general-options.php:168
227
+ msgid "Activate Responsive Slider"
228
+ msgstr "Activar Deslizador Responsive"
229
+
230
+ #: plugin-options/general-options.php:169
231
+ msgid ""
232
+ "This option fits the thumbnails within the available space. Disable it if "
233
+ "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
234
+ msgstr ""
235
+ "Esta opción ajusta las miniaturas dentro del espacio disponible. "
236
+ "Deshabilítala si quieres administrar libremente las miniaturas (p.ej.: "
237
+ "añadir márgenes, rellenos, etc.)"
238
+
239
+ #: plugin-options/general-options.php:176
240
+ msgid "Items"
241
+ msgstr "Elementos"
242
+
243
+ #: plugin-options/general-options.php:177
244
+ msgid "Number of items to show"
245
+ msgstr "Número de elementos que se muestran"
246
+
247
+ #: plugin-options/general-options.php:187
248
+ msgid "Circular carousel"
249
+ msgstr "Carrusel circular"
250
+
251
+ #: plugin-options/general-options.php:188
252
+ msgid "It defines whether the carousel should be circular."
253
+ msgstr "Define si el carrusel debe ser circular"
254
+
255
+ #: plugin-options/general-options.php:195
256
+ msgid "Infinite carousel"
257
+ msgstr "Carrusel infinito"
258
+
259
+ #: plugin-options/general-options.php:196
260
+ msgid ""
261
+ "It defines whether the carousel should be infinite. Note: It is possible to "
262
+ "create a non-circular, infinite carousel, but it is not possible to create a "
263
+ "circular, non-infinite carousel."
264
+ msgstr ""
265
+ "Define si el carrusel debe ser infinito. Nota: es posible crear un carrusel "
266
+ "infinito no circular, pero no es posible crear un carrusel circular no "
267
+ "infinito."
268
+
269
+ #: plugin-options/general-options.php:214
270
+ msgid "Upgrade to the PREMIUM VERSION"
271
+ msgstr "Actualiza a la VERSIÓN PREMIUM"
272
+
273
+ #: plugin-options/general-options.php:218
274
+ msgid "Discover The Advanced Features"
275
+ msgstr "Descubre las características avanzadas"
276
+
277
+ #: plugin-options/general-options.php:219
278
+ msgid ""
279
+ "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
280
+ "from all features!"
281
+ msgstr ""
282
+ "¡Actualiza a la VERSIÓN PREMIUM de YITH WOOCOMMERCE ZOOM MAGNIFIER para "
283
+ "beneficiarte de todas las características!"
284
+
285
+ #: plugin-options/general-options.php:223
286
+ msgid ""
287
+ "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
288
+ "action"
289
+ msgstr ""
290
+ "Ver cómo es el plugin YITH WooCommerce Zoom Magnifier con todas sus "
291
+ "características premium en acción"
292
+
293
+ #: plugin-options/general-options.php:225
294
+ msgid "Get Support and Pro Features"
295
+ msgstr "Hazte con Características Pro y Soporte"
296
+
297
+ #: plugin-options/general-options.php:226
298
+ msgid ""
299
+ "Purchasing the premium version of the plugin, you will take advantage of the "
300
+ "advanced features of the product, and you will get one year of free updates "
301
+ "and support through our platform available 24h/24."
302
+ msgstr ""
303
+ "Comprando la versión premium del plugin, obtendrás las ventajas de las "
304
+ "características avanzadas del producto, y tendrás un año de actualizaciones "
305
+ "gratuitas y de soporte a través de nuestra plataforma disponible 24h/24."
306
+
307
+ #: templates/admin/premium.php:193
308
+ #, php-format
309
+ msgid ""
310
+ "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
311
+ "Magnifier %2$s to benefit from all features!"
312
+ msgstr ""
313
+
314
+ #: templates/admin/premium.php:196
315
+ #, php-format
316
+ msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
317
+ msgstr ""
318
+
319
+ #: templates/admin/premium.php:202
320
+ #, php-format
321
+ msgid "%1$sPremium Features%2$s"
322
+ msgstr ""
323
+
324
+ #: templates/admin/premium.php:210
325
+ msgid "ZOOM BOX POSITION"
326
+ msgstr ""
327
+
328
+ #: templates/admin/premium.php:213
329
+ #, php-format
330
+ msgid ""
331
+ "Choose where you want to show the %1$szoomed version%2$s of the image of "
332
+ "your products. Place it above or below the original image, on its left or "
333
+ "its right, or you can even place it over it.$2$s"
334
+ msgstr ""
335
+
336
+ #: templates/admin/premium.php:223
337
+ msgid "ENLARGE THE IMAGES"
338
+ msgstr ""
339
+
340
+ #: templates/admin/premium.php:225
341
+ msgid ""
342
+ "Just one click and the product image will appear in a bigger size in a modal "
343
+ "window. A further chance to let users analyze in a better way what you sell."
344
+ msgstr ""
345
+
346
+ #: templates/admin/premium.php:240
347
+ msgid "EXCLUDE PRODUCTS"
348
+ msgstr ""
349
+
350
+ #: templates/admin/premium.php:242
351
+ msgid ""
352
+ "Tailored options to limit the plugin features only to certain products. Some "
353
+ "of these could have too small images to be zoomed, or maybe being part of "
354
+ "categories that do not imply zoomed images. Select the products and the "
355
+ "categories to exclude and delete all your problems"
356
+ msgstr ""
357
+
358
+ #: templates/admin/premium.php:251
359
+ #, php-format
360
+ msgid ""
361
+ "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
362
+ "%2$s to benefit from all features!"
363
+ msgstr ""
364
+
365
+ #: templates/admin/premium.php:254
366
+ #, php-format
367
+ msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
368
+ msgstr ""
369
+
370
+ #: yit-common/yith-panel.php:429
371
+ msgid "Select a date"
372
+ msgstr "Selecciona una fecha"
373
+
374
+ #: yit-common/yith-panel.php:430
375
+ msgid "Hours"
376
+ msgstr "Horas"
377
+
378
+ #: yit-common/yith-panel.php:431 yit-common/yith-panel.php:432
379
+ msgid "Minutes"
380
+ msgstr "Minutos"
381
+
382
+ #: yit-common/yith-panel.php:440
383
+ msgid "Upload"
384
+ msgstr "Actualizar"
385
+
386
+ #: yit-common/yith-panel.php:477
387
+ msgid "px"
388
+ msgstr "px"
389
+
390
+ #: yit-common/yith-panel.php:479
391
+ msgid "em"
392
+ msgstr "em"
393
+
394
+ #: yit-common/yith-panel.php:481
395
+ msgid "pt"
396
+ msgstr "pt"
397
+
398
+ #: yit-common/yith-panel.php:483
399
+ msgid "rem"
400
+ msgstr "rem"
401
+
402
+ #: yit-common/yith-panel.php:495
403
+ msgid "Select a font family"
404
+ msgstr "Selecciona un tipo de fuente"
405
+
406
+ #: yit-common/yith-panel.php:505
407
+ msgid "Regular"
408
+ msgstr "Normal"
409
+
410
+ #: yit-common/yith-panel.php:507
411
+ msgid "Bold"
412
+ msgstr "Negrita"
413
+
414
+ #: yit-common/yith-panel.php:509
415
+ msgid "Extra bold"
416
+ msgstr "Extra negrita"
417
+
418
+ #: yit-common/yith-panel.php:511
419
+ msgid "Italic"
420
+ msgstr "Cursiva"
421
+
422
+ #: yit-common/yith-panel.php:513
423
+ msgid "Italic bold"
424
+ msgstr "Negrita cursiva"
425
+
426
+ #: yit-common/yith-panel.php:529
427
+ msgid "Click to preview"
428
+ msgstr "Haz click para previsualizar"
429
+
430
+ #~ msgid "product"
431
+ #~ msgstr "praducto"
432
+
433
+ #~ msgid "products"
434
+ #~ msgstr "productos"
435
+
436
+ #~ msgid "Remove from exclusions"
437
+ #~ msgstr "Quitar de las exclusiones"
438
+
439
+ #~ msgid "Edit product"
440
+ #~ msgstr "Editar producto"
441
+
442
+ #~ msgid "Remove from list"
443
+ #~ msgstr "Eliminar de la lista"
444
+
445
+ #~ msgid "%s product removed successfully"
446
+ #~ msgid_plural "%s products removed successfully"
447
+ #~ msgstr[0] "El producto %s ha sido eliminado con éxito"
448
+ #~ msgstr[1] "Los productos %s han sido eliminados con éxito"
449
+
450
+ #~ msgid "%s product added successfully"
451
+ #~ msgid_plural "%s products added successfully"
452
+ #~ msgstr[0] "El producto %s ha sido añadido con éxito"
453
+ #~ msgstr[1] "Los productos %s han sido añadidos con éxito"
454
+
455
+ #~ msgid "Product updated successfully"
456
+ #~ msgstr "Producto actualizado con éxito"
457
+
458
+ #~ msgid "Single Product Exclusion List"
459
+ #~ msgstr "Lista de Exclusión de Productos"
460
+
461
+ #~ msgid "Add Products"
462
+ #~ msgstr "Añadir productos"
463
+
464
+ #~ msgid "Products to exclude"
465
+ #~ msgstr "Productos para excluir"
466
+
467
+ #~ msgid "Add product exclusion"
468
+ #~ msgstr "Añadir exclusión de producto"
469
+
470
+ #~ msgid "Return to exclusion list"
471
+ #~ msgstr "Devolver a la lista de exclusión"
472
+
473
+ #~ msgid "Select at least one product"
474
+ #~ msgstr "Selecciona al menos un producto"
475
+
476
+ #~ msgid "Exclude product categories"
477
+ #~ msgstr "Excluir categorías de productos"
478
+
479
+ #~ msgid "Top"
480
+ #~ msgstr "Arriba"
481
+
482
+ #~ msgid "Bottom"
483
+ #~ msgstr "Abajo"
484
+
485
+ #~ msgid "Left"
486
+ #~ msgstr "Izquierda"
487
+
488
+ #~ msgid "Product"
489
+ #~ msgstr "Producto"
languages/yith-woocommerce-zoom-magnifier-it_IT.po CHANGED
@@ -1,522 +1,522 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: YITH WooCommerce Zoom Magnifier\n"
4
- "POT-Creation-Date: 2015-10-07 15:48+0200\n"
5
- "PO-Revision-Date: 2015-10-07 15:48+0200\n"
6
- "Last-Translator: \n"
7
- "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
- "Language: it_IT\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.4\n"
13
- "X-Poedit-Basepath: ..\n"
14
- "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
- "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
-
21
- #: class.yith-wcmg-admin.php:90
22
- msgid "Image Size"
23
- msgstr "Dimensioni Immagine"
24
-
25
- #: class.yith-wcmg-admin.php:91 plugin-options/general-options.php:17
26
- msgid "The size of the images used within the magnifier box"
27
- msgstr "La dimensione delle immagini utilizzata nel riquadro di zoom"
28
-
29
- #: init.php:43
30
- msgid ""
31
- "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
32
- "WooCommerce in order to work."
33
- msgstr ""
34
- "YITH WooCommerce Zoom Magnifier è attivo ma non funzionante. Il plugin "
35
- "richiede WooCommerce per funzionare correttamente."
36
-
37
- #: init.php:52
38
- msgid ""
39
- "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
40
- "you are using the premium one."
41
- msgstr ""
42
- "Non è possibile attivare la versione gratuita di YITH WooCommerce Zoom "
43
- "Magnifier mentre si utilizza quella premium."
44
-
45
- #: lib/class.yith-ywzm-custom-types.php:159
46
- msgid "Do you want to hard crop the image?"
47
- msgstr "Vuoi ritagliare l'immagine?"
48
-
49
- #: lib/class.yith-ywzm-plugin-fw-loader.php:124
50
- msgid "General"
51
- msgstr "Generale"
52
-
53
- #: lib/class.yith-ywzm-plugin-fw-loader.php:127
54
- #: lib/class.yith-ywzm-plugin-fw-loader.php:191
55
- msgid "Premium Version"
56
- msgstr "Versione Premium"
57
-
58
- #: lib/class.yith-ywzm-plugin-fw-loader.php:129
59
- msgid "Product exclusion list"
60
- msgstr "Elenco esclusioni prodotti"
61
-
62
- #: lib/class.yith-ywzm-plugin-fw-loader.php:188
63
- msgid "Settings"
64
- msgstr "Impostazioni"
65
-
66
- #: lib/class.yith-ywzm-plugin-fw-loader.php:216
67
- msgid "Plugin Documentation"
68
- msgstr "Documentazione Plugin"
69
-
70
- #: lib/class.yith-ywzm-plugin-fw-loader.php:229
71
- msgid ""
72
- "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
73
- "version with many new options, discover it now."
74
- msgstr ""
75
- "YITH WooCommerce Zoom Magnifier è disponibile in una straordinaria versione "
76
- "PREMIUM con molte nuove opzioni, scoprila subito."
77
-
78
- #: lib/class.yith-ywzm-plugin-fw-loader.php:230
79
- msgid "Premium version"
80
- msgstr "Versione premium"
81
-
82
- #: lib/class.yith-ywzm-plugin-fw-loader.php:237
83
- #: plugin-options/general-options.php:216
84
- msgid "YITH WooCommerce Zoom Magnifier"
85
- msgstr "YITH WooCommerce Zoom Magnifier"
86
-
87
- #: lib/class.yith-ywzm-plugin-fw-loader.php:238
88
- msgid ""
89
- "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
90
- "<br> From this menu you can access all settings of the YITH plugins "
91
- "activated."
92
- msgstr ""
93
- "Nella tab YIT Plugins puoi trovare le optioni di YITH WooCommerce Zoom "
94
- "Magnifier.<br> Da questo menu puoi accedere a tutte le impostazioni dei "
95
- "plugin YITH attivati."
96
-
97
- #: plugin-options/general-options.php:16
98
- msgid "Image size"
99
- msgstr "Dimensione immagine"
100
-
101
- #: plugin-options/general-options.php:36
102
- msgid "General Settings"
103
- msgstr "Impostazioni generali"
104
-
105
- #: plugin-options/general-options.php:42
106
- msgid "Activate YITH WooCommerce Zoom Magnifier"
107
- msgstr "Attiva YITH WooCommerce Zoom Magnifier"
108
-
109
- #: plugin-options/general-options.php:43
110
- msgid "Activate the plugin or use the WooCommerce default product image."
111
- msgstr "Attiva il plugin o usa le immagini prodotto di default di WooCommerce."
112
-
113
- #: plugin-options/general-options.php:50
114
- msgid "Activate on mobile device"
115
- msgstr "Attiva su dispositivi mobili"
116
-
117
- #: plugin-options/general-options.php:51
118
- msgid ""
119
- "Set if zoom and slider functionalities should be shown also on mobile "
120
- "devices."
121
- msgstr "Decidi se mostrare lo zoom e lo slider anche sui dispositivi mobili."
122
-
123
- #: plugin-options/general-options.php:59
124
- msgid "Forced Image Size"
125
- msgstr "Dimensioni Immagini Forzate"
126
-
127
- #: plugin-options/general-options.php:60
128
- msgid ""
129
- "If disabled, you will able to customize the sizes of the zoomed images. "
130
- "Disable it at your own risk; the magnifier could not properly work with "
131
- "images out of proportion."
132
- msgstr ""
133
- "Se disabilitata, questa opzione permette di personalizzare la dimensione "
134
- "delle immagini zoomate. Disabilitare a proprio rischio: lo zoom potrebbe non "
135
- "funzionare correttamente con immagini sproporzionate."
136
-
137
- #: plugin-options/general-options.php:74
138
- msgid "Magnifier Settings"
139
- msgstr "Impostazioni Zoom"
140
-
141
- #: plugin-options/general-options.php:80
142
- msgid "Zoom Box Width"
143
- msgstr "Larghezza Riquadro Zoom"
144
-
145
- #: plugin-options/general-options.php:81
146
- msgid "The width of the magnifier box (default: auto)"
147
- msgstr "La larghezza del riquadro di zoom (default: auto)"
148
-
149
- #: plugin-options/general-options.php:88
150
- msgid "Zoom Box Height"
151
- msgstr "Altezza Riquadro Zoom"
152
-
153
- #: plugin-options/general-options.php:89
154
- msgid "The height of the magnifier box (default: auto)"
155
- msgstr "L'altezza del riquadro di zoom (default: auto)"
156
-
157
- #: plugin-options/general-options.php:97
158
- msgid "Zoom Box Position"
159
- msgstr "Posizione Riquadro Zoom"
160
-
161
- #: plugin-options/general-options.php:98
162
- msgid "The magnifier position"
163
- msgstr "Dove apparirà la finestra di zoom"
164
-
165
- #: plugin-options/general-options.php:104
166
- msgid "Right"
167
- msgstr "Destra"
168
-
169
- #: plugin-options/general-options.php:105
170
- #: plugin-options/general-options.php:117
171
- msgid "Inside"
172
- msgstr "Interno"
173
-
174
- #: plugin-options/general-options.php:109
175
- msgid "Zoom Box Position for mobile devices"
176
- msgstr "Posizione Riquadro Zoom su dispositivi mobili"
177
-
178
- #: plugin-options/general-options.php:110
179
- msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
180
- msgstr ""
181
- "Dove apparirà la finestra di zoom sui dispositivi mobili (iPhone, Android, "
182
- "etc.)"
183
-
184
- #: plugin-options/general-options.php:116
185
- msgid "Default"
186
- msgstr "Default"
187
-
188
- #: plugin-options/general-options.php:118
189
- msgid "Disable"
190
- msgstr "Disattiva"
191
-
192
- #: plugin-options/general-options.php:122
193
- msgid "Loading label"
194
- msgstr "Etichetta di caricamento"
195
-
196
- #: plugin-options/general-options.php:125
197
- #: plugin-options/general-options.php:126
198
- msgid "Loading..."
199
- msgstr "Caricamento..."
200
-
201
- #: plugin-options/general-options.php:130
202
- msgid "Lens Opacity"
203
- msgstr "Opacità Lenti"
204
-
205
- #: plugin-options/general-options.php:141
206
- msgid "Blur"
207
- msgstr "Sfocatura"
208
-
209
- #: plugin-options/general-options.php:142
210
- msgid "Add a blur effect to the small image on mouse hover."
211
- msgstr ""
212
- "Aggiungi un effetto di sfocatura all'immagine piccola al passaggio del mouse."
213
-
214
- #: plugin-options/general-options.php:153
215
- msgid "Slider Settings"
216
- msgstr "Impostazioni Slider"
217
-
218
- #: plugin-options/general-options.php:159
219
- msgid "Activate Slider"
220
- msgstr "Attiva Slider"
221
-
222
- #: plugin-options/general-options.php:160
223
- msgid "Activate Thumbnail Slider."
224
- msgstr "Attiva lo slider con anteprime."
225
-
226
- #: plugin-options/general-options.php:167
227
- msgid "Activate Responsive Slider"
228
- msgstr "Attiva Slider Responsive"
229
-
230
- #: plugin-options/general-options.php:168
231
- msgid ""
232
- "This option fits the thumbnails within the available space. Disable it if "
233
- "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
234
- msgstr ""
235
- "Questa opzione adatta le anteprime allo spazio disponibile. Disabilitala se "
236
- "vuoi gestire liberamente le anteprime (per esempio aggiungere margini, "
237
- "padding, ecc.)"
238
-
239
- #: plugin-options/general-options.php:175
240
- msgid "Items"
241
- msgstr "Elementi"
242
-
243
- #: plugin-options/general-options.php:176
244
- msgid "Number of items to show"
245
- msgstr "Numero di elementi da mostrare"
246
-
247
- #: plugin-options/general-options.php:186
248
- msgid "Circular carousel"
249
- msgstr "Carosello circolare"
250
-
251
- #: plugin-options/general-options.php:187
252
- msgid "It defines whether the carousel should be circular."
253
- msgstr "Imposta se il carosello deve essere circolare."
254
-
255
- #: plugin-options/general-options.php:194
256
- msgid "Infinite carousel"
257
- msgstr "Carosello infinito"
258
-
259
- #: plugin-options/general-options.php:195
260
- msgid ""
261
- "It defines whether the carousel should be infinite. Note: It is possible to "
262
- "create a non-circular, infinite carousel, but it is not possible to create a "
263
- "circular, non-infinite carousel."
264
- msgstr ""
265
- "Imposta se il carosello deve essere infinito. Attenzione: è possibile creare "
266
- "un carosello infinito non circolare, ma non puoi creare un carosello "
267
- "circolare non infinito."
268
-
269
- #: plugin-options/general-options.php:213
270
- msgid "Upgrade to the PREMIUM VERSION"
271
- msgstr "Aggiorna alla VERSIONE PREMIUM"
272
-
273
- #: plugin-options/general-options.php:217
274
- msgid "Discover The Advanced Features"
275
- msgstr "Scopri le caratteristiche avanzate"
276
-
277
- #: plugin-options/general-options.php:218
278
- msgid ""
279
- "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
280
- "from all features!"
281
- msgstr ""
282
- "Aggiorna alla VERSIONE PREMIUM di YITH WOOCOMMERCE ZOOM MAGNIFIER per "
283
- "usufruire di tutte le caratteristiche!"
284
-
285
- #: plugin-options/general-options.php:222
286
- msgid ""
287
- "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
288
- "action"
289
- msgstr ""
290
- "Guarda il plugin YITH WooCommerce Zoom Magnifier con tutte le "
291
- "caratteristiche premium in azione"
292
-
293
- #: plugin-options/general-options.php:224
294
- msgid "Get Support and Pro Features"
295
- msgstr "Ottieni il supporto e le caratteristiche premium"
296
-
297
- #: plugin-options/general-options.php:225
298
- msgid ""
299
- "Purchasing the premium version of the plugin, you will take advantage of the "
300
- "advanced features of the product, and you will get one year of free updates "
301
- "and support through our platform available 24h/24."
302
- msgstr ""
303
- "Acquistando la versione premium del plugin potrai usufruire delle "
304
- "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
305
- "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
306
- "disponibile 24h/24."
307
-
308
- #: templates/admin/premium.php:193
309
- #, php-format
310
- msgid ""
311
- "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
312
- "Magnifier %2$s to benefit from all features!"
313
- msgstr ""
314
- "Aggiorna alla %1$s versione premium %2$s di %1$s YITH WooCommerce Zoom "
315
- "Magnifier %2$s per usufruire di tutte le funzionalità!"
316
-
317
- #: templates/admin/premium.php:196
318
- #, php-format
319
- msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
320
- msgstr "%1$sAGGIORNA%2$s%3$salla versione premium%2$s "
321
-
322
- #: templates/admin/premium.php:202
323
- #, php-format
324
- msgid "%1$sPremium Features%2$s"
325
- msgstr "%1$sFunzionalità premium%2$s"
326
-
327
- #: templates/admin/premium.php:210
328
- msgid "ZOOM BOX POSITION"
329
- msgstr "POSIZIONE RIQUADRO ZOOM"
330
-
331
- #: templates/admin/premium.php:213
332
- #, php-format
333
- msgid ""
334
- "Choose where you want to show the %1$szoomed version%2$s of the image of "
335
- "your products. Place it above or below the original image, on its left or "
336
- "its right, or you can even place it over it.$2$s"
337
- msgstr ""
338
- "Scegli dove far apparire la %1$sversione ingrandita%2$s dell’immagine dei "
339
- "tuoi prodotti. Posizionala in alto o in basso rispetto all’immagine "
340
- "originale, alla sua destra o alla sua sinistra, o fa’ sì che si sovrapponga "
341
- "ad essa.$2$s"
342
-
343
- #: templates/admin/premium.php:223
344
- msgid "ENLARGE THE IMAGES"
345
- msgstr "ESPANDI L’IMMAGINE"
346
-
347
- #: templates/admin/premium.php:225
348
- msgid ""
349
- "Just one click and the product image will appear in a bigger size in a modal "
350
- "window. A further chance to let users analyze in a better way what you sell."
351
- msgstr ""
352
- "Un clic e l’immagine del prodotto apparirà a dimensioni maggiori e "
353
- "all’interno di una finestra modale. Una possibilità in più per mettere "
354
- "l’utente nelle condizioni di valutare al meglio ciò che vede."
355
-
356
- #: templates/admin/premium.php:240
357
- msgid "EXCLUDE PRODUCTS"
358
- msgstr "ESCLUSIONE PRODOTTI"
359
-
360
- #: templates/admin/premium.php:242
361
- msgid ""
362
- "Tailored options to limit the plugin features only to certain products. Some "
363
- "of these could have too small images to be zoomed, or maybe being part of "
364
- "categories that do not imply zoomed images. Select the products and the "
365
- "categories to exclude and delete all your problems"
366
- msgstr ""
367
- "Opzioni su misura per limitare le funzionalità del plugin solo a determinati "
368
- "prodotti. Alcuni di questi possono avere immagini troppo piccole per essere "
369
- "zoomate o appartenere a categorie in cui lo zoom immagine non è necessario. "
370
- "Seleziona i prodotti e le categorie da escludere e risolvi questo tipo di "
371
- "problemi."
372
-
373
- #: templates/admin/premium.php:251
374
- #, php-format
375
- msgid ""
376
- "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
377
- "%2$s to benefit from all features!"
378
- msgstr ""
379
- "Aggiorna alla %1$sversione premium%2$s di %1$s YITH WooCommerce Zoom "
380
- "Magnifier %2$s per usufruire di tutte le funzionalità!"
381
-
382
- #: templates/admin/premium.php:254
383
- #, php-format
384
- msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
385
- msgstr "%1$sAGGIORNA%2$s %3$salla versione premium%2$s "
386
-
387
- #: yit-common/yith-panel.php:418
388
- msgid "Select a date"
389
- msgstr "Scegli una data"
390
-
391
- #: yit-common/yith-panel.php:419
392
- msgid "Hours"
393
- msgstr "Ore"
394
-
395
- #: yit-common/yith-panel.php:420 yit-common/yith-panel.php:421
396
- msgid "Minutes"
397
- msgstr "Minuti"
398
-
399
- #: yit-common/yith-panel.php:429
400
- msgid "Upload"
401
- msgstr "Carica"
402
-
403
- #: yit-common/yith-panel.php:466
404
- msgid "px"
405
- msgstr "px"
406
-
407
- #: yit-common/yith-panel.php:468
408
- msgid "em"
409
- msgstr "em"
410
-
411
- #: yit-common/yith-panel.php:470
412
- msgid "pt"
413
- msgstr "pt"
414
-
415
- #: yit-common/yith-panel.php:472
416
- msgid "rem"
417
- msgstr "rem"
418
-
419
- #: yit-common/yith-panel.php:484
420
- msgid "Select a font family"
421
- msgstr "Scegli una famiglia di caratteri"
422
-
423
- #: yit-common/yith-panel.php:494
424
- msgid "Regular"
425
- msgstr "Normale"
426
-
427
- #: yit-common/yith-panel.php:496
428
- msgid "Bold"
429
- msgstr "Grassetto"
430
-
431
- #: yit-common/yith-panel.php:498
432
- msgid "Extra bold"
433
- msgstr "Grassetto extra"
434
-
435
- #: yit-common/yith-panel.php:500
436
- msgid "Italic"
437
- msgstr "Corsivo"
438
-
439
- #: yit-common/yith-panel.php:502
440
- msgid "Italic bold"
441
- msgstr "Corsivo E Grassetto"
442
-
443
- #: yit-common/yith-panel.php:518
444
- msgid "Click to preview"
445
- msgstr "Premi per visualizzare l'anteprima"
446
-
447
- #~ msgid "Activate YITH Magnifier"
448
- #~ msgstr "Attiva YITH Magnifier"
449
-
450
- #~ msgid "Activate the plugin on mobile device"
451
- #~ msgstr "Attiva il plugin su dispositivi mobili"
452
-
453
- #~ msgid ""
454
- #~ "Purchasing the premium version of the plugin, you will take advantage of "
455
- #~ "the advanced features of the product and you will get one year of free "
456
- #~ "updates and support through our platform available 24h/24."
457
- #~ msgstr ""
458
- #~ "Acquistando la versione premium del plugin potrai usufruire delle "
459
- #~ "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
460
- #~ "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
461
- #~ "disponibile 24h/24."
462
-
463
- #~ msgid "product"
464
- #~ msgstr "prodotto"
465
-
466
- #~ msgid "products"
467
- #~ msgstr "prodotti"
468
-
469
- #~ msgid "Product"
470
- #~ msgstr "Prodotto"
471
-
472
- #~ msgid "Remove from exclusions"
473
- #~ msgstr "Rimuovi dalle esclusioni"
474
-
475
- #~ msgid "Edit product"
476
- #~ msgstr "Modifica prodotto"
477
-
478
- #~ msgid "Remove from list"
479
- #~ msgstr "Elimina dalla lista"
480
-
481
- #~ msgid "%s product removed successfully"
482
- #~ msgid_plural "%s products removed successfully"
483
- #~ msgstr[0] "%s prodotto rimosso correttamente"
484
- #~ msgstr[1] "%s prodotti rimossi correttamente"
485
-
486
- #~ msgid "%s product added successfully"
487
- #~ msgid_plural "%s products added successfully"
488
- #~ msgstr[0] "%s prodotto aggiunto correttamente"
489
- #~ msgstr[1] "%s prodotti aggiunti correttamente"
490
-
491
- #~ msgid "Product updated successfully"
492
- #~ msgstr "Prodotto aggiornato correttamente"
493
-
494
- #~ msgid "Single Product Exclusion List"
495
- #~ msgstr "Elenco Esclusioni Prodotti"
496
-
497
- #~ msgid "Add Products"
498
- #~ msgstr "Aggiungi Prodotto"
499
-
500
- #~ msgid "Products to exclude"
501
- #~ msgstr "Prodotti da escludere"
502
-
503
- #~ msgid "Add product exclusion"
504
- #~ msgstr "Aggiungi esclusione prodotto"
505
-
506
- #~ msgid "Return to exclusion list"
507
- #~ msgstr "Torno all'elenco esclusioni"
508
-
509
- #~ msgid "Select at least one product"
510
- #~ msgstr "Seleziona almeno un prodotto"
511
-
512
- #~ msgid "Exclude product categories"
513
- #~ msgstr "Escludi categorie di prodotti"
514
-
515
- #~ msgid "Top"
516
- #~ msgstr "Sopra"
517
-
518
- #~ msgid "Bottom"
519
- #~ msgstr "Sotto"
520
-
521
- #~ msgid "Left"
522
- #~ msgstr "Sinistra"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: YITH WooCommerce Zoom Magnifier\n"
4
+ "POT-Creation-Date: 2015-10-07 15:48+0200\n"
5
+ "PO-Revision-Date: 2015-10-07 15:48+0200\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
8
+ "Language: it_IT\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=n!=1;\n"
15
+ "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
16
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
20
+
21
+ #: class.yith-wcmg-admin.php:90
22
+ msgid "Image Size"
23
+ msgstr "Dimensioni Immagine"
24
+
25
+ #: class.yith-wcmg-admin.php:91 plugin-options/general-options.php:17
26
+ msgid "The size of the images used within the magnifier box"
27
+ msgstr "La dimensione delle immagini utilizzata nel riquadro di zoom"
28
+
29
+ #: init.php:43
30
+ msgid ""
31
+ "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
32
+ "WooCommerce in order to work."
33
+ msgstr ""
34
+ "YITH WooCommerce Zoom Magnifier è attivo ma non funzionante. Il plugin "
35
+ "richiede WooCommerce per funzionare correttamente."
36
+
37
+ #: init.php:52
38
+ msgid ""
39
+ "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
40
+ "you are using the premium one."
41
+ msgstr ""
42
+ "Non è possibile attivare la versione gratuita di YITH WooCommerce Zoom "
43
+ "Magnifier mentre si utilizza quella premium."
44
+
45
+ #: lib/class.yith-ywzm-custom-types.php:159
46
+ msgid "Do you want to hard crop the image?"
47
+ msgstr "Vuoi ritagliare l'immagine?"
48
+
49
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:124
50
+ msgid "General"
51
+ msgstr "Generale"
52
+
53
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:127
54
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:191
55
+ msgid "Premium Version"
56
+ msgstr "Versione Premium"
57
+
58
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:129
59
+ msgid "Product exclusion list"
60
+ msgstr "Elenco esclusioni prodotti"
61
+
62
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:188
63
+ msgid "Settings"
64
+ msgstr "Impostazioni"
65
+
66
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:216
67
+ msgid "Plugin Documentation"
68
+ msgstr "Documentazione Plugin"
69
+
70
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:229
71
+ msgid ""
72
+ "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
73
+ "version with many new options, discover it now."
74
+ msgstr ""
75
+ "YITH WooCommerce Zoom Magnifier è disponibile in una straordinaria versione "
76
+ "PREMIUM con molte nuove opzioni, scoprila subito."
77
+
78
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:230
79
+ msgid "Premium version"
80
+ msgstr "Versione premium"
81
+
82
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:237
83
+ #: plugin-options/general-options.php:216
84
+ msgid "YITH WooCommerce Zoom Magnifier"
85
+ msgstr "YITH WooCommerce Zoom Magnifier"
86
+
87
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:238
88
+ msgid ""
89
+ "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
90
+ "<br> From this menu you can access all settings of the YITH plugins "
91
+ "activated."
92
+ msgstr ""
93
+ "Nella tab YIT Plugins puoi trovare le optioni di YITH WooCommerce Zoom "
94
+ "Magnifier.<br> Da questo menu puoi accedere a tutte le impostazioni dei "
95
+ "plugin YITH attivati."
96
+
97
+ #: plugin-options/general-options.php:16
98
+ msgid "Image size"
99
+ msgstr "Dimensione immagine"
100
+
101
+ #: plugin-options/general-options.php:36
102
+ msgid "General Settings"
103
+ msgstr "Impostazioni generali"
104
+
105
+ #: plugin-options/general-options.php:42
106
+ msgid "Activate YITH WooCommerce Zoom Magnifier"
107
+ msgstr "Attiva YITH WooCommerce Zoom Magnifier"
108
+
109
+ #: plugin-options/general-options.php:43
110
+ msgid "Activate the plugin or use the WooCommerce default product image."
111
+ msgstr "Attiva il plugin o usa le immagini prodotto di default di WooCommerce."
112
+
113
+ #: plugin-options/general-options.php:50
114
+ msgid "Activate on mobile device"
115
+ msgstr "Attiva su dispositivi mobili"
116
+
117
+ #: plugin-options/general-options.php:51
118
+ msgid ""
119
+ "Set if zoom and slider functionalities should be shown also on mobile "
120
+ "devices."
121
+ msgstr "Decidi se mostrare lo zoom e lo slider anche sui dispositivi mobili."
122
+
123
+ #: plugin-options/general-options.php:59
124
+ msgid "Forced Image Size"
125
+ msgstr "Dimensioni Immagini Forzate"
126
+
127
+ #: plugin-options/general-options.php:60
128
+ msgid ""
129
+ "If disabled, you will able to customize the sizes of the zoomed images. "
130
+ "Disable it at your own risk; the magnifier could not properly work with "
131
+ "images out of proportion."
132
+ msgstr ""
133
+ "Se disabilitata, questa opzione permette di personalizzare la dimensione "
134
+ "delle immagini zoomate. Disabilitare a proprio rischio: lo zoom potrebbe non "
135
+ "funzionare correttamente con immagini sproporzionate."
136
+
137
+ #: plugin-options/general-options.php:74
138
+ msgid "Magnifier Settings"
139
+ msgstr "Impostazioni Zoom"
140
+
141
+ #: plugin-options/general-options.php:80
142
+ msgid "Zoom Box Width"
143
+ msgstr "Larghezza Riquadro Zoom"
144
+
145
+ #: plugin-options/general-options.php:81
146
+ msgid "The width of the magnifier box (default: auto)"
147
+ msgstr "La larghezza del riquadro di zoom (default: auto)"
148
+
149
+ #: plugin-options/general-options.php:88
150
+ msgid "Zoom Box Height"
151
+ msgstr "Altezza Riquadro Zoom"
152
+
153
+ #: plugin-options/general-options.php:89
154
+ msgid "The height of the magnifier box (default: auto)"
155
+ msgstr "L'altezza del riquadro di zoom (default: auto)"
156
+
157
+ #: plugin-options/general-options.php:97
158
+ msgid "Zoom Box Position"
159
+ msgstr "Posizione Riquadro Zoom"
160
+
161
+ #: plugin-options/general-options.php:98
162
+ msgid "The magnifier position"
163
+ msgstr "Dove apparirà la finestra di zoom"
164
+
165
+ #: plugin-options/general-options.php:104
166
+ msgid "Right"
167
+ msgstr "Destra"
168
+
169
+ #: plugin-options/general-options.php:105
170
+ #: plugin-options/general-options.php:117
171
+ msgid "Inside"
172
+ msgstr "Interno"
173
+
174
+ #: plugin-options/general-options.php:109
175
+ msgid "Zoom Box Position for mobile devices"
176
+ msgstr "Posizione Riquadro Zoom su dispositivi mobili"
177
+
178
+ #: plugin-options/general-options.php:110
179
+ msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
180
+ msgstr ""
181
+ "Dove apparirà la finestra di zoom sui dispositivi mobili (iPhone, Android, "
182
+ "etc.)"
183
+
184
+ #: plugin-options/general-options.php:116
185
+ msgid "Default"
186
+ msgstr "Default"
187
+
188
+ #: plugin-options/general-options.php:118
189
+ msgid "Disable"
190
+ msgstr "Disattiva"
191
+
192
+ #: plugin-options/general-options.php:122
193
+ msgid "Loading label"
194
+ msgstr "Etichetta di caricamento"
195
+
196
+ #: plugin-options/general-options.php:125
197
+ #: plugin-options/general-options.php:126
198
+ msgid "Loading..."
199
+ msgstr "Caricamento..."
200
+
201
+ #: plugin-options/general-options.php:130
202
+ msgid "Lens Opacity"
203
+ msgstr "Opacità Lenti"
204
+
205
+ #: plugin-options/general-options.php:141
206
+ msgid "Blur"
207
+ msgstr "Sfocatura"
208
+
209
+ #: plugin-options/general-options.php:142
210
+ msgid "Add a blur effect to the small image on mouse hover."
211
+ msgstr ""
212
+ "Aggiungi un effetto di sfocatura all'immagine piccola al passaggio del mouse."
213
+
214
+ #: plugin-options/general-options.php:153
215
+ msgid "Slider Settings"
216
+ msgstr "Impostazioni Slider"
217
+
218
+ #: plugin-options/general-options.php:159
219
+ msgid "Activate Slider"
220
+ msgstr "Attiva Slider"
221
+
222
+ #: plugin-options/general-options.php:160
223
+ msgid "Activate Thumbnail Slider."
224
+ msgstr "Attiva lo slider con anteprime."
225
+
226
+ #: plugin-options/general-options.php:167
227
+ msgid "Activate Responsive Slider"
228
+ msgstr "Attiva Slider Responsive"
229
+
230
+ #: plugin-options/general-options.php:168
231
+ msgid ""
232
+ "This option fits the thumbnails within the available space. Disable it if "
233
+ "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
234
+ msgstr ""
235
+ "Questa opzione adatta le anteprime allo spazio disponibile. Disabilitala se "
236
+ "vuoi gestire liberamente le anteprime (per esempio aggiungere margini, "
237
+ "padding, ecc.)"
238
+
239
+ #: plugin-options/general-options.php:175
240
+ msgid "Items"
241
+ msgstr "Elementi"
242
+
243
+ #: plugin-options/general-options.php:176
244
+ msgid "Number of items to show"
245
+ msgstr "Numero di elementi da mostrare"
246
+
247
+ #: plugin-options/general-options.php:186
248
+ msgid "Circular carousel"
249
+ msgstr "Carosello circolare"
250
+
251
+ #: plugin-options/general-options.php:187
252
+ msgid "It defines whether the carousel should be circular."
253
+ msgstr "Imposta se il carosello deve essere circolare."
254
+
255
+ #: plugin-options/general-options.php:194
256
+ msgid "Infinite carousel"
257
+ msgstr "Carosello infinito"
258
+
259
+ #: plugin-options/general-options.php:195
260
+ msgid ""
261
+ "It defines whether the carousel should be infinite. Note: It is possible to "
262
+ "create a non-circular, infinite carousel, but it is not possible to create a "
263
+ "circular, non-infinite carousel."
264
+ msgstr ""
265
+ "Imposta se il carosello deve essere infinito. Attenzione: è possibile creare "
266
+ "un carosello infinito non circolare, ma non puoi creare un carosello "
267
+ "circolare non infinito."
268
+
269
+ #: plugin-options/general-options.php:213
270
+ msgid "Upgrade to the PREMIUM VERSION"
271
+ msgstr "Aggiorna alla VERSIONE PREMIUM"
272
+
273
+ #: plugin-options/general-options.php:217
274
+ msgid "Discover The Advanced Features"
275
+ msgstr "Scopri le caratteristiche avanzate"
276
+
277
+ #: plugin-options/general-options.php:218
278
+ msgid ""
279
+ "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
280
+ "from all features!"
281
+ msgstr ""
282
+ "Aggiorna alla VERSIONE PREMIUM di YITH WOOCOMMERCE ZOOM MAGNIFIER per "
283
+ "usufruire di tutte le caratteristiche!"
284
+
285
+ #: plugin-options/general-options.php:222
286
+ msgid ""
287
+ "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
288
+ "action"
289
+ msgstr ""
290
+ "Guarda il plugin YITH WooCommerce Zoom Magnifier con tutte le "
291
+ "caratteristiche premium in azione"
292
+
293
+ #: plugin-options/general-options.php:224
294
+ msgid "Get Support and Pro Features"
295
+ msgstr "Ottieni il supporto e le caratteristiche premium"
296
+
297
+ #: plugin-options/general-options.php:225
298
+ msgid ""
299
+ "Purchasing the premium version of the plugin, you will take advantage of the "
300
+ "advanced features of the product, and you will get one year of free updates "
301
+ "and support through our platform available 24h/24."
302
+ msgstr ""
303
+ "Acquistando la versione premium del plugin potrai usufruire delle "
304
+ "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
305
+ "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
306
+ "disponibile 24h/24."
307
+
308
+ #: templates/admin/premium.php:193
309
+ #, php-format
310
+ msgid ""
311
+ "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
312
+ "Magnifier %2$s to benefit from all features!"
313
+ msgstr ""
314
+ "Aggiorna alla %1$s versione premium %2$s di %1$s YITH WooCommerce Zoom "
315
+ "Magnifier %2$s per usufruire di tutte le funzionalità!"
316
+
317
+ #: templates/admin/premium.php:196
318
+ #, php-format
319
+ msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
320
+ msgstr "%1$sAGGIORNA%2$s%3$salla versione premium%2$s "
321
+
322
+ #: templates/admin/premium.php:202
323
+ #, php-format
324
+ msgid "%1$sPremium Features%2$s"
325
+ msgstr "%1$sFunzionalità premium%2$s"
326
+
327
+ #: templates/admin/premium.php:210
328
+ msgid "ZOOM BOX POSITION"
329
+ msgstr "POSIZIONE RIQUADRO ZOOM"
330
+
331
+ #: templates/admin/premium.php:213
332
+ #, php-format
333
+ msgid ""
334
+ "Choose where you want to show the %1$szoomed version%2$s of the image of "
335
+ "your products. Place it above or below the original image, on its left or "
336
+ "its right, or you can even place it over it.$2$s"
337
+ msgstr ""
338
+ "Scegli dove far apparire la %1$sversione ingrandita%2$s dell’immagine dei "
339
+ "tuoi prodotti. Posizionala in alto o in basso rispetto all’immagine "
340
+ "originale, alla sua destra o alla sua sinistra, o fa’ sì che si sovrapponga "
341
+ "ad essa.$2$s"
342
+
343
+ #: templates/admin/premium.php:223
344
+ msgid "ENLARGE THE IMAGES"
345
+ msgstr "ESPANDI L’IMMAGINE"
346
+
347
+ #: templates/admin/premium.php:225
348
+ msgid ""
349
+ "Just one click and the product image will appear in a bigger size in a modal "
350
+ "window. A further chance to let users analyze in a better way what you sell."
351
+ msgstr ""
352
+ "Un clic e l’immagine del prodotto apparirà a dimensioni maggiori e "
353
+ "all’interno di una finestra modale. Una possibilità in più per mettere "
354
+ "l’utente nelle condizioni di valutare al meglio ciò che vede."
355
+
356
+ #: templates/admin/premium.php:240
357
+ msgid "EXCLUDE PRODUCTS"
358
+ msgstr "ESCLUSIONE PRODOTTI"
359
+
360
+ #: templates/admin/premium.php:242
361
+ msgid ""
362
+ "Tailored options to limit the plugin features only to certain products. Some "
363
+ "of these could have too small images to be zoomed, or maybe being part of "
364
+ "categories that do not imply zoomed images. Select the products and the "
365
+ "categories to exclude and delete all your problems"
366
+ msgstr ""
367
+ "Opzioni su misura per limitare le funzionalità del plugin solo a determinati "
368
+ "prodotti. Alcuni di questi possono avere immagini troppo piccole per essere "
369
+ "zoomate o appartenere a categorie in cui lo zoom immagine non è necessario. "
370
+ "Seleziona i prodotti e le categorie da escludere e risolvi questo tipo di "
371
+ "problemi."
372
+
373
+ #: templates/admin/premium.php:251
374
+ #, php-format
375
+ msgid ""
376
+ "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
377
+ "%2$s to benefit from all features!"
378
+ msgstr ""
379
+ "Aggiorna alla %1$sversione premium%2$s di %1$s YITH WooCommerce Zoom "
380
+ "Magnifier %2$s per usufruire di tutte le funzionalità!"
381
+
382
+ #: templates/admin/premium.php:254
383
+ #, php-format
384
+ msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
385
+ msgstr "%1$sAGGIORNA%2$s %3$salla versione premium%2$s "
386
+
387
+ #: yit-common/yith-panel.php:418
388
+ msgid "Select a date"
389
+ msgstr "Scegli una data"
390
+
391
+ #: yit-common/yith-panel.php:419
392
+ msgid "Hours"
393
+ msgstr "Ore"
394
+
395
+ #: yit-common/yith-panel.php:420 yit-common/yith-panel.php:421
396
+ msgid "Minutes"
397
+ msgstr "Minuti"
398
+
399
+ #: yit-common/yith-panel.php:429
400
+ msgid "Upload"
401
+ msgstr "Carica"
402
+
403
+ #: yit-common/yith-panel.php:466
404
+ msgid "px"
405
+ msgstr "px"
406
+
407
+ #: yit-common/yith-panel.php:468
408
+ msgid "em"
409
+ msgstr "em"
410
+
411
+ #: yit-common/yith-panel.php:470
412
+ msgid "pt"
413
+ msgstr "pt"
414
+
415
+ #: yit-common/yith-panel.php:472
416
+ msgid "rem"
417
+ msgstr "rem"
418
+
419
+ #: yit-common/yith-panel.php:484
420
+ msgid "Select a font family"
421
+ msgstr "Scegli una famiglia di caratteri"
422
+
423
+ #: yit-common/yith-panel.php:494
424
+ msgid "Regular"
425
+ msgstr "Normale"
426
+
427
+ #: yit-common/yith-panel.php:496
428
+ msgid "Bold"
429
+ msgstr "Grassetto"
430
+
431
+ #: yit-common/yith-panel.php:498
432
+ msgid "Extra bold"
433
+ msgstr "Grassetto extra"
434
+
435
+ #: yit-common/yith-panel.php:500
436
+ msgid "Italic"
437
+ msgstr "Corsivo"
438
+
439
+ #: yit-common/yith-panel.php:502
440
+ msgid "Italic bold"
441
+ msgstr "Corsivo E Grassetto"
442
+
443
+ #: yit-common/yith-panel.php:518
444
+ msgid "Click to preview"
445
+ msgstr "Premi per visualizzare l'anteprima"
446
+
447
+ #~ msgid "Activate YITH Magnifier"
448
+ #~ msgstr "Attiva YITH Magnifier"
449
+
450
+ #~ msgid "Activate the plugin on mobile device"
451
+ #~ msgstr "Attiva il plugin su dispositivi mobili"
452
+
453
+ #~ msgid ""
454
+ #~ "Purchasing the premium version of the plugin, you will take advantage of "
455
+ #~ "the advanced features of the product and you will get one year of free "
456
+ #~ "updates and support through our platform available 24h/24."
457
+ #~ msgstr ""
458
+ #~ "Acquistando la versione premium del plugin potrai usufruire delle "
459
+ #~ "caratteristiche avanzate del prodotto, oltre a ottenere un anno di "
460
+ #~ "aggiornamenti gratuiti e di supporto attraverso la nostra piattaforma "
461
+ #~ "disponibile 24h/24."
462
+
463
+ #~ msgid "product"
464
+ #~ msgstr "prodotto"
465
+
466
+ #~ msgid "products"
467
+ #~ msgstr "prodotti"
468
+
469
+ #~ msgid "Product"
470
+ #~ msgstr "Prodotto"
471
+
472
+ #~ msgid "Remove from exclusions"
473
+ #~ msgstr "Rimuovi dalle esclusioni"
474
+
475
+ #~ msgid "Edit product"
476
+ #~ msgstr "Modifica prodotto"
477
+
478
+ #~ msgid "Remove from list"
479
+ #~ msgstr "Elimina dalla lista"
480
+
481
+ #~ msgid "%s product removed successfully"
482
+ #~ msgid_plural "%s products removed successfully"
483
+ #~ msgstr[0] "%s prodotto rimosso correttamente"
484
+ #~ msgstr[1] "%s prodotti rimossi correttamente"
485
+
486
+ #~ msgid "%s product added successfully"
487
+ #~ msgid_plural "%s products added successfully"
488
+ #~ msgstr[0] "%s prodotto aggiunto correttamente"
489
+ #~ msgstr[1] "%s prodotti aggiunti correttamente"
490
+
491
+ #~ msgid "Product updated successfully"
492
+ #~ msgstr "Prodotto aggiornato correttamente"
493
+
494
+ #~ msgid "Single Product Exclusion List"
495
+ #~ msgstr "Elenco Esclusioni Prodotti"
496
+
497
+ #~ msgid "Add Products"
498
+ #~ msgstr "Aggiungi Prodotto"
499
+
500
+ #~ msgid "Products to exclude"
501
+ #~ msgstr "Prodotti da escludere"
502
+
503
+ #~ msgid "Add product exclusion"
504
+ #~ msgstr "Aggiungi esclusione prodotto"
505
+
506
+ #~ msgid "Return to exclusion list"
507
+ #~ msgstr "Torno all'elenco esclusioni"
508
+
509
+ #~ msgid "Select at least one product"
510
+ #~ msgstr "Seleziona almeno un prodotto"
511
+
512
+ #~ msgid "Exclude product categories"
513
+ #~ msgstr "Escludi categorie di prodotti"
514
+
515
+ #~ msgid "Top"
516
+ #~ msgstr "Sopra"
517
+
518
+ #~ msgid "Bottom"
519
+ #~ msgstr "Sotto"
520
+
521
+ #~ msgid "Left"
522
+ #~ msgstr "Sinistra"
languages/yith-woocommerce-zoom-magnifier.pot CHANGED
@@ -1,401 +1,401 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: YITH WooCommerce Order Tracking\n"
5
- "POT-Creation-Date: 2016-06-13 16:57+0200\n"
6
- "PO-Revision-Date: 2015-04-22 12:25+0100\n"
7
- "Last-Translator: \n"
8
- "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
9
- "Language: en\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.4\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "Plural-Forms: nplurals=2; plural=n!=1;\n"
16
- "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
17
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
18
- "X-Poedit-SourceCharset: UTF-8\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
- "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
21
-
22
- #: class.yith-wcmg-admin.php:81
23
- msgid "Image Size"
24
- msgstr ""
25
-
26
- #: class.yith-wcmg-admin.php:82 plugin-options/general-options.php:17
27
- msgid "The size of the images used within the magnifier box"
28
- msgstr ""
29
-
30
- #: init.php:50
31
- msgid ""
32
- "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
33
- "WooCommerce in order to work."
34
- msgstr ""
35
-
36
- #: init.php:66
37
- msgid ""
38
- "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
39
- "you are using the premium one."
40
- msgstr ""
41
-
42
- #: lib/class.yith-ywzm-custom-types.php:159
43
- msgid "Do you want to hard crop the image?"
44
- msgstr ""
45
-
46
- #: lib/class.yith-ywzm-plugin-fw-loader.php:124
47
- msgid "General"
48
- msgstr ""
49
-
50
- #: lib/class.yith-ywzm-plugin-fw-loader.php:127
51
- #: lib/class.yith-ywzm-plugin-fw-loader.php:191
52
- msgid "Premium Version"
53
- msgstr ""
54
-
55
- #: lib/class.yith-ywzm-plugin-fw-loader.php:129
56
- msgid "Product exclusion list"
57
- msgstr ""
58
-
59
- #: lib/class.yith-ywzm-plugin-fw-loader.php:188
60
- msgid "Settings"
61
- msgstr ""
62
-
63
- #: lib/class.yith-ywzm-plugin-fw-loader.php:216
64
- msgid "Plugin Documentation"
65
- msgstr ""
66
-
67
- #: lib/class.yith-ywzm-plugin-fw-loader.php:229
68
- msgid ""
69
- "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
70
- "version with many new options, discover it now."
71
- msgstr ""
72
-
73
- #: lib/class.yith-ywzm-plugin-fw-loader.php:230
74
- msgid "Premium version"
75
- msgstr ""
76
-
77
- #: lib/class.yith-ywzm-plugin-fw-loader.php:237
78
- #: plugin-options/general-options.php:217
79
- msgid "YITH WooCommerce Zoom Magnifier"
80
- msgstr ""
81
-
82
- #: lib/class.yith-ywzm-plugin-fw-loader.php:238
83
- msgid ""
84
- "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
85
- "<br> From this menu you can access all settings of the YITH plugins "
86
- "activated."
87
- msgstr ""
88
-
89
- #: plugin-options/general-options.php:16
90
- msgid "Image size"
91
- msgstr ""
92
-
93
- #: plugin-options/general-options.php:36
94
- msgid "General Settings"
95
- msgstr ""
96
-
97
- #: plugin-options/general-options.php:42
98
- msgid "Activate YITH WooCommerce Zoom Magnifier"
99
- msgstr ""
100
-
101
- #: plugin-options/general-options.php:43
102
- msgid "Activate the plugin or use the WooCommerce default product image."
103
- msgstr ""
104
-
105
- #: plugin-options/general-options.php:50
106
- msgid "Activate on mobile device"
107
- msgstr ""
108
-
109
- #: plugin-options/general-options.php:51
110
- msgid ""
111
- "Set if zoom and slider functionalities should be shown also on mobile "
112
- "devices."
113
- msgstr ""
114
-
115
- #: plugin-options/general-options.php:59
116
- msgid "Forced Image Size"
117
- msgstr ""
118
-
119
- #: plugin-options/general-options.php:60
120
- msgid ""
121
- "If disabled, you will able to customize the sizes of the zoomed images. "
122
- "Disable it at your own risk; the magnifier could not properly work with "
123
- "images out of proportion."
124
- msgstr ""
125
-
126
- #: plugin-options/general-options.php:74
127
- msgid "Magnifier Settings"
128
- msgstr ""
129
-
130
- #: plugin-options/general-options.php:80
131
- msgid "Zoom Box Width"
132
- msgstr ""
133
-
134
- #: plugin-options/general-options.php:81
135
- msgid "The width of the magnifier box (default: auto)"
136
- msgstr ""
137
-
138
- #: plugin-options/general-options.php:88
139
- msgid "Zoom Box Height"
140
- msgstr ""
141
-
142
- #: plugin-options/general-options.php:89
143
- msgid "The height of the magnifier box (default: auto)"
144
- msgstr ""
145
-
146
- #: plugin-options/general-options.php:97
147
- msgid "Zoom Box Position"
148
- msgstr ""
149
-
150
- #: plugin-options/general-options.php:98
151
- msgid "The magnifier position"
152
- msgstr ""
153
-
154
- #: plugin-options/general-options.php:104
155
- msgid "Right"
156
- msgstr ""
157
-
158
- #: plugin-options/general-options.php:105
159
- #: plugin-options/general-options.php:117
160
- msgid "Inside"
161
- msgstr ""
162
-
163
- #: plugin-options/general-options.php:109
164
- msgid "Zoom Box Position for mobile devices"
165
- msgstr ""
166
-
167
- #: plugin-options/general-options.php:110
168
- msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
169
- msgstr ""
170
-
171
- #: plugin-options/general-options.php:116
172
- msgid "Default"
173
- msgstr ""
174
-
175
- #: plugin-options/general-options.php:118
176
- msgid "Disable"
177
- msgstr ""
178
-
179
- #: plugin-options/general-options.php:122
180
- msgid "Loading label"
181
- msgstr ""
182
-
183
- #: plugin-options/general-options.php:125
184
- #: plugin-options/general-options.php:126
185
- msgid "Loading..."
186
- msgstr ""
187
-
188
- #: plugin-options/general-options.php:131
189
- msgid "Lens Opacity"
190
- msgstr ""
191
-
192
- #: plugin-options/general-options.php:142
193
- msgid "Blur"
194
- msgstr ""
195
-
196
- #: plugin-options/general-options.php:143
197
- msgid "Add a blur effect to the small image on mouse hover."
198
- msgstr ""
199
-
200
- #: plugin-options/general-options.php:154
201
- msgid "Slider Settings"
202
- msgstr ""
203
-
204
- #: plugin-options/general-options.php:160
205
- msgid "Activate Slider"
206
- msgstr ""
207
-
208
- #: plugin-options/general-options.php:161
209
- msgid "Activate Thumbnail Slider."
210
- msgstr ""
211
-
212
- #: plugin-options/general-options.php:168
213
- msgid "Activate Responsive Slider"
214
- msgstr ""
215
-
216
- #: plugin-options/general-options.php:169
217
- msgid ""
218
- "This option fits the thumbnails within the available space. Disable it if "
219
- "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
220
- msgstr ""
221
-
222
- #: plugin-options/general-options.php:176
223
- msgid "Items"
224
- msgstr ""
225
-
226
- #: plugin-options/general-options.php:177
227
- msgid "Number of items to show"
228
- msgstr ""
229
-
230
- #: plugin-options/general-options.php:187
231
- msgid "Circular carousel"
232
- msgstr ""
233
-
234
- #: plugin-options/general-options.php:188
235
- msgid "It defines whether the carousel should be circular."
236
- msgstr ""
237
-
238
- #: plugin-options/general-options.php:195
239
- msgid "Infinite carousel"
240
- msgstr ""
241
-
242
- #: plugin-options/general-options.php:196
243
- msgid ""
244
- "It defines whether the carousel should be infinite. Note: It is possible to "
245
- "create a non-circular, infinite carousel, but it is not possible to create a "
246
- "circular, non-infinite carousel."
247
- msgstr ""
248
-
249
- #: plugin-options/general-options.php:214
250
- msgid "Upgrade to the PREMIUM VERSION"
251
- msgstr ""
252
-
253
- #: plugin-options/general-options.php:218
254
- msgid "Discover The Advanced Features"
255
- msgstr ""
256
-
257
- #: plugin-options/general-options.php:219
258
- msgid ""
259
- "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
260
- "from all features!"
261
- msgstr ""
262
-
263
- #: plugin-options/general-options.php:223
264
- msgid ""
265
- "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
266
- "action"
267
- msgstr ""
268
-
269
- #: plugin-options/general-options.php:225
270
- msgid "Get Support and Pro Features"
271
- msgstr ""
272
-
273
- #: plugin-options/general-options.php:226
274
- msgid ""
275
- "Purchasing the premium version of the plugin, you will take advantage of the "
276
- "advanced features of the product, and you will get one year of free updates "
277
- "and support through our platform available 24h/24."
278
- msgstr ""
279
-
280
- #: templates/admin/premium.php:193
281
- #, php-format
282
- msgid ""
283
- "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
284
- "Magnifier %2$s to benefit from all features!"
285
- msgstr ""
286
-
287
- #: templates/admin/premium.php:196
288
- #, php-format
289
- msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
290
- msgstr ""
291
-
292
- #: templates/admin/premium.php:202
293
- #, php-format
294
- msgid "%1$sPremium Features%2$s"
295
- msgstr ""
296
-
297
- #: templates/admin/premium.php:210
298
- msgid "ZOOM BOX POSITION"
299
- msgstr ""
300
-
301
- #: templates/admin/premium.php:213
302
- #, php-format
303
- msgid ""
304
- "Choose where you want to show the %1$szoomed version%2$s of the image of "
305
- "your products. Place it above or below the original image, on its left or "
306
- "its right, or you can even place it over it.$2$s"
307
- msgstr ""
308
-
309
- #: templates/admin/premium.php:223
310
- msgid "ENLARGE THE IMAGES"
311
- msgstr ""
312
-
313
- #: templates/admin/premium.php:225
314
- msgid ""
315
- "Just one click and the product image will appear in a bigger size in a modal "
316
- "window. A further chance to let users analyze in a better way what you sell."
317
- msgstr ""
318
-
319
- #: templates/admin/premium.php:240
320
- msgid "EXCLUDE PRODUCTS"
321
- msgstr ""
322
-
323
- #: templates/admin/premium.php:242
324
- msgid ""
325
- "Tailored options to limit the plugin features only to certain products. Some "
326
- "of these could have too small images to be zoomed, or maybe being part of "
327
- "categories that do not imply zoomed images. Select the products and the "
328
- "categories to exclude and delete all your problems"
329
- msgstr ""
330
-
331
- #: templates/admin/premium.php:251
332
- #, php-format
333
- msgid ""
334
- "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
335
- "%2$s to benefit from all features!"
336
- msgstr ""
337
-
338
- #: templates/admin/premium.php:254
339
- #, php-format
340
- msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
341
- msgstr ""
342
-
343
- #: yit-common/yith-panel.php:429
344
- msgid "Select a date"
345
- msgstr ""
346
-
347
- #: yit-common/yith-panel.php:430
348
- msgid "Hours"
349
- msgstr ""
350
-
351
- #: yit-common/yith-panel.php:431 yit-common/yith-panel.php:432
352
- msgid "Minutes"
353
- msgstr ""
354
-
355
- #: yit-common/yith-panel.php:440
356
- msgid "Upload"
357
- msgstr ""
358
-
359
- #: yit-common/yith-panel.php:477
360
- msgid "px"
361
- msgstr ""
362
-
363
- #: yit-common/yith-panel.php:479
364
- msgid "em"
365
- msgstr ""
366
-
367
- #: yit-common/yith-panel.php:481
368
- msgid "pt"
369
- msgstr ""
370
-
371
- #: yit-common/yith-panel.php:483
372
- msgid "rem"
373
- msgstr ""
374
-
375
- #: yit-common/yith-panel.php:495
376
- msgid "Select a font family"
377
- msgstr ""
378
-
379
- #: yit-common/yith-panel.php:505
380
- msgid "Regular"
381
- msgstr ""
382
-
383
- #: yit-common/yith-panel.php:507
384
- msgid "Bold"
385
- msgstr ""
386
-
387
- #: yit-common/yith-panel.php:509
388
- msgid "Extra bold"
389
- msgstr ""
390
-
391
- #: yit-common/yith-panel.php:511
392
- msgid "Italic"
393
- msgstr ""
394
-
395
- #: yit-common/yith-panel.php:513
396
- msgid "Italic bold"
397
- msgstr ""
398
-
399
- #: yit-common/yith-panel.php:529
400
- msgid "Click to preview"
401
- msgstr ""
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: YITH WooCommerce Order Tracking\n"
5
+ "POT-Creation-Date: 2016-06-13 16:57+0200\n"
6
+ "PO-Revision-Date: 2015-04-22 12:25+0100\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
9
+ "Language: en\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.4\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "Plural-Forms: nplurals=2; plural=n!=1;\n"
16
+ "X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
17
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPathExcluded-0: plugin-fw\n"
21
+
22
+ #: class.yith-wcmg-admin.php:81
23
+ msgid "Image Size"
24
+ msgstr ""
25
+
26
+ #: class.yith-wcmg-admin.php:82 plugin-options/general-options.php:17
27
+ msgid "The size of the images used within the magnifier box"
28
+ msgstr ""
29
+
30
+ #: init.php:50
31
+ msgid ""
32
+ "YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
33
+ "WooCommerce in order to work."
34
+ msgstr ""
35
+
36
+ #: init.php:66
37
+ msgid ""
38
+ "You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
39
+ "you are using the premium one."
40
+ msgstr ""
41
+
42
+ #: lib/class.yith-ywzm-custom-types.php:159
43
+ msgid "Do you want to hard crop the image?"
44
+ msgstr ""
45
+
46
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:124
47
+ msgid "General"
48
+ msgstr ""
49
+
50
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:127
51
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:191
52
+ msgid "Premium Version"
53
+ msgstr ""
54
+
55
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:129
56
+ msgid "Product exclusion list"
57
+ msgstr ""
58
+
59
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:188
60
+ msgid "Settings"
61
+ msgstr ""
62
+
63
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:216
64
+ msgid "Plugin Documentation"
65
+ msgstr ""
66
+
67
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:229
68
+ msgid ""
69
+ "YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
70
+ "version with many new options, discover it now."
71
+ msgstr ""
72
+
73
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:230
74
+ msgid "Premium version"
75
+ msgstr ""
76
+
77
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:237
78
+ #: plugin-options/general-options.php:217
79
+ msgid "YITH WooCommerce Zoom Magnifier"
80
+ msgstr ""
81
+
82
+ #: lib/class.yith-ywzm-plugin-fw-loader.php:238
83
+ msgid ""
84
+ "In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
85
+ "<br> From this menu you can access all settings of the YITH plugins "
86
+ "activated."
87
+ msgstr ""
88
+
89
+ #: plugin-options/general-options.php:16
90
+ msgid "Image size"
91
+ msgstr ""
92
+
93
+ #: plugin-options/general-options.php:36
94
+ msgid "General Settings"
95
+ msgstr ""
96
+
97
+ #: plugin-options/general-options.php:42
98
+ msgid "Activate YITH WooCommerce Zoom Magnifier"
99
+ msgstr ""
100
+
101
+ #: plugin-options/general-options.php:43
102
+ msgid "Activate the plugin or use the WooCommerce default product image."
103
+ msgstr ""
104
+
105
+ #: plugin-options/general-options.php:50
106
+ msgid "Activate on mobile device"
107
+ msgstr ""
108
+
109
+ #: plugin-options/general-options.php:51
110
+ msgid ""
111
+ "Set if zoom and slider functionalities should be shown also on mobile "
112
+ "devices."
113
+ msgstr ""
114
+
115
+ #: plugin-options/general-options.php:59
116
+ msgid "Forced Image Size"
117
+ msgstr ""
118
+
119
+ #: plugin-options/general-options.php:60
120
+ msgid ""
121
+ "If disabled, you will able to customize the sizes of the zoomed images. "
122
+ "Disable it at your own risk; the magnifier could not properly work with "
123
+ "images out of proportion."
124
+ msgstr ""
125
+
126
+ #: plugin-options/general-options.php:74
127
+ msgid "Magnifier Settings"
128
+ msgstr ""
129
+
130
+ #: plugin-options/general-options.php:80
131
+ msgid "Zoom Box Width"
132
+ msgstr ""
133
+
134
+ #: plugin-options/general-options.php:81
135
+ msgid "The width of the magnifier box (default: auto)"
136
+ msgstr ""
137
+
138
+ #: plugin-options/general-options.php:88
139
+ msgid "Zoom Box Height"
140
+ msgstr ""
141
+
142
+ #: plugin-options/general-options.php:89
143
+ msgid "The height of the magnifier box (default: auto)"
144
+ msgstr ""
145
+
146
+ #: plugin-options/general-options.php:97
147
+ msgid "Zoom Box Position"
148
+ msgstr ""
149
+
150
+ #: plugin-options/general-options.php:98
151
+ msgid "The magnifier position"
152
+ msgstr ""
153
+
154
+ #: plugin-options/general-options.php:104
155
+ msgid "Right"
156
+ msgstr ""
157
+
158
+ #: plugin-options/general-options.php:105
159
+ #: plugin-options/general-options.php:117
160
+ msgid "Inside"
161
+ msgstr ""
162
+
163
+ #: plugin-options/general-options.php:109
164
+ msgid "Zoom Box Position for mobile devices"
165
+ msgstr ""
166
+
167
+ #: plugin-options/general-options.php:110
168
+ msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
169
+ msgstr ""
170
+
171
+ #: plugin-options/general-options.php:116
172
+ msgid "Default"
173
+ msgstr ""
174
+
175
+ #: plugin-options/general-options.php:118
176
+ msgid "Disable"
177
+ msgstr ""
178
+
179
+ #: plugin-options/general-options.php:122
180
+ msgid "Loading label"
181
+ msgstr ""
182
+
183
+ #: plugin-options/general-options.php:125
184
+ #: plugin-options/general-options.php:126
185
+ msgid "Loading..."
186
+ msgstr ""
187
+
188
+ #: plugin-options/general-options.php:131
189
+ msgid "Lens Opacity"
190
+ msgstr ""
191
+
192
+ #: plugin-options/general-options.php:142
193
+ msgid "Blur"
194
+ msgstr ""
195
+
196
+ #: plugin-options/general-options.php:143
197
+ msgid "Add a blur effect to the small image on mouse hover."
198
+ msgstr ""
199
+
200
+ #: plugin-options/general-options.php:154
201
+ msgid "Slider Settings"
202
+ msgstr ""
203
+
204
+ #: plugin-options/general-options.php:160
205
+ msgid "Activate Slider"
206
+ msgstr ""
207
+
208
+ #: plugin-options/general-options.php:161
209
+ msgid "Activate Thumbnail Slider."
210
+ msgstr ""
211
+
212
+ #: plugin-options/general-options.php:168
213
+ msgid "Activate Responsive Slider"
214
+ msgstr ""
215
+
216
+ #: plugin-options/general-options.php:169
217
+ msgid ""
218
+ "This option fits the thumbnails within the available space. Disable it if "
219
+ "you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
220
+ msgstr ""
221
+
222
+ #: plugin-options/general-options.php:176
223
+ msgid "Items"
224
+ msgstr ""
225
+
226
+ #: plugin-options/general-options.php:177
227
+ msgid "Number of items to show"
228
+ msgstr ""
229
+
230
+ #: plugin-options/general-options.php:187
231
+ msgid "Circular carousel"
232
+ msgstr ""
233
+
234
+ #: plugin-options/general-options.php:188
235
+ msgid "It defines whether the carousel should be circular."
236
+ msgstr ""
237
+
238
+ #: plugin-options/general-options.php:195
239
+ msgid "Infinite carousel"
240
+ msgstr ""
241
+
242
+ #: plugin-options/general-options.php:196
243
+ msgid ""
244
+ "It defines whether the carousel should be infinite. Note: It is possible to "
245
+ "create a non-circular, infinite carousel, but it is not possible to create a "
246
+ "circular, non-infinite carousel."
247
+ msgstr ""
248
+
249
+ #: plugin-options/general-options.php:214
250
+ msgid "Upgrade to the PREMIUM VERSION"
251
+ msgstr ""
252
+
253
+ #: plugin-options/general-options.php:218
254
+ msgid "Discover The Advanced Features"
255
+ msgstr ""
256
+
257
+ #: plugin-options/general-options.php:219
258
+ msgid ""
259
+ "Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
260
+ "from all features!"
261
+ msgstr ""
262
+
263
+ #: plugin-options/general-options.php:223
264
+ msgid ""
265
+ "See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
266
+ "action"
267
+ msgstr ""
268
+
269
+ #: plugin-options/general-options.php:225
270
+ msgid "Get Support and Pro Features"
271
+ msgstr ""
272
+
273
+ #: plugin-options/general-options.php:226
274
+ msgid ""
275
+ "Purchasing the premium version of the plugin, you will take advantage of the "
276
+ "advanced features of the product, and you will get one year of free updates "
277
+ "and support through our platform available 24h/24."
278
+ msgstr ""
279
+
280
+ #: templates/admin/premium.php:193
281
+ #, php-format
282
+ msgid ""
283
+ "Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
284
+ "Magnifier %2$s to benefit from all features!"
285
+ msgstr ""
286
+
287
+ #: templates/admin/premium.php:196
288
+ #, php-format
289
+ msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
290
+ msgstr ""
291
+
292
+ #: templates/admin/premium.php:202
293
+ #, php-format
294
+ msgid "%1$sPremium Features%2$s"
295
+ msgstr ""
296
+
297
+ #: templates/admin/premium.php:210
298
+ msgid "ZOOM BOX POSITION"
299
+ msgstr ""
300
+
301
+ #: templates/admin/premium.php:213
302
+ #, php-format
303
+ msgid ""
304
+ "Choose where you want to show the %1$szoomed version%2$s of the image of "
305
+ "your products. Place it above or below the original image, on its left or "
306
+ "its right, or you can even place it over it.$2$s"
307
+ msgstr ""
308
+
309
+ #: templates/admin/premium.php:223
310
+ msgid "ENLARGE THE IMAGES"
311
+ msgstr ""
312
+
313
+ #: templates/admin/premium.php:225
314
+ msgid ""
315
+ "Just one click and the product image will appear in a bigger size in a modal "
316
+ "window. A further chance to let users analyze in a better way what you sell."
317
+ msgstr ""
318
+
319
+ #: templates/admin/premium.php:240
320
+ msgid "EXCLUDE PRODUCTS"
321
+ msgstr ""
322
+
323
+ #: templates/admin/premium.php:242
324
+ msgid ""
325
+ "Tailored options to limit the plugin features only to certain products. Some "
326
+ "of these could have too small images to be zoomed, or maybe being part of "
327
+ "categories that do not imply zoomed images. Select the products and the "
328
+ "categories to exclude and delete all your problems"
329
+ msgstr ""
330
+
331
+ #: templates/admin/premium.php:251
332
+ #, php-format
333
+ msgid ""
334
+ "Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
335
+ "%2$s to benefit from all features!"
336
+ msgstr ""
337
+
338
+ #: templates/admin/premium.php:254
339
+ #, php-format
340
+ msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
341
+ msgstr ""
342
+
343
+ #: yit-common/yith-panel.php:429
344
+ msgid "Select a date"
345
+ msgstr ""
346
+
347
+ #: yit-common/yith-panel.php:430
348
+ msgid "Hours"
349
+ msgstr ""
350
+
351
+ #: yit-common/yith-panel.php:431 yit-common/yith-panel.php:432
352
+ msgid "Minutes"
353
+ msgstr ""
354
+
355
+ #: yit-common/yith-panel.php:440
356
+ msgid "Upload"
357
+ msgstr ""
358
+
359
+ #: yit-common/yith-panel.php:477
360
+ msgid "px"
361
+ msgstr ""
362
+
363
+ #: yit-common/yith-panel.php:479
364
+ msgid "em"
365
+ msgstr ""
366
+
367
+ #: yit-common/yith-panel.php:481
368
+ msgid "pt"
369
+ msgstr ""
370
+
371
+ #: yit-common/yith-panel.php:483
372
+ msgid "rem"
373
+ msgstr ""
374
+
375
+ #: yit-common/yith-panel.php:495
376
+ msgid "Select a font family"
377
+ msgstr ""
378
+
379
+ #: yit-common/yith-panel.php:505
380
+ msgid "Regular"
381
+ msgstr ""
382
+
383
+ #: yit-common/yith-panel.php:507
384
+ msgid "Bold"
385
+ msgstr ""
386
+
387
+ #: yit-common/yith-panel.php:509
388
+ msgid "Extra bold"
389
+ msgstr ""
390
+
391
+ #: yit-common/yith-panel.php:511
392
+ msgid "Italic"
393
+ msgstr ""
394
+
395
+ #: yit-common/yith-panel.php:513
396
+ msgid "Italic bold"
397
+ msgstr ""
398
+
399
+ #: yit-common/yith-panel.php:529
400
+ msgid "Click to preview"
401
+ msgstr ""
lib/class.yith-woocommerce-zoom-magnifier.php CHANGED
@@ -1,167 +1,167 @@
1
- <?php
2
- /**
3
- * Main class
4
- *
5
- * @author Your Inspiration Themes
6
- * @package YITH WooCommerce Zoom Magnifier
7
- * @version 1.1.2
8
- */
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit;
12
- } // Exit if accessed directly
13
-
14
-
15
- if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
16
- /**
17
- * YITH WooCommerce Zoom Magnifier
18
- *
19
- * @since 1.0.0
20
- */
21
- class YITH_WooCommerce_Zoom_Magnifier {
22
-
23
- /**
24
- * Plugin object
25
- *
26
- * @var string
27
- * @since 1.0.0
28
- */
29
- public $obj = null;
30
-
31
- /**
32
- * @var string Premium version landing link
33
- */
34
- protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
35
-
36
- /**
37
- * @var string Plugin official documentation
38
- */
39
- protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
40
-
41
- /**
42
- * @var string Plugin panel page
43
- */
44
- protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
45
-
46
- /**
47
- * Constructor
48
- *
49
- * @return mixed|YITH_WCMG_Admin|YITH_WCMG_Frontend
50
- * @since 1.0.0
51
- */
52
- public function __construct() {
53
- /** Stop the plugin on mobile devices */
54
- if ( ( 'yes' != get_option( 'yith_wcmg_enable_mobile' ) ) && wp_is_mobile() ) {
55
- return;
56
- }
57
-
58
- add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', array(
59
- $this,
60
- 'yith_wc_zoom_magnifier_get_main_image_call_back'
61
- ), 10 );
62
-
63
- add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', array(
64
- $this,
65
- 'yith_wc_zoom_magnifier_get_main_image_call_back'
66
- ), 10 );
67
-
68
- // actions
69
- add_action( 'init', array( $this, 'init' ) );
70
-
71
- if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
72
- $this->obj = new YITH_WCMG_Admin( );
73
- } else {
74
- $this->obj = new YITH_WCMG_Frontend( );
75
- }
76
-
77
- return $this->obj;
78
- }
79
-
80
- /**
81
- * Ajax method to retrieve the product main imavge
82
- *
83
- * @access public
84
- * @author Daniel Sanchez Saez
85
- * @since 1.3.3
86
- */
87
- public function yith_wc_zoom_magnifier_get_main_image_call_back(){
88
-
89
- $product_id = ( isset( $_POST[ 'product_id' ] ) ? $_POST[ 'product_id' ] : 0 );
90
-
91
- $url = wp_get_attachment_image_src ( get_post_thumbnail_id ( $product_id ), "full" );
92
-
93
- $response = array(
94
- "url" => $url[ 0 ],
95
- );
96
- wp_send_json( $response );
97
-
98
- }
99
-
100
- /**
101
- * Init method:
102
- * - default options
103
- *
104
- * @access public
105
- * @since 1.0.0
106
- */
107
- public function init() {
108
-
109
- $this->_image_sizes();
110
-
111
- /* === Show Plugin Information === */
112
-
113
- add_filter( 'plugin_action_links_' . plugin_basename( YITH_YWZM_DIR . '/' . basename( YITH_YWZM_FILE ) ), array( $this, 'action_links' ) );
114
-
115
- add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
116
-
117
- }
118
-
119
-
120
- /**
121
- * Add image sizes
122
- *
123
- * Init images
124
- *
125
- * @access protected
126
- * @return void
127
- * @since 1.0.0
128
- */
129
- protected function _image_sizes() {
130
- $size = get_option( 'woocommerce_magnifier_image' );
131
- $width = $size['width'];
132
- $height = $size['height'];
133
- $crop = isset( $size['crop'] ) ? true : false;
134
-
135
- add_image_size( 'shop_magnifier', $width, $height, $crop );
136
- }
137
-
138
- /**
139
- * Action links
140
- *
141
- *
142
- * @return void
143
- * @since 1.3.5
144
- * @author Daniel Sanchez <daniel.sanchez@yithemes.com>
145
- */
146
- public function action_links( $links ) {
147
- $links = yith_add_action_links( $links, $this->_panel_page, false );
148
- return $links;
149
- }
150
- /**
151
- * Plugin Row Meta
152
- *
153
- *
154
- * @return void
155
- * @since 1.3.5
156
- * @author Daniel Sanchez <daniel.sanchez@yithemes.com>
157
- */
158
- public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_YWZM_FREE_INIT' ) {
159
- if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
160
- $new_row_meta_args['slug'] = YITH_YWZM_SLUG;
161
- }
162
-
163
- return $new_row_meta_args;
164
- }
165
-
166
- }
167
  }
1
+ <?php
2
+ /**
3
+ * Main class
4
+ *
5
+ * @author Your Inspiration Themes
6
+ * @package YITH WooCommerce Zoom Magnifier
7
+ * @version 1.1.2
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ } // Exit if accessed directly
13
+
14
+
15
+ if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
16
+ /**
17
+ * YITH WooCommerce Zoom Magnifier
18
+ *
19
+ * @since 1.0.0
20
+ */
21
+ class YITH_WooCommerce_Zoom_Magnifier {
22
+
23
+ /**
24
+ * Plugin object
25
+ *
26
+ * @var string
27
+ * @since 1.0.0
28
+ */
29
+ public $obj = null;
30
+
31
+ /**
32
+ * @var string Premium version landing link
33
+ */
34
+ protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
35
+
36
+ /**
37
+ * @var string Plugin official documentation
38
+ */
39
+ protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
40
+
41
+ /**
42
+ * @var string Plugin panel page
43
+ */
44
+ protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
45
+
46
+ /**
47
+ * Constructor
48
+ *
49
+ * @return mixed|YITH_WCMG_Admin|YITH_WCMG_Frontend
50
+ * @since 1.0.0
51
+ */
52
+ public function __construct() {
53
+ /** Stop the plugin on mobile devices */
54
+ if ( ( 'yes' != get_option( 'yith_wcmg_enable_mobile' ) ) && wp_is_mobile() ) {
55
+ return;
56
+ }
57
+
58
+ add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', array(
59
+ $this,
60
+ 'yith_wc_zoom_magnifier_get_main_image_call_back'
61
+ ), 10 );
62
+
63
+ add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', array(
64
+ $this,
65
+ 'yith_wc_zoom_magnifier_get_main_image_call_back'
66
+ ), 10 );
67
+
68
+ // actions
69
+ add_action( 'init', array( $this, 'init' ) );
70
+
71
+ if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
72
+ $this->obj = new YITH_WCMG_Admin( );
73
+ } else {
74
+ $this->obj = new YITH_WCMG_Frontend( );
75
+ }
76
+
77
+ return $this->obj;
78
+ }
79
+
80
+ /**
81
+ * Ajax method to retrieve the product main imavge
82
+ *
83
+ * @access public
84
+ * @author Daniel Sanchez Saez
85
+ * @since 1.3.3
86
+ */
87
+ public function yith_wc_zoom_magnifier_get_main_image_call_back(){
88
+
89
+ $product_id = ( isset( $_POST[ 'product_id' ] ) ? $_POST[ 'product_id' ] : 0 );
90
+
91
+ $url = wp_get_attachment_image_src ( get_post_thumbnail_id ( $product_id ), "full" );
92
+
93
+ $response = array(
94
+ "url" => $url[ 0 ],
95
+ );
96
+ wp_send_json( $response );
97
+
98
+ }
99
+
100
+ /**
101
+ * Init method:
102
+ * - default options
103
+ *
104
+ * @access public
105
+ * @since 1.0.0
106
+ */
107
+ public function init() {
108
+
109
+ $this->_image_sizes();
110
+
111
+ /* === Show Plugin Information === */
112
+
113
+ add_filter( 'plugin_action_links_' . plugin_basename( YITH_YWZM_DIR . '/' . basename( YITH_YWZM_FILE ) ), array( $this, 'action_links' ) );
114
+
115
+ add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
116
+
117
+ }
118
+
119
+
120
+ /**
121
+ * Add image sizes
122
+ *
123
+ * Init images
124
+ *
125
+ * @access protected
126
+ * @return void
127
+ * @since 1.0.0
128
+ */
129
+ protected function _image_sizes() {
130
+ $size = get_option( 'woocommerce_magnifier_image' );
131
+ $width = $size['width'];
132
+ $height = $size['height'];
133
+ $crop = isset( $size['crop'] ) ? true : false;
134
+
135
+ add_image_size( 'shop_magnifier', $width, $height, $crop );
136
+ }
137
+
138
+ /**
139
+ * Action links
140
+ *
141
+ *
142
+ * @return void
143
+ * @since 1.3.5
144
+ * @author Daniel Sanchez <daniel.sanchez@yithemes.com>
145
+ */
146
+ public function action_links( $links ) {
147
+ $links = yith_add_action_links( $links, $this->_panel_page, false );
148
+ return $links;
149
+ }
150
+ /**
151
+ * Plugin Row Meta
152
+ *
153
+ *
154
+ * @return void
155
+ * @since 1.3.5
156
+ * @author Daniel Sanchez <daniel.sanchez@yithemes.com>
157
+ */
158
+ public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_YWZM_FREE_INIT' ) {
159
+ if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
160
+ $new_row_meta_args['slug'] = YITH_YWZM_SLUG;
161
+ }
162
+
163
+ return $new_row_meta_args;
164
+ }
165
+
166
+ }
167
  }
lib/class.yith-ywzm-custom-types.php CHANGED
@@ -1,181 +1,181 @@
1
- <?php
2
- if (!defined('ABSPATH')) {
3
- exit; // Exit if accessed directly
4
- }
5
-
6
- if (!class_exists('YITH_YWZM_Custom_Types')) {
7
-
8
- /**
9
- * custom types fields
10
- *
11
- * @class YITH_YWZM_Custom_Types
12
- * @package Yithemes
13
- * @since 1.0.0
14
- * @author Your Inspiration Themes
15
- */
16
- class YITH_YWZM_Custom_Types
17
- {
18
-
19
- /**
20
- * Single instance of the class
21
- *
22
- * @since 1.0.0
23
- */
24
- protected static $instance;
25
-
26
- /**
27
- * Returns single instance of the class
28
- *
29
- * @since 1.0.0
30
- */
31
- public static function get_instance()
32
- {
33
- if (is_null(self::$instance)) {
34
- self::$instance = new self();
35
- }
36
-
37
- return self::$instance;
38
- }
39
-
40
- public function __construct()
41
- {
42
- /**
43
- * Register actions and filters for custom types used on the current plugin
44
- */
45
-
46
- /** Custom types : slider */
47
- add_action('woocommerce_admin_field_slider', array($this, 'admin_fields_slider'));
48
-
49
- add_action('woocommerce_admin_field_yith_ywzm_image_width', array(
50
- $this,
51
- 'admin_fields_yith_ywzm_image_width'
52
- ));
53
- }
54
-
55
- /**
56
- * Create new Woocommerce admin field: slider
57
- *
58
- * @access public
59
- *
60
- * @param array $value
61
- *
62
- * @return void
63
- * @since 1.0.0
64
- */
65
- public function admin_fields_slider($value)
66
- {
67
- $slider_value = (get_option($value['id']) !== false && get_option($value['id']) !== null) ?
68
- esc_attr(stripslashes(get_option($value['id']))) :
69
- esc_attr($value['std']);
70
-
71
- ?>
72
- <tr valign="top">
73
- <th scope="row" class="titledesc">
74
- <label for="<?php echo esc_attr($value['id']); ?>"><?php echo $value['name']; ?></label>
75
- </th>
76
- <td class="forminp">
77
- <div id="<?php echo esc_attr($value['id']); ?>_slider" class="yith_woocommerce_slider"
78
- style="width: 300px; float: left;"></div>
79
- <div id="<?php echo esc_attr($value['id']); ?>_value"
80
- class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
81
- <input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"
82
- type="hidden" value="<?php echo $slider_value ?>"/> <?php echo $value['desc']; ?>
83
- </td>
84
- </tr>
85
-
86
-
87
- <script>
88
- jQuery(document).ready(function ($) {
89
- $('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
90
- min: <?php echo $value['min'] ?>,
91
- max: <?php echo $value['max'] ?>,
92
- step: <?php echo $value['step'] ?>,
93
- value: <?php echo $slider_value ?>,
94
- slide: function (event, ui) {
95
- $("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
96
- $("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
97
- }
98
- });
99
- });
100
- </script>
101
-
102
- <?php
103
- }
104
-
105
- /**
106
- * Save the admin field: slider
107
- *
108
- * @access public
109
- *
110
- * @param mixed $value
111
- *
112
- * @return void
113
- * @since 1.0.0
114
- */
115
- public function admin_update_option($value)
116
- {
117
- global $woocommerce;
118
-
119
- if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) {
120
- $wc_clean = 'woocommerce_clean';
121
- } else {
122
- $wc_clean = 'wc_clean';
123
- }
124
-
125
- update_option($value['id'], $wc_clean($_POST[$value['id']]));
126
- }
127
-
128
-
129
- /**
130
- * Create new Woocommerce admin field: yith_ywzm_image_width
131
- *
132
- * @access public
133
- * @param array $value
134
- * @return void
135
- * @since 1.1.3
136
- */
137
- public function admin_fields_yith_ywzm_image_width($value)
138
- {
139
-
140
- $width = WC_Admin_Settings::get_option($value['id'] . '[width]', $value['default']['width']);
141
- $height = WC_Admin_Settings::get_option($value['id'] . '[height]', $value['default']['height']);
142
- $crop = WC_Admin_Settings::get_option($value['id'] . '[crop]');
143
- $crop = ($crop == 'on' || $crop == '1') ? 1 : 0;
144
- $crop = checked(1, $crop, false);
145
-
146
- ?>
147
- <tr valign="top">
148
- <th scope="row" class="titledesc"><?php echo esc_html($value['title']) ?></th>
149
- <td class="forminp image_width_settings">
150
- <input name="<?php echo esc_attr($value['id']); ?>[width]"
151
- id="<?php echo esc_attr($value['id']); ?>-width" type="text" size="3"
152
- value="<?php echo $width; ?>"/> &times; <input
153
- name="<?php echo esc_attr($value['id']); ?>[height]"
154
- id="<?php echo esc_attr($value['id']); ?>-height" type="text" size="3"
155
- value="<?php echo $height; ?>"/>px <span class="description"><?php echo $value['desc'] ?></span>
156
- <br>
157
- <label><input name="<?php echo esc_attr($value['id']); ?>[crop]"
158
- id="<?php echo esc_attr($value['id']); ?>-crop"
159
- type="checkbox" <?php echo $crop; ?> /> <?php _e('Do you want to hard crop the image?', 'woocommerce'); ?>
160
- </label>
161
-
162
- </td>
163
- </tr><?php
164
-
165
- }
166
-
167
- /**
168
- * Update plugin options.
169
- *
170
- * @return void
171
- * @since 1.0.0
172
- */
173
- public function update_options()
174
- {
175
- foreach ($this->options as $option) {
176
- woocommerce_update_options($option);
177
- }
178
- }
179
-
180
- }
181
  }
1
+ <?php
2
+ if (!defined('ABSPATH')) {
3
+ exit; // Exit if accessed directly
4
+ }
5
+
6
+ if (!class_exists('YITH_YWZM_Custom_Types')) {
7
+
8
+ /**
9
+ * custom types fields
10
+ *
11
+ * @class YITH_YWZM_Custom_Types
12
+ * @package Yithemes
13
+ * @since 1.0.0
14
+ * @author Your Inspiration Themes
15
+ */
16
+ class YITH_YWZM_Custom_Types
17
+ {
18
+
19
+ /**
20
+ * Single instance of the class
21
+ *
22
+ * @since 1.0.0
23
+ */
24
+ protected static $instance;
25
+
26
+ /**
27
+ * Returns single instance of the class
28
+ *
29
+ * @since 1.0.0
30
+ */
31
+ public static function get_instance()
32
+ {
33
+ if (is_null(self::$instance)) {
34
+ self::$instance = new self();
35
+ }
36
+
37
+ return self::$instance;
38
+ }
39
+
40
+ public function __construct()
41
+ {
42
+ /**
43
+ * Register actions and filters for custom types used on the current plugin
44
+ */
45
+
46
+ /** Custom types : slider */
47
+ add_action('woocommerce_admin_field_slider', array($this, 'admin_fields_slider'));
48
+
49
+ add_action('woocommerce_admin_field_yith_ywzm_image_width', array(
50
+ $this,
51
+ 'admin_fields_yith_ywzm_image_width'
52
+ ));
53
+ }
54
+
55
+ /**
56
+ * Create new Woocommerce admin field: slider
57
+ *
58
+ * @access public
59
+ *
60
+ * @param array $value
61
+ *
62
+ * @return void
63
+ * @since 1.0.0
64
+ */
65
+ public function admin_fields_slider($value)
66
+ {
67
+ $slider_value = (get_option($value['id']) !== false && get_option($value['id']) !== null) ?
68
+ esc_attr(stripslashes(get_option($value['id']))) :
69
+ esc_attr($value['std']);
70
+
71
+ ?>
72
+ <tr valign="top">
73
+ <th scope="row" class="titledesc">
74
+ <label for="<?php echo esc_attr($value['id']); ?>"><?php echo $value['name']; ?></label>
75
+ </th>
76
+ <td class="forminp">
77
+ <div id="<?php echo esc_attr($value['id']); ?>_slider" class="yith_woocommerce_slider"
78
+ style="width: 300px; float: left;"></div>
79
+ <div id="<?php echo esc_attr($value['id']); ?>_value"
80
+ class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
81
+ <input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"
82
+ type="hidden" value="<?php echo $slider_value ?>"/> <?php echo $value['desc']; ?>
83
+ </td>
84
+ </tr>
85
+
86
+
87
+ <script>
88
+ jQuery(document).ready(function ($) {
89
+ $('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
90
+ min: <?php echo $value['min'] ?>,
91
+ max: <?php echo $value['max'] ?>,
92
+ step: <?php echo $value['step'] ?>,
93
+ value: <?php echo $slider_value ?>,
94
+ slide: function (event, ui) {
95
+ $("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
96
+ $("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
97
+ }
98
+ });
99
+ });
100
+ </script>
101
+
102
+ <?php
103
+ }
104
+
105
+ /**
106
+ * Save the admin field: slider
107
+ *
108
+ * @access public
109
+ *
110
+ * @param mixed $value
111
+ *
112
+ * @return void
113
+ * @since 1.0.0
114
+ */
115
+ public function admin_update_option($value)
116
+ {
117
+ global $woocommerce;
118
+
119
+ if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) {
120
+ $wc_clean = 'woocommerce_clean';
121
+ } else {
122
+ $wc_clean = 'wc_clean';
123
+ }
124
+
125
+ update_option($value['id'], $wc_clean($_POST[$value['id']]));
126
+ }
127
+
128
+
129
+ /**
130
+ * Create new Woocommerce admin field: yith_ywzm_image_width
131
+ *
132
+ * @access public
133
+ * @param array $value
134
+ * @return void
135
+ * @since 1.1.3
136
+ */
137
+ public function admin_fields_yith_ywzm_image_width($value)
138
+ {
139
+
140
+ $width = WC_Admin_Settings::get_option($value['id'] . '[width]', $value['default']['width']);
141
+ $height = WC_Admin_Settings::get_option($value['id'] . '[height]', $value['default']['height']);
142
+ $crop = WC_Admin_Settings::get_option($value['id'] . '[crop]');
143
+ $crop = ($crop == 'on' || $crop == '1') ? 1 : 0;
144
+ $crop = checked(1, $crop, false);
145
+
146
+ ?>
147
+ <tr valign="top">
148
+ <th scope="row" class="titledesc"><?php echo esc_html($value['title']) ?></th>
149
+ <td class="forminp image_width_settings">
150
+ <input name="<?php echo esc_attr($value['id']); ?>[width]"
151
+ id="<?php echo esc_attr($value['id']); ?>-width" type="text" size="3"
152
+ value="<?php echo $width; ?>"/> &times; <input
153
+ name="<?php echo esc_attr($value['id']); ?>[height]"
154
+ id="<?php echo esc_attr($value['id']); ?>-height" type="text" size="3"
155
+ value="<?php echo $height; ?>"/>px <span class="description"><?php echo $value['desc'] ?></span>
156
+ <br>
157
+ <label><input name="<?php echo esc_attr($value['id']); ?>[crop]"
158
+ id="<?php echo esc_attr($value['id']); ?>-crop"
159
+ type="checkbox" <?php echo $crop; ?> /> <?php _e('Do you want to hard crop the image?', 'woocommerce'); ?>
160
+ </label>
161
+
162
+ </td>
163
+ </tr><?php
164
+
165
+ }
166
+
167
+ /**
168
+ * Update plugin options.
169
+ *
170
+ * @return void
171
+ * @since 1.0.0
172
+ */
173
+ public function update_options()
174
+ {
175
+ foreach ($this->options as $option) {
176
+ woocommerce_update_options($option);
177
+ }
178
+ }
179
+
180
+ }
181
  }
lib/class.yith-ywzm-plugin-fw-loader.php CHANGED
@@ -1,250 +1,250 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit; // Exit if accessed directly
4
- }
5
-
6
- if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
7
-
8
- /**
9
- * Implements features related to an invoice document
10
- *
11
- * @class YITH_YWZM_Plugin_FW_Loader
12
- * @package Yithemes
13
- * @since 1.0.0
14
- * @author Lorenzo Giuffrida
15
- */
16
- class YITH_YWZM_Plugin_FW_Loader {
17
-
18
- /**
19
- * @var $_panel Panel Object
20
- */
21
- protected $_panel;
22
-
23
- /**
24
- * @var $_premium string Premium tab template file name
25
- */
26
- protected $_premium = 'premium.php';
27
-
28
- /**
29
- * @var string Premium version landing link
30
- */
31
- protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
32
-
33
- /**
34
- * @var string Plugin official documentation
35
- */
36
- protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
37
-
38
- /**
39
- * @var string Plugin panel page
40
- */
41
- protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
42
-
43
- /**
44
- * Single instance of the class
45
- *
46
- * @since 1.0.0
47
- */
48
- protected static $instance;
49
-
50
- /**
51
- * Returns single instance of the class
52
- *
53
- * @since 1.0.0
54
- */
55
- public static function get_instance() {
56
- if ( is_null( self::$instance ) ) {
57
- self::$instance = new self();
58
- }
59
-
60
- return self::$instance;
61
- }
62
-
63
- public function __construct() {
64
- /**
65
- * Register actions and filters to be used for creating an entry on YIT Plugin menu
66
- */
67
- add_action( 'admin_init', array( $this, 'register_pointer' ) );
68
-
69
- add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
70
-
71
- // Add stylesheets and scripts files
72
- add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
73
-
74
- if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
75
- // Show plugin premium tab
76
- add_action( 'yith_zoom_magnifier_premium', array( $this, 'premium_tab' ) );
77
- } else {
78
-
79
- /**
80
- * register plugin to licence/update system
81
- */
82
- $this->licence_activation();
83
- }
84
- }
85
-
86
-
87
- /**
88
- * Load YIT core plugin
89
- *
90
- * @since 1.0
91
- * @access public
92
- * @return void
93
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
94
- */
95
- public function plugin_fw_loader() {
96
- if ( !defined( 'YIT_CORE_PLUGIN' ) ) {
97
- global $plugin_fw_data;
98
- if ( !empty( $plugin_fw_data ) ) {
99
- $plugin_fw_file = array_shift( $plugin_fw_data );
100
- require_once( $plugin_fw_file );
101
- }
102
- }
103
- }
104
-
105
- /**
106
- * Add a panel under YITH Plugins tab
107
- *
108
- * @return void
109
- * @since 1.0
110
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
111
- * @use /Yit_Plugin_Panel class
112
- * @see plugin-fw/lib/yit-plugin-panel.php
113
- */
114
- public function register_panel() {
115
-
116
- if ( ! empty( $this->_panel ) ) {
117
- return;
118
- }
119
-
120
- $admin_tabs['general'] = __( 'General', 'yith-woocommerce-zoom-magnifier' );
121
-
122
- if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
123
- $admin_tabs['premium-landing'] = __( 'Premium Version', 'yith-woocommerce-zoom-magnifier' );
124
- } else {
125
- $admin_tabs['exclusions'] = __( 'Product exclusion list', 'yith-woocommerce-zoom-magnifier' );
126
- }
127
-
128
- $args = array(
129
- 'create_menu_page' => true,
130
- 'parent_slug' => '',
131
- 'page_title' => 'Zoom magnifier',
132
- 'menu_title' => 'Zoom magnifier',
133
- 'capability' => 'manage_options',
134
- 'parent' => '',
135
- 'parent_page' => 'yit_plugin_panel',
136
- 'page' => $this->_panel_page,
137
- 'admin-tabs' => $admin_tabs,
138
- 'options-path' => YITH_YWZM_DIR . '/plugin-options'
139
- );
140
-
141
- /* === Fixed: not updated theme === */
142
- if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
143
-
144
- require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
145
- }
146
-
147
- $this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
148
-
149
- /** Add custom types actions and filters */
150
- YITH_YWZM_Custom_Types::get_instance();
151
- }
152
-
153
- /**
154
- * Premium Tab Template
155
- *
156
- * Load the premium tab template on admin page
157
- *
158
- * @return void
159
- * @since 1.0
160
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
161
- * @return void
162
- */
163
- public function premium_tab() {
164
- $premium_tab_template = YITH_YWZM_TEMPLATE_DIR . '/admin/' . $this->_premium;
165
- if ( file_exists( $premium_tab_template ) ) {
166
- include_once( $premium_tab_template );
167
- }
168
- }
169
-
170
- public function register_pointer() {
171
- if ( ! class_exists( 'YIT_Pointers' ) ) {
172
- include_once( 'plugin-fw/lib/yit-pointers.php' );
173
- }
174
-
175
- $premium_message = defined( 'YITH_YWZM_PREMIUM' )
176
- ? ''
177
- : __( 'YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM version with many new options, discover it now.', 'yith-woocommerce-zoom-magnifier' ) .
178
- ' <a href="' . $this->_premium_landing . '">' . __( 'Premium version', 'yith-woocommerce-zoom-magnifier' ) . '</a>';
179
-
180
- $args[] = array(
181
- 'screen_id' => 'plugins',
182
- 'pointer_id' => 'yith_woocommerce_zoom-magnifier',
183
- 'target' => '#toplevel_page_yit_plugin_panel',
184
- 'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
185
- __( 'YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier' ),
186
- __( 'In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options.<br> From this menu you can access all settings of the YITH plugins activated.', 'yith-woocommerce-zoom-magnifier' ) . '<br>' . $premium_message
187
- ),
188
- 'position' => array( 'edge' => 'left', 'align' => 'center' ),
189
- 'init' => defined( 'YITH_YWZM_PREMIUM' ) ? YITH_YWZM_INIT : YITH_YWZM_FREE_INIT
190
- );
191
-
192
- YIT_Pointers()->register( $args );
193
- }
194
-
195
- /**
196
- * Get the premium landing uri
197
- *
198
- * @since 1.0.0
199
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
200
- * @return string The premium landing link
201
- */
202
- public function get_premium_landing_uri() {
203
- return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing . '?refer_id=1030585';
204
- }
205
-
206
- //region **** licence related methods ****
207
-
208
- /**
209
- * Add actions to manage licence activation and updates
210
- */
211
- public function licence_activation() {
212
- if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
213
- return;
214
- }
215
-
216
- add_action( 'wp_loaded', array( $this, 'register_plugin_for_activation' ), 99 );
217
- add_action( 'admin_init', array( $this, 'register_plugin_for_updates' ) );
218
- }
219
-
220
- /**
221
- * Register plugins for activation tab
222
- *
223
- * @return void
224
- * @since 2.0.0
225
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
226
- */
227
- public function register_plugin_for_activation() {
228
- if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
229
- require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-licence.php';
230
- require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-plugin-licence.php';
231
- }
232
- YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
233
- }
234
-
235
- /**
236
- * Register plugins for update tab
237
- *
238
- * @return void
239
- * @since 2.0.0
240
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
241
- */
242
- public function register_plugin_for_updates() {
243
- if ( ! class_exists( 'YIT_Upgrade' ) ) {
244
- require_once 'plugin-fw/lib/yit-upgrade.php';
245
- }
246
- YIT_Upgrade()->register( YITH_YWZM_SLUG, YITH_YWZM_INIT );
247
- }
248
- //endregion
249
- }
250
  }
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit; // Exit if accessed directly
4
+ }
5
+
6
+ if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
7
+
8
+ /**
9
+ * Implements features related to an invoice document
10
+ *
11
+ * @class YITH_YWZM_Plugin_FW_Loader
12
+ * @package Yithemes
13
+ * @since 1.0.0
14
+ * @author Lorenzo Giuffrida
15
+ */
16
+ class YITH_YWZM_Plugin_FW_Loader {
17
+
18
+ /**
19
+ * @var $_panel Panel Object
20
+ */
21
+ protected $_panel;
22
+
23
+ /**
24
+ * @var $_premium string Premium tab template file name
25
+ */
26
+ protected $_premium = 'premium.php';
27
+
28
+ /**
29
+ * @var string Premium version landing link
30
+ */
31
+ protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
32
+
33
+ /**
34
+ * @var string Plugin official documentation
35
+ */
36
+ protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
37
+
38
+ /**
39
+ * @var string Plugin panel page
40
+ */
41
+ protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
42
+
43
+ /**
44
+ * Single instance of the class
45
+ *
46
+ * @since 1.0.0
47
+ */
48
+ protected static $instance;
49
+
50
+ /**
51
+ * Returns single instance of the class
52
+ *
53
+ * @since 1.0.0
54
+ */
55
+ public static function get_instance() {
56
+ if ( is_null( self::$instance ) ) {
57
+ self::$instance = new self();
58
+ }
59
+
60
+ return self::$instance;
61
+ }
62
+
63
+ public function __construct() {
64
+ /**
65
+ * Register actions and filters to be used for creating an entry on YIT Plugin menu
66
+ */
67
+ add_action( 'admin_init', array( $this, 'register_pointer' ) );
68
+
69
+ add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
70
+
71
+ // Add stylesheets and scripts files
72
+ add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
73
+
74
+ if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
75
+ // Show plugin premium tab
76
+ add_action( 'yith_zoom_magnifier_premium', array( $this, 'premium_tab' ) );
77
+ } else {
78
+
79
+ /**
80
+ * register plugin to licence/update system
81
+ */
82
+ $this->licence_activation();
83
+ }
84
+ }
85
+
86
+
87
+ /**
88
+ * Load YIT core plugin
89
+ *
90
+ * @since 1.0
91
+ * @access public
92
+ * @return void
93
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
94
+ */
95
+ public function plugin_fw_loader() {
96
+ if ( !defined( 'YIT_CORE_PLUGIN' ) ) {
97
+ global $plugin_fw_data;
98
+ if ( !empty( $plugin_fw_data ) ) {
99
+ $plugin_fw_file = array_shift( $plugin_fw_data );
100
+ require_once( $plugin_fw_file );
101
+ }
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Add a panel under YITH Plugins tab
107
+ *
108
+ * @return void
109
+ * @since 1.0
110
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
111
+ * @use /Yit_Plugin_Panel class
112
+ * @see plugin-fw/lib/yit-plugin-panel.php
113
+ */
114
+ public function register_panel() {
115
+
116
+ if ( ! empty( $this->_panel ) ) {
117
+ return;
118
+ }
119
+
120
+ $admin_tabs['general'] = __( 'General', 'yith-woocommerce-zoom-magnifier' );
121
+
122
+ if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
123
+ $admin_tabs['premium-landing'] = __( 'Premium Version', 'yith-woocommerce-zoom-magnifier' );
124
+ } else {
125
+ $admin_tabs['exclusions'] = __( 'Product exclusion list', 'yith-woocommerce-zoom-magnifier' );
126
+ }
127
+
128
+ $args = array(
129
+ 'create_menu_page' => true,
130
+ 'parent_slug' => '',
131
+ 'page_title' => 'Zoom magnifier',
132
+ 'menu_title' => 'Zoom magnifier',
133
+ 'capability' => 'manage_options',
134
+ 'parent' => '',
135
+ 'parent_page' => 'yit_plugin_panel',
136
+ 'page' => $this->_panel_page,
137
+ 'admin-tabs' => $admin_tabs,
138
+ 'options-path' => YITH_YWZM_DIR . '/plugin-options'
139
+ );
140
+
141
+ /* === Fixed: not updated theme === */
142
+ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
143
+
144
+ require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
145
+ }
146
+
147
+ $this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
148
+
149
+ /** Add custom types actions and filters */
150
+ YITH_YWZM_Custom_Types::get_instance();
151
+ }
152
+
153
+ /**
154
+ * Premium Tab Template
155
+ *
156
+ * Load the premium tab template on admin page
157
+ *
158
+ * @return void
159
+ * @since 1.0
160
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
161
+ * @return void
162
+ */
163
+ public function premium_tab() {
164
+ $premium_tab_template = YITH_YWZM_TEMPLATE_DIR . '/admin/' . $this->_premium;
165
+ if ( file_exists( $premium_tab_template ) ) {
166
+ include_once( $premium_tab_template );
167
+ }
168
+ }
169
+
170
+ public function register_pointer() {
171
+ if ( ! class_exists( 'YIT_Pointers' ) ) {
172
+ include_once( 'plugin-fw/lib/yit-pointers.php' );
173
+ }
174
+
175
+ $premium_message = defined( 'YITH_YWZM_PREMIUM' )
176
+ ? ''
177
+ : __( 'YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM version with many new options, discover it now.', 'yith-woocommerce-zoom-magnifier' ) .
178
+ ' <a href="' . $this->_premium_landing . '">' . __( 'Premium version', 'yith-woocommerce-zoom-magnifier' ) . '</a>';
179
+
180
+ $args[] = array(
181
+ 'screen_id' => 'plugins',
182
+ 'pointer_id' => 'yith_woocommerce_zoom-magnifier',
183
+ 'target' => '#toplevel_page_yit_plugin_panel',
184
+ 'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
185
+ __( 'YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier' ),
186
+ __( 'In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options.<br> From this menu you can access all settings of the YITH plugins activated.', 'yith-woocommerce-zoom-magnifier' ) . '<br>' . $premium_message
187
+ ),
188
+ 'position' => array( 'edge' => 'left', 'align' => 'center' ),
189
+ 'init' => defined( 'YITH_YWZM_PREMIUM' ) ? YITH_YWZM_INIT : YITH_YWZM_FREE_INIT
190
+ );
191
+
192
+ YIT_Pointers()->register( $args );
193
+ }
194
+
195
+ /**
196
+ * Get the premium landing uri
197
+ *
198
+ * @since 1.0.0
199
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
200
+ * @return string The premium landing link
201
+ */
202
+ public function get_premium_landing_uri() {
203
+ return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing . '?refer_id=1030585';
204
+ }
205
+
206
+ //region **** licence related methods ****
207
+
208
+ /**
209
+ * Add actions to manage licence activation and updates
210
+ */
211
+ public function licence_activation() {
212
+ if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
213
+ return;
214
+ }
215
+
216
+ add_action( 'wp_loaded', array( $this, 'register_plugin_for_activation' ), 99 );
217
+ add_action( 'admin_init', array( $this, 'register_plugin_for_updates' ) );
218
+ }
219
+
220
+ /**
221
+ * Register plugins for activation tab
222
+ *
223
+ * @return void
224
+ * @since 2.0.0
225
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
226
+ */
227
+ public function register_plugin_for_activation() {
228
+ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
229
+ require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-licence.php';
230
+ require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-plugin-licence.php';
231
+ }
232
+ YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
233
+ }
234
+
235
+ /**
236
+ * Register plugins for update tab
237
+ *
238
+ * @return void
239
+ * @since 2.0.0
240
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
241
+ */
242
+ public function register_plugin_for_updates() {
243
+ if ( ! class_exists( 'YIT_Upgrade' ) ) {
244
+ require_once 'plugin-fw/lib/yit-upgrade.php';
245
+ }
246
+ YIT_Upgrade()->register( YITH_YWZM_SLUG, YITH_YWZM_INIT );
247
+ }
248
+ //endregion
249
+ }
250
  }
plugin-fw/assets/css/admin.css CHANGED
@@ -1,96 +1,96 @@
1
- /*-----------------------
2
- YITH Debug
3
- ------------------------*/
4
- #wpadminbar .yith-debug-admin-bar div,
5
- #wpadminbar .yith-debug-admin-bar:hover div {
6
- background : #05789c !important;
7
- color : #fff !important;
8
- }
9
-
10
- #wpadminbar .yith-debug-admin-bar a,
11
- #wpadminbar .yith-debug-admin-bar strong {
12
- color : #fff !important;
13
- }
14
-
15
- #wpadminbar .yith-debug-admin-bar strong {
16
- font-weight : 600;
17
- }
18
-
19
- #wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
20
- #wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
21
- display : none;
22
- }
23
-
24
- #wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
25
- #wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
26
- padding : 0;
27
- max-height : 500px;
28
- overflow-y : auto;
29
- }
30
-
31
- #wpadminbar .yith-debug-admin-bar pre {
32
- padding : 10px;
33
- line-height : 1.5em;
34
- }
35
-
36
- .notice-yith{
37
- margin-left: 0;
38
- border-left-color: #acc327;
39
- }
40
-
41
- .notice-yith.notice-alt{
42
- background-color: #ecf7ed;
43
- }
44
-
45
- .yith-promo-banner-image-link{
46
- display: block;
47
- margin-bottom: 15px;
48
- }
49
-
50
- .yith-promo-banner-image{
51
- max-width: 100%;
52
- margin: 0 auto;
53
- display: block;
54
- }
55
-
56
- /*-----------------------
57
- YITH Plugins Columns
58
- ------------------------*/
59
- @media screen and (min-width : 783px) {
60
-
61
- .auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
62
- width : 100%;
63
- }
64
-
65
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
66
- min-width : 320px;
67
- display : flex;
68
- flex-flow : row wrap;
69
- }
70
-
71
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
72
- width : 50%;
73
- border-left : 1px solid #555;
74
- box-sizing : border-box;
75
- }
76
-
77
- #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
78
- border-left : none;
79
- }
80
-
81
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
82
- min-width : 480px;
83
- display : flex;
84
- flex-flow : row wrap;
85
- }
86
-
87
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
88
- width : calc(100% / 3);
89
- border-left : 1px solid #555;
90
- box-sizing : border-box;
91
- }
92
-
93
- #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
94
- border-left : none;
95
- }
96
  }
1
+ /*-----------------------
2
+ YITH Debug
3
+ ------------------------*/
4
+ #wpadminbar .yith-debug-admin-bar div,
5
+ #wpadminbar .yith-debug-admin-bar:hover div {
6
+ background : #05789c !important;
7
+ color : #fff !important;
8
+ }
9
+
10
+ #wpadminbar .yith-debug-admin-bar a,
11
+ #wpadminbar .yith-debug-admin-bar strong {
12
+ color : #fff !important;
13
+ }
14
+
15
+ #wpadminbar .yith-debug-admin-bar strong {
16
+ font-weight : 600;
17
+ }
18
+
19
+ #wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
20
+ #wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
21
+ display : none;
22
+ }
23
+
24
+ #wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
25
+ #wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
26
+ padding : 0;
27
+ max-height : 500px;
28
+ overflow-y : auto;
29
+ }
30
+
31
+ #wpadminbar .yith-debug-admin-bar pre {
32
+ padding : 10px;
33
+ line-height : 1.5em;
34
+ }
35
+
36
+ .notice-yith{
37
+ margin-left: 0;
38
+ border-left-color: #acc327;
39
+ }
40
+
41
+ .notice-yith.notice-alt{
42
+ background-color: #ecf7ed;
43
+ }
44
+
45
+ .yith-promo-banner-image-link{
46
+ display: block;
47
+ margin-bottom: 15px;
48
+ }
49
+
50
+ .yith-promo-banner-image{
51
+ max-width: 100%;
52
+ margin: 0 auto;
53
+ display: block;
54
+ }
55
+
56
+ /*-----------------------
57
+ YITH Plugins Columns
58
+ ------------------------*/
59
+ @media screen and (min-width : 783px) {
60
+
61
+ .auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
62
+ width : 100%;
63
+ }
64
+
65
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
66
+ min-width : 320px;
67
+ display : flex;
68
+ flex-flow : row wrap;
69
+ }
70
+
71
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
72
+ width : 50%;
73
+ border-left : 1px solid #555;
74
+ box-sizing : border-box;
75
+ }
76
+
77
+ #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
78
+ border-left : none;
79
+ }
80
+
81
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
82
+ min-width : 480px;
83
+ display : flex;
84
+ flex-flow : row wrap;
85
+ }
86
+
87
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
88
+ width : calc(100% / 3);
89
+ border-left : 1px solid #555;
90
+ box-sizing : border-box;
91
+ }
92
+
93
+ #adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
94
+ border-left : none;
95
+ }
96
  }
plugin-fw/assets/css/codemirror/codemirror.css CHANGED
@@ -1,260 +1,260 @@
1
- /* BASICS */
2
-
3
- .CodeMirror {
4
- /* Set height, width, borders, and global font properties here */
5
- font-family: monospace;
6
- height: 400px;
7
- clear: both;
8
- padding: 0;
9
- }
10
- .CodeMirror-scroll {
11
- /* Set scrolling behaviour here */
12
- overflow: auto;
13
- }
14
-
15
- /* PADDING */
16
-
17
- .CodeMirror-lines {
18
- padding: 4px 0; /* Vertical padding around content */
19
- }
20
- .CodeMirror pre {
21
- padding: 0 4px; /* Horizontal padding of content */
22
- }
23
-
24
- .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
25
- background-color: white; /* The little square between H and V scrollbars */
26
- }
27
-
28
- /* GUTTER */
29
-
30
- .CodeMirror-gutters {
31
- border-right: 1px solid #ddd;
32
- background-color: #f7f7f7;
33
- white-space: nowrap;
34
- }
35
- .CodeMirror-linenumbers {}
36
- .CodeMirror-linenumber {
37
- padding: 0 3px 0 5px;
38
- min-width: 20px;
39
- text-align: right;
40
- color: #999;
41
- }
42
-
43
- /* CURSOR */
44
-
45
- .CodeMirror div.CodeMirror-cursor {
46
- border-left: 1px solid black;
47
- z-index: 3;
48
- }
49
- /* Shown when moving in bi-directional text */
50
- .CodeMirror div.CodeMirror-secondarycursor {
51
- border-left: 1px solid silver;
52
- }
53
- .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
54
- width: auto;
55
- border: 0;
56
- background: #7e7;
57
- z-index: 1;
58
- }
59
- /* Can style cursor different in overwrite (non-insert) mode */
60
- .CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
61
-
62
- .cm-tab { display: inline-block; }
63
-
64
- /* DEFAULT THEME */
65
-
66
-