Easy Facebook Like Box (Facebook Page Plugin) – Custom Facebook Feed – Auto PopUp - Version 3.1

Version Description

  • Added another great feature of Auto PopUp. Now you can display easy facebook like box in PopUp.
  • Tested upto WordPress 4.1
Download this release

Release Info

Developer sjaved
Plugin Icon 128x128 Easy Facebook Like Box (Facebook Page Plugin) – Custom Facebook Feed – Auto PopUp
Version 3.1
Comparing to
See all releases

Code changes from version 3.0 to 3.1

Files changed (37) hide show
  1. README.txt +52 -32
  2. admin/easy-facebook-likebox-admin.php +1 -1
  3. admin/views/popup-settings.php +1 -1
  4. admin/views/support-us.php +1 -1
  5. easy-facebook-likebox.php +1 -1
  6. public/assets/popup/blank.gif +0 -0
  7. public/assets/popup/fancy_close.png +0 -0
  8. public/assets/popup/fancy_loading.png +0 -0
  9. public/assets/popup/fancy_nav_left.png +0 -0
  10. public/assets/popup/fancy_nav_right.png +0 -0
  11. public/assets/popup/fancy_shadow_e.png +0 -0
  12. public/assets/popup/fancy_shadow_n.png +0 -0
  13. public/assets/popup/fancy_shadow_ne.png +0 -0
  14. public/assets/popup/fancy_shadow_nw.png +0 -0
  15. public/assets/popup/fancy_shadow_s.png +0 -0
  16. public/assets/popup/fancy_shadow_se.png +0 -0
  17. public/assets/popup/fancy_shadow_sw.png +0 -0
  18. public/assets/popup/fancy_shadow_w.png +0 -0
  19. public/assets/popup/fancy_title_left.png +0 -0
  20. public/assets/popup/fancy_title_main.png +0 -0
  21. public/assets/popup/fancy_title_over.png +0 -0
  22. public/assets/popup/fancy_title_right.png +0 -0
  23. public/assets/popup/fancybox-x.png +0 -0
  24. public/assets/popup/fancybox-y.png +0 -0
  25. public/assets/popup/fancybox.png +0 -0
  26. public/assets/popup/fancybox_loading.gif +0 -0
  27. public/assets/popup/fancybox_loading@2x.gif +0 -0
  28. public/assets/popup/fancybox_overlay.png +0 -0
  29. public/assets/popup/fancybox_sprite.png +0 -0
  30. public/assets/popup/fancybox_sprite@2x.png +0 -0
  31. public/assets/popup/jquery.fancybox-1.3.7.css +0 -385
  32. public/assets/popup/jquery.fancybox-1.3.7.js +0 -1190
  33. public/assets/popup/jquery.fancybox-1.3.7.min.css +0 -1
  34. public/assets/popup/jquery.fancybox-1.3.7.min.js +0 -43
  35. public/assets/popup/jquery.fancybox.css +0 -274
  36. public/assets/popup/jquery.fancybox.js +0 -2020
  37. public/assets/popup/jquery.fancybox.pack.js +0 -46
README.txt CHANGED
@@ -1,25 +1,58 @@
1
  === Easy Facebook Like Box ===
2
  Contributors: sjaved
3
- Tags: facebook, facebook likebox, likebox, like box, facebook like box, facebook like box widget, facebook like box shortcode, shortcode, facebook like box plugin, facebook like box wordpress plugin, plugin, responsive facebook like box, responsive, facebook like box in 75 locales, facebook like box in 75 languages, facebook like box in PopUp, PopUp, Auto PopUp, like box in PopUp
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sjaved786%40gmail%2ecom&lc=US&item_name=Easy%20Facebook%20Like%20Box%20WordPress%20Plugin&item_number=efbl&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
- Stable tag: 3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Easy facebook like box WordPress plugin allows you to display fan page posts, like button, and connections on your website using widget, shortcode or in Auto PopUp.
12
 
13
  == Description ==
14
 
15
- Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website. Easy facebook like box display fan page posts, like button, and connections on your website using widget, shortcode or in AutoPop.
16
 
