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