redde 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. data/.gitignore +20 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +24 -0
  5. data/LICENSE +22 -0
  6. data/README.md +57 -0
  7. data/Rakefile +2 -0
  8. data/lib/generators/redde/deploy/deploy_generator.rb +34 -0
  9. data/lib/generators/redde/deploy/templates/Capfile +4 -0
  10. data/lib/generators/redde/deploy/templates/deploy.rb +33 -0
  11. data/lib/generators/redde/deploy/templates/recipes/base.rb +16 -0
  12. data/lib/generators/redde/deploy/templates/recipes/check.rb +13 -0
  13. data/lib/generators/redde/deploy/templates/recipes/database.rb +66 -0
  14. data/lib/generators/redde/deploy/templates/recipes/imagemagick.rb +8 -0
  15. data/lib/generators/redde/deploy/templates/recipes/memcached.rb +10 -0
  16. data/lib/generators/redde/deploy/templates/recipes/monit.rb +35 -0
  17. data/lib/generators/redde/deploy/templates/recipes/nginx.rb +26 -0
  18. data/lib/generators/redde/deploy/templates/recipes/nodejs.rb +10 -0
  19. data/lib/generators/redde/deploy/templates/recipes/postfix.rb +37 -0
  20. data/lib/generators/redde/deploy/templates/recipes/rbenv.rb +17 -0
  21. data/lib/generators/redde/deploy/templates/recipes/templates/database.yml.erb +8 -0
  22. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.conf.erb +57 -0
  23. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.defaults.erb +11 -0
  24. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-keys.conf.erb +2 -0
  25. data/lib/generators/redde/deploy/templates/recipes/templates/gemrc.erb +1 -0
  26. data/lib/generators/redde/deploy/templates/recipes/templates/main.cf.erb +43 -0
  27. data/lib/generators/redde/deploy/templates/recipes/templates/memcached.erb +47 -0
  28. data/lib/generators/redde/deploy/templates/recipes/templates/monit_monitrc.erb +21 -0
  29. data/lib/generators/redde/deploy/templates/recipes/templates/monit_nginx.erb +5 -0
  30. data/lib/generators/redde/deploy/templates/recipes/templates/monit_unicorn.erb +14 -0
  31. data/lib/generators/redde/deploy/templates/recipes/templates/nginx_unicorn.erb +28 -0
  32. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn.rb.erb +36 -0
  33. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn_init.erb +84 -0
  34. data/lib/generators/redde/deploy/templates/recipes/unicorn.rb +27 -0
  35. data/lib/generators/redde/layout/layout_generator.rb +57 -0
  36. data/lib/generators/redde/layout/templates/assets/images/admin/addphoto.png +0 -0
  37. data/lib/generators/redde/layout/templates/assets/images/admin/ajaxloader2.gif +0 -0
  38. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_down.png +0 -0
  39. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_enter.png +0 -0
  40. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_right.png +0 -0
  41. data/lib/generators/redde/layout/templates/assets/images/admin/coins.png +0 -0
  42. data/lib/generators/redde/layout/templates/assets/images/admin/confirm.png +0 -0
  43. data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
  44. data/lib/generators/redde/layout/templates/assets/images/admin/delete.png +0 -0
  45. data/lib/generators/redde/layout/templates/assets/images/admin/email.png +0 -0
  46. data/lib/generators/redde/layout/templates/assets/images/admin/error.png +0 -0
  47. data/lib/generators/redde/layout/templates/assets/images/admin/fio.png +0 -0
  48. data/lib/generators/redde/layout/templates/assets/images/admin/folder.png +0 -0
  49. data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
  50. data/lib/generators/redde/layout/templates/assets/images/admin/icon_eye.gif +0 -0
  51. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +101 -0
  52. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
  53. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
  54. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
  55. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
  56. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
  57. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.js +32 -0
  58. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +477 -0
  59. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +42 -0
  60. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +14 -0
  61. data/lib/generators/redde/layout/templates/assets/images/admin/logo.png +0 -0
  62. data/lib/generators/redde/layout/templates/assets/images/admin/logo_reddeshop.png +0 -0
  63. data/lib/generators/redde/layout/templates/assets/images/admin/move_handler.png +0 -0
  64. data/lib/generators/redde/layout/templates/assets/images/admin/phone.png +0 -0
  65. data/lib/generators/redde/layout/templates/assets/images/admin/photo_ico.png +0 -0
  66. data/lib/generators/redde/layout/templates/assets/images/admin/print.png +0 -0
  67. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/docstyle.css +123 -0
  68. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/redactor.css +369 -0
  69. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/style.css +119 -0
  70. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/wym.css +136 -0
  71. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/img/icons.png +0 -0
  72. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/by.js +72 -0
  73. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/de.js +75 -0
  74. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/en.js +76 -0
  75. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/es.js +76 -0
  76. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/fr.js +74 -0
  77. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/hu.js +76 -0
  78. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/it.js +76 -0
  79. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ja.js +76 -0
  80. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/lv.js +74 -0
  81. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/nl.js +76 -0
  82. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pl.js +75 -0
  83. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pt_br.js +81 -0
  84. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ru.js +75 -0
  85. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/sq.js +76 -0
  86. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/tr.js +76 -0
  87. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ua.js +75 -0
  88. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/zh_cn.js +77 -0
  89. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/file.html +3 -0
  90. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image.html +39 -0
  91. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image_edit.html +35 -0
  92. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/link.html +74 -0
  93. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/table.html +25 -0
  94. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/video.html +15 -0
  95. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.js.erb +2260 -0
  96. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.min.js +1 -0
  97. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/default.js +219 -0
  98. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/mini.js +103 -0
  99. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/_jquery.reddebox.js.erb +214 -0
  100. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/close.png +0 -0
  101. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb +246 -0
  102. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss +31 -0
  103. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/next.png +0 -0
  104. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/prev.png +0 -0
  105. data/lib/generators/redde/layout/templates/assets/images/admin/refresh.png +0 -0
  106. data/lib/generators/redde/layout/templates/assets/images/admin/submit.png +0 -0
  107. data/lib/generators/redde/layout/templates/assets/images/admin/submit_hover.png +0 -0
  108. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/change-log.txt +19 -0
  109. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/check-exists.php +15 -0
  110. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/index.php +50 -0
  111. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.js +888 -0
  112. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.min.js +6 -0
  113. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/license-standard.txt +71 -0
  114. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-cancel.png +0 -0
  115. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-image-only.php +66 -0
  116. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.css +100 -0
  117. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.php +33 -0
  118. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/#swfobject.js +4 -0
  119. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/cancel.png +0 -0
  120. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/jquery.uploadify.min.js +315 -0
  121. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify-cancel.png +0 -0
  122. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.css +66 -0
  123. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.swf +0 -0
  124. data/lib/generators/redde/layout/templates/assets/images/admin/view.png +0 -0
  125. data/lib/generators/redde/layout/templates/assets/images/admin/view_mk.png +0 -0
  126. data/lib/generators/redde/layout/templates/assets/javascripts/admin/jquery.ui.nestedSortable.js +390 -0
  127. data/lib/generators/redde/layout/templates/assets/javascripts/admin/swfobject.js +4 -0
  128. data/lib/generators/redde/layout/templates/assets/javascripts/admin/zen_textarea.min.js +17 -0
  129. data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +88 -0
  130. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/_reset.scss +32 -0
  131. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_list.scss +22 -0
  132. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_notice.scss +39 -0
  133. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_orders.scss +22 -0
  134. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_partners.scss +15 -0
  135. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_photos.scss +31 -0
  136. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_sortable.scss +17 -0
  137. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss +127 -0
  138. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_input.scss +43 -0
  139. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_table.scss +24 -0
  140. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_header.scss +57 -0
  141. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_launchbar.scss +35 -0
  142. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_login.scss +10 -0
  143. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_main.scss +59 -0
  144. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_sidebar.scss +35 -0
  145. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_filter.scss +16 -0
  146. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_order-sh.scss +59 -0
  147. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_pe.scss +43 -0
  148. data/lib/generators/redde/layout/templates/assets/stylesheets/admin.scss +12 -0
  149. data/lib/generators/redde/layout/templates/controllers/base_controller.rb +6 -0
  150. data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +37 -0
  151. data/lib/generators/redde/layout/templates/layouts/admin.html.haml +30 -0
  152. data/lib/generators/redde/layout/templates/layouts/login.html.haml +32 -0
  153. data/lib/generators/redde/layout/templates/shared/_header.html.haml +13 -0
  154. data/lib/generators/redde/layout/templates/shared/_launchbar.html.haml +9 -0
  155. data/lib/generators/redde/layout/templates/shared/_sidebar.html.haml +23 -0
  156. data/lib/generators/redde/scaffold/scaffold_generator.rb +114 -0
  157. data/lib/generators/redde/scaffold/templates/controllers/controller.rb +55 -0
  158. data/lib/generators/redde/scaffold/templates/edit.html.haml +36 -0
  159. data/lib/generators/redde/scaffold/templates/index.html.haml +37 -0
  160. data/lib/redde/version.rb +3 -0
  161. data/lib/redde.rb +4 -0
  162. data/redde.gemspec +26 -0
  163. data/spec/deploy_generator_spec.rb +29 -0
  164. data/spec/layout_generator_spec.rb +41 -0
  165. data/spec/scaffold_generator_spec.rb +25 -0
  166. data/spec/spec_helper.rb +10 -0
  167. metadata +327 -0