17
- [Fixed width demo](http://jwebsol.com/easy-facebook-like-box-plugin-demo/ "See this plugin in action (Fixed width)") | [Responsive demo](http://jwebsol.com/easy-facebook-like-box-responsive-demo/ "See this plugin in action (Responsive)") |
18
- [Auto PopUp demo](http://jwebsol.com/easy-facebook-like-box-auto-popup-demo/ "See this plugin in action (Auto PopUp)")
19
 
20
- **Options:**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
 
 
 
23
  1. Facebook Page URL - enter an URL address to the Facebook fan page
24
  1. Width - set the width of the module in pixels. The default width is 250px
25
  1. Height - With the stream displayed and 8 connections the default height is 556px. With no stream displayed and 8 connections the default height is 271px. With no connections and no stream the default height is 63px
@@ -32,7 +65,6 @@ Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enab
32
  1. Border - show/hide the border around the like box (1 for show and 0 for hide to use in shortcode)
33
 
34
 
35
-
36
  You can use easy facebook like box in number of ways:
37
 
38
  * Display facebook like box in auto PopUp (New).
@@ -45,36 +77,19 @@ You can use easy facebook like box in number of ways:
45
  * Want to display in a template paste below code along with your optional settings.
46
  `<?php echo do_shortcode( '[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" locale="NAME_OF_YOUR_LANGUAGE_LOCAE(default en_US)" responsive="RESPONSIVE_FOR_MOBILE(1/0)" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]' ); ?>`
47
 
48
- Features:
49
-
50
-
51
- 1. Likebox in responsive PopUp/Modal window (New feature)
52
- 1. Now support optional **responsive** layout
53
- 1. Support 75 different locales
54
- 1. Extended optional settings to personalize in widget and shortcode
55
- 1. Generate shortcode using widget form
56
 
57
-
58
- **Pro Features:**
59
-
60
-
61
- 1. Pro version support all WordPress shortcodes and even html in PopUp.
62
- 1. Set PopUp delay from Back-end.
63
- 1. Show PopUp on home page only.
64
- 1. Show PopUp if visitors are logged in
65
- 1. Show PopUp if visitors are not logged in.
66
- 1. Close button act as never show again
67
- 1. Hide on mobile devices
68
- 1. Premium Support on priority basis.
69
-
70
- [GoPro](http://jwebsol.com/product/easy-facebook-like-box-pro/ "GoPro")
71
 
72
  == Installation ==
73
  1. Upload "easy-facebook-likebox" to the "/wp-content/plugins/" directory.
74
  2. Activate the plugin through the "Plugins" menu in WordPress.
75
- 3. Navigate to "Appearance > Widgets" and drag and drop "Easy Facebook Likebox" in desired widget area or use the shortcode in page/post generated by widget.
76
 
77
  == Upgrade Notice ==
 
 
 
78
  = 3.0.0 =
79
  Major realease! Must Update the plugin if you were missing the facebook like box in PopUp. Now display like box in auto display PopUp (Auto PopUp).
80
 
@@ -112,6 +127,11 @@ http://wordpress.org/support/topic/need-feed-back-on-plugin-feature/
112
 
113
 
114
  == Changelog ==
 
 
 
 
 
115
  = 3.0 =
116
 
117
  * Added another great feature of Auto PopUp. Now you can display easy facebook like box in PopUp.
@@ -140,4 +160,4 @@ http://wordpress.org/support/topic/need-feed-back-on-plugin-feature/
140
 
141
  = 1.0.0 =
142
 
143
- * Initial release.
1
  === Easy Facebook Like Box ===
2
  Contributors: sjaved
3
+ Tags: facebook, facebook like box,, like box, facebook like box, facebook like box widget, facebook like box shortcodes, shortcodes, facebook like box plugin, facebook like box wordpress plugin, plugin, responsive facebook like box, responsive, facebook like box in 75 locales, facebook like box in 75 languages, facebook like box in PopUp, PopUp, Auto PopUp, like box in PopUp, fancybox, lightbox, seo, social media, facebook badge, facebook button, facebook connect, facebook facepile, Facebook fan page, wordpress facebook like box, facebook share, facebook integration, shortcode generator, advanced responsive facebook likebox, facebook wall, facebook sidebar, facebook recommend, like box facebook, open graph, facebook page, facebook group, rt facebook like box, sharebar
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sjaved786%40gmail%2ecom&lc=US&item_name=Easy%20Facebook%20Like%20Box%20WordPress%20Plugin&item_number=efbl&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
+ Stable tag: 3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Easy facebook like box WordPress plugin allows you to display fan page posts, like button, and connections on your website using widget, shortcode or in Auto PopUp.
12
 
13
  == Description ==
14
 
15
+ Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website. Easy facebook like box display fan page posts, like button, and connections on your website using widget, shortcode or in Auto PopUp.
16
 
17
+ [Fixed width demo](https://jwebsol.com/easy-facebook-like-box-plugin-demo/ "See this plugin in action (Fixed width)") | [Responsive demo](https://jwebsol.com/easy-facebook-like-box-responsive-demo/ "See this plugin in action (Responsive)") |
18
+ [Auto PopUp demo](https://jwebsol.com/easy-facebook-like-box-auto-popup-demo/ "See this plugin in action (Auto PopUp)") | [GoPro](https://jwebsol.com/product/easy-facebook-like-box-pro/ "Need more! Check Pro version.")
19
 
20
+ ### Features:
21
+
22
+ 1. Two color schemes (light/dark).
23
+ 1. Show or hide faces/connections.
24
+ 1. Show or hide header/logo.
25
+ 1. Show or hide latest facebook fan page posts.
26
+ 1. Show or hide border around the like box.
27
+ 1. Now support optional **responsive** layout.
28
+ 1. Dispaly like box in page/post/custom posts using shortcodes easily generated while saving widgets.
29
+ 1. Set fixed width and height.
30
+ 1. Chose your desired language or input your own language (if not in list).
31
+ 1. Support 75 different locales.
32
+ 1. Like box in responsive PopUp/Modal window (New feature).
33
+ 1. Enable/Disable PopUp.
34
+ 1. All above options are available with PopUp.
35
+ 1. Generate shortcode using widget form.
36
+
37
+ You can easily upgrade to [Easy Facebook Like Box Pro:](https://jwebsol.com/product/easy-facebook-like-box-pro/ "GoPro") for more features.
38
+
39
+ ### Pro Features:
40
+
41
+ 1. **Pro version support all WordPress shortcodes and even html in PopUp.**
42
+ 1. **Set PopUp delay from Back-end.**
43
+ 1. **Show PopUp on home page only.**
44
+ 1. **Show PopUp if visitors are logged in**
45
+ 1. **Show PopUp if visitors are not logged in.**
46
+ 1. **Close button act as never show again (show only once).**
47
+ 1. **Hide on mobile devices.**
48
+ 1. **Priority Support.**
49
+ 1. **And more...**
50
+
51
+ ### How to use facebook like box widget, shortcode and PopUp.
52
 
53
 
54
+ **Options:**
55
+
56
  1. Facebook Page URL - enter an URL address to the Facebook fan page
57
  1. Width - set the width of the module in pixels. The default width is 250px
58
  1. Height - With the stream displayed and 8 connections the default height is 556px. With no stream displayed and 8 connections the default height is 271px. With no connections and no stream the default height is 63px
65
  1. Border - show/hide the border around the like box (1 for show and 0 for hide to use in shortcode)
66
 
67
 
 
68
  You can use easy facebook like box in number of ways:
69
 
70
  * Display facebook like box in auto PopUp (New).
77
  * Want to display in a template paste below code along with your optional settings.
78
  `<?php echo do_shortcode( '[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" locale="NAME_OF_YOUR_LANGUAGE_LOCAE(default en_US)" responsive="RESPONSIVE_FOR_MOBILE(1/0)" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]' ); ?>`
79
 
 
 
 
 
 
 
 
 
80
 
81
+ **Need support** feel free to open support ticket in one of our following forums:
82
+ [Free Support](https://wordpress.org/support/plugin/easy-facebook-likebox "Free Support") | [Premium/Priority Support](https://jwebsol.com/forums/forum/easy-facebook-like-box-pro/ "Premium/Priority Support") | [GoPro](https://jwebsol.com/product/easy-facebook-like-box-pro/ "GoPro")
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  == Installation ==
85
  1. Upload "easy-facebook-likebox" to the "/wp-content/plugins/" directory.
86
  2. Activate the plugin through the "Plugins" menu in WordPress.
87
+ 3. Navigate to "Appearance > Widgets" and drag and drop "Easy Facebook Likebox" in desired widget area or use the shortcode in page/post generated by widget.
88
 
89
  == Upgrade Notice ==
90
+ = 3.1.0 =
91
+ Major realease! Must Update the plugin if you were missing the facebook like box in PopUp. Now display like box in auto display PopUp (Auto PopUp).
92
+
93
  = 3.0.0 =
94
  Major realease! Must Update the plugin if you were missing the facebook like box in PopUp. Now display like box in auto display PopUp (Auto PopUp).
95
 
127
 
128
 
129
  == Changelog ==
130
+ = 3.1 =
131
+
132
+ * Added another great feature of Auto PopUp. Now you can display easy facebook like box in PopUp.
133
+ * Tested upto WordPress 4.1
134
+
135
  = 3.0 =
136
 
137
  * Added another great feature of Auto PopUp. Now you can display easy facebook like box in PopUp.
160
 
161
  = 1.0.0 =
162
 
163
+ * Initial release.
admin/easy-facebook-likebox-admin.php CHANGED
@@ -296,7 +296,7 @@ class Easy_Facebook_Likebox_Admin {
296
  <a href="%s" class="button button-primary">I have supported already</a>
297
  ', 'efbl'),
298
  'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sjaved786%40gmail%2ecom&lc=US&item_name=Easy%20Facebook%20Like%20Box%20WordPress%20Plugin&item_number=efbl&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted',
299
- 'http://wordpress.org/plugins/easy-facebook-likebox/',
300
  get_admin_url('', 'options-general.php?page=easy-facebook-likebox&efbl_supported=1')
301
  );
302
  echo "<div class='update-nag'>$msg</div>";
296
  <a href="%s" class="button button-primary">I have supported already</a>
297
  ', 'efbl'),
298
  'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=sjaved786%40gmail%2ecom&lc=US&item_name=Easy%20Facebook%20Like%20Box%20WordPress%20Plugin&item_number=efbl&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted',
299
+ 'https://jwebsol.com/product/easy-facebook-like-box-pro/',
300
  get_admin_url('', 'options-general.php?page=easy-facebook-likebox&efbl_supported=1')
301
  );
302
  echo "<div class='update-nag'>$msg</div>";
admin/views/popup-settings.php CHANGED
@@ -22,4 +22,4 @@ do_settings_sections( 'efbl_settings_display_options' );
22
  <?php
23
  submit_button();
24
  ?></div>
25
- <h2 class="promotional_text">Want more control over PopUp? Try our premimum version! <a target="_blank" class="" href="http://jwebsol.com/product/easy-facebook-like-box-pro/" title="GoPro">Click here for pricing & details</a></h2>
22
  <?php
23
  submit_button();
24
  ?></div>
25
+ <h2 class="promotional_text">Want more control over PopUp? Try our premimum version! <a target="_blank" class="" href="https://jwebsol.com/product/easy-facebook-like-box-pro/" title="GoPro">Click here for pricing & details</a></h2>
admin/views/support-us.php CHANGED
@@ -25,5 +25,5 @@
25
  }(document, 'script', 'facebook-jssdk'));</script>
26
  </div>
27
  <div class="" style="width:49%; display: inline;">
28
- <a target="_blank" class="buy_button" href="http://jwebsol.com/product/easy-facebook-like-box-pro/" title="GoPro">Buy Pro Versio of this plugin</a>
29
  </div>
25
  }(document, 'script', 'facebook-jssdk'));</script>
26
  </div>
27
  <div class="" style="width:49%; display: inline;">
28
+ <a target="_blank" class="buy_button" href="https://jwebsol.com/product/easy-facebook-like-box-pro/" title="GoPro">Buy Pro Versio of this plugin</a>
29
  </div>
easy-facebook-likebox.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Easy Facebook Likebox
4
  * Plugin URI: httt://wordpress.org/plugins/easy-facebook-likebox
5
  * Description: Easy Facebook like box WordPress plugin allows you to easly display facebook like box fan page on your website using either widget or shortcode to increase facbook fan page likes. You can use the shortcode generated after saving the facebook like box widget. Its completely customizable with lots of optional settings. Its also responsive facebook like box at the same time.
6
- * Version: 3.0
7
  * Author: Sajid Javed
8
  * Author URI: http://jwebsol.com
9
  * Text Domain: easy-facebook-likebox
3
  * Plugin Name: Easy Facebook Likebox
4
  * Plugin URI: httt://wordpress.org/plugins/easy-facebook-likebox
5
  * Description: Easy Facebook like box WordPress plugin allows you to easly display facebook like box fan page on your website using either widget or shortcode to increase facbook fan page likes. You can use the shortcode generated after saving the facebook like box widget. Its completely customizable with lots of optional settings. Its also responsive facebook like box at the same time.
6
+ * Version: 3.1
7
  * Author: Sajid Javed
8
  * Author URI: http://jwebsol.com
9
  * Text Domain: easy-facebook-likebox
public/assets/popup/blank.gif DELETED
Binary file
public/assets/popup/fancy_close.png DELETED
Binary file
public/assets/popup/fancy_loading.png DELETED
Binary file
public/assets/popup/fancy_nav_left.png DELETED
Binary file
public/assets/popup/fancy_nav_right.png DELETED
Binary file
public/assets/popup/fancy_shadow_e.png DELETED
Binary file
public/assets/popup/fancy_shadow_n.png DELETED
Binary file
public/assets/popup/fancy_shadow_ne.png DELETED
Binary file
public/assets/popup/fancy_shadow_nw.png DELETED
Binary file
public/assets/popup/fancy_shadow_s.png DELETED
Binary file
public/assets/popup/fancy_shadow_se.png DELETED
Binary file
public/assets/popup/fancy_shadow_sw.png DELETED
Binary file
public/assets/popup/fancy_shadow_w.png DELETED
Binary file
public/assets/popup/fancy_title_left.png DELETED
Binary file
public/assets/popup/fancy_title_main.png DELETED
Binary file
public/assets/popup/fancy_title_over.png DELETED
Binary file
public/assets/popup/fancy_title_right.png DELETED
Binary file
public/assets/popup/fancybox-x.png DELETED
Binary file
public/assets/popup/fancybox-y.png DELETED
Binary file
public/assets/popup/fancybox.png DELETED
Binary file
public/assets/popup/fancybox_loading.gif DELETED
Binary file
public/assets/popup/fancybox_loading@2x.gif DELETED
Binary file
public/assets/popup/fancybox_overlay.png DELETED
Binary file
public/assets/popup/fancybox_sprite.png DELETED
Binary file
public/assets/popup/fancybox_sprite@2x.png DELETED
Binary file
public/assets/popup/jquery.fancybox-1.3.7.css DELETED
@@ -1,385 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
8
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
- *
10
- * Version: 1.3.4 (11/11/2010) patched : box-sizing: content-box;
11
- * Requires: jQuery v1.3+
12
- *
13
- * Dual licensed under the MIT and GPL licenses:
14
- * http://www.opensource.org/licenses/mit-license.php
15
- * http://www.gnu.org/licenses/gpl.html
16
- */
17
-
18
- #fancybox-loading {
19
- position: fixed;
20
- top: 50%;
21
- left: 50%;
22
- width: 40px;
23
- height: 40px;
24
- margin-top: -20px;
25
- margin-left: -20px;
26
- cursor: pointer;
27
- overflow: hidden;
28
- z-index:11104;
29
- display: none;
30
- box-sizing: content-box;
31
- -moz-box-sizing: content-box;
32
- }
33
-
34
- #fancybox-loading div {
35
- position: absolute;
36
- top: 0;
37
- left: 0;
38
- width: 40px;
39
- height: 480px;
40
- background-image: url('fancybox.png');
41
- box-sizing: content-box;
42
- -moz-box-sizing: content-box;
43
- }
44
-
45
- #fancybox-overlay {
46
- position: absolute;
47
- top: 0;
48
- left: 0;
49
- width: 100%;
50
- z-index:11100;
51
- display: none;
52
- box-sizing: content-box;
53
- -moz-box-sizing: content-box;
54
- }
55
-
56
- #fancybox-tmp {
57
- padding: 0;
58
- margin: 0;
59
- border: 0;
60
- overflow: auto;
61
- display: none;
62
- }
63
-
64
- #fancybox-wrap {
65
- position: absolute;
66
- top: 0;
67
- left: 0;
68
- padding: 20px;
69
- z-index:11101;
70
- outline: none;
71
- display: none;
72
- box-sizing: content-box;
73
- -moz-box-sizing: content-box;
74
- }
75
-
76
- #fancybox-wrap div {
77
- box-sizing: content-box;
78
- -moz-box-sizing: content-box;
79
- }
80
-
81
- #fancybox-outer {
82
- position: relative;
83
- width: 100%;
84
- height: 100%;
85
- background: #fff;
86
- }
87
-
88
- #fancybox-content {
89
- width: 0;
90
- height: 0;
91
- padding: 0;
92
- outline: none;
93
- position: relative;
94
- overflow: hidden;
95
- z-index:11102;
96
- border: 0px solid #fff;
97
- background: #fff;
98
- -moz-background-clip: padding; /* Firefox 3.6 */
99
- -webkit-background-clip: padding; /* Safari 4? Chrome 6? */
100
- background-clip: padding-box; /* IE9+, Firefox 4+, Opera, Chrome */
101
- }
102
-
103
- #fancybox-hide-sel-frame {
104
- position: absolute;
105
- top: 0;
106
- left: 0;
107
- width: 100%;
108
- height: 100%;
109
- background: transparent;
110
- z-index:11101;
111
- }
112
-
113
- #fancybox-close {
114
- position: absolute;
115
- top: -15px;
116
- right: -15px;
117
- width: 30px;
118
- height: 30px;
119
- background: transparent url('fancybox.png') -40px 0px;
120
- cursor: pointer;
121
- z-index:11103;
122
- display: none;
123
- }
124
-
125
- #fancybox-error {
126
- color: #444;
127
- font: normal 12px/20px Arial;
128
- padding: 14px;
129
- margin: 0;
130
- }
131
-
132
- #fancybox-img {
133
- width: 100%;
134
- height: 100%;
135
- padding: 0;
136
- margin: 0;
137
- border: none;
138
- outline: none;
139
- line-height: 0;
140
- vertical-align: top;
141
- max-width:none !important;
142
- max-height:none !important
143
- }
144
-
145
- #fancybox-frame {
146
- width: 100%;
147
- height: 100%;
148
- border: none;
149
- display: block;
150
- -webkit-overflow-scrolling: touch;
151
- z-index:0; /* z-index bug with -webkit-overflow-scrolling */
152
- }
153
-
154
- #fancybox-left, #fancybox-right {
155
- position: absolute;
156
- bottom: 0px;
157
- height: 100%;
158
- width: 35%;
159
- cursor: pointer;
160
- outline: none;
161
- background: transparent url('blank.gif');
162
- z-index:11102;
163
- display: none;
164
- }
165
-
166
- #fancybox-left {
167
- left: 0px;
168
- }
169
-
170
- .rtl #fancybox-left {
171
- left:auto;
172
- right:0px
173
- }
174
-
175
- #fancybox-right {
176
- right: 0px;
177
- }
178
-
179
- .rtl #fancybox-right {
180
- left:0px;
181
- right:auto
182
- }
183
-
184
- #fancybox-left-ico, #fancybox-right-ico {
185
- position: absolute;
186
- top: 50%;
187
- left: -9999px;
188
- width: 30px;
189
- height: 30px;
190
- margin-top: -15px;
191
- cursor: pointer;
192
- z-index:11102;
193
- display: block;
194
- }
195
-
196
- #fancybox-left-ico {
197
- background-image: url('fancybox.png');
198
- background-position: -40px -30px;
199
- }
200
-
201
- .rtl #fancybox-left-ico{
202
- background-position:-40px -60px;
203
- right:-9999px
204
- }
205
-
206
- #fancybox-right-ico {
207
- background-image: url('fancybox.png');
208
- background-position: -40px -60px;
209
- }
210
-
211
- .rtl #fancybox-right-ico{
212
- background-position:-40px -30px;
213
- right:-9999px
214
- }
215
-
216
- #fancybox-left:hover, #fancybox-right:hover {
217
- visibility: visible; /* IE6 */
218
- }
219
-
220
- #fancybox-left:hover span {
221
- left: 20px;
222
- }
223
-
224
- .rtl #fancybox-left:hover span {
225
- right:20px
226
- }
227
-
228
- #fancybox-right:hover span {
229
- left: auto;
230
- right: 20px;
231
- }
232
-
233
- .rtl #fancybox-right:hover span {
234
- right:auto;
235
- left:20px
236
- }
237
-
238
- .fancybox-bg {
239
- position: absolute;
240
- padding: 0;
241
- margin: 0;
242
- border: 0;
243
- width: 20px;
244
- height: 20px;
245
- z-index:11001;
246
- }
247
-
248
- #fancybox-bg-n {
249
- top: -20px;
250
- left: 0;
251
- width: 100%;
252
- background-image: url('fancybox-x.png');
253
- }
254
-
255
- #fancybox-bg-ne {
256
- top: -20px;
257
- right: -20px;
258
- background-image: url('fancybox.png');
259
- background-position: -40px -162px;
260
- }
261
-
262
- #fancybox-bg-e {
263
- top: 0;
264
- right: -20px;
265
- height: 100%;
266
- background-image: url('fancybox-y.png');
267
- background-position: -20px 0px;
268
- }
269
-
270
- #fancybox-bg-se {
271
- bottom: -20px;
272
- right: -20px;
273
- background-image: url('fancybox.png');
274
- background-position: -40px -182px;
275
- }
276
-
277
- #fancybox-bg-s {
278
- bottom: -20px;
279
- left: 0;
280
- width: 100%;
281
- background-image: url('fancybox-x.png');
282
- background-position: 0px -20px;
283
- }
284
-
285
- #fancybox-bg-sw {
286
- bottom: -20px;
287
- left: -20px;
288
- background-image: url('fancybox.png');
289
- background-position: -40px -142px;
290
- }
291
-
292
- #fancybox-bg-w {
293
- top: 0;
294
- left: -20px;
295
- height: 100%;
296
- background-image: url('fancybox-y.png');
297
- }
298
-
299
- #fancybox-bg-nw {
300
- top: -20px;
301
- left: -20px;
302
- background-image: url('fancybox.png');
303
- background-position: -40px -122px;
304
- }
305
-
306
- #fancybox-title {
307
- font-family: Helvetica;
308
- font-size: 12px;
309
- z-index:11102;
310
- }
311
-
312
- .fancybox-title-inside {
313
- padding-bottom: 10px;
314
- text-align: center;
315
- color: #333;
316
- position: relative;
317
- }
318
-
319
- .fancybox-title-outside {
320
- padding-top: 10px;
321
- color: #fff;
322
- }
323
-
324
- .fancybox-title-over {
325
- position: absolute;
326
- bottom: 0;
327
- left: 0;
328
- color: #FFF;
329
- text-align: left;
330
- }
331
-
332
- .rtl .fancybox-title-over {
333
- text-align:right
334
- }
335
-
336
- #fancybox-title-over {
337
- padding: 10px;
338
- background-image: url('fancy_title_over.png');
339
- display: block;
340
- }
341
-
342
- .fancybox-title-float {
343
- position: absolute;
344
- left: 0;
345
- bottom: -20px;
346
- height: 32px;
347
- }
348
-
349
- #fancybox-title-float-wrap {
350
- border: none;
351
- border-collapse: collapse;
352
- width: auto;
353
- }
354
-
355
- #fancybox-title-float-wrap td {
356
- border: none;
357
- white-space: nowrap;
358
- }
359
-
360
- #fancybox-title-float-left {
361
- padding: 0 0 0 15px;
362
- background: url('fancybox.png') -40px -90px no-repeat;
363
- }
364
-
365
- #fancybox-title-float-main {
366
- color: #FFF;
367
- line-height: 29px;
368
- font-weight: bold;
369
- padding: 0 0 3px 0;
370
- background: url('fancybox-x.png') 0px -40px;
371
- }
372
-
373
- #fancybox-title-float-right {
374
- padding: 0 0 0 15px;
375
- background: url('fancybox.png') -55px -90px no-repeat;
376
- }
377
-
378
- .fancybox-hidden{
379
- display:none
380
- }
381
-
382
- /* IE */
383
- .fancybox-ie .fancybox-bg{
384
- background: transparent !important
385
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/assets/popup/jquery.fancybox-1.3.7.js DELETED
@@ -1,1190 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
8
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
- *
10
- * Version: 1.3.4 (11/11/2010) patched and appended to 1.3.7
11
- * Requires: jQuery v1.7+
12
- *
13
- * Dual licensed under the MIT and GPL licenses:
14
- * http://www.opensource.org/licenses/mit-license.php
15
- * http://www.gnu.org/licenses/gpl.html
16
- *
17
- * Patches applied:
18
- * Removed/replaced non-HTML5 attributes
19
- * Added parameter allowfullscreen for iframe, RavanH ravanhagen@gmail.com
20
- * Line 309, 714: patches for better centering on ipad etc.
21
- * Line 645: Check type = image for mousewheel
22
- * Line 820: qouted attribute selector, RavanH ravanhagen@gmail.com
23
- * Line 41, 622 and 1125: added isTouch variable and autoResize parameter, RavanH ravanhagen@gmail.com
24
- * Line 34: WebP image support, RavanH ravanhagen@gmail.com
25
- * Line 126, 677, 686: 'image' class forces image type, RavanH ravanhagen@gmail.com
26
- * Patched for jQuery 1.9+ compat by Sabel http://sabel.bluegfx.de/wordpress/wp-content/uploads/2013/03/jquery.fancybox-1.3.4.js
27
- *
28
- * Added SVG support by Simon Maillard simon@ogesta.fr
29
- */
30
- ;(function($) {
31
- var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
32
-
33
- selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
34
-
35
- ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i, svgRegExp = /[^\.]\.(svg)\s*$/i,
36
-
37
- loadingTimer, loadingFrame = 1,
38
-
39
- titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
40
-
41
- isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
42
-
43
- isTouch = document.createTouch !== undefined,
44
-
45
- /*
46
- * Private methods
47
- */
48
-
49
- _abort = function() {
50
- loading.hide();
51
-
52
- imgPreloader.onerror = imgPreloader.onload = null;
53
-
54
- if (ajaxLoader) {
55
- ajaxLoader.abort();
56
- }
57
-
58
- tmp.empty();
59
- },
60
-
61
- _error = function() {
62
- if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
63
- loading.hide();
64
- busy = false;
65
- return;
66
- }
67
-
68
- selectedOpts.titleShow = false;
69
-
70
- selectedOpts.width = 'auto';
71
- selectedOpts.height = 'auto';
72
-
73
- tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
74
-
75
- _process_inline();
76
- },
77
-
78
- _start = function() {
79
- var obj = selectedArray[ selectedIndex ],
80
- href,
81
- type,
82
- title,
83
- str,
84
- emb,
85
- ret;
86
-
87
- _abort();
88
-
89
- selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
90
-
91
- ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
92
-
93
- if (ret === false) {
94
- busy = false;
95
- return;
96
- } else if (typeof ret == 'object') {
97
- selectedOpts = $.extend(selectedOpts, ret);
98
- }
99
-
100
- title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
101
-
102
- if (obj.nodeName && !selectedOpts.orig) {
103
- selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
104
- }
105
-
106
- if (title === '' && selectedOpts.orig) {
107
- title = selectedOpts.titleFromAlt ? selectedOpts.orig.attr('alt') : selectedOpts.orig.attr('title');
108
- }
109
-
110
- href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
111
-
112
- if ((/^(?:javascript)/i).test(href) || href == '#') {
113
- href = null;
114
- }
115
-
116
- if (selectedOpts.type) {
117
- type = selectedOpts.type;
118
-
119
- if (!href) {
120
- href = selectedOpts.content;
121
- }
122
-
123
- } else if (selectedOpts.content) {
124
- type = 'html';
125
-
126
- } else if (href) {
127
- if (href.match(imgRegExp) || $(obj).hasClass("image")) {
128
- type = 'image';
129
-
130
- } else if (href.match(swfRegExp)) {
131
- type = 'swf';
132
-
133
- } else if (href.match(svgRegExp)) {
134
- type = 'svg';
135
-
136
- } else if ($(obj).hasClass("iframe")) {
137
- type = 'iframe';
138
-
139
- } else if (href.indexOf("#") === 0) {
140
- type = 'inline';
141
-
142
- } else {
143
- type = 'ajax';
144
- }
145
- }
146
-
147
- if (!type) {
148
- _error();
149
- return;
150
- }
151
-
152
- if (type == 'inline') {
153
- obj = href.substr(href.indexOf("#"));
154
- type = $(obj).length > 0 ? 'inline' : 'ajax';
155
- }
156
-
157
- selectedOpts.type = type;
158
- selectedOpts.href = href;
159
- selectedOpts.title = title;
160
-
161
- if (selectedOpts.autoDimensions) {
162
- if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
163
- selectedOpts.width = 'auto';
164
- selectedOpts.height = 'auto';
165
- } else {
166
- selectedOpts.autoDimensions = false;
167
- }
168
- }
169
-
170
- if (selectedOpts.modal) {
171
- selectedOpts.overlayShow = true;
172
- selectedOpts.hideOnOverlayClick = false;
173
- selectedOpts.hideOnContentClick = false;
174
- selectedOpts.enableEscapeButton = false;
175
- selectedOpts.showCloseButton = false;
176
- }
177
-
178
- selectedOpts.padding = parseInt(selectedOpts.padding, 10);
179
- selectedOpts.margin = parseInt(selectedOpts.margin, 10);
180
-
181
- tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
182
-
183
- $('.fancybox-inline-tmp').off('fancybox-cancel').on('fancybox-change', function() {
184
- $(this).replaceWith(content.children());
185
- });
186
-
187
- switch (type) {
188
- case 'html' :
189
- tmp.html( selectedOpts.content );
190
- _process_inline();
191
- break;
192
-
193
- case 'inline' :
194
- if ( $(obj).parent().is('#fancybox-content') === true) {
195
- busy = false;
196
- return;
197
- }
198
-
199
- $('<div class="fancybox-inline-tmp" />')
200
- .hide()
201
- .insertBefore( $(obj) )
202
- .on('fancybox-cleanup', function() {
203
- $(this).replaceWith(content.children());
204
- }).on('fancybox-cancel', function() {
205
- $(this).replaceWith(tmp.children());
206
- });
207
-
208
- $(obj).appendTo(tmp);
209
-
210
- _process_inline();
211
- break;
212
-
213
- case 'image':
214
- busy = false;
215
-
216
- $.fancybox.showActivity();
217
-
218
- imgPreloader = new Image();
219
-
220
- imgPreloader.onerror = function() {
221
- _error();
222
- };
223
-
224
- imgPreloader.onload = function() {
225
- busy = true;
226
-
227
- imgPreloader.onerror = imgPreloader.onload = null;
228
-
229
- _process_image();
230
- };
231
-
232
- imgPreloader.src = href;
233
- break;
234
-
235
- case 'swf':
236
- selectedOpts.scrolling = 'no';
237
-
238
- str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
239
- emb = '';
240
-
241
- $.each(selectedOpts.swf, function(name, val) {
242
- str += '<param name="' + name + '" value="' + val + '"></param>';
243
- emb += ' ' + name + '="' + val + '"';
244
- });
245
-
246
- str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
247
-
248
- tmp.html(str);
249
-
250
- _process_inline();
251
- break;
252
-
253
- case 'svg':
254
- selectedOpts.scrolling = 'no';
255
-
256
- str = '<object width="' + selectedOpts.width + '" height="' + selectedOpts.height + '" data="' + href + '"></object>';
257
-
258
- tmp.html(str);
259
-
260
- _process_inline();
261
- break;
262
-
263
- case 'ajax':
264
- busy = false;
265
-
266
- $.fancybox.showActivity();
267
-
268
- selectedOpts.ajax.win = selectedOpts.ajax.success;
269
-
270
- ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
271
- url : href,
272
- data : selectedOpts.ajax.data || {},
273
- error : function(XMLHttpRequest, textStatus, errorThrown) {
274
- if ( XMLHttpRequest.status > 0 ) {
275
- _error();
276
- }
277
- },
278
- success : function(data, textStatus, XMLHttpRequest) {
279
- var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
280
- if (o.status == 200) {
281
- if ( typeof selectedOpts.ajax.win == 'function' ) {
282
- ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
283
-
284
- if (ret === false) {
285
- loading.hide();
286
- return;
287
- } else if (typeof ret == 'string' || typeof ret == 'object') {
288
- data = ret;
289
- }
290
- }
291
-
292
- tmp.html( data );
293
- _process_inline();
294
- }
295
- }
296
- }));
297
-
298
- break;
299
-
300
- case 'iframe':
301
- _show();
302
- break;
303
- }
304
- },
305
-
306
- _process_inline = function() {
307
- var
308
- w = selectedOpts.width,
309
- h = selectedOpts.height,
310
- ww = $(window).width() == 0 ? window.innerWidth : $(window).width(),
311
- wh = $(window).height() == 0 ? window.innerHeight : $(window).height();
312
-
313
- if (w.toString().indexOf('%') > -1) {
314
- w = parseInt( (ww - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
315
-
316
- } else {
317
- w = w == 'auto' ? 'auto' : w + 'px';
318
- }
319
-
320
- if (h.toString().indexOf('%') > -1) {
321
- h = parseInt( (wh - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
322
-
323
- } else {
324
- h = h == 'auto' ? 'auto' : h + 'px';
325
- }
326
-
327
- tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
328
-
329
- selectedOpts.width = tmp.width();
330
- selectedOpts.height = tmp.height();
331
-
332
- _show();
333
- },
334
-
335
- _process_image = function() {
336
- selectedOpts.width = imgPreloader.width;
337
- selectedOpts.height = imgPreloader.height;
338
-
339
- $("<img />").attr({
340
- 'id' : 'fancybox-img',
341
- 'src' : imgPreloader.src,
342
- 'alt' : selectedOpts.title
343
- }).appendTo( tmp );
344
-
345
- _show();
346
- },
347
-
348
- _show = function() {
349
- var pos, equal;
350
-
351
- loading.hide();
352
-
353
- if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
354
- $('.fancybox-inline-tmp').trigger('fancybox-cancel');
355
-
356
- busy = false;
357
- return;
358
- }
359
-
360
- busy = true;
361
-
362
- $(content.add( overlay )).off();
363
-
364
- $(window).off("resize.fb scroll.fb");
365
- $(document).off('keydown.fb');
366
-
367
- if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
368
- wrap.css('height', wrap.height());
369
- }
370
-
371
- currentArray = selectedArray;
372
- currentIndex = selectedIndex;
373
- currentOpts = selectedOpts;
374
-
375
- if (currentOpts.overlayShow) {
376
- overlay.css({
377
- 'background-color' : currentOpts.overlayColor,
378
- 'opacity' : currentOpts.overlayOpacity,
379
- 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
380
- 'height' : $(document).height()
381
- });
382
-
383
- if (!overlay.is(':visible')) {
384
- if (isIE6) {
385
- $('select:not(#fancybox-tmp select)').filter(function() {
386
- return this.style.visibility !== 'hidden';
387
- }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
388
- this.style.visibility = 'inherit';
389
- });
390
- }
391
-
392
- overlay.show();
393
- }
394
- } else {
395
- overlay.hide();
396
- }
397
-
398
- final_pos = _get_zoom_to();
399
-
400
- _process_title();
401
-
402
- if (wrap.is(":visible")) {
403
- $( close.add( nav_left ).add( nav_right ) ).hide();
404
-
405
- pos = wrap.position(),
406
-
407
- start_pos = {
408
- top : pos.top,
409
- left : pos.left,
410
- width : wrap.width(),
411
- height : wrap.height()
412
- };
413
-
414
- equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
415
-
416
- content.fadeTo(currentOpts.changeFade, 0.3, function() {
417
- var finish_resizing = function() {
418
- content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
419
- };
420
-
421
- $('.fancybox-inline-tmp').trigger('fancybox-change');
422
-
423
- content
424
- .empty()
425
- .removeAttr('filter')
426
- .css({
427
- 'border-width' : currentOpts.padding,
428
- 'width' : final_pos.width - currentOpts.padding * 2,
429
- 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
430
- });
431
-
432
- if (equal) {
433
- finish_resizing();
434
-
435
- } else {
436
- fx.prop = 0;
437
-
438
- $(fx).animate({prop: 1}, {
439
- duration : currentOpts.changeSpeed,
440
- easing : currentOpts.easingChange,
441
- step : _draw,
442
- complete : finish_resizing
443
- });
444
- }
445
- });
446
-
447
- return;
448
- }
449
-
450
- wrap.removeAttr("style");
451
-
452
- content.css('border-width', currentOpts.padding);
453
-
454
- if (currentOpts.transitionIn == 'elastic') {
455
- start_pos = _get_zoom_from();
456
-
457
- content.html( tmp.contents() );
458
-
459
- wrap.show();
460
-
461
- if (currentOpts.opacity) {
462
- final_pos.opacity = 0;
463
- }
464
-
465
- fx.prop = 0;
466
-
467
- $(fx).animate({prop: 1}, {
468
- duration : currentOpts.speedIn,
469
- easing : currentOpts.easingIn,
470
- step : _draw,
471
- complete : _finish
472
- });
473
-
474
- return;
475
- }
476
-
477
- if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
478
- title.show();
479
- }
480
-
481
- content
482
- .css({
483
- 'width' : final_pos.width - currentOpts.padding * 2,
484
- 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
485
- })
486
- .html( tmp.contents() );
487
-
488
- wrap
489
- .css(final_pos)
490
- .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
491
- },
492
-
493
- _format_title = function(title) {
494
- if (title && title.length) {
495
- if (currentOpts.titlePosition == 'float') {
496
- return '<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
497
- }
498
-
499
- return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
500
- }
501
-
502
- return false;
503
- },
504
-
505
- _process_title = function() {
506
- titleStr = currentOpts.title || '';
507
- titleHeight = 0;
508
-
509
- title
510
- .empty()
511
- .removeAttr('style')
512
- .removeClass();
513
-
514
- if (currentOpts.titleShow === false) {
515
- title.hide();
516
- return;
517
- }
518
-
519
- titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
520
-
521
- if (!titleStr || titleStr === '') {
522
- title.hide();
523
- return;
524
- }
525
-
526
- title
527
- .addClass('fancybox-title-' + currentOpts.titlePosition)
528
- .html( titleStr )
529
- .appendTo( 'body' )
530
- .show();
531
-
532
- switch (currentOpts.titlePosition) {
533
- case 'inside':
534
- title
535
- .css({
536
- 'width' : final_pos.width - (currentOpts.padding * 2),
537
- 'marginLeft' : currentOpts.padding,
538
- 'marginRight' : currentOpts.padding
539
- });
540
-
541
- titleHeight = title.outerHeight(true);
542
-
543
- title.appendTo( outer );
544
-
545
- final_pos.height += titleHeight;
546
- break;
547
-
548
- case 'over':
549
- title
550
- .css({
551
- 'marginLeft' : currentOpts.padding,
552
- 'width' : final_pos.width - (currentOpts.padding * 2),
553
- 'bottom' : currentOpts.padding
554
- })
555
- .appendTo( outer );
556
- break;
557
-
558
- case 'float':
559
- title
560
- .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
561
- .appendTo( wrap );
562
- break;
563
-
564
- default:
565
- title
566
- .css({
567
- 'width' : final_pos.width - (currentOpts.padding * 2),
568
- 'paddingLeft' : currentOpts.padding,
569
- 'paddingRight' : currentOpts.padding
570
- })
571
- .appendTo( wrap );
572
- break;
573
- }
574
-
575
- title.hide();
576
- },
577
-
578
- _set_navigation = function() {
579
- if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
580
- $(document).on('keydown.fb', function(e) {
581
- if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
582
- e.preventDefault();
583
- $.fancybox.close();
584
-
585
- } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
586
- e.preventDefault();
587
- $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
588
- }
589
- });
590
- }
591
-
592
- if (!currentOpts.showNavArrows) {
593
- nav_left.hide();
594
- nav_right.hide();
595
- return;
596
- }
597
-
598
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
599
- nav_left.show();
600
- }
601
-
602
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
603
- nav_right.show();
604
- }
605
- },
606
-
607
- _finish = function () {
608
- if (!$.support.opacity) {
609
- content.get(0).style.removeAttribute('filter');
610
- wrap.get(0).style.removeAttribute('filter');
611
- }
612
-
613
- if (selectedOpts.autoDimensions) {
614
- content.css('height', 'auto');
615
- }
616
-
617
- wrap.css('height', 'auto');
618
-
619
- if (titleStr && titleStr.length) {
620
- title.show();
621
- }
622
-
623
- if (currentOpts.showCloseButton) {
624
- close.show();
625
- }
626
-
627
- _set_navigation();
628
-
629
- if (currentOpts.hideOnContentClick) {
630
- content.on('click', $.fancybox.close);
631
- }
632
-
633
- if (currentOpts.hideOnOverlayClick) {
634
- overlay.on('click', $.fancybox.close);
635
- }
636
-
637
- if (currentOpts.autoResize) {
638
- $(window).on("resize.fb", $.fancybox.resize);
639
- }
640
-
641
- if (currentOpts.centerOnScroll) {
642
- $(window).on("scroll.fb", $.fancybox.center);
643
- }
644
-
645
- if ($.fn.mousewheel) {
646
- wrap.on('mousewheel.fb', function(e, delta) {
647
- if (busy) {
648
- e.preventDefault();
649
- } else if ( currentOpts.type == 'image' && ( $(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight ) ) {
650
- e.preventDefault();
651
- $.fancybox[ delta > 0 ? 'prev' : 'next']();
652
- }
653
- });
654
- }
655
-
656
- if (currentOpts.type == 'iframe') {
657
- $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '') + ' style="border:0;margin:0;overflow:' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + '" src="' + currentOpts.href + '"' + (false === selectedOpts.allowfullscreen ? '' : ' allowfullscreen') + '></iframe>').appendTo(content);
658
- }
659
-
660
- wrap.show();
661
-
662
- busy = false;
663
-
664
- $.fancybox.center();
665
-
666
- currentOpts.onComplete(currentArray, currentIndex, currentOpts);
667
-
668
- _preload_images();
669
- },
670
-
671
- _preload_images = function() {
672
- var href,
673
- objNext;
674
-
675
- if ((currentArray.length -1) > currentIndex) {
676
- href = currentArray[ currentIndex + 1 ].href;
677
-
678
- if (typeof href !== 'undefined' && (href.match(imgRegExp) || $(obj).hasClass("image")) ) {
679
- objNext = new Image();
680
- objNext.src = href;
681
- }
682
- }
683
-
684
- if (currentIndex > 0) {
685
- href = currentArray[ currentIndex - 1 ].href;
686
-
687
- if (typeof href !== 'undefined' && (href.match(imgRegExp) || $(obj).hasClass("image")) ) {
688
- objNext = new Image();
689
- objNext.src = href;
690
- }
691
- }
692
- },
693
-
694
- _draw = function(pos) {
695
- var dim = {
696
- width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
697
- height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
698
-
699
- top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
700
- left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
701
- };
702
-
703
- if (typeof final_pos.opacity !== 'undefined') {
704
- dim.opacity = pos < 0.5 ? 0.5 : pos;
705
- }
706
-
707
- wrap.css(dim);
708
-
709
- content.css({
710
- 'width' : dim.width - currentOpts.padding * 2,
711
- 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
712
- });
713
- },
714
-
715
- _get_viewport = function() {
716
- return [
717
- $(window).width() == 0 ? window.innerWidth : $(window).width() - (currentOpts.margin * 2),
718
- $(window).height() == 0 ? window.innerHeight : $(window).height() - (currentOpts.margin * 2),
719
- $(document).scrollLeft() + currentOpts.margin,
720
- $(document).scrollTop() + currentOpts.margin
721
- ];
722
- },
723
-
724
- _get_zoom_to = function () {
725
- var view = _get_viewport(),
726
- to = {},
727
- resize = currentOpts.autoScale,
728
- double_padding = currentOpts.padding * 2,
729
- ratio;
730
-
731
- if (currentOpts.width.toString().indexOf('%') > -1) {
732
- to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
733
- } else {
734
- to.width = currentOpts.width + double_padding;
735
- }
736
-
737
- if (currentOpts.height.toString().indexOf('%') > -1) {
738
- to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
739
- } else {
740
- to.height = currentOpts.height + double_padding;
741
- }
742
-
743
- if (resize && (to.width > view[0] || to.height > view[1])) {
744
- if (selectedOpts.type == 'image' || selectedOpts.type == 'svg'|| selectedOpts.type == 'swf') {
745
- ratio = (currentOpts.width ) / (currentOpts.height );
746
-
747
- if ((to.width ) > view[0]) {
748
- to.width = view[0];
749
- to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
750
- }
751
-
752
- if ((to.height) > view[1]) {
753
- to.height = view[1];
754
- to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
755
- }
756
-
757
- } else {
758
- to.width = Math.min(to.width, view[0]);
759
- to.height = Math.min(to.height, view[1]);
760
- }
761
- }
762
-
763
- to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
764
- to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
765
-
766
- return to;
767
- },
768
-
769
- _get_obj_pos = function(obj) {
770
- var pos = obj.offset();
771
-
772
- pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
773
- pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
774
-
775
- pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
776
- pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
777
-
778
- pos.width = obj.width();
779
- pos.height = obj.height();
780
-
781
- return pos;
782
- },
783
-
784
- _get_zoom_from = function() {
785
- var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
786
- from = {},
787
- pos,
788
- view;
789
-
790
- if (orig && orig.length) {
791
- pos = _get_obj_pos(orig);
792
-
793
- from = {
794
- width : pos.width + (currentOpts.padding * 2),
795
- height : pos.height + (currentOpts.padding * 2),
796
- top : pos.top - currentOpts.padding - 20,
797
- left : pos.left - currentOpts.padding - 20
798
- };
799
-
800
- } else {
801
- view = _get_viewport();
802
-
803
- from = {
804
- width : currentOpts.padding * 2,
805
- height : currentOpts.padding * 2,
806
- top : parseInt(view[3] + view[1] * 0.5, 10),
807
- left : parseInt(view[2] + view[0] * 0.5, 10)
808
- };
809
- }
810
-
811
- return from;
812
- },
813
-
814
- _animate_loading = function() {
815
- if (!loading.is(':visible')){
816
- clearInterval(loadingTimer);
817
- return;
818
- }
819
-
820
- $('div', loading).css('top', (loadingFrame * -40) + 'px');
821
-
822
- loadingFrame = (loadingFrame + 1) % 12;
823
- };
824
-
825
- /*
826
- * Public methods
827
- */
828
-
829
- $.fn.fancybox = function(options) {
830
- if (!$(this).length) {
831
- return this;
832
- }
833
-
834
- $(this)
835
- .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
836
- .off('click.fb')
837
- .on('click.fb', function(e) {
838
- e.preventDefault();
839
-
840
- if (busy) {
841
- return;
842
- }
843
-
844
- busy = true;
845
-
846
- $(this).blur();
847
-
848
- selectedArray = [];
849
- selectedIndex = 0;
850
-
851
- var rel = $(this).attr('rel') || '';
852
-
853
- if (!rel || rel == '' || rel === 'nofollow') {
854
- selectedArray.push(this);
855
-
856
- } else {
857
- selectedArray = $('a[rel="' + rel + '"], area[rel="' + rel + '"]');
858
- selectedIndex = selectedArray.index( this );
859
- }
860
-
861
- _start();
862
-
863
- return;
864
- });
865
-
866
- return this;
867
- };
868
-
869
- $.fancybox = function(obj) {
870
- var opts;
871
-
872
- if (busy) {
873
- return;
874
- }
875
-
876
- busy = true;
877
- opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
878
-
879
- selectedArray = [];
880
- selectedIndex = parseInt(opts.index, 10) || 0;
881
-
882
- if ($.isArray(obj)) {
883
- for (var i = 0, j = obj.length; i < j; i++) {
884
- if (typeof obj[i] == 'object') {
885
- $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
886
- } else {
887
- obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
888
- }
889
- }
890
-
891
- selectedArray = jQuery.merge(selectedArray, obj);
892
-
893
- } else {
894
- if (typeof obj == 'object') {
895
- $(obj).data('fancybox', $.extend({}, opts, obj));
896
- } else {
897
- obj = $({}).data('fancybox', $.extend({content : obj}, opts));
898
- }
899
-
900
- selectedArray.push(obj);
901
- }
902
-
903
- if (selectedIndex > selectedArray.length || selectedIndex < 0) {
904
- selectedIndex = 0;
905
- }
906
-
907
- _start();
908
- };
909
-
910
- $.fancybox.showActivity = function() {
911
- clearInterval(loadingTimer);
912
-
913
- loading.show();
914
- loadingTimer = setInterval(_animate_loading, 66);
915
- };
916
-
917
- $.fancybox.hideActivity = function() {
918
- loading.hide();
919
- };
920
-
921
- $.fancybox.next = function() {
922
- return $.fancybox.pos( currentIndex + 1);
923
- };
924
-
925
- $.fancybox.prev = function() {
926
- return $.fancybox.pos( currentIndex - 1);
927
- };
928
-
929
- $.fancybox.pos = function(pos) {
930
- if (busy) {
931
- return;
932
- }
933
-
934
- pos = parseInt(pos);
935
-
936
- selectedArray = currentArray;
937
-
938
- if (pos > -1 && pos < currentArray.length) {
939
- selectedIndex = pos;
940
- _start();
941
-
942
- } else if (currentOpts.cyclic && currentArray.length > 1) {
943
- selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
944
- _start();
945
- }
946
-
947
- return;
948
- };
949
-
950
- $.fancybox.cancel = function() {
951
- if (busy) {
952
- return;
953
- }
954
-
955
- busy = true;
956
-
957
- $('.fancybox-inline-tmp').trigger('fancybox-cancel');
958
-
959
- _abort();
960
-
961
- selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
962
-
963
- busy = false;
964
- };
965
-
966
- // Note: within an iframe use - parent.$.fancybox.close();
967
- $.fancybox.close = function() {
968
- if (busy || wrap.is(':hidden')) {
969
- return;
970
- }
971
-
972
- busy = true;
973
-
974
- if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
975
- busy = false;
976
- return;
977
- }
978
-
979
- _abort();
980
-
981
- $(close.add( nav_left ).add( nav_right )).hide();
982
-
983
- $(content.add( overlay )).off();
984
-
985
- $(window).off("resize.fb scroll.fb mousewheel.fb");
986
- $(document).off('keydown.fb');
987
-
988
- content.find('iframe#fancybox-frame').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
989
-
990
- if (currentOpts.titlePosition !== 'inside') {
991
- title.empty();
992
- }
993
-
994
- wrap.stop();
995
-
996
- function _cleanup() {
997
- overlay.fadeOut('fast');
998
-
999
- title.empty().hide();
1000
- wrap.hide();
1001
-
1002
- $('.fancybox-inline-tmp').trigger('fancybox-cleanup');
1003
-
1004
- content.empty();
1005
-
1006
- currentOpts.onClosed(currentArray, currentIndex, currentOpts);
1007
-
1008
- currentArray = selectedOpts = [];
1009
- currentIndex = selectedIndex = 0;
1010
- currentOpts = selectedOpts = {};
1011
-
1012
- busy = false;
1013
- }
1014
-
1015
- if (currentOpts.transitionOut == 'elastic') {
1016
- start_pos = _get_zoom_from();
1017
-
1018
- var pos = wrap.position();
1019
-
1020
- final_pos = {
1021
- top : pos.top ,
1022
- left : pos.left,
1023
- width : wrap.width(),
1024
- height : wrap.height()
1025
- };
1026
-
1027
- if (currentOpts.opacity) {
1028
- final_pos.opacity = 1;
1029
- }
1030
-
1031
- title.empty().hide();
1032
-
1033
- fx.prop = 1;
1034
-
1035
- $(fx).animate({ prop: 0 }, {
1036
- duration : currentOpts.speedOut,
1037
- easing : currentOpts.easingOut,
1038
- step : _draw,
1039
- complete : _cleanup
1040
- });
1041
-
1042
- } else {
1043
- wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
1044
- }
1045
- };
1046
-
1047
- $.fancybox.resize = function() {
1048
- if (overlay.is(':visible')) {
1049
- overlay.css('height', $(document).height());
1050
- }
1051
-
1052
- $.fancybox.center(true);
1053
- };
1054
-
1055
- $.fancybox.center = function() {
1056
- var view, align;
1057
-
1058
- if (busy) {
1059
- return;
1060
- }
1061
-
1062
- align = arguments[0] === true ? 1 : 0;
1063
- view = _get_viewport();
1064
-
1065
- if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1066
- return;
1067
- }
1068
-
1069
- wrap
1070
- .stop()
1071
- .animate({
1072
- 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
1073
- 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
1074
- }, typeof arguments[0] == 'number' ? arguments[0] : 200);
1075
- };
1076
-
1077
- $.fancybox.init = function() {
1078
- if ($("#fancybox-wrap").length) {
1079
- return;
1080
- }
1081
-
1082
- $('body').append(
1083
- tmp = $('<div id="fancybox-tmp"></div>'),
1084
- loading = $('<div id="fancybox-loading"><div></div></div>'),
1085
- overlay = $('<div id="fancybox-overlay"></div>'),
1086
- wrap = $('<div id="fancybox-wrap"></div>')
1087
- );
1088
-
1089
- outer = $('<div id="fancybox-outer"></div>')
1090
- .append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
1091
- .appendTo( wrap );
1092
-
1093
- outer.append(
1094
- content = $('<div id="fancybox-content"></div>'),
1095
- close = $('<a id="fancybox-close"></a>'),
1096
- title = $('<div id="fancybox-title"></div>'),
1097
-
1098
- nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
1099
- nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
1100
- );
1101
-
1102
- close.click($.fancybox.close);
1103
- loading.click($.fancybox.cancel);
1104
-
1105
- nav_left.click(function(e) {
1106
- e.preventDefault();
1107
- $.fancybox.prev();
1108
- });
1109
-
1110
- nav_right.click(function(e) {
1111
- e.preventDefault();
1112
- $.fancybox.next();
1113
- });
1114
-
1115
- if (!$.support.opacity) {
1116
- wrap.addClass('fancybox-ie');
1117
- }
1118
-
1119
- if (isIE6) {
1120
- loading.addClass('fancybox-ie6');
1121
- wrap.addClass('fancybox-ie6');
1122
-
1123
- $('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(outer);
1124
- }
1125
- };
1126
-
1127
- $.fn.fancybox.defaults = {
1128
- padding : 10,
1129
- margin : 40,
1130
- opacity : false,
1131
- modal : false,
1132
- cyclic : false,
1133
- allowfullscreen : false,
1134
- scrolling : 'auto', // 'auto', 'yes' or 'no'
1135
-
1136
- width : 560,
1137
- height : 340,
1138
-
1139
- autoScale : true,
1140
- autoDimensions : true,
1141
- centerOnScroll : !isTouch,
1142
- autoResize : true, //!isTouch
1143
-
1144
- ajax : {},
1145
- swf : { wmode: 'transparent' },
1146
- svg : { wmode: 'transparent' },
1147
-
1148
- hideOnOverlayClick : true,
1149
- hideOnContentClick : false,
1150
-
1151
- overlayShow : true,
1152
- overlayOpacity : 0.7,
1153
- overlayColor : '#777',
1154
-
1155
- titleShow : true,
1156
- titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
1157
- titleFormat : null,
1158
- titleFromAlt : false,
1159
-
1160
- transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1161
- transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1162
-
1163
- speedIn : 300,
1164
- speedOut : 300,
1165
-
1166
- changeSpeed : 300,
1167
- changeFade : 'fast',
1168
-
1169
- easingIn : 'swing',
1170
- easingOut : 'swing',
1171
-
1172
- showCloseButton : true,
1173
- showNavArrows : true,
1174
- enableEscapeButton : true,
1175
- enableKeyboardNav : true,
1176
-
1177
- onStart : function(){},
1178
- onCancel : function(){},
1179
- onComplete : function(){},
1180
- onCleanup : function(){},
1181
- onClosed : function(){},
1182
- onError : function(){}
1183
- };
1184
-
1185
- $(document).ready(function() {
1186
- $.fancybox.init();
1187
- });
1188
-
1189
- })(jQuery);
1190
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/assets/popup/jquery.fancybox-1.3.7.min.css DELETED
@@ -1 +0,0 @@
1
- #fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:11104;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(fancybox.png);box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;z-index:11100;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:11101;outline:0;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-wrap div{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff}#fancybox-content{width:0;height:0;padding:0;outline:0;position:relative;overflow:hidden;z-index:11102;border:0 solid #fff;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:11101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:11103;display:none}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{width:100%;height:100%;border:none;display:block;-webkit-overflow-scrolling:touch;z-index:0}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:0;background:url(blank.gif);z-index:11102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:11102;display:block}#fancybox-left-ico{background-image:url(fancybox.png);background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-image:url(fancybox.png);background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:11001}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(fancybox-x.png)}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(fancybox.png);background-position:-40px -162px}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(fancybox-y.png);background-position:-20px 0}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(fancybox.png);background-position:-40px -182px}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(fancybox-x.png);background-position:0 -20px}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(fancybox.png);background-position:-40px -142px}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(fancybox-y.png)}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(fancybox.png);background-position:-40px -122px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:11102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background-image:url(fancy_title_over.png);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}.fancybox-ie .fancybox-bg{background:0 0!important}
 
public/assets/popup/jquery.fancybox-1.3.7.min.js DELETED
@@ -1,43 +0,0 @@
1
- !function(t){var e,i,n,a,o,d,c,r,s,h,l,f,p,g=0,b={},u=[],y=0,w={},m=[],v=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=/[^\.]\.(svg)\s*$/i,j=1,O=0,T="",A=!1,D=t.extend(t("<div/>")[0],{prop:0}),S=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,F=void 0!==document.createTouch,E=function(){i.hide(),x.onerror=x.onload=null,v&&v.abort(),e.empty()},N=function(){return!1===b.onError(u,g,b)?(i.hide(),void(A=!1)):(b.titleShow=!1,b.width="auto",b.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),void P())},B=function(){var n,a,o,c,r,s,h=u[g]
2
- if(E(),b=t.extend({},t.fn.fancybox.defaults,void 0===t(h).data("fancybox")?b:t(h).data("fancybox")),s=b.onStart(u,g,b),s===!1)return void(A=!1)
3
- if("object"==typeof s&&(b=t.extend(b,s)),o=b.title||(h.nodeName?t(h).attr("title"):h.title)||"",h.nodeName&&!b.orig&&(b.orig=t(h).children("img:first").length?t(h).children("img:first"):t(h)),""===o&&b.orig&&(o=b.orig.attr(b.titleFromAlt?"alt":"title")),n=b.href||(h.nodeName?t(h).attr("href"):h.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),b.type?(a=b.type,n||(n=b.content)):b.content?a="html":n&&(a=n.match(I)||t(h).hasClass("image")?"image":n.match(C)?"swf":n.match(k)?"svg":t(h).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void N()
4
- switch("inline"==a&&(h=n.substr(n.indexOf("#")),a=t(h).length>0?"inline":"ajax"),b.type=a,b.href=n,b.title=o,b.autoDimensions&&("html"==b.type||"inline"==b.type||"ajax"==b.type?(b.width="auto",b.height="auto"):b.autoDimensions=!1),b.modal&&(b.overlayShow=!0,b.hideOnOverlayClick=!1,b.hideOnContentClick=!1,b.enableEscapeButton=!1,b.showCloseButton=!1),b.padding=parseInt(b.padding,10),b.margin=parseInt(b.margin,10),e.css("padding",b.padding+b.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(b.content),P()
5
- break
6
- case"inline":if(t(h).parent().is("#fancybox-content")===!0)return void(A=!1)
7
- t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(h)).on("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).on("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(h).appendTo(e),P()
8
- break
9
- case"image":A=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){N()},x.onload=function(){A=!0,x.onerror=x.onload=null,z()},x.src=n
10
- break
11
- case"swf":b.scrolling="no",c='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+b.width+'" height="'+b.height+'"><param name="movie" value="'+n+'"></param>',r="",t.each(b.swf,function(t,e){c+='<param name="'+t+'" value="'+e+'"></param>',r+=" "+t+'="'+e+'"'}),c+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+b.width+'" height="'+b.height+'"'+r+"></embed></object>",e.html(c),P()
12
- break
13
- case"svg":b.scrolling="no",c='<object width="'+b.width+'" height="'+b.height+'" data="'+n+'"></object>',e.html(c),P()
14
- break
15
- case"ajax":A=!1,t.fancybox.showActivity(),b.ajax.win=b.ajax.success,v=t.ajax(t.extend({},b.ajax,{url:n,data:b.ajax.data||{},error:function(t){t.status>0&&N()},success:function(t,a,o){var d="object"==typeof o?o:v
16
- if(200==d.status){if("function"==typeof b.ajax.win){if(s=b.ajax.win(n,t,a,o),s===!1)return void i.hide();("string"==typeof s||"object"==typeof s)&&(t=s)}e.html(t),P()}}}))
17
- break
18
- case"iframe":H()}},P=function(){var i=b.width,n=b.height,a=0==t(window).width()?window.innerWidth:t(window).width(),o=0==t(window).height()?window.innerHeight:t(window).height()
19
- i=(""+i).indexOf("%")>-1?parseInt((a-2*b.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=(""+n).indexOf("%")>-1?parseInt((o-2*b.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==b.scrolling?"auto":"yes"==b.scrolling?"scroll":"hidden")+';position:relative;"></div>'),b.width=e.width(),b.height=e.height(),H()},z=function(){b.width=x.width,b.height=x.height,t("<img />").attr({id:"fancybox-img",src:x.src,alt:b.title}).appendTo(e),H()},H=function(){var o,l
20
- return i.hide(),a.is(":visible")&&!1===w.onCleanup(m,y,w)?(t(".fancybox-inline-tmp").trigger("fancybox-cancel"),void(A=!1)):(A=!0,t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),m=u,y=g,w=b,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||(S&&t("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),p=Q(),M(),a.is(":visible")?(t(c.add(s).add(h)).hide(),o=a.position(),f={top:o.top,left:o.left,width:a.width(),height:a.height()},l=f.width==p.width&&f.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,W)}
21
- t(".fancybox-inline-tmp").trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}),l?i():(D.prop=0,t(D).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:$,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(f=U(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),D.prop=0,void t(D).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:$,complete:W})):("inside"==w.titlePosition&&O>0&&r.show(),d.css({width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,W))))},L=function(t){return t&&t.length?"float"==w.titlePosition?'<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>":!1},M=function(){if(T=w.title||"",O=0,r.empty().removeAttr("style").removeClass(),w.titleShow===!1)return void r.hide()
22
- if(T=t.isFunction(w.titleFormat)?w.titleFormat(T,m,y,w):L(T),!T||""===T)return void r.hide()
23
- switch(r.addClass("fancybox-title-"+w.titlePosition).html(T).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),O=r.outerHeight(!0),r.appendTo(o),p.height+=O
24
- break
25
- case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o)
26
- break
27
- case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a)
28
- break
29
- default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},R=function(){return(w.enableEscapeButton||w.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),w.showNavArrows?((w.cyclic&&m.length>1||0!==y)&&s.show(),void((w.cyclic&&m.length>1||y!=m.length-1)&&h.show())):(s.hide(),void h.hide())},W=function(){t.support.opacity||(d.get(0).style.removeAttribute("filter"),a.get(0).style.removeAttribute("filter")),b.autoDimensions&&d.css("height","auto"),a.css("height","auto"),T&&T.length&&r.show(),w.showCloseButton&&c.show(),R(),w.hideOnContentClick&&d.on("click",t.fancybox.close),w.hideOnOverlayClick&&n.on("click",t.fancybox.close),w.autoResize&&t(window).on("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),t.fn.mousewheel&&a.on("mousewheel.fb",function(e,i){A?e.preventDefault():"image"!=w.type||0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),"iframe"==w.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'"'+(navigator.userAgent.match(/msie [6]/i)?' allowtransparency="true""':"")+' style="border:0;margin:0;overflow:'+("auto"==b.scrolling?"auto":"yes"==b.scrolling?"scroll":"hidden")+'" src="'+w.href+'"'+(!1===b.allowfullscreen?"":" allowfullscreen")+"></iframe>").appendTo(d),a.show(),A=!1,t.fancybox.center(),w.onComplete(m,y,w),K()},K=function(){var e,i
30
- m.length-1>y&&(e=m[y+1].href,void 0!==e&&(e.match(I)||t(obj).hasClass("image"))&&(i=new Image,i.src=e)),y>0&&(e=m[y-1].href,void 0!==e&&(e.match(I)||t(obj).hasClass("image"))&&(i=new Image,i.src=e))},$=function(t){var e={width:parseInt(f.width+(p.width-f.width)*t,10),height:parseInt(f.height+(p.height-f.height)*t,10),top:parseInt(f.top+(p.top-f.top)*t,10),left:parseInt(f.left+(p.left-f.left)*t,10)}
31
- void 0!==p.opacity&&(e.opacity=.5>t?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-O*t-2*w.padding})},q=function(){return[0==t(window).width()?window.innerWidth:t(window).width()-2*w.margin,0==t(window).height()?window.innerHeight:t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},Q=function(){var t,e=q(),i={},n=w.autoScale,a=2*w.padding
32
- return i.width=(""+w.width).indexOf("%")>-1?parseInt(e[0]*parseFloat(w.width)/100,10):w.width+a,i.height=(""+w.height).indexOf("%")>-1?parseInt(e[1]*parseFloat(w.height)/100,10):w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==b.type||"svg"==b.type||"swf"==b.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},X=function(t){var e=t.offset()
33
- return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},U=function(){var e,i,n=b.orig?t(b.orig):!1,a={}
34
- return n&&n.length?(e=X(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=q(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},G=function(){return i.is(":visible")?(t("div",i).css("top",-40*j+"px"),void(j=(j+1)%12)):void clearInterval(l)}
35
- t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){if(e.preventDefault(),!A){A=!0,t(this).blur(),u=[],g=0
36
- var i=t(this).attr("rel")||""
37
- i&&""!=i&&"nofollow"!==i?(u=t('a[rel="'+i+'"], area[rel="'+i+'"]'),g=u.index(this)):u.push(this),B()}}),this):this},t.fancybox=function(e){var i
38
- if(!A){if(A=!0,i=void 0!==arguments[1]?arguments[1]:{},u=[],g=parseInt(i.index,10)||0,t.isArray(e)){for(var n=0,a=e.length;a>n;n++)"object"==typeof e[n]?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i))
39
- u=jQuery.merge(u,e)}else"object"==typeof e?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),u.push(e);(g>u.length||0>g)&&(g=0),B()}},t.fancybox.showActivity=function(){clearInterval(l),i.show(),l=setInterval(G,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(y+1)},t.fancybox.prev=function(){return t.fancybox.pos(y-1)},t.fancybox.pos=function(t){A||(t=parseInt(t),u=m,t>-1&&t<m.length?(g=t,B()):w.cyclic&&m.length>1&&(g=t>=m.length?0:m.length-1,B()))},t.fancybox.cancel=function(){A||(A=!0,t(".fancybox-inline-tmp").trigger("fancybox-cancel"),E(),b.onCancel(u,g,b),A=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t(".fancybox-inline-tmp").trigger("fancybox-cleanup"),d.empty(),w.onClosed(m,y,w),m=b=[],y=g=0,w=b={},A=!1}if(!A&&!a.is(":hidden")){if(A=!0,w&&!1===w.onCleanup(m,y,w))return void(A=!1)
40
- if(E(),t(c.add(s).add(h)).hide(),t(d.add(n)).off(),t(window).off("resize.fb scroll.fb mousewheel.fb"),t(document).off("keydown.fb"),d.find("iframe#fancybox-frame").attr("src",S&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){f=U()
41
- var i=a.position()
42
- p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),D.prop=1,t(D).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:$,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e
43
- A||(e=arguments[0]===!0?1:0,t=q(),(e||!(a.width()>t[0]||a.height()>t[1]))&&a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),a=t('<div id="fancybox-wrap"></div>')),o=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(a),o.append(d=t('<div id="fancybox-content"></div>'),c=t('<a id="fancybox-close"></a>'),r=t('<div id="fancybox-title"></div>'),s=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),h=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),c.click(t.fancybox.close),i.click(t.fancybox.cancel),s.click(function(e){e.preventDefault(),t.fancybox.prev()}),h.click(function(e){e.preventDefault(),t.fancybox.next()}),t.support.opacity||a.addClass("fancybox-ie"),S&&(i.addClass("fancybox-ie6"),a.addClass("fancybox-ie6"),t('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(o)))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,allowfullscreen:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!F,autoResize:!0,ajax:{},swf:{wmode:"transparent"},svg:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},t(document).ready(function(){t.fancybox.init()})}(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/assets/popup/jquery.fancybox.css DELETED
@@ -1,274 +0,0 @@
1
- /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
- .fancybox-wrap,
3
- .fancybox-skin,
4
- .fancybox-outer,
5
- .fancybox-inner,
6
- .fancybox-image,
7
- .fancybox-wrap iframe,
8
- .fancybox-wrap object,
9
- .fancybox-nav,
10
- .fancybox-nav span,
11
- .fancybox-tmp
12
- {
13
- padding: 0;
14
- margin: 0;
15
- border: 0;
16
- outline: none;
17
- vertical-align: top;
18
- }
19
-
20
- .fancybox-wrap {
21
- position: absolute;
22
- top: 0;
23
- left: 0;
24
- z-index: 8020;
25
- }
26
-
27
- .fancybox-skin {
28
- position: relative;
29
- background: #f9f9f9;
30
- color: #444;
31
- text-shadow: none;
32
- /*-webkit-border-radius: 4px;
33
- -moz-border-radius: 4px;
34
- border-radius: 4px;*/
35
- }
36
-
37
- .fancybox-opened {
38
- z-index: 8030;
39
- }
40
-
41
- .fancybox-opened .fancybox-skin {
42
- -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
43
- -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
44
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
45
- }
46
-
47
- .fancybox-outer, .fancybox-inner {
48
- position: relative;
49
- }
50
-
51
- .fancybox-inner {
52
- overflow: hidden;
53
- }
54
-
55
- .fancybox-type-iframe .fancybox-inner {
56
- -webkit-overflow-scrolling: touch;
57
- }
58
-
59
- .fancybox-error {
60
- color: #444;
61
- font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
62
- margin: 0;
63
- padding: 15px;
64
- white-space: nowrap;
65
- }
66
-
67
- .fancybox-image, .fancybox-iframe {
68
- display: block;
69
- width: 100%;
70
- height: 100%;
71
- }
72
-
73
- .fancybox-image {
74
- max-width: 100%;
75
- max-height: 100%;
76
- }
77
-
78
- #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79
- background-image: url('fancybox_sprite.png');
80
- }
81
-
82
- #fancybox-loading {
83
- position: fixed;
84
- top: 50%;
85
- left: 50%;
86
- margin-top: -22px;
87
- margin-left: -22px;
88
- background-position: 0 -108px;
89
- opacity: 0.8;
90
- cursor: pointer;
91
- z-index: 8060;
92
- }
93
-
94
- #fancybox-loading div {
95
- width: 44px;
96
- height: 44px;
97
- background: url('fancybox_loading.gif') center center no-repeat;
98
- }
99
-
100
- .fancybox-close {
101
- position: absolute;
102
- top: -18px;
103
- right: -18px;
104
- width: 36px;
105
- height: 36px;
106
- cursor: pointer;
107
- z-index: 8040;
108
- }
109
-
110
- .fancybox-nav {
111
- position: absolute;
112
- top: 0;
113
- width: 40%;
114
- height: 100%;
115
- cursor: pointer;
116
- text-decoration: none;
117
- background: transparent url('blank.gif'); /* helps IE */
118
- -webkit-tap-highlight-color: rgba(0,0,0,0);
119
- z-index: 8040;
120
- }
121
-
122
- .fancybox-prev {
123
- left: 0;
124
- }
125
-
126
- .fancybox-next {
127
- right: 0;
128
- }
129
-
130
- .fancybox-nav span {
131
- position: absolute;
132
- top: 50%;
133
- width: 36px;
134
- height: 34px;
135
- margin-top: -18px;
136
- cursor: pointer;
137
- z-index: 8040;
138
- visibility: hidden;
139
- }
140
-
141
- .fancybox-prev span {
142
- left: 10px;
143
- background-position: 0 -36px;
144
- }
145
-
146
- .fancybox-next span {
147
- right: 10px;
148
- background-position: 0 -72px;
149
- }
150
-
151
- .fancybox-nav:hover span {
152
- visibility: visible;
153
- }
154
-
155
- .fancybox-tmp {
156
- position: absolute;
157
- top: -99999px;
158
- left: -99999px;
159
- visibility: hidden;
160
- max-width: 99999px;
161
- max-height: 99999px;
162
- overflow: visible !important;
163
- }
164
-
165
- /* Overlay helper */
166
-
167
- .fancybox-lock {
168
- overflow: hidden !important;
169
- width: auto;
170
- }
171
-
172
- .fancybox-lock body {
173
- overflow: hidden !important;
174
- }
175
-
176
- .fancybox-lock-test {
177
- overflow-y: hidden !important;
178
- }
179
-
180
- .fancybox-overlay {
181
- position: absolute;
182
- top: 0;
183
- left: 0;
184
- overflow: hidden;
185
- display: none;
186
- z-index: 8010;
187
- background: url('fancybox_overlay.png');
188
- }
189
-
190
- .fancybox-overlay-fixed {
191
- position: fixed;
192
- bottom: 0;
193
- right: 0;
194
- }
195
-
196
- .fancybox-lock .fancybox-overlay {
197
- overflow: auto;
198
- overflow-y: scroll;
199
- }
200
-
201
- /* Title helper */
202
-
203
- .fancybox-title {
204
- visibility: hidden;
205
- font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
206
- position: relative;
207
- text-shadow: none;
208
- z-index: 8050;
209
- }
210
-
211
- .fancybox-opened .fancybox-title {
212
- visibility: visible;
213
- }
214
-
215
- .fancybox-title-float-wrap {
216
- position: absolute;
217
- bottom: 0;
218
- right: 50%;
219
- margin-bottom: -35px;
220
- z-index: 8050;
221
- text-align: center;
222
- }
223
-
224
- .fancybox-title-float-wrap .child {
225
- display: inline-block;
226
- margin-right: -100%;
227
- padding: 2px 20px;
228
- background: transparent; /* Fallback for web browsers that doesn't support RGBa */
229
- background: rgba(0, 0, 0, 0.8);
230
- -webkit-border-radius: 15px;
231
- -moz-border-radius: 15px;
232
- border-radius: 15px;
233
- text-shadow: 0 1px 2px #222;
234
- color: #FFF;
235
- font-weight: bold;
236
- line-height: 24px;
237
- white-space: nowrap;
238
- }
239
-
240
- .fancybox-title-outside-wrap {
241
- position: relative;
242
- margin-top: 10px;
243
- color: #fff;
244
- }
245
-
246
- .fancybox-title-inside-wrap {
247
- padding-top: 10px;
248
- }
249
-
250
- .fancybox-title-over-wrap {
251
- position: absolute;
252
- bottom: 0;
253
- left: 0;
254
- color: #fff;
255
- padding: 10px;
256
- background: #000;
257
- background: rgba(0, 0, 0, .8);
258
- }
259
-
260
- /*Retina graphics!*/
261
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
262
- only screen and (min--moz-device-pixel-ratio: 1.5),
263
- only screen and (min-device-pixel-ratio: 1.5){
264
-
265
- #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
266
- background-image: url('fancybox_sprite@2x.png');
267
- background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
268
- }
269
-
270
- #fancybox-loading div {
271
- background-image: url('fancybox_loading@2x.gif');
272
- background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
273
- }
274
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/assets/popup/jquery.fancybox.js DELETED
@@ -1,2020 +0,0 @@
1
- /*!
2
- * fancyBox - jQuery Plugin
3
- * version: 2.1.5 (Fri, 14 Jun 2013)
4
- * @requires jQuery v1.6 or later
5
- *
6
- * Examples at http://fancyapps.com/fancybox/
7
- * License: www.fancyapps.com/fancybox/#license
8
- *
9
- * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
10
- *
11
- */
12
-
13
- (function (window, document, $, undefined) {
14
- "use strict";
15
-
16
- var H = $("html"),
17
- W = $(window),
18
- D = $(document),
19
- F = $.fancybox = function () {
20
- F.open.apply( this, arguments );
21
- },
22
- IE = navigator.userAgent.match(/msie/i),
23
- didUpdate = null,
24
- isTouch = document.createTouch !== undefined,
25
-
26
- isQuery = function(obj) {
27
- return obj && obj.hasOwnProperty && obj instanceof $;
28
- },
29
- isString = function(str) {
30
- return str && $.type(str) === "string";
31
- },
32
- isPercentage = function(str) {
33
- return isString(str) && str.indexOf('%') > 0;
34
- },
35
- isScrollable = function(el) {
36
- return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
37
- },
38
- getScalar = function(orig, dim) {
39
- var value = parseInt(orig, 10) || 0;
40
-
41
- if (dim && isPercentage(orig)) {
42
- value = F.getViewport()[ dim ] / 100 * value;
43
- }
44
-
45
- return Math.ceil(value);
46
- },
47
- getValue = function(value, dim) {
48
- return getScalar(value, dim) + 'px';
49
- };
50
-
51
- $.extend(F, {
52
- // The current version of fancyBox
53
- version: '2.1.5',
54
-
55
- defaults: {
56
- padding : 15,
57
- margin : 20,
58
-
59
- width : 800,
60
- height : 600,
61
- minWidth : 100,
62
- minHeight : 100,
63
- maxWidth : 9999,
64
- maxHeight : 9999,
65
- pixelRatio: 1, // Set to 2 for retina display support
66
-
67
- autoSize : true,
68
- autoHeight : false,
69
- autoWidth : false,
70
-
71
- autoResize : true,
72
- autoCenter : !isTouch,
73
- fitToView : true,
74
- aspectRatio : false,
75
- topRatio : 0.5,
76
- leftRatio : 0.5,
77
-
78
- scrolling : 'auto', // 'auto', 'yes' or 'no'
79
- wrapCSS : '',
80
-
81
- arrows : true,
82
- closeBtn : true,
83
- closeClick : false,
84
- nextClick : false,
85
- mouseWheel : true,
86
- autoPlay : false,
87
- playSpeed : 3000,
88
- preload : 3,
89
- modal : false,
90
- loop : true,
91
-
92
- ajax : {
93
- dataType : 'html',
94
- headers : { 'X-fancyBox': true }
95
- },
96
- iframe : {
97
- scrolling : 'auto',
98
- preload : true
99
- },
100
- swf : {
101
- wmode: 'transparent',
102
- allowfullscreen : 'true',
103
- allowscriptaccess : 'always'
104
- },
105
-
106
- keys : {
107
- next : {
108
- 13 : 'left', // enter
109
- 34 : 'up', // page down
110
- 39 : 'left', // right arrow
111
- 40 : 'up' // down arrow
112
- },
113
- prev : {
114
- 8 : 'right', // backspace
115
- 33 : 'down', // page up
116
- 37 : 'right', // left arrow
117
- 38 : 'down' // up arrow
118
- },
119
- close : [27], // escape key
120
- play : [32], // space - start/stop slideshow
121
- toggle : [70] // letter "f" - toggle fullscreen
122
- },
123
-
124
- direction : {
125
- next : 'left',
126
- prev : 'right'
127
- },
128
-
129
- scrollOutside : true,
130
-
131
- // Override some properties
132
- index : 0,
133
- type : null,
134
- href : null,
135
- content : null,
136
- title : null,
137
-
138
- // HTML templates
139
- tpl: {
140
- wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
141
- image : '<img class="fancybox-image" src="{href}" alt="" />',
142
- iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
143
- error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
144
- closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
145
- next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
146
- prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
147
- },
148
-
149
- // Properties for each animation type
150
- // Opening fancyBox
151
- openEffect : 'fade', // 'elastic', 'fade' or 'none'
152
- openSpeed : 250,
153
- openEasing : 'swing',
154
- openOpacity : true,
155
- openMethod : 'zoomIn',
156
-
157
- // Closing fancyBox
158
- closeEffect : 'fade', // 'elastic', 'fade' or 'none'
159
- closeSpeed : 250,
160
- closeEasing : 'swing',
161
- closeOpacity : true,
162
- closeMethod : 'zoomOut',
163
-
164
- // Changing next gallery item
165
- nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
166
- nextSpeed : 250,
167
- nextEasing : 'swing',
168
- nextMethod : 'changeIn',
169
-
170
- // Changing previous gallery item
171
- prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
172
- prevSpeed : 250,
173
- prevEasing : 'swing',
174
- prevMethod : 'changeOut',
175
-
176
- // Enable default helpers
177
- helpers : {
178
- overlay : true,
179
- title : true
180
- },
181
-
182
- // Callbacks
183
- onCancel : $.noop, // If canceling
184
- beforeLoad : $.noop, // Before loading
185
- afterLoad : $.noop, // After loading
186
- beforeShow : $.noop, // Before changing in current item
187
- afterShow : $.noop, // After opening
188
- beforeChange : $.noop, // Before changing gallery item
189
- beforeClose : $.noop, // Before closing
190
- afterClose : $.noop // After closing
191
- },
192
-
193
- //Current state
194
- group : {}, // Selected group
195
- opts : {}, // Group options
196
- previous : null, // Previous element
197
- coming : null, // Element being loaded
198
- current : null, // Currently loaded element
199
- isActive : false, // Is activated
200
- isOpen : false, // Is currently open
201
- isOpened : false, // Have been fully opened at least once
202
-
203
- wrap : null,
204
- skin : null,
205
- outer : null,
206
- inner : null,
207
-
208
- player : {
209
- timer : null,
210
- isActive : false
211
- },
212
-
213
- // Loaders
214
- ajaxLoad : null,
215
- imgPreload : null,
216
-
217
- // Some collections
218
- transitions : {},
219
- helpers : {},
220
-
221
- /*
222
- * Static methods
223
- */
224
-
225
- open: function (group, opts) {
226
- if (!group) {
227
- return;
228
- }
229
-
230
- if (!$.isPlainObject(opts)) {
231
- opts = {};
232
- }
233
-
234
- // Close if already active
235
- if (false === F.close(true)) {
236
- return;
237
- }
238
-
239
- // Normalize group
240
- if (!$.isArray(group)) {
241
- group = isQuery(group) ? $(group).get() : [group];
242
- }
243
-
244
- // Recheck if the type of each element is `object` and set content type (image, ajax, etc)
245
- $.each(group, function(i, element) {
246
- var obj = {},
247
- href,
248
- title,
249
- content,
250
- type,
251
- rez,
252
- hrefParts,
253
- selector;
254
-
255
- if ($.type(element) === "object") {
256
- // Check if is DOM element
257
- if (element.nodeType) {
258
- element = $(element);
259
- }
260
-
261
- if (isQuery(element)) {
262
- obj = {
263
- href : element.data('fancybox-href') || element.attr('href'),
264
- title : element.data('fancybox-title') || element.attr('title'),
265
- isDom : true,
266
- element : element
267
- };
268
-
269
- if ($.metadata) {
270
- $.extend(true, obj, element.metadata());
271
- }
272
-
273
- } else {
274
- obj = element;
275
- }
276
- }
277
-
278
- href = opts.href || obj.href || (isString(element) ? element : null);
279
- title = opts.title !== undefined ? opts.title : obj.title || '';
280
-
281
- content = opts.content || obj.content;
282
- type = content ? 'html' : (opts.type || obj.type);
283
-
284
- if (!type && obj.isDom) {
285
- type = element.data('fancybox-type');
286
-
287
- if (!type) {
288
- rez = element.prop('class').match(/fancybox\.(\w+)/);
289
- type = rez ? rez[1] : null;
290
- }
291
- }
292
-
293
- if (isString(href)) {
294
- // Try to guess the content type
295
- if (!type) {
296
- if (F.isImage(href)) {
297
- type = 'image';
298
-
299
- } else if (F.isSWF(href)) {
300
- type = 'swf';
301
-
302
- } else if (href.charAt(0) === '#') {
303
- type = 'inline';
304
-
305
- } else if (isString(element)) {
306
- type = 'html';
307
- content = element;
308
- }
309
- }
310
-
311
- // Split url into two pieces with source url and content selector, e.g,
312
- // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
313
- if (type === 'ajax') {
314
- hrefParts = href.split(/\s+/, 2);
315
- href = hrefParts.shift();
316
- selector = hrefParts.shift();
317
- }
318
- }
319
-
320
- if (!content) {
321
- if (type === 'inline') {
322
- if (href) {
323
- content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
324
-
325
- } else if (obj.isDom) {
326
- content = element;
327
- }
328
-
329
- } else if (type === 'html') {
330
- content = href;
331
-
332
- } else if (!type && !href && obj.isDom) {
333
- type = 'inline';
334
- content = element;
335
- }
336
- }
337
-
338
- $.extend(obj, {
339
- href : href,
340
- type : type,
341
- content : content,
342
- title : title,
343
- selector : selector
344
- });
345
-
346
- group[ i ] = obj;
347
- });
348
-
349
- // Extend the defaults
350
- F.opts = $.extend(true, {}, F.defaults, opts);
351
-
352
- // All options are merged recursive except keys
353
- if (opts.keys !== undefined) {
354
- F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
355
- }
356
-
357
- F.group = group;
358
-
359
- return F._start(F.opts.index);
360
- },
361
-
362
- // Cancel image loading or abort ajax request
363
- cancel: function () {
364
- var coming = F.coming;
365
-
366
- if (!coming || false === F.trigger('onCancel')) {
367
- return;
368
- }
369
-
370
- F.hideLoading();
371
-
372
- if (F.ajaxLoad) {
373
- F.ajaxLoad.abort();
374
- }
375
-
376
- F.ajaxLoad = null;
377
-
378
- if (F.imgPreload) {
379
- F.imgPreload.onload = F.imgPreload.onerror = null;
380
- }
381
-
382
- if (coming.wrap) {
383
- coming.wrap.stop(true, true).trigger('onReset').remove();
384
- }
385
-
386
- F.coming = null;
387
-
388
- // If the first item has been canceled, then clear everything
389
- if (!F.current) {
390
- F._afterZoomOut( coming );
391
- }
392
- },
393
-
394
- // Start closing animation if is open; remove immediately if opening/closing
395
- close: function (event) {
396
- F.cancel();
397
-
398
- if (false === F.trigger('beforeClose')) {
399
- return;
400
- }
401
-
402
- F.unbindEvents();
403
-
404
- if (!F.isActive) {
405
- return;
406
- }
407
-
408
- if (!F.isOpen || event === true) {
409
- $('.fancybox-wrap').stop(true).trigger('onReset').remove();
410
-
411
- F._afterZoomOut();
412
-
413
- } else {
414
- F.isOpen = F.isOpened = false;
415
- F.isClosing = true;
416
-
417
- $('.fancybox-item, .fancybox-nav').remove();
418
-
419
- F.wrap.stop(true, true).removeClass('fancybox-opened');
420
-
421
- F.transitions[ F.current.closeMethod ]();
422
- }
423
- },
424
-
425
- // Manage slideshow:
426
- // $.fancybox.play(); - toggle slideshow
427
- // $.fancybox.play( true ); - start
428
- // $.fancybox.play( false ); - stop
429
- play: function ( action ) {
430
- var clear = function () {
431
- clearTimeout(F.player.timer);
432
- },
433
- set = function () {
434
- clear();
435
-
436
- if (F.current && F.player.isActive) {
437
- F.player.timer = setTimeout(F.next, F.current.playSpeed);
438
- }
439
- },
440
- stop = function () {
441
- clear();
442
-
443
- D.unbind('.player');
444
-
445
- F.player.isActive = false;
446
-
447
- F.trigger('onPlayEnd');
448
- },
449
- start = function () {
450
- if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
451
- F.player.isActive = true;
452
-
453
- D.bind({
454
- 'onCancel.player beforeClose.player' : stop,
455
- 'onUpdate.player' : set,
456
- 'beforeLoad.player' : clear
457
- });
458
-
459
- set();
460
-
461
- F.trigger('onPlayStart');
462
- }
463
- };
464
-
465
- if (action === true || (!F.player.isActive && action !== false)) {
466
- start();
467
- } else {
468
- stop();
469
- }
470
- },
471
-
472
- // Navigate to next gallery item
473
- next: function ( direction ) {
474
- var current = F.current;
475
-
476
- if (current) {
477
- if (!isString(direction)) {
478
- direction = current.direction.next;
479
- }
480
-
481
- F.jumpto(current.index + 1, direction, 'next');
482
- }
483
- },
484
-
485
- // Navigate to previous gallery item
486
- prev: function ( direction ) {
487
- var current = F.current;
488
-
489
- if (current) {
490
- if (!isString(direction)) {
491
- direction = current.direction.prev;
492
- }
493
-
494
- F.jumpto(current.index - 1, direction, 'prev');
495
- }
496
- },
497
-
498
- // Navigate to gallery item by index
499
- jumpto: function ( index, direction, router ) {
500
- var current = F.current;
501
-
502
- if (!current) {
503
- return;
504
- }
505
-
506
- index = getScalar(index);
507
-
508
- F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
509
- F.router = router || 'jumpto';
510
-
511
- if (current.loop) {
512
- if (index < 0) {
513
- index = current.group.length + (index % current.group.length);
514
- }
515
-
516
- index = index % current.group.length;
517
- }
518
-
519
- if (current.group[ index ] !== undefined) {
520
- F.cancel();
521
-
522
- F._start(index);
523
- }
524
- },
525
-
526
- // Center inside viewport and toggle position type to fixed or absolute if needed
527
- reposition: function (e, onlyAbsolute) {
528
- var current = F.current,
529
- wrap = current ? current.wrap : null,
530
- pos;
531
-
532
- if (wrap) {
533
- pos = F._getPosition(onlyAbsolute);
534
-
535
- if (e && e.type === 'scroll') {
536
- delete pos.position;
537
-
538
- wrap.stop(true, true).animate(pos, 200);
539
-
540
- } else {
541
- wrap.css(pos);
542
-
543
- current.pos = $.extend({}, current.dim, pos);
544
- }
545
- }
546
- },
547
-
548
- update: function (e) {
549
- var type = (e && e.type),
550
- anyway = !type || type === 'orientationchange';
551
-
552
- if (anyway) {
553
- clearTimeout(didUpdate);
554
-
555
- didUpdate = null;
556
- }
557
-
558
- if (!F.isOpen || didUpdate) {
559
- return;
560
- }
561
-
562
- didUpdate = setTimeout(function() {
563
- var current = F.current;
564
-
565
- if (!current || F.isClosing) {
566
- return;
567
- }
568
-
569
- F.wrap.removeClass('fancybox-tmp');
570
-
571
- if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
572
- F._setDimension();
573
- }
574
-
575
- if (!(type === 'scroll' && current.canShrink)) {
576
- F.reposition(e);
577
- }
578
-
579
- F.trigger('onUpdate');
580
-
581
- didUpdate = null;
582
-
583
- }, (anyway && !isTouch ? 0 : 300));
584
- },
585
-
586
- // Shrink content to fit inside viewport or restore if resized
587
- toggle: function ( action ) {
588
- if (F.isOpen) {
589
- F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;
590
-
591
- // Help browser to restore document dimensions
592
- if (isTouch) {
593
- F.wrap.removeAttr('style').addClass('fancybox-tmp');
594
-
595
- F.trigger('onUpdate');
596
- }
597
-
598
- F.update();
599
- }
600
- },
601
-
602
- hideLoading: function () {
603
- D.unbind('.loading');
604
-
605
- $('#fancybox-loading').remove();
606
- },
607
-
608
- showLoading: function () {
609
- var el, viewport;
610
-
611
- F.hideLoading();
612
-
613
- el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
614
-
615
- // If user will press the escape-button, the request will be canceled
616
- D.bind('keydown.loading', function(e) {
617
- if ((e.which || e.keyCode) === 27) {
618
- e.preventDefault();
619
-
620
- F.cancel();
621
- }
622
- });
623
-
624
- if (!F.defaults.fixed) {
625
- viewport = F.getViewport();
626
-
627
- el.css({
628
- position : 'absolute',
629
- top : (viewport.h * 0.5) + viewport.y,
630
- left : (viewport.w * 0.5) + viewport.x
631
- });
632
- }
633
- },
634
-
635
- getViewport: function () {
636
- var locked = (F.current && F.current.locked) || false,
637
- rez = {
638
- x: W.scrollLeft(),
639
- y: W.scrollTop()
640
- };
641
-
642
- if (locked) {
643
- rez.w = locked[0].clientWidth;
644
- rez.h = locked[0].clientHeight;
645
-
646
- } else {
647
- // See http://bugs.jquery.com/ticket/6724
648
- rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width();
649
- rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
650
- }
651
-
652
- return rez;
653
- },
654
-
655
- // Unbind the keyboard / clicking actions
656
- unbindEvents: function () {
657
- if (F.wrap && isQuery(F.wrap)) {
658
- F.wrap.unbind('.fb');
659
- }
660
-
661
- D.unbind('.fb');
662
- W.unbind('.fb');
663
- },
664
-
665
- bindEvents: function () {
666
- var current = F.current,
667
- keys;
668
-
669
- if (!current) {
670
- return;
671
- }
672
-
673
- // Changing document height on iOS devices triggers a 'resize' event,
674
- // that can change document height... repeating infinitely
675
- W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);
676
-
677
- keys = current.keys;
678
-
679
- if (keys) {
680
- D.bind('keydown.fb', function (e) {
681
- var code = e.which || e.keyCode,
682
- target = e.target || e.srcElement;
683
-
684
- // Skip esc key if loading, because showLoading will cancel preloading
685
- if (code === 27 && F.coming) {
686
- return false;
687
- }
688
-
689
- // Ignore key combinations and key events within form elements
690
- if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
691
- $.each(keys, function(i, val) {
692
- if (current.group.length > 1 && val[ code ] !== undefined) {
693
- F[ i ]( val[ code ] );
694
-
695
- e.preventDefault();
696
- return false;
697
- }
698
-
699
- if ($.inArray(code, val) > -1) {
700
- F[ i ] ();
701
-
702
- e.preventDefault();
703
- return false;
704
- }
705
- });
706
- }
707
- });
708
- }
709
-
710
- if ($.fn.mousewheel && current.mouseWheel) {
711
- F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
712
- var target = e.target || null,
713
- parent = $(target),
714
- canScroll = false;
715
-
716
- while (parent.length) {
717
- if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
718
- break;
719
- }
720
-
721
- canScroll = isScrollable( parent[0] );
722
- parent = $(parent).parent();
723
- }
724
-
725
- if (delta !== 0 && !canScroll) {
726
- if (F.group.length > 1 && !current.canShrink) {
727
- if (deltaY > 0 || deltaX > 0) {
728
- F.prev( deltaY > 0 ? 'down' : 'left' );
729
-
730
- } else if (deltaY < 0 || deltaX < 0) {
731
- F.next( deltaY < 0 ? 'up' : 'right' );
732
- }
733
-
734
- e.preventDefault();
735
- }
736
- }
737
- });
738
- }
739
- },
740
-
741
- trigger: function (event, o) {
742
- var ret, obj = o || F.coming || F.current;
743
-
744
- if (!obj) {
745
- return;
746
- }
747
-
748
- if ($.isFunction( obj[event] )) {
749
- ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
750
- }
751
-
752
- if (ret === false) {
753
- return false;
754
- }
755
-
756
- if (obj.helpers) {
757
- $.each(obj.helpers, function (helper, opts) {
758
- if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
759
- F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
760
- }
761
- });
762
- }
763
-
764
- D.trigger(event);
765
- },
766
-
767
- isImage: function (str) {
768
- return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
769
- },
770
-
771
- isSWF: function (str) {
772
- return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
773
- },
774
-
775
- _start: function (index) {
776
- var coming = {},
777
- obj,
778
- href,
779
- type,
780
- margin,
781
- padding;
782
-
783
- index = getScalar( index );
784
- obj = F.group[ index ] || null;
785
-
786
- if (!obj) {
787
- return false;
788
- }
789
-
790
- coming = $.extend(true, {}, F.opts, obj);
791
-
792
- // Convert margin and padding properties to array - top, right, bottom, left
793
- margin = coming.margin;
794
- padding = coming.padding;
795
-
796
- if ($.type(margin) === 'number') {
797
- coming.margin = [margin, margin, margin, margin];
798
- }
799
-
800
- if ($.type(padding) === 'number') {
801
- coming.padding = [padding, padding, padding, padding];
802
- }
803
-
804
- // 'modal' propery is just a shortcut
805
- if (coming.modal) {
806
- $.extend(true, coming, {
807
- closeBtn : false,
808
- closeClick : false,
809
- nextClick : false,
810
- arrows : false,
811
- mouseWheel : false,
812
- keys : null,
813
- helpers: {
814
- overlay : {
815
- closeClick : false
816
- }
817
- }
818
- });
819
- }
820
-
821
- // 'autoSize' property is a shortcut, too
822
- if (coming.autoSize) {
823
- coming.autoWidth = coming.autoHeight = true;
824
- }
825
-
826
- if (coming.width === 'auto') {
827
- coming.autoWidth = true;
828
- }
829
-
830
- if (coming.height === 'auto') {
831
- coming.autoHeight = true;
832
- }
833
-
834
- /*
835
- * Add reference to the group, so it`s possible to access from callbacks, example:
836
- * afterLoad : function() {
837
- * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
838
- * }
839
- */
840
-
841
- coming.group = F.group;
842
- coming.index = index;
843
-
844
- // Give a chance for callback or helpers to update coming item (type, title, etc)
845
- F.coming = coming;
846
-
847
- if (false === F.trigger('beforeLoad')) {
848
- F.coming = null;
849
-
850
- return;
851
- }
852
-
853
- type = coming.type;
854
- href = coming.href;
855
-
856
- if (!type) {
857
- F.coming = null;
858
-
859
- //If we can not determine content type then drop silently or display next/prev item if looping through gallery
860
- if (F.current && F.router && F.router !== 'jumpto') {
861
- F.current.index = index;
862
-
863
- return F[ F.router ]( F.direction );
864
- }
865
-
866
- return false;
867
- }
868
-
869
- F.isActive = true;
870
-
871
- if (type === 'image' || type === 'swf') {
872
- coming.autoHeight = coming.autoWidth = false;
873
- coming.scrolling = 'visible';
874
- }
875
-
876
- if (type === 'image') {
877
- coming.aspectRatio = true;
878
- }
879
-
880
- if (type === 'iframe' && isTouch) {
881
- coming.scrolling = 'scroll';
882
- }
883
-
884
- // Build the neccessary markup
885
- coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );
886
-
887
- $.extend(coming, {
888
- skin : $('.fancybox-skin', coming.wrap),
889
- outer : $('.fancybox-outer', coming.wrap),
890
- inner : $('.fancybox-inner', coming.wrap)
891
- });
892
-
893
- $.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
894
- coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
895
- });
896
-
897
- F.trigger('onReady');
898
-
899
- // Check before try to load; 'inline' and 'html' types need content, others - href
900
- if (type === 'inline' || type === 'html') {
901
- if (!coming.content || !coming.content.length) {
902
- return F._error( 'content' );
903
- }
904
-
905
- } else if (!href) {
906
- return F._error( 'href' );
907
- }
908
-
909
- if (type === 'image') {
910
- F._loadImage();
911
-
912
- } else if (type === 'ajax') {
913
- F._loadAjax();
914
-
915
- } else if (type === 'iframe') {
916
- F._loadIframe();
917
-
918
- } else {
919
- F._afterLoad();
920
- }
921
- },
922
-
923
- _error: function ( type ) {
924
- $.extend(F.coming, {
925
- type : 'html',
926
- autoWidth : true,
927
- autoHeight : true,
928
- minWidth : 0,
929
- minHeight : 0,
930
- scrolling : 'no',
931
- hasError : type,
932
- content : F.coming.tpl.error
933
- });
934
-
935
- F._afterLoad();
936
- },
937
-
938
- _loadImage: function () {
939
- // Reset preload image so it is later possible to check "complete" property
940
- var img = F.imgPreload = new Image();
941
-
942
- img.onload = function () {
943
- this.onload = this.onerror = null;
944
-
945
- F.coming.width = this.width / F.opts.pixelRatio;
946
- F.coming.height = this.height / F.opts.pixelRatio;
947
-
948
- F._afterLoad();
949
- };
950
-
951
- img.onerror = function () {
952
- this.onload = this.onerror = null;
953
-
954
- F._error( 'image' );
955
- };
956
-
957
- img.src = F.coming.href;
958
-
959
- if (img.complete !== true) {
960
- F.showLoading();
961
- }
962
- },
963
-
964
- _loadAjax: function () {
965
- var coming = F.coming;
966
-
967
- F.showLoading();
968
-
969
- F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
970
- url: coming.href,
971
- error: function (jqXHR, textStatus) {
972
- if (F.coming && textStatus !== 'abort') {
973
- F._error( 'ajax', jqXHR );
974
-
975
- } else {
976
- F.hideLoading();
977
- }
978
- },
979
- success: function (data, textStatus) {
980
- if (textStatus === 'success') {
981
- coming.content = data;
982
-
983
- F._afterLoad();
984
- }
985
- }
986
- }));
987
- },
988
-
989
- _loadIframe: function() {
990
- var coming = F.coming,
991
- iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
992
- .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
993
- .attr('src', coming.href);
994
-
995
- // This helps IE
996
- $(coming.wrap).bind('onReset', function () {
997
- try {
998
- $(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
999
- } catch (e) {}
1000
- });
1001
-
1002
- if (coming.iframe.preload) {
1003
- F.showLoading();
1004
-
1005
- iframe.one('load', function() {
1006
- $(this).data('ready', 1);
1007
-
1008
- // iOS will lose scrolling if we resize
1009
- if (!isTouch) {
1010
- $(this).bind('load.fb', F.update);
1011
- }
1012
-
1013
- // Without this trick:
1014
- // - iframe won't scroll on iOS devices
1015
- // - IE7 sometimes displays empty iframe
1016
- $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();
1017
-
1018
- F._afterLoad();
1019
- });
1020
- }
1021
-
1022
- coming.content = iframe.appendTo( coming.inner );
1023
-
1024
- if (!coming.iframe.preload) {
1025
- F._afterLoad();
1026
- }
1027
- },
1028
-
1029
- _preloadImages: function() {
1030
- var group = F.group,
1031
- current = F.current,
1032
- len = group.length,
1033
- cnt = current.preload ? Math.min(current.preload, len - 1) : 0,
1034
- item,
1035
- i;
1036
-
1037
- for (i = 1; i <= cnt; i += 1) {
1038
- item = group[ (current.index + i ) % len ];
1039
-
1040
- if (item.type === 'image' && item.href) {
1041
- new Image().src = item.href;
1042
- }
1043
- }
1044
- },
1045
-
1046
- _afterLoad: function () {
1047
- var coming = F.coming,
1048
- previous = F.current,
1049
- placeholder = 'fancybox-placeholder',
1050
- current,
1051
- content,
1052
- type,
1053
- scrolling,
1054
- href,
1055
- embed;
1056
-
1057
- F.hideLoading();
1058
-
1059
- if (!coming || F.isActive === false) {
1060
- return;
1061
- }
1062
-
1063
- if (false === F.trigger('afterLoad', coming, previous)) {
1064
- coming.wrap.stop(true).trigger('onReset').remove();
1065
-
1066
- F.coming = null;
1067
-
1068
- return;
1069
- }
1070
-
1071
- if (previous) {
1072
- F.trigger('beforeChange', previous);
1073
-
1074
- previous.wrap.stop(true).removeClass('fancybox-opened')
1075
- .find('.fancybox-item, .fancybox-nav')
1076
- .remove();
1077
- }
1078
-
1079
- F.unbindEvents();
1080
-
1081
- current = coming;
1082
- content = coming.content;
1083
- type = coming.type;
1084
- scrolling = coming.scrolling;
1085
-
1086
- $.extend(F, {
1087
- wrap : current.wrap,
1088
- skin : current.skin,
1089
- outer : current.outer,
1090
- inner : current.inner,
1091
- current : current,
1092
- previous : previous
1093
- });
1094
-
1095
- href = current.href;
1096
-
1097
- switch (type) {
1098
- case 'inline':
1099
- case 'ajax':
1100
- case 'html':
1101
- if (current.selector) {
1102
- content = $('<div>').html(content).find(current.selector);
1103
-
1104
- } else if (isQuery(content)) {
1105
- if (!content.data(placeholder)) {
1106
- content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
1107
- }
1108
-
1109
- content = content.show().detach();
1110
-
1111
- current.wrap.bind('onReset', function () {
1112
- if ($(this).find(content).length) {
1113
- content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
1114
- }
1115
- });
1116
- }
1117
- break;
1118
-
1119
- case 'image':
1120
- content = current.tpl.image.replace('{href}', href);
1121
- break;
1122
-
1123
- case 'swf':
1124
- content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
1125
- embed = '';
1126
-
1127
- $.each(current.swf, function(name, val) {
1128
- content += '<param name="' + name + '" value="' + val + '"></param>';
1129
- embed += ' ' + name + '="' + val + '"';
1130
- });
1131
-
1132
- content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
1133
- break;
1134
- }
1135
-
1136
- if (!(isQuery(content) && content.parent().is(current.inner))) {
1137
- current.inner.append( content );
1138
- }
1139
-
1140
- // Give a chance for helpers or callbacks to update elements
1141
- F.trigger('beforeShow');
1142
-
1143
- // Set scrolling before calculating dimensions
1144
- current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
1145
-
1146
- // Set initial dimensions and start position
1147
- F._setDimension();
1148
-
1149
- F.reposition();
1150
-
1151
- F.isOpen = false;
1152
- F.coming = null;
1153
-
1154
- F.bindEvents();
1155
-
1156
- if (!F.isOpened) {
1157
- $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
1158
-
1159
- } else if (previous.prevMethod) {
1160
- F.transitions[ previous.prevMethod ]();
1161
- }
1162
-
1163
- F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
1164
-
1165
- F._preloadImages();
1166
- },
1167
-
1168
- _setDimension: function () {
1169
- var viewport = F.getViewport(),
1170
- steps = 0,
1171
- canShrink = false,
1172
- canExpand = false,
1173
- wrap = F.wrap,
1174
- skin = F.skin,
1175
- inner = F.inner,
1176
- current = F.current,
1177
- width = current.width,
1178
- height = current.height,
1179
- minWidth = current.minWidth,
1180
- minHeight = current.minHeight,
1181
- maxWidth = current.maxWidth,
1182
- maxHeight = current.maxHeight,
1183
- scrolling = current.scrolling,
1184
- scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
1185
- margin = current.margin,
1186
- wMargin = getScalar(margin[1] + margin[3]),
1187
- hMargin = getScalar(margin[0] + margin[2]),
1188
- wPadding,
1189
- hPadding,
1190
- wSpace,
1191
- hSpace,
1192
- origWidth,
1193
- origHeight,
1194
- origMaxWidth,
1195
- origMaxHeight,
1196
- ratio,
1197
- width_,
1198
- height_,
1199
- maxWidth_,
1200
- maxHeight_,
1201
- iframe,
1202
- body;
1203
-
1204
- // Reset dimensions so we could re-check actual size
1205
- wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');
1206
-
1207
- wPadding = getScalar(skin.outerWidth(true) - skin.width());
1208
- hPadding = getScalar(skin.outerHeight(true) - skin.height());
1209
-
1210
- // Any space between content and viewport (margin, padding, border, title)
1211
- wSpace = wMargin + wPadding;
1212
- hSpace = hMargin + hPadding;
1213
-
1214
- origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
1215
- origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
1216
-
1217
- if (current.type === 'iframe') {
1218
- iframe = current.content;
1219
-
1220
- if (current.autoHeight && iframe.data('ready') === 1) {
1221
- try {
1222
- if (iframe[0].contentWindow.document.location) {
1223
- inner.width( origWidth ).height(9999);
1224
-
1225
- body = iframe.contents().find('body');
1226
-
1227
- if (scrollOut) {
1228
- body.css('overflow-x', 'hidden');
1229
- }
1230
-
1231
- origHeight = body.outerHeight(true);
1232
- }
1233
-
1234
- } catch (e) {}
1235
- }
1236
-
1237
- } else if (current.autoWidth || current.autoHeight) {
1238
- inner.addClass( 'fancybox-tmp' );
1239
-
1240
- // Set width or height in case we need to calculate only one dimension
1241
- if (!current.autoWidth) {
1242
- inner.width( origWidth );
1243
- }
1244
-
1245
- if (!current.autoHeight) {
1246
- inner.height( origHeight );
1247
- }
1248
-
1249
- if (current.autoWidth) {
1250
- origWidth = inner.width();
1251
- }
1252
-
1253
- if (current.autoHeight) {
1254
- origHeight = inner.height();
1255
- }
1256
-
1257
- inner.removeClass( 'fancybox-tmp' );
1258
- }
1259
-
1260
- width = getScalar( origWidth );
1261
- height = getScalar( origHeight );
1262
-
1263
- ratio = origWidth / origHeight;
1264
-
1265
- // Calculations for the content
1266
- minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
1267
- maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
1268
-
1269
- minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
1270
- maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
1271
-
1272
- // These will be used to determine if wrap can fit in the viewport
1273
- origMaxWidth = maxWidth;
1274
- origMaxHeight = maxHeight;
1275
-
1276
- if (current.fitToView) {
1277
- maxWidth = Math.min(viewport.w - wSpace, maxWidth);
1278
- maxHeight = Math.min(viewport.h - hSpace, maxHeight);
1279
- }
1280
-
1281
- maxWidth_ = viewport.w - wMargin;
1282
- maxHeight_ = viewport.h - hMargin;
1283
-
1284
- if (current.aspectRatio) {
1285
- if (width > maxWidth) {
1286
- width = maxWidth;
1287
- height = getScalar(width / ratio);
1288
- }
1289
-
1290
- if (height > maxHeight) {
1291
- height = maxHeight;
1292
- width = getScalar(height * ratio);
1293
- }
1294
-
1295
- if (width < minWidth) {
1296
- width = minWidth;
1297
- height = getScalar(width / ratio);
1298
- }
1299
-
1300
- if (height < minHeight) {
1301
- height = minHeight;
1302
- width = getScalar(height * ratio);
1303
- }
1304
-
1305
- } else {
1306
- width = Math.max(minWidth, Math.min(width, maxWidth));
1307
-
1308
- if (current.autoHeight && current.type !== 'iframe') {
1309
- inner.width( width );
1310
-
1311
- height = inner.height();
1312
- }
1313
-
1314
- height = Math.max(minHeight, Math.min(height, maxHeight));
1315
- }
1316
-
1317
- // Try to fit inside viewport (including the title)
1318
- if (current.fitToView) {
1319
- inner.width( width ).height( height );
1320
-
1321
- wrap.width( width + wPadding );
1322
-
1323
- // Real wrap dimensions
1324
- width_ = wrap.width();
1325
- height_ = wrap.height();
1326
-
1327
- if (current.aspectRatio) {
1328
- while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
1329
- if (steps++ > 19) {
1330
- break;
1331
- }
1332
-
1333
- height = Math.max(minHeight, Math.min(maxHeight, height - 10));
1334
- width = getScalar(height * ratio);
1335
-
1336
- if (width < minWidth) {
1337
- width = minWidth;
1338
- height = getScalar(width / ratio);
1339
- }
1340
-
1341
- if (width > maxWidth) {
1342
- width = maxWidth;
1343
- height = getScalar(width / ratio);
1344
- }
1345
-
1346
- inner.width( width ).height( height );
1347
-
1348
- wrap.width( width + wPadding );
1349
-
1350
- width_ = wrap.width();
1351
- height_ = wrap.height();
1352
- }
1353
-
1354
- } else {
1355
- width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
1356
- height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
1357
- }
1358
- }
1359
-
1360
- if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
1361
- width += scrollOut;
1362
- }
1363
-
1364
- inner.width( width ).height( height );
1365
-
1366
- wrap.width( width + wPadding );
1367
-
1368
- width_ = wrap.width();
1369
- height_ = wrap.height();
1370
-
1371
- canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
1372
- canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
1373
-
1374
- $.extend(current, {
1375
- dim : {
1376
- width : getValue( width_ ),
1377
- height : getValue( height_ )
1378
- },
1379
- origWidth : origWidth,
1380
- origHeight : origHeight,
1381
- canShrink : canShrink,
1382
- canExpand : canExpand,
1383
- wPadding : wPadding,
1384
- hPadding : hPadding,
1385
- wrapSpace : height_ - skin.outerHeight(true),
1386
- skinSpace : skin.height() - height
1387
- });
1388
-
1389
- if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
1390
- inner.height('auto');
1391
- }
1392
- },
1393
-
1394
- _getPosition: function (onlyAbsolute) {
1395
- var current = F.current,
1396
- viewport = F.getViewport(),
1397
- margin = current.margin,
1398
- width = F.wrap.width() + margin[1] + margin[3],
1399
- height = F.wrap.height() + margin[0] + margin[2],
1400
- rez = {
1401
- position: 'absolute',
1402
- top : margin[0],
1403
- left : margin[3]
1404
- };
1405
-
1406
- if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
1407
- rez.position = 'fixed';
1408
-
1409
- } else if (!current.locked) {
1410
- rez.top += viewport.y;
1411
- rez.left += viewport.x;
1412
- }
1413
-
1414
- rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
1415
- rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));
1416
-
1417
- return rez;
1418
- },
1419
-
1420
- _afterZoomIn: function () {
1421
- var current = F.current;
1422
-
1423
- if (!current) {
1424
- return;
1425
- }
1426
-
1427
- F.isOpen = F.isOpened = true;
1428
-
1429
- F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
1430
-
1431
- F.update();
1432
-
1433
- // Assign a click event
1434
- if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
1435
- F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
1436
- if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
1437
- e.preventDefault();
1438
-
1439
- F[ current.closeClick ? 'close' : 'next' ]();
1440
- }
1441
- });
1442
- }
1443
-
1444
- // Create a close button
1445
- if (current.closeBtn) {
1446
- $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
1447
- e.preventDefault();
1448
-
1449
- F.close();
1450
- });
1451
- }
1452
-
1453
- // Create navigation arrows
1454
- if (current.arrows && F.group.length > 1) {
1455
- if (current.loop || current.index > 0) {
1456
- $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
1457
- }
1458
-
1459
- if (current.loop || current.index < F.group.length - 1) {
1460
- $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
1461
- }
1462
- }
1463
-
1464
- F.trigger('afterShow');
1465
-
1466
- // Stop the slideshow if this is the last item
1467
- if (!current.loop && current.index === current.group.length - 1) {
1468
- F.play( false );
1469
-
1470
- } else if (F.opts.autoPlay && !F.player.isActive) {
1471
- F.opts.autoPlay = false;
1472
-
1473
- F.play();
1474
- }
1475
- },
1476
-
1477
- _afterZoomOut: function ( obj ) {
1478
- obj = obj || F.current;
1479
-
1480
- $('.fancybox-wrap').trigger('onReset').remove();
1481
-
1482
- $.extend(F, {
1483
- group : {},
1484
- opts : {},
1485
- router : false,
1486
- current : null,
1487
- isActive : false,
1488
- isOpened : false,
1489
- isOpen : false,
1490
- isClosing : false,
1491
- wrap : null,
1492
- skin : null,
1493
- outer : null,
1494
- inner : null
1495
- });
1496
-
1497
- F.trigger('afterClose', obj);
1498
- }
1499
- });
1500
-
1501
- /*
1502
- * Default transitions
1503
- */
1504
-
1505
- F.transitions = {
1506
- getOrigPosition: function () {
1507
- var current = F.current,
1508
- element = current.element,
1509
- orig = current.orig,
1510
- pos = {},
1511
- width = 50,
1512
- height = 50,
1513
- hPadding = current.hPadding,
1514
- wPadding = current.wPadding,
1515
- viewport = F.getViewport();
1516
-
1517
- if (!orig && current.isDom && element.is(':visible')) {
1518
- orig = element.find('img:first');
1519
-
1520
- if (!orig.length) {
1521
- orig = element;
1522
- }
1523
- }
1524
-
1525
- if (isQuery(orig)) {
1526
- pos = orig.offset();
1527
-
1528
- if (orig.is('img')) {
1529
- width = orig.outerWidth();
1530
- height = orig.outerHeight();
1531
- }
1532
-
1533
- } else {
1534
- pos.top = viewport.y + (viewport.h - height) * current.topRatio;
1535
- pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
1536
- }
1537
-
1538
- if (F.wrap.css('position') === 'fixed' || current.locked) {
1539
- pos.top -= viewport.y;
1540
- pos.left -= viewport.x;
1541
- }
1542
-
1543
- pos = {
1544
- top : getValue(pos.top - hPadding * current.topRatio),
1545
- left : getValue(pos.left - wPadding * current.leftRatio),
1546
- width : getValue(width + wPadding),
1547
- height : getValue(height + hPadding)
1548
- };
1549
-
1550
- return pos;
1551
- },
1552
-
1553
- step: function (now, fx) {
1554
- var ratio,
1555
- padding,
1556
- value,
1557
- prop = fx.prop,
1558
- current = F.current,
1559
- wrapSpace = current.wrapSpace,
1560
- skinSpace = current.skinSpace;
1561
-
1562
- if (prop === 'width' || prop === 'height') {
1563
- ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
1564
-
1565
- if (F.isClosing) {
1566
- ratio = 1 - ratio;
1567
- }
1568
-
1569
- padding = prop === 'width' ? current.wPadding : current.hPadding;
1570
- value = now - padding;
1571
-
1572
- F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) );
1573
- F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
1574
- }
1575
- },
1576
-
1577
- zoomIn: function () {
1578
- var current = F.current,
1579
- startPos = current.pos,
1580
- effect = current.openEffect,
1581
- elastic = effect === 'elastic',
1582
- endPos = $.extend({opacity : 1}, startPos);
1583
-
1584
- // Remove "position" property that breaks older IE
1585
- delete endPos.position;
1586
-
1587
- if (elastic) {
1588
- startPos = this.getOrigPosition();
1589
-
1590
- if (current.openOpacity) {
1591
- startPos.opacity = 0.1;
1592
- }
1593
-
1594
- } else if (effect === 'fade') {
1595
- startPos.opacity = 0.1;
1596
- }
1597
-
1598
- F.wrap.css(startPos).animate(endPos, {
1599
- duration : effect === 'none' ? 0 : current.openSpeed,
1600
- easing : current.openEasing,
1601
- step : elastic ? this.step : null,
1602
- complete : F._afterZoomIn
1603
- });
1604
- },
1605
-
1606
- zoomOut: function () {
1607
- var current = F.current,
1608
- effect = current.closeEffect,
1609
- elastic = effect === 'elastic',
1610
- endPos = {opacity : 0.1};
1611
-
1612
- if (elastic) {
1613
- endPos = this.getOrigPosition();
1614
-
1615
- if (current.closeOpacity) {
1616
- endPos.opacity = 0.1;
1617
- }
1618
- }
1619
-
1620
- F.wrap.animate(endPos, {
1621
- duration : effect === 'none' ? 0 : current.closeSpeed,
1622
- easing : current.closeEasing,
1623
- step : elastic ? this.step : null,
1624
- complete : F._afterZoomOut
1625
- });
1626
- },
1627
-
1628
- changeIn: function () {
1629
- var current = F.current,
1630
- effect = current.nextEffect,
1631
- startPos = current.pos,
1632
- endPos = { opacity : 1 },
1633
- direction = F.direction,
1634
- distance = 200,
1635
- field;
1636
-
1637
- startPos.opacity = 0.1;
1638
-
1639
- if (effect === 'elastic') {
1640
- field = direction === 'down' || direction === 'up' ? 'top' : 'left';
1641
-
1642
- if (direction === 'down' || direction === 'right') {
1643
- startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
1644
- endPos[ field ] = '+=' + distance + 'px';
1645
-
1646
- } else {
1647
- startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
1648
- endPos[ field ] = '-=' + distance + 'px';
1649
- }
1650
- }
1651
-
1652
- // Workaround for http://bugs.jquery.com/ticket/12273
1653
- if (effect === 'none') {
1654
- F._afterZoomIn();
1655
-
1656
- } else {
1657
- F.wrap.css(startPos).animate(endPos, {
1658
- duration : current.nextSpeed,
1659
- easing : current.nextEasing,
1660
- complete : F._afterZoomIn
1661
- });
1662
- }
1663
- },
1664
-
1665
- changeOut: function () {
1666
- var previous = F.previous,
1667
- effect = previous.prevEffect,
1668
- endPos = { opacity : 0.1 },
1669
- direction = F.direction,
1670
- distance = 200;
1671
-
1672
- if (effect === 'elastic') {
1673
- endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
1674
- }
1675
-
1676
- previous.wrap.animate(endPos, {
1677
- duration : effect === 'none' ? 0 : previous.prevSpeed,
1678
- easing : previous.prevEasing,
1679
- complete : function () {
1680
- $(this).trigger('onReset').remove();
1681
- }
1682
- });
1683
- }
1684
- };
1685
-
1686
- /*
1687
- * Overlay helper
1688
- */
1689
-
1690
- F.helpers.overlay = {
1691
- defaults : {
1692
- closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay
1693
- speedOut : 200, // duration of fadeOut animation
1694
- showEarly : true, // indicates if should be opened immediately or wait until the content is ready
1695
- css : {}, // custom CSS properties
1696
- locked : !isTouch, // if true, the content will be locked into overlay
1697
- fixed : true // if false, the overlay CSS position property will not be set to "fixed"
1698
- },
1699
-
1700
- overlay : null, // current handle
1701
- fixed : false, // indicates if the overlay has position "fixed"
1702
- el : $('html'), // element that contains "the lock"
1703
-
1704
- // Public methods
1705
- create : function(opts) {
1706
- opts = $.extend({}, this.defaults, opts);
1707
-
1708
- if (this.overlay) {
1709
- this.close();
1710
- }
1711
-
1712
- this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
1713
- this.fixed = false;
1714
-
1715
- if (opts.fixed && F.defaults.fixed) {
1716
- this.overlay.addClass('fancybox-overlay-fixed');
1717
-
1718
- this.fixed = true;
1719
- }
1720
- },
1721
-
1722
- open : function(opts) {
1723
- var that = this;
1724
-
1725
- opts = $.extend({}, this.defaults, opts);
1726
-
1727
- if (this.overlay) {
1728
- this.overlay.unbind('.overlay').width('auto').height('auto');
1729
-
1730
- } else {
1731
- this.create(opts);
1732
- }
1733
-
1734
- if (!this.fixed) {
1735
- W.bind('resize.overlay', $.proxy( this.update, this) );
1736
-
1737
- this.update();
1738
- }
1739
-
1740
- if (opts.closeClick) {
1741
- this.overlay.bind('click.overlay', function(e) {
1742
- if ($(e.target).hasClass('fancybox-overlay')) {
1743
- if (F.isActive) {
1744
- F.close();
1745
- } else {
1746
- that.close();
1747
- }
1748
-
1749
- return false;
1750
- }
1751
- });
1752
- }
1753
-
1754
- this.overlay.css( opts.css ).show();
1755
- },
1756
-
1757
- close : function() {
1758
- var scrollV, scrollH;
1759
-
1760
- W.unbind('resize.overlay');
1761
-
1762
- if (this.el.hasClass('fancybox-lock')) {
1763
- $('.fancybox-margin').removeClass('fancybox-margin');
1764
-
1765
- scrollV = W.scrollTop();
1766
- scrollH = W.scrollLeft();
1767
-
1768
- this.el.removeClass('fancybox-lock');
1769
-
1770
- W.scrollTop( scrollV ).scrollLeft( scrollH );
1771
- }
1772
-
1773
- $('.fancybox-overlay').remove().hide();
1774
-
1775
- $.extend(this, {
1776
- overlay : null,
1777
- fixed : false
1778
- });
1779
- },
1780
-
1781
- // Private, callbacks
1782
-
1783
- update : function () {
1784
- var width = '100%', offsetWidth;
1785
-
1786
- // Reset width/height so it will not mess
1787
- this.overlay.width(width).height('100%');
1788
-
1789
- // jQuery does not return reliable result for IE
1790
- if (IE) {
1791
- offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
1792
-
1793
- if (D.width() > offsetWidth) {
1794
- width = D.width();
1795
- }
1796
-
1797
- } else if (D.width() > W.width()) {
1798
- width = D.width();
1799
- }
1800
-
1801
- this.overlay.width(width).height(D.height());
1802
- },
1803
-
1804
- // This is where we can manipulate DOM, because later it would cause iframes to reload
1805
- onReady : function (opts, obj) {
1806
- var overlay = this.overlay;
1807
-
1808
- $('.fancybox-overlay').stop(true, true);
1809
-
1810
- if (!overlay) {
1811
- this.create(opts);
1812
- }
1813
-
1814
- if (opts.locked && this.fixed && obj.fixed) {
1815
- if (!overlay) {
1816
- this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
1817
- }
1818
-
1819
- obj.locked = this.overlay.append( obj.wrap );
1820
- obj.fixed = false;
1821
- }
1822
-
1823
- if (opts.showEarly === true) {
1824
- this.beforeShow.apply(this, arguments);
1825
- }
1826
- },
1827
-
1828
- beforeShow : function(opts, obj) {
1829
- var scrollV, scrollH;
1830
-
1831
- if (obj.locked) {
1832
- if (this.margin !== false) {
1833
- $('*').filter(function(){
1834
- return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
1835
- }).addClass('fancybox-margin');
1836
-
1837
- this.el.addClass('fancybox-margin');
1838
- }
1839
-
1840
- scrollV = W.scrollTop();
1841
- scrollH = W.scrollLeft();
1842
-
1843
- this.el.addClass('fancybox-lock');
1844
-
1845
- W.scrollTop( scrollV ).scrollLeft( scrollH );
1846
- }
1847
-
1848
- this.open(opts);
1849
- },
1850
-
1851
- onUpdate : function() {
1852
- if (!this.fixed) {
1853
- this.update();
1854
- }
1855
- },
1856
-
1857
- afterClose: function (opts) {
1858
- // Remove overlay if exists and fancyBox is not opening
1859
- // (e.g., it is not being open using afterClose callback)
1860
- //if (this.overlay && !F.isActive) {
1861
- if (this.overlay && !F.coming) {
1862
- this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
1863
- }
1864
- }
1865
- };
1866
-
1867
- /*
1868
- * Title helper
1869
- */
1870
-
1871
- F.helpers.title = {
1872
- defaults : {
1873
- type : 'float', // 'float', 'inside', 'outside' or 'over',
1874
- position : 'bottom' // 'top' or 'bottom'
1875
- },
1876
-
1877
- beforeShow: function (opts) {
1878
- var current = F.current,
1879
- text = current.title,
1880
- type = opts.type,
1881
- title,
1882
- target;
1883
-
1884
- if ($.isFunction(text)) {
1885
- text = text.call(current.element, current);
1886
- }
1887
-
1888
- if (!isString(text) || $.trim(text) === '') {
1889
- return;
1890
- }
1891
-
1892
- title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>');
1893
-
1894
- switch (type) {
1895
- case 'inside':
1896
- target = F.skin;
1897
- break;
1898
-
1899
- case 'outside':
1900
- target = F.wrap;
1901
- break;
1902
-
1903
- case 'over':
1904
- target = F.inner;
1905
- break;
1906
-
1907
- default: // 'float'
1908
- target = F.skin;
1909
-
1910
- title.appendTo('body');
1911
-
1912
- if (IE) {
1913
- title.width( title.width() );
1914
- }
1915
-
1916
- title.wrapInner('<span class="child"></span>');
1917
-
1918
- //Increase bottom margin so this title will also fit into viewport
1919
- F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
1920
- break;
1921
- }
1922
-
1923
- title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target);
1924
- }
1925
- };
1926
-
1927
- // jQuery plugin initialization
1928
- $.fn.fancybox = function (options) {
1929
- var index,
1930
- that = $(this),
1931
- selector = this.selector || '',
1932
- run = function(e) {
1933
- var what = $(this).blur(), idx = index, relType, relVal;
1934
-
1935
- if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
1936
- relType = options.groupAttr || 'data-fancybox-group';
1937
- relVal = what.attr(relType);
1938
-
1939
- if (!relVal) {
1940
- relType = 'rel';
1941
- relVal = what.get(0)[ relType ];
1942
- }
1943
-
1944
- if (relVal && relVal !== '' && relVal !== 'nofollow') {
1945
- what = selector.length ? $(selector) : that;
1946
- what = what.filter('[' + relType + '="' + relVal + '"]');
1947
- idx = what.index(this);
1948
- }
1949
-
1950
- options.index = idx;
1951
-
1952
- // Stop an event from bubbling if everything is fine
1953
- if (F.open(what, options) !== false) {
1954
- e.preventDefault();
1955
- }
1956
- }
1957
- };
1958
-
1959
- options = options || {};
1960
- index = options.index || 0;
1961
-
1962
- if (!selector || options.live === false) {
1963
- that.unbind('click.fb-start').bind('click.fb-start', run);
1964
-
1965
- } else {
1966
- D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
1967
- }
1968
-
1969
- this.filter('[data-fancybox-start=1]').trigger('click');
1970
-
1971
- return this;
1972
- };
1973
-
1974
- // Tests that need a body at doc ready
1975
- D.ready(function() {
1976
- var w1, w2;
1977
-
1978
- if ( $.scrollbarWidth === undefined ) {
1979
- // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
1980
- $.scrollbarWidth = function() {
1981
- var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
1982
- child = parent.children(),
1983
- width = child.innerWidth() - child.height( 99 ).innerWidth();
1984
-
1985
- parent.remove();
1986
-
1987
- return width;
1988
- };
1989
- }
1990
-
1991
- if ( $.support.fixedPosition === undefined ) {
1992
- $.support.fixedPosition = (function() {
1993
- var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
1994
- fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
1995
-
1996
- elem.remove();
1997
-
1998
- return fixed;
1999
- }());
2000
- }
2001
-
2002
- $.extend(F.defaults, {
2003
- scrollbarWidth : $.scrollbarWidth(),
2004
- fixed : $.support.fixedPosition,
2005
- parent : $('body')
2006
- });
2007
-
2008
- //Get real width of page scroll-bar
2009
- w1 = $(window).width();
2010
-
2011
- H.addClass('fancybox-lock-test');
2012
-
2013
- w2 = $(window).width();
2014
-
2015
- H.removeClass('fancybox-lock-test');
2016
-
2017
- $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
2018
- });
2019
-
2020
- }(window, document, jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/assets/popup/jquery.fancybox.pack.js DELETED
@@ -1,46 +0,0 @@
1
- /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
- (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
3
- width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
4
- keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
5
- (I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
6
- openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
7
- isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
8
- c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
9
- k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
10
- b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11
- setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
12
- d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
13
- a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
14
- b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
15
- y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
16
- if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
17
- (h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
18
- {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
19
- mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
20
- !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
21
- "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
22
- this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
23
- f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
24
- e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
25
- outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
26
- g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
27
- "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
28
- h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
29
- h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
30
- "iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
31
- y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
32
- !a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
33
- b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
34
- a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
35
- (c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
36
- f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
37
- {duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
38
- b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
39
- f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
40
- b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
41
- p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
42
- f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
43
- b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
44
- e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
45
- ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
46
- d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);