Selaa lähdekoodia

Added Yoxview

Thomas Buck 11 vuotta sitten
vanhempi
commit
148944f590
61 muutettua tiedostoa jossa 4669 lisäystä ja 66 poistoa
  1. 80
    60
      input/projects/ledcube.md
  2. 10
    6
      input/projects/yasab.md
  3. 0
    0
      input/texts/tex_beetle.md
  4. 3
    0
      page.html
  5. 7
    0
      static/yoxview/data/flickr.js
  6. 269
    0
      static/yoxview/data/flickr.source.js
  7. 1
    0
      static/yoxview/data/picasa.js
  8. 197
    0
      static/yoxview/data/picasa.source.js
  9. 1
    0
      static/yoxview/data/youtube.js
  10. 197
    0
      static/yoxview/data/youtube.source.js
  11. BIN
      static/yoxview/images/empty.gif
  12. BIN
      static/yoxview/images/help_panel.png
  13. BIN
      static/yoxview/images/left.png
  14. BIN
      static/yoxview/images/left_empty.png
  15. BIN
      static/yoxview/images/left_eng.png
  16. BIN
      static/yoxview/images/left_prev.png
  17. BIN
      static/yoxview/images/popup_ajax_loader.gif
  18. BIN
      static/yoxview/images/right.png
  19. BIN
      static/yoxview/images/right_empty.png
  20. BIN
      static/yoxview/images/right_eng.png
  21. BIN
      static/yoxview/images/sprites.png
  22. 232
    0
      static/yoxview/jquery.yoxthumbs.js
  23. 2227
    0
      static/yoxview/jquery.yoxview-2.21.js
  24. 110
    0
      static/yoxview/jquery.yoxview-2.21.min.js
  25. 21
    0
      static/yoxview/lang/ar.js
  26. 21
    0
      static/yoxview/lang/bg.js
  27. 21
    0
      static/yoxview/lang/ca.js
  28. 21
    0
      static/yoxview/lang/cs.js
  29. 21
    0
      static/yoxview/lang/de.js
  30. 21
    0
      static/yoxview/lang/dk.js
  31. 21
    0
      static/yoxview/lang/en.js
  32. 21
    0
      static/yoxview/lang/es.js
  33. 21
    0
      static/yoxview/lang/fr.js
  34. 21
    0
      static/yoxview/lang/gr.js
  35. 21
    0
      static/yoxview/lang/he.js
  36. 21
    0
      static/yoxview/lang/hu.js
  37. 21
    0
      static/yoxview/lang/ie.js
  38. 21
    0
      static/yoxview/lang/ir.js
  39. 21
    0
      static/yoxview/lang/it.js
  40. 21
    0
      static/yoxview/lang/ja.js
  41. 20
    0
      static/yoxview/lang/mk.js
  42. 3
    0
      static/yoxview/lang/nl.js
  43. 21
    0
      static/yoxview/lang/pl.js
  44. 21
    0
      static/yoxview/lang/pt-br.js
  45. 21
    0
      static/yoxview/lang/pt.js
  46. 21
    0
      static/yoxview/lang/ro.js
  47. 21
    0
      static/yoxview/lang/ru.js
  48. 21
    0
      static/yoxview/lang/sk.js
  49. 21
    0
      static/yoxview/lang/sl.js
  50. 21
    0
      static/yoxview/lang/sv.js
  51. 22
    0
      static/yoxview/lang/tr.js
  52. 21
    0
      static/yoxview/lang/ua.js
  53. 21
    0
      static/yoxview/lang/zh-cn.js
  54. 21
    0
      static/yoxview/lang/zh-tw.js
  55. BIN
      static/yoxview/skins/top_menu/sprites.png
  56. 49
    0
      static/yoxview/skins/top_menu/yoxview.top_menu.css
  57. 96
    0
      static/yoxview/skins/top_menu/yoxview.top_menu.js
  58. 304
    0
      static/yoxview/yox.js
  59. 34
    0
      static/yoxview/yoxview-init.js
  60. 5
    0
      static/yoxview/yoxview-nojquery.js
  61. 235
    0
      static/yoxview/yoxview.css

+ 80
- 60
input/projects/ledcube.md Näytä tiedosto

@@ -21,8 +21,14 @@ Get the [current Codebase as Zip][1].
21 21
 
22 22
 My friends Max (<hutattedonmyarm@me.com>) and Felix built this single-color 8x8x8 LED Cube with me. On this page, you can get the Software as well as Schematics and the PCB Layout licensed under the GPLv3. Have fun!
23 23
 
24
-[![Foto 1][2]][3]
25
-[![Foto 2][4]][5]
24
+<div class="yoxview">
25
+    <a href="img/cube14.jpg" class="thumbnail">
26
+        <img src="img/cube14_small.jpg" alt="Photo" title="Prototype Cube">
27
+    </a>
28
+    <a href="img/cube11.jpg" class="thumbnail">
29
+        <img src="img/cube11_small.jpg" alt="Photo" title="PCB Soldering">
30
+    </a>
31
+</div>
26 32
 
27 33
 ## Hardware
28 34
 
@@ -36,8 +42,14 @@ There's also an AtMega8 which acts as a TWI Slave and sends audio data to the At
36 42
 
37 43
 An extensive part list can be found in the Github repository, in Hardware, called parts.txt.
38 44
 
39
-[![Foto 3][6]][7]
40
-[![Foto 4][8]][9]
45
+<div class="yoxview">
46
+    <a href="img/cube10.jpg" class="thumbnail">
47
+        <img src="img/cube10_small.jpg" alt="Photo" title="Prototype in Action">
48
+    </a>
49
+    <a href="img/cube12.jpg" class="thumbnail">
50
+        <img src="img/cube12_small.jpg" alt="Photo" title="PCB in Action">
51
+    </a>
52
+</div>
41 53
 
42 54
 ## Software
43 55
 
@@ -47,8 +59,14 @@ The software is composed of 3 parts. The CubeFirmware for the AtMega32, the Audi
47 59
 
48 60
 It's main work is to load images from the FRAM or the AtMega8 and display it. It also monitors the serial Port and reacts accordingly.
49 61
 
50
-[![Foto 7][20]][21]
51
-[![Foto 8][22]][23]
62
+<div class="yoxview">
63
+    <a href="img/kuehler1.jpg" class="thumbnail">
64
+        <img src="img/kuehler1_small.jpg" alt="Photo" title="Voltage Regulator Mount">
65
+    </a>
66
+    <a href="img/kuehler2.jpg" class="thumbnail">
67
+        <img src="img/kuehler2_small.jpg" alt="Photo" title="Voltage Regulator Mount">
68
+    </a>
69
+</div>
52 70
 
53 71
 ### AudioFirmware
54 72
 
@@ -58,8 +76,14 @@ It gets data from the MSGEQ7 and sends it via TWI.
58 76
 
59 77
 Depends on [Java3D][10]. It renders a rotatable 3D View of the cube. You can then create animations, load and save them, and upload them to the Cube. It has it's own C Library for Windows and Unix to talk to the serial port.
60 78
 
61
-[![Screenshot][11]][12]
62
-[![Schematic][13]][14]
79
+<div class="yoxview">
80
+    <a href="img/cubecontrol.png" class="thumbnail">
81
+        <img src="img/cubecontrol_small.png" alt="Photo" title="Screenshot">
82
+    </a>
83
+    <a href="img/cubeschem.png" class="thumbnail">
84
+        <img src="img/cubeschem_small.png" alt="Photo" title="Schematic">
85
+    </a>
86
+</div>
63 87
 
64 88
 ### Hardware Emulator
65 89
 
@@ -73,32 +97,18 @@ Small CLI tool to send testdata or stored animations from CubeControl. Unix only
73 97
 
74 98
 Get the whole code, as well as schematics and the PCB layout as PNG and Eagle files, from the [GitHub Repository][15].
75 99
 
76
-[![Foto 5][16]][17]
77
-[![Foto 6][18]][19]
100
+<div class="yoxview">
101
+    <a href="img/cube13.jpg" class="thumbnail">
102
+        <img src="img/cube13_small.jpg" alt="Photo" title="PCB">
103
+    </a>
104
+    <a href="img/cube15.jpg" class="thumbnail">
105
+        <img src="img/cube15_small.jpg" alt="Photo" title="Final Cube">
106
+    </a>
107
+</div>
78 108
 
79 109
  [1]: https://github.com/xythobuz/LED-Cube/zipball/master
80
- [2]: img/cube14_small.jpg
81
- [3]: img/cube14.jpg
82
- [4]: img/cube11_small.jpg
83
- [5]: img/cube11.jpg
84
- [6]: img/cube10_small.jpg
85
- [7]: img/cube10.jpg
86
- [8]: img/cube12_small.jpg
87
- [9]: img/cube12.jpg
88 110
  [10]: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html
89
- [11]: img/cubecontrol_small.png
90
- [12]: img/cubecontrol.png
91
- [13]: img/cubeschem_small.png
92
- [14]: img/cubeschem.png
93 111
  [15]: https://github.com/xythobuz/LED-Cube
94
- [16]: img/cube13_small.jpg
95
- [17]: img/cube13.jpg
96
- [18]: img/cube15_small.jpg
97
- [19]: img/cube15.jpg
98
- [20]: img/kuehler1_small.jpg
99
- [21]: img/kuehler1.jpg
100
- [22]: img/kuehler2_small.jpg
101
- [23]: img/kuehler2.jpg
102 112
 
103 113
 lang: de
104 114
 
@@ -111,8 +121,14 @@ Downloade die [aktuelle Codebase als Zip][1].
111 121
 
112 122
 Als Schulprojekt und für den Explore-IT Wettbewerb von SAP in Markdorf haben meine zwei Teamkollegen, Max <hutattedonmyarm@me.com> und Felix, zusammen mit mir diesen einfarbigen 8x8x8 LED Cube gebaut. Für Interessierte hier alle Software sowie Schaltplan und Boardlayout unter der GPLv3. Viel Freude damit.
113 123
 
114
-[![Foto 1][2]][3]
115
-[![Foto 2][4]][5]
124
+<div class="yoxview">
125
+    <a href="img/cube14.jpg" class="thumbnail">
126
+        <img src="img/cube14_small.jpg" alt="Photo" title="Prototyp Cube">
127
+    </a>
128
+    <a href="img/cube11.jpg" class="thumbnail">
129
+        <img src="img/cube11_small.jpg" alt="Photo" title="Platine löten">
130
+    </a>
131
+</div>
116 132
 
117 133
 ## Hardware
118 134
 
@@ -126,8 +142,14 @@ Zusätzlich ist ein AtMega8 auf der Platine. Dieser liest über einen MSGEQ7 ein
126 142
 
127 143
 Eine ausführlichere Bauteilliste findet sich im Github Repository, im Ordner Hardware als parts.txt.
128 144
 
129
-[![Foto 3][6]][7]
130
-[![Foto 4][8]][9]
145
+<div class="yoxview">
146
+    <a href="img/cube10.jpg" class="thumbnail">
147
+        <img src="img/cube10_small.jpg" alt="Photo" title="Prototyp in Aktion">
148
+    </a>
149
+    <a href="img/cube12.jpg" class="thumbnail">
150
+        <img src="img/cube12_small.jpg" alt="Photo" title="Platine in Aktion">
151
+    </a>
152
+</div>
131 153
 
132 154
 ## Software
133 155
 
@@ -137,8 +159,14 @@ Die Software besteht aus 3 großen Teilen, die CubeFirmware für den AtMega32, d
137 159
 
138 160
 Die Hauptaufgabe der CubeFirmware ist es, Animationen aus dem FRAM zu laden und anzuzeigen. Nebenbei wird auf Anfragen per USB gewartet und entsprechend gehandelt. Auf Knopfdruck steuert die CubeFirmware den AtMega8 an, um Audio Daten zu visualisieren.
139 161
 
140
-[![Foto 7][20]][21]
141
-[![Foto 8][22]][23]
162
+<div class="yoxview">
163
+    <a href="img/kuehler1.jpg" class="thumbnail">
164
+        <img src="img/kuehler1_small.jpg" alt="Photo" title="Kühlkörper Spannungsregler">
165
+    </a>
166
+    <a href="img/kuehler2.jpg" class="thumbnail">
167
+        <img src="img/kuehler2_small.jpg" alt="Photo" title="Kühlkörper Spannungsregler">
168
+    </a>
169
+</div>
142 170
 
143 171
 ### Audio Firmware
144 172
 
@@ -148,8 +176,14 @@ Die AudioFirmware liest den MSGEQ7 aus, um bei entsprechender Anfrage über TWI
148 176
 
149 177
 Neben einigen Java Klassen um einen 3D LED Würfel darzustellen und mit diesem zu interagieren, besteht CubeControl auch aus einer Java Native Interface (JNI) Library, welche sowohl unter Windows als auch unter Unix die serielle Kommunikation für CubeControl ermöglicht. Für die 3D Darstellung wird [Java3D][10] benötigt. In der OS X Lion Variante von Java ist dies bereits enthalten, für Windows und Linux muss es separat heruntergeladen werden.
150 178
 
151
-[![Screenshot][11]][12]
152
-[![Schematic][13]][14]
179
+<div class="yoxview">
180
+    <a href="img/cubecontrol.png" class="thumbnail">
181
+        <img src="img/cubecontrol_small.png" alt="Photo" title="Screenshot">
182
+    </a>
183
+    <a href="img/cubeschem.png" class="thumbnail">
184
+        <img src="img/cubeschem_small.png" alt="Photo" title="Schaltplan">
185
+    </a>
186
+</div>
153 187
 
154 188
 ### Hardware Emulator
155 189
 
@@ -163,29 +197,15 @@ Ein kleines CLI Tool um Testdaten und mit CubeControl gespeicherte Animationen a
163 197
 
164 198
 Im [GitHub Repository][15] findet sich der gesamte Code sowie die Eagle Dateien und Schaltplan und Layout als PNGs.
165 199
 
166
-[![Foto 5][16]][17]
167
-[![Foto 6][18]][19]
200
+<div class="yoxview">
201
+    <a href="img/cube13.jpg" class="thumbnail">
202
+        <img src="img/cube13_small.jpg" alt="Photo" title="Platine">
203
+    </a>
204
+    <a href="img/cube15.jpg" class="thumbnail">
205
+        <img src="img/cube15_small.jpg" alt="Photo" title="Fertiger Cube">
206
+    </a>
207
+</div>
168 208
 
169 209
  [1]: https://github.com/xythobuz/LED-Cube/zipball/master
170
- [2]: img/cube14_small.jpg
171
- [3]: img/cube14.jpg
172
- [4]: img/cube11_small.jpg
173
- [5]: img/cube11.jpg
174
- [6]: img/cube10_small.jpg
175
- [7]: img/cube10.jpg
176
- [8]: img/cube12_small.jpg
177
- [9]: img/cube12.jpg
178 210
  [10]: http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html
179
- [11]: img/cubecontrol_small.png
180
- [12]: img/cubecontrol.png
181
- [13]: img/cubeschem_small.png
182
- [14]: img/cubeschem.png
183 211
  [15]: https://github.com/xythobuz/LED-Cube
184
- [16]: img/cube13_small.jpg
185
- [17]: img/cube13.jpg
186
- [18]: img/cube15_small.jpg
187
- [19]: img/cube15.jpg
188
- [20]: img/kuehler1_small.jpg
189
- [21]: img/kuehler1.jpg
190
- [22]: img/kuehler2_small.jpg
191
- [23]: img/kuehler2.jpg

+ 10
- 6
input/projects/yasab.md Näytä tiedosto

@@ -35,14 +35,16 @@ Sending data length...
35 35
 Upload finished after 28.0 seconds.
36 36
 </pre>
37 37
 
38
-[![xyCopter Screenshot][5]][6]
38
+<div class="yoxview">
39
+    <a href="img/xyCopterFirmware.png" class="thumbnail">
40
+        <img src="img/xyCopterFirmware_small.png" alt="Photo" title="xyCopter Screenshot">
41
+    </a>
42
+</div>
39 43
 
40 44
  [1]: http://www.nongnu.org/avr-libc/
41 45
  [2]: https://github.com/xythobuz/yasab
42 46
  [3]: https://github.com/xythobuz/xyControl/tree/master/tools/xyCopter
43 47
  [4]: bluetooth.html
44
- [5]: img/xyCopterFirmware_small.png
45
- [6]: img/xyCopterFirmware.png
46 48
 
47 49
 lang: de
48 50
 
@@ -69,14 +71,16 @@ Sending data length...
69 71
 Upload finished after 28.0 seconds.
70 72
 </pre>
71 73
 
72
-[![xyCopter Screenshot][5]][6]
74
+<div class="yoxview">
75
+    <a href="img/xyCopterFirmware.png" class="thumbnail">
76
+        <img src="img/xyCopterFirmware_small.png" alt="Photo" title="xyCopter Screenshot">
77
+    </a>
78
+</div>
73 79
 
74 80
  [1]: http://www.nongnu.org/avr-libc/
75 81
  [2]: https://github.com/xythobuz/yasab
76 82
  [3]: https://github.com/xythobuz/xyControl/tree/master/tools/xyCopter
77 83
  [4]: bluetooth.html
78
- [5]: img/xyCopterFirmware_small.png
79
- [6]: img/xyCopterFirmware.png
80 84
 
81 85
 
82 86
 

input/reviews/tex_beetle.md → input/texts/tex_beetle.md Näytä tiedosto


+ 3
- 0
page.html Näytä tiedosto

@@ -14,6 +14,7 @@
14 14
     <link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.css" />
15 15
     <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700">
16 16
     <script type="text/javascript" src="js/sh_main.js"></script>
17
+    <script type="text/javascript" src="yoxview/yoxview-init.js"></script>
17 18
     <!--%
18 19
         if page.get("flattr", "false") == "true":
19 20
             print "<script type='text/javascript'>"
@@ -150,6 +151,8 @@
150 151
         &middot;
151 152
         <a href="http://shjs.sourceforge.net">SHJS</a>
152 153
         &middot;
154
+        <a href="http://www.yoxigen.com/yoxview/">YoxView</a>
155
+        &middot;
153 156
         <a href="http://creativecommons.org/licenses/by/3.0">CC-BY</a>
154 157
     </div>
155 158
     <img src="http://xythobuz.de/stats/count.php?img" alt="Analytics">

+ 7
- 0
static/yoxview/data/flickr.js Näytä tiedosto

@@ -0,0 +1,7 @@
1
+function yox_flickr(){function m(a,j){return"http://farm"+a.farm+".static.flickr.com/"+a.server+"/"+(a.primary||a.id)+"_"+a.secret+j+".jpg"}var g=jQuery,o="http://www.flickr.com/",p="http://api.flickr.com/services/rest/",r=/\d+@N\d+/,s=/http:\/\/(?:www\.)?flickr\.com\/(\w+)\/(?:([^\/]+)\/(?:(\w+)\/?(?:([^\/]+)\/?)?)?)?(?:\?(.*))?/,t=this,q={api_key:"cd6c91f9721f34ead20e6ebe03dd5871",format:"json"};this.getImagesData=function(a,j){function k(){var b={};a.onLoadBegin&&a.onLoadBegin();g.jsonp({url:p,
2
+async:false,dataType:"jsonp",data:e,callbackParameter:"jsoncallback",success:function(h){b.images=t.getImagesDataFromJson(h,e);if(h.photosets||h.collections)g.extend(b,{createGroups:true});if(b.images.length>0&&(e.setThumbnail&&!e.setSinglePhotosetThumbnails||a.isSingleLink))g.extend(b,{isGroup:true,link:(o+"photos/"+h.photoset.owner+"/sets/"+h.photoset.id+"/").replace(/\s/g,"_"),thumbnailSrc:a.isSingleLink?undefined:m(h.photoset.photo[0],n[e.thumbsize]),title:"None"});j&&j(b);a.onLoadComplete&&a.onLoadComplete()},
3
+error:function(){a.onLoadError&&a.onLoadError("Flickr plugin encountered an error while retrieving data")}})}var i=true,l={method:"flickr.urls.lookupUser",onData:function(b){return{user_id:b.user.id,username:b.user.username._content}}},c={};if(a.dataUrl){var d=a.dataUrl.match(s),f;if(d[5]){f=Yox.queryToJson(d[5]);g.extend(c,f)}if(d&&d.length>1)if(d[1]=="search"){c.method="flickr.photos.search";c.text=f.q;if(f.w){f.w=f.w.replace("%40","@");if(f.w.match(r))c.user_id=f.w}if(!f||!f.sort)c.sort="relevance";
4
+i=false}else{switch(d[3]){case undefined:c.method="flickr.people.getPublicPhotos";break;case "sets":g.extend(c,{method:d[4]||a.dataSourceOptions.photoset_id?"flickr.photosets.getPhotos":"flickr.photosets.getList",photoset_id:d[4]});break;case "galleries":g.extend(c,{method:d[4]?"flickr.galleries.getPhotos":"flickr.galleries.getList",gallery_id:d[4]});if(d[4]){i=true;l={method:"flickr.urls.lookupGallery",onData:function(b){return{gallery_id:b.gallery.id,title:b.gallery.title}}}}break;case "collections":g.extend(c,
5
+{method:"flickr.collections.getTree",collection_id:d[4]});break;default:c.method="flickr.photos.search";break}g.extend(c,{username:d[2],type:d[3]})}}var e=jQuery.extend({},{imageSize:"medium",thumbsize:"smallSquare",setThumbnail:true,setSinglePhotosetThumbnails:true,setTitle:true,method:"flickr.photosets.getList",extras:"description"},c,a.dataSourceOptions,q);e.media="photos";if(e.user&&e.photoset_id)e.method="flickr.photosets.getPhotos";c=screen.width>screen.height?screen.width:screen.height;if(!e.imageSize||
6
+c.width<=800&&e.imageSize!="medium")e.imageSize="medium";i?g.jsonp({url:p,async:false,dataType:"jsonp",data:g.extend({url:a.dataUrl,method:l.method},q),callbackParameter:"jsoncallback",success:function(b){g.extend(e,l.onData(b));k()}}):k()};var n={smallSquare:"_s",thumbnail:"_t",small:"_m",medium:"",large:"_b",original:"_o"};this.getImagesDataFromJson=function(a,j){var k=a.photoset||a.photos,i;if(k)i=a.photoset?a.photoset.photo:a.photos.photo;else if(a.photosets)i=a.photosets.photoset;else if(a.collections)i=
7
+a.collections.collection[0].set;var l=[],c=a.photoset?"/in/set-"+a.photoset.id:"";if(i){var d=n[j.thumbsize],f=n[j.imageSize];jQuery.each(i,function(e,b){var h={thumbnailSrc:m(b,d),link:(o+"photos/"+(b.owner||j.user_id)+"/"+b.id+c).replace(/\s/g,"_"),media:{src:m(b,f),title:k?b.title:b.title._content+(!k?" ("+b.photos+" images)":""),alt:b.title._content||b.title,description:b.description?b.description._content:undefined}};if(!k)h.data={photoset_id:b.id};l.push(h)})}return l}};

+ 269
- 0
static/yoxview/data/flickr.source.js Näytä tiedosto

@@ -0,0 +1,269 @@
1
+/*!
2
+ * Yox Flickr plugin
3
+ * http://yoxigen.com/yoxview/
4
+ *
5
+ * Copyright (c) 2010 Yossi Kolesnicov
6
+ *
7
+ * Licensed under the MIT license.
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Date: 17th July, 2010
11
+ * Version : 1.6
12
+ */
13
+function yox_flickr()
14
+{
15
+    var $ = jQuery,
16
+        flickrUrl = "http://www.flickr.com/",
17
+        flickrApiUrl = "http://api.flickr.com/services/rest/",
18
+        yoxviewFlickrApikey = "cd6c91f9721f34ead20e6ebe03dd5871",
19
+        flickrUserIdRegex = /\d+@N\d+/,
20
+	    flickrUrlRegex = /http:\/\/(?:www\.)?flickr\.com\/(\w+)\/(?:([^\/]+)\/(?:(\w+)\/?(?:([^\/]+)\/?)?)?)?(?:\?(.*))?/,
21
+        self = this,
22
+        fixedOptions = {
23
+            api_key: yoxviewFlickrApikey,
24
+            format: 'json'
25
+        };
26
+        
27
+    this.getImagesData = function(options, callback)
28
+    {
29
+        var defaults = {
30
+            imageSize: "medium", // medium/large/original, for large, your images in Flickr must be 1280 in width or more. For original, you must allow originals to be downloaded
31
+            thumbsize: "smallSquare",
32
+            setThumbnail: true,
33
+            setSinglePhotosetThumbnails: true,
34
+            setTitle: true,
35
+            method: 'flickr.photosets.getList',
36
+            extras: 'description'
37
+        };
38
+
39
+		var requireLookup = true;
40
+		var lookupData = {
41
+			method: "flickr.urls.lookupUser",
42
+			onData: function(data)
43
+			{
44
+				return {
45
+					user_id: data.user.id,
46
+					username: data.user.username._content
47
+				};
48
+			}
49
+		};
50
+		
51
+		var fromDataUrl = {};
52
+
53
+        if (options.dataUrl)
54
+        {
55
+            var urlMatch = options.dataUrl.match(flickrUrlRegex);
56
+            var queryData;
57
+            if (urlMatch[5])
58
+            {
59
+                queryData = Yox.queryToJson(urlMatch[5]);
60
+		        $.extend(fromDataUrl, queryData);
61
+		    }
62
+            if (urlMatch && urlMatch.length > 1)
63
+            {
64
+				if (urlMatch[1] == "search")
65
+				{
66
+					fromDataUrl.method = "flickr.photos.search";
67
+					fromDataUrl.text = queryData.q;
68
+					if (queryData.w)
69
+					{
70
+						queryData.w = queryData.w.replace("%40", "@");
71
+						if (queryData.w.match(flickrUserIdRegex))
72
+							fromDataUrl.user_id = queryData.w;
73
+					}
74
+					if (!queryData || !queryData.sort)
75
+					    fromDataUrl.sort = "relevance";
76
+					    
77
+					requireLookup = false;
78
+				}
79
+				else
80
+				{
81
+					switch(urlMatch[3])
82
+					{
83
+						case undefined:
84
+							fromDataUrl.method = "flickr.people.getPublicPhotos";
85
+							break;
86
+						case "sets":
87
+							$.extend(fromDataUrl, {
88
+								method: urlMatch[4] || options.dataSourceOptions.photoset_id ? "flickr.photosets.getPhotos" : "flickr.photosets.getList",
89
+								photoset_id: urlMatch[4]
90
+							});
91
+							break;
92
+						case "galleries":
93
+							$.extend(fromDataUrl, {
94
+								method: urlMatch[4] ? "flickr.galleries.getPhotos" : "flickr.galleries.getList",
95
+								gallery_id: urlMatch[4]
96
+							});
97
+							if (urlMatch[4])
98
+							{
99
+								requireLookup = true;
100
+								lookupData = {
101
+									method: "flickr.urls.lookupGallery",
102
+									onData: function(data)
103
+									{
104
+										return {
105
+											gallery_id: data.gallery.id,
106
+											title: data.gallery.title
107
+										};
108
+									}
109
+								};
110
+							}
111
+							break;
112
+						case "collections":
113
+							$.extend(fromDataUrl, {
114
+								method: "flickr.collections.getTree",
115
+								collection_id: urlMatch[4]
116
+							});
117
+							break;
118
+						default:
119
+							fromDataUrl.method = "flickr.photos.search";
120
+							break;
121
+					}
122
+					$.extend(fromDataUrl, {
123
+						username: urlMatch[2],
124
+						type: urlMatch[3]
125
+					});
126
+				}
127
+            }
128
+        }
129
+		
130
+        var datasourceOptions = jQuery.extend({}, defaults, fromDataUrl, options.dataSourceOptions, fixedOptions);
131
+		
132
+        datasourceOptions.media = "photos";
133
+        if (datasourceOptions.user && datasourceOptions.photoset_id)
134
+            datasourceOptions.method = "flickr.photosets.getPhotos";
135
+
136
+        var screenSize = screen.width > screen.height ? screen.width : screen.height;
137
+        
138
+        // Save resources for smaller screens:
139
+        if (!datasourceOptions.imageSize || (screenSize.width <= 800 && datasourceOptions.imageSize != "medium"))
140
+            datasourceOptions.imageSize = "medium";
141
+
142
+		if (requireLookup)
143
+		{
144
+			$.jsonp({
145
+				url: flickrApiUrl,
146
+				async: false,
147
+				dataType: 'jsonp',
148
+				data: $.extend({ url: options.dataUrl, method: lookupData.method }, fixedOptions),
149
+				callbackParameter: "jsoncallback",
150
+				success: function(data)
151
+				{
152
+					$.extend(datasourceOptions, lookupData.onData(data));
153
+					getData();
154
+				}
155
+			});
156
+		}
157
+		else
158
+			getData();
159
+		
160
+		function getData()
161
+		{
162
+			var returnData = {};
163
+			
164
+			if (options.onLoadBegin)
165
+				options.onLoadBegin();
166
+
167
+			$.jsonp({
168
+				url: flickrApiUrl,
169
+				async: false,
170
+				dataType: 'jsonp',
171
+				data: datasourceOptions,
172
+				callbackParameter: "jsoncallback",
173
+				success: function(data)
174
+				{console.log(data);
175
+					returnData.images = self.getImagesDataFromJson(data, datasourceOptions);
176
+					
177
+					if (data.photosets || data.collections)
178
+						$.extend(returnData, {
179
+							createGroups: true
180
+						});
181
+						
182
+					if (returnData.images.length > 0 && ((datasourceOptions.setThumbnail && !datasourceOptions.setSinglePhotosetThumbnails) || options.isSingleLink))
183
+					{
184
+						$.extend(returnData, {
185
+							isGroup: true,
186
+							link: getPhotosetUrl(data.photoset.owner, data.photoset.id),
187
+							thumbnailSrc: options.isSingleLink ? undefined : getImageUrl(data.photoset.photo[0], flickrImageSizes[datasourceOptions.thumbsize]),
188
+							title: "None"
189
+						});
190
+					}
191
+				
192
+					if (callback)
193
+						callback(returnData);
194
+
195
+					if (options.onLoadComplete)
196
+						options.onLoadComplete();
197
+				},
198
+				error : function(xOptions, textStatus){
199
+					if (options.onLoadError)
200
+						options.onLoadError("Flickr plugin encountered an error while retrieving data");
201
+				}
202
+			});
203
+		}
204
+    }
205
+	
206
+	
207
+    var flickrImageSizes = {
208
+        smallSquare : "_s", // 75x75
209
+        thumbnail : "_t", // 100px
210
+        small : "_m", // 240px
211
+        medium : "", // 500px
212
+        large : "_b", // 1024px
213
+        original : "_o"
214
+    };
215
+    function getImageUrl(photoData, size)
216
+    {
217
+        return "http://farm" + photoData.farm + ".static.flickr.com/" + photoData.server + "/" + (photoData.primary || photoData.id) + "_" + photoData.secret + size + ".jpg";
218
+    }
219
+    function getPhotosetUrl(userid, photosetId)
220
+    {
221
+         return prepareUrl(flickrUrl + "photos/" + userid + "/sets/" + photosetId + "/");
222
+    }
223
+    // makes sure a string can be used as a Flickr url
224
+    function prepareUrl(url)
225
+    {
226
+        return url.replace(/\s/g, "_");
227
+    }
228
+    this.getImagesDataFromJson = function(data, datasourceOptions)
229
+    {
230
+		var isPhotos = data.photoset || data.photos;
231
+		var photos;
232
+		if (isPhotos)
233
+			photos = data.photoset ? data.photoset.photo : data.photos.photo;
234
+		else if (data.photosets)
235
+			photos = data.photosets.photoset;
236
+		else if (data.collections)
237
+			photos = data.collections.collection[0].set;
238
+			
239
+		var imagesData = [];
240
+		var inSet = data.photoset ? "/in/set-" + data.photoset.id : "";
241
+		
242
+		// Photos:
243
+		if (photos)
244
+		{
245
+			var thumbSuffix = flickrImageSizes[datasourceOptions.thumbsize];
246
+			var imageSuffix = flickrImageSizes[datasourceOptions.imageSize];
247
+			
248
+			jQuery.each(photos, function(i, photo){
249
+				var imageData = {
250
+					thumbnailSrc : getImageUrl(photo, thumbSuffix),
251
+					link: prepareUrl(flickrUrl + "photos/" + (photo.owner || datasourceOptions.user_id) + "/" + photo.id + inSet),
252
+					media: {
253
+						src: getImageUrl(photo, imageSuffix),
254
+						title: isPhotos ? photo.title : photo.title._content + (!isPhotos ? " (" + photo.photos + " images)" : ""),
255
+						alt: photo.title._content || photo.title,
256
+						description: photo.description ? photo.description._content : undefined
257
+					}
258
+				};
259
+				
260
+				if (!isPhotos)
261
+					imageData.data = { photoset_id: photo.id };
262
+					
263
+				imagesData.push(imageData);
264
+			});
265
+		}
266
+		
267
+		return imagesData;
268
+    }
269
+}

+ 1
- 0
static/yoxview/data/picasa.js Näytä tiedosto

@@ -0,0 +1 @@
1
+function yox_picasa(){var f=jQuery,l=/http:\/\/picasaweb\.google\.\w+\/([^\/#\?]+)\/?([^\/#\?]+)?(\?([^#]*))?/;this.getImagesData=function(d,j){function m(a,d,c){for(var a=parseInt(a),g=d.length-1;g>=0;g--){var e=d[g];if(a>=e)return c?g<d.length-1?d[g+1]:e:e}return a}function n(b,c){var e=c==="album",g=[];jQuery.each(b.feed.entry,function(d,b){var c=e?b.title.$t+" ("+b.gphoto$numphotos.$t+" images)":b.summary.$t;if(!a.filter||c.match(a.filter)){var f=b.media$group.media$content[0],c={thumbnailSrc:b.media$group.media$thumbnail[1].url, link:b.link[1].href,media:{src:f.url,title:c,alt:c,width:f.width,height:f.height}};if(e)c.data={album:b.gphoto$name.$t};g.push(c)}});if(h.filter){var f=Yox.getUrlData(d.dataUrl);delete f.queryFields.filter;d.dataUrl=Yox.urlDataToPath(f)}d.dataSourceOptions&&d.dataSourceOptions.filter&&delete d.dataSourceOptions.filter;return g}var i=[94,110,128,200,220,288,320,400,512,576,640,720,800,912,1024,1152,1280,1440,1600],h={};if(d.dataUrl){var c=d.dataUrl.match(l);if(c&&c.length>1){h.user=c[1];if(c[2])h.album= c[2];c[4]&&f.extend(h,Yox.queryToJson(c[4]))}}var a=jQuery.extend({},{url:"http://picasaweb.google.com/data/feed/api/",setThumbnail:!0,setSingleAlbumThumbnails:!0,setTitle:!0,alt:"json",thumbsize:64},h,d.dataSourceOptions);if(a.user&&!a.album&&!a.q)a.thumbsize=104;if(a.tags)a.tag=a.tags;a.album==""&&delete a.album;var c=screen.width>screen.height?screen.width:screen.height,k=a.imgmax&&f.inArray(a.imgmax,i)==-1?a.imgmax:null;if(!a.imgmax||k||c<a.imgmax)a.imgmax=m(k||c,i,a.roundSizeUp);if(a.filter&& typeof a.filter==="string")a.filter=RegExp(a.filter,"i");var i=function(){var b=a.url;a.user&&a.user!="lh"?(b+="user/"+a.user,a.album&&(b+="/album/"+a.album)):b+="all";return b}(a),e={};if(d.onLoadBegin)d.onLoadBegin();f.jsonp({url:i,async:!1,dataType:"jsonp",data:a,callbackParameter:"callback",success:function(b){console.log(b);if(!b.feed.entry||b.feed.entry.length==0){if(d.onNoData)d.onNoData()}else{var c=b.feed.entry[0].category[0].term.match(/.*#(.*)/)[1];c==="album"&&f.extend(e,{title:b.feed.title.$t, createGroups:!0});e.images=n(b,c);if(b.feed.title)e.title=b.feed.title.$t;e.images.length>0&&a.setThumbnail&&!a.setSingleAlbumThumbnails&&f.extend(e,{isGroup:!0,link:b.feed.link[1].href,thumbnailSrc:b.feed.icon.$t,title:b.feed.title.$t});j&&j(e);if(d.onLoadComplete)d.onLoadComplete()}},error:function(){if(d.onLoadError)d.onLoadError("Picasa plugin encountered an error while retrieving data")}})}};

+ 197
- 0
static/yoxview/data/picasa.source.js Näytä tiedosto

@@ -0,0 +1,197 @@
1
+/*!
2
+ * Yox Picasa plugin
3
+ * http://yoxigen.com/yoxview/
4
+ *
5
+ * Copyright (c) 2010 Yossi Kolesnicov
6
+ *
7
+ * Licensed under the MIT license.
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Date: 13th November, 2010
11
+ * Version : 1.55
12
+ */
13
+function yox_picasa()
14
+{
15
+    var $ = jQuery;
16
+    var picasaRegex = /http:\/\/picasaweb\.google\.\w+\/([^\/#\?]+)\/?([^\/#\?]+)?(\?([^#]*))?/
17
+    var self = this;
18
+    
19
+    this.getImagesData = function(options, callback)
20
+    {
21
+        var defaults = {
22
+            url: "http://picasaweb.google.com/data/feed/api/",
23
+            setThumbnail: true,
24
+            setSingleAlbumThumbnails: true,
25
+            setTitle: true, // Whether to add a header with user and/or album name before thumbnails
26
+			alt: 'json',
27
+			thumbsize: 64
28
+        },
29
+        picasaThumbnailSizes = [32, 48, 64, 72, 104, 144, 150, 160],
30
+        picasaImgMaxSizes = [94, 110, 128, 200, 220, 288, 320, 400, 512, 576, 640, 720, 800, 912, 1024, 1152, 1280, 1440, 1600],
31
+        fromDataUrl = {};
32
+        
33
+        function getFeedUrl()
34
+        {
35
+            var feedUrl = datasourceOptions.url;
36
+		    if (datasourceOptions.user && datasourceOptions.user != "lh")
37
+		    {
38
+			    feedUrl += "user/" + datasourceOptions.user;
39
+			    if (datasourceOptions.album)
40
+				    feedUrl += "/album/" + datasourceOptions.album;
41
+            }
42
+            else
43
+			    feedUrl += "all";
44
+
45
+            return feedUrl;
46
+        }
47
+        
48
+        function picasa_getMaxSize(size, sizesArray, roundSizeUp)
49
+        {
50
+            size = parseInt(size);
51
+            for(var i=sizesArray.length - 1; i >= 0; i--)
52
+            {
53
+                var pSize = sizesArray[i];
54
+                if (size >= pSize)
55
+                    return roundSizeUp 
56
+                        ? i < sizesArray.length - 1 ? sizesArray[i + 1] : pSize
57
+                        : pSize;
58
+            }
59
+            
60
+            return size;
61
+        }
62
+        
63
+        function getImagesDataFromJson(data, kind)
64
+        {
65
+            var entry = data.feed.entry;
66
+            var isAlbum = kind === "album";
67
+            var imagesData = [];
68
+            jQuery.each(data.feed.entry, function(i, image){
69
+                var imageTitle = isAlbum ? image.title.$t + " (" + image.gphoto$numphotos.$t + " images)" : image.summary.$t;
70
+                
71
+                if (!datasourceOptions.filter || imageTitle.match(datasourceOptions.filter))
72
+                {
73
+                    var mediaData = image.media$group.media$content[0];
74
+                    var imageData = {
75
+                        thumbnailSrc : image.media$group.media$thumbnail[1].url,
76
+                        link: image.link[1].href,
77
+                        media: {
78
+                            src: mediaData.url,
79
+                            title: imageTitle,
80
+                            alt: imageTitle,
81
+                            width: mediaData.width,
82
+                            height: mediaData.height
83
+                        }
84
+                    };
85
+
86
+                    if (isAlbum)
87
+                        imageData.data = { album: image.gphoto$name.$t };
88
+
89
+                    imagesData.push(imageData);
90
+                }
91
+            });
92
+
93
+            if (fromDataUrl.filter)
94
+            {
95
+                var dataUrlObj = Yox.getUrlData(options.dataUrl);
96
+                delete dataUrlObj.queryFields.filter;
97
+                options.dataUrl = Yox.urlDataToPath(dataUrlObj);
98
+            }
99
+            if (options.dataSourceOptions && options.dataSourceOptions.filter)
100
+                delete options.dataSourceOptions.filter;
101
+
102
+            return imagesData;
103
+        }
104
+        
105
+        if (options.dataUrl)
106
+        {
107
+            var urlMatch = options.dataUrl.match(picasaRegex);
108
+            if (urlMatch && urlMatch.length > 1)
109
+            {
110
+                fromDataUrl.user = urlMatch[1];
111
+                if (urlMatch[2])
112
+                    fromDataUrl.album = urlMatch[2]
113
+				if (urlMatch[4])
114
+					$.extend(fromDataUrl, Yox.queryToJson(urlMatch[4]));
115
+            }
116
+        }
117
+
118
+        var datasourceOptions = jQuery.extend({}, defaults, fromDataUrl, options.dataSourceOptions);
119
+        
120
+		if (datasourceOptions.user && !datasourceOptions.album && !datasourceOptions.q)
121
+			datasourceOptions.thumbsize = 104;
122
+			
123
+        // Picasa web uses 'tags', while the API uses 'tag':
124
+        if (datasourceOptions.tags)
125
+            datasourceOptions.tag = datasourceOptions.tags;
126
+            
127
+        if (datasourceOptions.album == "")
128
+            delete datasourceOptions.album;
129
+
130
+        var screenSize = screen.width > screen.height ? screen.width : screen.height;
131
+        var unknownSize = datasourceOptions.imgmax && $.inArray(datasourceOptions.imgmax, picasaImgMaxSizes) == -1 ? datasourceOptions.imgmax : null;
132
+
133
+        // Save resources for smaller screens:
134
+        if (!datasourceOptions.imgmax || unknownSize || screenSize < datasourceOptions.imgmax)
135
+            datasourceOptions.imgmax = picasa_getMaxSize(unknownSize || screenSize, picasaImgMaxSizes, datasourceOptions.roundSizeUp);
136
+
137
+        if (datasourceOptions.filter){
138
+            if (typeof datasourceOptions.filter === "string")
139
+                datasourceOptions.filter = new RegExp(datasourceOptions.filter, "i");
140
+        }
141
+
142
+        var feedUrl = getFeedUrl(datasourceOptions);
143
+        var returnData = {};
144
+
145
+        if (options.onLoadBegin)
146
+            options.onLoadBegin();
147
+
148
+        $.jsonp({
149
+            url: feedUrl,
150
+            async: false,
151
+            dataType: 'jsonp',
152
+			data: datasourceOptions,
153
+            callbackParameter: "callback",
154
+            success: function(data)
155
+            {console.log(data);
156
+                if (!data.feed.entry || data.feed.entry.length == 0)
157
+                {
158
+                    if (options.onNoData)
159
+                        options.onNoData();
160
+                        
161
+                    return;
162
+                }
163
+                
164
+                var kind = data.feed.entry[0].category[0].term.match(/.*#(.*)/)[1]; // album or photo
165
+                if (kind === "album")
166
+                    $.extend(returnData, {
167
+                        title: data.feed.title.$t,
168
+                        createGroups: true
169
+                    });
170
+
171
+                returnData.images = getImagesDataFromJson(data, kind);
172
+                if (data.feed.title)
173
+                    returnData.title = data.feed.title.$t;
174
+                
175
+                if (returnData.images.length > 0 && datasourceOptions.setThumbnail && !datasourceOptions.setSingleAlbumThumbnails)
176
+                {
177
+                    $.extend(returnData, {
178
+                        isGroup: true,
179
+                        link: data.feed.link[1].href,
180
+                        thumbnailSrc: data.feed.icon.$t,
181
+						title: data.feed.title.$t
182
+                    });
183
+                }
184
+                
185
+                if (callback)
186
+                    callback(returnData);
187
+
188
+                if (options.onLoadComplete)
189
+                    options.onLoadComplete();
190
+            },
191
+            error : function(xOptions, textStatus){
192
+                if (options.onLoadError)
193
+                    options.onLoadError("Picasa plugin encountered an error while retrieving data");
194
+            }
195
+        });
196
+    }
197
+}

+ 1
- 0
static/yoxview/data/youtube.js Näytä tiedosto

@@ -0,0 +1 @@
1
+function yox_youtube(){var k=jQuery,o={singleVideo:/^http:\/\/(?:www\.)?youtube.com\/watch\?v=([^\&]+)(.*)?/,playlist:/^http:\/\/(?:www\.)?youtube.com\/(?:view_play_list|my_playlists)\?p=([^\&]+)(.*)?/,user:/^http:\/\/(?:www\.)?youtube.com\/user\/([^\?]+)(?:\?(.*))?/,search:/^http:\/\/(?:www\.)?youtube.com\/results\?(.*)/};this.getImagesData=function(g,p){function r(b){var i=[];if(a.filter){var h=a.filter.match(/\!([^,]+)/g),e=a.filter.match(/(,|^)[^\!,]([^,]+)/g);h=h?h.join("|").replace(/^\!/,"").replace(/\|\!/g, "|"):null;e=e?e.join("|").replace(/\|,/g,"|"):null;if(h)a.negativeFilterRegex=RegExp("(?:^|,)("+unescape(h)+")(?:,|$)");if(e)a.positiveFilterRegex=RegExp("(?:^|,)("+unescape(e)+")(?:,|$)")}jQuery.each(b,function(q,f){if(l==="playlist")f=f.video;var c;c=f.tags;if(!a.filter||!c)c=false;else{c=c.join(",");var m=a.negativeFilterRegex&&a.negativeFilterRegex.test(c);m||(m=a.positiveFilterRegex&&!a.positiveFilterRegex.test(c));c=m}if(!c){c=f.title;c={thumbnailSrc:f.thumbnail[a.hqThumbnails?"hqDefault":"sqDefault"], link:f.player["default"],media:{element:k("<div>",{className:"yoxview_element",html:"<object width='100%' height='100%'><param name='movie' value='"+(f.content["5"]+"&fs=1&hd=1")+"'</param><param name='allowFullScreen' value='true'></param><param name='wmode' value='transparent'></param><param name='allowScriptAccess' value='always'></param><embed src='"+(f.content["5"]+"&fs=1&hd=1")+"' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' wmode='transparent' width='100%' height='100%'></embed></object>"}), title:c,contentType:"flash",elementId:f.id,description:f.description}};k.extend(c.media,s(!!f.aspectRatio&&f.aspectRatio==="widescreen"));i.push(c)}});return i}var j=false,a=jQuery.extend({},{url:"http://gdata.youtube.com/feeds/api/videos",setThumbnails:true,setSingleAlbumThumbnails:true,alt:"jsonc",thumbsize:64,v:2,format:5,hqThumbnails:false,aspectRatio:"auto"},g.dataSourceOptions),l;if(g.dataUrl){var d;for(regexType in o)if(d=g.dataUrl.match(o[regexType])){l=regexType;break}if(d){switch(l){case "singleVideo":j= true;a.url+="/"+d[1];break;case "playlist":a.url="http://gdata.youtube.com/feeds/api/playlists/"+d[1];break;case "user":a.url="http://gdata.youtube.com/feeds/api/users/"+d[1]+"/uploads"}if(d=Yox.queryToJson(d.length==2?d[1]:d[2])){if(d.search_query){d.q=d.search_query;delete d.search_query}k.extend(a,d)}}}var s=function(){var b,i,h=16/9,e=false;if(!a.width&&!a.height)a.width=720;if(a.height&&!a.width||a.width&&!a.height){if(typeof a.aspectRatio==="string")if(a.aspectRatio==="auto")a.aspectRatio=4/ 3;else{e=a.aspectRatio.split(":");a.aspectRatio=parseInt(e[0],10)/parseInt(e[1],10)}e=a.aspectRatio===16/9;if(a.height){b={height:a.height,width:a.height*h};e||(i={height:a.height,width:a.height*a.aspectRatio})}else{b={width:a.width,height:a.width/h};e||(i={width:a.width,height:a.width/a.aspectRatio})}}return function(q){return q?b:i}}(),n={};g.onLoadBegin&&g.onLoadBegin();k.jsonp({url:a.url,data:a,async:false,callbackParameter:"callback",success:function(b){if(j&&!b.data||!j&&(!b.data.items||b.data.items.length=== 0))g.onNoData&&g.onNoData();else{n.contents=r(j?[b.data]:b.data.items);if(!j)if(b=b.data.title)n.title=b;p&&p(n);g.onLoadComplete&&g.onLoadComplete()}},error:function(){g.onLoadError&&g.onLoadError("YouTube plugin encountered an error while retrieving data")}})}};

+ 197
- 0
static/yoxview/data/youtube.source.js Näytä tiedosto

@@ -0,0 +1,197 @@
1
+/*!
2
+ * Yox YouTube plugin
3
+ * http://yoxigen.com/yoxview/
4
+ *
5
+ * Copyright (c) 2010 Yossi Kolesnicov
6
+ *
7
+ * Licensed under the MIT license.
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Date: 13th November, 2010
11
+ * Version : 1.0
12
+ */
13
+function yox_youtube()
14
+{
15
+    var $ = jQuery,
16
+        youtubeRegex = /^http:\/\/(?:www\.)?youtube.com\//,
17
+        self = this,
18
+        ytRegex = {
19
+            singleVideo: /^http:\/\/(?:www\.)?youtube.com\/watch\?v=([^\&]+)(.*)?/,
20
+            playlist: /^http:\/\/(?:www\.)?youtube.com\/(?:view_play_list|my_playlists)\?p=([^\&]+)(.*)?/,
21
+            user: /^http:\/\/(?:www\.)?youtube.com\/user\/([^\?]+)(?:\?(.*))?/,
22
+            search: /^http:\/\/(?:www\.)?youtube.com\/results\?(.*)/
23
+        };
24
+
25
+    this.getImagesData = function(options, callback)
26
+    {
27
+        var defaults = {
28
+            url: "http://gdata.youtube.com/feeds/api/videos",
29
+            setThumbnails: true,
30
+            setSingleAlbumThumbnails: true,
31
+			alt: 'jsonc',
32
+			thumbsize: 64,
33
+			v: 2,
34
+			format: 5,
35
+			hqThumbnails: false,
36
+			aspectRatio: "auto"
37
+        },
38
+        isSingleVideo = false,
39
+        datasourceOptions = jQuery.extend({}, defaults, options.dataSourceOptions);
40
+
41
+        function getDimensionsCalc(){
42
+            var widescreenDimensions,
43
+                defaultDimensions,            
44
+                widescreenAspectRatio = 16/9,
45
+                defaultIsWidescreen = false;
46
+            
47
+            if (!datasourceOptions.width && !datasourceOptions.height)
48
+                datasourceOptions.width = 720;
49
+                
50
+            if ((datasourceOptions.height && !datasourceOptions.width) || (datasourceOptions.width && !datasourceOptions.height)){
51
+                if (typeof(datasourceOptions.aspectRatio) === "string"){
52
+                    if (datasourceOptions.aspectRatio === "auto")
53
+                        datasourceOptions.aspectRatio = 4/3;
54
+                    else{
55
+                        var ratioValues = datasourceOptions.aspectRatio.split(":");
56
+                        datasourceOptions.aspectRatio = parseInt(ratioValues[0], 10) / parseInt(ratioValues[1], 10);
57
+                    }
58
+                }
59
+                
60
+                defaultIsWidescreen = datasourceOptions.aspectRatio === 16/9;
61
+                if (datasourceOptions.height){
62
+                    widescreenDimensions = { height: datasourceOptions.height, width: datasourceOptions.height * widescreenAspectRatio };
63
+                    if (!defaultIsWidescreen)
64
+                        defaultDimensions = { height: datasourceOptions.height, width: datasourceOptions.height * datasourceOptions.aspectRatio };
65
+                }
66
+                else{
67
+                    widescreenDimensions = { width: datasourceOptions.width, height: datasourceOptions.width / widescreenAspectRatio };
68
+                    if (!defaultIsWidescreen)
69
+                        defaultDimensions = { width: datasourceOptions.width, height: datasourceOptions.width / datasourceOptions.aspectRatio };
70
+                }
71
+
72
+            }
73
+            
74
+            var getDimensions = function(isWidescreen){
75
+                return isWidescreen ? widescreenDimensions : defaultDimensions;
76
+            }
77
+            
78
+            return getDimensions;
79
+        }
80
+        
81
+        var feedType;
82
+        if (options.dataUrl)
83
+        {
84
+            var urlMatch;    
85
+            for (regexType in ytRegex){
86
+                urlMatch = options.dataUrl.match(ytRegex[regexType]);
87
+                if (urlMatch)
88
+                {
89
+                    feedType = regexType;
90
+                    break;
91
+                }
92
+            }
93
+
94
+            if (urlMatch){ 
95
+                switch(feedType){
96
+                    case "singleVideo":
97
+                        isSingleVideo = true;
98
+                        datasourceOptions.url += "/" + urlMatch[1];
99
+                        break;
100
+                    case "playlist":
101
+                        datasourceOptions.url = "http://gdata.youtube.com/feeds/api/playlists/" + urlMatch[1];
102
+                        break;
103
+                    case "user":
104
+                        datasourceOptions.url = "http://gdata.youtube.com/feeds/api/users/" + urlMatch[1] + "/uploads";
105
+                        break;
106
+                    default:
107
+                        break;
108
+                }
109
+                
110
+                var queryData = Yox.queryToJson(urlMatch.length == 2 ? urlMatch[1] : urlMatch[2]);
111
+                if (queryData){
112
+                    if (queryData.search_query){
113
+                        queryData.q = queryData.search_query;
114
+                        delete queryData.search_query;
115
+                    }
116
+                    $.extend(datasourceOptions, queryData);
117
+                }
118
+            }
119
+        }
120
+
121
+        var getDimensions = getDimensionsCalc();
122
+        
123
+        function getEmbedObject(embedUrl){
124
+            var videoPanel = $("<div>", {
125
+                className: "yoxview_element",
126
+                html: "<object width='100%' height='100%'><param name='movie' value='" + embedUrl + "'</param><param name='allowFullScreen' value='true'></param><param name='wmode' value='transparent'></param><param name='allowScriptAccess' value='always'></param><embed src='" + embedUrl + "' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' wmode='transparent' width='100%' height='100%'></embed></object>"
127
+            });
128
+            return videoPanel;
129
+        }
130
+        function getVideosDataFromJson(items)
131
+        {
132
+            var videosData = [];
133
+            jQuery.each(items, function(i, video){
134
+                if (feedType === "playlist")
135
+                    video = video.video;
136
+                
137
+                var videoTitle = video.title;
138
+                var videoData = {
139
+                    thumbnailSrc: video.thumbnail[datasourceOptions.hqThumbnails ? "hqDefault" : "sqDefault"],
140
+                    link: video.player["default"],
141
+                    media: {
142
+                        "element": getEmbedObject(video.content["5"] + "&fs=1&hd=1"),
143
+                        title: videoTitle,
144
+                        contentType: "flash",
145
+                        elementId: video.id,
146
+                        description: video.description
147
+                    }
148
+                };
149
+
150
+                $.extend(videoData.media, getDimensions(!!video.aspectRatio && video.aspectRatio === "widescreen"));
151
+                videosData.push(videoData);
152
+            });
153
+            
154
+            return videosData;
155
+        }
156
+    
157
+        var returnData = {};
158
+        
159
+        if (options.onLoadBegin)
160
+            options.onLoadBegin();
161
+            
162
+        $.jsonp({
163
+            url: datasourceOptions.url,
164
+            data: datasourceOptions,
165
+            async: false,
166
+            callbackParameter: "callback",
167
+            success: function(jsonData)
168
+            {
169
+                if ((isSingleVideo && !jsonData.data) || (!isSingleVideo && (!jsonData.data.items || jsonData.data.items.length === 0)))
170
+                {
171
+                    if (options.onNoData)
172
+                        options.onNoData();
173
+                        
174
+                    return;
175
+                }
176
+                
177
+                returnData.images = getVideosDataFromJson(isSingleVideo ? [ jsonData.data ] : jsonData.data.items);
178
+                
179
+                if (!isSingleVideo){
180
+                    var dataTitle = jsonData.data.title;
181
+                    if (dataTitle)
182
+                        returnData.title = dataTitle;
183
+                }
184
+                    
185
+                if (callback)
186
+                    callback(returnData);
187
+
188
+                if (options.onLoadComplete)
189
+                    options.onLoadComplete();
190
+            },
191
+            error : function(xOptions, textStatus){
192
+                if (options.onLoadError)
193
+                    options.onLoadError("YouTube plugin encountered an error while retrieving data");
194
+            }
195
+        });
196
+    }
197
+}

BIN
static/yoxview/images/empty.gif Näytä tiedosto


BIN
static/yoxview/images/help_panel.png Näytä tiedosto


BIN
static/yoxview/images/left.png Näytä tiedosto


BIN
static/yoxview/images/left_empty.png Näytä tiedosto


BIN
static/yoxview/images/left_eng.png Näytä tiedosto


BIN
static/yoxview/images/left_prev.png Näytä tiedosto


BIN
static/yoxview/images/popup_ajax_loader.gif Näytä tiedosto


BIN
static/yoxview/images/right.png Näytä tiedosto


BIN
static/yoxview/images/right_empty.png Näytä tiedosto


BIN
static/yoxview/images/right_eng.png Näytä tiedosto


BIN
static/yoxview/images/sprites.png Näytä tiedosto


+ 232
- 0
static/yoxview/jquery.yoxthumbs.js Näytä tiedosto

@@ -0,0 +1,232 @@
1
+/*!
2
+ * jquery.yoxthumbs
3
+ * jQuery thumbnails plugin
4
+ * http://yoxigen.com/
5
+ *
6
+ * Copyright (c) 2010 Yossi Kolesnicov
7
+ *
8
+ * Date: 13th November, 2010
9
+ * Version : 0.95
10
+ */
11
+(function($){
12
+    $.fn.yoxthumbs = function(opt) {
13
+		if (this.length == 0)
14
+            return this;
15
+			
16
+        if (typeof(opt) != 'string')
17
+        {
18
+            var defaults = {
19
+                target: null, // an yoxview instance
20
+                selectedThumbnailClassName : "selected",
21
+                thumbsOpacityFadeTime: 300,
22
+                thumbsOpacity : undefined,
23
+                prevBtn: undefined,
24
+                nextBtn: undefined,
25
+                onClick: undefined,
26
+                images: undefined,
27
+                enableOnlyMedia: false // If set to true, YoxThumbs is enabled only for links whose HREF is to an image or other supported media.
28
+            };
29
+            
30
+            var options = $.extend(defaults, opt);
31
+            var $this = $(this);
32
+            $this.data("yoxthumbs", new YoxThumbs($this, options));
33
+            return this;
34
+        }
35
+        else
36
+        {
37
+            var instance = $(this).data("yoxthumbs");
38
+            if (instance)
39
+            {
40
+                if ($.isFunction(instance[opt]))
41
+                    instance[opt].apply(instance, Array.prototype.slice.call(arguments, 1));
42
+                else
43
+                    return instance[opt];
44
+            }
45
+            return this;
46
+        }
47
+    };
48
+    function YoxThumbs(container, options)
49
+    {
50
+        var self = this,
51
+            prevBtn = options.prevBtn,
52
+            nextBtn = options.nextBtn,
53
+            viewIndex = container.data("yoxview") ? container.data("yoxview").viewIndex : undefined,
54
+            $ = jQuery,
55
+		    containerIsAnchor = container[0].tagName == "A",
56
+		    shortenFunctions = {};
57
+			
58
+		this.thumbnails = [];
59
+
60
+        (function setShortenFunctions(){
61
+            $.each(["title", "description"], function(i, fieldName){
62
+                var maxLength = options[fieldName + "MaxLength"];
63
+                shortenFunctions[fieldName] = function(str){
64
+                    return !maxLength || str.length <= maxLength ? str : str.substr(0, maxLength) + (options.addEllipsis !== false ? "&hellip;" : "");
65
+                };
66
+            });
67
+        })();
68
+        
69
+        // If images data has been specified, create the thumbnails:
70
+        if (options.images)
71
+            $.each(options.images, function(i, imageData){
72
+                container.append(createThumbnail(imageData));
73
+            });
74
+
75
+        var currentImageIndex = 0,
76
+		    foundThumbnails = containerIsAnchor ? container : container.find("a:has(img)");
77
+		    
78
+        $.each(foundThumbnails, function(i, thumbnail)
79
+        {
80
+            var $thumbnail = $(thumbnail);
81
+            var addThumb = true;
82
+            if (options.enableOnlyMedia)
83
+            {
84
+                if (!thumbnail.href.match(Yox.Regex.image))
85
+                {
86
+                    var isData = false;
87
+                    for(dataProvider in Yox.Regex.data)
88
+                    {
89
+                        if (thumbnail.href.match(Yox.Regex.data[dataProvider]))
90
+                        {
91
+                            isData = true;
92
+                            break;
93
+                        }
94
+                    }
95
+                    if (!isData)
96
+                    {
97
+                        var isVideo = false;
98
+                        for(videoProvider in Yox.Regex.video)
99
+                        {
100
+                            if (thumbnail.href.match(Yox.Regex.video[videoProvider]))
101
+                            {
102
+                                isVideo = true;
103
+                                break;
104
+                            }
105
+                        }
106
+                        if (!isVideo)
107
+                            addThumb = false;
108
+                    }
109
+                }
110
+            }
111
+            
112
+            if (addThumb)
113
+            {
114
+                $thumbnail.data("yoxthumbs", $.extend({imageIndex: currentImageIndex++}, $thumbnail.data("yoxthumbs")));
115
+                self.thumbnails.push($thumbnail);
116
+            }
117
+        });
118
+
119
+        if (options.thumbsOpacity)
120
+        {
121
+            this.thumbnails.css("opacity", options.thumbsOpacity);
122
+            container.delegate("a:has(img)", "mouseenter.yoxthumbs", function(e){
123
+                if (self.currentSelectedIndex === undefined || 
124
+                    $(e.currentTarget).data("yoxthumbs").imageIndex != self.currentSelectedIndex){
125
+                    $(e.currentTarget).stop().animate({opacity: 1}, options.thumbsOpacityFadeTime);
126
+                }
127
+            })
128
+            .delegate("a:has(img)", "mouseout.yoxthumbs", function(e){
129
+                if (self.currentSelectedIndex === undefined || 
130
+                    $(e.currentTarget).data("yoxthumbs").imageIndex != self.currentSelectedIndex)
131
+                    $(e.currentTarget).stop().animate({opacity: options.thumbsOpacity}, options.thumbsOpacityFadeTime);
132
+            });
133
+        }
134
+        if (options.onClick)
135
+        {
136
+			if (containerIsAnchor)
137
+				container.bind("click.yoxthumbs", function(e){
138
+					options.onClick(e);
139
+					return false;
140
+				});
141
+			else
142
+				container.delegate("a:has(img)", "click.yoxthumbs", function(e){
143
+				    if (!$(e.currentTarget).data("yoxthumbs"))
144
+				        return true;
145
+				        
146
+					options.onClick(e);
147
+					return false;
148
+				});
149
+        }
150
+
151
+        function createThumbnail(imageData, viewIndex)
152
+        {
153
+            var thumbnail = $("<a>", {
154
+                href: imageData.link,
155
+                className: options.thumbnailsClass || "yoxthumbs_thumbnail"
156
+            });
157
+            
158
+            var thumbImage = jQuery("<img>", {
159
+                src : imageData.thumbnailSrc,
160
+                alt : imageData.media.alt,
161
+                title : imageData.media.title
162
+            });
163
+
164
+            if (imageData.data)
165
+                thumbnail.data("yoxthumbs", imageData.data);
166
+                
167
+            if (imageData.thumbnailDimensions)
168
+                thumbImage.css({
169
+                    "width": imageData.thumbnailDimensions.width,
170
+                    "height" : imageData.thumbnailDimensions.height
171
+                });
172
+            thumbImage.appendTo(thumbnail);
173
+            
174
+            if (options.setTitles && imageData.media.title){
175
+                $(options.titlesElement || "<span>", {
176
+                    html: shortenFunctions.title(imageData.media.title),
177
+                    className: options.titlesClass
178
+                }).appendTo(thumbnail);
179
+            }
180
+            
181
+            if (options.setDescriptions && imageData.media.description){
182
+                $(options.descriptionsElement || "<div>", {
183
+                    html: shortenFunctions.description(imageData.media.description),
184
+                    className: options.descriptionsClass
185
+                }).appendTo(thumbnail);
186
+            }
187
+            
188
+            return thumbnail;
189
+        }
190
+        
191
+        // Selects a thumbnail
192
+        this.select = function(thumbIndex)
193
+        {
194
+            if (this.currentSelectedIndex === undefined || this.currentSelectedIndex != thumbIndex)
195
+            {
196
+                var currentThumbnail = this.thumbnails.eq(thumbIndex);
197
+                var yoxslider = container.data("yoxslide");
198
+                if (yoxslider)
199
+                    yoxslider.show(currentThumbnail);
200
+
201
+                // Remove selection from previous thumbnail:
202
+                if (this.currentSelectedIndex !== undefined)
203
+                {
204
+                    var previousSelectedThumbnail = this.thumbnails.eq(this.currentSelectedIndex);
205
+                    previousSelectedThumbnail.removeClass(options.selectedThumbnailClassName);
206
+                    if (options.thumbsOpacity)
207
+                        previousSelectedThumbnail.animate({opacity: options.thumbsOpacity}, options.thumbsOpacityFadeTime);
208
+                        
209
+                }
210
+                
211
+                currentThumbnail.addClass(options.selectedThumbnailClassName);
212
+                if (options.thumbsOpacity)
213
+                    currentThumbnail.animate({opacity: 1}, options.thumbsOpacityFadeTime);
214
+                                        
215
+                this.currentSelectedIndex = thumbIndex;
216
+            }
217
+        }
218
+        this.unload = function(dataKey)
219
+        {
220
+            $.each(this.thumbnails, function(i, thumbnail)
221
+            {
222
+                $(thumbnail).removeData("yoxthumbs");
223
+                if (dataKey)
224
+                    $(thumbnail).removeData(dataKey);
225
+            });
226
+            container.undelegate("a:has(img)", "click.yoxthumbs");
227
+            container.find(".yoxthumbs_thumbnail").remove();
228
+            if (containerIsAnchor)
229
+                container.unbind(".yoxthumbs");
230
+        }
231
+    }
232
+})(jQuery);

+ 2227
- 0
static/yoxview/jquery.yoxview-2.21.js
File diff suppressed because it is too large
Näytä tiedosto


+ 110
- 0
static/yoxview/jquery.yoxview-2.21.min.js Näytä tiedosto

@@ -0,0 +1,110 @@
1
+if (!jQuery.jsonp)
2
+{
3
+	// jquery.jsonp 1.0.4 (c) 2009 Julian Aubourg | MIT License
4
+	// http://code.google.com/p/jquery-jsonp/
5
+	(function($){var x=function(o){return o!==undefined&&o!==null;},H=$("head"),Z={},K={callback:"C",url:location.href};$.jsonp=function(d){d=$.extend({},K,d);if(x(d.beforeSend)){var t=0;d.abort=function(){t=1;};if(d.beforeSend(d,d)===false||t)return d;}
6
+	var _="",y="success",n="error",u=x(d.url)?d.url:_,p=x(d.data)?d.data:_,s=(typeof p)=="string",k=function(f){setTimeout(f,1);},S,P,i,j,U;p=s?p:$.param(p);x(d.callbackParameter)&&(p+=(p==_?_:"&")+escape(d.callbackParameter)+"=?");!d.cache&&!d.pageCache&&(p+=[(p==_?_:"&"),"_xx",(new Date()).getTime(),"=",1].join(_));S=u.split("?");if(p!=_){P=p.split("?");j=S.length-1;j&&(S[j]+="&"+P.shift());S=S.concat(P);}
7
+	i=S.length-2;i&&(S[i]+=d.callback+S.pop());U=S.join("?");if(d.pageCache&&x(Z[U])){k(function(){if(x(Z[U].e)){x(d.error)&&d.error(d,n);x(d.complete)&&d.complete(d,n);}else{var v=Z[U].s;x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);}});return d;}
8
+	var f=$("<iframe />");H.append(f);var F=f[0],W=F.contentWindow||F.contentDocument,D=W.document;if(!x(D)){D=W;W=D.getParentNode();}
9
+	var w,e=function(_,m){d.pageCache&&!x(m)&&(Z[U]={e:1});w();m=x(m)?m:n;x(d.error)&&d.error(d,m);x(d.complete)&&d.complete(d,m);},t=0,C=d.callback,E=C=="E"?"X":"E";D.open();W[C]=function(v){t=1;d.pageCache&&(Z[U]={s:v});k(function(){w();x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);});};W[E]=function(s){(!s||s=="complete")&&!t++&&k(e);};w=function(){W[E]=undefined;W[C]=undefined;try{delete W[E];}catch(_){}
10
+	try{delete W[C];}catch(_){}
11
+	D.open()
12
+	D.write(_);D.close();f.remove();}
13
+	k(function(){D.write(['<html><head><script src="',U,'" onload="',E,'()" onreadystatechange="',E,'(this.readyState)"></script></head><body onload="',E,'()"></body></html>'].join(_));D.close();});d.timeout>0&&setTimeout(function(){!t&&e(_,"timeout");},d.timeout);d.abort=w;return d;}
14
+	$.jsonp.setup=function(o){$.extend(K,o);};})(jQuery);
15
+}
16
+
17
+if (!jQuery().flash)
18
+{
19
+	// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
20
+	// http://jquery.thewikies.com/swfobject
21
+	(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
22
+}
23
+
24
+if (typeof Yox == "undefined")
25
+Yox={addStylesheet:function(a,b){var d=a.createElement("link");d.setAttribute("rel","Stylesheet");d.setAttribute("type","text/css");d.setAttribute("href",b);a.getElementsByTagName("head")[0].appendChild(d)},compare:function(a,b){function d(g){var h=0,i;for(i in g)i!=null&&h++;return h}if(typeof a!=typeof b)return false;else if(typeof a=="function")return a==b;if(d(a)!=d(b))return false;for(var e in a){var c=a[e],f=b[e];if(typeof c!=typeof f)return false;if(c&&c.length&&c[0]!==undefined&&c[0].tagName){if(!f||
26
+f.length!=c.length||!f[0].tagName||f[0].tagName!=c[0].tagName)return false}else if(typeof c=="function"||typeof c=="object"){c=Yox.compare(c,f);if(!c)return c}else if(c!=f)return false}return true},hasProperties:function(a){var b=false;for(pName in a){b=true;break}return b},dataSources:[],fitImageSize:function(a,b,d,e){var c={width:a.width,height:a.height};if(a.width>b.width||d&&a.width<b.width){c.height=Math.round(b.width/a.width*a.height);c.width=b.width}if(!e&&c.height>b.height){c.width=Math.round(b.height/
27
+c.height*c.width);c.height=b.height}else if(e&&c.height<b.height&&(b.height<=a.height||d)){c.height=b.height;c.width=Math.round(b.height/a.height*a.width)}return c},flashVideoPlayers:{jwplayer:function(a,b,d,e,c){a={swf:a||"/jwplayer/player.swf",flashVars:{file:b,image:d,stretching:"fill",title:e,backcolor:"000000",frontcolor:"FFFFFF"}};$.extend(a.flashVars,c);return a}},getDataSourceName:function(a){for(dataSourceIndex in Yox.Regex.data)if(a.match(Yox.Regex.data[dataSourceIndex]))return dataSourceIndex;
28
+return null},getPath:function(a){for(var b=document.getElementsByTagName("script"),d=0;d<b.length;d++){var e=b[d].src.match(a);if(e)return e[1]}return null},getTopWindow:function(){var a=window;if(window.top)a=window.top;else for(;a.parent;)a=a.parent;return a},getUrlData:function(a){a=a.match(Yox.Regex.url);if(!a)return null;var b={path:a[1],anchor:a[3]};if(a[2])b.queryFields=this.queryToJson(a[2]);return b},hex2rgba:function(a,b){a=parseInt(a.replace("#","0x"),16);return"rgba("+((a&16711680)>>16)+
29
+", "+((a&65280)>>8)+", "+(a&255)+", "+(typeof b!="undefined"?b:"1")+")"},queryToJson:function(a){if(!a)return null;a=a.split("&");for(var b={},d=0;d<a.length;d++){var e=a[d].split("=");if(e.length==2)b[e[0]]=e[1]}return b},loadDataSource:function(a,b){var d;if(a.dataUrl)(d=Yox.getDataSourceName(a.dataUrl))&&$.extend(a,{dataSource:dataSourceIndex});if(a.dataSource&&!Yox.dataSources[d])$.ajax({url:a.dataFolder+a.dataSource+".js",async:false,dataType:"script",success:function(e){eval(e);eval("Yox.dataSources['"+
30
+a.dataSource+"'] = new yox_"+a.dataSource+"();");b(Yox.dataSources[a.dataSource])},error:function(e,c,f){console.log(e,c,f)}});else b&&b()},Regex:{data:{picasa:/http:\/\/(?:www\.)?picasaweb\.google\..*/i,flickr:/http:\/\/(?:www\.)?flickr.com/i,smugmug:/http:\/\/.*\.smugmug.com/i,youtube:/^http:\/\/(?:www\.)?youtube.com\//},flash:/^(.*\.(swf))(\?[^\?]+)?/i,flashvideo:/^(.*\.(flv|f4v|f4p|f4a|f4b|aac))(\?[^\?]+)?/i,image:/^[^\?#]+\.(?:jpg|jpeg|gif|png)$/i,url:/^([^#\?]*)?(?:\?([^\?#]*))?(?:#([A-Za-z]{1}[A-Za-z\d-_\:\.]+))?$/,
31
+video:{youtube:/.*youtube.com\/watch.*(?:v=[^&]+).*/i,vimeo:/vimeo.com\/\d+/i,hulu:/hulu.com\/watch\//i,viddler:/viddler.com\//i,flickr:/.*flickr.com\/.*/i,myspace:/.*vids.myspace.com\/.*/i,qik:/qik.com/i,revision3:/revision3.com/i,dailymotion:/dailymotion.com/i,"5min":/.*5min\.com\/Video/i}},Sprites:function(a,b,d){this.spritesImage=(new Image).src=b;var e=0;jQuery.each(a,function(c,f){f.top=e;e+=f.height});this.getSprite=function(c,f,g){return jQuery("<img/>",{src:d,alt:f,title:g,css:{width:a[c].width,
32
+height:a[c].height,"background-image":"url("+b+")","background-repeat":"no-repeat","background-position":this.getBackgroundPosition(c,f)}})};this.getBackgroundPosition=function(c,f){return"-"+jQuery.inArray(f,a[c].sprites)*(a[c].width||0)+"px -"+a[c].top+"px"}},Support:{rgba:function(){if(!("result"in arguments.callee)){var a=document.createElement("div"),b=false;try{a.style.color="rgba(0, 0, 0, 0.5)";b=/^rgba/.test(a.style.color)}catch(d){}arguments.callee.result=b}return arguments.callee.result}},
33
+urlDataToPath:function(a){var b=a.path||"";if(a.queryFields&&this.hasProperties(a.queryFields)){b+="?";for(field in a.queryFields)b+=field+"="+a.queryFields[field]+"&";b=b.substring(0,b.length-1)}if(a.anchor)b+="#"+a.anchor;return b}};
34
+
35
+// yoxthumbs:
36
+(function(h){function n(d,a){function k(b){var c=f("<a>",{href:b.link,className:a.thumbnailsClass||"yoxthumbs_thumbnail"}),e=jQuery("<img>",{src:b.thumbnailSrc,alt:b.media.alt,title:b.media.title});b.data&&c.data("yoxthumbs",b.data);b.thumbnailDimensions&&e.css({width:b.thumbnailDimensions.width,height:b.thumbnailDimensions.height});e.appendTo(c);if(a.setTitles&&b.media.title)f(a.titlesElement||"<span>",{html:l.title(b.media.title),className:a.titlesClass}).appendTo(c);if(a.setDescriptions&&b.media.description)f(a.descriptionsElement||
37
+"<div>",{html:l.description(b.media.description),className:a.descriptionsClass}).appendTo(c);return c}var i=this;d.data("yoxview")&&d.data("yoxview");var f=jQuery,m=d[0].tagName=="A",l={};this.thumbnails=[];(function(){f.each(["title","description"],function(b,c){var e=a[c+"MaxLength"];l[c]=function(g){return!e||g.length<=e?g:g.substr(0,e)+(a.addEllipsis!==false?"&hellip;":"")}})})();a.images&&f.each(a.images,function(b,c){d.append(k(c))});var o=0,p=m?d:d.find("a:has(img)");f.each(p,function(b,c){var e=
38
+f(c),g=true;if(a.enableOnlyMedia)if(!c.href.match(Yox.Regex.image)){var j=false;for(dataProvider in Yox.Regex.data)if(c.href.match(Yox.Regex.data[dataProvider])){j=true;break}if(!j){j=false;for(videoProvider in Yox.Regex.video)if(c.href.match(Yox.Regex.video[videoProvider])){j=true;break}j||(g=false)}}if(g){e.data("yoxthumbs",f.extend({imageIndex:o++},e.data("yoxthumbs")));i.thumbnails.push(e)}});if(a.thumbsOpacity){this.thumbnails.css("opacity",a.thumbsOpacity);d.delegate("a:has(img)","mouseenter.yoxthumbs",
39
+function(b){if(i.currentSelectedIndex===undefined||f(b.currentTarget).data("yoxthumbs").imageIndex!=i.currentSelectedIndex)f(b.currentTarget).stop().animate({opacity:1},a.thumbsOpacityFadeTime)}).delegate("a:has(img)","mouseout.yoxthumbs",function(b){if(i.currentSelectedIndex===undefined||f(b.currentTarget).data("yoxthumbs").imageIndex!=i.currentSelectedIndex)f(b.currentTarget).stop().animate({opacity:a.thumbsOpacity},a.thumbsOpacityFadeTime)})}if(a.onClick)m?d.bind("click.yoxthumbs",function(b){a.onClick(b);
40
+return false}):d.delegate("a:has(img)","click.yoxthumbs",function(b){if(!f(b.currentTarget).data("yoxthumbs"))return true;a.onClick(b);return false});this.select=function(b){if(this.currentSelectedIndex===undefined||this.currentSelectedIndex!=b){var c=this.thumbnails.eq(b),e=d.data("yoxslide");e&&e.show(c);if(this.currentSelectedIndex!==undefined){e=this.thumbnails.eq(this.currentSelectedIndex);e.removeClass(a.selectedThumbnailClassName);a.thumbsOpacity&&e.animate({opacity:a.thumbsOpacity},a.thumbsOpacityFadeTime)}c.addClass(a.selectedThumbnailClassName);
41
+a.thumbsOpacity&&c.animate({opacity:1},a.thumbsOpacityFadeTime);this.currentSelectedIndex=b}};this.unload=function(b){f.each(this.thumbnails,function(c,e){f(e).removeData("yoxthumbs");b&&f(e).removeData(b)});d.undelegate("a:has(img)","click.yoxthumbs");d.find(".yoxthumbs_thumbnail").remove();m&&d.unbind(".yoxthumbs")}}h.fn.yoxthumbs=function(d){if(this.length==0)return this;if(typeof d!="string"){var a=h.extend({target:null,selectedThumbnailClassName:"selected",thumbsOpacityFadeTime:300,thumbsOpacity:undefined,
42
+prevBtn:undefined,nextBtn:undefined,onClick:undefined,images:undefined,enableOnlyMedia:false},d),k=h(this);k.data("yoxthumbs",new n(k,a))}else if(a=h(this).data("yoxthumbs"))if(h.isFunction(a[d]))a[d].apply(a,Array.prototype.slice.call(arguments,1));else return a[d];return this}})(jQuery);
43
+
44
+/*!
45
+ * jquery.yoxview
46
+ * jQuery media viewer
47
+ * http://yoxigen.com/yoxview
48
+ *
49
+ * Copyright (c) 2010 Yossi Kolesnicov
50
+ *
51
+ * Licensed under the MIT license.
52
+ * http://www.opensource.org/licenses/mit-license.php
53
+ *
54
+ * Date: 13th November, 2010
55
+ * Version : 2.2
56
+ */ 
57
+(function(b){function jb(){function H(a){for(var c=A.length,e=0;e<c;e++)if(Yox.compare(A[e],a))return e;A.push(a);return c}function za(a){return"a:has(img)"+(a.textLinksSelector!==null?",a"+a.textLinksSelector:"")}function kb(a,c){if(a.skin){var e=a.skin;if(b.yoxview.yoxviewSkins[e])c&&c(b.yoxview.yoxviewSkins[e]);else{var f=P+"skins/"+e+"/yoxview."+e;b.ajax({url:f+".js",dataType:"script",success:function(){b.yoxview.yoxviewSkins[e].css!==false&&Yox.addStylesheet(top.document,f+".css");c&&c(b.yoxview.yoxviewSkins[e])},
58
+error:function(){alert("Error loading skin file "+f+".js")}})}}else c&&c(b.yoxview.yoxviewSkins[e])}function lb(a,c){if(W[a])c&&c(W[a]);else{W[a]={};var e=P+"lang/"+a+".js";b.ajax({url:e,async:false,dataType:"json",success:function(f){W[a]=f;c&&c(f)},error:function(){alert("Error loading language file "+e)}})}}function Aa(a){a=a.data("yoxview");if(!w||Ba!=a.viewIndex){if(!a.cacheVars)a.cacheVars={cachedImagesCount:0,cacheDirectionForward:true,cacheBufferLastIndex:null,currentCacheImg:0};w=a.images;
59
+m=w.length;Ba=a.viewIndex;var c=false;if(!la||la!=a.optionsSet){la=a.optionsSet||0;d=A[la];c=true}if(d.onLoadImages)d.onLoadImages({images:w,viewData:a});else if(Q&&m==1||k&&!Q&&m>0)c=true;if(c){if(k){t.remove();K=R=X=L=ma=Q=k=undefined;u=0;b.yoxview.infoButtons={}}Sa()}l=a.cacheVars}}function Ta(a,c,e){a=c&&(c.width||c.height)?{width:parseInt(c.width),height:parseInt(c.height)}:e.defaultDimensions[a];if(isNaN(a.width))a.width=null;if(isNaN(a.height))a.height=null;return a}function Ua(a,c,e,f){var h=
60
+function(g){var i=b(g.currentTarget).data("yoxview");if(!i||i.imageIndex===null)return true;else{g.preventDefault();b.yoxview.open(b(g.liveFired||g.currentTarget).data("yoxview").viewIndex,i.imageIndex)}};if(a[0].tagName=="A")a.bind("click.yoxview",h);else e?a.yoxthumbs(b.extend({images:e,enableOnlyMedia:false,onClick:f||function(g){g.preventDefault();c.thumbnailsOptions&&c.thumbnailsOptions.onClick?c.thumbnailsOptions.onClick(b(g.currentTarget).data("yoxview").imageIndex,b(g.currentTarget),b(g.liveFired).data("yoxview").viewIndex):
61
+b.yoxview.open(b(g.liveFired||g.currentTarget).data("yoxview").viewIndex,b(g.currentTarget).data("yoxview").imageIndex);return false}},c.thumbnailsOptions)):a.delegate(za(c),"click.yoxview",h)}function Va(a){var c=M[Ba];B=c[0].tagName=="A"?c:w[u].thumbnailImg;if(!B||B.length==0)B=w[0].thumbnailImg;if(B){c=B.attr("src");a&&L&&c&&L.attr("src",c);if(mb&&!S&&window.name)S=b(top.document).find("[name='"+window.name+"']").offset();Ca=B.offset();Y={width:B.width(),height:B.height(),top:Math.round(Ca.top-
62
+Z.scrollTop()+(S?S.top:0)),left:Math.round(Ca.left+(S?S.left:0))}}}function na(a){oa.css("background-position",C.getBackgroundPosition("notifications",a));oa.stop().fadeIn(d.buttonsFadeTime,function(){b(this).delay(500).fadeOut(d.buttonsFadeTime)})}function nb(a){b(a).stop().animate({opacity:0.5},d.buttonsFadeTime)}function ob(a){if(b.yoxview&&b.yoxview.isOpen){var c=b.yoxview[Wa[pb[a.keyCode]]];if(c){a.preventDefault();c.apply(b.yoxview);return false}return true}return true}function Da(a,c,e){var f=
63
+b("<a>",{href:"#",click:function(){return b.yoxview.clickBtn(b.yoxview[c],e)}});b("<span>"+a+"</span>").css("opacity","0").appendTo(f);f.append(C.getSprite("icons",c));return f}function Xa(a,c,e){var f=new Image;f.src=d.imagesFolder+c+".png";f=b("<a>",{css:{background:"url("+f.src+") no-repeat "+c+" center",opacity:"0",outline:"0"},className:"yoxview_ctlBtn",href:"#"});f.css(c,"0");if(e)f.css("cursor","default");else{f.click(function(){this.blur();return b.yoxview.clickBtn(a,true)});d.buttonsFadeTime!=
64
+0&&f.hover(function(){b.yoxview.isOpen&&b(this).stop().animate({opacity:0.6},d.buttonsFadeTime)},function(){b(this).stop().animate({opacity:0},d.buttonsFadeTime)})}return f}function qb(){var a=typeof d.popupMargin=="number"?[String(d.popupMargin)]:d.popupMargin.split(" ",4);j.top=parseInt(a[0]);switch(a.length){case 1:j.bottom=j.right=j.left=j.top;break;case 2:j.bottom=j.top;j.right=j.left=parseInt(a[1]);break;case 3:j.bottom=parseInt(a[2]);j.right=j.left=parseInt(a[1]);break;default:b.extend(j,{right:parseInt(a[1]),
65
+bottom:parseInt(a[2]),left:parseInt(a[3])})}j.totalHeight=j.top+j.bottom;j.totalWidth=j.left+j.right;d.renderInfoExternally&&b.extend(Ya,j)}function Sa(){qb();D=Ea();C=new Yox.Sprites({notifications:{width:59,height:59,sprites:["empty","playRTL","play","pause","last","first"]},icons:{width:18,height:18,sprites:["close","help","playpause","link","pin","unpin","play","pause","right","left"]},menu:{height:42,sprites:["back"]}},d.imagesFolder+"sprites.png",d.imagesFolder+"empty.gif");Wa={RIGHT:d.isRTL?
66
+"prev":"next",DOWN:"next",UP:"prev",LEFT:d.isRTL?"next":"prev",ENTER:"play",HOME:"first",END:"last",SPACE:"next",h:"help",ESCAPE:"close"};n=W[d.lang];var a=d.skin?b.yoxview.yoxviewSkins[d.skin]:null;k=b("<div>",{id:"yoxview",click:function(g){g.stopPropagation()}});t=b("<div>",{id:"yoxview_popupWrap",click:function(g){g.preventDefault();b.yoxview.clickBtn(b.yoxview.close,true)}});d.skin&&t.attr("className","yoxview_"+d.skin);if(d.backgroundOpacity===0)t.css("background","none");else Yox.Support.rgba()&&
67
+t.css("background-color",Yox.hex2rgba(d.backgroundColor,d.backgroundOpacity));t.appendTo(b(top.document.getElementsByTagName("body")[0])).append(k);R=b("<div>",{className:"yoxview_imgPanel",css:{"z-index":"2"}});K=b("<div>",{className:"yoxview_imgPanel",css:{"z-index":"1",display:"none"}});L=b("<img />",{className:"yoxview_fadeImg",css:{display:"block",width:"100%",height:"100%"}});X=b("<img />",{className:"yoxview_fadeImg",css:{display:"block",width:"100%",height:"100%"}});R.data("yoxviewPanel",
68
+{image:L}).append(L).appendTo(k);K.data("yoxviewPanel",{image:X});K.append(X).appendTo(k);var c=m==1;if(c&&!w[0].media.title)d.renderInfo=false;if(d.renderMenu!==false){var e=b("<div>",{className:"yoxview_popupBarPanel yoxview_top"});d.autoHideMenu!==false&&e.hover(function(){b.yoxview.isOpen&&Za()},function(){b.yoxview.isOpen&&Fa()});x=b("<div>",{id:"yoxview_menuPanel"});if(Yox.Support.rgba()&&d.menuBackgroundColor)x.css("background",Yox.hex2rgba(d.menuBackgroundColor,d.menuBackgroundOpacity||0.8));
69
+var f=Da(n.Help,"help",false);b.yoxview.infoButtons.playBtn=Da(n.Slideshow,"play",false);$=b.yoxview.infoButtons.playBtn.children("span");x.append(Da(n.Close,"close",true),f,b.yoxview.infoButtons.playBtn);if(c){b.yoxview.infoButtons.playBtn.css("display","none");f.css("display","none");x.css({width:58})}x.find("a:last-child").attr("class","last");e.append(x).appendTo(k);x.delegate("a","mouseenter",function(){b(this).stop().animate({top:"8px"},"fast").find("span").stop().animate({opacity:1},"fast")}).delegate("a",
70
+"mouseleave",function(){b(this).stop().animate({top:"0"},"fast").find("span").stop().animate({opacity:0},"fast")})}if(d.renderButtons!==false&&(!c||!b.support.opacity)){Q=Xa(b.yoxview.prev,d.isRTL?"right":"left",c);ma=Xa(b.yoxview.next,d.isRTL?"left":"right",c);k.append(Q,ma);N=c&&!b.support.opacity?b():k.find(".yoxview_ctlBtn")}else N=b();aa=b("<div>",{id:"yoxview_ajaxLoader",className:"yoxview_notification",css:{display:"none"}});aa.append(b("<img>",{src:d.imagesFolder+"popup_ajax_loader.gif",alt:n.Loading,
71
+css:{width:32,height:32,"background-image":"url("+d.imagesFolder+"sprites.png)","background-position":C.getBackgroundPosition("notifications","empty")}})).appendTo(k);if(!d.disableNotifications){oa=b("<img>",{className:"yoxview_notification"});k.append(oa)}O=b("<div>",{id:"yoxview_helpPanel",href:"#",title:n.CloseHelp,css:{background:"url("+d.imagesFolder+"help_panel.png) no-repeat center top",direction:n.Direction,opacity:"0"},click:function(){return b.yoxview.clickBtn(b.yoxview.help,false)}});e=
72
+document.createElement("h1");e.innerHTML=n.Help.toUpperCase();f=document.createElement("p");f.innerHTML=n.HelpText;var h=document.createElement("span");h.id="yoxview_closeHelp";h.innerHTML=n.CloseHelp;O.append(e).append(f).append(h).appendTo(k);if(d.renderInfo!==false){o=b("<div>",{id:"yoxview_infoPanel",click:function(g){g.stopPropagation()}});if(d.infoBackOpacity===0){o.css("background","none");G=o}else if(Yox.Support.rgba()){G=o;o.css("background-color",Yox.hex2rgba(d.infoBackColor,d.infoBackOpacity))}else{o.append(b("<div>",
73
+{id:"yoxview_infoPanelBack",css:{background:d.infoBackColor,opacity:d.infoBackOpacity}}));G=b("<div>",{id:"yoxview_infoPanelContent"})}pa=b("<span>",{id:"yoxview_count"});T=b("<div>",{id:"yoxview_infoText"});if(c){T.css("margin-left","10px");pa.css("display","none")}G.append(pa);if(d.renderInfoPin!==false){Ga=C.getSprite("icons",d.autoHideInfo?"pin":"unpin");$a=b("<a>",{className:"yoxviewInfoLink",href:"#",title:d.autoHideInfo?n.PinInfo:n.UnpinInfo,css:{display:"inline"},click:function(g){g.preventDefault();
74
+d.autoHideInfo=!d.autoHideInfo;Ga.css("background-position",C.getBackgroundPosition("icons",d.autoHideInfo?"pin":"unpin"));this.title=d.autoHideInfo?n.PinInfo:n.UnpinInfo}});$a.append(Ga).appendTo(G)}if(a&&a.infoButtons){a=a.infoButtons(d,n,C,t,k);if(d.infoButtons)b.extend(d.infoButtons,a);else d.infoButtons=a}if(d.infoButtons){b.extend(b.yoxview.infoButtons,d.infoButtons);for(infoButton in d.infoButtons)d.infoButtons[infoButton].attr("className","yoxviewInfoLink").css("display","block").appendTo(G)}if(d.linkToOriginalContext!==
75
+false){ba=b("<a>",{className:"yoxviewInfoLink",target:"_blank",title:n.OriginalContext});ba.append(C.getSprite("icons","link")).appendTo(G)}G.append(T);Yox.Support.rgba()||o.append(G);o.appendTo(d.renderInfoExternally?t:k);if(!d.renderInfoExternally){I=b("<div>",{className:"yoxview_popupBarPanel yoxview_bottom"});I.hover(function(){b.yoxview.isOpen&&!ca&&d.autoHideInfo!==false&&qa()},function(){b.yoxview.isOpen&&!ca&&d.autoHideInfo!==false&&da()});o.wrap(I);I=o.parent()}}Yox.Support.rgba()||b("<div>",
76
+{css:{position:"fixed",height:"100%",width:"100%",top:"0",left:"0",background:d.backgroundColor,"z-index":"1",opacity:d.backgroundOpacity}}).appendTo(t)}function Ha(){l.cachedImagesCount++;if(l.cachedImagesCount==m)l.cacheComplete=true;else ab()}function ab(){if(!d.cacheBuffer||l.currentCacheImg!=l.cacheBufferLastIndex)ea(l.currentCacheImg+(l.cacheDirectionForward?1:-1))}function Ia(){if(d.cacheBuffer){l.cacheBufferLastIndex=l.cacheDirectionForward?u+d.cacheBuffer:u-d.cacheBuffer;if(l.cacheBufferLastIndex<
77
+0)l.cacheBufferLastIndex+=m;else if(l.cacheBufferLastIndex>=m)l.cacheBufferLastIndex-=m}}function ea(a){if(!l.cacheComplete){if(a==m)a=0;else if(a<0)a+=m;var c=w[a].media;l.currentCacheImg=a;if(c&&!c.loaded)if(!c.contentType||c.contentType==="image")bb.src=c.src;else cb(c,function(){Ha()});else ab()}}function rb(){Ja=true;clearTimeout(Ka);aa.stop();Ka=setTimeout(function(){aa.css("opacity","0.6").fadeIn(d.buttonsFadeTime)},d.buttonsFadeTime)}function db(){r||rb();sb(b.yoxview.currentImage.media)}
78
+function La(a,c){k.stop().animate(a,d.popupResizeTime,c)}function ra(){if(m!=1){r=true;if($)$.text(n.Pause);else b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.attr("title",n.Pause);b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.find("img").css("background-position",C.getBackgroundPosition("icons","pause"));if(u<m-1)Ma=setTimeout(function(){b.yoxview.next(true)},d.playDelay);else{if(d.loopPlay)Ma=setTimeout(function(){b.yoxview.select(0,null)},d.playDelay);else E();d.onEnd&&
79
+setTimeout(d.onEnd,d.playDelay)}}}function E(){clearTimeout(Ma);r=false;if($)$.text(n.Play);else b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.attr("title",n.Play);b.yoxview.infoButtons.playBtn&&b.yoxview.infoButtons.playBtn.find("img").css("background-position",C.getBackgroundPosition("icons","play"))}function Ea(){var a=Z.width(),c=Z.height();return{height:c,width:a,usableArea:{height:c-j.totalHeight,width:a-j.totalWidth}}}function eb(a){a=a.width&&a.height?Yox.fitImageSize(a,D.usableArea):
80
+{width:a.width?Math.min(a.width,D.usableArea.width):D.usableArea.width,height:a.height?Math.min(a.height,D.usableArea.height):D.usableArea.height};a.top=j.top+Math.round((D.usableArea.height-a.height)/2);a.left=j.left+Math.round((D.usableArea.width-a.width)/2);return a}function qa(a){clearTimeout(fa);var c=T.outerHeight();if(c<fb)c=fb;o.height()!==c&&o.stop().animate({height:c},500,function(){if(d.renderInfoExternally){var e=o.position();b.extend(j,Ya);if(e.top===0)j.top+=c;else j.bottom+=c;j.totalHeight=
81
+j.top+j.bottom;D=Ea();b.yoxview.resize(false)}a&&a()})}function da(a){clearTimeout(fa);o.stop().animate({height:0},500,function(){a&&a()})}function Fa(a){if(x){clearTimeout(Na);x.stop().animate({top:tb},500,function(){a&&a()})}}function Za(a){if(x){clearTimeout(Na);x.stop().animate({top:0},500,function(){a&&a()})}}function gb(){ga=s;s=sa?K:R;sa=!sa}function ta(a){var c=a.contentType==="image"||!a.contentType;c&&ca&&I&&I.css("display","block");clearTimeout(fa);gb();var e=s.data("yoxviewPanel");y.width=
82
+a.width;y.height=a.height;y.padding=a.padding;if(o){var f=a.title||"";if(d.showDescription&&a.description)f+=f!=""?"<div id='yoxview_infoTextDescription'>"+a.description+"</div>":a.description;T.html(f);m>1&&pa.html(u+1+"/"+m);if(ba)b.yoxview.currentImage.link?ba.attr("href",b.yoxview.currentImage.link).css("display","inline"):ba.css("display","none")}f=eb(a);if(c){currentImageElement=sa?L:X;currentImageElement.attr({src:a.src,title:a.title,alt:a.alt});e.image=currentImageElement;if(!e.isImage&&e.element){e.element.css("display",
83
+"none");e.image.css("display","block");e.isImage=true}if(!ha){d.renderButtons&&N.css({height:"100%",width:"50%",top:"0"});ca=false;ha=true}}else{if(e.element&&e.elementId!=a.elementId){e.element.remove();e.element=undefined}if(!e.element)if(a.html){e.element=b("<div>",{className:ub});k.append(e.element)}else{k.append(a.element);e.element=a.element}a.html&&e.element.html(a.html);s=e.element;if(ha){if(I){d.autoHideInfo!==false&&da();I.css("display","none");ca=true}d.renderButtons&&N.css({width:ua.width,
84
+height:ua.height});ha=false}d.renderButtons&&N.css({top:(f.height-ua.height)/2});if(e.isImage===undefined||e.isImage){e.element.css("display","block");e.image.css("display","none");e.isImage=false}}var h={width:f.width,height:f.height};s.css(ia?{width:"100%",height:"100%"}:h);if(Ja){Ja=false;clearTimeout(Ka);aa.stop().fadeOut(d.buttonsFadeTime)}U=true;La(f,function(){if(ia){b.yoxview.isOpen=true;s.css(h);if(d.controlsInitialDisplayTime>0){d.showButtonsOnOpen&&N.animate({opacity:0.5},d.controlsInitialFadeTime,
85
+function(){d.buttonsFadeTime!=0&&b(this).delay(d.controlsInitialDisplayTime).animate({opacity:0},d.controlsInitialFadeTime)});if(d.showBarsOnOpen){Za(function(){if(d.autoHideMenu!==false)Na=setTimeout(function(){Fa()},d.controlsInitialDisplayTime)});o&&qa(function(){if(d.autoHideInfo!==false)fa=setTimeout(function(){da()},d.controlsInitialDisplayTime)})}}d.autoPlay&&b.yoxview.play();d.onOpen&&d.onOpen();if(va){va();va=undefined}ia=false}if(y.padding){var g=k.width(),i=k.height();if(y.padding){g-=
86
+y.padding.horizontal;i-=y.padding.vertical}s.css({width:g+"px",height:i+"px"})}U=false});s.css({"z-index":"2",opacity:1});ga&&ga.css("z-index","1");ia?s.css({display:"block",width:"100%",height:"100%"}):s.fadeIn(d.popupResizeTime,function(){ga&&ga.css("display","none");o&&qa(function(){if(d.autoHideInfo!==false)fa=setTimeout(function(){da()},d.titleDisplayDuration)});if(m>1){if(d.cacheImagesInBackground&&!l.cacheComplete)ea(u+(l.cacheDirectionForward?1:-1));r&&ra()}})}function vb(a,c,e,f,h){jQuery.jsonp({url:wb[a]||
87
+"http://oohembed.com/oohembed/",data:jQuery.extend({url:c,format:"json"},e),dataType:"jsonp",callbackParameter:"callback",success:function(g){var i={title:g.title,width:g.width,height:g.height,type:g.type};if(g.type==="video")i.html=g.html.replace(/<embed /,'<embed wmode="transparent" ').replace(/<param/,'<param name="wmode" value="transparent"><param').replace(/width=\"[\d]+\"/ig,'width="100%"').replace(/height=\"[\d]+\"/ig,'height="100%"');else g.type==="photo"&&jQuery.extend(i,{src:g.url,alt:g.title,
88
+type:"image"});f(i)},error:function(g,i){h&&h(g,i)}})}function sb(a){try{if(!a)throw"Error: Media is unavailable.";if(a.contentType==="image"||!a.contentType){if(b.support.opacity)Oa.src="";Oa.src=a.src}else!a.loaded&&a.contentType=="ooembed"?cb(a,function(e){ta(e)},function(e){wa("Error getting data from:<br /><span class='errorUrl'>"+e.data.url+"</span>")}):ta(b.yoxview.currentImage.media)}catch(c){wa(c)}}function cb(a,c,e){a.contentType=="ooembed"&&vb(a.provider,a.url,d.defaultDimensions.video,
89
+function(f){b.extend(a,f,{loaded:true});c&&c(a)},e)}function wa(a){ta({html:"<span class='yoxview_error'>"+a+"</span>",width:500,height:300,type:"error",title:""})}var P=P||Yox.getPath(/(.*\/)jquery\.yoxview/i),hb={autoHideInfo:true,autoPlay:false,backgroundColor:"#000000",backgroundOpacity:0.8,buttonsFadeTime:300,cacheBuffer:5,cacheImagesInBackground:true,controlsInitialFadeTime:1500,controlsInitialDisplayTime:1E3,dataFolder:P+"data/",defaultDimensions:{flash:{width:720,height:560},iframe:{width:1024}},
90
+flashVideoPlayer:"jwplayer",imagesFolder:P+"images/",infoBackColor:"#000000",infoBackOpacity:0.5,isRTL:false,lang:"en",langFolder:P+"lang/",loopPlay:true,playDelay:3E3,popupMargin:20,popupResizeTime:600,renderButtons:true,renderMenu:true,showBarsOnOpen:true,showButtonsOnOpen:true,showDescription:true,textLinksSelector:".yoxviewLink",thumbnailsOptions:{thumbnailsClass:"yoxview_thumbnail"},titleAttribute:"title",titleDisplayDuration:2E3};this.infoButtons={};this.isOpen=false;this.yoxviewSkins={};var aa,
91
+l={},bb=new Image,pa,N,xb=0,u=0,n={},y={},la,Ba=0,mb=window!=window.parent,ca=false,yb={wmode:"transparent",width:"100%",height:"100%",allowfullscreen:"true",allowscriptaccess:"true",hasVersion:9},ia=true,S,O,fa,Na,L,X,w,m=0,o,G,ba,fb=30,I,$a,Ga,T,sa=false,ha=true,r=false,U=false,M=[],Ka,Ja=false,ua={width:100,height:100},ub="yoxview_mediaPanel",wb={vimeo:"http://vimeo.com/api/oembed.json",myspace:"http://vids.myspace.com/index.cfm?fuseaction=oembed"},tb=-42,x,ma,oa,va,d,A=[],R,K,$,k,j={},Ya={},Ma,
92
+Z=b(Yox.getTopWindow()),t,Q,ja=false,C,Oa=new Image,B,Ca,Y,D,W={},pb={40:"DOWN",35:"END",13:"ENTER",36:"HOME",37:"LEFT",39:"RIGHT",32:"SPACE",38:"UP",72:"h",27:"ESCAPE"},Wa;this.init=function(a,c){function e(){a.each(function(g,i){i=b(i);var xa=M.length;i.data("yoxview",{viewIndex:xa,cacheVars:{cachedImagesCount:0,cacheDirectionForward:true,cacheBufferLastIndex:null,currentCacheImg:0}});var ka=i.data("yoxview");if(h)ka.optionsSet=h;f.allowedImageUrls=[Yox.Regex.image];if(f.allowedUrls)f.allowedImageUrls=
93
+f.allowedImageUrls.concat(f.allowedUrls);var Pa=i[0].tagName=="A",J=[],ya=0;(Pa?i:i.find(za(f))).each(function(v,Qa){var q=b(Qa),p;p=f;var z={},F=q.attr("href"),V=q.children("img:first");if(V.length==0)V=q;z={};for(supportedType in ib){var Ra=ib[supportedType](q,F,V,p);if(Ra){b.extend(Ra,{contentType:supportedType,elementId:xb++});z.media=Ra;break}}if(z.media){z.thumbnailImg=V;p=z}else p=null;if(p){J.push(p);if(Pa)q.data("yoxview").imageIndex=ya;else q.data("yoxview",{imageIndex:ya,viewIndex:xa});
94
+ya++}});if(f.images)J=J.concat(f.images);if(f.dataSource)Yox.dataSources[f.dataSource].getImagesData(f,function(v){J=J.concat(v.images);ka.images=J;if(v.title&&f.thumbnailsOptions&&f.thumbnailsOptions.setHeader)b(f.thumbnailsOptions.headerElement||"<h2>",{html:v.title,className:f.thumbnailsOptions.headerClass}).appendTo(i);var Qa=v.isGroup?[b.extend(v,{media:{title:v.title+" ("+v.images.length+" images)",alt:v.title}})]:v.images;Ua(i,f,Pa?null:Qa,!v.createGroups?null:function(q){var p=b(q.currentTarget).data("yoxview"),
95
+z=b(q.currentTarget);q=z.data("yoxthumbs");if(p.imagesAreSet)b.yoxview.open(p.viewIndex);else{z.css("cursor","wait");var F=b.extend({},f);if(F.dataSourceOptions)b.extend(F.dataSourceOptions,q);else F.dataSourceOptions=q;Yox.dataSources[f.dataSource].getImagesData(F,function(V){p.images=V.images;p.imagesAreSet=true;z.css("cursor","");b.yoxview.open(p.viewIndex)})}});v.createGroups?b.each(i.yoxthumbs("thumbnails"),function(q,p){p.data("yoxview",{viewIndex:++xa});M.push(b(p))}):b.each(i.yoxthumbs("thumbnails"),
96
+function(q,p){var z=ya+q,F=p.children("img");if(F.length==0)F=p;J[z].thumbnailImg=F;p.data("yoxview",{imageIndex:q,viewIndex:xa})});if(!b.yoxview.firstViewWithImages&&v.images.length>0){b.yoxview.firstViewWithImages=i;f.cacheImagesInBackground&&b.yoxview.startCache()}});else{ka.images=J;Ua(i,f)}M.push(i);if(!b.yoxview.firstViewWithImages&&ka.images&&ka.images!=0){b.yoxview.firstViewWithImages=i;Aa(i);if(f.cacheImagesInBackground&&m!=0){Ia();ea(0)}}})}var f=b.extend(true,{},hb,c),h;if(A.length==0){A.push(f);
97
+h=0}else h=c?H(f):null;lb(f.lang,function(){kb(f,function(g){g&&g.options&&b.extend(f,g.options);Yox.loadDataSource(f,e)})})};var ib={image:function(a,c,e,f){for(var h=null,g=0;g<f.allowedImageUrls.length&&!h;g++)if(c.match(f.allowedImageUrls[g]))h={src:a.attr("href"),title:e.attr(f.titleAttribute),alt:e.attr("alt")};return h},flash:function(a,c,e,f){var h=null;var g=(a=c.match(Yox.Regex.flash))?null:c.match(Yox.Regex.flashvideo);if(a||g){h=Yox.getUrlData(c);c=Ta("flash",h.queryFields,f);if(h.queryFields){delete h.queryFields.width;
98
+delete h.queryFields.height}var i=b("<div>",{className:"yoxview_element",html:"<div class='yoxview_error'>Please install the latest version of the <a href='http://www.adobe.com/go/getflashplayer' target='_blank'>Flash player</a> to view content</div>"});g=g?Yox.flashVideoPlayers[f.flashVideoPlayer](f.flashVideoPlayerPath,h.path,h.queryFields&&h.queryFields.image?h.queryFields.image:e[0].nodeName=="IMG"?e.attr("src"):null,e.attr(f.titleAttribute)):h.queryFields||{};if(a)g.swf=h.path;b.extend(g,yb);
99
+i.flash(g);h={element:i,title:e.attr(f.titleAttribute)};b.extend(h,c)}return h},ooembed:function(a,c){var e=null;for(videoProvider in Yox.Regex.video)if(c.match(Yox.Regex.video[videoProvider])){e={provider:videoProvider,url:c};break}return e},inline:function(a,c,e,f){if(!f.allowInternalLinks)return null;a=null;if((c=Yox.getUrlData(c))&&c.anchor){c=b("#"+c.anchor);if(c.length!=0){e={width:parseInt(c.css("width")),height:parseInt(c.css("height"))};c.css({position:"absolute",top:0,left:0,width:"100%",
100
+height:"100%",display:"block"});a={type:"inlineElement",element:c,title:c.attr("title")};f={horizontal:parseInt(c.css("padding-right"))+parseInt(c.css("padding-left")),vertical:parseInt(c.css("padding-top"))+parseInt(c.css("padding-bottom"))};e.width=isNaN(e.width)?null:e.width+f.horizontal;e.height=isNaN(e.height)?null:e.height+f.vertical;b.extend(a,e);if(f.horizontal!=0||f.vertical!=0)a.padding=f;c.remove()}}return a},iframe:function(a,c,e,f){var h=null;if((a=a.attr("target"))&&a=="yoxview")if((c=
101
+Yox.getUrlData(c))&&c.path){f=Ta("iframe",c.queryFields,f);if(c.queryFields){delete c.queryFields.width;delete c.queryFields.height}h={element:b("<iframe>",{src:Yox.urlDataToPath(c),className:"yoxview_element"}),title:e.attr("title"),frameborder:"0"};b.extend(h,f)}return h}};this.open=function(a,c,e){var f=this instanceof jQuery;if(f){if(a&&typeof a=="function")e=a;c=this.data("yoxview");a=c.viewIndex;c=c.imageIndex}else if(typeof a=="function"){e=a;a=c=0}else if(typeof c=="function"){e=c;c=0}a=a||
102
+0;c=c||0;b(document).bind("keydown.yoxview",ob);Aa(M[a]);!k&&m!=0&&Sa();b.yoxview.selectImage(c);t.stop().css({opacity:0,display:"block"}).animate({opacity:1},"slow",function(){t.css("opacity","")});d.cacheImagesInBackground&&ea(c);if(e)va=e;return f?this:false};this.selectImage=function(a){b.yoxview.currentImage=w[a];u=a;Va(true);B.blur();R.css({"z-index":"1",width:"100%",height:"100%"});K.css({display:"none","z-index":"2"});ia=true;k.css(Y);this.select(a)};this.refresh=function(){(ja=r)&&E();db(u);
103
+ja&&ra()};this.options=function(a,c){if(!a)return this;if(c&&typeof a==="string"){var e=a;a={};a[e]=c}if(this instanceof jQuery){if(e=this.data("yoxview")){b.extend(A[e.optionsSet||0],a);this.yoxview("update")}return this}else{b.each(A,function(f,h){b.extend(h,a)});b.yoxview.update()}};this.select=function(a,c){if(typeof c==="number")c=undefined;if(!U){if(a<0){a=m-1;if(d.onEnd){d.onEnd();return}}else if(a==m){a=0;if(d.onEnd){d.onEnd();return}}if(!r&&c){var e=c;e.css("opacity")==0&&e.stop().animate({opacity:0},
104
+d.buttonsFadeTime,nb(e))}b.yoxview.currentImage=w[a];u=a;db(u);Ia();d.onSelect&&d.onSelect(a,w[a])}};this.prev=function(a){l.cacheDirectionForward=false;this.select(u-1,Q);r&&a!==true&&E()};this.next=function(a){l.cacheDirectionForward=true;this.select(u+1,ma);r&&a!==true&&E()};this.first=function(){d.disableNotifications||na("first");this.select(0);r&&E()};this.last=function(){d.disableNotifications||na("last");this.select(m-1);r&&E()};this.setDefaults=function(a){b.extend(true,hb,a)};this.play=
105
+function(){if(!(!this.isOpen||m==1)){l.cacheDirectionForward=true;if(r){d.disableNotifications||na("pause");E()}else{d.disableNotifications||na("play");ra()}}};this.close=function(){if(this.isOpen){this.closeHelp();Va(false);La(Y,function(){b.yoxview.isOpen=false});Fa();o&&da(function(){T.html("")});s.animate({width:Y.width,height:Y.height},d.popupResizeTime,function(){s.css("opacity",1)});t.stop().fadeOut(1E3);r&&E();gb();d.onClose&&d.onClose();b(document).unbind("keydown.yoxview");U=false}};this.help=
106
+function(){if(this.isOpen)O.css("display")=="none"?O.css("display","block").stop().animate({opacity:0.8},d.buttonsFadeTime):this.closeHelp()};this.closeHelp=function(){O.css("display")!="none"&&O.stop().animate({opacity:0},d.buttonsFadeTime,function(){O.css("display","none")})};this.clickBtn=function(a,c){c&&r&&E();a.call(this);return false};Z.bind("resize.yoxview",function(){D=Ea();b.yoxview.isOpen&&b.yoxview.resize()});b(bb).load(function(){b.extend(w[l.currentCacheImg].media,{width:this.width,
107
+height:this.height,loaded:true});Ha()}).error(function(){Ha()});this.startCache=function(){Aa(this.firstViewWithImages);Ia();ea(0)};var s=K,ga=R;this.resize=function(a){if(r){ja=true;E()}var c=eb(y);s.css({width:"100%",height:"100%"});U=true;ha||N.css({top:Math.round((c.height-ua.height)/2)});La(c,function(){var e={width:k.width(),height:k.height()};if(y.padding){e.width-=y.padding.horizontal;e.height-=y.padding.vertical}s.css(e);U=false;o&&a!==false&&qa();if(ja){ra();ja=false}})};b(Oa).load(function(){this.width==
108
+0?wa("Image error"):ta(b.extend({},b.yoxview.currentImage.media,{width:this.width,height:this.height}))}).error(function(){wa("Image not found:<br /><span class='errorUrl'>"+this.src+"</span>")});this.update=function(){var a;if(this instanceof jQuery){a=A[this.data("yoxview").optionsSet||0];this.yoxview("unload",function(c){c.yoxview(a)});return this}else{a=A[0];this.unload();b.each(M,function(c,e){e.yoxview(a)})}};this.unload=function(a){function c(){function f(g){g.undelegate(h,"click.yoxview").removeData("yoxview").yoxthumbs("unload",
109
+"yoxview").find(h).removeData("yoxview")}var h=za(d);if(e instanceof jQuery)e.data("yoxview")&&f(e);else{jQuery.each(M,function(g,i){f(i)});Z.unbind(".yoxview");if(k){t.remove();k=undefined}}if(a)a(e);else return e}var e=this;if(!d)return this;d.onBeforeUnload?d.onBeforeUnload(c):c()}}if(!b.yoxview)b.yoxview=new jb;b.fn.yoxview=function(H){if(this.length!=0)if(b.yoxview[H])return b.yoxview[H].apply(this,Array.prototype.slice.call(arguments,1));else typeof H==="object"||!H?b.yoxview.init(this,H):b.error("Method "+
110
+H+" does not exist on YoxView.");return this};b(Yox.getTopWindow()).unload(function(){if(b.yoxview){b.yoxview.unload();delete b.yoxview}})})(jQuery);

+ 21
- 0
static/yoxview/lang/ar.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "rtl",
3
+    "Close" : "إغلاق",
4
+    "Help" : "مساعدة",
5
+    "FirstImage" : "الى الصورة الاولى",
6
+    "LastImage" : "الى الصورة الأخيرة",
7
+    "StartStopSlideShow" : "تشغيل/إيقاف العرض",
8
+    "Pause" : "إيقاف",
9
+    "Play" : "تشغيل",
10
+    "Prev" : "السابق",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "التالي",
14
+    "PrevImage" : "الصورة السابقة",
15
+    "NextImage" : "الصورة التالية",
16
+    "Loading" : "تحميل",
17
+    "CloseHelp" : "إغلاق المساعدة",  
18
+    "HelpText" : "يمكن التنقل خلال العرض عن طريقة لوحة المفاتيح:<br/><br/>أزرار اليمين و اليسار: سابق/تالي<br/>زر المسافة: التالي<br/>ENTER: تشغيل/إيقاف العرض<br/>ESCAPE: إغلاق العرض<br/>HOME/END: البداية/النهاية صورة<br/>H - لوحة المساعدة الحالية",
19
+    "Slideshow" : "تشغيل",
20
+    "OriginalContext": "عرض ضمن السياق الأصلي"
21
+}

+ 21
- 0
static/yoxview/lang/bg.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Затвори",
4
+    "Help" : "Помощ",
5
+    "FirstImage" : "Към първата картинка",
6
+    "LastImage" : "Към последната картинка",
7
+    "StartStopSlideShow" : "Пусни/Спри поредица от картинки",
8
+    "Pause" : "Спри",
9
+    "Play" : "Пусни",
10
+    "Prev" : "Предишна",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Следваща",
14
+    "PrevImage" : "Предишна картинка",
15
+    "NextImage" : "Следваща картинка",
16
+    "Loading" : "Зареждам",
17
+    "CloseHelp" : "Затвори панела за помощ",  
18
+    "HelpText" : "в галерията може да изпозлвате:<br/><br/>LEFT/RIGHT СТРЕЛКА: Предишна/Следваща<br/>SPACE: Следваща<br/>ENTER: Пусни/Спри поредица от картинки<br/>ESCAPE: Затвори галерията<br/>HOME/END: Първа/Последна картинка<br/>H - Този помощен панел",
19
+    "Slideshow" : "Пусни",
20
+    "OriginalContext": "Вижте в оригинален контекст"
21
+}

+ 21
- 0
static/yoxview/lang/ca.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Tancar",
4
+    "Help" : "Ajuda",
5
+    "FirstImage" : "Anar al principi",
6
+    "LastImage" : "Anar al final",
7
+    "StartStopSlideShow" : "Començar/Pausar",
8
+    "Pause" : "Pausar",
9
+    "Play" : "Començar",
10
+    "Prev" : "Anterior",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Següent",
14
+    "PrevImage" : "Imatge anterior",
15
+    "NextImage" : "Següent imatge",
16
+    "Loading" : "Carregant",
17
+    "CloseHelp" : "Tancar l'ajuda",  
18
+    "HelpText" : "Pot navegar per la presentaci&oacute; utilitzant el teclat:<br/><br/>Fletxes ESQUERRA/DRETA: Anterior/Seg&uuml;ent<br/>SPACEBAR: Seg&uuml;ent<br/>ENTER: Comen&ccedil;ar/Parar la presentaci&oacute;<br/>ESCAPE: Tancar<br/>HOME/END: Principi/Final<br/>H - Mostra aquesta ajuda",
19
+    "Slideshow" : "Començar",
20
+    "OriginalContext": "Veure al context original"
21
+}

+ 21
- 0
static/yoxview/lang/cs.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Zavřít",
4
+    "Help" : "Nápověda",
5
+    "FirstImage" : "Na první obrázek",
6
+    "LastImage" : "Na poslední obrázek",
7
+    "StartStopSlideShow" : "Spustit/Zastavit přehrávání",
8
+    "Pause" : "Zastavit",
9
+    "Play" : "Spustit",
10
+    "Prev" : "Předchozí",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Následující",
14
+    "PrevImage" : "Předchozí obrázek",
15
+    "NextImage" : "Následující obrázek",
16
+    "Loading" : "Nahrávám",
17
+    "CloseHelp" : "Zavřít nápovědu",  
18
+    "HelpText" : "Galerii můžete procházet pomocí kláves:<br/><br/>ŠIPKY VLEVO/VPRAVO: Předchozí/Následující obrázek<br/>MEZERNÍK: Další<br/>ENTER: Spustit/zastavit přehrávání<br/>ESC: Zavřít galerii<br/>HOME/END: První/poslední obrázek<br/>H - Vyvolání nápovědy",
19
+    "Slideshow" : "Přehrávání",
20
+    "OriginalContext": "Ukázat v původním umístění"
21
+}

+ 21
- 0
static/yoxview/lang/de.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Schliessen",
4
+    "Help" : "Hilfe",
5
+    "FirstImage" : "Zum ersten Bild",
6
+    "LastImage" : "Zum letzten Bild",
7
+    "StartStopSlideShow" : "Start/Pause Slideshow",
8
+    "Pause" : "Pause",
9
+    "Play" : "Abspielen",
10
+    "Prev" : "Zurück",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Vor",
14
+    "PrevImage" : "Vorheriges Bild",
15
+    "NextImage" : "Nächstes Bild",
16
+    "Loading" : "Laden",
17
+    "CloseHelp" : "Schliesse Hilfe",  
18
+    "HelpText" : "Die Gallerie kann mit dem Keyboard verwendet werden:<br/><br/>LINKS/RECHTS PFEILE: Zurück/Vor<br/>SPACE: Nächstes<br/>ENTER: Start/Stop Slideshow<br/>ESCAPE: Schliesse Gallerie<br/>HOME/END: Erstes/Letztes Bild<br/>H - Diese Hilfe",
19
+    "Slideshow" : "Abspielen",
20
+    "OriginalContext": "Anzeige im originalen Zusammenhang"
21
+}

+ 21
- 0
static/yoxview/lang/dk.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Luk",
4
+    "Help" : "Hjælp",
5
+    "FirstImage" : "Gå til første billede",
6
+    "LastImage" : "Gå til sidste billede",
7
+    "StartStopSlideShow" : "Afspil/Pause slideshow",
8
+    "Pause" : "Pause",
9
+    "Play" : "Afspil",
10
+    "Prev" : "Forrige",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Næste",
14
+    "PrevImage" : "Forrige billede",
15
+    "NextImage" : "Næste billede",
16
+    "Loading" : "Indlæser",
17
+    "CloseHelp" : "Luk hjælp",  
18
+    "HelpText" : "Du kan naviger i galleriet via keyboard:<br/><br/>VENSTRE/HØJRE piletaster: Forrige/Næste<br/>MELLEMRUM: Næste<br/>ENTER: Start/Stop slideshow<br/>ESCAPE: Luk galleriet<br/>HOME/END: Første/Sidste billede<br/>H - Dette hjælpe panel",
19
+    "Slideshow" : "Play",
20
+    "OriginalContext": "Vis i original kontekst"
21
+}