@@ -0,0 +1,477 @@
1
+ /**
2
+ * jQuery lightBox plugin
3
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
4
+ * and adapted to me for use like a plugin from jQuery.
5
+ * @name jquery-lightbox-0.5.js
6
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
7
+ * @version 0.5
8
+ * @date April 11, 2008
9
+ * @category jQuery plugin
10
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
11
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
12
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
13
+ */
14
+
15
+ // Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
16
+ (function($) {
17
+ /**
18
+ * $ is an alias to jQuery object
19
+ *
20
+ */
21
+ $.fn.lightBox = function(settings) {
22
+ // Settings to configure the jQuery lightBox plugin how you like
23
+ settings = jQuery.extend({
24
+ // Configuration related to overlay
25
+ 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.
26
+ overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
27
+ // Configuration related to navigation
28
+ fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
29
+ // Configuration related to images
30
+ imageLoading: '/assets/lightbox/images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
31
+ imageBtnPrev: '/assets/lightbox/images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
32
+ imageBtnNext: '/assets/lightbox/images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
33
+ imageBtnClose: '/assets/lightbox/images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
34
+ imageBlank: '/assets/lightbox/images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
35
+ // Configuration related to container image box
36
+ 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
37
+ containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
38
+ // Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
39
+ txtImage: 'Image', // (string) Specify text "Image"
40
+ txtOf: 'of', // (string) Specify text "of"
41
+ // Configuration related to keyboard navigation
42
+ 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.
43
+ keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
44
+ keyToNext: 'n', // (string) (n = next) Letter to show the next image.
45
+ // Don�t alter these variables in any way
46
+ imageArray: [],
47
+ activeImage: 0
48
+ },settings);
49
+ // Caching the jQuery object with all elements matched
50
+ var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
51
+ /**
52
+ * Initializing the plugin calling the start function
53
+ *
54
+ * @return boolean false
55
+ */
56
+ function _initialize() {
57
+ _start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
58
+ return false; // Avoid the browser following the link
59
+ }
60
+ /**
61
+ * Start the jQuery lightBox plugin
62
+ *
63
+ * @param object objClicked The object (link) whick the user have clicked
64
+ * @param object jQueryMatchedObj The jQuery object with all elements matched
65
+ */
66
+ function _start(objClicked,jQueryMatchedObj) {
67
+ // Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
68
+ $('embed, object, select').css({ 'visibility' : 'hidden' });
69
+ // Call the function to create the markup structure; style some elements; assign events in some elements.
70
+ _set_interface();
71
+ // Unset total images in imageArray
72
+ settings.imageArray.length = 0;
73
+ // Unset image active information
74
+ settings.activeImage = 0;
75
+ // We have an image set? Or just an image? Let�s see it.
76
+ if ( jQueryMatchedObj.length == 1 ) {
77
+ settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
78
+ } else {
79
+ // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
80
+ for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
81
+ settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
82
+ }
83
+ }
84
+ while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
85
+ settings.activeImage++;
86
+ }
87
+ // Call the function that prepares image exibition
88
+ _set_image_to_view();
89
+ }
90
+ /**
91
+ * Create the jQuery lightBox plugin interface
92
+ *
93
+ * The HTML markup will be like that:
94
+ <div id="jquery-overlay"></div>
95
+ <div id="jquery-lightbox">
96
+ <div id="lightbox-container-image-box">
97
+ <div id="lightbox-container-image">
98
+ <img src="../fotos/XX.jpg" id="lightbox-image">
99
+ <div id="lightbox-nav">
100
+ <a href="#" id="lightbox-nav-btnPrev"></a>
101
+ <a href="#" id="lightbox-nav-btnNext"></a>
102
+ </div>
103
+ <div id="lightbox-loading">
104
+ <a href="#" id="lightbox-loading-link">
105
+ <img src="../images/lightbox-ico-loading.gif">
106
+ </a>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div id="lightbox-container-image-data-box">
111
+ <div id="lightbox-container-image-data">
112
+ <div id="lightbox-image-details">
113
+ <span id="lightbox-image-details-caption"></span>
114
+ <span id="lightbox-image-details-currentNumber"></span>
115
+ </div>
116
+ <div id="lightbox-secNav">
117
+ <a href="#" id="lightbox-secNav-btnClose">
118
+ <img src="../images/lightbox-btn-close.gif">
119
+ </a>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ *
125
+ */
126
+ function _set_interface() {
127
+ // Apply the HTML markup into body tag
128
+ $('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>');
129
+ // Get page sizes
130
+ var arrPageSizes = ___getPageSize();
131
+ // Style overlay and show it
132
+ $('#jquery-overlay').css({
133
+ backgroundColor: settings.overlayBgColor,
134
+ opacity: settings.overlayOpacity,
135
+ width: arrPageSizes[0],
136
+ height: arrPageSizes[1]
137
+ }).fadeIn();
138
+ // Get page scroll
139
+ var arrPageScroll = ___getPageScroll();
140
+ // Calculate top and left offset for the jquery-lightbox div object and show it
141
+ $('#jquery-lightbox').css({
142
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
143
+ left: arrPageScroll[0]
144
+ }).show();
145
+ // Assigning click events in elements to close overlay
146
+ $('#jquery-overlay,#jquery-lightbox').click(function() {
147
+ _finish();
148
+ });
149
+ // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
150
+ $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
151
+ _finish();
152
+ return false;
153
+ });
154
+ // If window was resized, calculate the new overlay dimensions
155
+ $(window).resize(function() {
156
+ // Get page sizes
157
+ var arrPageSizes = ___getPageSize();
158
+ // Style overlay and show it
159
+ $('#jquery-overlay').css({
160
+ width: arrPageSizes[0],
161
+ height: arrPageSizes[1]
162
+ });
163
+ // Get page scroll
164
+ var arrPageScroll = ___getPageScroll();
165
+ // Calculate top and left offset for the jquery-lightbox div object and show it
166
+ $('#jquery-lightbox').css({
167
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
168
+ left: arrPageScroll[0]
169
+ });
170
+ });
171
+ }
172
+ /**
173
+ * Prepares image exibition; doing a image�s preloader to calculate it�s size
174
+ *
175
+ */
176
+ function _set_image_to_view() { // show the loading
177
+ // Show the loading
178
+ $('#lightbox-loading').show();
179
+ if ( settings.fixedNavigation ) {
180
+ $('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
181
+ } else {
182
+ // Hide some elements
183
+ $('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
184
+ }
185
+ // Image preload process
186
+ var objImagePreloader = new Image();
187
+ objImagePreloader.onload = function() {
188
+ $('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
189
+ // Perfomance an effect in the image container resizing it
190
+ _resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
191
+ // clear onLoad, IE behaves irratically with animated gifs otherwise
192
+ objImagePreloader.onload=function(){};
193
+ };
194
+ objImagePreloader.src = settings.imageArray[settings.activeImage][0];
195
+ };
196
+ /**
197
+ * Perfomance an effect in the image container resizing it
198
+ *
199
+ * @param integer intImageWidth The image�s width that will be showed
200
+ * @param integer intImageHeight The image�s height that will be showed
201
+ */
202
+ function _resize_container_image_box(intImageWidth,intImageHeight) {
203
+ // Get current width and height
204
+ var intCurrentWidth = $('#lightbox-container-image-box').width();
205
+ var intCurrentHeight = $('#lightbox-container-image-box').height();
206
+ // Get the width and height of the selected image plus the padding
207
+ var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value
208
+ var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value
209
+ // Diferences
210
+ var intDiffW = intCurrentWidth - intWidth;
211
+ var intDiffH = intCurrentHeight - intHeight;
212
+ // Perfomance the effect
213
+ $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
214
+ if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
215
+ if ( $.browser.msie ) {
216
+ ___pause(250);
217
+ } else {
218
+ ___pause(100);
219
+ }
220
+ }
221
+ $('#lightbox-container-image-data-box').css({ width: intImageWidth });
222
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
223
+ };
224
+ /**
225
+ * Show the prepared image
226
+ *
227
+ */
228
+ function _show_image() {
229
+ $('#lightbox-loading').hide();
230
+ $('#lightbox-image').fadeIn(function() {
231
+ _show_image_data();
232
+ _set_navigation();
233
+ });
234
+ _preload_neighbor_images();
235
+ };
236
+ /**
237
+ * Show the image information
238
+ *
239
+ */
240
+ function _show_image_data() {
241
+ $('#lightbox-container-image-data-box').slideDown('fast');
242
+ $('#lightbox-image-details-caption').hide();
243
+ if ( settings.imageArray[settings.activeImage][1] ) {
244
+ $('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
245
+ }
246
+ // If we have a image set, display 'Image X of X'
247
+ if ( settings.imageArray.length > 1 ) {
248
+ $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
249
+ }
250
+ }
251
+ /**
252
+ * Display the button navigations
253
+ *
254
+ */
255
+ function _set_navigation() {
256
+ $('#lightbox-nav').show();
257
+
258
+ // Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just.
259
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
260
+
261
+ // Show the prev button, if not the first image in set
262
+ if ( settings.activeImage != 0 ) {
263
+ if ( settings.fixedNavigation ) {
264
+ $('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
265
+ .unbind()
266
+ .bind('click',function() {
267
+ settings.activeImage = settings.activeImage - 1;
268
+ _set_image_to_view();
269
+ return false;
270
+ });
271
+ } else {
272
+ // Show the images button for Next buttons
273
+ $('#lightbox-nav-btnPrev').unbind().hover(function() {
274
+ $(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
275
+ },function() {
276
+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
277
+ }).show().bind('click',function() {
278
+ settings.activeImage = settings.activeImage - 1;
279
+ _set_image_to_view();
280
+ return false;
281
+ });
282
+ }
283
+ }
284
+
285
+ // Show the next button, if not the last image in set
286
+ if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
287
+ if ( settings.fixedNavigation ) {
288
+ $('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
289
+ .unbind()
290
+ .bind('click',function() {
291
+ settings.activeImage = settings.activeImage + 1;
292
+ _set_image_to_view();
293
+ return false;
294
+ });
295
+ } else {
296
+ // Show the images button for Next buttons
297
+ $('#lightbox-nav-btnNext').unbind().hover(function() {
298
+ $(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
299
+ },function() {
300
+ $(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
301
+ }).show().bind('click',function() {
302
+ settings.activeImage = settings.activeImage + 1;
303
+ _set_image_to_view();
304
+ return false;
305
+ });
306
+ }
307
+ }
308
+ // Enable keyboard navigation
309
+ _enable_keyboard_navigation();
310
+ }
311
+ /**
312
+ * Enable a support to keyboard navigation
313
+ *
314
+ */
315
+ function _enable_keyboard_navigation() {
316
+ $(document).keydown(function(objEvent) {
317
+ _keyboard_action(objEvent);
318
+ });
319
+ }
320
+ /**
321
+ * Disable the support to keyboard navigation
322
+ *
323
+ */
324
+ function _disable_keyboard_navigation() {
325
+ $(document).unbind();
326
+ }
327
+ /**
328
+ * Perform the keyboard actions
329
+ *
330
+ */
331
+ function _keyboard_action(objEvent) {
332
+ // To ie
333
+ if ( objEvent == null ) {
334
+ keycode = event.keyCode;
335
+ escapeKey = 27;
336
+ // To Mozilla
337
+ } else {
338
+ keycode = objEvent.keyCode;
339
+ escapeKey = objEvent.DOM_VK_ESCAPE;
340
+ }
341
+ // Get the key in lower case form
342
+ key = String.fromCharCode(keycode).toLowerCase();
343
+ // Verify the keys to close the ligthBox
344
+ if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
345
+ _finish();
346
+ }
347
+ // Verify the key to show the previous image
348
+ if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
349
+ // If we�re not showing the first image, call the previous
350
+ if ( settings.activeImage != 0 ) {
351
+ settings.activeImage = settings.activeImage - 1;
352
+ _set_image_to_view();
353
+ _disable_keyboard_navigation();
354
+ }
355
+ }
356
+ // Verify the key to show the next image
357
+ if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
358
+ // If we�re not showing the last image, call the next
359
+ if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
360
+ settings.activeImage = settings.activeImage + 1;
361
+ _set_image_to_view();
362
+ _disable_keyboard_navigation();
363
+ }
364
+ }
365
+ }
366
+ /**
367
+ * Preload prev and next images being showed
368
+ *
369
+ */
370
+ function _preload_neighbor_images() {
371
+ if ( (settings.imageArray.length -1) > settings.activeImage ) {
372
+ objNext = new Image();
373
+ objNext.src = settings.imageArray[settings.activeImage + 1][0];
374
+ }
375
+ if ( settings.activeImage > 0 ) {
376
+ objPrev = new Image();
377
+ objPrev.src = settings.imageArray[settings.activeImage -1][0];
378
+ }
379
+ }
380
+ /**
381
+ * Remove jQuery lightBox plugin HTML markup
382
+ *
383
+ */
384
+ function _finish() {
385
+ $('#jquery-lightbox').remove();
386
+ $('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
387
+ // Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
388
+ $('embed, object, select').css({ 'visibility' : 'visible' });
389
+ }
390
+ /**
391
+ / THIRD FUNCTION
392
+ * getPageSize() by quirksmode.com
393
+ *
394
+ * @return Array Return an array with page width, height and window width, height
395
+ */
396
+ function ___getPageSize() {
397
+ var xScroll, yScroll;
398
+ if (window.innerHeight && window.scrollMaxY) {
399
+ xScroll = window.innerWidth + window.scrollMaxX;
400
+ yScroll = window.innerHeight + window.scrollMaxY;
401
+ } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
402
+ xScroll = document.body.scrollWidth;
403
+ yScroll = document.body.scrollHeight;
404
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
405
+ xScroll = document.body.offsetWidth;
406
+ yScroll = document.body.offsetHeight;
407
+ }
408
+ var windowWidth, windowHeight;
409
+ if (self.innerHeight) { // all except Explorer
410
+ if(document.documentElement.clientWidth){
411
+ windowWidth = document.documentElement.clientWidth;
412
+ } else {
413
+ windowWidth = self.innerWidth;
414
+ }
415
+ windowHeight = self.innerHeight;
416
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
417
+ windowWidth = document.documentElement.clientWidth;
418
+ windowHeight = document.documentElement.clientHeight;
419
+ } else if (document.body) { // other Explorers
420
+ windowWidth = document.body.clientWidth;
421
+ windowHeight = document.body.clientHeight;
422
+ }
423
+ // for small pages with total height less then height of the viewport
424
+ if(yScroll < windowHeight){
425
+ pageHeight = windowHeight;
426
+ } else {
427
+ pageHeight = yScroll;
428
+ }
429
+ // for small pages with total width less then width of the viewport
430
+ if(xScroll < windowWidth){
431
+ pageWidth = xScroll;
432
+ } else {
433
+ pageWidth = windowWidth;
434
+ }
435
+ arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
436
+ return arrayPageSize;
437
+ };
438
+ /**
439
+ / THIRD FUNCTION
440
+ * getPageScroll() by quirksmode.com
441
+ *
442
+ * @return Array Return an array with x,y page scroll values.
443
+ */
444
+ function ___getPageScroll() {
445
+ var xScroll, yScroll;
446
+ if (self.pageYOffset) {
447
+ yScroll = self.pageYOffset;
448
+ xScroll = self.pageXOffset;
449
+ } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
450
+ yScroll = document.documentElement.scrollTop;
451
+ xScroll = document.documentElement.scrollLeft;
452
+ } else if (document.body) {// all other Explorers
453
+ yScroll = document.body.scrollTop;
454
+ xScroll = document.body.scrollLeft;
455
+ }
456
+ arrayPageScroll = new Array(xScroll,yScroll);
457
+ return arrayPageScroll;
458
+ };
459
+ /**
460
+ * Stop the code execution from a escified time in milisecond
461
+ *
462
+ */
463
+ function ___pause(ms) {
464
+ var date = new Date();
465
+ curDate = null;
466
+ do { var curDate = new Date(); }
467
+ while ( curDate - date < ms);
468
+ };
469
+ // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
470
+
471
+ this.reload = function(){
472
+ lightBox.unbind('click');
473
+ $(lightBox.selector).lightBox();
474
+ };
475
+ return this.unbind('click').click(_initialize);
476
+ };
477
+ })(jQuery); // Call and execute the function immediately passing the jQuery object
@@ -0,0 +1,42 @@
1
+ /**
2
+ * jQuery lightBox plugin
3
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
4
+ * and adapted to me for use like a plugin from jQuery.
5
+ * @name jquery-lightbox-0.5.js
6
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
7
+ * @version 0.5
8
+ * @date April 11, 2008
9
+ * @category jQuery plugin
10
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
11
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
12
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
13
+ */
14
+ (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;}
15
+ 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')));}}
16
+ while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
17
+ _set_image_to_view();}
18
+ 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]});});}
19
+ 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();}
20
+ 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);}}
21
+ $('#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();}
22
+ if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
23
+ 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;});}}
24
+ 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;});}}
25
+ _enable_keyboard_navigation();}
26
+ function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
27
+ function _disable_keyboard_navigation(){$(document).unbind();}
28
+ function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
29
+ key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
30
+ if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
31
+ 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();}}}
32
+ function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
33
+ if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
34
+ function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
35
+ 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;}
36
+ var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
37
+ 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;}
38
+ if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
39
+ if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
40
+ 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;}
41
+ arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
42
+ while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * jQuery lightBox plugin
3
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
4
+ * and adapted to me for use like a plugin from jQuery.
5
+ * @name jquery-lightbox-0.5.js
6
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
7
+ * @version 0.5
8
+ * @date April 11, 2008
9
+ * @category jQuery plugin
10
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
11
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
12
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
13
+ */
14
+ 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,{}))