Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added fancybox to portraits

  • Loading branch information...
commit e3ff72c8cf7aadc336b575ba7d88f975ce23b2de 1 parent ac34683
Sasha Koss kossnocorp authored

Showing 28 changed files with 1,659 additions and 2 deletions. Show diff stats Hide diff stats

  1. +1 1  app/views/accounts/_portrait.html.erb
  2. +3 1 app/views/layouts/application.html.erb
  3. +8 0 public/javascripts/application.js
  4. BIN  public/javascripts/fancybox/blank.gif
  5. BIN  public/javascripts/fancybox/fancy_close.png
  6. BIN  public/javascripts/fancybox/fancy_loading.png
  7. BIN  public/javascripts/fancybox/fancy_nav_left.png
  8. BIN  public/javascripts/fancybox/fancy_nav_right.png
  9. BIN  public/javascripts/fancybox/fancy_shadow_e.png
  10. BIN  public/javascripts/fancybox/fancy_shadow_n.png
  11. BIN  public/javascripts/fancybox/fancy_shadow_ne.png
  12. BIN  public/javascripts/fancybox/fancy_shadow_nw.png
  13. BIN  public/javascripts/fancybox/fancy_shadow_s.png
  14. BIN  public/javascripts/fancybox/fancy_shadow_se.png
  15. BIN  public/javascripts/fancybox/fancy_shadow_sw.png
  16. BIN  public/javascripts/fancybox/fancy_shadow_w.png
  17. BIN  public/javascripts/fancybox/fancy_title_left.png
  18. BIN  public/javascripts/fancybox/fancy_title_main.png
  19. BIN  public/javascripts/fancybox/fancy_title_over.png
  20. BIN  public/javascripts/fancybox/fancy_title_right.png
  21. BIN  public/javascripts/fancybox/fancybox-x.png
  22. BIN  public/javascripts/fancybox/fancybox-y.png
  23. BIN  public/javascripts/fancybox/fancybox.png
  24. +72 0 public/javascripts/fancybox/jquery.easing-1.3.pack.js
  25. +359 0 public/javascripts/fancybox/jquery.fancybox-1.3.4.css
  26. +1,156 0 public/javascripts/fancybox/jquery.fancybox-1.3.4.js
  27. +46 0 public/javascripts/fancybox/jquery.fancybox-1.3.4.pack.js
  28. +14 0 public/javascripts/fancybox/jquery.mousewheel-3.0.4.pack.js
2  app/views/accounts/_portrait.html.erb
... ... @@ -1,3 +1,3 @@
1 1 <li class='image-wrapper'>
2   - <%= image_tag portrait.url %>
  2 + <%= link_to image_tag(portrait.url), portrait.url, :rel => portrait.account.id %>
3 3 </li>
4 app/views/layouts/application.html.erb
@@ -4,8 +4,10 @@
4 4 <title>Ruby Committers</title>
5 5 <%= stylesheet_link_tag 'master' %>
6 6 <link href='http://fonts.googleapis.com/css?family=Cuprum' rel='stylesheet' type='text/css'>
  7 + <link href="/javascripts/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" />
  8 +
7 9 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
8   - <%= javascript_include_tag 'application' %>
  10 + <%= javascript_include_tag 'fancybox/jquery.fancybox-1.3.4.pack.js', 'application' %>
9 11 <%= csrf_meta_tag %>
10 12 <%= analytics_tag %>
11 13 </head>
8 public/javascripts/application.js
@@ -32,4 +32,12 @@ $(function () {
32 32 }
33 33
34 34 });
  35 +
  36 + $('ul.portraits a').fancybox({
  37 + 'transitionIn': 'elastic',
  38 + 'transitionOut': 'elastic',
  39 + 'speedIn': 300,
  40 + 'speedOut': 200,
  41 + 'overlayShow': false
  42 + });
35 43 });
BIN  public/javascripts/fancybox/blank.gif
BIN  public/javascripts/fancybox/fancy_close.png
BIN  public/javascripts/fancybox/fancy_loading.png
BIN  public/javascripts/fancybox/fancy_nav_left.png
BIN  public/javascripts/fancybox/fancy_nav_right.png
BIN  public/javascripts/fancybox/fancy_shadow_e.png
BIN  public/javascripts/fancybox/fancy_shadow_n.png
BIN  public/javascripts/fancybox/fancy_shadow_ne.png
BIN  public/javascripts/fancybox/fancy_shadow_nw.png
BIN  public/javascripts/fancybox/fancy_shadow_s.png
BIN  public/javascripts/fancybox/fancy_shadow_se.png
BIN  public/javascripts/fancybox/fancy_shadow_sw.png
BIN  public/javascripts/fancybox/fancy_shadow_w.png
BIN  public/javascripts/fancybox/fancy_title_left.png
BIN  public/javascripts/fancybox/fancy_title_main.png
BIN  public/javascripts/fancybox/fancy_title_over.png
BIN  public/javascripts/fancybox/fancy_title_right.png
BIN  public/javascripts/fancybox/fancybox-x.png
BIN  public/javascripts/fancybox/fancybox-y.png
BIN  public/javascripts/fancybox/fancybox.png
72 public/javascripts/fancybox/jquery.easing-1.3.pack.js
... ... @@ -0,0 +1,72 @@
  1 +/*
  2 + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
  3 + *
  4 + * Uses the built in easing capabilities added In jQuery 1.1
  5 + * to offer multiple easing options
  6 + *
  7 + * TERMS OF USE - jQuery Easing
  8 + *
  9 + * Open source under the BSD License.
  10 + *
  11 + * Copyright © 2008 George McGinley Smith
  12 + * All rights reserved.
  13 + *
  14 + * Redistribution and use in source and binary forms, with or without modification,
  15 + * are permitted provided that the following conditions are met:
  16 + *
  17 + * Redistributions of source code must retain the above copyright notice, this list of
  18 + * conditions and the following disclaimer.
  19 + * Redistributions in binary form must reproduce the above copyright notice, this list
  20 + * of conditions and the following disclaimer in the documentation and/or other materials
  21 + * provided with the distribution.
  22 + *
  23 + * Neither the name of the author nor the names of contributors may be used to endorse
  24 + * or promote products derived from this software without specific prior written permission.
  25 + *
  26 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  27 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  28 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  29 + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  30 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  31 + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  32 + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  33 + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  34 + * OF THE POSSIBILITY OF SUCH DAMAGE.
  35 + *
  36 +*/
  37 +
  38 +// t: current time, b: begInnIng value, c: change In value, d: duration
  39 +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
  40 +
  41 +/*
  42 + *
  43 + * TERMS OF USE - EASING EQUATIONS
  44 + *
  45 + * Open source under the BSD License.
  46 + *
  47 + * Copyright © 2001 Robert Penner
  48 + * All rights reserved.
  49 + *
  50 + * Redistribution and use in source and binary forms, with or without modification,
  51 + * are permitted provided that the following conditions are met:
  52 + *
  53 + * Redistributions of source code must retain the above copyright notice, this list of
  54 + * conditions and the following disclaimer.
  55 + * Redistributions in binary form must reproduce the above copyright notice, this list
  56 + * of conditions and the following disclaimer in the documentation and/or other materials
  57 + * provided with the distribution.
  58 + *
  59 + * Neither the name of the author nor the names of contributors may be used to endorse
  60 + * or promote products derived from this software without specific prior written permission.
  61 + *
  62 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  63 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  64 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  65 + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  66 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  67 + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  68 + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  69 + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  70 + * OF THE POSSIBILITY OF SUCH DAMAGE.
  71 + *
  72 + */
359 public/javascripts/fancybox/jquery.fancybox-1.3.4.css
... ... @@ -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='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'); }
1,156 public/javascripts/fancybox/jquery.fancybox-1.3.4.js
... ... @@ -0,0 +1,1156 @@
  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 +;(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) {
  145 + if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
  146 + selectedOpts.width = 'auto';
  147 + selectedOpts.height = 'auto';
  148 + } else {
  149 + selectedOpts.autoDimensions = false;
  150 + }
  151 + }
  152 +
  153 + if (selectedOpts.modal) {
  154 + selectedOpts.overlayShow = true;
  155 + selectedOpts.hideOnOverlayClick = false;
  156 + selectedOpts.hideOnContentClick = false;
  157 + selectedOpts.enableEscapeButton = false;
  158 + selectedOpts.showCloseButton = false;
  159 + }
  160 +
  161 + selectedOpts.padding = parseInt(selectedOpts.padding, 10);
  162 + selectedOpts.margin = parseInt(selectedOpts.margin, 10);
  163 +
  164 + tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
  165 +
  166 + $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
  167 + $(this).replaceWith(content.children());
  168 + });
  169 +
  170 + switch (type) {
  171 + case 'html' :
  172 + tmp.html( selectedOpts.content );
  173 + _process_inline();
  174 + break;
  175 +
  176 + case 'inline' :
  177 + if ( $(obj).parent().is('#fancybox-content') === true) {
  178 + busy = false;
  179 + return;
  180 + }
  181 +
  182 + $('<div class="fancybox-inline-tmp" />')
  183 + .hide()
  184 + .insertBefore( $(obj) )
  185 + .bind('fancybox-cleanup', function() {
  186 + $(this).replaceWith(content.children());
  187 + }).bind('fancybox-cancel', function() {
  188 + $(this).replaceWith(tmp.children());
  189 + });
  190 +
  191 + $(obj).appendTo(tmp);
  192 +
  193 + _process_inline();
  194 + break;
  195 +
  196 + case 'image':
  197 + busy = false;
  198 +
  199 + $.fancybox.showActivity();
  200 +
  201 + imgPreloader = new Image();
  202 +
  203 + imgPreloader.onerror = function() {
  204 + _error();
  205 + };
  206 +
  207 + imgPreloader.onload = function() {
  208 + busy = true;
  209 +
  210 + imgPreloader.onerror = imgPreloader.onload = null;
  211 +
  212 + _process_image();
  213 + };
  214 +
  215 + imgPreloader.src = href;
  216 + break;
  217 +
  218 + case 'swf':
  219 + selectedOpts.scrolling = 'no';
  220 +
  221 + str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
  222 + emb = '';
  223 +
  224 + $.each(selectedOpts.swf, function(name, val) {
  225 + str += '<param name="' + name + '" value="' + val + '"></param>';
  226 + emb += ' ' + name + '="' + val + '"';
  227 + });
  228 +
  229 + str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
  230 +
  231 + tmp.html(str);
  232 +
  233 + _process_inline();
  234 + break;
  235 +
  236 + case 'ajax':
  237 + busy = false;
  238 +
  239 + $.fancybox.showActivity();
  240 +
  241 + selectedOpts.ajax.win = selectedOpts.ajax.success;
  242 +
  243 + ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
  244 + url : href,
  245 + data : selectedOpts.ajax.data || {},
  246 + error : function(XMLHttpRequest, textStatus, errorThrown) {
  247 + if ( XMLHttpRequest.status > 0 ) {
  248 + _error();
  249 + }
  250 + },
  251 + success : function(data, textStatus, XMLHttpRequest) {
  252 + var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
  253 + if (o.status == 200) {
  254 + if ( typeof selectedOpts.ajax.win == 'function' ) {
  255 + ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
  256 +
  257 + if (ret === false) {
  258 + loading.hide();
  259 + return;
  260 + } else if (typeof ret == 'string' || typeof ret == 'object') {
  261 + data = ret;
  262 + }
  263 + }
  264 +
  265 + tmp.html( data );
  266 + _process_inline();
  267 + }
  268 + }
  269 + }));
  270 +
  271 + break;
  272 +
  273 + case 'iframe':
  274 + _show();
  275 + break;
  276 + }
  277 + },
  278 +
  279 + _process_inline = function() {
  280 + var
  281 + w = selectedOpts.width,
  282 + h = selectedOpts.height;
  283 +
  284 + if (w.toString().indexOf('%') > -1) {
  285 + w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
  286 +
  287 + } else {
  288 + w = w == 'auto' ? 'auto' : w + 'px';
  289 + }
  290 +
  291 + if (h.toString().indexOf('%') > -1) {
  292 + h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
  293 +
  294 + } else {
  295 + h = h == 'auto' ? 'auto' : h + 'px';
  296 + }
  297 +
  298 + tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
  299 +
  300 + selectedOpts.width = tmp.width();
  301 + selectedOpts.height = tmp.height();
  302 +
  303 + _show();
  304 + },
  305 +
  306 + _process_image = function() {
  307 + selectedOpts.width = imgPreloader.width;
  308 + selectedOpts.height = imgPreloader.height;
  309 +
  310 + $("<img />").attr({
  311 + 'id' : 'fancybox-img',
  312 + 'src' : imgPreloader.src,
  313 + 'alt' : selectedOpts.title
  314 + }).appendTo( tmp );
  315 +
  316 + _show();
  317 + },
  318 +
  319 + _show = function() {
  320 + var pos, equal;
  321 +
  322 + loading.hide();
  323 +
  324 + if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
  325 + $.event.trigger('fancybox-cancel');
  326 +
  327 + busy = false;
  328 + return;
  329 + }
  330 +
  331 + busy = true;
  332 +
  333 + $(content.add( overlay )).unbind();
  334 +
  335 + $(window).unbind("resize.fb scroll.fb");
  336 + $(document).unbind('keydown.fb');
  337 +
  338 + if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
  339 + wrap.css('height', wrap.height());
  340 + }
  341 +
  342 + currentArray = selectedArray;
  343 + currentIndex = selectedIndex;
  344 + currentOpts = selectedOpts;
  345 +
  346 + if (currentOpts.overlayShow) {
  347 + overlay.css({
  348 + 'background-color' : currentOpts.overlayColor,
  349 + 'opacity' : currentOpts.overlayOpacity,
  350 + 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
  351 + 'height' : $(document).height()
  352 + });
  353 +
  354 + if (!overlay.is(':visible')) {
  355 + if (isIE6) {
  356 + $('select:not(#fancybox-tmp select)').filter(function() {
  357 + return this.style.visibility !== 'hidden';
  358 + }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
  359 + this.style.visibility = 'inherit';
  360 + });
  361 + }
  362 +
  363 + overlay.show();
  364 + }
  365 + } else {
  366 + overlay.hide();
  367 + }
  368 +
  369 + final_pos = _get_zoom_to();
  370 +
  371 + _process_title();
  372 +
  373 + if (wrap.is(":visible")) {
  374 + $( close.add( nav_left ).add( nav_right ) ).hide();
  375 +
  376 + pos = wrap.position(),
  377 +
  378 + start_pos = {
  379 + top : pos.top,
  380 + left : pos.left,
  381 + width : wrap.width(),
  382 + height : wrap.height()
  383 + };
  384 +
  385 + equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
  386 +
  387 + content.fadeTo(currentOpts.changeFade, 0.3, function() {
  388 + var finish_resizing = function() {
  389 + content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
  390 + };
  391 +
  392 + $.event.trigger('fancybox-change');
  393 +
  394 + content
  395 + .empty()
  396 + .removeAttr('filter')
  397 + .css({
  398 + 'border-width' : currentOpts.padding,
  399 + 'width' : final_pos.width - currentOpts.padding * 2,
  400 + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
  401 + });
  402 +
  403 + if (equal) {
  404 + finish_resizing();
  405 +
  406 + } else {
  407 + fx.prop = 0;
  408 +
  409 + $(fx).animate({prop: 1}, {
  410 + duration : currentOpts.changeSpeed,
  411 + easing : currentOpts.easingChange,
  412 + step : _draw,
  413 + complete : finish_resizing
  414 + });
  415 + }
  416 + });
  417 +
  418 + return;
  419 + }
  420 +
  421 + wrap.removeAttr("style");
  422 +
  423 + content.css('border-width', currentOpts.padding);
  424 +
  425 + if (currentOpts.transitionIn == 'elastic') {
  426 + start_pos = _get_zoom_from();
  427 +
  428 + content.html( tmp.contents() );
  429 +
  430 + wrap.show();
  431 +
  432 + if (currentOpts.opacity) {
  433 + final_pos.opacity = 0;
  434 + }
  435 +
  436 + fx.prop = 0;
  437 +
  438 + $(fx).animate({prop: 1}, {
  439 + duration : currentOpts.speedIn,
  440 + easing : currentOpts.easingIn,
  441 + step : _draw,
  442 + complete : _finish
  443 + });
  444 +
  445 + return;
  446 + }
  447 +
  448 + if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
  449 + title.show();
  450 + }
  451 +
  452 + content
  453 + .css({
  454 + 'width' : final_pos.width - currentOpts.padding * 2,
  455 + 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
  456 + })
  457 + .html( tmp.contents() );
  458 +
  459 + wrap
  460 + .css(final_pos)
  461 + .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
  462 + },
  463 +
  464 + _format_title = function(title) {
  465 + if (title && title.length) {
  466 + if (currentOpts.titlePosition == 'float') {
  467 + 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>';
  468 + }
  469 +
  470 + return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
  471 + }
  472 +
  473 + return false;
  474 + },
  475 +
  476 + _process_title = function() {
  477 + titleStr = currentOpts.title || '';
  478 + titleHeight = 0;
  479 +
  480 + title
  481 + .empty()
  482 + .removeAttr('style')
  483 + .removeClass();
  484 +
  485 + if (currentOpts.titleShow === false) {
  486 + title.hide();
  487 + return;
  488 + }
  489 +
  490 + titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
  491 +
  492 + if (!titleStr || titleStr === '') {
  493 + title.hide();
  494 + return;
  495 + }
  496 +
  497 + title
  498 + .addClass('fancybox-title-' + currentOpts.titlePosition)
  499 + .html( titleStr )
  500 + .appendTo( 'body' )
  501 + .show();
  502 +
  503 + switch (currentOpts.titlePosition) {
  504 + case 'inside':
  505 + title
  506 + .css({
  507 + 'width' : final_pos.width - (currentOpts.padding * 2),
  508 + 'marginLeft' : currentOpts.padding,
  509 + 'marginRight' : currentOpts.padding
  510 + });
  511 +
  512 + titleHeight = title.outerHeight(true);
  513 +
  514 + title.appendTo( outer );
  515 +
  516 + final_pos.height += titleHeight;
  517 + break;
  518 +
  519 + case 'over':
  520 + title
  521 + .css({
  522 + 'marginLeft' : currentOpts.padding,
  523 + 'width' : final_pos.width - (currentOpts.padding * 2),
  524 + 'bottom' : currentOpts.padding
  525 + })
  526 + .appendTo( outer );
  527 + break;
  528 +
  529 + case 'float':
  530 + title
  531 + .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
  532 + .appendTo( wrap );
  533 + break;
  534 +
  535 + default:
  536 + title
  537 + .css({
  538 + 'width' : final_pos.width - (currentOpts.padding * 2),
  539 + 'paddingLeft' : currentOpts.padding,
  540 + 'paddingRight' : currentOpts.padding
  541 + })
  542 + .appendTo( wrap );
  543 + break;
  544 + }
  545 +
  546 + title.hide();
  547 + },
  548 +
  549 + _set_navigation = function() {
  550 + if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
  551 + $(document).bind('keydown.fb', function(e) {
  552 + if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
  553 + e.preventDefault();
  554 + $.fancybox.close();
  555 +
  556 + } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
  557 + e.preventDefault();
  558 + $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
  559 + }
  560 + });
  561 + }
  562 +
  563 + if (!currentOpts.showNavArrows) {
  564 + nav_left.hide();
  565 + nav_right.hide();