Easy FancyBox - Version 1.3.2

Version Description

  • upgraded FancyBox script to version 1.3.2
Download this release

Release Info

Developer RavanH
Plugin Icon 128x128 Easy FancyBox
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1.3 to 1.3.2

Files changed (32) hide show
  1. easy-fancybox.php +12 -10
  2. blank.gif → fancybox/blank.gif +0 -0
  3. fancy_close.png → fancybox/fancy_close.png +0 -0
  4. fancy_loading.png → fancybox/fancy_loading.png +0 -0
  5. fancy_nav_left.png → fancybox/fancy_nav_left.png +0 -0
  6. fancy_nav_right.png → fancybox/fancy_nav_right.png +0 -0
  7. fancy_shadow_e.png → fancybox/fancy_shadow_e.png +0 -0
  8. fancy_shadow_n.png → fancybox/fancy_shadow_n.png +0 -0
  9. fancy_shadow_ne.png → fancybox/fancy_shadow_ne.png +0 -0
  10. fancy_shadow_nw.png → fancybox/fancy_shadow_nw.png +0 -0
  11. fancy_shadow_s.png → fancybox/fancy_shadow_s.png +0 -0
  12. fancy_shadow_se.png → fancybox/fancy_shadow_se.png +0 -0
  13. fancy_shadow_sw.png → fancybox/fancy_shadow_sw.png +0 -0
  14. fancy_shadow_w.png → fancybox/fancy_shadow_w.png +0 -0
  15. fancy_title_left.png → fancybox/fancy_title_left.png +0 -0
  16. fancy_title_main.png → fancybox/fancy_title_main.png +0 -0
  17. fancy_title_over.png → fancybox/fancy_title_over.png +0 -0
  18. fancy_title_right.png → fancybox/fancy_title_right.png +0 -0
  19. fancybox-x.png → fancybox/fancybox-x.png +0 -0
  20. fancybox-y.png → fancybox/fancybox-y.png +0 -0
  21. fancybox.png → fancybox/fancybox.png +0 -0
  22. jquery.easing.pack.js → fancybox/jquery.easing-1.3.pack.js +0 -0
  23. fancybox/jquery.fancybox-1.3.2.css +359 -0
  24. fancybox/jquery.fancybox-1.3.2.js +1136 -0
  25. fancybox/jquery.fancybox-1.3.2.pack.js +46 -0
  26. fancybox/jquery.mousewheel-3.0.4.pack.js +14 -0
  27. jquery.fancybox.css.php +39 -4
  28. jquery.fancybox.js +0 -1077
  29. jquery.fancybox.pack.js +0 -44
  30. jquery.mousewheel.pack.js +0 -13
  31. readme.txt +10 -5
  32. screenshot-2.png +0 -0
easy-fancybox.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
- Description: Hassle-free, no-settings, auto-enable <a href="http://fancybox.net/">FancyBox 1.3.1</a> on all image links including BMP, GIF, JPG, JPEG, and PNG. Uses packed Javascript. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e1&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
6
- Version: 1.3.1.3
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
@@ -19,7 +19,7 @@ function easy_fancybox_settings(){
19
  'input' => 'text',
20
  'options' => array(),
21
  'hide' => 'true',
22
- 'default' => 'jpg bmp gif jpeg png swf',
23
  'description' => __('File types FancyBox should be automatically enabled for. Clear to switch off auto-enabling. Use the tags class="fancybox", class="fancybox-iframe" or class="fancybox-swf" on any link to manually enable FancyBox for it.','easy-fancybox').' '.__('Default:','easy-fancybox')
24
  ),
25
  'titlePosition' => array (
@@ -91,6 +91,7 @@ jQuery(document).ready(function($){";
91
 
92
  if( "over" == get_option("fancybox_titlePosition", $easy_fancybox_array['titlePosition']['default']) )
93
  echo"
 
94
  'onComplete' : function() {
95
  $('#fancybox-wrap').hover(function() {
96
  $('#fancybox-title').show();
@@ -102,6 +103,7 @@ jQuery(document).ready(function($){";
102
  });
103
  $('a.fancybox-iframe').fancybox({
104
  'type' : 'iframe',
 
105
  'padding' : 0,
106
  'autoScale' : false,
107
  'transitionIn' : 'none',
@@ -116,12 +118,12 @@ jQuery(document).ready(function($){";
116
  'autoScale' : false,
117
  'transitionIn' : 'none',
118
  'transitionOut' : 'none',
119
- 'title' : this.title,
120
  'width' : 680,
121
  'height' : 495,
122
  'href' : this.href.replace(new RegExp('watch\\\?v=', 'i'), 'v/'),
123
  'swf' : {
124
- 'wmode' : 'transparent',
125
  'allowfullscreen' : 'true'
126
  }
127
  });
@@ -155,7 +157,6 @@ function easy_fancybox_settings_fields($args){
155
  echo $args['description'].' <em>'.$args['options'][$args['default']].'</em>';
156
  break;
157
  case 'text':
158
- default:
159
  echo '
160
  <input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="large-text"><br />';
161
  if( empty($args['label_for']) )
@@ -163,6 +164,7 @@ function easy_fancybox_settings_fields($args){
163
  else
164
  echo $args['description'].' <em>'.$args['default'].'</em>';
165
  break;
 
166
  echo $args['description'];
167
  }
168
  }
@@ -187,7 +189,7 @@ function easy_fancybox_enqueue() {
187
 
188
  // ENQUEUE
189
  // register main fancybox script
190
- wp_enqueue_script('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.pack.js', array('jquery'), '1.3.1');
191
 
192
  if( "none" != get_option("fancybox_transitionIn") || "none" != get_option("fancybox_transitionOut") ) {
193
  // first get rid of previously registered variants of jquery.easing (by other plugins)
@@ -196,7 +198,7 @@ function easy_fancybox_enqueue() {
196
  wp_deregister_script('jquery-easing');
197
  wp_deregister_script('easing');
198
  // then register our version
199
- wp_enqueue_script('jquery.easing', plugins_url($efb_subdir, __FILE__).'/jquery.easing.pack.js', array('jquery'), '1.3');
200
  }
201
 
202
  // first get rid of previously registered variants of jquery.mousewheel (by other plugins)
@@ -205,10 +207,10 @@ function easy_fancybox_enqueue() {
205
  wp_deregister_script('jquery-mousewheel');
206
  wp_deregister_script('mousewheel');
207
  // then register our version
208
- wp_enqueue_script('jquery.mousewheel', plugins_url($efb_subdir, __FILE__).'/jquery.mousewheel.pack.js', array('jquery'), '3.0.2');
209
 
210
  // register style
211
- wp_enqueue_style('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.css.php', false, '1.3.1');
212
  }
213
 
214
  // HOOKS //
2
  /*
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
+ Description: Hassle-free, no-settings, auto-enable <a href="http://fancybox.net/">FancyBox 1.3.2</a> on all image links including BMP, GIF, JPG, JPEG, and PNG. Uses packed Javascript. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e1&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
6
+ Version: 1.3.2
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
19
  'input' => 'text',
20
  'options' => array(),
21
  'hide' => 'true',
22
+ 'default' => 'jpg gif png bmp jpeg jpe swf',
23
  'description' => __('File types FancyBox should be automatically enabled for. Clear to switch off auto-enabling. Use the tags class="fancybox", class="fancybox-iframe" or class="fancybox-swf" on any link to manually enable FancyBox for it.','easy-fancybox').' '.__('Default:','easy-fancybox')
24
  ),
25
  'titlePosition' => array (
91
 
92
  if( "over" == get_option("fancybox_titlePosition", $easy_fancybox_array['titlePosition']['default']) )
93
  echo"
94
+ 'titleFromAlt' : true,
95
  'onComplete' : function() {
96
  $('#fancybox-wrap').hover(function() {
97
  $('#fancybox-title').show();
103
  });
104
  $('a.fancybox-iframe').fancybox({
105
  'type' : 'iframe',
106
+ 'titleShow' : false,
107
  'padding' : 0,
108
  'autoScale' : false,
109
  'transitionIn' : 'none',
118
  'autoScale' : false,
119
  'transitionIn' : 'none',
120
  'transitionOut' : 'none',
121
+ 'titleShow' : false,
122
  'width' : 680,
123
  'height' : 495,
124
  'href' : this.href.replace(new RegExp('watch\\\?v=', 'i'), 'v/'),
125
  'swf' : {
126
+ 'wmode' : 'opacity',
127
  'allowfullscreen' : 'true'
128
  }
129
  });
157
  echo $args['description'].' <em>'.$args['options'][$args['default']].'</em>';
158
  break;
159
  case 'text':
 
160
  echo '
161
  <input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="large-text"><br />';
162
  if( empty($args['label_for']) )
164
  else
165
  echo $args['description'].' <em>'.$args['default'].'</em>';
166
  break;
167
+ default:
168
  echo $args['description'];
169
  }
170
  }
189
 
190
  // ENQUEUE
191
  // register main fancybox script
192
+ wp_enqueue_script('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.fancybox-1.3.2.pack.js', array('jquery'), '1.3.2');
193
 
194
  if( "none" != get_option("fancybox_transitionIn") || "none" != get_option("fancybox_transitionOut") ) {
195
  // first get rid of previously registered variants of jquery.easing (by other plugins)
198
  wp_deregister_script('jquery-easing');
199
  wp_deregister_script('easing');
200
  // then register our version
201
+ wp_enqueue_script('jquery.easing', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.easing-1.3.pack.js', array('jquery'), '1.3');
202
  }
203
 
204
  // first get rid of previously registered variants of jquery.mousewheel (by other plugins)
207
  wp_deregister_script('jquery-mousewheel');
208
  wp_deregister_script('mousewheel');
209
  // then register our version
210
+ wp_enqueue_script('jquery.mousewheel', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.mousewheel-3.0.4.pack.js', array('jquery'), '3.0.4');
211
 
212
  // register style
213
+ wp_enqueue_style('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.css.php', false, '1.3.2');
214
  }
215
 
216
  // HOOKS //
blank.gif → fancybox/blank.gif RENAMED
File without changes
fancy_close.png → fancybox/fancy_close.png RENAMED
File without changes
fancy_loading.png → fancybox/fancy_loading.png RENAMED
File without changes
fancy_nav_left.png → fancybox/fancy_nav_left.png RENAMED
File without changes
fancy_nav_right.png → fancybox/fancy_nav_right.png RENAMED
File without changes
fancy_shadow_e.png → fancybox/fancy_shadow_e.png RENAMED
File without changes
fancy_shadow_n.png → fancybox/fancy_shadow_n.png RENAMED
File without changes
fancy_shadow_ne.png → fancybox/fancy_shadow_ne.png RENAMED
File without changes
fancy_shadow_nw.png → fancybox/fancy_shadow_nw.png RENAMED
File without changes
fancy_shadow_s.png → fancybox/fancy_shadow_s.png RENAMED
File without changes
fancy_shadow_se.png → fancybox/fancy_shadow_se.png RENAMED
File without changes
fancy_shadow_sw.png → fancybox/fancy_shadow_sw.png RENAMED
File without changes
fancy_shadow_w.png → fancybox/fancy_shadow_w.png RENAMED
File without changes
fancy_title_left.png → fancybox/fancy_title_left.png RENAMED
File without changes
fancy_title_main.png → fancybox/fancy_title_main.png RENAMED
File without changes
fancy_title_over.png → fancybox/fancy_title_over.png RENAMED
File without changes
fancy_title_right.png → fancybox/fancy_title_right.png RENAMED
File without changes
fancybox-x.png → fancybox/fancybox-x.png RENAMED
File without changes
fancybox-y.png → fancybox/fancybox-y.png RENAMED
File without changes
fancybox.png → fancybox/fancybox.png RENAMED
File without changes
jquery.easing.pack.js → fancybox/jquery.easing-1.3.pack.js RENAMED
File without changes
fancybox/jquery.fancybox-1.3.2.css ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.2 (20/10/2010)
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: 1104;
29
+ display: none;
30
+ }
31
+
32
+ #fancybox-loading div {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ width: 40px;
37
+ height: 480px;
38
+ background-image: url('fancybox.png');
39
+ }
40
+
41
+ #fancybox-overlay {
42
+ position: absolute;
43
+ top: 0;
44
+ left: 0;
45
+ width: 100%;
46
+ height: 100%;
47
+ z-index: 1100;
48
+ display: none;
49
+ }
50
+
51
+ #fancybox-tmp {
52
+ padding: 0;
53
+ margin: 0;
54
+ border: 0;
55
+ overflow: auto;
56
+ display: none;
57
+ }
58
+
59
+ #fancybox-wrap {
60
+ position: absolute;
61
+ top: 0;
62
+ left: 0;
63
+ padding: 20px;
64
+ z-index: 1101;
65
+ outline: none;
66
+ display: none;
67
+ }
68
+
69
+ #fancybox-outer {
70
+ position: relative;
71
+ width: 100%;
72
+ height: 100%;
73
+ background: #fff;
74
+ }
75
+
76
+ #fancybox-content {
77
+ width: 0;
78
+ height: 0;
79
+ padding: 0;
80
+ outline: none;
81
+ position: relative;
82
+ overflow: hidden;
83
+ z-index: 1102;
84
+ border: 0px solid #fff;
85
+ }
86
+
87
+ #fancybox-hide-sel-frame {
88
+ position: absolute;
89
+ top: 0;
90
+ left: 0;
91
+ width: 100%;
92
+ height: 100%;
93
+ background: transparent;
94
+ z-index: 1101;
95
+ }
96
+
97
+ #fancybox-close {
98
+ position: absolute;
99
+ top: -15px;
100
+ right: -15px;
101
+ width: 30px;
102
+ height: 30px;
103
+ background: transparent url('fancybox.png') -40px 0px;
104
+ cursor: pointer;
105
+ z-index: 1103;
106
+ display: none;
107
+ }
108
+
109
+ #fancybox-error {
110
+ color: #444;
111
+ font: normal 12px/20px Arial;
112
+ padding: 14px;
113
+ margin: 0;
114
+ }
115
+
116
+ #fancybox-img {
117
+ width: 100%;
118
+ height: 100%;
119
+ padding: 0;
120
+ margin: 0;
121
+ border: none;
122
+ outline: none;
123
+ line-height: 0;
124
+ vertical-align: top;
125
+ }
126
+
127
+ #fancybox-frame {
128
+ width: 100%;
129
+ height: 100%;
130
+ border: none;
131
+ display: block;
132
+ }
133
+
134
+ #fancybox-left, #fancybox-right {
135
+ position: absolute;
136
+ bottom: 0px;
137
+ height: 100%;
138
+ width: 35%;
139
+ cursor: pointer;
140
+ outline: none;
141
+ background: transparent url('blank.gif');
142
+ z-index: 1102;
143
+ display: none;
144
+ }
145
+
146
+ #fancybox-left {
147
+ left: 0px;
148
+ }
149
+
150
+ #fancybox-right {
151
+ right: 0px;
152
+ }
153
+
154
+ #fancybox-left-ico, #fancybox-right-ico {
155
+ position: absolute;
156
+ top: 50%;
157
+ left: -9999px;
158
+ width: 30px;
159
+ height: 30px;
160
+ margin-top: -15px;
161
+ cursor: pointer;
162
+ z-index: 1102;
163
+ display: block;
164
+ }
165
+
166
+ #fancybox-left-ico {
167
+ background-image: url('fancybox.png');
168
+ background-position: -40px -30px;
169
+ }
170
+
171
+ #fancybox-right-ico {
172
+ background-image: url('fancybox.png');
173
+ background-position: -40px -60px;
174
+ }
175
+
176
+ #fancybox-left:hover, #fancybox-right:hover {
177
+ visibility: visible; /* IE6 */
178
+ }
179
+
180
+ #fancybox-left:hover span {
181
+ left: 20px;
182
+ }
183
+
184
+ #fancybox-right:hover span {
185
+ left: auto;
186
+ right: 20px;
187
+ }
188
+
189
+ .fancybox-bg {
190
+ position: absolute;
191
+ padding: 0;
192
+ margin: 0;
193
+ border: 0;
194
+ width: 20px;
195
+ height: 20px;
196
+ z-index: 1001;
197
+ }
198
+
199
+ #fancybox-bg-n {
200
+ top: -20px;
201
+ left: 0;
202
+ width: 100%;
203
+ background-image: url('fancybox-x.png');
204
+ }
205
+
206
+ #fancybox-bg-ne {
207
+ top: -20px;
208
+ right: -20px;
209
+ background-image: url('fancybox.png');
210
+ background-position: -40px -162px;
211
+ }
212
+
213
+ #fancybox-bg-e {
214
+ top: 0;
215
+ right: -20px;
216
+ height: 100%;
217
+ background-image: url('fancybox-y.png');
218
+ background-position: -20px 0px;
219
+ }
220
+
221
+ #fancybox-bg-se {
222
+ bottom: -20px;
223
+ right: -20px;
224
+ background-image: url('fancybox.png');
225
+ background-position: -40px -182px;
226
+ }
227
+
228
+ #fancybox-bg-s {
229
+ bottom: -20px;
230
+ left: 0;
231
+ width: 100%;
232
+ background-image: url('fancybox-x.png');
233
+ background-position: 0px -20px;
234
+ }
235
+
236
+ #fancybox-bg-sw {
237
+ bottom: -20px;
238
+ left: -20px;
239
+ background-image: url('fancybox.png');
240
+ background-position: -40px -142px;
241
+ }
242
+
243
+ #fancybox-bg-w {
244
+ top: 0;
245
+ left: -20px;
246
+ height: 100%;
247
+ background-image: url('fancybox-y.png');
248
+ }
249
+
250
+ #fancybox-bg-nw {
251
+ top: -20px;
252
+ left: -20px;
253
+ background-image: url('fancybox.png');
254
+ background-position: -40px -122px;
255
+ }
256
+
257
+ #fancybox-title {
258
+ font-family: Helvetica;
259
+ font-size: 12px;
260
+ z-index: 1102;
261
+ }
262
+
263
+ .fancybox-title-inside {
264
+ padding-bottom: 10px;
265
+ text-align: center;
266
+ color: #333;
267
+ background: #fff;
268
+ position: relative;
269
+ }
270
+
271
+ .fancybox-title-outside {
272
+ padding-top: 10px;
273
+ color: #fff;
274
+ }
275
+
276
+ .fancybox-title-over {
277
+ position: absolute;
278
+ bottom: 0;
279
+ left: 0;
280
+ color: #FFF;
281
+ text-align: left;
282
+ }
283
+
284
+ #fancybox-title-over {
285
+ padding: 10px;
286
+ background-image: url('fancy_title_over.png');
287
+ display: block;
288
+ }
289
+
290
+ .fancybox-title-float {
291
+ position: absolute;
292
+ left: 0;
293
+ bottom: -20px;
294
+ height: 32px;
295
+ }
296
+
297
+ #fancybox-title-float-wrap {
298
+ border: none;
299
+ border-collapse: collapse;
300
+ width: auto;
301
+ }
302
+
303
+ #fancybox-title-float-wrap td {
304
+ white-space: nowrap;
305
+ }
306
+
307
+ #fancybox-title-float-left {
308
+ padding-left: 15px;
309
+ background: url('fancybox.png') -40px -90px no-repeat;
310
+ }
311
+
312
+ #fancybox-title-float-main {
313
+ color: #FFF;
314
+ line-height: 29px;
315
+ font-weight: bold;
316
+ padding-bottom: 3px;
317
+ background: url('fancybox-x.png') 0px -40px;
318
+ }
319
+
320
+ #fancybox-title-float-right {
321
+ padding-left: 15px;
322
+ background: url('fancybox.png') -55px -90px no-repeat;
323
+ }
324
+
325
+ /* IE6 */
326
+
327
+ .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
328
+
329
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331
+
332
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
336
+
337
+ .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
+ height: expression(this.parentNode.clientHeight + "px");
339
+ }
340
+
341
+ #fancybox-loading.fancybox-ie6 {
342
+ position: absolute; margin-top: 0;
343
+ top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
+ }
345
+
346
+ #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
347
+
348
+ /* IE6, IE7, IE8 */
349
+
350
+ .fancybox-ie .fancybox-bg { background: transparent !important; }
351
+
352
+ .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
fancybox/jquery.fancybox-1.3.2.js ADDED
@@ -0,0 +1,1136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.2 (20/10/2010)
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
+ ;(function($) {
19
+ var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
20
+
21
+ selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
22
+
23
+ ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
24
+
25
+ loadingTimer, loadingFrame = 1,
26
+
27
+ titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
28
+
29
+ isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
30
+
31
+ /*
32
+ * Private methods
33
+ */
34
+
35
+ _abort = function() {
36
+ loading.hide();
37
+
38
+ imgPreloader.onerror = imgPreloader.onload = null;
39
+
40
+ if (ajaxLoader) {
41
+ ajaxLoader.abort();
42
+ }
43
+
44
+ tmp.empty();
45
+ },
46
+
47
+ _error = function() {
48
+ if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
49
+ loading.hide();
50
+ busy = false;
51
+ return;
52
+ }
53
+
54
+ selectedOpts.titleShow = false;
55
+
56
+ selectedOpts.width = 'auto';
57
+ selectedOpts.height = 'auto';
58
+
59
+ tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
60
+
61
+ _process_inline();
62
+ },
63
+
64
+ _start = function() {
65
+ var obj = selectedArray[ selectedIndex ],
66
+ href,
67
+ type,
68
+ title,
69
+ str,
70
+ emb,
71
+ ret;
72
+
73
+ _abort();
74
+
75
+ selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
76
+
77
+ ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
78
+
79
+ if (ret === false) {
80
+ busy = false;
81
+ return;
82
+ } else if (typeof ret == 'object') {
83
+ selectedOpts = $.extend(selectedOpts, ret);
84
+ }
85
+
86
+ title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
87
+
88
+ if (obj.nodeName && !selectedOpts.orig) {
89
+ selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
90
+ }
91
+
92
+ if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
93
+ title = selectedOpts.orig.attr('alt');
94
+ }
95
+
96
+ href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
97
+
98
+ if ((/^(?:javascript)/i).test(href) || href == '#') {
99
+ href = null;
100
+ }
101
+
102
+ if (selectedOpts.type) {
103
+ type = selectedOpts.type;
104
+
105
+ if (!href) {
106
+ href = selectedOpts.content;
107
+ }
108
+
109
+ } else if (selectedOpts.content) {
110
+ type = 'html';
111
+
112
+ } else if (href) {
113
+ if (href.match(imgRegExp)) {
114
+ type = 'image';
115
+
116
+ } else if (href.match(swfRegExp)) {
117
+ type = 'swf';
118
+
119
+ } else if ($(obj).hasClass("iframe")) {
120
+ type = 'iframe';
121
+
122
+ } else if (href.indexOf("#") === 0) {
123
+ type = 'inline';
124
+
125
+ } else {
126
+ type = 'ajax';
127
+ }
128
+ }
129
+
130
+ if (!type) {
131
+ _error();
132
+ return;
133
+ }
134
+
135
+ if (type == 'inline') {
136
+ obj = href.substr(href.indexOf("#"));
137
+ type = $(obj).length > 0 ? 'inline' : 'ajax';
138
+ }
139
+
140
+ selectedOpts.type = type;
141
+ selectedOpts.href = href;
142
+ selectedOpts.title = title;
143
+
144
+ if (selectedOpts.autoDimensions && selectedOpts.type !== 'iframe' && selectedOpts.type !== 'swf') {
145
+ selectedOpts.width = 'auto';
146
+ selectedOpts.height = 'auto';
147
+ }
148
+
149
+ if (selectedOpts.modal) {
150
+ selectedOpts.overlayShow = true;
151
+ selectedOpts.hideOnOverlayClick = false;
152
+ selectedOpts.hideOnContentClick = false;
153
+ selectedOpts.enableEscapeButton = false;
154
+ selectedOpts.showCloseButton = false;
155
+ }
156
+
157
+ selectedOpts.padding = parseInt(selectedOpts.padding, 10);
158
+ selectedOpts.margin = parseInt(selectedOpts.margin, 10);
159
+
160
+ tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
161
+
162
+ $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
163
+ $(this).replaceWith(content.children());
164
+ });
165
+
166
+ switch (type) {
167
+ case 'html' :
168
+ tmp.html( selectedOpts.content );
169
+ _process_inline();
170
+ break;
171
+
172
+ case 'inline' :
173
+ if ( $(obj).parent().is('#fancybox-content') === true) {
174
+ busy = false;
175
+ return;
176
+ }
177
+
178
+ $('<div class="fancybox-inline-tmp" />')
179
+ .hide()
180
+ .insertBefore( $(obj) )
181
+ .bind('fancybox-cleanup', function() {
182
+ $(this).replaceWith(content.children());
183
+ }).bind('fancybox-cancel', function() {
184
+ $(this).replaceWith(tmp.children());
185
+ });
186
+
187
+ $(obj).appendTo(tmp);
188
+
189
+ _process_inline();
190
+ break;
191
+
192
+ case 'image':
193
+ busy = false;
194
+
195
+ $.fancybox.showActivity();
196
+
197
+ imgPreloader = new Image();
198
+
199
+ imgPreloader.onerror = function() {
200
+ _error();
201
+ };
202
+
203
+ imgPreloader.onload = function() {
204
+ busy = true;
205
+
206
+ imgPreloader.onerror = imgPreloader.onload = null;
207
+
208
+ _process_image();
209
+ };
210
+
211
+ imgPreloader.src = href;
212
+ break;
213
+
214
+ case 'swf':
215
+ str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
216
+ emb = '';
217
+
218
+ $.each(selectedOpts.swf, function(name, val) {
219
+ str += '<param name="' + name + '" value="' + val + '"></param>';
220
+ emb += ' ' + name + '="' + val + '"';
221
+ });
222
+
223
+ str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
224
+
225
+ tmp.html(str);
226
+
227
+ _process_inline();
228
+ break;
229
+
230
+ case 'ajax':
231
+ busy = false;
232
+
233
+ $.fancybox.showActivity();
234
+
235
+ selectedOpts.ajax.win = selectedOpts.ajax.success;
236
+
237
+ ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
238
+ url : href,
239
+ data : selectedOpts.ajax.data || {},
240
+ error : function(XMLHttpRequest, textStatus, errorThrown) {
241
+ if ( XMLHttpRequest.status > 0 ) {
242
+ _error();
243
+ }
244
+ },
245
+ success : function(data, textStatus, XMLHttpRequest) {
246
+ if ( XMLHttpRequest.status == 200 ) {
247
+ if ( typeof selectedOpts.ajax.win == 'function' ) {
248
+ ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
249
+
250
+ if (ret === false) {
251
+ loading.hide();
252
+ return;
253
+ } else if (typeof ret == 'string' || typeof ret == 'object') {
254
+ data = ret;
255
+ }
256
+ }
257
+
258
+ tmp.html( data );
259
+ _process_inline();
260
+ }
261
+ }
262
+ }));
263
+
264
+ break;
265
+
266
+ case 'iframe' :
267
+ _show();
268
+ break;
269
+ }
270
+ },
271
+
272
+ _process_inline = function() {
273
+ tmp.width( selectedOpts.width );
274
+ tmp.height( selectedOpts.height );
275
+
276
+ if (selectedOpts.width == 'auto') {
277
+ selectedOpts.width = tmp.width();
278
+ }
279
+
280
+ if (selectedOpts.height == 'auto') {
281
+ selectedOpts.height = tmp.height();
282
+ }
283
+
284
+ _show();
285
+ },
286
+
287
+ _process_image = function() {
288
+ selectedOpts.width = imgPreloader.width;
289
+ selectedOpts.height = imgPreloader.height;
290
+
291
+ $("<img />").attr({
292
+ 'id' : 'fancybox-img',
293
+ 'src' : imgPreloader.src,
294
+ 'alt' : selectedOpts.title
295
+ }).appendTo( tmp );
296
+
297
+ _show();
298
+ },
299
+
300
+ _show = function() {
301
+ var pos, equal;
302
+
303
+ loading.hide();
304
+
305
+ if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
306
+ $.event.trigger('fancybox-cancel');
307
+
308
+ busy = false;
309
+ return;
310
+ }
311
+
312
+ busy = true;
313
+
314
+ $(content.add( overlay )).unbind();
315
+
316
+ $(window).unbind("resize.fb scroll.fb");
317
+ $(document).unbind('keydown.fb');
318
+
319
+ if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
320
+ wrap.css('height', wrap.height());
321
+ }
322
+
323
+ currentArray = selectedArray;
324
+ currentIndex = selectedIndex;
325
+ currentOpts = selectedOpts;
326
+
327
+ if (currentOpts.overlayShow) {
328
+ overlay.css({
329
+ 'background-color' : currentOpts.overlayColor,
330
+ 'opacity' : currentOpts.overlayOpacity,
331
+ 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
332
+ 'height' : $(document).height()
333
+ });
334
+
335
+ if (!overlay.is(':visible')) {
336
+ if (isIE6) {
337
+ $('select:not(#fancybox-tmp select)').filter(function() {
338
+ return this.style.visibility !== 'hidden';
339
+ }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
340
+ this.style.visibility = 'inherit';
341
+ });
342
+ }
343
+
344
+ overlay.show();
345
+ }
346
+ } else {
347
+ overlay.hide();
348
+ }
349
+
350
+ content.get(0).scrollTop = 0;
351
+ content.get(0).scrollLeft = 0;
352
+
353
+ final_pos = _get_zoom_to();
354
+
355
+ _process_title();
356
+
357
+ if (wrap.is(":visible")) {
358
+ $( close.add( nav_left ).add( nav_right ) ).hide();
359
+
360
+ pos = wrap.position(),
361
+
362
+ start_pos = {
363
+ top : pos.top,
364
+ left : pos.left,
365
+ width : wrap.width(),
366
+ height : wrap.height()
367
+ };
368
+
369
+ equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
370
+
371
+ content.fadeTo(currentOpts.changeFade, 0.3, function() {
372
+ var finish_resizing = function() {
373
+ content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
374
+ };
375
+
376
+ $.event.trigger('fancybox-change');
377
+
378
+ content
379
+ .empty()
380
+ .removeAttr('filter')
381
+ .css({
382
+ 'border-width' : currentOpts.padding,
383
+ 'width' : final_pos.width - currentOpts.padding * 2,
384
+ 'height' : currentOpts.type == 'image' || currentOpts.type == 'swf' || currentOpts.type == 'iframe' ? final_pos.height - titleHeight - currentOpts.padding * 2 : 'auto'
385
+ });
386
+
387
+ if (equal) {
388
+ finish_resizing();
389
+
390
+ } else {
391
+ fx.prop = 0;
392
+
393
+ $(fx).animate({prop: 1}, {
394
+ duration : currentOpts.changeSpeed,
395
+ easing : currentOpts.easingChange,
396
+ step : _draw,
397
+ complete : finish_resizing
398
+ });
399
+ }
400
+ });
401
+
402
+ return;
403
+ }
404
+
405
+ wrap.removeAttr("style");
406
+
407
+ content.css('border-width', currentOpts.padding);
408
+
409
+ if (currentOpts.transitionIn == 'elastic') {
410
+ start_pos = _get_zoom_from();
411
+
412
+ content.html( tmp.contents() );
413
+
414
+ wrap.show();
415
+
416
+ if (currentOpts.opacity) {
417
+ final_pos.opacity = 0;
418
+ }
419
+
420
+ fx.prop = 0;
421
+
422
+ $(fx).animate({prop: 1}, {
423
+ duration : currentOpts.speedIn,
424
+ easing : currentOpts.easingIn,
425
+ step : _draw,
426
+ complete : _finish
427
+ });
428
+
429
+ return;
430
+ }
431
+
432
+ if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
433
+ title.show();
434
+ }
435
+
436
+ content
437
+ .css({
438
+ 'width' : final_pos.width - currentOpts.padding * 2,
439
+ 'height' : currentOpts.type == 'image' || currentOpts.type == 'swf' || currentOpts.type == 'iframe' ? final_pos.height - titleHeight - currentOpts.padding * 2 : 'auto'
440
+ })
441
+ .html( tmp.contents() );
442
+
443
+ wrap
444
+ .css(final_pos)
445
+ .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.fadeIn, _finish );
446
+ },
447
+
448
+ _format_title = function(title) {
449
+ if (title && title.length) {
450
+ if (currentOpts.titlePosition == 'float') {
451
+ return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><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>';
452
+ }
453
+
454
+ return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
455
+ }
456
+
457
+ return false;
458
+ },
459
+
460
+ _process_title = function() {
461
+ titleStr = currentOpts.title || '';
462
+ titleHeight = 0;
463
+
464
+ title
465
+ .empty()
466
+ .removeAttr('style')
467
+ .removeClass();
468
+
469
+ if (currentOpts.titleShow === false) {
470
+ title.hide();
471
+ return;
472
+ }
473
+
474
+ titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
475
+
476
+ if (!titleStr || titleStr === '') {
477
+ title.hide();
478
+ return;
479
+ }
480
+
481
+ title
482
+ .addClass('fancybox-title-' + currentOpts.titlePosition)
483
+ .html( titleStr )
484
+ .appendTo( 'body' )
485
+ .show();
486
+
487
+ switch (currentOpts.titlePosition) {
488
+ case 'inside':
489
+ title
490
+ .css({
491
+ 'width' : final_pos.width - (currentOpts.padding * 2),
492
+ 'marginLeft' : currentOpts.padding,
493
+ 'marginRight' : currentOpts.padding
494
+ });
495
+
496
+ titleHeight = title.outerHeight(true);
497
+
498
+ title.appendTo( outer );
499
+
500
+ final_pos.height += titleHeight;
501
+ break;
502
+
503
+ case 'over':
504
+ title
505
+ .css({
506
+ 'marginLeft' : currentOpts.padding,
507
+ 'width' : final_pos.width - (currentOpts.padding * 2),
508
+ 'bottom' : currentOpts.padding
509
+ })
510
+ .appendTo( outer );
511
+ break;
512
+
513
+ case 'float':
514
+ title
515
+ .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
516
+ .appendTo( wrap );
517
+ break;
518
+
519
+ default:
520
+ title
521
+ .css({
522
+ 'width' : final_pos.width - (currentOpts.padding * 2),
523
+ 'paddingLeft' : currentOpts.padding,
524
+ 'paddingRight' : currentOpts.padding
525
+ })
526
+ .appendTo( wrap );
527
+ break;
528
+ }
529
+
530
+ title.hide();
531
+ },
532
+
533
+ _set_navigation = function() {
534
+ if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
535
+ $(document).bind('keydown.fb', function(e) {
536
+ if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
537
+ e.preventDefault();
538
+ $.fancybox.close();
539
+
540
+ } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
541
+ e.preventDefault();
542
+ $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
543
+ }
544
+ });
545
+ }
546
+
547
+ if (!currentOpts.showNavArrows) {
548
+ nav_left.hide();
549
+ nav_right.hide();
550
+ return;
551
+ }
552
+
553
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
554
+ nav_left.show();
555
+ }
556
+
557
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
558
+ nav_right.show();
559
+ }
560
+ },
561
+
562
+ _finish = function () {
563
+ if (!$.support.opacity) {
564
+ content.get(0).style.removeAttribute('filter');
565
+ wrap.get(0).style.removeAttribute('filter');
566
+ }
567
+
568
+ wrap.css('height', 'auto');
569
+
570
+ if (currentOpts.type !== 'image' && currentOpts.type !== 'swf' && currentOpts.type !== 'iframe') {
571
+ content.css('height', 'auto');
572
+ }
573
+
574
+ if (titleStr && titleStr.length) {
575
+ title.show();
576
+ }
577
+
578
+ if (currentOpts.showCloseButton) {
579
+ close.show();
580
+ }
581
+
582
+ _set_navigation();
583
+
584
+ if (currentOpts.hideOnContentClick) {
585
+ content.bind('click', $.fancybox.close);
586
+ }
587
+
588
+ if (currentOpts.hideOnOverlayClick) {
589
+ overlay.bind('click', $.fancybox.close);
590
+ }
591
+
592
+ $(window).bind("resize.fb", $.fancybox.resize);
593
+
594
+ if (currentOpts.centerOnScroll) {
595
+ $(window).bind("scroll.fb", $.fancybox.center);
596
+ }
597
+
598
+ if (currentOpts.type == 'iframe') {
599
+ $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
600
+ }
601
+
602
+ wrap.show();
603
+
604
+ busy = false;
605
+
606
+ $.fancybox.center();
607
+
608
+ currentOpts.onComplete(currentArray, currentIndex, currentOpts);
609
+
610
+ _preload_images();
611
+ },
612
+
613
+ _preload_images = function() {
614
+ var href,
615
+ objNext;
616
+
617
+ if ((currentArray.length -1) > currentIndex) {
618
+ href = currentArray[ currentIndex + 1 ].href;
619
+
620
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
621
+ objNext = new Image();
622
+ objNext.src = href;
623
+ }
624
+ }
625
+
626
+ if (currentIndex > 0) {
627
+ href = currentArray[ currentIndex - 1 ].href;
628
+
629
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
630
+ objNext = new Image();
631
+ objNext.src = href;
632
+ }
633
+ }
634
+ },
635
+
636
+ _draw = function(pos) {
637
+ var dim = {
638
+ width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
639
+ height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
640
+
641
+ top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
642
+ left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
643
+ };
644
+
645
+ if (typeof final_pos.opacity !== 'undefined') {
646
+ dim.opacity = pos < 0.5 ? 0.5 : pos;
647
+ }
648
+
649
+ wrap.css(dim);
650
+
651
+ content.css({
652
+ 'width' : dim.width - currentOpts.padding * 2,
653
+ 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
654
+ });
655
+ },
656
+
657
+ _get_viewport = function() {
658
+ return [
659
+ $(window).width() - (currentOpts.margin * 2),
660
+ $(window).height() - (currentOpts.margin * 2),
661
+ $(document).scrollLeft() + currentOpts.margin,
662
+ $(document).scrollTop() + currentOpts.margin
663
+ ];
664
+ },
665
+
666
+ _get_zoom_to = function () {
667
+ var view = _get_viewport(),
668
+ to = {},
669
+ resize = currentOpts.autoScale,
670
+ double_padding = currentOpts.padding * 2,
671
+ ratio;
672
+
673
+ if (currentOpts.width.toString().indexOf('%') > -1) {
674
+ to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
675
+ } else {
676
+ to.width = currentOpts.width + double_padding;
677
+ }
678
+
679
+ if (currentOpts.height.toString().indexOf('%') > -1) {
680
+ to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
681
+ } else {
682
+ to.height = currentOpts.height + double_padding;
683
+ }
684
+
685
+ if (resize && (to.width > view[0] || to.height > view[1])) {
686
+ if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
687
+ ratio = (currentOpts.width ) / (currentOpts.height );
688
+
689
+ if ((to.width ) > view[0]) {
690
+ to.width = view[0];
691
+ to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
692
+ }
693
+
694
+ if ((to.height) > view[1]) {
695
+ to.height = view[1];
696
+ to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
697
+ }
698
+
699
+ } else {
700
+ to.width = Math.min(to.width, view[0]);
701
+ to.height = Math.min(to.height, view[1]);
702
+ }
703
+ }
704
+
705
+ to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
706
+ to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
707
+
708
+ return to;
709
+ },
710
+
711
+ _get_obj_pos = function(obj) {
712
+ var pos = obj.offset();
713
+
714
+ pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
715
+ pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
716
+
717
+ pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
718
+ pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
719
+
720
+ pos.width = obj.width();
721
+ pos.height = obj.height();
722
+
723
+ return pos;
724
+ },
725
+
726
+ _get_zoom_from = function() {
727
+ var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
728
+ from = {},
729
+ pos,
730
+ view;
731
+
732
+ if (orig && orig.length) {
733
+ pos = _get_obj_pos(orig);
734
+
735
+ from = {
736
+ width : pos.width + (currentOpts.padding * 2),
737
+ height : pos.height + (currentOpts.padding * 2),
738
+ top : pos.top - currentOpts.padding - 20,
739
+ left : pos.left - currentOpts.padding - 20
740
+ };
741
+
742
+ } else {
743
+ view = _get_viewport();
744
+
745
+ from = {
746
+ width : currentOpts.padding * 2,
747
+ height : currentOpts.padding * 2,
748
+ top : parseInt(view[3] + view[1] * 0.5, 10),
749
+ left : parseInt(view[2] + view[0] * 0.5, 10)
750
+ };
751
+ }
752
+
753
+ return from;
754
+ },
755
+
756
+ _animate_loading = function() {
757
+ if (!loading.is(':visible')){
758
+ clearInterval(loadingTimer);
759
+ return;
760
+ }
761
+
762
+ $('div', loading).css('top', (loadingFrame * -40) + 'px');
763
+
764
+ loadingFrame = (loadingFrame + 1) % 12;
765
+ };
766
+
767
+ /*
768
+ * Public methods
769
+ */
770
+
771
+ $.fn.fancybox = function(options) {
772
+ if (!$(this).length) {
773
+ return this;
774
+ }
775
+
776
+ $(this)
777
+ .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
778
+ .unbind('click.fb')
779
+ .bind('click.fb', function(e) {
780
+ e.preventDefault();
781
+
782
+ if (busy) {
783
+ return;
784
+ }
785
+
786
+ busy = true;
787
+
788
+ $(this).blur();
789
+
790
+ selectedArray = [];
791
+ selectedIndex = 0;
792
+
793
+ var rel = $(this).attr('rel') || '';
794
+
795
+ if (!rel || rel == '' || rel === 'nofollow') {
796
+ selectedArray.push(this);
797
+
798
+ } else {
799
+ selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
800
+ selectedIndex = selectedArray.index( this );
801
+ }
802
+
803
+ _start();
804
+
805
+ return;
806
+ });
807
+
808
+ return this;
809
+ };
810
+
811
+ $.fancybox = function(obj) {
812
+ var opts;
813
+
814
+ if (busy) {
815
+ return;
816
+ }
817
+
818
+ busy = true;
819
+ opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
820
+
821
+ selectedArray = [];
822
+ selectedIndex = parseInt(opts.index, 10) || 0;
823
+
824
+ if ($.isArray(obj)) {
825
+ for (var i = 0, j = obj.length; i < j; i++) {
826
+ if (typeof obj[i] == 'object') {
827
+ $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
828
+ } else {
829
+ obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
830
+ }
831
+ }
832
+
833
+ selectedArray = jQuery.merge(selectedArray, obj);
834
+
835
+ } else {
836
+ if (typeof obj == 'object') {
837
+ $(obj).data('fancybox', $.extend({}, opts, obj));
838
+ } else {
839
+ obj = $({}).data('fancybox', $.extend({content : obj}, opts));
840
+ }
841
+
842
+ selectedArray.push(obj);
843
+ }
844
+
845
+ if (selectedIndex > selectedArray.length || selectedIndex < 0) {
846
+ selectedIndex = 0;
847
+ }
848
+
849
+ _start();
850
+ };
851
+
852
+ $.fancybox.showActivity = function() {
853
+ clearInterval(loadingTimer);
854
+
855
+ loading.show();
856
+ loadingTimer = setInterval(_animate_loading, 66);
857
+ };
858
+
859
+ $.fancybox.hideActivity = function() {
860
+ loading.hide();
861
+ };
862
+
863
+ $.fancybox.next = function() {
864
+ return $.fancybox.pos( currentIndex + 1);
865
+ };
866
+
867
+ $.fancybox.prev = function() {
868
+ return $.fancybox.pos( currentIndex - 1);
869
+ };
870
+
871
+ $.fancybox.pos = function(pos) {
872
+ if (busy) {
873
+ return;
874
+ }
875
+
876
+ pos = parseInt(pos);
877
+
878
+ selectedArray = currentArray;
879
+
880
+ if (pos > -1 && pos < currentArray.length) {
881
+ selectedIndex = pos;
882
+ _start();
883
+
884
+ } else if (currentOpts.cyclic && currentArray.length > 1) {
885
+ selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
886
+ _start();
887
+ }
888
+
889
+ return;
890
+ };
891
+
892
+ $.fancybox.cancel = function() {
893
+ if (busy) {
894
+ return;
895
+ }
896
+
897
+ busy = true;
898
+
899
+ $.event.trigger('fancybox-cancel');
900
+
901
+ _abort();
902
+
903
+ selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
904
+
905
+ busy = false;
906
+ };
907
+
908
+ // Note: within an iframe use - parent.$.fancybox.close();
909
+ $.fancybox.close = function() {
910
+ if (busy || wrap.is(':hidden')) {
911
+ return;
912
+ }
913
+
914
+ busy = true;
915
+
916
+ if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
917
+ busy = false;
918
+ return;
919
+ }
920
+
921
+ _abort();
922
+
923
+ $(close.add( nav_left ).add( nav_right )).hide();
924
+
925
+ $(content.add( overlay )).unbind();
926
+
927
+ $(window).unbind("resize.fb scroll.fb");
928
+ $(document).unbind('keydown.fb');
929
+
930
+ content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
931
+
932
+ if (currentOpts.titlePosition !== 'inside') {
933
+ title.empty();
934
+ }
935
+
936
+ wrap.stop();
937
+
938
+ function _cleanup() {
939
+ overlay.fadeOut('fast');
940
+
941
+ title.empty().hide();
942
+ wrap.hide();
943
+
944
+ $.event.trigger('fancybox-cleanup');
945
+
946
+ content.empty();
947
+
948
+ currentOpts.onClosed(currentArray, currentIndex, currentOpts);
949
+
950
+ currentArray = selectedOpts = [];
951
+ currentIndex = selectedIndex = 0;
952
+ currentOpts = selectedOpts = {};
953
+
954
+ busy = false;
955
+ }
956
+
957
+ if (currentOpts.transitionOut == 'elastic') {
958
+ start_pos = _get_zoom_from();
959
+
960
+ var pos = wrap.position();
961
+
962
+ final_pos = {
963
+ top : pos.top ,
964
+ left : pos.left,
965
+ width : wrap.width(),
966
+ height : wrap.height()
967
+ };
968
+
969
+ if (currentOpts.opacity) {
970
+ final_pos.opacity = 1;
971
+ }
972
+
973
+ title.empty().hide();
974
+
975
+ fx.prop = 1;
976
+
977
+ $(fx).animate({ prop: 0 }, {
978
+ duration : currentOpts.speedOut,
979
+ easing : currentOpts.easingOut,
980
+ step : _draw,
981
+ complete : _cleanup
982
+ });
983
+
984
+ } else {
985
+ wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
986
+ }
987
+ };
988
+
989
+ $.fancybox.resize = function() {
990
+ if (overlay.is(':visible')) {
991
+ overlay.css('height', $(document).height());
992
+ }
993
+
994
+ $.fancybox.center(true);
995
+ };
996
+
997
+ $.fancybox.center = function() {
998
+ var view, align;
999
+
1000
+ if (busy) {
1001
+ return;
1002
+ }
1003
+
1004
+ align = arguments[0] === true ? 1 : 0;
1005
+ view = _get_viewport();
1006
+
1007
+ if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1008
+ return;
1009
+ }
1010
+
1011
+ wrap
1012
+ .stop()
1013
+ .animate({
1014
+ 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
1015
+ 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
1016
+ }, typeof arguments[0] == 'number' ? arguments[0] : 200);
1017
+ };
1018
+
1019
+ $.fancybox.init = function() {
1020
+ if ($("#fancybox-wrap").length) {
1021
+ return;
1022
+ }
1023
+
1024
+ $('body').append(
1025
+ tmp = $('<div id="fancybox-tmp"></div>'),
1026
+ loading = $('<div id="fancybox-loading"><div></div></div>'),
1027
+ overlay = $('<div id="fancybox-overlay"></div>'),
1028
+ wrap = $('<div id="fancybox-wrap"></div>')
1029
+ );
1030
+
1031
+ outer = $('<div id="fancybox-outer"></div>')
1032
+ .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>')
1033
+ .appendTo( wrap );
1034
+
1035
+ outer.append(
1036
+ content = $('<div id="fancybox-content"></div>'),
1037
+ close = $('<a id="fancybox-close"></a>'),
1038
+ title = $('<div id="fancybox-title"></div>'),
1039
+
1040
+ nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
1041
+ nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
1042
+ );
1043
+
1044
+ close.click($.fancybox.close);
1045
+ loading.click($.fancybox.cancel);
1046
+
1047
+ nav_left.click(function(e) {
1048
+ e.preventDefault();
1049
+ $.fancybox.prev();
1050
+ });
1051
+
1052
+ nav_right.click(function(e) {
1053
+ e.preventDefault();
1054
+ $.fancybox.next();
1055
+ });
1056
+
1057
+ if ($.fn.mousewheel) {
1058
+ wrap.bind('mousewheel.fb', function(e, delta) {
1059
+ e.preventDefault();
1060
+
1061
+ $.fancybox[ delta > 0 ? 'prev' : 'next']();
1062
+ });
1063
+ }
1064
+
1065
+ if (!$.support.opacity) {
1066
+ wrap.addClass('fancybox-ie');
1067
+ }
1068
+
1069
+ if (isIE6) {
1070
+ loading.addClass('fancybox-ie6');
1071
+ wrap.addClass('fancybox-ie6');
1072
+
1073
+ $('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
1074
+ }
1075
+ };
1076
+
1077
+ $.fn.fancybox.defaults = {
1078
+ padding : 10,
1079
+ margin : 40,
1080
+ opacity : false,
1081
+ modal : false,
1082
+ cyclic : false,
1083
+ scrolling : 'auto', // 'auto', 'yes' or 'no'
1084
+
1085
+ width : 560,
1086
+ height : 340,
1087
+
1088
+ autoScale : true,
1089
+ autoDimensions : true,
1090
+ centerOnScroll : false,
1091
+
1092
+ ajax : {},
1093
+ swf : { wmode: 'transparent' },
1094
+
1095
+ hideOnOverlayClick : true,
1096
+ hideOnContentClick : false,
1097
+
1098
+ overlayShow : true,
1099
+ overlayOpacity : 0.7,
1100
+ overlayColor : '#777',
1101
+
1102
+ titleShow : true,
1103
+ titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
1104
+ titleFormat : null,
1105
+ titleFromAlt : false,
1106
+
1107
+ transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1108
+ transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1109
+
1110
+ speedIn : 300,
1111
+ speedOut : 300,
1112
+
1113
+ changeSpeed : 300,
1114
+ changeFade : 'fast',
1115
+
1116
+ easingIn : 'swing',
1117
+ easingOut : 'swing',
1118
+
1119
+ showCloseButton : true,
1120
+ showNavArrows : true,
1121
+ enableEscapeButton : true,
1122
+ enableKeyboardNav : true,
1123
+
1124
+ onStart : function(){},
1125
+ onCancel : function(){},
1126
+ onComplete : function(){},
1127
+ onCleanup : function(){},
1128
+ onClosed : function(){},
1129
+ onError : function(){}
1130
+ };
1131
+
1132
+ $(document).ready(function() {
1133
+ $.fancybox.init();
1134
+ });
1135
+
1136
+ })(jQuery);
fancybox/jquery.fancybox-1.3.2.pack.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.2 (20/10/2010)
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
+ ;(function(a){var m,t,u,f,D,h,E,n,z,A,q=0,e={},o=[],p=0,c={},l=[],I=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,j,i=false,B=a.extend(a("<div/>")[0],{prop:0}),M=a.browser.msie&&a.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;I&&I.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();i=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
19
+ F()}},H=function(){var b=o[q],d,g,k,C,P,w;N();e=a.extend({},a.fn.fancybox.defaults,typeof a(b).data("fancybox")=="undefined"?e:a(b).data("fancybox"));w=e.onStart(o,q,e);if(w===false)i=false;else{if(typeof w=="object")e=a.extend(e,w);k=e.title||(b.nodeName?a(b).attr("title"):b.title)||"";if(b.nodeName&&!e.orig)e.orig=a(b).children("img:first").length?a(b).children("img:first"):a(b);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");d=e.href||(b.nodeName?a(b).attr("href"):b.href)||null;if(/^(?:javascript)/i.test(d)||
20
+ d=="#")d=null;if(e.type){g=e.type;if(!d)d=e.content}else if(e.content)g="html";else if(d)g=d.match(J)?"image":d.match(W)?"swf":a(b).hasClass("iframe")?"iframe":d.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){b=d.substr(d.indexOf("#"));g=a(b).length>0?"inline":"ajax"}e.type=g;e.href=d;e.title=k;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;
21
+ e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){a(this).replaceWith(h.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(a(b).parent().is("#fancybox-content")===true){i=false;break}a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(b)).bind("fancybox-cleanup",function(){a(this).replaceWith(h.children())}).bind("fancybox-cancel",
22
+ function(){a(this).replaceWith(m.children())});a(b).appendTo(m);F();break;case "image":i=false;a.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){i=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;a("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=d;break;case "swf":C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';P="";
23
+ a.each(e.swf,function(x,G){C+='<param name="'+x+'" value="'+G+'"></param>';P+=" "+x+'="'+G+'"'});C+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":i=false;a.fancybox.showActivity();e.ajax.win=e.ajax.success;I=a.ajax(a.extend({},e.ajax,{url:d,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,G,U){if(U.status==200){if(typeof e.ajax.win=="function"){w=e.ajax.win(d,x,G,
24
+ U);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();Q()},Q=function(){var b,d;t.hide();if(f.is(":visible")&&false===c.onCleanup(l,p,c)){a.event.trigger("fancybox-cancel");i=false}else{i=true;a(h.add(u)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");f.is(":visible")&&
25
+ c.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;c=e;if(c.overlayShow){u.css({"background-color":c.overlayColor,opacity:c.overlayOpacity,cursor:c.hideOnOverlayClick?"pointer":"auto",height:a(document).height()});if(!u.is(":visible")){M&&a("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();h.get(0).scrollTop=0;h.get(0).scrollLeft=
26
+ 0;j=X();s=c.title||"";y=0;n.empty().removeAttr("style").removeClass();if(c.titleShow!==false){if(a.isFunction(c.titleFormat))b=c.titleFormat(s,l,p,c);else b=s&&s.length?c.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+c.titlePosition+'">'+s+"</div>":false;s=b;if(!(!s||s==="")){n.addClass("fancybox-title-"+
27
+ c.titlePosition).html(s).appendTo("body").show();switch(c.titlePosition){case "inside":n.css({width:j.width-c.padding*2,marginLeft:c.padding,marginRight:c.padding});y=n.outerHeight(true);n.appendTo(D);j.height+=y;break;case "over":n.css({marginLeft:c.padding,width:j.width-c.padding*2,bottom:c.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-j.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:j.width-c.padding*2,paddingLeft:c.padding,paddingRight:c.padding}).appendTo(f)}}}n.hide();
28
+ if(f.is(":visible")){a(E.add(z).add(A)).hide();b=f.position();r={top:b.top,left:b.left,width:f.width(),height:f.height()};d=r.width==j.width&&r.height==j.height;h.fadeTo(c.changeFade,0.3,function(){var g=function(){h.html(m.contents()).fadeTo(c.changeFade,1,R)};a.event.trigger("fancybox-change");h.empty().removeAttr("filter").css({"border-width":c.padding,width:j.width-c.padding*2,height:c.type=="image"||c.type=="swf"||c.type=="iframe"?j.height-y-c.padding*2:"auto"});if(d)g();else{B.prop=0;a(B).animate({prop:1},
29
+ {duration:c.changeSpeed,easing:c.easingChange,step:S,complete:g})}})}else{f.removeAttr("style");h.css("border-width",c.padding);if(c.transitionIn=="elastic"){r=V();h.html(m.contents());f.show();if(c.opacity)j.opacity=0;B.prop=0;a(B).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:S,complete:R})}else{c.titlePosition=="inside"&&y>0&&n.show();h.css({width:j.width-c.padding*2,height:c.type=="image"||c.type=="swf"||c.type=="iframe"?j.height-y-c.padding*2:"auto"}).html(m.contents());f.css(j).fadeIn(c.transitionIn==
30
+ "none"?0:c.fadeIn,R)}}}},Y=function(){if(c.enableEscapeButton||c.enableKeyboardNav)a(document).bind("keydown.fb",function(b){if(b.keyCode==27&&c.enableEscapeButton){b.preventDefault();a.fancybox.close()}else if((b.keyCode==37||b.keyCode==39)&&c.enableKeyboardNav&&b.target.tagName!=="INPUT"&&b.target.tagName!=="TEXTAREA"&&b.target.tagName!=="SELECT"){b.preventDefault();a.fancybox[b.keyCode==37?"prev":"next"]()}});if(c.showNavArrows){if(c.cyclic&&l.length>1||p!==0)z.show();if(c.cyclic&&l.length>1||
31
+ p!=l.length-1)A.show()}else{z.hide();A.hide()}},R=function(){if(!a.support.opacity){h.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}f.css("height","auto");c.type!=="image"&&c.type!=="swf"&&c.type!=="iframe"&&h.css("height","auto");s&&s.length&&n.show();c.showCloseButton&&E.show();Y();c.hideOnContentClick&&h.bind("click",a.fancybox.close);c.hideOnOverlayClick&&u.bind("click",a.fancybox.close);a(window).bind("resize.fb",a.fancybox.resize);c.centerOnScroll&&a(window).bind("scroll.fb",
32
+ a.fancybox.center);if(c.type=="iframe")a('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(a.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+c.href+'"></iframe>').appendTo(h);f.show();i=false;a.fancybox.center();c.onComplete(l,p,c);var b,d;if(l.length-1>p){b=l[p+1].href;if(typeof b!=="undefined"&&b.match(J)){d=new Image;d.src=b}}if(p>0){b=l[p-1].href;if(typeof b!=="undefined"&&b.match(J)){d=new Image;d.src=b}}},
33
+ S=function(b){var d={width:parseInt(r.width+(j.width-r.width)*b,10),height:parseInt(r.height+(j.height-r.height)*b,10),top:parseInt(r.top+(j.top-r.top)*b,10),left:parseInt(r.left+(j.left-r.left)*b,10)};if(typeof j.opacity!=="undefined")d.opacity=b<0.5?0.5:b;f.css(d);h.css({width:d.width-c.padding*2,height:d.height-y*b-c.padding*2})},T=function(){return[a(window).width()-c.margin*2,a(window).height()-c.margin*2,a(document).scrollLeft()+c.margin,a(document).scrollTop()+c.margin]},X=function(){var b=
34
+ T(),d={},g=c.autoScale,k=c.padding*2;d.width=c.width.toString().indexOf("%")>-1?parseInt(b[0]*parseFloat(c.width)/100,10):c.width+k;d.height=c.height.toString().indexOf("%")>-1?parseInt(b[1]*parseFloat(c.height)/100,10):c.height+k;if(g&&(d.width>b[0]||d.height>b[1]))if(e.type=="image"||e.type=="swf"){g=c.width/c.height;if(d.width>b[0]){d.width=b[0];d.height=parseInt((d.width-k)/g+k,10)}if(d.height>b[1]){d.height=b[1];d.width=parseInt((d.height-k)*g+k,10)}}else{d.width=Math.min(d.width,b[0]);d.height=
35
+ Math.min(d.height,b[1])}d.top=parseInt(Math.max(b[3]-20,b[3]+(b[1]-d.height-40)*0.5),10);d.left=parseInt(Math.max(b[2]-20,b[2]+(b[0]-d.width-40)*0.5),10);return d},V=function(){var b=e.orig?a(e.orig):false,d={};if(b&&b.length){d=b.offset();d.top+=parseInt(b.css("paddingTop"),10)||0;d.left+=parseInt(b.css("paddingLeft"),10)||0;d.top+=parseInt(b.css("border-top-width"),10)||0;d.left+=parseInt(b.css("border-left-width"),10)||0;d.width=b.width();d.height=b.height();d={width:d.width+c.padding*2,height:d.height+
36
+ c.padding*2,top:d.top-c.padding-20,left:d.left-c.padding-20}}else{b=T();d={width:c.padding*2,height:c.padding*2,top:parseInt(b[3]+b[1]*0.5,10),left:parseInt(b[2]+b[0]*0.5,10)}}return d},Z=function(){if(t.is(":visible")){a("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};a.fn.fancybox=function(b){if(!a(this).length)return this;a(this).data("fancybox",a.extend({},b,a.metadata?a(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!i){i=true;a(this).blur();
37
+ o=[];q=0;d=a(this).attr("rel")||"";if(!d||d==""||d==="nofollow")o.push(this);else{o=a("a[rel="+d+"], area[rel="+d+"]");q=o.index(this)}H()}});return this};a.fancybox=function(b,d){var g;if(!i){i=true;g=typeof d!=="undefined"?d:{};o=[];q=parseInt(g.index,10)||0;if(a.isArray(b)){for(var k=0,C=b.length;k<C;k++)if(typeof b[k]=="object")a(b[k]).data("fancybox",a.extend({},g,b[k]));else b[k]=a({}).data("fancybox",a.extend({content:b[k]},g));o=jQuery.merge(o,b)}else{if(typeof b=="object")a(b).data("fancybox",
38
+ a.extend({},g,b));else b=a({}).data("fancybox",a.extend({content:b},g));o.push(b)}if(q>o.length||q<0)q=0;H()}};a.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};a.fancybox.hideActivity=function(){t.hide()};a.fancybox.next=function(){return a.fancybox.pos(p+1)};a.fancybox.prev=function(){return a.fancybox.pos(p-1)};a.fancybox.pos=function(b){if(!i){b=parseInt(b);o=l;if(b>-1&&b<l.length){q=b;H()}else if(c.cyclic&&l.length>1){q=b>=l.length?0:l.length-1;H()}}};a.fancybox.cancel=
39
+ function(){if(!i){i=true;a.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);i=false}};a.fancybox.close=function(){function b(){u.fadeOut("fast");n.empty().hide();f.hide();a.event.trigger("fancybox-cleanup");h.empty();c.onClosed(l,p,c);l=e=[];p=q=0;c=e={};i=false}if(!(i||f.is(":hidden"))){i=true;if(c&&false===c.onCleanup(l,p,c))i=false;else{N();a(E.add(z).add(A)).hide();a(h.add(u)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");h.find("iframe").attr("src",M&&
40
+ /^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");c.titlePosition!=="inside"&&n.empty();f.stop();if(c.transitionOut=="elastic"){r=V();var d=f.position();j={top:d.top,left:d.left,width:f.width(),height:f.height()};if(c.opacity)j.opacity=1;n.empty().hide();B.prop=1;a(B).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,step:S,complete:b})}else f.fadeOut(c.transitionOut=="none"?0:c.speedOut,b)}}};a.fancybox.resize=function(){u.is(":visible")&&u.css("height",a(document).height());
41
+ a.fancybox.center(true)};a.fancybox.center=function(b){var d,g;if(!i){g=b===true?1:0;d=T();!g&&(f.width()>d[0]||f.height()>d[1])||f.stop().animate({top:parseInt(Math.max(d[3]-20,d[3]+(d[1]-h.height()-40)*0.5-c.padding)),left:parseInt(Math.max(d[2]-20,d[2]+(d[0]-h.width()-40)*0.5-c.padding))},typeof b=="number"?b:200)}};a.fancybox.init=function(){if(!a("#fancybox-wrap").length){a("body").append(m=a('<div id="fancybox-tmp"></div>'),t=a('<div id="fancybox-loading"><div></div></div>'),u=a('<div id="fancybox-overlay"></div>'),
42
+ f=a('<div id="fancybox-wrap"></div>'));D=a('<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(f);
43
+ D.append(h=a('<div id="fancybox-content"></div>'),E=a('<a id="fancybox-close"></a>'),n=a('<div id="fancybox-title"></div>'),z=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(a.fancybox.close);t.click(a.fancybox.cancel);z.click(function(b){b.preventDefault();a.fancybox.prev()});A.click(function(b){b.preventDefault();a.fancybox.next()});
44
+ a.fn.mousewheel&&f.bind("mousewheel.fb",function(b,d){b.preventDefault();a.fancybox[d>0?"prev":"next"]()});a.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");a('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};a.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,
45
+ scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,
46
+ enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};a(document).ready(function(){a.fancybox.init()})})(jQuery);
fancybox/jquery.mousewheel-3.0.4.pack.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2
+ * Licensed under the MIT License (LICENSE.txt).
3
+ *
4
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
7
+ *
8
+ * Version: 3.0.4
9
+ *
10
+ * Requires: 1.2.2+
11
+ */
12
+
13
+ (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
14
+ f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
jquery.fancybox.css.php CHANGED
@@ -14,8 +14,9 @@ $url = dirname($_SERVER['SCRIPT_NAME']);
14
  * Examples and documentation at: http://fancybox.net
15
  *
16
  * Copyright (c) 2008 - 2010 Janis Skarnelis
17
- *
18
- * Version: 1.3.1 (05/03/2010)
 
19
  * Requires: jQuery v1.3+
20
  *
21
  * Dual licensed under the MIT and GPL licenses:
@@ -23,8 +24,42 @@ $url = dirname($_SERVER['SCRIPT_NAME']);
23
  * http://www.gnu.org/licenses/gpl.html
24
  */
25
 
26
- #fancybox-loading{position:fixed;top:50%;left:50%;height:40px;width:40px;margin-top: -20px;margin-left: -20px;cursor: pointer;overflow: hidden;z-index:1104;display: none;}* html #fancybox-loading{position:absolute;margin-top:0;}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image: url('fancybox.png');}#fancybox-overlay{position:fixed;top:0;left:0;bottom:0;right:0;background:#000;z-index:1100;display: none;}* html #fancybox-overlay{position:absolute;width:100%;}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display: none;}#fancybox-wrap{position:absolute;top:0;left:0;margin:0;padding:20px;z-index:1101;display: none;}#fancybox-outer{position: relative;width:100%;height:100%;background:#FFF;}#fancybox-inner{position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;outline: none;overflow: hidden;}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background: transparent;}#fancybox-close{position:absolute;top: -15px;right: -15px;width:30px;height:30px;background-image: url('fancybox.png');background-position: -40px 0px;cursor: pointer;z-index:1103;display: none;}#fancybox_error{color:#444;font: normal 12px/20px Arial;padding:7px;margin:0;}#fancybox-content{height:auto;width:auto;padding:0;margin:0;}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border: none;outline: none;line-height:0;vertical-align: top;-ms-interpolation-mode:bicubic;}#fancybox-frame{position: relative;width:100%;height:100%;border: none;display:block;}#fancybox-title{position:absolute;bottom:0;left:0;font-family:Arial;font-size:12px;z-index:1102;}.fancybox-title-inside{padding:10px 0;text-align:center;color:#333;}.fancybox-title-outside{padding-top:5px;color:#FFF;text-align:center;font-weight:bold;}.fancybox-title-over{color:#FFF;text-align: left;}#fancybox-title-over{padding:10px;background-image: url('fancy_title_over.png');display:block;}#fancybox-title-wrap{display: inline-block;}#fancybox-title-wrap span{height:32px;float: left;}#fancybox-title-left{padding-left:15px;background-image: url('fancybox.png');background-position: -40px -90px;background-repeat: no-repeat;}#fancybox-title-main{font-weight:bold;line-height:29px;background-image: url('fancybox-x.png');background-position:0px -40px;color:#FFF;}#fancybox-title-right{padding-left:15px;background-image: url('fancybox.png');background-position: -55px -90px;background-repeat: no-repeat;}#fancybox-left,#fancybox-right{position:absolute;bottom:0px;height:100%;width:35%;cursor: pointer;outline: none;background-image: url('blank.gif');z-index:1102;display: none;}#fancybox-left{left:0px;}#fancybox-right{right:0px;}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left: -9999px;width:30px;height:30px;margin-top: -15px;cursor: pointer;z-index:1102;display:block;}#fancybox-left-ico{background-image: url('fancybox.png');background-position: -40px -30px;}#fancybox-right-ico{background-image: url('fancybox.png');background-position: -40px -60px;}#fancybox-left:hover,#fancybox-right:hover{visibility: visible;}#fancybox-left:hover span{left:20px;}#fancybox-right:hover span{left:auto;right:20px;}.fancy-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001;}#fancy-bg-n{top: -20px;left:0;width:100%;background-image: url('fancybox-x.png');}#fancy-bg-ne{top: -20px;right: -20px;background-image: url('fancybox.png');background-position: -40px -162px;}#fancy-bg-e{top:0;right: -20px;height:100%;background-image: url('fancybox-y.png');background-position: -20px 0px;}#fancy-bg-se{bottom: -20px;right: -20px;background-image: url('fancybox.png');background-position: -40px -182px;}#fancy-bg-s{bottom: -20px;left:0;width:100%;background-image: url('fancybox-x.png');background-position:0px -20px;}#fancy-bg-sw{bottom: -20px;left: -20px;background-image: url('fancybox.png');background-position: -40px -142px;}#fancy-bg-w{top:0;left: -20px;height:100%;background-image: url('fancybox-y.png');}#fancy-bg-nw{top: -20px;left: -20px;background-image: url('fancybox.png');background-position: -40px -122px;}
27
 
28
  /* IE -- adapted for Easy Fancybox plugin for WordPress */
29
 
30
- #fancybox-loading.fancybox-ie div{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_loading.png',sizingMethod='scale');}.fancybox-ie #fancybox-close{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_close.png',sizingMethod='scale');}.fancybox-ie #fancybox-title-over{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_title_over.png',sizingMethod='scale');zoom:1;}.fancybox-ie #fancybox-title-left{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_title_left.png',sizingMethod='scale');}.fancybox-ie #fancybox-title-main{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_title_main.png',sizingMethod='scale');}.fancybox-ie #fancybox-title-right{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_title_right.png',sizingMethod='scale');}.fancybox-ie #fancybox-left-ico{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_nav_left.png',sizingMethod='scale');}.fancybox-ie #fancybox-right-ico{ background: transparent;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_nav_right.png',sizingMethod='scale');}.fancybox-ie .fancy-bg{background: transparent !important;}.fancybox-ie #fancy-bg-n{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_n.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-ne{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_ne.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-e{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_e.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-se{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_se.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-s{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_s.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-sw{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_sw.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-w{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_w.png',sizingMethod='scale');}.fancybox-ie #fancy-bg-nw{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancy_shadow_nw.png',sizingMethod='scale');}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  * Examples and documentation at: http://fancybox.net
15
  *
16
  * Copyright (c) 2008 - 2010 Janis Skarnelis
17
+ * 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.
18
+ *
19
+ * Version: 1.3.2 (20/10/2010)
20
  * Requires: jQuery v1.3+
21
  *
22
  * Dual licensed under the MIT and GPL licenses:
24
  * http://www.gnu.org/licenses/gpl.html
25
  */
26
 
27
+ #fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:1104;display:none}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url('fancybox/fancybox.png')}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:1101;outline:none;display:none}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff}#fancybox-content{width:0;height:0;padding:0;outline:none;position:relative;overflow:hidden;z-index:1102;border:0px solid #fff}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:1101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:transparent url('fancybox/fancybox.png') -40px 0px;cursor:pointer;z-index:1103;display:none}#fancybox-error{color:#444;font:normal 12px/20px Arial;padding:14px;margin:0}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:none;line-height:0;vertical-align:top}#fancybox-frame{width:100%;height:100%;border:none;display:block}#fancybox-left,#fancybox-right{position:absolute;bottom:0px;height:100%;width:35%;cursor:pointer;outline:none;background:transparent url('fancybox/blank.gif');z-index:1102;display:none}#fancybox-left{left:0px}#fancybox-right{right:0px}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:1102;display:block}#fancybox-left-ico{background-image:url('fancybox/fancybox.png');background-position:-40px -30px}#fancybox-right-ico{background-image:url('fancybox/fancybox.png');background-position:-40px -60px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}#fancybox-right:hover span{left:auto;right:20px}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:1001}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url('fancybox/fancybox-x.png')}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url('fancybox/fancybox.png');background-position:-40px -162px}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url('fancybox/fancybox-y.png');background-position:-20px 0px}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url('fancybox/fancybox.png');background-position:-40px -182px}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url('fancybox/fancybox-x.png');background-position:0px -20px}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url('fancybox/fancybox.png');background-position:-40px -142px}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url('fancybox/fancybox-y.png')}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url('fancybox/fancybox.png');background-position:-40px -122px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:1102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;background:#fff;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}#fancybox-title-over{padding:10px;background-image:url('fancybox/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{white-space:nowrap}#fancybox-title-float-left{padding-left:15px;background:url('fancybox/fancybox.png') -40px -90px no-repeat}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:bold;padding-bottom:3px;background:url('fancybox/fancybox-x.png') 0px -40px}#fancybox-title-float-right{padding-left:15px;background:url('fancybox/fancybox.png') -55px -90px no-repeat}
28
 
29
  /* IE -- adapted for Easy Fancybox plugin for WordPress */
30
 
31
+ /* IE6 */
32
+
33
+ .fancybox-ie6 #fancybox-close{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_close.png', sizingMethod='scale'); }
34
+
35
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_nav_left.png', sizingMethod='scale'); }
36
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_nav_right.png', sizingMethod='scale'); }
37
+
38
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
39
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_title_left.png', sizingMethod='scale'); }
40
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_title_main.png', sizingMethod='scale'); }
41
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_title_right.png', sizingMethod='scale'); }
42
+
43
+ .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
44
+ height: expression(this.parentNode.clientHeight + "px");
45
+ }
46
+
47
+ #fancybox-loading.fancybox-ie6 {
48
+ position: absolute; margin-top: 0;
49
+ top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
50
+ }
51
+
52
+ #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_loading.png', sizingMethod='scale'); }
53
+
54
+ /* IE6, IE7, IE8 */
55
+
56
+ .fancybox-ie .fancybox-bg { background: transparent !important; }
57
+
58
+ .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
59
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
60
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
61
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
62
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
63
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
64
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
65
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $url ?>/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
jquery.fancybox.js DELETED
@@ -1,1077 +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
- *
9
- * Version: 1.3.1 (05/03/2010)
10
- * Requires: jQuery v1.3+
11
- *
12
- * Dual licensed under the MIT and GPL licenses:
13
- * http://www.opensource.org/licenses/mit-license.php
14
- * http://www.gnu.org/licenses/gpl.html
15
- */
16
-
17
- (function($) {
18
-
19
- var tmp, loading, overlay, wrap, outer, inner, close, nav_left, nav_right,
20
-
21
- selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
22
-
23
- ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
24
-
25
- loadingTimer, loadingFrame = 1,
26
-
27
- start_pos, final_pos, busy = false, shadow = 20, fx = $.extend($('<div/>')[0], { prop: 0 }), titleh = 0,
28
-
29
- isIE6 = !$.support.opacity && !window.XMLHttpRequest,
30
-
31
- /*
32
- * Private methods
33
- */
34
-
35
- fancybox_abort = function() {
36
- loading.hide();
37
-
38
- imgPreloader.onerror = imgPreloader.onload = null;
39
-
40
- if (ajaxLoader) {
41
- ajaxLoader.abort();
42
- }
43
-
44
- tmp.empty();
45
- },
46
-
47
- fancybox_error = function() {
48
- $.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>', {
49
- 'scrolling' : 'no',
50
- 'padding' : 20,
51
- 'transitionIn' : 'none',
52
- 'transitionOut' : 'none'
53
- });
54
- },
55
-
56
- fancybox_get_viewport = function() {
57
- return [ $(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ];
58
- },
59
-
60
- fancybox_get_zoom_to = function () {
61
- var view = fancybox_get_viewport(),
62
- to = {},
63
-
64
- margin = currentOpts.margin,
65
- resize = currentOpts.autoScale,
66
-
67
- horizontal_space = (shadow + margin) * 2,
68
- vertical_space = (shadow + margin) * 2,
69
- double_padding = (currentOpts.padding * 2),
70
-
71
- ratio;
72
-
73
- if (currentOpts.width.toString().indexOf('%') > -1) {
74
- to.width = ((view[0] * parseFloat(currentOpts.width)) / 100) - (shadow * 2) ;
75
- resize = false;
76
-
77
- } else {
78
- to.width = currentOpts.width + double_padding;
79
- }
80
-
81
- if (currentOpts.height.toString().indexOf('%') > -1) {
82
- to.height = ((view[1] * parseFloat(currentOpts.height)) / 100) - (shadow * 2);
83
- resize = false;
84
-
85
- } else {
86
- to.height = currentOpts.height + double_padding;
87
- }
88
-
89
- if (resize && (to.width > (view[0] - horizontal_space) || to.height > (view[1] - vertical_space))) {
90
- if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
91
- horizontal_space += double_padding;
92
- vertical_space += double_padding;
93
-
94
- ratio = Math.min(Math.min( view[0] - horizontal_space, currentOpts.width) / currentOpts.width, Math.min( view[1] - vertical_space, currentOpts.height) / currentOpts.height);
95
-
96
- to.width = Math.round(ratio * (to.width - double_padding)) + double_padding;
97
- to.height = Math.round(ratio * (to.height - double_padding)) + double_padding;
98
-
99
- } else {
100
- to.width = Math.min(to.width, (view[0] - horizontal_space));
101
- to.height = Math.min(to.height, (view[1] - vertical_space));
102
- }
103
- }
104
-
105
- to.top = view[3] + ((view[1] - (to.height + (shadow * 2 ))) * 0.5);
106
- to.left = view[2] + ((view[0] - (to.width + (shadow * 2 ))) * 0.5);
107
-
108
- if (currentOpts.autoScale === false) {
109
- to.top = Math.max(view[3] + margin, to.top);
110
- to.left = Math.max(view[2] + margin, to.left);
111
- }
112
-
113
- return to;
114
- },
115
-
116
- fancybox_format_title = function(title) {
117
- if (title && title.length) {
118
- switch (currentOpts.titlePosition) {
119
- case 'inside':
120
- return title;
121
- case 'over':
122
- return '<span id="fancybox-title-over">' + title + '</span>';
123
- default:
124
- return '<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">' + title + '</span><span id="fancybox-title-right"></span></span>';
125
- }
126
- }
127
-
128
- return false;
129
- },
130
-
131
- fancybox_process_title = function() {
132
- var title = currentOpts.title,
133
- width = final_pos.width - (currentOpts.padding * 2),
134
- titlec = 'fancybox-title-' + currentOpts.titlePosition;
135
-
136
- $('#fancybox-title').remove();
137
-
138
- titleh = 0;
139
-
140
- if (currentOpts.titleShow === false) {
141
- return;
142
- }
143
-
144
- title = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(title, currentArray, currentIndex, currentOpts) : fancybox_format_title(title);
145
-
146
- if (!title || title === '') {
147
- return;
148
- }
149
-
150
- $('<div id="fancybox-title" class="' + titlec + '" />').css({
151
- 'width' : width,
152
- 'paddingLeft' : currentOpts.padding,
153
- 'paddingRight' : currentOpts.padding
154
- }).html(title).appendTo('body');
155
-
156
- switch (currentOpts.titlePosition) {
157
- case 'inside':
158
- titleh = $("#fancybox-title").outerHeight(true) - currentOpts.padding;
159
- final_pos.height += titleh;
160
- break;
161
-
162
- case 'over':
163
- $('#fancybox-title').css('bottom', currentOpts.padding);
164
- break;
165
-
166
- default:
167
- $('#fancybox-title').css('bottom', $("#fancybox-title").outerHeight(true) * -1);
168
- break;
169
- }
170
-
171
- $('#fancybox-title').appendTo( outer ).hide();
172
- },
173
-
174
- fancybox_set_navigation = function() {
175
- $(document).unbind('keydown.fb').bind('keydown.fb', function(e) {
176
- if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
177
- e.preventDefault();
178
- $.fancybox.close();
179
-
180
- } else if (e.keyCode == 37) {
181
- e.preventDefault();
182
- $.fancybox.prev();
183
-
184
- } else if (e.keyCode == 39) {
185
- e.preventDefault();
186
- $.fancybox.next();
187
- }
188
- });
189
-
190
- if ($.fn.mousewheel) {
191
- wrap.unbind('mousewheel.fb');
192
-
193
- if (currentArray.length > 1) {
194
- wrap.bind('mousewheel.fb', function(e, delta) {
195
- e.preventDefault();
196
-
197
- if (busy || delta === 0) {
198
- return;
199
- }
200
-
201
- if (delta > 0) {
202
- $.fancybox.prev();
203
- } else {
204
- $.fancybox.next();
205
- }
206
- });
207
- }
208
- }
209
-
210
- if (!currentOpts.showNavArrows) { return; }
211
-
212
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
213
- nav_left.show();
214
- }
215
-
216
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
217
- nav_right.show();
218
- }
219
- },
220
-
221
- fancybox_preload_images = function() {
222
- var href,
223
- objNext;
224
-
225
- if ((currentArray.length -1) > currentIndex) {
226
- href = currentArray[ currentIndex + 1 ].href;
227
-
228
- if (typeof href !== 'undefined' && href.match(imgRegExp)) {
229
- objNext = new Image();
230
- objNext.src = href;
231
- }
232
- }
233
-
234
- if (currentIndex > 0) {
235
- href = currentArray[ currentIndex - 1 ].href;
236
-
237
- if (typeof href !== 'undefined' && href.match(imgRegExp)) {
238
- objNext = new Image();
239
- objNext.src = href;
240
- }
241
- }
242
- },
243
-
244
- _finish = function () {
245
- inner.css('overflow', (currentOpts.scrolling == 'auto' ? (currentOpts.type == 'image' || currentOpts.type == 'iframe' || currentOpts.type == 'swf' ? 'hidden' : 'auto') : (currentOpts.scrolling == 'yes' ? 'auto' : 'visible')));
246
-
247
- if (!$.support.opacity) {
248
- inner.get(0).style.removeAttribute('filter');
249
- wrap.get(0).style.removeAttribute('filter');
250
- }
251
-
252
- $('#fancybox-title').show();
253
-
254
- if (currentOpts.hideOnContentClick) {
255
- inner.one('click', $.fancybox.close);
256
- }
257
- if (currentOpts.hideOnOverlayClick) {
258
- overlay.one('click', $.fancybox.close);
259
- }
260
-
261
- if (currentOpts.showCloseButton) {
262
- close.show();
263
- }
264
-
265
- fancybox_set_navigation();
266
-
267
- $(window).bind("resize.fb", $.fancybox.center);
268
-
269
- if (currentOpts.centerOnScroll) {
270
- $(window).bind("scroll.fb", $.fancybox.center);
271
- } else {
272
- $(window).unbind("scroll.fb");
273
- }
274
-
275
- if ($.isFunction(currentOpts.onComplete)) {
276
- currentOpts.onComplete(currentArray, currentIndex, currentOpts);
277
- }
278
-
279
- busy = false;
280
-
281
- fancybox_preload_images();
282
- },
283
-
284
- fancybox_draw = function(pos) {
285
- var width = Math.round(start_pos.width + (final_pos.width - start_pos.width) * pos),
286
- height = Math.round(start_pos.height + (final_pos.height - start_pos.height) * pos),
287
-
288
- top = Math.round(start_pos.top + (final_pos.top - start_pos.top) * pos),
289
- left = Math.round(start_pos.left + (final_pos.left - start_pos.left) * pos);
290
-
291
- wrap.css({
292
- 'width' : width + 'px',
293
- 'height' : height + 'px',
294
- 'top' : top + 'px',
295
- 'left' : left + 'px'
296
- });
297
-
298
- width = Math.max(width - currentOpts.padding * 2, 0);
299
- height = Math.max(height - (currentOpts.padding * 2 + (titleh * pos)), 0);
300
-
301
- inner.css({
302
- 'width' : width + 'px',
303
- 'height' : height + 'px'
304
- });
305
-
306
- if (typeof final_pos.opacity !== 'undefined') {
307
- wrap.css('opacity', (pos < 0.5 ? 0.5 : pos));
308
- }
309
- },
310
-
311
- fancybox_get_obj_pos = function(obj) {
312
- var pos = obj.offset();
313
-
314
- pos.top += parseFloat( obj.css('paddingTop') ) || 0;
315
- pos.left += parseFloat( obj.css('paddingLeft') ) || 0;
316
-
317
- pos.top += parseFloat( obj.css('border-top-width') ) || 0;
318
- pos.left += parseFloat( obj.css('border-left-width') ) || 0;
319
-
320
- pos.width = obj.width();
321
- pos.height = obj.height();
322
-
323
- return pos;
324
- },
325
-
326
- fancybox_get_zoom_from = function() {
327
- var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
328
- from = {},
329
- pos,
330
- view;
331
-
332
- if (orig && orig.length) {
333
- pos = fancybox_get_obj_pos(orig);
334
-
335
- from = {
336
- width : (pos.width + (currentOpts.padding * 2)),
337
- height : (pos.height + (currentOpts.padding * 2)),
338
- top : (pos.top - currentOpts.padding - shadow),
339
- left : (pos.left - currentOpts.padding - shadow)
340
- };
341
-
342
- } else {
343
- view = fancybox_get_viewport();
344
-
345
- from = {
346
- width : 1,
347
- height : 1,
348
- top : view[3] + view[1] * 0.5,
349
- left : view[2] + view[0] * 0.5
350
- };
351
- }
352
-
353
- return from;
354
- },
355
-
356
- fancybox_show = function() {
357
- loading.hide();
358
-
359
- if (wrap.is(":visible") && $.isFunction(currentOpts.onCleanup)) {
360
- if (currentOpts.onCleanup(currentArray, currentIndex, currentOpts) === false) {
361
- $.event.trigger('fancybox-cancel');
362
-
363
- busy = false;
364
- return;
365
- }
366
- }
367
-
368
- currentArray = selectedArray;
369
- currentIndex = selectedIndex;
370
- currentOpts = selectedOpts;
371
-
372
- inner.get(0).scrollTop = 0;
373
- inner.get(0).scrollLeft = 0;
374
-
375
- if (currentOpts.overlayShow) {
376
- if (isIE6) {
377
- $('select:not(#fancybox-tmp select)').filter(function() {
378
- return this.style.visibility !== 'hidden';
379
- }).css({'visibility':'hidden'}).one('fancybox-cleanup', function() {
380
- this.style.visibility = 'inherit';
381
- });
382
- }
383
-
384
- overlay.css({
385
- 'background-color' : currentOpts.overlayColor,
386
- 'opacity' : currentOpts.overlayOpacity
387
- }).unbind().show();
388
- }
389
-
390
- final_pos = fancybox_get_zoom_to();
391
-
392
- fancybox_process_title();
393
-
394
- if (wrap.is(":visible")) {
395
- $( close.add( nav_left ).add( nav_right ) ).hide();
396
-
397
- var pos = wrap.position(),
398
- equal;
399
-
400
- start_pos = {
401
- top : pos.top ,
402
- left : pos.left,
403
- width : wrap.width(),
404
- height : wrap.height()
405
- };
406
-
407
- equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
408
-
409
- inner.fadeOut(currentOpts.changeFade, function() {
410
- var finish_resizing = function() {
411
- inner.html( tmp.contents() ).fadeIn(currentOpts.changeFade, _finish);
412
- };
413
-
414
- $.event.trigger('fancybox-change');
415
-
416
- inner.empty().css('overflow', 'hidden');
417
-
418
- if (equal) {
419
- inner.css({
420
- top : currentOpts.padding,
421
- left : currentOpts.padding,
422
- width : Math.max(final_pos.width - (currentOpts.padding * 2), 1),
423
- height : Math.max(final_pos.height - (currentOpts.padding * 2) - titleh, 1)
424
- });
425
-
426
- finish_resizing();
427
-
428
- } else {
429
- inner.css({
430
- top : currentOpts.padding,
431
- left : currentOpts.padding,
432
- width : Math.max(start_pos.width - (currentOpts.padding * 2), 1),
433
- height : Math.max(start_pos.height - (currentOpts.padding * 2), 1)
434
- });
435
-
436
- fx.prop = 0;
437
-
438
- $(fx).animate({ prop: 1 }, {
439
- duration : currentOpts.changeSpeed,
440
- easing : currentOpts.easingChange,
441
- step : fancybox_draw,
442
- complete : finish_resizing
443
- });
444
- }
445
- });
446
-
447
- return;
448
- }
449
-
450
- wrap.css('opacity', 1);
451
-
452
- if (currentOpts.transitionIn == 'elastic') {
453
- start_pos = fancybox_get_zoom_from();
454
-
455
- inner.css({
456
- top : currentOpts.padding,
457
- left : currentOpts.padding,
458
- width : Math.max(start_pos.width - (currentOpts.padding * 2), 1),
459
- height : Math.max(start_pos.height - (currentOpts.padding * 2), 1)
460
- })
461
- .html( tmp.contents() );
462
-
463
- wrap.css(start_pos).show();
464
-
465
- if (currentOpts.opacity) {
466
- final_pos.opacity = 0;
467
- }
468
-
469
- fx.prop = 0;
470
-
471
- $(fx).animate({ prop: 1 }, {
472
- duration : currentOpts.speedIn,
473
- easing : currentOpts.easingIn,
474
- step : fancybox_draw,
475
- complete : _finish
476
- });
477
-
478
- } else {
479
- inner.css({
480
- top : currentOpts.padding,
481
- left : currentOpts.padding,
482
- width : Math.max(final_pos.width - (currentOpts.padding * 2), 1),
483
- height : Math.max(final_pos.height - (currentOpts.padding * 2) - titleh, 1)
484
- })
485
- .html( tmp.contents() );
486
-
487
- wrap.css( final_pos ).fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
488
- }
489
- },
490
-
491
- fancybox_process_inline = function() {
492
- tmp.width( selectedOpts.width );
493
- tmp.height( selectedOpts.height );
494
-
495
- if (selectedOpts.width == 'auto') {
496
- selectedOpts.width = tmp.width();
497
- }
498
- if (selectedOpts.height == 'auto') {
499
- selectedOpts.height = tmp.height();
500
- }
501
-
502
- fancybox_show();
503
- },
504
-
505
- fancybox_process_image = function() {
506
- busy = true;
507
-
508
- selectedOpts.width = imgPreloader.width;
509
- selectedOpts.height = imgPreloader.height;
510
-
511
- $("<img />").attr({
512
- 'id' : 'fancybox-img',
513
- 'src' : imgPreloader.src,
514
- 'alt' : selectedOpts.title
515
- }).appendTo( tmp );
516
-
517
- fancybox_show();
518
- },
519
-
520
- fancybox_start = function() {
521
- fancybox_abort();
522
-
523
- var obj = selectedArray[ selectedIndex ],
524
- href,
525
- type,
526
- title,
527
- str,
528
- emb,
529
- selector,
530
- data;
531
-
532
- selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
533
- title = obj.title || $(obj).title || selectedOpts.title || '';
534
-
535
- if (obj.nodeName && !selectedOpts.orig) {
536
- selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
537
- }
538
-
539
- if (title === '' && selectedOpts.orig) {
540
- title = selectedOpts.orig.attr('alt');
541
- }
542
-
543
- if (obj.nodeName && (/^(?:javascript|#)/i).test(obj.href)) {
544
- href = selectedOpts.href || null;
545
- } else {
546
- href = selectedOpts.href || obj.href || null;
547
- }
548
-
549
- if (selectedOpts.type) {
550
- type = selectedOpts.type;
551
-
552
- if (!href) {
553
- href = selectedOpts.content;
554
- }
555
-
556
- } else if (selectedOpts.content) {
557
- type = 'html';
558
-
559
- } else if (href) {
560
- if (href.match(imgRegExp)) {
561
- type = 'image';
562
-
563
- } else if (href.match(swfRegExp)) {
564
- type = 'swf';
565
-
566
- } else if ($(obj).hasClass("iframe")) {
567
- type = 'iframe';
568
-
569
- } else if (href.match(/#/)) {
570
- obj = href.substr(href.indexOf("#"));
571
-
572
- type = $(obj).length > 0 ? 'inline' : 'ajax';
573
- } else {
574
- type = 'ajax';
575
- }
576
- } else {
577
- type = 'inline';
578
- }
579
-
580
- selectedOpts.type = type;
581
- selectedOpts.href = href;
582
- selectedOpts.title = title;
583
-
584
- if (selectedOpts.autoDimensions && selectedOpts.type !== 'iframe' && selectedOpts.type !== 'swf') {
585
- selectedOpts.width = 'auto';
586
- selectedOpts.height = 'auto';
587
- }
588
-
589
- if (selectedOpts.modal) {
590
- selectedOpts.overlayShow = true;
591
- selectedOpts.hideOnOverlayClick = false;
592
- selectedOpts.hideOnContentClick = false;
593
- selectedOpts.enableEscapeButton = false;
594
- selectedOpts.showCloseButton = false;
595
- }
596
-
597
- if ($.isFunction(selectedOpts.onStart)) {
598
- if (selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts) === false) {
599
- busy = false;
600
- return;
601
- }
602
- }
603
-
604
- tmp.css('padding', (shadow + selectedOpts.padding + selectedOpts.margin));
605
-
606
- $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
607
- $(this).replaceWith(inner.children());
608
- });
609
-
610
- switch (type) {
611
- case 'html' :
612
- tmp.html( selectedOpts.content );
613
- fancybox_process_inline();
614
- break;
615
-
616
- case 'inline' :
617
- $('<div class="fancybox-inline-tmp" />').hide().insertBefore( $(obj) ).bind('fancybox-cleanup', function() {
618
- $(this).replaceWith(inner.children());
619
- }).bind('fancybox-cancel', function() {
620
- $(this).replaceWith(tmp.children());
621
- });
622
-
623
- $(obj).appendTo(tmp);
624
-
625
- fancybox_process_inline();
626
- break;
627
-
628
- case 'image':
629
- busy = false;
630
-
631
- $.fancybox.showActivity();
632
-
633
- imgPreloader = new Image();
634
-
635
- imgPreloader.onerror = function() {
636
- fancybox_error();
637
- };
638
-
639
- imgPreloader.onload = function() {
640
- imgPreloader.onerror = null;
641
- imgPreloader.onload = null;
642
- fancybox_process_image();
643
- };
644
-
645
- imgPreloader.src = href;
646
-
647
- break;
648
-
649
- case 'swf':
650
- str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
651
- emb = '';
652
-
653
- $.each(selectedOpts.swf, function(name, val) {
654
- str += '<param name="' + name + '" value="' + val + '"></param>';
655
- emb += ' ' + name + '="' + val + '"';
656
- });
657
-
658
- str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
659
-
660
- tmp.html(str);
661
-
662
- fancybox_process_inline();
663
- break;
664
-
665
- case 'ajax':
666
- selector = href.split('#', 2);
667
- data = selectedOpts.ajax.data || {};
668
-
669
- if (selector.length > 1) {
670
- href = selector[0];
671
-
672
- if (typeof data == "string") {
673
- data += '&selector=' + selector[1];
674
- } else {
675
- data.selector = selector[1];
676
- }
677
- }
678
-
679
- busy = false;
680
- $.fancybox.showActivity();
681
-
682
- ajaxLoader = $.ajax($.extend(selectedOpts.ajax, {
683
- url : href,
684
- data : data,
685
- error : fancybox_error,
686
- success : function(data, textStatus, XMLHttpRequest) {
687
- if (ajaxLoader.status == 200) {
688
- tmp.html( data );
689
- fancybox_process_inline();
690
- }
691
- }
692
- }));
693
-
694
- break;
695
-
696
- case 'iframe' :
697
- $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" scrolling="' + selectedOpts.scrolling + '" src="' + selectedOpts.href + '"></iframe>').appendTo(tmp);
698
- fancybox_show();
699
- break;
700
- }
701
- },
702
-
703
- fancybox_animate_loading = function() {
704
- if (!loading.is(':visible')){
705
- clearInterval(loadingTimer);
706
- return;
707
- }
708
-
709
- $('div', loading).css('top', (loadingFrame * -40) + 'px');
710
-
711
- loadingFrame = (loadingFrame + 1) % 12;
712
- },
713
-
714
- fancybox_init = function() {
715
- if ($("#fancybox-wrap").length) {
716
- return;
717
- }
718
-
719
- $('body').append(
720
- tmp = $('<div id="fancybox-tmp"></div>'),
721
- loading = $('<div id="fancybox-loading"><div></div></div>'),
722
- overlay = $('<div id="fancybox-overlay"></div>'),
723
- wrap = $('<div id="fancybox-wrap"></div>')
724
- );
725
-
726
- if (!$.support.opacity) {
727
- wrap.addClass('fancybox-ie');
728
- loading.addClass('fancybox-ie');
729
- }
730
-
731
- outer = $('<div id="fancybox-outer"></div>')
732
- .append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>')
733
- .appendTo( wrap );
734
-
735
- outer.append(
736
- inner = $('<div id="fancybox-inner"></div>'),
737
- close = $('<a id="fancybox-close"></a>'),
738
-
739
- nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
740
- nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
741
- );
742
-
743
- close.click($.fancybox.close);
744
- loading.click($.fancybox.cancel);
745
-
746
- nav_left.click(function(e) {
747
- e.preventDefault();
748
- $.fancybox.prev();
749
- });
750
-
751
- nav_right.click(function(e) {
752
- e.preventDefault();
753
- $.fancybox.next();
754
- });
755
-
756
- if (isIE6) {
757
- overlay.get(0).style.setExpression('height', "document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");
758
- loading.get(0).style.setExpression('top', "(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");
759
-
760
- outer.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>');
761
- }
762
- };
763
-
764
- /*
765
- * Public methods
766
- */
767
-
768
- $.fn.fancybox = function(options) {
769
- $(this)
770
- .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
771
- .unbind('click.fb').bind('click.fb', function(e) {
772
- e.preventDefault();
773
-
774
- if (busy) {
775
- return;
776
- }
777
-
778
- busy = true;
779
-
780
- $(this).blur();
781
-
782
- selectedArray = [];
783
- selectedIndex = 0;
784
-
785
- var rel = $(this).attr('rel') || '';
786
-
787
- if (!rel || rel == '' || rel === 'nofollow') {
788
- selectedArray.push(this);
789
-
790
- } else {
791
- selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
792
- selectedIndex = selectedArray.index( this );
793
- }
794
-
795
- fancybox_start();
796
-
797
- return false;
798
- });
799
-
800
- return this;
801
- };
802
-
803
- $.fancybox = function(obj) {
804
- if (busy) {
805
- return;
806
- }
807
-
808
- busy = true;
809
-
810
- var opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
811
-
812
- selectedArray = [];
813
- selectedIndex = opts.index || 0;
814
-
815
- if ($.isArray(obj)) {
816
- for (var i = 0, j = obj.length; i < j; i++) {
817
- if (typeof obj[i] == 'object') {
818
- $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
819
- } else {
820
- obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
821
- }
822
- }
823
-
824
- selectedArray = jQuery.merge(selectedArray, obj);
825
-
826
- } else {
827
- if (typeof obj == 'object') {
828
- $(obj).data('fancybox', $.extend({}, opts, obj));
829
- } else {
830
- obj = $({}).data('fancybox', $.extend({content : obj}, opts));
831
- }
832
-
833
- selectedArray.push(obj);
834
- }
835
-
836
- if (selectedIndex > selectedArray.length || selectedIndex < 0) {
837
- selectedIndex = 0;
838
- }
839
-
840
- fancybox_start();
841
- };
842
-
843
- $.fancybox.showActivity = function() {
844
- clearInterval(loadingTimer);
845
-
846
- loading.show();
847
- loadingTimer = setInterval(fancybox_animate_loading, 66);
848
- };
849
-
850
- $.fancybox.hideActivity = function() {
851
- loading.hide();
852
- };
853
-
854
- $.fancybox.next = function() {
855
- return $.fancybox.pos( currentIndex + 1);
856
- };
857
-
858
- $.fancybox.prev = function() {
859
- return $.fancybox.pos( currentIndex - 1);
860
- };
861
-
862
- $.fancybox.pos = function(pos) {
863
- if (busy) {
864
- return;
865
- }
866
-
867
- pos = parseInt(pos, 10);
868
-
869
- if (pos > -1 && currentArray.length > pos) {
870
- selectedIndex = pos;
871
- fancybox_start();
872
- }
873
-
874
- if (currentOpts.cyclic && currentArray.length > 1 && pos < 0) {
875
- selectedIndex = currentArray.length - 1;
876
- fancybox_start();
877
- }
878
-
879
- if (currentOpts.cyclic && currentArray.length > 1 && pos >= currentArray.length) {
880
- selectedIndex = 0;
881
- fancybox_start();
882
- }
883
-
884
- return;
885
- };
886
-
887
- $.fancybox.cancel = function() {
888
- if (busy) {
889
- return;
890
- }
891
-
892
- busy = true;
893
-
894
- $.event.trigger('fancybox-cancel');
895
-
896
- fancybox_abort();
897
-
898
- if (selectedOpts && $.isFunction(selectedOpts.onCancel)) {
899
- selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
900
- }
901
-
902
- busy = false;
903
- };
904
-
905
- // Note: within an iframe use - parent.$.fancybox.close();
906
- $.fancybox.close = function() {
907
- if (busy || wrap.is(':hidden')) {
908
- return;
909
- }
910
-
911
- busy = true;
912
-
913
- if (currentOpts && $.isFunction(currentOpts.onCleanup)) {
914
- if (currentOpts.onCleanup(currentArray, currentIndex, currentOpts) === false) {
915
- busy = false;
916
- return;
917
- }
918
- }
919
-
920
- fancybox_abort();
921
-
922
- $(close.add( nav_left ).add( nav_right )).hide();
923
-
924
- $('#fancybox-title').remove();
925
-
926
- wrap.add(inner).add(overlay).unbind();
927
-
928
- $(window).unbind("resize.fb scroll.fb");
929
- $(document).unbind('keydown.fb');
930
-
931
- function _cleanup() {
932
- overlay.fadeOut('fast');
933
-
934
- wrap.hide();
935
-
936
- $.event.trigger('fancybox-cleanup');
937
-
938
- inner.empty();
939
-
940
- if ($.isFunction(currentOpts.onClosed)) {
941
- currentOpts.onClosed(currentArray, currentIndex, currentOpts);
942
- }
943
-
944
- currentArray = selectedOpts = [];
945
- currentIndex = selectedIndex = 0;
946
- currentOpts = selectedOpts = {};
947
-
948
- busy = false;
949
- }
950
-
951
- inner.css('overflow', 'hidden');
952
-
953
- if (currentOpts.transitionOut == 'elastic') {
954
- start_pos = fancybox_get_zoom_from();
955
-
956
- var pos = wrap.position();
957
-
958
- final_pos = {
959
- top : pos.top ,
960
- left : pos.left,
961
- width : wrap.width(),
962
- height : wrap.height()
963
- };
964
-
965
- if (currentOpts.opacity) {
966
- final_pos.opacity = 1;
967
- }
968
-
969
- fx.prop = 1;
970
-
971
- $(fx).animate({ prop: 0 }, {
972
- duration : currentOpts.speedOut,
973
- easing : currentOpts.easingOut,
974
- step : fancybox_draw,
975
- complete : _cleanup
976
- });
977
-
978
- } else {
979
- wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
980
- }
981
- };
982
-
983
- $.fancybox.resize = function() {
984
- var c, h;
985
-
986
- if (busy || wrap.is(':hidden')) {
987
- return;
988
- }
989
-
990
- busy = true;
991
-
992
- c = inner.wrapInner("<div style='overflow:auto'></div>").children();
993
- h = c.height();
994
-
995
- wrap.css({height: h + (currentOpts.padding * 2) + titleh});
996
- inner.css({height: h});
997
-
998
- c.replaceWith(c.children());
999
-
1000
- $.fancybox.center();
1001
- };
1002
-
1003
- $.fancybox.center = function() {
1004
- busy = true;
1005
-
1006
- var view = fancybox_get_viewport(),
1007
- margin = currentOpts.margin,
1008
- to = {};
1009
-
1010
- to.top = view[3] + ((view[1] - ((wrap.height() - titleh) + (shadow * 2 ))) * 0.5);
1011
- to.left = view[2] + ((view[0] - (wrap.width() + (shadow * 2 ))) * 0.5);
1012
-
1013
- to.top = Math.max(view[3] + margin, to.top);
1014
- to.left = Math.max(view[2] + margin, to.left);
1015
-
1016
- wrap.css(to);
1017
-
1018
- busy = false;
1019
- };
1020
-
1021
- $.fn.fancybox.defaults = {
1022
- padding : 10,
1023
- margin : 20,
1024
- opacity : false,
1025
- modal : false,
1026
- cyclic : false,
1027
- scrolling : 'auto', // 'auto', 'yes' or 'no'
1028
-
1029
- width : 560,
1030
- height : 340,
1031
-
1032
- autoScale : true,
1033
- autoDimensions : true,
1034
- centerOnScroll : false,
1035
-
1036
- ajax : {},
1037
- swf : { wmode: 'transparent' },
1038
-
1039
- hideOnOverlayClick : true,
1040
- hideOnContentClick : false,
1041
-
1042
- overlayShow : true,
1043
- overlayOpacity : 0.3,
1044
- overlayColor : '#666',
1045
-
1046
- titleShow : true,
1047
- titlePosition : 'outside', // 'outside', 'inside' or 'over'
1048
- titleFormat : null,
1049
-
1050
- transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1051
- transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1052
-
1053
- speedIn : 300,
1054
- speedOut : 300,
1055
-
1056
- changeSpeed : 300,
1057
- changeFade : 'fast',
1058
-
1059
- easingIn : 'swing',
1060
- easingOut : 'swing',
1061
-
1062
- showCloseButton : true,
1063
- showNavArrows : true,
1064
- enableEscapeButton : true,
1065
-
1066
- onStart : null,
1067
- onCancel : null,
1068
- onComplete : null,
1069
- onCleanup : null,
1070
- onClosed : null
1071
- };
1072
-
1073
- $(document).ready(function() {
1074
- fancybox_init();
1075
- });
1076
-
1077
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery.fancybox.pack.js DELETED
@@ -1,44 +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
- *
9
- * Version: 1.3.1 (05/03/2010)
10
- * Requires: jQuery v1.3+
11
- *
12
- * Dual licensed under the MIT and GPL licenses:
13
- * http://www.opensource.org/licenses/mit-license.php
14
- * http://www.gnu.org/licenses/gpl.html
15
- */
16
-
17
- (function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("<div/>")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},
18
- K=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]},T=function(){var a=K(),d={},f=c.margin,o=c.autoScale,t=(20+f)*2,w=(20+f)*2,r=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-40;o=false}else d.width=c.width+r;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-40;o=false}else d.height=c.height+r;if(o&&(d.width>a[0]-t||d.height>a[1]-w))if(e.type=="image"||e.type=="swf"){t+=r;
19
- w+=r;o=Math.min(Math.min(a[0]-t,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-r))+r;d.height=Math.round(o*(d.height-r))+r}else{d.width=Math.min(d.width,a[0]-t);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+40))*0.5;d.left=a[2]+(a[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d},U=function(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return'<span id="fancybox-title-over">'+
20
- a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var a=c.title,d=l.width-c.padding*2,f="fancybox-title-"+c.titlePosition;b("#fancybox-title").remove();v=0;if(c.titleShow!==false){a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):U(a);if(!(!a||a==="")){b('<div id="fancybox-title" class="'+f+'" />').css({width:d,paddingLeft:c.padding,
21
- paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":v=b("#fancybox-title").outerHeight(true)-c.padding;l.height+=v;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(D).hide()}}},W=function(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if(a.keyCode==
22
- 37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d===0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!==0)A.show();if(c.cyclic&&j.length>1||n!=j.length-1)B.show()}},X=function(){var a,d;if(j.length-1>n){a=j[n+1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}if(n>0){a=
23
- j[n-1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}},L=function(){i.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&x.one("click",b.fancybox.close);c.showCloseButton&&z.show();W();b(window).bind("resize.fb",
24
- b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;X()},M=function(a){var d=Math.round(k.width+(l.width-k.width)*a),f=Math.round(k.height+(l.height-k.height)*a),o=Math.round(k.top+(l.top-k.top)*a),t=Math.round(k.left+(l.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:t+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+v*a),0);i.css({width:d+"px",height:f+
25
- "px"});if(typeof l.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)},Y=function(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d},Q=function(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Y(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-20,left:a.left-c.padding-
26
- 20}}else{a=K();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d},N=function(){u.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=p;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){O&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});
27
- x.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}l=T();V();if(g.is(":visible")){b(z.add(A).add(B)).hide();var a=g.position(),d;k={top:a.top,left:a.left,width:g.width(),height:g.height()};d=k.width==l.width&&k.height==l.height;i.fadeOut(c.changeFade,function(){var f=function(){i.html(m.contents()).fadeIn(c.changeFade,L)};b.event.trigger("fancybox-change");i.empty().css("overflow","hidden");if(d){i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*
28
- 2,1),height:Math.max(l.height-c.padding*2-v,1)});f()}else{i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)});y.prop=0;b(y).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:f})}})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=Q();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(m.contents());g.css(k).show();if(c.opacity)l.opacity=
29
- 0;y.prop=0;b(y).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)}).html(m.contents());g.css(l).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();N()},Z=function(){h=true;e.width=s.width;e.height=s.height;b("<img />").attr({id:"fancybox-img",
30
- src:s.src,alt:e.title}).appendTo(m);N()},C=function(){J();var a=q[p],d,f,o,t,w;e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o===""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f="html";else if(d)if(d.match(G))f=
31
- "image";else if(d.match(S))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,p,e)===false){h=false;
32
- return}m.css("padding",20+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":m.html(e.content);F();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();
33
- s=new Image;s.onerror=function(){P()};s.onload=function(){s.onerror=null;s.onload=null;Z()};s.src=d;break;case "swf":t='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';w="";b.each(e.swf,function(r,R){t+='<param name="'+r+'" value="'+R+'"></param>';w+=" "+r+'="'+R+'"'});t+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object>";m.html(t);
34
- F();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];if(typeof f=="string")f+="&selector="+a[1];else f.selector=a[1]}h=false;b.fancybox.showActivity();E=b.ajax(b.extend(e.ajax,{url:d,data:f,error:P,success:function(r){if(E.status==200){m.html(r);F()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(m);N();break}},$=function(){if(u.is(":visible")){b("div",
35
- u).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},aa=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),u=b('<div id="fancybox-loading"><div></div></div>'),x=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));if(!b.support.opacity){g.addClass("fancybox-ie");u.addClass("fancybox-ie")}D=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(g);
36
- D.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);u.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});if(O){x.get(0).style.setExpression("height",
37
- "document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");u.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");D.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}}};
38
- b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];p=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");p=q.index(this)}C();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;d=typeof d!=="undefined"?d:{};q=[];p=d.index||0;if(b.isArray(a)){for(var f=0,o=a.length;f<o;f++)if(typeof a[f]==
39
- "object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}if(p>q.length||p<0)p=0;C()}};b.fancybox.showActivity=function(){clearInterval(H);u.show();H=setInterval($,66)};b.fancybox.hideActivity=function(){u.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=function(){return b.fancybox.pos(n-
40
- 1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a,10);if(a>-1&&j.length>a){p=a;C()}if(c.cyclic&&j.length>1&&a<0){p=j.length-1;C()}if(c.cyclic&&j.length>1&&a>=j.length){p=0;C()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");J();e&&b.isFunction(e.onCancel)&&e.onCancel(q,p,e);h=false}};b.fancybox.close=function(){function a(){x.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=p=0;c=e={};h=false}
41
- if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}J();b(z.add(A).add(B)).hide();b("#fancybox-title").remove();g.add(i).add(x).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=Q();var d=g.position();l={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)l.opacity=1;y.prop=1;b(y).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,
42
- step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){var a,d;if(!(h||g.is(":hidden"))){h=true;a=i.wrapInner("<div style='overflow:auto'></div>").children();d=a.height();g.css({height:d+c.padding*2+v});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=K(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-v+40))*0.5;f.left=a[2]+(a[0]-(g.width()+40))*0.5;f.top=Math.max(a[3]+d,f.top);f.left=Math.max(a[2]+
43
- d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",
44
- easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){aa()})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery.mousewheel.pack.js DELETED
@@ -1,13 +0,0 @@
1
- /*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
2
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
3
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
4
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
- *
7
- * Version: 3.0.2
8
- *
9
- * Requires: 1.2.2+
10
- */
11
-
12
- (function(b){function d(a){var f=[].slice.call(arguments,1),e=0;a=b.event.fix(a||window.event);a.type="mousewheel";if(a.wheelDelta)e=a.wheelDelta/120;if(a.detail)e=-a.detail/3;f.unshift(a,e);return b.event.handle.apply(this,f)}var c=["DOMMouseScroll","mousewheel"];b.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],d,false);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],
13
- d,false);else this.onmousewheel=null}};b.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,13 +4,13 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravan
4
  Tags: fancybox, jquery, images, lightbox, gallery, image overlay
5
  Requires at least: 2.7
6
  Tested up to: 3.0.1
7
- Stable tag: 1.3.1.3
8
 
9
- Easily enable the FancyBox 1.3.1 jQuery extension on all JPG, BMP, GIF, PNG and SWF links. Multi-Site compatible and supports iFrame and Flash movies, including YouTube and others.
10
 
11
  == Description ==
12
 
13
- No options to be set. No configuration pages. It just gives you FancyBox-in-a-Box for all links to image (.jpg/.bmp/.gif/.png) _and_ Flash movie (.swf) files. Easy FancyBox uses the packed FancyBox 1.3.1 jQuery extension, is WP 3.0 Multi-Site compatible and supports iFrame and Flash movies -including YouTube and others- in an overlay.
14
 
15
  See the [Screenshot](http://wordpress.org/extend/plugins/easy-fancybox/screenshots/) and you know how images will be presented on your site as soon as you have installed and (network) activated this simple plugin.
16
 
@@ -111,8 +111,13 @@ Yes. Designed to work with **Network Activate** and does not require manual acti
111
 
112
  1. Example image with **Overlay** caption. This is the default way Easy FancyBox displays images. Other options are **Inside** and the old **Outside**.
113
 
 
 
114
  == Changelog ==
115
 
 
 
 
116
  = 1.3.1.3 =
117
  * translation .pot file available
118
  * Dutch translation
@@ -133,5 +138,5 @@ Yes. Designed to work with **Network Activate** and does not require manual acti
133
 
134
  == Upgrade Notice ==
135
 
136
- = 1.3.1.3 =
137
- Now supports Flash and Youtube movies. Dutch translation, added POT file for translations.
4
  Tags: fancybox, jquery, images, lightbox, gallery, image overlay
5
  Requires at least: 2.7
6
  Tested up to: 3.0.1
7
+ Stable tag: 1.3.2
8
 
9
+ Easily enable the FancyBox 1.3.2 jQuery extension on all image and SWF links. Multi-Site compatible and supports iFrame and Flash movies, including YouTube and others.
10
 
11
  == Description ==
12
 
13
+ No options to be set. No configuration pages. It just gives you FancyBox-in-a-Box for all links to image (.jpg/.bmp/.gif/.png) _and_ Flash movie (.swf) files. Easy FancyBox uses the packed FancyBox 1.3.2 jQuery extension, is WP 3.0 Multi-Site compatible and supports iFrame and Flash movies -including YouTube and others- in an overlay.
14
 
15
  See the [Screenshot](http://wordpress.org/extend/plugins/easy-fancybox/screenshots/) and you know how images will be presented on your site as soon as you have installed and (network) activated this simple plugin.
16
 
111
 
112
  1. Example image with **Overlay** caption. This is the default way Easy FancyBox displays images. Other options are **Inside** and the old **Outside**.
113
 
114
+ 2. Example of a Youtube movie in overlay.
115
+
116
  == Changelog ==
117
 
118
+ = 1.3.2 =
119
+ * upgraded FancyBox script to version 1.3.2
120
+
121
  = 1.3.1.3 =
122
  * translation .pot file available
123
  * Dutch translation
138
 
139
  == Upgrade Notice ==
140
 
141
+ = 1.3.2 =
142
+ New FancyBox version 1.3.2 included.
screenshot-2.png ADDED
Binary file