+ 21
- 0
static/yoxview/lang/en.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Close",
4
+    "Help" : "Help",
5
+    "FirstImage" : "To the first image",
6
+    "LastImage" : "To the last image",
7
+    "StartStopSlideShow" : "Play/Pause slideshow",
8
+    "Pause" : "Pause",
9
+    "Play" : "Play",
10
+    "Prev" : "Prev",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Next",
14
+    "PrevImage" : "Previous image",
15
+    "NextImage" : "Next image",
16
+    "Loading" : "Loading",
17
+    "CloseHelp" : "Close help",  
18
+    "HelpText" : "The gallery can be navigated using the keyboard:<br/><br/>LEFT/RIGHT ARROWS: Prev/Next<br/>SPACEBAR: Next<br/>ENTER: Start/Stop slideshow<br/>ESCAPE: Close gallery<br/>HOME/END: First/Last image<br/>H - This help panel",
19
+    "Slideshow" : "Play",
20
+    "OriginalContext": "View in original context"
21
+}

+ 21
- 0
static/yoxview/lang/es.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Cerrar",
4
+    "Help" : "Ayuda",
5
+    "FirstImage" : "A la primer imagen",
6
+    "LastImage" : "A la ultima imagen",
7
+    "StartStopSlideShow" : "Play/Pause slideshow",
8
+    "Pause" : "Pausar",
9
+    "Play" : "Play",
10
+    "Prev" : "Anterior",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Siguiente",
14
+    "PrevImage" : "Imagen anterior",
15
+    "NextImage" : "Siguiente imagen",
16
+    "Loading" : "Cargando",
17
+    "CloseHelp" : "Cerrar ayuda",  
18
+    "HelpText" : "La galería se puede navegar usando el teclado:<br/><br/>Flechas IZQUIERDA/DERECHA: Anterior/Siguiente<br/>SPACEBAR: Siguiente<br/>ENTER: Iniciar/Parar slideshow<br/>ESCAPE: Cerrar galería<br/>HOME/END: Primer/Ultimo imagen<br/>H - Este panel de ayuda",
19
+    "Slideshow" : "Play",
20
+    "OriginalContext": "Ver en el contexto original"
21
+}

+ 21
- 0
static/yoxview/lang/fr.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Fermer",
4
+    "Help" : "Aide",
5
+    "FirstImage" : "Première image",
6
+    "LastImage" : "Dernière image",
7
+    "StartStopSlideShow" : "Démarrer/Pause diaporama",
8
+    "Pause" : "Pause",
9
+    "Play" : "Démarrer",
10
+    "Prev" : "Précédente",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Suivante",
14
+    "PrevImage" : "Image précédente",
15
+    "NextImage" : "Image suivante",
16
+    "Loading" : "Chargement",
17
+    "CloseHelp" : "Fermer l'aide",  
18
+    "HelpText" : "La navigation peut se faire avec le clavier :<br/><br/>Flêches GAUCHES/DROITES: Précédente/Suivante<br/>Espace: Suivante<br/>Entrée: Démarrer/Arrêter<br/>Echap: Fermer<br/>HOME/FIN: Première/Dernière image<br/>H - Afficher ce panneau d'aide",
19
+    "Slideshow" : "Démarrer",
20
+    "OriginalContext": "Voir dans le contexte original"
21
+}

+ 21
- 0
static/yoxview/lang/gr.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Κλείσιμο",
4
+    "Help" : "Βοήθεια",
5
+    "FirstImage" : "Πρώτη Εικόνα",
6
+    "LastImage" : "Τελευταία Εικόνα",
7
+    "StartStopSlideShow" : "Έναρξη/Παύση του slideshow",
8
+    "Pause" : "Παύση",
9
+    "Play" : "Έναρξη",
10
+    "Prev" : "Προηγούμενο",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Επόμενο",
14
+    "PrevImage" : "Προηγούμενη Εικόνα",
15
+    "NextImage" : "Επόμενη Εικόνα",
16
+    "Loading" : "Φόρτωση",
17
+    "CloseHelp" : "Κλείσιμο Βοήθειας",  
18
+    "HelpText" : "Η περιήγηση στην γκαλερή μπορεί να γίνει με τη χρήση πληκτρολογίου:<br/><br/>ΑΡΙΣΤΕΡΑ/ΔΕΞΙΑ ΒΕΛΗ: Προηγούμενο/Επόμενο<br/>SPACEBAR: Επόμενο<br/>ENTER: Έναρξη/Τερματισμός παρουσίασης<br/>ESCAPE: Κλείσιμο γκαλερή<br/>HOME/END: Πρώτη/Τελευταία Εικόνα<br/>H - Βοήθεια",
19
+    "Slideshow" : "Έναρξη",
20
+    "OriginalContext": "Προβολή αρχικής μορφής"
21
+}

+ 21
- 0
static/yoxview/lang/he.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction": "rtl",
3
+    "Close" : "סגירה",
4
+    "Help" : "עזרה",
5
+    "FirstImage" : "לתמונה הראשונה",
6
+    "LastImage" : "לתמונה האחרונה",
7
+    "StartStopSlideShow" : "התחל/עצור מצגת",
8
+    "Pause" : "עצור מצגת",
9
+    "Play" : "התחל מצגת",
10
+    "Prev" : "הקודמת",
11
+    "PinInfo" : "נעץ שורת מידע",
12
+    "UnpinInfo" : "שחרר שורת מידע",
13
+    "Next" : "הבאה",
14
+    "PrevImage" : "לתמונה הקודמת",
15
+    "NextImage" : "לתמונה הבאה",
16
+    "Loading" : "טוען",
17
+    "CloseHelp" : "סגור עזרה",
18
+    "HelpText" : "ניתן לנווט בין התמונות ע&quot;י שימוש במקלדת:<br/><br/>חצים ימינה/שמאלה: הקודמת/הבאה<br/>מקש רווח: הבאה<br/>ENTER: התחל/הפסק מצגת<br/>ESCAPE: סגירת הגלריה<br/>HOME/END: תמונה ראשונה/אחרונה<br/>H: פאנל עזרה",
19
+    "Slideshow" : "מצגת",
20
+    "OriginalContext": "צפיה בהקשר המקורי"
21
+}

+ 21
- 0
static/yoxview/lang/hu.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Bezárás",
4
+    "Help" : "Súgó",
5
+    "FirstImage" : "Az első képhez",
6
+    "LastImage" : "Az utolsó képhez",
7
+    "StartStopSlideShow" : "Lejátszás indítása/leállítása",
8
+    "Pause" : "Szünet",
9
+    "Play" : "Lejátszás",
10
+    "Prev" : "Előző",
11
+    "PinInfo" : "Info rögzítése",
12
+    "UnpinInfo" : "Info feloldása",
13
+    "Next" : "Következő",
14
+    "PrevImage" : "Előző kép",
15
+    "NextImage" : "Következő kép",
16
+    "Loading" : "Töltés",
17
+    "CloseHelp" : "Súgó bezárása",  
18
+    "HelpText" : "A képgaléria billentyűzet segítségével is navigálható:<br/><br/>BALRA/JOBBRA NYÍL: Előző/Következő<br/>SZÓKÖZ: Következő<br/>ENTER: Vetítés indítása/leállításabr/>ESCAPE: Galéria bezárása<br/>HOME/END: Első/Utolsó kép<br/>H - Ez a súgó",
19
+    "Slideshow" : "Lejátszás",
20
+    "OriginalContext": "Megtekintés eredeti környezetben"
21
+}

+ 21
- 0
static/yoxview/lang/ie.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Dún",
4
+    "Help" : "Cabhair",
5
+    "FirstImage" : "Go dti an pictiúr amhain",
6
+    "LastImage" : "Go dti an pictiúr seo caite",
7
+    "StartStopSlideShow" : "Spraoi/Sos taispeántas",
8
+    "Pause" : "Sos",
9
+    "Play" : "Spraoi",
10
+    "Prev" : "roimhe seo",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "is gaire",
14
+    "PrevImage" : "Roimhe seo pictiúr",
15
+    "NextImage" : "Pictiúr is gaire",
16
+    "Loading" : "luchtú",
17
+    "CloseHelp" : "Dun cabhair",
18
+    "HelpText" : "Feachann tú an pictiúri le do keybhord:<br/><br/>Clé/Déis saighde: Prev/Next<br/>SPACEBAR: Next<br/>ENTER: Spraoi/ Sos taispeántas<br/>ESCAPE: Dun leathanach<br/>HOME/END: Go dti an pictiúr amhain/seo caite<br/>H - An leathanach cabhair",
19
+    "Slideshow" : "Spraoi taispeבntas",
20
+    "OriginalContext": "D'fhonn i gcomhthéacs bunaidh"
21
+}

+ 21
- 0
static/yoxview/lang/ir.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "rtl",
3
+    "Close" : "بستن",
4
+    "Help" : "راهنما",
5
+    "FirstImage" : "تصویر نخست",
6
+    "LastImage" : "تصویر آخر",
7
+    "StartStopSlideShow" : "شروع/خاتمه نمایش",
8
+    "Pause" : "توقف",
9
+    "Play" : "نمایش",
10
+    "Prev" : "قبلی",
11
+    "PinInfo" : "نمایش اطلاعات",
12
+    "UnpinInfo" : "عدم نمایش اطلاعات",
13
+    "Next" : "بعدی",
14
+    "PrevImage" : "تصویر قبلی",
15
+    "NextImage" : "تصویر بعدی",
16
+    "Loading" : "بارگزاری",
17
+    "CloseHelp" : "بستن راهنما",  
18
+    "HelpText" : "گالری با استفاده از دکمه های صفحه کلید نیز عمل میکند:<br/><br/>دکمه قبلی و بعدی : قبلی/بعدی<br/>زر space: بعدی<br/>ENTER: توقف/نمایش<br/>ESCAPE: بستن گالری<br/>HOME/END: ابتدا/انتهای تصاویر<br/>H - صفحه راهنما",
19
+    "Slideshow" : "نمایش اسلاید",
20
+    "OriginalContext": "محتوای اصلی"
21
+}

+ 21
- 0
static/yoxview/lang/it.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Chiudi",
4
+    "Help" : "Aiuto",
5
+    "FirstImage" : "Alla prima immagine",
6
+    "LastImage" : "All' ultima immagine",
7
+    "StartStopSlideShow" : "Riproduci/Pausa la proiezione",
8
+    "Pause" : "Pausa",
9
+    "Play" : "Riproduci",
10
+    "Prev" : "Precedente",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Successiva",
14
+    "PrevImage" : "Immagine precedente",
15
+    "NextImage" : "Immagine successiva",
16
+    "Loading" : "Caricamento",
17
+    "CloseHelp" : "Chiudi aiuto",
18
+    "HelpText" : "Si pu&#xF2; navigare nella galleria usando la tastiera:<br/><br/>FRECCE SINISTRA/DESTRA: Precedente/Successiva<br/>SPAZIO: Successiva<br/>INVIO: Inizia/Ferma lo slideshow<br/>ESC: Chiudi la galleria<br/>HOME/FINE: Prima/Ultima immagine<br/>H - Aiuto<br/>",
19
+    "Slideshow" : "Riproduci",
20
+    "OriginalContext": "vedi nel contesto originale"
21
+}

+ 21
- 0
static/yoxview/lang/ja.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "閉じる",
4
+    "Help" : "ヘルプ",
5
+    "FirstImage" : "先頭の画像",
6
+    "LastImage" : "最後の画像",
7
+    "StartStopSlideShow" : "スライドショーの開始/一時停止",
8
+    "Pause" : "一時停止",
9
+    "Play" : "開始/停止",
10
+    "Prev" : "前",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "次",
14
+    "PrevImage" : "前の画像",
15
+    "NextImage" : "次の画像",
16
+    "Loading" : "ロード中",
17
+    "CloseHelp" : "ヘルプを閉じる",  
18
+    "HelpText" : "ギャラリーでは以下のキー操作が可能です。:<br/><br/>←/→ : 前/次の画像<br/>SPACE: 次の画像<br/>Enter: スライドショーの開始/停止<br/>ESC: ギャラリーを閉じる<br/>HOME/END: 先頭/最後の画像 <br/>H - ヘルプを表示",
19
+    "Slideshow" : "開始",
20
+    "OriginalContext": "掲載サイトで見る"
21
+}

+ 20
- 0
static/yoxview/lang/mk.js Näytä tiedosto

@@ -0,0 +1,20 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Затвори",
4
+    "Help" : "Помош",
5
+    "FirstImage" : "Прва слика",
6
+    "LastImage" : "Последна слика",
7
+    "StartStopSlideShow" : "Пушти/Паузирај презентација",
8
+    "Pause" : "Паузирај",
9
+    "Play" : "Пушти",
10
+    "Prev" : "Претходна",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Следна",
14
+    "PrevImage" : "Претходна слика",
15
+    "NextImage" : "Следна слика",
16
+    "Loading" : "Вчитување...",
17
+    "CloseHelp" : "затвори го панелот",  
18
+    "HelpText" : "Галеријата може да се употребува со користење на тастатурата:<br/><br/>СТРЕЛКИ ЛЕВО/ДЕСНО: Претходна/Следна<br/>SPACE: Следна<br/>ENTER: Пушти/Паузирај презентација<br/>ESCAPE: Затвори галерија<br/>HOME/END: Прва/Последна слика<br/>H - Овој панел за помош",
19
+    "Slideshow" : "Play"
20
+}

+ 3
- 0
static/yoxview/lang/nl.js Näytä tiedosto

@@ -0,0 +1,3 @@
1
+{
    "Direction" : "ltr",
    "Close" : "Sluiten",
    "Help" : "Help",
    "FirstImage" : "Naar eerste afbeelding",
    "LastImage" : "Naar laatste afbeelding",
    "StartStopSlideShow" : "Start/Stop diavoorstelling",
    "Pause" : "Stop",
    "Play" : "Afspelen",
    "Prev" : "Vorige",
    "PinInfo" : "Pin info",
2
+    "UnpinInfo" : "Unpin info",
    "Next" : "Volgende",
    "PrevImage" : "Vorige afbeelding",
    "NextImage" : "Volgende afbeelding",
    "Loading" : "Laden",
    "CloseHelp" : "Sluit help",
    "HelpText" : "De afbeeldingen kunnen doorlopen worden met het toetsenbord:<br/><br/>LINKS/RECHTS: Vorige/Volgende<br/>Spatie: Volgende<br/>ENTER: Start/Stop voorstelling<br/>ESCAPE: Sluit venster<br/>HOME/END: Eerste/Laatste<br/>H - Dit help paneel",
    "Slideshow" : "Voorstelling",
3
+    "OriginalContext": "Bekijk in originele context"
}

+ 21
- 0
static/yoxview/lang/pl.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Zamknij",
4
+    "Help" : "Pomoc",
5
+    "FirstImage" : "Do pierwszego obrazka",
6
+    "LastImage" : "Do ostatniego obrazka",
7
+    "StartStopSlideShow" : "Odtwarzaj/wstrzymaj pokaz slajdów",
8
+    "Pause" : "Wstrzymaj",
9
+    "Play" : "Odtwarzaj",
10
+    "Prev" : "Poprzedni",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Następny",
14
+    "PrevImage" : "Poprzedni obrazek",
15
+    "NextImage" : "Następny obrazek",
16
+    "Loading" : "Ładowanie",
17
+    "CloseHelp" : "Zamknij pomoc",  
18
+    "HelpText" : "Możesz sterować galerią za pomocą klawiatury:<br/><br/>LEWA/PRAWA STRZAŁKA: poprz. / nast. obrazek<br/>SPACJA: następny<br/>ENTER: rozpocznij/zatrzymaj pokaz slajdów<br/>ESCAPE: Zamknij galerię<br/>OME/END: pierwszy / ostatni obrazek<br/>H - panel pomocy",
19
+    "Slideshow" : "Pokaz",
20
+    "OriginalContext": "Zobacz w oryginalnym kontekście"
21
+}

+ 21
- 0
static/yoxview/lang/pt-br.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Fechar",
4
+    "Help" : "Ajuda",
5
+    "FirstImage" : "Ir para a primeira imagem",
6
+    "LastImage" : "Ir para a ultima imagem",
7
+    "StartStopSlideShow" : "Iniciar/Pausar slideshow",
8
+    "Pause" : "Pausar",
9
+    "Play" : "Iniciar",
10
+    "Prev" : "Anterior",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Próximo",
14
+    "PrevImage" : "Imagem anterior",
15
+    "NextImage" : "Próxima imagem",
16
+    "Loading" : "Carregando",
17
+    "CloseHelp" : "Fechar ajuda",  
18
+    "HelpText" : "Você pode navegar na galeria usando o seu teclado:<br/><br/>Setas ESQUERDA/DIREITA: Anterior/Próxima<br/>Espaço: Próxima<br/>ENTER: Iniciar/Parar slideshow<br/>ESCAPE: Fechar a galeria<br/>HOME/END: Primeira/Última imagem<br/>H - Este painel de ajuda",
19
+    "Slideshow" : "Iniciar",
20
+    "OriginalContext": "Veja no contexto original"
21
+}

+ 21
- 0
static/yoxview/lang/pt.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Fechar",
4
+    "Help" : "Ajuda",
5
+    "FirstImage" : "Ir para a primeira imagem",
6
+    "LastImage" : "Ir para a ultima imagem",
7
+    "StartStopSlideShow" : "Iniciar/Pausar slideshow",
8
+    "Pause" : "Pausar",
9
+    "Play" : "Iniciar",
10
+    "Prev" : "Anterior",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Próximo",
14
+    "PrevImage" : "Imagem anterior",
15
+    "NextImage" : "Próxima imagem",
16
+    "Loading" : "A carregar",
17
+    "CloseHelp" : "Fechar ajuda",  
18
+    "HelpText" : "Você pode navegar na galeria usando o seu teclado:<br/><br/>Setas ESQUERDA/DIREITA: Anterior/Próxima<br/>Espaço: Próxima<br/>ENTER: Iniciar/Parar slideshow<br/>ESCAPE: Fechar a galeria<br/>HOME/END: Primeira/Última imagem<br/>H - Este painel de ajuda",
19
+    "Slideshow" : "Iniciar",
20
+    "OriginalContext": "Veja no contexto original"
21
+}

+ 21
- 0
static/yoxview/lang/ro.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Inchide",
4
+    "Help" : "Ajutor",
5
+    "FirstImage" : "Prima imagine",
6
+    "LastImage" : "Ultima imagine",
7
+    "StartStopSlideShow" : "Ruleaza/Pauza diaporama",
8
+    "Pause" : "Pauza",
9
+    "Play" : "Porneste",
10
+    "Prev" : "Precedent",
11
+    "PinInfo" : "Fixeaza info",
12
+    "UnpinInfo" : "Ascunde info",
13
+    "Next" : "Urmator",
14
+    "PrevImage" : "Imaginea precedenta",
15
+    "NextImage" : "Imaginea urmatoare",
16
+    "Loading" : "Se incarca",
17
+    "CloseHelp" : "Inchide ajutorul",  
18
+    "HelpText" : "Prin galerie se poate naviga folosind tastatura:<br/><br/>SAGETILE STANGA/DREAPTA: Precedenta/Urmatoare<br/>BARA DE SPATIU: Urmatoarea<br/>ENTER: Start/Stop diaporama<br/>ESCAPE: Inchide galeria<br/>HOME/END: Prima/Ultima imagine<br/>H - Acest panou de ajutor",
19
+    "Slideshow" : "Ruleaza",
20
+    "OriginalContext": "Vezi in contextul original"
21
+}

+ 21
- 0
static/yoxview/lang/ru.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Закрыть",
4
+    "Help" : "Помощь",
5
+    "FirstImage" : "К первому изображению",
6
+    "LastImage" : "К последнему изображению",
7
+    "StartStopSlideShow" : "Начать/Приостановить слайдшоу",
8
+    "Pause" : "Приостановить",
9
+    "Play" : "Начать",
10
+    "Prev" : "Пред.",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Следующая",
14
+    "PrevImage" : "Предыдущее изображение",
15
+    "NextImage" : "Следующее изображение",
16
+    "Loading" : "Загрузка",
17
+    "CloseHelp" : "Закрыть помощь",  
18
+    "HelpText" : "Управлять галерей можно с помощью клавиатуры:<br/><br/>ЛЕВАЯ/ПРАВАЯ СТРЕЛОЧКИ: Пред./Следующее<br/>ПРОБЕЛ: Следующее<br/>ENTER: Старт/Стоп слайдшоу<br/>ESCAPE: Закрыть галерею<br/>HOME/END: Первое/Последнее изображение<br/>H - Открыть панель помощи",
19
+    "Slideshow" : "Начать",
20
+    "OriginalContext": "View in original context"
21
+}

+ 21
- 0
static/yoxview/lang/sk.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Zavrieť",
4
+    "Help" : "Nápoveda",
5
+    "FirstImage" : "Na prvý obrázok",
6
+    "LastImage" : "Na posledný obrozek",
7
+    "StartStopSlideShow" : "Spustiť/Zastaviť prehrávanie",
8
+    "Pause" : "Zastaviť",
9
+    "Play" : "Spustiť",
10
+    "Prev" : "Predchádzajúci",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Nasledujúci",
14
+    "PrevImage" : "Predchádzajúci obrázok",
15
+    "NextImage" : "Nasledujúci obrázok",
16
+    "Loading" : "Nahrávam",
17
+    "CloseHelp" : "Zavrieť nápovedu",
18
+    "HelpText" : "Galériu môžete prechádzať pomocou kláves:<br/><br/>ŠÍPKY VĽAVO/VPRAVO: Predchádzajúci/Nasledujúci obrázok<br/>MEDZERNÍK: Ďalší<br/>ENTER: Spustiť/zastaviť prehrávanie<br/>ESC: Zavrieť galériu<br/>HOME/END: Prvý/posledný obrázok<br/>H - Vyvolanie nápovedy",
19
+    "Slideshow" : "Prehrávanie",
20
+    "OriginalContext": "Zobraziť v pôvodnom kontexte"
21
+}

+ 21
- 0
static/yoxview/lang/sl.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Zapri",
4
+    "Help" : "Pomo&#269;",
5
+    "FirstImage" : "Na prvo sliko",
6
+    "LastImage" : "Na zadnjo sliko",
7
+    "StartStopSlideShow" : "Po&#382;eni/Ustavi projekcijo",
8
+    "Pause" : "Ustavi",
9
+    "Play" : "Predvajaj",
10
+    "Prev" : "Nazaj",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Naprej",
14
+    "PrevImage" : "Predhodna slika",
15
+    "NextImage" : "Naslednja slika",
16
+    "Loading" : "Nalagam",
17
+    "CloseHelp" : "Zapri pomo&#269;",
18
+    "HelpText" : "Med slikami se lahko pomikate z uporabo tipkovnice:<br/><br/>PU&#352;&#268;ICI LEVO/DESNO: Nazaj/Naprej<br/>PRESLEDNICA: Naprej<br/>VNOS: Po&#382;eni/Ustavi projekcijo<br/>ESC: Zapri galerijo<br/>HOME/END: Prva/Zadnja slika<br/>H - Pomo&#269;",
19
+    "Slideshow" : "Predvajaj",
20
+    "OriginalContext": "View in original context"
21
+}

+ 21
- 0
static/yoxview/lang/sv.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Stäng",
4
+    "Help" : "Hjälp",
5
+    "FirstImage" : "Till första bilden",
6
+    "LastImage" : "Till sista bilden",
7
+    "StartStopSlideShow" : "Spela/Pausa bildspelet", 
8
+    "Pause" : "Pausa",
9
+    "Play" : "Bildspel",
10
+    "Prev" : "Föregående",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Nästa",
14
+    "PrevImage" : "Föregående bild",
15
+    "NextImage" : "Nästa bild",
16
+    "Loading" : "Laddar",
17
+    "CloseHelp" : "Stäng hjälp",  
18
+    "HelpText" : "Detta galleri kan navigeras med hjälp av tangentbordet: <br/>VÄNSTER/HÖGER PIL: Tillbaka/Nästa<br/>MELLANSLAG: Nästa bild<br/>ENTER: Starta/pausa bildspelet<br/>ESCAPE: Stäng galleriet<br/>HOME/END: Första/Sista bilden<br/>H - Denna hjälppanel", 
19
+    "Slideshow" : "Bildspel",
20
+    "OriginalContext": "View in original context"
21
+}

+ 22
- 0
static/yoxview/lang/tr.js Näytä tiedosto

@@ -0,0 +1,22 @@
1
+// Translated by Ugur CELENK
2
+{
3
+    "Direction" : "ltr",
4
+    "Close" : "Kapat",
5
+    "Help" : "Yardım",
6
+    "FirstImage" : "İlk resim",
7
+    "LastImage" : "Son resim",
8
+    "StartStopSlideShow" : "Başlat/Durdur slayt gösterisi",
9
+    "Pause" : "Durdur",
10
+    "Play" : "Başlat",
11
+    "Prev" : "Önceki",
12
+    "PinInfo" : "Pin info",
13
+    "UnpinInfo" : "Unpin info",
14
+    "Next" : "Sonraki",
15
+    "PrevImage" : "Önceki resim",
16
+    "NextImage" : "Sonraki resim",
17
+    "Loading" : "Yükleniyor",
18
+    "CloseHelp" : "Yardımı kapat",  
19
+    "HelpText" : "Galeride klavye kullanarak geçiş yapabilirsiniz:<br/><br/>SOL/SAĞ YÖN TUŞLARI: Önceki/Sonraki<br/>BOŞLUK TUŞU: Sonraki<br/>ENTER: Slayt gösterisi Başlat/Durdur<br/>ESC: Galeriyi kapat<br />HOME/END: İlk/Son resim<br />H - Yardım paneli",
20
+    "Slideshow" : "Başlat",
21
+    "OriginalContext": "Orjinal içeriği göster"
22
+}

+ 21
- 0
static/yoxview/lang/ua.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "Закрити",
4
+    "Help" : "Допомога",
5
+    "FirstImage" : "До першого зображення",
6
+    "LastImage" : "До останнього зображення",
7
+    "StartStopSlideShow" : "Почати/Призупинити слайдшоу",
8
+    "Pause" : "Призупинити",
9
+    "Play" : "Почати",
10
+    "Prev" : "Попереднє",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "Наступне",
14
+    "PrevImage" : "Попереднє зображення",
15
+    "NextImage" : "Наступне зображення",
16
+    "Loading" : "Завантаження",
17
+    "CloseHelp" : "Закрити допомогу",  
18
+    "HelpText" : "Керувати галереєю можна за допомогою клавіатури:<br/><br/>ЛІВА/ПРАВА СТРІЛОЧКИ: Попереднє/Наступне<br/>ПРОБІЛ: Наступне<br/>ENTER: Старт/Стоп слайдшоу<br/>ESCAPE: Зачинити галерею<br/>HOME/END: Перше/Останнє зображення<br/>H - Відкрити панель допомоги",
19
+    "Slideshow" : "Почати",
20
+    "OriginalContext": "View in original context"
21
+}

+ 21
- 0
static/yoxview/lang/zh-cn.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+    "Direction" : "ltr",
3
+    "Close" : "关闭",
4
+    "Help" : "帮助",
5
+    "FirstImage" : "第一张",
6
+    "LastImage" : "最后一张",
7
+    "StartStopSlideShow" : "播放/暂停幻灯片",
8
+    "Pause" : "暂停",
9
+    "Play" : "播放",
10
+    "Prev" : "上一页",
11
+    "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+    "Next" : "下一页",
14
+    "PrevImage" : "上一张",
15
+    "NextImage" : "下一张",
16
+    "Loading" : "载入中",
17
+    "CloseHelp" : "关闭帮助",  
18
+    "HelpText" : "你可以使用键盘进行画廊导航:<br/><br/>左/右箭头: 上一张/下一张<br/>空格键: 下一张<br/>Enter键: 播放/暂停幻灯片<br/>Esc键: 关闭画廊<br/>HOME/END: 第一张/最后一张<br/>H - 帮助面板",
19
+    "Slideshow" : "播放",
20
+    "OriginalContext": "在原有范围内查看"
21
+}

+ 21
- 0
static/yoxview/lang/zh-tw.js Näytä tiedosto

@@ -0,0 +1,21 @@
1
+{
2
+   "Direction" : "ltr",
3
+   "Close" : "關閉",
4
+   "Help" : "求助",
5
+   "FirstImage" : "第一張",
6
+   "LastImage" : "最後一張",
7
+   "StartStopSlideShow" : "播放/暫停幻燈片",
8
+   "Pause" : "暫停",
9
+   "Play" : "播放",
10
+   "Prev" : "上一頁",
11
+   "PinInfo" : "Pin info",
12
+    "UnpinInfo" : "Unpin info",
13
+   "Next" : "下一頁",
14
+   "PrevImage" : "上一張",
15
+   "NextImage" : "下一張",
16
+   "Loading" : "載入中",
17
+   "CloseHelp" : "關閉求助",
18
+   "HelpText" : "你可以使用鍵盤進行畫廊導航:<br/><br/>左/右箭頭: 上一張/下一張<br/>空格鍵: 下一張<br/>Enter鍵: 播放/暫停幻燈片<br/>Esc鍵: 關閉畫廊<br/>HOME/END: 第一張/最後一張<br/>H - 求助面板",
19
+   "Slideshow" : "輪播",
20
+   "OriginalContext": "在原有範圍內查看"
21
+}

BIN
static/yoxview/skins/top_menu/sprites.png Näytä tiedosto


+ 49
- 0
static/yoxview/skins/top_menu/yoxview.top_menu.css Näytä tiedosto

@@ -0,0 +1,49 @@
1
+.yoxview_top_menu{ font-family: Arial, Sans-Serif; font-size: 10pt;}
2
+/*
3
+.yoxview_top_menu img.yoxview_fadeImg{ cursor: -moz-zoom-in }
4
+.yoxview_top_menu img.yoxview_zoom{ cursor: -moz-zoom-out }
5
+*/
6
+.yoxview_top_menu #yoxview_infoPanel
7
+{
8
+	top: 0;
9
+	bottom: auto;
10
+}
11
+.yoxview_top_menu #yoxview_infoPanel a.yoxviewInfoLink
12
+{
13
+	padding: 6px 10px;
14
+	margin: 0;
15
+	opacity: 1;
16
+	outline: none;
17
+}
18
+.yoxview_top_menu #yoxview_infoPanel a.yoxviewInfoLink:hover
19
+{
20
+	background: #999;
21
+	-moz-box-shadow: 0 15px 20px 0 rgba(0,0,0,0.6) inset;
22
+	-webkit-box-shadow: 0 15px 20px 0 rgba(0,0,0,0.6) inset;
23
+	box-shadow: 0 15px 20px 0 rgba(0,0,0,0.6) inset;
24
+}
25
+.yoxview_top_menu a.yoxview_ctlButton
26
+{
27
+	display: block;
28
+	width: 58px;
29
+	height: 42px;
30
+	position: fixed;
31
+	opacity: 0.5;
32
+	background-image: url(sprites.png);
33
+	background-repeat: no-repeat;
34
+	top: 50%;
35
+	margin-top: -22px;
36
+	outline: none;
37
+	z-index: 3;
38
+}
39
+.yoxview_top_menu a.yoxview_ctlButton:hover{ opacity: 0.8; }
40
+.yoxview_top_menu a.yoxview_nextBtn
41
+{
42
+	background-position: right top;
43
+	right : 0;
44
+}
45
+.yoxview_top_menu a.yoxview_prevBtn
46
+{
47
+	background-position: left top;
48
+	left : 0;
49
+}

+ 96
- 0
static/yoxview/skins/top_menu/yoxview.top_menu.js Näytä tiedosto

@@ -0,0 +1,96 @@
1
+$.yoxview.yoxviewSkins["top_menu"] = {
2
+    infoButtons: function(options, lang, sprites, yoxviewPanel, yoxviewContent){
3
+        var $ = jQuery;
4
+        
5
+        //prev/next buttons:
6
+		
7
+        if (!options.skinOptions || options.skinOptions.renderButtons !== false)
8
+        {
9
+            var prevBtn = $("<a>", {
10
+                className: "yoxview_ctlButton yoxview_prevBtn",
11
+                title: lang.PrevImage,
12
+                href: "#"
13
+            });
14
+            prevBtn.click(function(e){
15
+                $.yoxview.prev();
16
+                return false;
17
+            });
18
+            var nextBtn = $("<a>", {
19
+                className: "yoxview_ctlButton yoxview_nextBtn",
20
+                title: lang.NextImage,
21
+                href: "#"
22
+            });
23
+            nextBtn.click(function(e){
24
+                $.yoxview.next();
25
+                return false;
26
+            });
27
+            
28
+            yoxviewPanel.append(prevBtn, nextBtn);
29
+        }
30
+        // menu buttons:
31
+        var closeBtn = $("<a>", {
32
+            href: "#",
33
+            title: lang.Close,
34
+            click: function(e){
35
+                e.preventDefault();
36
+                $.yoxview.close();
37
+            }
38
+        });
39
+		
40
+        closeBtn.append(sprites.getSprite("icons", "close"));
41
+        
42
+        var playBtn = $("<a>", {
43
+            href: "#",
44
+            title: lang.Play,
45
+            click: function(e){
46
+                e.preventDefault();
47
+                $.yoxview.play();
48
+            }
49
+        });
50
+        playBtn.append(sprites.getSprite("icons", "play"));
51
+        
52
+        var rightBtn = $("<a>", {
53
+            href: "#",
54
+            title: options.isRTL ? lang.PrevImage : lang.NextImage,
55
+            click: function(e){
56
+                e.preventDefault();
57
+                if (options.isRTL)
58
+                    $.yoxview.prev();
59
+                else
60
+                    $.yoxview.next();
61
+            }
62
+        });
63
+        rightBtn.append(sprites.getSprite("icons", "right"));
64
+        
65
+        var leftBtn = $("<a>", {
66
+            href: "#",
67
+            title: options.isRTL ? lang.NextImage : lang.PrevImage,
68
+            click: function(e){
69
+                e.preventDefault();
70
+                if (options.isRTL)
71
+                    $.yoxview.next();
72
+                else
73
+                    $.yoxview.prev();
74
+            }
75
+        });
76
+        leftBtn.append(sprites.getSprite("icons", "left"));
77
+        
78
+        //yoxviewContent.delegate("div.yoxview_imgPanel", "click.yoxviewZoom", $.yoxview.zoom);
79
+        
80
+        return {
81
+            close: closeBtn,
82
+            playBtn: playBtn,
83
+            right: rightBtn,
84
+            left: leftBtn
85
+        };
86
+    },
87
+    options: {
88
+        renderInfoExternally: true,
89
+        autoHideInfo: false,
90
+        popupMargin: "20 80",
91
+        renderInfoPin: false,
92
+        renderMenu: false,
93
+        renderButtons: false
94
+    }
95
+}
96
+

+ 304
- 0
static/yoxview/yox.js Näytä tiedosto

@@ -0,0 +1,304 @@
1
+Yox = {
2
+    // Adds a stylesheet link reference in the specified document's HEAD
3
+    addStylesheet: function(_document, cssUrl)
4
+    {
5
+        var cssLink = _document.createElement("link");
6
+        cssLink.setAttribute("rel", "Stylesheet");
7
+        cssLink.setAttribute("type", "text/css");
8
+        cssLink.setAttribute("href", cssUrl);
9
+        _document.getElementsByTagName("head")[0].appendChild(cssLink);
10
+    },
11
+    compare: function(obj1, obj2)
12
+    {
13
+		if (typeof(obj1) != typeof(obj2))
14
+			return false;
15
+		else if (typeof(obj1) == "function")
16
+			return obj1 == obj2;
17
+			
18
+        // deep-compare objects:
19
+        function size(obj)
20
+        {
21
+            var size = 0;
22
+            for (var keyName in obj)
23
+            {
24
+                if (keyName != null)
25
+                    size++;
26
+            }
27
+            return size;
28
+        }
29
+        
30
+        if (size(obj1) != size(obj2))
31
+            return false;
32
+            
33
+        for(var keyName in obj1)
34
+        {
35
+            var value1 = obj1[keyName];
36
+            var value2 = obj2[keyName];
37
+            
38
+            if (typeof value1 != typeof value2)
39
+                return false;
40
+
41
+            if (value1 && value1.length && (value1[0] !== undefined && value1[0].tagName))
42
+            {
43
+                if(!value2 || value2.length != value1.length || !value2[0].tagName || value2[0].tagName != value1[0].tagName)
44
+                    return false;
45
+            }
46
+            else if (typeof value1 == 'function' || typeof value1 == 'object') {
47
+                var equal = Yox.compare(value1, value2);
48
+                if (!equal)
49
+                    return equal;
50
+            }
51
+            else if (value1 != value2)
52
+                return false;
53
+        }
54
+        return true;
55
+    },
56
+    hasProperties: function(obj){
57
+        var hasProperties = false;
58
+        for(pName in obj)
59
+        {
60
+            hasProperties = true;
61
+            break;
62
+        }
63
+        return hasProperties;        
64
+    },
65
+    dataSources: [],
66
+    fitImageSize: function(imageSize, targetSize, enlarge, isFill)
67
+	{
68
+		var resultSize = { width: imageSize.width, height: imageSize.height};
69
+		if ((imageSize.width > targetSize.width) ||
70
+		    (enlarge && imageSize.width < targetSize.width) )
71
+		{
72
+			resultSize.height = Math.round((targetSize.width / imageSize.width) * imageSize.height);
73
+			resultSize.width = targetSize.width;
74
+		}
75
+		
76
+		if (!isFill && resultSize.height > targetSize.height)
77
+		{
78
+			resultSize.width = Math.round((targetSize.height / resultSize.height) * resultSize.width);
79
+			resultSize.height = targetSize.height;
80
+		}
81
+		else if (isFill && resultSize.height < targetSize.height && (targetSize.height <= imageSize.height || enlarge))
82
+		{
83
+			resultSize.height = targetSize.height;
84
+			resultSize.width = Math.round((targetSize.height / imageSize.height) * imageSize.width);
85
+		}
86
+		
87
+		return resultSize;
88
+	},
89
+	flashVideoPlayers: {
90
+	    jwplayer: function(swfUrl, videoUrl, imageUrl, title, flashVars){
91
+	        var returnData = {
92
+	            swf: swfUrl || "/jwplayer/player.swf",
93
+	            flashVars: {
94
+    	            file: videoUrl,
95
+	                image: imageUrl,
96
+	                stretching: "fill",
97
+	                title: title,
98
+	                backcolor: "000000",
99
+	                frontcolor: "FFFFFF"
100
+	            }
101
+	        }
102
+	        $.extend(returnData.flashVars, flashVars);
103
+	        return returnData;
104
+	    }
105
+	},
106
+    getDataSourceName: function(url)
107
+    {
108
+        for(dataSourceIndex in Yox.Regex.data)
109
+        {
110
+            if(url.match(Yox.Regex.data[dataSourceIndex]))
111
+                return dataSourceIndex;
112
+        }
113
+        return null;
114
+    },
115
+    getPath: function(pathRegex)
116
+    {
117
+        var scripts = document.getElementsByTagName("script");
118
+        for(var i=0; i<scripts.length; i++)
119
+        {
120
+            var currentScriptSrc = scripts[i].src;
121
+            var matchPath = currentScriptSrc.match(pathRegex);
122
+            if (matchPath)
123
+                return matchPath[1];
124
+        }
125
+        
126
+        return null;
127
+    },
128
+    getTopWindow: function()
129
+    {
130
+        var topWindow = window;
131
+        if (window.top)
132
+            topWindow = window.top;
133
+        else
134
+        {
135
+            while(topWindow.parent)
136
+                topWindow = topWindow.parent;
137
+        }
138
+        
139
+        return topWindow;
140
+    },
141
+    getUrlData: function(url)
142
+    {
143
+        var urlMatch = url.match(Yox.Regex.url);
144
+        
145
+        if (!urlMatch)
146
+            return null;
147
+            
148
+        var urlData = {
149
+            path: urlMatch[1],
150
+            anchor: urlMatch[3]
151
+        }
152
+        
153
+        if (urlMatch[2])
154
+            urlData.queryFields = this.queryToJson(urlMatch[2]);
155
+        
156
+        return urlData;
157
+    },
158
+    hex2rgba: function(hex, alpha)
159
+    {
160
+        hex = parseInt(hex.replace("#", "0x"), 16);
161
+		var r = (hex & 0xff0000) >> 16;
162
+		var g = (hex & 0x00ff00) >> 8;
163
+		var b = hex & 0x0000ff;
164
+        return "rgba(" + r + ", " + g + ", " + b + ", " + (typeof(alpha) != 'undefined' ? alpha : "1") + ")";
165
+    },
166
+    queryToJson: function(query)
167
+    {
168
+        if (!query)
169
+            return null;
170
+            
171
+        var queryParams = query.split("&");
172
+        var json = {};
173
+        for(var i=0; i < queryParams.length; i++)
174
+        {
175
+            var paramData = queryParams[i].split('=');
176
+            if (paramData.length == 2)
177
+                json[paramData[0]] = paramData[1];
178
+        }
179
+        return json;
180
+    },
181
+    loadDataSource: function(options, callback)
182
+    {
183
+        var dataSourceName;
184
+        if (options.dataUrl)
185
+        {
186
+            dataSourceName = Yox.getDataSourceName(options.dataUrl);
187
+            if (dataSourceName)
188
+                $.extend(options, { dataSource: dataSourceIndex });
189
+        }
190
+        if (options.dataSource && !Yox.dataSources[dataSourceName])
191
+        {
192
+            $.ajax({
193
+                url : options.dataFolder + options.dataSource + ".js", 
194
+                async : false,
195
+                dataType : "script",
196
+                success: function(data){
197
+                    eval(data);
198
+                    eval ("Yox.dataSources['" + options.dataSource + "'] = new yox_" + options.dataSource + "();");                      
199
+                    callback(Yox.dataSources[options.dataSource]);
200
+                },
201
+                error : function(XMLHttpRequest, textStatus, errorThrown)
202
+                {
203
+                    console.log(XMLHttpRequest, textStatus, errorThrown);
204
+                }
205
+            });
206
+        }
207
+        else if (callback)
208
+            callback();
209
+    },
210
+    Regex: {
211
+        data: {
212
+            picasa: /http:\/\/(?:www\.)?picasaweb\.google\..*/i,
213
+            flickr: /http:\/\/(?:www\.)?flickr.com/i,
214
+            smugmug: /http:\/\/.*\.smugmug.com/i,
215
+            youtube: /^http:\/\/(?:www\.)?youtube.com\//
216
+        },
217
+        flash: /^(.*\.(swf))(\?[^\?]+)?/i,
218
+        flashvideo: /^(.*\.(flv|f4v|f4p|f4a|f4b|aac))(\?[^\?]+)?/i,
219
+        image: /^[^\?#]+\.(?:jpg|jpeg|gif|png)$/i,
220
+        url: /^([^#\?]*)?(?:\?([^\?#]*))?(?:#([A-Za-z]{1}[A-Za-z\d-_\:\.]+))?$/, // [0] - whole url, [1] - path, [2] - query (sans '?'), [3] - anchor
221
+        video: {
222
+            youtube: /.*youtube.com\/watch.*(?:v=[^&]+).*/i,
223
+            vimeo: /vimeo.com\/\d+/i,
224
+            hulu: /hulu.com\/watch\//i,
225
+            viddler: /viddler.com\//i,
226
+            flickr: /.*flickr.com\/.*/i,
227
+            myspace: /.*vids.myspace.com\/.*/i,
228
+            qik: /qik.com/i,
229
+            revision3: /revision3.com/i,
230
+            dailymotion: /dailymotion.com/i,
231
+            "5min": /.*5min\.com\/Video/i
232
+        }
233
+    },
234
+    Sprites: function(sprites, spritesImage, srcImage)
235
+    {
236
+        var cacheImg = new Image();
237
+        cacheImg.src = spritesImage;
238
+        this.spritesImage = spritesImage;
239
+        
240
+        var currentTop = 0;
241
+        jQuery.each(sprites, function(i, spriteGroup){
242
+            spriteGroup.top = currentTop;
243
+            currentTop += spriteGroup.height;
244
+        });
245
+
246
+        this.getSprite = function(spriteGroup, spriteName, title)
247
+        {
248
+            return jQuery("<img/>", {
249
+                src: srcImage,
250
+                alt: spriteName,
251
+				title: title,
252
+                css: {
253
+                    width: sprites[spriteGroup].width,
254
+                    height: sprites[spriteGroup].height,
255
+                    "background-image": "url(" + spritesImage + ")",
256
+                    "background-repeat": "no-repeat",
257
+                    "background-position": this.getBackgroundPosition(spriteGroup, spriteName)
258
+                }
259
+            });
260
+        }
261
+        this.getBackgroundPosition = function(spriteGroup, spriteName)
262
+        {
263
+            var backgroundLeft = jQuery.inArray(spriteName, sprites[spriteGroup].sprites) * (sprites[spriteGroup].width || 0);
264
+            return "-" + backgroundLeft + "px -" + sprites[spriteGroup].top + "px";
265
+        }
266
+    },
267
+    Support: {
268
+        rgba: function()
269
+        {
270
+            // From http://leaverou.me/2009/03/check-whether-the-browser-supports-rgba-and-other-css3-values/
271
+	        if(!('result' in arguments.callee))
272
+	        {
273
+	            var element = document.createElement('div');
274
+		        var testColor = 'rgba(0, 0, 0, 0.5)';
275
+		        var result = false;
276
+		        
277
+		        try {
278
+			        element.style.color = testColor;
279
+			        result = /^rgba/.test(element.style.color);
280
+		        } catch(e) {}
281
+		        element = null;
282
+		        arguments.callee.result = result;
283
+	        }
284
+	        return arguments.callee.result;
285
+        }
286
+    },
287
+    urlDataToPath: function(urlData)
288
+    {
289
+        var path = urlData.path ||"";
290
+        if (urlData.queryFields && this.hasProperties(urlData.queryFields))
291
+        {
292
+            path += "?";
293
+            for(field in urlData.queryFields)
294
+            {
295
+                path += field + "=" + urlData.queryFields[field] + "&";
296
+            }
297
+            path = path.substring(0, path.length-1);
298
+        }
299
+        if (urlData.anchor)
300
+            path += "#" + urlData.anchor;
301
+            
302
+        return path;
303
+    }
304
+}

+ 34
- 0
static/yoxview/yoxview-init.js Näytä tiedosto

@@ -0,0 +1,34 @@
1
+var yoxviewPath = getYoxviewPath();
2
+var cssLink = top.document.createElement("link");
3
+cssLink.setAttribute("rel", "Stylesheet");
4
+cssLink.setAttribute("type", "text/css");
5
+cssLink.setAttribute("href", yoxviewPath + "yoxview.css");
6
+top.document.getElementsByTagName("head")[0].appendChild(cssLink);
7
+
8
+function LoadScript(url)
9
+{
10
+	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
11
+}
12
+
13
+var jQueryIsLoaded = typeof jQuery != "undefined";
14
+
15
+if (!jQueryIsLoaded)
16
+    LoadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
17
+
18
+LoadScript(yoxviewPath + "jquery.yoxview-2.21.min.js");
19
+
20
+function getYoxviewPath()
21
+{
22
+    var scripts = document.getElementsByTagName("script");
23
+    var regex = /(.*\/)yoxview-init/i;
24
+    for(var i=0; i<scripts.length; i++)
25
+    {
26
+        var currentScriptSrc = scripts[i].src;
27
+        if (currentScriptSrc.match(regex))
28
+            return currentScriptSrc.match(regex)[1];
29
+    }
30
+
31
+    return null;
32
+}
33
+// Remove the next line's comment to apply yoxview without knowing jQuery to all containers with class 'yoxview':
34
+LoadScript(yoxviewPath + "yoxview-nojquery.js");

+ 5
- 0
static/yoxview/yoxview-nojquery.js Näytä tiedosto

@@ -0,0 +1,5 @@
1
+jQuery(document).ready(function($){
2
+    // Uncomment the following line if you use an additional Javascript library (likr Prototype, for example) in the same page as YoxView:
3
+    // jQuery.noConflict();
4
+    $(".yoxview").yoxview();
5
+});

+ 235
- 0
static/yoxview/yoxview.css Näytä tiedosto

@@ -0,0 +1,235 @@
1
+/* YoxView v2.0 CSS file */
2
+#yoxview .yoxview_bottom{ bottom: 0; }
3
+#yoxview .yoxview_right{ float: right; }
4
+#yoxview .yoxview_left{ float: left; }
5
+
6
+#yoxview_popupWrap
7
+{
8
+	position: fixed;
9
+    top: 0;
10
+    left: 0;
11
+    width: 100%;
12
+    height: 100%;
13
+    display: none;
14
+    z-index: 100;
15
+}
16
+#yoxview
17
+{
18
+	position: absolute;
19
+	font-family: Arial, Sans-Serif;
20
+	z-index: 999;
21
+	border: solid 1px #999;
22
+	overflow: hidden;
23
+	font-size: 10pt;
24
+	text-align: left;
25
+}
26
+#yoxview a img, #yoxview_infoPanel a img{ border: none; }
27
+#yoxview a:focus{ outline: none; }
28
+#yoxview div.yoxview_imgPanel{ position: absolute; top: 0; left: 0; }
29
+#yoxview div.yoxview_mediaPanel
30
+{ 
31
+	position: absolute; 
32
+
33
+	background: #191919; 
34
+	width: 100%; 
35
+	height: 100% 
36
+}
37
+#yoxview .yoxview_ctlBtn
38
+{
39
+	position: absolute; 
40
+	z-index: 3;
41
+	display: block;
42
+	text-decoration: none;
43
+	outline: none;
44
+	width: 50%;
45
+	height: 100%;
46
+}
47
+#yoxview .yoxview_ctlBtn img
48
+{
49
+	position: absolute;
50
+	border: none;
51
+	top: 50%;
52
+	margin-top: -22px;
53
+}
54
+#yoxview a.yoxview_ctlBtn:focus, #yoxview a.yoxview_ctlBtn:active{ outline: none; outline: none;}
55
+#yoxview .yoxview_notification
56
+{
57
+	width: 59px; 
58
+	height: 59px; 
59
+	position: absolute; 
60
+	top: 50%; 
61
+	left: 50%; 
62
+	margin-top: -30px;
63
+	margin-left: -30px;
64
+	z-index: 4;
65
+	opacity: 0.6;
66
+	filter: alpha(opacity=60);
67
+	background-image: url(images/sprites.png);
68
+	background-repeat: no-repeat;
69
+	display: none;
70
+}
71
+
72
+#yoxview #yoxview_ajaxLoader img
73
+{
74
+	padding: 13px;
75
+}
76
+#yoxview .yoxview_popupBarPanel
77
+{
78
+	position: absolute;
79
+	z-index: 4;
80
+	min-height: 70px;
81
+	width: 100%;
82
+	right: 0;
83
+}
84
+#yoxview #yoxview_menuPanel
85
+{ 
86
+	width: 145px; 
87
+	height: 42px; 
88
+	padding-top: 0px;
89
+	padding-right: 9px;
90
+	position: absolute; 
91
+	right: 0;
92
+	background: url(images/sprites.png) no-repeat left -77px;
93
+	background: rgba(0, 0, 0, 0.8);
94
+	-moz-border-radius: 0 0 0 15px;
95
+	-webkit-border-radius: 0 0 0 15px;
96
+	border-radius: 0 0 0 15px;
97
+	top: -42px;
98
+}
99
+
100
+#yoxview #yoxview_menuPanel a
101
+{ 
102
+	display: block; 
103
+	width: 45px; 
104
+	float: right; 
105
+	text-align: center; 
106
+	font-size: 0.8em; 
107
+	position: relative;
108
+	margin-top: -5px;
109
+	padding-bottom: 13px;
110
+	text-decoration: none;
111
+	font-family: Arial, Sans-Serif;
112
+}
113
+#yoxview #yoxview_menuPanel a span{ color: White; display: block; margin-bottom: 3px;  }
114
+#yoxview #yoxview_menuPanel a.last{ margin-left: 0; }
115
+#yoxview #yoxview_menuPanel a:focus{ outline: none; }
116
+#yoxview_infoPanel
117
+{
118
+	position: absolute;
119
+	bottom: 0;
120
+	width: 100%;
121
+	height: 0;
122
+	color: White;
123
+	z-index: 2;
124
+	overflow: hidden;
125
+}
126
+#yoxview_infoPanel #yoxview_infoPanelBack
127
+{
128
+	position: absolute;
129
+	width: 100%;
130
+	height: 100%;
131
+	z-index: 1;
132
+	left: 0;
133
+	top: 0;
134
+}
135
+#yoxview_infoPanel #yoxview_infoPanelContent
136
+{
137
+	position: absolute;
138
+	width: 100%;
139
+	z-index: 2;
140
+	top: 0;
141
+	left: 0;
142
+}
143
+#yoxview_infoPanel span#yoxview_count
144
+{
145
+	display: block;
146
+	width: 55px;
147
+	font-size: 0.8em;
148
+	float: left;
149
+	text-align: center;
150
+	padding-top: 8px;
151
+	color: #bbb;
152
+}
153
+#yoxview_infoPanel #yoxview_infoText
154
+{
155
+	margin: 0 55px;
156
+	font-size: 12pt;
157
+	padding: 5px 0;
158
+}
159
+#yoxview_infoPanel #yoxview_infoText #yoxview_infoTextDescription
160
+{
161
+	margin-top: 1em;
162
+	font-size: 10pt;
163
+	padding-bottom: 0.5em;
164
+	max-height: 200px;
165
+	overflow: auto;
166
+	padding-right: 10px;
167
+}
168
+#yoxview_infoPanel #yoxview_infoText a, #yoxview .yoxview_error a{ color: #a7d557; text-decoration: none; outline: none; }
169
+#yoxview_infoPanel #yoxview_infoText a:hover, #yoxview .yoxview_error a:hover{ color: #d5eeaa }
170
+#yoxview_infoPanel a.yoxviewInfoLink
171
+{
172
+	display: none;
173
+	opacity: 0.8;
174
+	float: right;
175
+	margin-right: 5px;
176
+	margin-top: 5px;
177
+}
178
+#yoxview_infoPanel a.yoxviewInfoLink:hover{ opacity: 1 }
179
+#yoxview #yoxview_helpPanel
180
+{
181
+	display: none;
182
+	width: 201px;
183
+	height: 312px;
184
+	position: absolute;
185
+	top: 50%;
186
+	left: 50%;
187
+	margin-top: -171px;
188
+	margin-left: -111px;
189
+	z-index: 5;
190
+	color: White;
191
+	padding: 20px;
192
+	padding-top: 10px;
193
+	cursor: pointer;
194
+}
195
+#yoxview #yoxview_helpPanel h1{ font-family: Arial Black, Arial, Sans-Serif; font-size: 1em; }
196
+#yoxview #yoxview_helpPanel p{ margin-top: 80px; }
197
+#yoxview #yoxview_helpPanel span#yoxview_closeHelp{ display: block; position: absolute; bottom: 20px; left: 0; text-align: center; width: 100%; }
198
+#yoxview .yoxview_error
199
+{
200
+	display: block;
201
+	text-align: center;
202
+	color: White;
203
+	font-family: Arial, Sans-Serif;
204
+	font-size: 14pt;
205
+	top: 41%;
206
+	width: 100%;
207
+	height: 20%;
208
+	position: absolute;
209
+	padding: 10px;
210
+}
211
+#yoxview .yoxview_error .errorUrl{ font-size: 10pt; }
212
+#yoxview .yoxview_top{ top: 0; width: 50%; }
213
+#yoxview .yoxview_element{ width: 100%; height: 100%; position: absolute;  border: none; background: #333; }
214
+
215
+.yoxview-thumbnails a
216
+{
217
+	float: left;
218
+	margin: 4px;
219
+	/* For thumbnails opacity: */
220
+	opacity: 0.8;
221
+	filter: alpha(opacity=80);
222
+}
223
+.yoxview-thumbnails a:hover
224
+{
225
+	/* For thumbnails opacity: */
226
+	opacity: 1;
227
+	filter: alpha(opacity=100);
228
+}
229
+.yoxview-thumbnails a img
230
+{ 
231
+	/* Set white borders around the thumbnails, instead of the browser's default Blue: */
232
+	border: solid 1px #ffffff;
233
+}
234
+.yoxview-thumbnails-details{ margin-bottom: 1em; }
235
+.yoxview-thumbnails-details h2{ margin-bottom: 0; padding: 0; font-size: 1.2em; font-weight: bold;}

Loading…
Peruuta
Tallenna