imaginable 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +84 -0
  4. data/README.textile +114 -0
  5. data/Rakefile +2 -0
  6. data/imaginable.gemspec +21 -0
  7. data/lib/generators/imaginable/install/install_generator.rb +28 -0
  8. data/lib/generators/templates/fancybox/blank.gif +0 -0
  9. data/lib/generators/templates/fancybox/fancy_close.png +0 -0
  10. data/lib/generators/templates/fancybox/fancy_loading.png +0 -0
  11. data/lib/generators/templates/fancybox/fancy_nav_left.png +0 -0
  12. data/lib/generators/templates/fancybox/fancy_nav_right.png +0 -0
  13. data/lib/generators/templates/fancybox/fancy_shadow_e.png +0 -0
  14. data/lib/generators/templates/fancybox/fancy_shadow_n.png +0 -0
  15. data/lib/generators/templates/fancybox/fancy_shadow_ne.png +0 -0
  16. data/lib/generators/templates/fancybox/fancy_shadow_nw.png +0 -0
  17. data/lib/generators/templates/fancybox/fancy_shadow_s.png +0 -0
  18. data/lib/generators/templates/fancybox/fancy_shadow_se.png +0 -0
  19. data/lib/generators/templates/fancybox/fancy_shadow_sw.png +0 -0
  20. data/lib/generators/templates/fancybox/fancy_shadow_w.png +0 -0
  21. data/lib/generators/templates/fancybox/fancy_title_left.png +0 -0
  22. data/lib/generators/templates/fancybox/fancy_title_main.png +0 -0
  23. data/lib/generators/templates/fancybox/fancy_title_over.png +0 -0
  24. data/lib/generators/templates/fancybox/fancy_title_right.png +0 -0
  25. data/lib/generators/templates/fancybox/fancybox-x.png +0 -0
  26. data/lib/generators/templates/fancybox/fancybox-y.png +0 -0
  27. data/lib/generators/templates/fancybox/fancybox.png +0 -0
  28. data/lib/generators/templates/fancybox/jquery.fancybox-1.3.4.css +359 -0
  29. data/lib/generators/templates/imaginable.js +429 -0
  30. data/lib/generators/templates/imaginable.rb +6 -0
  31. data/lib/generators/templates/imgareaselect/border-anim-h.gif +0 -0
  32. data/lib/generators/templates/imgareaselect/border-anim-v.gif +0 -0
  33. data/lib/generators/templates/imgareaselect/border-h.gif +0 -0
  34. data/lib/generators/templates/imgareaselect/border-v.gif +0 -0
  35. data/lib/generators/templates/imgareaselect/imgareaselect-animated.css +41 -0
  36. data/lib/generators/templates/imgareaselect/imgareaselect-default.css +41 -0
  37. data/lib/generators/templates/imgareaselect/imgareaselect-deprecated.css +36 -0
  38. data/lib/generators/templates/jquery.fancybox-1.3.4.pack.js +46 -0
  39. data/lib/generators/templates/jquery.imgareaselect.pack.js +1 -0
  40. data/lib/generators/templates/plupload.flash.swf +0 -0
  41. data/lib/generators/templates/plupload.full.min.js +2 -0
  42. data/lib/imaginable.rb +22 -0
  43. data/lib/imaginable/form_builder.rb +100 -0
  44. data/lib/imaginable/image.rb +24 -0
  45. data/lib/imaginable/model.rb +67 -0
  46. data/lib/imaginable/railtie.rb +27 -0
  47. data/lib/imaginable/schema.rb +11 -0
  48. data/lib/imaginable/version.rb +3 -0
  49. metadata +52 -5
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in test_gem.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,84 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ imaginable (0.0.1)
5
+ formtastic
6
+ rails (= 3.0.5)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ abstract (1.0.0)
12
+ actionmailer (3.0.5)
13
+ actionpack (= 3.0.5)
14
+ mail (~> 2.2.15)
15
+ actionpack (3.0.5)
16
+ activemodel (= 3.0.5)
17
+ activesupport (= 3.0.5)
18
+ builder (~> 2.1.2)
19
+ erubis (~> 2.6.6)
20
+ i18n (~> 0.4)
21
+ rack (~> 1.2.1)
22
+ rack-mount (~> 0.6.13)
23
+ rack-test (~> 0.5.7)
24
+ tzinfo (~> 0.3.23)
25
+ activemodel (3.0.5)
26
+ activesupport (= 3.0.5)
27
+ builder (~> 2.1.2)
28
+ i18n (~> 0.4)
29
+ activerecord (3.0.5)
30
+ activemodel (= 3.0.5)
31
+ activesupport (= 3.0.5)
32
+ arel (~> 2.0.2)
33
+ tzinfo (~> 0.3.23)
34
+ activeresource (3.0.5)
35
+ activemodel (= 3.0.5)
36
+ activesupport (= 3.0.5)
37
+ activesupport (3.0.5)
38
+ arel (2.0.9)
39
+ builder (2.1.2)
40
+ erubis (2.6.6)
41
+ abstract (>= 1.0.0)
42
+ formtastic (1.2.3)
43
+ actionpack (>= 2.3.7)
44
+ activesupport (>= 2.3.7)
45
+ i18n (~> 0.4)
46
+ i18n (0.5.0)
47
+ mail (2.2.15)
48
+ activesupport (>= 2.3.6)
49
+ i18n (>= 0.4.0)
50
+ mime-types (~> 1.16)
51
+ treetop (~> 1.4.8)
52
+ mime-types (1.16)
53
+ polyglot (0.3.1)
54
+ rack (1.2.2)
55
+ rack-mount (0.6.14)
56
+ rack (>= 1.0.0)
57
+ rack-test (0.5.7)
58
+ rack (>= 1.0)
59
+ rails (3.0.5)
60
+ actionmailer (= 3.0.5)
61
+ actionpack (= 3.0.5)
62
+ activerecord (= 3.0.5)
63
+ activeresource (= 3.0.5)
64
+ activesupport (= 3.0.5)
65
+ bundler (~> 1.0)
66
+ railties (= 3.0.5)
67
+ railties (3.0.5)
68
+ actionpack (= 3.0.5)
69
+ activesupport (= 3.0.5)
70
+ rake (>= 0.8.7)
71
+ thor (~> 0.14.4)
72
+ rake (0.8.7)
73
+ thor (0.14.6)
74
+ treetop (1.4.9)
75
+ polyglot (>= 0.3.1)
76
+ tzinfo (0.3.25)
77
+
78
+ PLATFORMS
79
+ ruby
80
+
81
+ DEPENDENCIES
82
+ formtastic
83
+ imaginable!
84
+ rails (= 3.0.5)
data/README.textile ADDED
@@ -0,0 +1,114 @@
1
+ h1. Imaginable
2
+
3
+ Imaginable is a gem for Rails, which allows easy integration with the Imagination image-upload and scaling server.
4
+
5
+ h2. Compatibility
6
+
7
+ Imaginable is currently only compatible with Rails 3
8
+
9
+ h2. Installation
10
+
11
+ Simply add Imaginable to your Gemfile and bundle it up:
12
+
13
+ <pre>
14
+ gem 'imaginable'
15
+ </pre>
16
+
17
+ Then run the generator to copy some javascript and a configuration initializer into your application:
18
+
19
+ <pre>
20
+ $ rails generate imaginable:install
21
+ </pre>
22
+
23
+ h2. Usage
24
+
25
+ It is really easy to make a model Imaginable.
26
+
27
+ If you are creating a new model, there are even some handy migration helpers.
28
+
29
+ <pre>
30
+ class CreateArticles < ActiveRecord::Migration
31
+ def self.up
32
+ create_table :articles do |t|
33
+ t.string :title
34
+ t.text :body
35
+ t.imaginable :photo
36
+ t.timestamps
37
+ end
38
+ end
39
+
40
+ def self.down
41
+ drop_table :articles
42
+ end
43
+ end
44
+ </pre>
45
+
46
+ The @t.imaginable@ helper above, will create two columns: @photo_uuid@ and @photo_token@ which Imaginable needs to keep track of the images used by this model.
47
+
48
+ We then need to mark our model as Imaginable
49
+
50
+ <pre>
51
+ class Article < ActiveRecord::Base
52
+ has_imagination :photo
53
+ end
54
+ </pre>
55
+
56
+ Finally we just need to add a field to our form, which let's the user upload a photo. This is also really easy thanks to the form helper:
57
+
58
+ <pre>
59
+ <%= form_for(@article) do |f| %>
60
+ <div class="field">
61
+ <%= f.label :title %><br />
62
+ <%= f.text_field :title %>
63
+ </div>
64
+ <div class="field">
65
+ <%= f.label :body %><br />
66
+ <%= f.text_area :body %>
67
+ </div>
68
+ <div class="field">
69
+ <%= f.label :photo %><br />
70
+ <%= f.image_field :photo %>
71
+ </div>
72
+ <div class="actions">
73
+ <%= f.submit %>
74
+ </div>
75
+ <% end %>
76
+ </pre>
77
+
78
+ Please note, that you need to include the Imaginable javascripts in your layout, or by other means.
79
+ Here is an example of what you could do, if you had a @yield(:head)@ in the @head@ section of your layout:
80
+
81
+ <pre>
82
+ <% content_for(:head) do %>
83
+ <%= javascript_include_tag 'plupload.full.min' %>
84
+ <%= javascript_include_tag 'imaginable' %>
85
+ <% end %>
86
+ </pre>
87
+
88
+ That's all there is to it!
89
+
90
+ h2. Validation
91
+
92
+ If you require the user to upload an image, you can use this handy validation helper.
93
+
94
+ <pre>
95
+ class Article < ActiveRecord::Base
96
+
97
+ has_imagination :photo
98
+
99
+ validates_presence_of :title
100
+ validates_presence_of :body
101
+ validates_imagination
102
+
103
+ end
104
+ </pre>
105
+
106
+ h2. Showing images
107
+
108
+ To show an image, you simply call the imaginable method of your model.
109
+ The method will have the name that you have configured in your model.
110
+ In the above examples, this would be @@article.photo@.
111
+
112
+ <pre>
113
+ <%= image_tag @article.photo.url(:width => 500) %>
114
+ </pre>
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,21 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "imaginable/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "imaginable"
6
+ s.version = Imaginable::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Thomas Dippel"]
9
+ s.email = ["thomasdi@benjamin.dk"]
10
+ s.homepage = "http://rubygems.org/gems/imaginable"
11
+ s.summary = "A gem for hooking a rails application up to the imagine image-server."
12
+ s.description = "A gem for hooking a rails application up to the imagine image-server."
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_dependency "rails", "3.0.5"
20
+ s.add_dependency "uuidtools"
21
+ end
@@ -0,0 +1,28 @@
1
+ # encoding: utf-8
2
+
3
+ module Imaginable
4
+ # Copies the necessary js-files to public/javascripts/,
5
+ # the necessary css-files and images to public/stylesheets
6
+ # and a config initializer to config/initializers/imaginable.rb
7
+ #
8
+ # @example
9
+ # $ rails generate imaginable:install
10
+ #
11
+ # @todo Revisit in Rails 3.1 where public assets are treated differently
12
+ class InstallGenerator < Rails::Generators::Base
13
+ desc "Copies the necessary js-files to public/javascripts/, the necessary css-files and images to public/stylesheets and a config initializer to config/initializers/imaginable.rb"
14
+
15
+ source_root File.expand_path('../../../templates', __FILE__)
16
+
17
+ def copy_files
18
+ copy_file 'imaginable.rb', 'config/initializers/imaginable.rb'
19
+ copy_file 'imaginable.js', 'public/javascripts/imaginable.js'
20
+ copy_file 'plupload.full.min.js', 'public/javascripts/plupload.full.min.js'
21
+ copy_file 'plupload.flash.swf', 'public/javascripts/plupload.flash.swf'
22
+ copy_file 'jquery.fancybox-1.3.4.pack.js', 'public/javascripts/jquery.fancybox-1.3.4.pack.js'
23
+ copy_file 'jquery.imgareaselect.pack.js', 'public/javascripts/jquery.imgareaselect.pack.js'
24
+ directory 'fancybox', 'public/stylesheets/fancybox'
25
+ directory 'imgareaselect', 'public/stylesheets/imgareaselect'
26
+ end
27
+ end
28
+ end
@@ -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.4 (11/11/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
+ z-index: 1100;
47
+ display: none;
48
+ }
49
+
50
+ #fancybox-tmp {
51
+ padding: 0;
52
+ margin: 0;
53
+ border: 0;
54
+ overflow: auto;
55
+ display: none;
56
+ }
57
+
58
+ #fancybox-wrap {
59
+ position: absolute;
60
+ top: 0;
61
+ left: 0;
62
+ padding: 20px;
63
+ z-index: 1101;
64
+ outline: none;
65
+ display: none;
66
+ }
67
+
68
+ #fancybox-outer {
69
+ position: relative;
70
+ width: 100%;
71
+ height: 100%;
72
+ background: #fff;
73
+ }
74
+
75
+ #fancybox-content {
76
+ width: 0;
77
+ height: 0;
78
+ padding: 0;
79
+ outline: none;
80
+ position: relative;
81
+ overflow: hidden;
82
+ z-index: 1102;
83
+ border: 0px solid #fff;
84
+ }
85
+
86
+ #fancybox-hide-sel-frame {
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ height: 100%;
92
+ background: transparent;
93
+ z-index: 1101;
94
+ }
95
+
96
+ #fancybox-close {
97
+ position: absolute;
98
+ top: -15px;
99
+ right: -15px;
100
+ width: 30px;
101
+ height: 30px;
102
+ background: transparent url('fancybox.png') -40px 0px;
103
+ cursor: pointer;
104
+ z-index: 1103;
105
+ display: none;
106
+ }
107
+
108
+ #fancybox-error {
109
+ color: #444;
110
+ font: normal 12px/20px Arial;
111
+ padding: 14px;
112
+ margin: 0;
113
+ }
114
+
115
+ #fancybox-img {
116
+ width: 100%;
117
+ height: 100%;
118
+ padding: 0;
119
+ margin: 0;
120
+ border: none;
121
+ outline: none;
122
+ line-height: 0;
123
+ vertical-align: top;
124
+ }
125
+
126
+ #fancybox-frame {
127
+ width: 100%;
128
+ height: 100%;
129
+ border: none;
130
+ display: block;
131
+ }
132
+
133
+ #fancybox-left, #fancybox-right {
134
+ position: absolute;
135
+ bottom: 0px;
136
+ height: 100%;
137
+ width: 35%;
138
+ cursor: pointer;
139
+ outline: none;
140
+ background: transparent url('blank.gif');
141
+ z-index: 1102;
142
+ display: none;
143
+ }
144
+
145
+ #fancybox-left {
146
+ left: 0px;
147
+ }
148
+
149
+ #fancybox-right {
150
+ right: 0px;
151
+ }
152
+
153
+ #fancybox-left-ico, #fancybox-right-ico {
154
+ position: absolute;
155
+ top: 50%;
156
+ left: -9999px;
157
+ width: 30px;
158
+ height: 30px;
159
+ margin-top: -15px;
160
+ cursor: pointer;
161
+ z-index: 1102;
162
+ display: block;
163
+ }
164
+
165
+ #fancybox-left-ico {
166
+ background-image: url('fancybox.png');
167
+ background-position: -40px -30px;
168
+ }
169
+
170
+ #fancybox-right-ico {
171
+ background-image: url('fancybox.png');
172
+ background-position: -40px -60px;
173
+ }
174
+
175
+ #fancybox-left:hover, #fancybox-right:hover {
176
+ visibility: visible; /* IE6 */
177
+ }
178
+
179
+ #fancybox-left:hover span {
180
+ left: 20px;
181
+ }
182
+
183
+ #fancybox-right:hover span {
184
+ left: auto;
185
+ right: 20px;
186
+ }
187
+
188
+ .fancybox-bg {
189
+ position: absolute;
190
+ padding: 0;
191
+ margin: 0;
192
+ border: 0;
193
+ width: 20px;
194
+ height: 20px;
195
+ z-index: 1001;
196
+ }
197
+
198
+ #fancybox-bg-n {
199
+ top: -20px;
200
+ left: 0;
201
+ width: 100%;
202
+ background-image: url('fancybox-x.png');
203
+ }
204
+
205
+ #fancybox-bg-ne {
206
+ top: -20px;
207
+ right: -20px;
208
+ background-image: url('fancybox.png');
209
+ background-position: -40px -162px;
210
+ }
211
+
212
+ #fancybox-bg-e {
213
+ top: 0;
214
+ right: -20px;
215
+ height: 100%;
216
+ background-image: url('fancybox-y.png');
217
+ background-position: -20px 0px;
218
+ }
219
+
220
+ #fancybox-bg-se {
221
+ bottom: -20px;
222
+ right: -20px;
223
+ background-image: url('fancybox.png');
224
+ background-position: -40px -182px;
225
+ }
226
+
227
+ #fancybox-bg-s {
228
+ bottom: -20px;
229
+ left: 0;
230
+ width: 100%;
231
+ background-image: url('fancybox-x.png');
232
+ background-position: 0px -20px;
233
+ }
234
+
235
+ #fancybox-bg-sw {
236
+ bottom: -20px;
237
+ left: -20px;
238
+ background-image: url('fancybox.png');
239
+ background-position: -40px -142px;
240
+ }
241
+
242
+ #fancybox-bg-w {
243
+ top: 0;
244
+ left: -20px;
245
+ height: 100%;
246
+ background-image: url('fancybox-y.png');
247
+ }
248
+
249
+ #fancybox-bg-nw {
250
+ top: -20px;
251
+ left: -20px;
252
+ background-image: url('fancybox.png');
253
+ background-position: -40px -122px;
254
+ }
255
+
256
+ #fancybox-title {
257
+ font-family: Helvetica;
258
+ font-size: 12px;
259
+ z-index: 1102;
260
+ }
261
+
262
+ .fancybox-title-inside {
263
+ padding-bottom: 10px;
264
+ text-align: center;
265
+ color: #333;
266
+ background: #fff;
267
+ position: relative;
268
+ }
269
+
270
+ .fancybox-title-outside {
271
+ padding-top: 10px;
272
+ color: #fff;
273
+ }
274
+
275
+ .fancybox-title-over {
276
+ position: absolute;
277
+ bottom: 0;
278
+ left: 0;
279
+ color: #FFF;
280
+ text-align: left;
281
+ }
282
+
283
+ #fancybox-title-over {
284
+ padding: 10px;
285
+ background-image: url('fancy_title_over.png');
286
+ display: block;
287
+ }
288
+
289
+ .fancybox-title-float {
290
+ position: absolute;
291
+ left: 0;
292
+ bottom: -20px;
293
+ height: 32px;
294
+ }
295
+
296
+ #fancybox-title-float-wrap {
297
+ border: none;
298
+ border-collapse: collapse;
299
+ width: auto;
300
+ }
301
+
302
+ #fancybox-title-float-wrap td {
303
+ border: none;
304
+ white-space: nowrap;
305
+ }
306
+
307
+ #fancybox-title-float-left {
308
+ padding: 0 0 0 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: 0 0 3px 0;
317
+ background: url('fancybox-x.png') 0px -40px;
318
+ }
319
+
320
+ #fancybox-title-float-right {
321
+ padding: 0 0 0 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='stylesheets/fancybox/fancy_close.png', sizingMethod='scale'); }
328
+
329
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331
+
332
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/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='stylesheets/fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='stylesheets/fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }