r82058 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82057‎ | r82058 | r82059 >
Date:16:35, 13 February 2011
Author:reedy
Status:deferred
Tags:
Comment:
Followup r82056

Fix svn:eol-style native

Set svn:mime-type=image/gif on gif images
Modified paths:
  • /trunk/extensions/GeeQuBox/GeeQuBox.i18n.php (modified) (history)
  • /trunk/extensions/GeeQuBox/GeeQuBox.php (modified) (history)
  • /trunk/extensions/GeeQuBox/css/jquery.lightbox-0.5.css (modified) (history)
  • /trunk/extensions/GeeQuBox/images/lightbox-blank.gif (modified) (history)
  • /trunk/extensions/GeeQuBox/images/lightbox-btn-close.gif (modified) (history)
  • /trunk/extensions/GeeQuBox/images/lightbox-btn-next.gif (modified) (history)
  • /trunk/extensions/GeeQuBox/images/lightbox-btn-prev.gif (modified) (history)
  • /trunk/extensions/GeeQuBox/images/lightbox-ico-loading.gif (modified) (history)
  • /trunk/extensions/GeeQuBox/js/jquery.js (modified) (history)
  • /trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.js (modified) (history)
  • /trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.min.js (modified) (history)
  • /trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.pack.js (modified) (history)

Diff [purge]

Property changes on: trunk/extensions/GeeQuBox/GeeQuBox.i18n.php
___________________________________________________________________
Added: svn:eol-style
11 + native
Property changes on: trunk/extensions/GeeQuBox/GeeQuBox.php
___________________________________________________________________
Added: svn:eol-style
22 + native
Property changes on: trunk/extensions/GeeQuBox/images/lightbox-btn-prev.gif
___________________________________________________________________
Modified: svn:mime-type
33 - application/octet-stream
44 + image/gif
Property changes on: trunk/extensions/GeeQuBox/images/lightbox-btn-next.gif
___________________________________________________________________
Modified: svn:mime-type
55 - application/octet-stream
66 + image/gif
Property changes on: trunk/extensions/GeeQuBox/images/lightbox-ico-loading.gif
___________________________________________________________________
Modified: svn:mime-type
77 - application/octet-stream
88 + image/gif
Property changes on: trunk/extensions/GeeQuBox/images/lightbox-btn-close.gif
___________________________________________________________________
Modified: svn:mime-type
99 - application/octet-stream
1010 + image/gif
Property changes on: trunk/extensions/GeeQuBox/images/lightbox-blank.gif
___________________________________________________________________
Modified: svn:mime-type
1111 - application/octet-stream
1212 + image/gif
Index: trunk/extensions/GeeQuBox/css/jquery.lightbox-0.5.css
@@ -1,101 +1,101 @@
2 -/**
3 - * jQuery lightBox plugin
4 - * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
5 - * and adapted to me for use like a plugin from jQuery.
6 - * @name jquery-lightbox-0.5.css
7 - * @author Leandro Vieira Pinho - http://leandrovieira.com
8 - * @version 0.5
9 - * @date April 11, 2008
10 - * @category jQuery plugin
11 - * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
12 - * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
13 - * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
14 - */
15 -#jquery-overlay {
16 - position: absolute;
17 - top: 0;
18 - left: 0;
19 - z-index: 90;
20 - width: 100%;
21 - height: 500px;
22 -}
23 -#jquery-lightbox {
24 - position: absolute;
25 - top: 0;
26 - left: 0;
27 - width: 100%;
28 - z-index: 100;
29 - text-align: center;
30 - line-height: 0;
31 -}
32 -#jquery-lightbox a img { border: none; }
33 -#lightbox-container-image-box {
34 - position: relative;
35 - background-color: #fff;
36 - width: 250px;
37 - height: 250px;
38 - margin: 0 auto;
39 -}
40 -#lightbox-container-image { padding: 10px; }
41 -#lightbox-loading {
42 - position: absolute;
43 - top: 40%;
44 - left: 0%;
45 - height: 25%;
46 - width: 100%;
47 - text-align: center;
48 - line-height: 0;
49 -}
50 -#lightbox-nav {
51 - position: absolute;
52 - top: 0;
53 - left: 0;
54 - height: 100%;
55 - width: 100%;
56 - z-index: 10;
57 -}
58 -#lightbox-container-image-box > #lightbox-nav { left: 0; }
59 -#lightbox-nav a { outline: none;}
60 -#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
61 - width: 49%;
62 - height: 100%;
63 - zoom: 1;
64 - display: block;
65 -}
66 -#lightbox-nav-btnPrev {
67 - left: 0;
68 - float: left;
69 -}
70 -#lightbox-nav-btnNext {
71 - right: 0;
72 - float: right;
73 -}
74 -#lightbox-container-image-data-box {
75 - font: 10px Verdana, Helvetica, sans-serif;
76 - background-color: #fff;
77 - margin: 0 auto;
78 - line-height: 1.4em;
79 - overflow: auto;
80 - width: 100%;
81 - padding: 0 10px 0;
82 -}
83 -#lightbox-container-image-data {
84 - padding: 0 10px;
85 - color: #666;
86 -}
87 -#lightbox-container-image-data #lightbox-image-details {
88 - width: 70%;
89 - float: left;
90 - text-align: left;
91 -}
92 -#lightbox-image-details-caption { font-weight: bold; }
93 -#lightbox-image-details-currentNumber {
94 - display: block;
95 - clear: left;
96 - padding-bottom: 1.0em;
97 -}
98 -#lightbox-secNav-btnClose {
99 - width: 66px;
100 - float: right;
101 - padding-bottom: 0.7em;
 2+/**
 3+ * jQuery lightBox plugin
 4+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 5+ * and adapted to me for use like a plugin from jQuery.
 6+ * @name jquery-lightbox-0.5.css
 7+ * @author Leandro Vieira Pinho - http://leandrovieira.com
 8+ * @version 0.5
 9+ * @date April 11, 2008
 10+ * @category jQuery plugin
 11+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 12+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
 13+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 14+ */
 15+#jquery-overlay {
 16+ position: absolute;
 17+ top: 0;
 18+ left: 0;
 19+ z-index: 90;
 20+ width: 100%;
 21+ height: 500px;
 22+}
 23+#jquery-lightbox {
 24+ position: absolute;
 25+ top: 0;
 26+ left: 0;
 27+ width: 100%;
 28+ z-index: 100;
 29+ text-align: center;
 30+ line-height: 0;
 31+}
 32+#jquery-lightbox a img { border: none; }
 33+#lightbox-container-image-box {
 34+ position: relative;
 35+ background-color: #fff;
 36+ width: 250px;
 37+ height: 250px;
 38+ margin: 0 auto;
 39+}
 40+#lightbox-container-image { padding: 10px; }
 41+#lightbox-loading {
 42+ position: absolute;
 43+ top: 40%;
 44+ left: 0%;
 45+ height: 25%;
 46+ width: 100%;
 47+ text-align: center;
 48+ line-height: 0;
 49+}
 50+#lightbox-nav {
 51+ position: absolute;
 52+ top: 0;
 53+ left: 0;
 54+ height: 100%;
 55+ width: 100%;
 56+ z-index: 10;
 57+}
 58+#lightbox-container-image-box > #lightbox-nav { left: 0; }
 59+#lightbox-nav a { outline: none;}
 60+#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
 61+ width: 49%;
 62+ height: 100%;
 63+ zoom: 1;
 64+ display: block;
 65+}
 66+#lightbox-nav-btnPrev {
 67+ left: 0;
 68+ float: left;
 69+}
 70+#lightbox-nav-btnNext {
 71+ right: 0;
 72+ float: right;
 73+}
 74+#lightbox-container-image-data-box {
 75+ font: 10px Verdana, Helvetica, sans-serif;
 76+ background-color: #fff;
 77+ margin: 0 auto;
 78+ line-height: 1.4em;
 79+ overflow: auto;
 80+ width: 100%;
 81+ padding: 0 10px 0;
 82+}
 83+#lightbox-container-image-data {
 84+ padding: 0 10px;
 85+ color: #666;
 86+}
 87+#lightbox-container-image-data #lightbox-image-details {
 88+ width: 70%;
 89+ float: left;
 90+ text-align: left;
 91+}
 92+#lightbox-image-details-caption { font-weight: bold; }
 93+#lightbox-image-details-currentNumber {
 94+ display: block;
 95+ clear: left;
 96+ padding-bottom: 1.0em;
 97+}
 98+#lightbox-secNav-btnClose {
 99+ width: 66px;
 100+ float: right;
 101+ padding-bottom: 0.7em;
102102 }
\ No newline at end of file
Property changes on: trunk/extensions/GeeQuBox/css/jquery.lightbox-0.5.css
___________________________________________________________________
Added: svn:eol-style
103103 + native
Index: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.pack.js
@@ -1,14 +1,14 @@
2 -/**
3 - * jQuery lightBox plugin
4 - * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
5 - * and adapted to me for use like a plugin from jQuery.
6 - * @name jquery-lightbox-0.5.js
7 - * @author Leandro Vieira Pinho - http://leandrovieira.com
8 - * @version 0.5
9 - * @date April 11, 2008
10 - * @category jQuery plugin
11 - * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
12 - * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
13 - * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
14 - */
 2+/**
 3+ * jQuery lightBox plugin
 4+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 5+ * and adapted to me for use like a plugin from jQuery.
 6+ * @name jquery-lightbox-0.5.js
 7+ * @author Leandro Vieira Pinho - http://leandrovieira.com
 8+ * @version 0.5
 9+ * @date April 11, 2008
 10+ * @category jQuery plugin
 11+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 12+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
 13+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 14+ */
1515 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}('(6($){$.2N.3g=6(4){4=23.2H({2B:\'#34\',2g:0.8,1d:F,1M:\'18/5-33-Y.16\',1v:\'18/5-1u-2Q.16\',1E:\'18/5-1u-2L.16\',1W:\'18/5-1u-2I.16\',19:\'18/5-2F.16\',1f:10,2A:3d,2s:\'1j\',2o:\'32\',2j:\'c\',2f:\'p\',2d:\'n\',h:[],9:0},4);f I=N;6 20(){1X(N,I);u F}6 1X(1e,I){$(\'1U, 1S, 1R\').l({\'1Q\':\'2E\'});1O();4.h.B=0;4.9=0;7(I.B==1){4.h.1J(v 1m(1e.17(\'J\'),1e.17(\'2v\')))}j{36(f i=0;i<I.B;i++){4.h.1J(v 1m(I[i].17(\'J\'),I[i].17(\'2v\')))}}2n(4.h[4.9][0]!=1e.17(\'J\')){4.9++}D()}6 1O(){$(\'m\').31(\'<e g="q-13"></e><e g="q-5"><e g="5-s-b-w"><e g="5-s-b"><1w g="5-b"><e 2V="" g="5-k"><a J="#" g="5-k-V"></a><a J="#" g="5-k-X"></a></e><e g="5-Y"><a J="#" g="5-Y-29"><1w W="\'+4.1M+\'"></a></e></e></e><e g="5-s-b-T-w"><e g="5-s-b-T"><e g="5-b-A"><1i g="5-b-A-1t"></1i><1i g="5-b-A-1g"></1i></e><e g="5-1s"><a J="#" g="5-1s-22"><1w W="\'+4.1W+\'"></a></e></e></e></e>\');f z=1D();$(\'#q-13\').l({2K:4.2B,2J:4.2g,S:z[0],P:z[1]}).1V();f R=1p();$(\'#q-5\').l({1T:R[1]+(z[3]/10),1c:R[0]}).E();$(\'#q-13,#q-5\').C(6(){1a()});$(\'#5-Y-29,#5-1s-22\').C(6(){1a();u F});$(G).2G(6(){f z=1D();$(\'#q-13\').l({S:z[0],P:z[1]});f R=1p();$(\'#q-5\').l({1T:R[1]+(z[3]/10),1c:R[0]})})}6 D(){$(\'#5-Y\').E();7(4.1d){$(\'#5-b,#5-s-b-T-w,#5-b-A-1g\').1b()}j{$(\'#5-b,#5-k,#5-k-V,#5-k-X,#5-s-b-T-w,#5-b-A-1g\').1b()}f Q=v 1j();Q.1P=6(){$(\'#5-b\').2D(\'W\',4.h[4.9][0]);1N(Q.S,Q.P);Q.1P=6(){}};Q.W=4.h[4.9][0]};6 1N(1o,1r){f 1L=$(\'#5-s-b-w\').S();f 1K=$(\'#5-s-b-w\').P();f 1n=(1o+(4.1f*2));f 1y=(1r+(4.1f*2));f 1I=1L-1n;f 2z=1K-1y;$(\'#5-s-b-w\').3f({S:1n,P:1y},4.2A,6(){2y()});7((1I==0)&&(2z==0)){7($.3e.3c){1H(3b)}j{1H(3a)}}$(\'#5-s-b-T-w\').l({S:1o});$(\'#5-k-V,#5-k-X\').l({P:1r+(4.1f*2)})};6 2y(){$(\'#5-Y\').1b();$(\'#5-b\').1V(6(){2u();2t()});2r()};6 2u(){$(\'#5-s-b-T-w\').38(\'35\');$(\'#5-b-A-1t\').1b();7(4.h[4.9][1]){$(\'#5-b-A-1t\').2p(4.h[4.9][1]).E()}7(4.h.B>1){$(\'#5-b-A-1g\').2p(4.2s+\' \'+(4.9+1)+\' \'+4.2o+\' \'+4.h.B).E()}}6 2t(){$(\'#5-k\').E();$(\'#5-k-V,#5-k-X\').l({\'K\':\'1C M(\'+4.19+\') L-O\'});7(4.9!=0){7(4.1d){$(\'#5-k-V\').l({\'K\':\'M(\'+4.1v+\') 1c 15% L-O\'}).11().1k(\'C\',6(){4.9=4.9-1;D();u F})}j{$(\'#5-k-V\').11().2m(6(){$(N).l({\'K\':\'M(\'+4.1v+\') 1c 15% L-O\'})},6(){$(N).l({\'K\':\'1C M(\'+4.19+\') L-O\'})}).E().1k(\'C\',6(){4.9=4.9-1;D();u F})}}7(4.9!=(4.h.B-1)){7(4.1d){$(\'#5-k-X\').l({\'K\':\'M(\'+4.1E+\') 2l 15% L-O\'}).11().1k(\'C\',6(){4.9=4.9+1;D();u F})}j{$(\'#5-k-X\').11().2m(6(){$(N).l({\'K\':\'M(\'+4.1E+\') 2l 15% L-O\'})},6(){$(N).l({\'K\':\'1C M(\'+4.19+\') L-O\'})}).E().1k(\'C\',6(){4.9=4.9+1;D();u F})}}2k()}6 2k(){$(d).30(6(12){2i(12)})}6 1G(){$(d).11()}6 2i(12){7(12==2h){U=2Z.2e;1x=27}j{U=12.2e;1x=12.2Y}14=2X.2W(U).2U();7((14==4.2j)||(14==\'x\')||(U==1x)){1a()}7((14==4.2f)||(U==37)){7(4.9!=0){4.9=4.9-1;D();1G()}}7((14==4.2d)||(U==39)){7(4.9!=(4.h.B-1)){4.9=4.9+1;D();1G()}}}6 2r(){7((4.h.B-1)>4.9){2c=v 1j();2c.W=4.h[4.9+1][0]}7(4.9>0){2b=v 1j();2b.W=4.h[4.9-1][0]}}6 1a(){$(\'#q-5\').2a();$(\'#q-13\').2T(6(){$(\'#q-13\').2a()});$(\'1U, 1S, 1R\').l({\'1Q\':\'2S\'})}6 1D(){f o,r;7(G.1h&&G.28){o=G.26+G.2R;r=G.1h+G.28}j 7(d.m.25>d.m.24){o=d.m.2P;r=d.m.25}j{o=d.m.2O;r=d.m.24}f y,H;7(Z.1h){7(d.t.1l){y=d.t.1l}j{y=Z.26}H=Z.1h}j 7(d.t&&d.t.1A){y=d.t.1l;H=d.t.1A}j 7(d.m){y=d.m.1l;H=d.m.1A}7(r<H){1z=H}j{1z=r}7(o<y){1B=o}j{1B=y}21=v 1m(1B,1z,y,H);u 21};6 1p(){f o,r;7(Z.1Z){r=Z.1Z;o=Z.2M}j 7(d.t&&d.t.1F){r=d.t.1F;o=d.t.1Y}j 7(d.m){r=d.m.1F;o=d.m.1Y}2q=v 1m(o,r);u 2q};6 1H(2C){f 2x=v 2w();1q=2h;3h{f 1q=v 2w()}2n(1q-2x<2C)};u N.11(\'C\').C(20)}})(23);',62,204,'||||settings|lightbox|function|if||activeImage||image||document|div|var|id|imageArray||else|nav|css|body||xScroll||jquery|yScroll|container|documentElement|return|new|box||windowWidth|arrPageSizes|details|length|click|_set_image_to_view|show|false|window|windowHeight|jQueryMatchedObj|href|background|no|url|this|repeat|height|objImagePreloader|arrPageScroll|width|data|keycode|btnPrev|src|btnNext|loading|self||unbind|objEvent|overlay|key||gif|getAttribute|images|imageBlank|_finish|hide|left|fixedNavigation|objClicked|containerBorderSize|currentNumber|innerHeight|span|Image|bind|clientWidth|Array|intWidth|intImageWidth|___getPageScroll|curDate|intImageHeight|secNav|caption|btn|imageBtnPrev|img|escapeKey|intHeight|pageHeight|clientHeight|pageWidth|transparent|___getPageSize|imageBtnNext|scrollTop|_disable_keyboard_navigation|___pause|intDiffW|push|intCurrentHeight|intCurrentWidth|imageLoading|_resize_container_image_box|_set_interface|onload|visibility|select|object|top|embed|fadeIn|imageBtnClose|_start|scrollLeft|pageYOffset|_initialize|arrayPageSize|btnClose|jQuery|offsetHeight|scrollHeight|innerWidth||scrollMaxY|link|remove|objPrev|objNext|keyToNext|keyCode|keyToPrev|overlayOpacity|null|_keyboard_action|keyToClose|_enable_keyboard_navigation|right|hover|while|txtOf|html|arrayPageScroll|_preload_neighbor_images|txtImage|_set_navigation|_show_image_data|title|Date|date|_show_image|intDiffH|containerResizeSpeed|overlayBgColor|ms|attr|hidden|blank|resize|extend|close|opacity|backgroundColor|next|pageXOffset|fn|offsetWidth|scrollWidth|prev|scrollMaxX|visible|fadeOut|toLowerCase|style|fromCharCode|String|DOM_VK_ESCAPE|event|keydown|append|of|ico|000|fast|for||slideDown||100|250|msie|400|browser|animate|lightBox|do'.split('|'),0,{}))
\ No newline at end of file
Property changes on: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.pack.js
___________________________________________________________________
Added: svn:eol-style
1616 + native
Index: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.js
@@ -1,472 +1,472 @@
2 -/**
3 - * jQuery lightBox plugin
4 - * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
5 - * and adapted to me for use like a plugin from jQuery.
6 - * @name jquery-lightbox-0.5.js
7 - * @author Leandro Vieira Pinho - http://leandrovieira.com
8 - * @version 0.5
9 - * @date April 11, 2008
10 - * @category jQuery plugin
11 - * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
12 - * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
13 - * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
14 - */
15 -
16 -// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
17 -(function($) {
18 - /**
19 - * $ is an alias to jQuery object
20 - *
21 - */
22 - $.fn.lightBox = function(settings) {
23 - // Settings to configure the jQuery lightBox plugin how you like
24 - settings = jQuery.extend({
25 - // Configuration related to overlay
26 - overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
27 - overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
28 - // Configuration related to navigation
29 - fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
30 - // Configuration related to images
31 - imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
32 - imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
33 - imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
34 - imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
35 - imageBlank: 'images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
36 - // Configuration related to container image box
37 - containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
38 - containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
39 - // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
40 - txtImage: 'Image', // (string) Specify text "Image"
41 - txtOf: 'of', // (string) Specify text "of"
42 - // Configuration related to keyboard navigation
43 - keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
44 - keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
45 - keyToNext: 'n', // (string) (n = next) Letter to show the next image.
46 - // Don�t alter these variables in any way
47 - imageArray: [],
48 - activeImage: 0
49 - },settings);
50 - // Caching the jQuery object with all elements matched
51 - var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
52 - /**
53 - * Initializing the plugin calling the start function
54 - *
55 - * @return boolean false
56 - */
57 - function _initialize() {
58 - _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
59 - return false; // Avoid the browser following the link
60 - }
61 - /**
62 - * Start the jQuery lightBox plugin
63 - *
64 - * @param object objClicked The object (link) whick the user have clicked
65 - * @param object jQueryMatchedObj The jQuery object with all elements matched
66 - */
67 - function _start(objClicked,jQueryMatchedObj) {
68 - // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
69 - $('embed, object, select').css({ 'visibility' : 'hidden' });
70 - // Call the function to create the markup structure; style some elements; assign events in some elements.
71 - _set_interface();
72 - // Unset total images in imageArray
73 - settings.imageArray.length = 0;
74 - // Unset image active information
75 - settings.activeImage = 0;
76 - // We have an image set? Or just an image? Let�s see it.
77 - if ( jQueryMatchedObj.length == 1 ) {
78 - settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
79 - } else {
80 - // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
81 - for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
82 - settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
83 - }
84 - }
85 - while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
86 - settings.activeImage++;
87 - }
88 - // Call the function that prepares image exibition
89 - _set_image_to_view();
90 - }
91 - /**
92 - * Create the jQuery lightBox plugin interface
93 - *
94 - * The HTML markup will be like that:
95 - <div id="jquery-overlay"></div>
96 - <div id="jquery-lightbox">
97 - <div id="lightbox-container-image-box">
98 - <div id="lightbox-container-image">
99 - <img src="../fotos/XX.jpg" id="lightbox-image">
100 - <div id="lightbox-nav">
101 - <a href="#" id="lightbox-nav-btnPrev"></a>
102 - <a href="#" id="lightbox-nav-btnNext"></a>
103 - </div>
104 - <div id="lightbox-loading">
105 - <a href="#" id="lightbox-loading-link">
106 - <img src="../images/lightbox-ico-loading.gif">
107 - </a>
108 - </div>
109 - </div>
110 - </div>
111 - <div id="lightbox-container-image-data-box">
112 - <div id="lightbox-container-image-data">
113 - <div id="lightbox-image-details">
114 - <span id="lightbox-image-details-caption"></span>
115 - <span id="lightbox-image-details-currentNumber"></span>
116 - </div>
117 - <div id="lightbox-secNav">
118 - <a href="#" id="lightbox-secNav-btnClose">
119 - <img src="../images/lightbox-btn-close.gif">
120 - </a>
121 - </div>
122 - </div>
123 - </div>
124 - </div>
125 - *
126 - */
127 - function _set_interface() {
128 - // Apply the HTML markup into body tag
129 - $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
130 - // Get page sizes
131 - var arrPageSizes = ___getPageSize();
132 - // Style overlay and show it
133 - $('#jquery-overlay').css({
134 - backgroundColor: settings.overlayBgColor,
135 - opacity: settings.overlayOpacity,
136 - width: arrPageSizes[0],
137 - height: arrPageSizes[1]
138 - }).fadeIn();
139 - // Get page scroll
140 - var arrPageScroll = ___getPageScroll();
141 - // Calculate top and left offset for the jquery-lightbox div object and show it
142 - $('#jquery-lightbox').css({
143 - top: arrPageScroll[1] + (arrPageSizes[3] / 10),
144 - left: arrPageScroll[0]
145 - }).show();
146 - // Assigning click events in elements to close overlay
147 - $('#jquery-overlay,#jquery-lightbox').click(function() {
148 - _finish();
149 - });
150 - // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
151 - $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
152 - _finish();
153 - return false;
154 - });
155 - // If window was resized, calculate the new overlay dimensions
156 - $(window).resize(function() {
157 - // Get page sizes
158 - var arrPageSizes = ___getPageSize();
159 - // Style overlay and show it
160 - $('#jquery-overlay').css({
161 - width: arrPageSizes[0],
162 - height: arrPageSizes[1]
163 - });
164 - // Get page scroll
165 - var arrPageScroll = ___getPageScroll();
166 - // Calculate top and left offset for the jquery-lightbox div object and show it
167 - $('#jquery-lightbox').css({
168 - top: arrPageScroll[1] + (arrPageSizes[3] / 10),
169 - left: arrPageScroll[0]
170 - });
171 - });
172 - }
173 - /**
174 - * Prepares image exibition; doing a image�s preloader to calculate it�s size
175 - *
176 - */
177 - function _set_image_to_view() { // show the loading
178 - // Show the loading
179 - $('#lightbox-loading').show();
180 - if ( settings.fixedNavigation ) {
181 - $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
182 - } else {
183 - // Hide some elements
184 - $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
185 - }
186 - // Image preload process
187 - var objImagePreloader = new Image();
188 - objImagePreloader.onload = function() {
189 - $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
190 - // Perfomance an effect in the image container resizing it
191 - _resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
192 - // clear onLoad, IE behaves irratically with animated gifs otherwise
193 - objImagePreloader.onload=function(){};
194 - };
195 - objImagePreloader.src = settings.imageArray[settings.activeImage][0];
196 - };
197 - /**
198 - * Perfomance an effect in the image container resizing it
199 - *
200 - * @param integer intImageWidth The image�s width that will be showed
201 - * @param integer intImageHeight The image�s height that will be showed
202 - */
203 - function _resize_container_image_box(intImageWidth,intImageHeight) {
204 - // Get current width and height
205 - var intCurrentWidth = $('#lightbox-container-image-box').width();
206 - var intCurrentHeight = $('#lightbox-container-image-box').height();
207 - // Get the width and height of the selected image plus the padding
208 - var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value
209 - var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value
210 - // Diferences
211 - var intDiffW = intCurrentWidth - intWidth;
212 - var intDiffH = intCurrentHeight - intHeight;
213 - // Perfomance the effect
214 - $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
215 - if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
216 - if ( $.browser.msie ) {
217 - ___pause(250);
218 - } else {
219 - ___pause(100);
220 - }
221 - }
222 - $('#lightbox-container-image-data-box').css({ width: intImageWidth });
223 - $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
224 - };
225 - /**
226 - * Show the prepared image
227 - *
228 - */
229 - function _show_image() {
230 - $('#lightbox-loading').hide();
231 - $('#lightbox-image').fadeIn(function() {
232 - _show_image_data();
233 - _set_navigation();
234 - });
235 - _preload_neighbor_images();
236 - };
237 - /**
238 - * Show the image information
239 - *
240 - */
241 - function _show_image_data() {
242 - $('#lightbox-container-image-data-box').slideDown('fast');
243 - $('#lightbox-image-details-caption').hide();
244 - if ( settings.imageArray[settings.activeImage][1] ) {
245 - $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
246 - }
247 - // If we have a image set, display 'Image X of X'
248 - if ( settings.imageArray.length > 1 ) {
249 - $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
250 - }
251 - }
252 - /**
253 - * Display the button navigations
254 - *
255 - */
256 - function _set_navigation() {
257 - $('#lightbox-nav').show();
258 -
259 - // Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just.
260 - $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
261 -
262 - // Show the prev button, if not the first image in set
263 - if ( settings.activeImage != 0 ) {
264 - if ( settings.fixedNavigation ) {
265 - $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
266 - .unbind()
267 - .bind('click',function() {
268 - settings.activeImage = settings.activeImage - 1;
269 - _set_image_to_view();
270 - return false;
271 - });
272 - } else {
273 - // Show the images button for Next buttons
274 - $('#lightbox-nav-btnPrev').unbind().hover(function() {
275 - $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
276 - },function() {
277 - $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
278 - }).show().bind('click',function() {
279 - settings.activeImage = settings.activeImage - 1;
280 - _set_image_to_view();
281 - return false;
282 - });
283 - }
284 - }
285 -
286 - // Show the next button, if not the last image in set
287 - if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
288 - if ( settings.fixedNavigation ) {
289 - $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
290 - .unbind()
291 - .bind('click',function() {
292 - settings.activeImage = settings.activeImage + 1;
293 - _set_image_to_view();
294 - return false;
295 - });
296 - } else {
297 - // Show the images button for Next buttons
298 - $('#lightbox-nav-btnNext').unbind().hover(function() {
299 - $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
300 - },function() {
301 - $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
302 - }).show().bind('click',function() {
303 - settings.activeImage = settings.activeImage + 1;
304 - _set_image_to_view();
305 - return false;
306 - });
307 - }
308 - }
309 - // Enable keyboard navigation
310 - _enable_keyboard_navigation();
311 - }
312 - /**
313 - * Enable a support to keyboard navigation
314 - *
315 - */
316 - function _enable_keyboard_navigation() {
317 - $(document).keydown(function(objEvent) {
318 - _keyboard_action(objEvent);
319 - });
320 - }
321 - /**
322 - * Disable the support to keyboard navigation
323 - *
324 - */
325 - function _disable_keyboard_navigation() {
326 - $(document).unbind();
327 - }
328 - /**
329 - * Perform the keyboard actions
330 - *
331 - */
332 - function _keyboard_action(objEvent) {
333 - // To ie
334 - if ( objEvent == null ) {
335 - keycode = event.keyCode;
336 - escapeKey = 27;
337 - // To Mozilla
338 - } else {
339 - keycode = objEvent.keyCode;
340 - escapeKey = objEvent.DOM_VK_ESCAPE;
341 - }
342 - // Get the key in lower case form
343 - key = String.fromCharCode(keycode).toLowerCase();
344 - // Verify the keys to close the ligthBox
345 - if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
346 - _finish();
347 - }
348 - // Verify the key to show the previous image
349 - if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
350 - // If we�re not showing the first image, call the previous
351 - if ( settings.activeImage != 0 ) {
352 - settings.activeImage = settings.activeImage - 1;
353 - _set_image_to_view();
354 - _disable_keyboard_navigation();
355 - }
356 - }
357 - // Verify the key to show the next image
358 - if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
359 - // If we�re not showing the last image, call the next
360 - if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
361 - settings.activeImage = settings.activeImage + 1;
362 - _set_image_to_view();
363 - _disable_keyboard_navigation();
364 - }
365 - }
366 - }
367 - /**
368 - * Preload prev and next images being showed
369 - *
370 - */
371 - function _preload_neighbor_images() {
372 - if ( (settings.imageArray.length -1) > settings.activeImage ) {
373 - objNext = new Image();
374 - objNext.src = settings.imageArray[settings.activeImage + 1][0];
375 - }
376 - if ( settings.activeImage > 0 ) {
377 - objPrev = new Image();
378 - objPrev.src = settings.imageArray[settings.activeImage -1][0];
379 - }
380 - }
381 - /**
382 - * Remove jQuery lightBox plugin HTML markup
383 - *
384 - */
385 - function _finish() {
386 - $('#jquery-lightbox').remove();
387 - $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
388 - // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
389 - $('embed, object, select').css({ 'visibility' : 'visible' });
390 - }
391 - /**
392 - / THIRD FUNCTION
393 - * getPageSize() by quirksmode.com
394 - *
395 - * @return Array Return an array with page width, height and window width, height
396 - */
397 - function ___getPageSize() {
398 - var xScroll, yScroll;
399 - if (window.innerHeight && window.scrollMaxY) {
400 - xScroll = window.innerWidth + window.scrollMaxX;
401 - yScroll = window.innerHeight + window.scrollMaxY;
402 - } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
403 - xScroll = document.body.scrollWidth;
404 - yScroll = document.body.scrollHeight;
405 - } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
406 - xScroll = document.body.offsetWidth;
407 - yScroll = document.body.offsetHeight;
408 - }
409 - var windowWidth, windowHeight;
410 - if (self.innerHeight) { // all except Explorer
411 - if(document.documentElement.clientWidth){
412 - windowWidth = document.documentElement.clientWidth;
413 - } else {
414 - windowWidth = self.innerWidth;
415 - }
416 - windowHeight = self.innerHeight;
417 - } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
418 - windowWidth = document.documentElement.clientWidth;
419 - windowHeight = document.documentElement.clientHeight;
420 - } else if (document.body) { // other Explorers
421 - windowWidth = document.body.clientWidth;
422 - windowHeight = document.body.clientHeight;
423 - }
424 - // for small pages with total height less then height of the viewport
425 - if(yScroll < windowHeight){
426 - pageHeight = windowHeight;
427 - } else {
428 - pageHeight = yScroll;
429 - }
430 - // for small pages with total width less then width of the viewport
431 - if(xScroll < windowWidth){
432 - pageWidth = xScroll;
433 - } else {
434 - pageWidth = windowWidth;
435 - }
436 - arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
437 - return arrayPageSize;
438 - };
439 - /**
440 - / THIRD FUNCTION
441 - * getPageScroll() by quirksmode.com
442 - *
443 - * @return Array Return an array with x,y page scroll values.
444 - */
445 - function ___getPageScroll() {
446 - var xScroll, yScroll;
447 - if (self.pageYOffset) {
448 - yScroll = self.pageYOffset;
449 - xScroll = self.pageXOffset;
450 - } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
451 - yScroll = document.documentElement.scrollTop;
452 - xScroll = document.documentElement.scrollLeft;
453 - } else if (document.body) {// all other Explorers
454 - yScroll = document.body.scrollTop;
455 - xScroll = document.body.scrollLeft;
456 - }
457 - arrayPageScroll = new Array(xScroll,yScroll);
458 - return arrayPageScroll;
459 - };
460 - /**
461 - * Stop the code execution from a escified time in milisecond
462 - *
463 - */
464 - function ___pause(ms) {
465 - var date = new Date();
466 - curDate = null;
467 - do { var curDate = new Date(); }
468 - while ( curDate - date < ms);
469 - };
470 - // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
471 - return this.unbind('click').click(_initialize);
472 - };
 2+/**
 3+ * jQuery lightBox plugin
 4+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 5+ * and adapted to me for use like a plugin from jQuery.
 6+ * @name jquery-lightbox-0.5.js
 7+ * @author Leandro Vieira Pinho - http://leandrovieira.com
 8+ * @version 0.5
 9+ * @date April 11, 2008
 10+ * @category jQuery plugin
 11+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 12+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
 13+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 14+ */
 15+
 16+// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
 17+(function($) {
 18+ /**
 19+ * $ is an alias to jQuery object
 20+ *
 21+ */
 22+ $.fn.lightBox = function(settings) {
 23+ // Settings to configure the jQuery lightBox plugin how you like
 24+ settings = jQuery.extend({
 25+ // Configuration related to overlay
 26+ overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
 27+ overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
 28+ // Configuration related to navigation
 29+ fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
 30+ // Configuration related to images
 31+ imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
 32+ imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
 33+ imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
 34+ imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
 35+ imageBlank: 'images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
 36+ // Configuration related to container image box
 37+ containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
 38+ containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
 39+ // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
 40+ txtImage: 'Image', // (string) Specify text "Image"
 41+ txtOf: 'of', // (string) Specify text "of"
 42+ // Configuration related to keyboard navigation
 43+ keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
 44+ keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
 45+ keyToNext: 'n', // (string) (n = next) Letter to show the next image.
 46+ // Don�t alter these variables in any way
 47+ imageArray: [],
 48+ activeImage: 0
 49+ },settings);
 50+ // Caching the jQuery object with all elements matched
 51+ var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
 52+ /**
 53+ * Initializing the plugin calling the start function
 54+ *
 55+ * @return boolean false
 56+ */
 57+ function _initialize() {
 58+ _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
 59+ return false; // Avoid the browser following the link
 60+ }
 61+ /**
 62+ * Start the jQuery lightBox plugin
 63+ *
 64+ * @param object objClicked The object (link) whick the user have clicked
 65+ * @param object jQueryMatchedObj The jQuery object with all elements matched
 66+ */
 67+ function _start(objClicked,jQueryMatchedObj) {
 68+ // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
 69+ $('embed, object, select').css({ 'visibility' : 'hidden' });
 70+ // Call the function to create the markup structure; style some elements; assign events in some elements.
 71+ _set_interface();
 72+ // Unset total images in imageArray
 73+ settings.imageArray.length = 0;
 74+ // Unset image active information
 75+ settings.activeImage = 0;
 76+ // We have an image set? Or just an image? Let�s see it.
 77+ if ( jQueryMatchedObj.length == 1 ) {
 78+ settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
 79+ } else {
 80+ // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
 81+ for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
 82+ settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
 83+ }
 84+ }
 85+ while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
 86+ settings.activeImage++;
 87+ }
 88+ // Call the function that prepares image exibition
 89+ _set_image_to_view();
 90+ }
 91+ /**
 92+ * Create the jQuery lightBox plugin interface
 93+ *
 94+ * The HTML markup will be like that:
 95+ <div id="jquery-overlay"></div>
 96+ <div id="jquery-lightbox">
 97+ <div id="lightbox-container-image-box">
 98+ <div id="lightbox-container-image">
 99+ <img src="../fotos/XX.jpg" id="lightbox-image">
 100+ <div id="lightbox-nav">
 101+ <a href="#" id="lightbox-nav-btnPrev"></a>
 102+ <a href="#" id="lightbox-nav-btnNext"></a>
 103+ </div>
 104+ <div id="lightbox-loading">
 105+ <a href="#" id="lightbox-loading-link">
 106+ <img src="../images/lightbox-ico-loading.gif">
 107+ </a>
 108+ </div>
 109+ </div>
 110+ </div>
 111+ <div id="lightbox-container-image-data-box">
 112+ <div id="lightbox-container-image-data">
 113+ <div id="lightbox-image-details">
 114+ <span id="lightbox-image-details-caption"></span>
 115+ <span id="lightbox-image-details-currentNumber"></span>
 116+ </div>
 117+ <div id="lightbox-secNav">
 118+ <a href="#" id="lightbox-secNav-btnClose">
 119+ <img src="../images/lightbox-btn-close.gif">
 120+ </a>
 121+ </div>
 122+ </div>
 123+ </div>
 124+ </div>
 125+ *
 126+ */
 127+ function _set_interface() {
 128+ // Apply the HTML markup into body tag
 129+ $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
 130+ // Get page sizes
 131+ var arrPageSizes = ___getPageSize();
 132+ // Style overlay and show it
 133+ $('#jquery-overlay').css({
 134+ backgroundColor: settings.overlayBgColor,
 135+ opacity: settings.overlayOpacity,
 136+ width: arrPageSizes[0],
 137+ height: arrPageSizes[1]
 138+ }).fadeIn();
 139+ // Get page scroll
 140+ var arrPageScroll = ___getPageScroll();
 141+ // Calculate top and left offset for the jquery-lightbox div object and show it
 142+ $('#jquery-lightbox').css({
 143+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
 144+ left: arrPageScroll[0]
 145+ }).show();
 146+ // Assigning click events in elements to close overlay
 147+ $('#jquery-overlay,#jquery-lightbox').click(function() {
 148+ _finish();
 149+ });
 150+ // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
 151+ $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
 152+ _finish();
 153+ return false;
 154+ });
 155+ // If window was resized, calculate the new overlay dimensions
 156+ $(window).resize(function() {
 157+ // Get page sizes
 158+ var arrPageSizes = ___getPageSize();
 159+ // Style overlay and show it
 160+ $('#jquery-overlay').css({
 161+ width: arrPageSizes[0],
 162+ height: arrPageSizes[1]
 163+ });
 164+ // Get page scroll
 165+ var arrPageScroll = ___getPageScroll();
 166+ // Calculate top and left offset for the jquery-lightbox div object and show it
 167+ $('#jquery-lightbox').css({
 168+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
 169+ left: arrPageScroll[0]
 170+ });
 171+ });
 172+ }
 173+ /**
 174+ * Prepares image exibition; doing a image�s preloader to calculate it�s size
 175+ *
 176+ */
 177+ function _set_image_to_view() { // show the loading
 178+ // Show the loading
 179+ $('#lightbox-loading').show();
 180+ if ( settings.fixedNavigation ) {
 181+ $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
 182+ } else {
 183+ // Hide some elements
 184+ $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
 185+ }
 186+ // Image preload process
 187+ var objImagePreloader = new Image();
 188+ objImagePreloader.onload = function() {
 189+ $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
 190+ // Perfomance an effect in the image container resizing it
 191+ _resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
 192+ // clear onLoad, IE behaves irratically with animated gifs otherwise
 193+ objImagePreloader.onload=function(){};
 194+ };
 195+ objImagePreloader.src = settings.imageArray[settings.activeImage][0];
 196+ };
 197+ /**
 198+ * Perfomance an effect in the image container resizing it
 199+ *
 200+ * @param integer intImageWidth The image�s width that will be showed
 201+ * @param integer intImageHeight The image�s height that will be showed
 202+ */
 203+ function _resize_container_image_box(intImageWidth,intImageHeight) {
 204+ // Get current width and height
 205+ var intCurrentWidth = $('#lightbox-container-image-box').width();
 206+ var intCurrentHeight = $('#lightbox-container-image-box').height();
 207+ // Get the width and height of the selected image plus the padding
 208+ var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value
 209+ var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value
 210+ // Diferences
 211+ var intDiffW = intCurrentWidth - intWidth;
 212+ var intDiffH = intCurrentHeight - intHeight;
 213+ // Perfomance the effect
 214+ $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
 215+ if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
 216+ if ( $.browser.msie ) {
 217+ ___pause(250);
 218+ } else {
 219+ ___pause(100);
 220+ }
 221+ }
 222+ $('#lightbox-container-image-data-box').css({ width: intImageWidth });
 223+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
 224+ };
 225+ /**
 226+ * Show the prepared image
 227+ *
 228+ */
 229+ function _show_image() {
 230+ $('#lightbox-loading').hide();
 231+ $('#lightbox-image').fadeIn(function() {
 232+ _show_image_data();
 233+ _set_navigation();
 234+ });
 235+ _preload_neighbor_images();
 236+ };
 237+ /**
 238+ * Show the image information
 239+ *
 240+ */
 241+ function _show_image_data() {
 242+ $('#lightbox-container-image-data-box').slideDown('fast');
 243+ $('#lightbox-image-details-caption').hide();
 244+ if ( settings.imageArray[settings.activeImage][1] ) {
 245+ $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
 246+ }
 247+ // If we have a image set, display 'Image X of X'
 248+ if ( settings.imageArray.length > 1 ) {
 249+ $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
 250+ }
 251+ }
 252+ /**
 253+ * Display the button navigations
 254+ *
 255+ */
 256+ function _set_navigation() {
 257+ $('#lightbox-nav').show();
 258+
 259+ // Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just.
 260+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
 261+
 262+ // Show the prev button, if not the first image in set
 263+ if ( settings.activeImage != 0 ) {
 264+ if ( settings.fixedNavigation ) {
 265+ $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
 266+ .unbind()
 267+ .bind('click',function() {
 268+ settings.activeImage = settings.activeImage - 1;
 269+ _set_image_to_view();
 270+ return false;
 271+ });
 272+ } else {
 273+ // Show the images button for Next buttons
 274+ $('#lightbox-nav-btnPrev').unbind().hover(function() {
 275+ $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
 276+ },function() {
 277+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
 278+ }).show().bind('click',function() {
 279+ settings.activeImage = settings.activeImage - 1;
 280+ _set_image_to_view();
 281+ return false;
 282+ });
 283+ }
 284+ }
 285+
 286+ // Show the next button, if not the last image in set
 287+ if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
 288+ if ( settings.fixedNavigation ) {
 289+ $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
 290+ .unbind()
 291+ .bind('click',function() {
 292+ settings.activeImage = settings.activeImage + 1;
 293+ _set_image_to_view();
 294+ return false;
 295+ });
 296+ } else {
 297+ // Show the images button for Next buttons
 298+ $('#lightbox-nav-btnNext').unbind().hover(function() {
 299+ $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
 300+ },function() {
 301+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
 302+ }).show().bind('click',function() {
 303+ settings.activeImage = settings.activeImage + 1;
 304+ _set_image_to_view();
 305+ return false;
 306+ });
 307+ }
 308+ }
 309+ // Enable keyboard navigation
 310+ _enable_keyboard_navigation();
 311+ }
 312+ /**
 313+ * Enable a support to keyboard navigation
 314+ *
 315+ */
 316+ function _enable_keyboard_navigation() {
 317+ $(document).keydown(function(objEvent) {
 318+ _keyboard_action(objEvent);
 319+ });
 320+ }
 321+ /**
 322+ * Disable the support to keyboard navigation
 323+ *
 324+ */
 325+ function _disable_keyboard_navigation() {
 326+ $(document).unbind();
 327+ }
 328+ /**
 329+ * Perform the keyboard actions
 330+ *
 331+ */
 332+ function _keyboard_action(objEvent) {
 333+ // To ie
 334+ if ( objEvent == null ) {
 335+ keycode = event.keyCode;
 336+ escapeKey = 27;
 337+ // To Mozilla
 338+ } else {
 339+ keycode = objEvent.keyCode;
 340+ escapeKey = objEvent.DOM_VK_ESCAPE;
 341+ }
 342+ // Get the key in lower case form
 343+ key = String.fromCharCode(keycode).toLowerCase();
 344+ // Verify the keys to close the ligthBox
 345+ if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
 346+ _finish();
 347+ }
 348+ // Verify the key to show the previous image
 349+ if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
 350+ // If we�re not showing the first image, call the previous
 351+ if ( settings.activeImage != 0 ) {
 352+ settings.activeImage = settings.activeImage - 1;
 353+ _set_image_to_view();
 354+ _disable_keyboard_navigation();
 355+ }
 356+ }
 357+ // Verify the key to show the next image
 358+ if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
 359+ // If we�re not showing the last image, call the next
 360+ if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
 361+ settings.activeImage = settings.activeImage + 1;
 362+ _set_image_to_view();
 363+ _disable_keyboard_navigation();
 364+ }
 365+ }
 366+ }
 367+ /**
 368+ * Preload prev and next images being showed
 369+ *
 370+ */
 371+ function _preload_neighbor_images() {
 372+ if ( (settings.imageArray.length -1) > settings.activeImage ) {
 373+ objNext = new Image();
 374+ objNext.src = settings.imageArray[settings.activeImage + 1][0];
 375+ }
 376+ if ( settings.activeImage > 0 ) {
 377+ objPrev = new Image();
 378+ objPrev.src = settings.imageArray[settings.activeImage -1][0];
 379+ }
 380+ }
 381+ /**
 382+ * Remove jQuery lightBox plugin HTML markup
 383+ *
 384+ */
 385+ function _finish() {
 386+ $('#jquery-lightbox').remove();
 387+ $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
 388+ // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
 389+ $('embed, object, select').css({ 'visibility' : 'visible' });
 390+ }
 391+ /**
 392+ / THIRD FUNCTION
 393+ * getPageSize() by quirksmode.com
 394+ *
 395+ * @return Array Return an array with page width, height and window width, height
 396+ */
 397+ function ___getPageSize() {
 398+ var xScroll, yScroll;
 399+ if (window.innerHeight && window.scrollMaxY) {
 400+ xScroll = window.innerWidth + window.scrollMaxX;
 401+ yScroll = window.innerHeight + window.scrollMaxY;
 402+ } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
 403+ xScroll = document.body.scrollWidth;
 404+ yScroll = document.body.scrollHeight;
 405+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
 406+ xScroll = document.body.offsetWidth;
 407+ yScroll = document.body.offsetHeight;
 408+ }
 409+ var windowWidth, windowHeight;
 410+ if (self.innerHeight) { // all except Explorer
 411+ if(document.documentElement.clientWidth){
 412+ windowWidth = document.documentElement.clientWidth;
 413+ } else {
 414+ windowWidth = self.innerWidth;
 415+ }
 416+ windowHeight = self.innerHeight;
 417+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
 418+ windowWidth = document.documentElement.clientWidth;
 419+ windowHeight = document.documentElement.clientHeight;
 420+ } else if (document.body) { // other Explorers
 421+ windowWidth = document.body.clientWidth;
 422+ windowHeight = document.body.clientHeight;
 423+ }
 424+ // for small pages with total height less then height of the viewport
 425+ if(yScroll < windowHeight){
 426+ pageHeight = windowHeight;
 427+ } else {
 428+ pageHeight = yScroll;
 429+ }
 430+ // for small pages with total width less then width of the viewport
 431+ if(xScroll < windowWidth){
 432+ pageWidth = xScroll;
 433+ } else {
 434+ pageWidth = windowWidth;
 435+ }
 436+ arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
 437+ return arrayPageSize;
 438+ };
 439+ /**
 440+ / THIRD FUNCTION
 441+ * getPageScroll() by quirksmode.com
 442+ *
 443+ * @return Array Return an array with x,y page scroll values.
 444+ */
 445+ function ___getPageScroll() {
 446+ var xScroll, yScroll;
 447+ if (self.pageYOffset) {
 448+ yScroll = self.pageYOffset;
 449+ xScroll = self.pageXOffset;
 450+ } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
 451+ yScroll = document.documentElement.scrollTop;
 452+ xScroll = document.documentElement.scrollLeft;
 453+ } else if (document.body) {// all other Explorers
 454+ yScroll = document.body.scrollTop;
 455+ xScroll = document.body.scrollLeft;
 456+ }
 457+ arrayPageScroll = new Array(xScroll,yScroll);
 458+ return arrayPageScroll;
 459+ };
 460+ /**
 461+ * Stop the code execution from a escified time in milisecond
 462+ *
 463+ */
 464+ function ___pause(ms) {
 465+ var date = new Date();
 466+ curDate = null;
 467+ do { var curDate = new Date(); }
 468+ while ( curDate - date < ms);
 469+ };
 470+ // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
 471+ return this.unbind('click').click(_initialize);
 472+ };
473473 })(jQuery); // Call and execute the function immediately passing the jQuery object
\ No newline at end of file
Property changes on: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.js
___________________________________________________________________
Added: svn:eol-style
474474 + native
Property changes on: trunk/extensions/GeeQuBox/js/jquery.js
___________________________________________________________________
Added: svn:eol-style
475475 + native
Index: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.min.js
@@ -1,42 +1,42 @@
2 -/**
3 - * jQuery lightBox plugin
4 - * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
5 - * and adapted to me for use like a plugin from jQuery.
6 - * @name jquery-lightbox-0.5.js
7 - * @author Leandro Vieira Pinho - http://leandrovieira.com
8 - * @version 0.5
9 - * @date April 11, 2008
10 - * @category jQuery plugin
11 - * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
12 - * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
13 - * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
14 - */
15 -(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'images/lightbox-ico-loading.gif',imageBtnPrev:'images/lightbox-btn-prev.gif',imageBtnNext:'images/lightbox-btn-next.gif',imageBtnClose:'images/lightbox-btn-close.gif',imageBlank:'images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
16 -function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
17 -while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
18 -_set_image_to_view();}
19 -function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
20 -function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
21 -var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
22 -$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
23 -if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
24 -function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
25 -if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
26 -_enable_keyboard_navigation();}
27 -function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
28 -function _disable_keyboard_navigation(){$(document).unbind();}
29 -function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
30 -key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
31 -if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
32 -if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
33 -function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
34 -if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
35 -function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
36 -function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
37 -var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
38 -windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
39 -if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
40 -if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
41 -arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
42 -arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
 2+/**
 3+ * jQuery lightBox plugin
 4+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 5+ * and adapted to me for use like a plugin from jQuery.
 6+ * @name jquery-lightbox-0.5.js
 7+ * @author Leandro Vieira Pinho - http://leandrovieira.com
 8+ * @version 0.5
 9+ * @date April 11, 2008
 10+ * @category jQuery plugin
 11+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 12+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
 13+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 14+ */
 15+(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'images/lightbox-ico-loading.gif',imageBtnPrev:'images/lightbox-btn-prev.gif',imageBtnNext:'images/lightbox-btn-next.gif',imageBtnClose:'images/lightbox-btn-close.gif',imageBlank:'images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
 16+function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
 17+while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
 18+_set_image_to_view();}
 19+function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
 20+function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
 21+var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
 22+$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
 23+if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
 24+function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
 25+if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
 26+_enable_keyboard_navigation();}
 27+function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
 28+function _disable_keyboard_navigation(){$(document).unbind();}
 29+function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
 30+key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
 31+if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
 32+if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
 33+function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
 34+if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
 35+function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
 36+function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
 37+var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
 38+windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
 39+if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
 40+if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
 41+arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
 42+arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
4343 while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery);
\ No newline at end of file
Property changes on: trunk/extensions/GeeQuBox/js/jquery.lightbox-0.5.min.js
___________________________________________________________________
Added: svn:eol-style
4444 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82056Initial import of GeeQuBoxkwisatz13:57, 13 February 2011

Status & tagging log