1 | |
---|
2 | function Toggle_bp() { |
---|
3 | cl_visible = !cl_visible; |
---|
4 | if (cl_visible) src = src1; |
---|
5 | else src = src2; |
---|
6 | if (cl_visible) src_info = src3; |
---|
7 | else src_info = src4; |
---|
8 | |
---|
9 | jQuery('#bp_cla').attr('alt', src_info); |
---|
10 | jQuery('#bp_cla').attr('title', src_info); |
---|
11 | |
---|
12 | jQuery('#bp_img_cla').get(0).src = src; |
---|
13 | jQuery('#bp_img_cla').attr('alt', src_info); |
---|
14 | jQuery('#bp_img_cla').attr('title', src_info); |
---|
15 | jQuery('#bp_cla').attr('Stitle', src_info); |
---|
16 | jQuery('#bp_cla').attr('Stip', " "); |
---|
17 | old_w = 0; |
---|
18 | |
---|
19 | jQuery(window).resize(); |
---|
20 | } |
---|
21 | //========================================================= |
---|
22 | /* |
---|
23 | window.onresize = resize; |
---|
24 | window.onload = load; |
---|
25 | |
---|
26 | function resize() { |
---|
27 | alert("resize event detected!"); |
---|
28 | } |
---|
29 | function load() { |
---|
30 | alert("load event detected!"); |
---|
31 | } |
---|
32 | */ |
---|
33 | jQuery(document).ready( |
---|
34 | function (jQuery) { |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | if (DEBUG == "false") { |
---|
40 | jQuery("#Debug").hide(); |
---|
41 | jQuery("#Debug1").hide(); |
---|
42 | jQuery("#Debug2").hide(); |
---|
43 | } |
---|
44 | var img_top = "0"; |
---|
45 | |
---|
46 | var old_h = 0; |
---|
47 | var rapport = -1; |
---|
48 | var old_w = 0; |
---|
49 | |
---|
50 | var llgboframe = jQuery("#gbo div:first"); |
---|
51 | var marges_llgbo = 0; |
---|
52 | if (llgboframe.length > 0) { |
---|
53 | ll1 = jQuery(llgboframe).info(); |
---|
54 | ll2 = jQuery("#gbo div:last").info(); |
---|
55 | marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; |
---|
56 | } |
---|
57 | /* |
---|
58 | * |
---|
59 | */ |
---|
60 | |
---|
61 | |
---|
62 | var img_init = { height: img_height, width: img_width }; // taille initiale |
---|
63 | var img_defaut = { height: scaled_height, width: scaled_width }; |
---|
64 | var img_reelle = { height: img_height, width: img_width }; |
---|
65 | var img_finale = { height: 0, width: 0 }; |
---|
66 | var Zone_Affichage = { height: 0, width: 0 }; |
---|
67 | |
---|
68 | |
---|
69 | //=================================================================== |
---|
70 | |
---|
71 | /* |
---|
72 | * window .resize |
---|
73 | */ |
---|
74 | jQuery(window).resize(function (event, ui) { |
---|
75 | |
---|
76 | if (typeof (event) == 'undefined') return; |
---|
77 | if (!cl_visible == true) return; |
---|
78 | if (eval(user_status + "_enabled") == "") return; |
---|
79 | var chk = eval(user_status + "_enabled"); |
---|
80 | |
---|
81 | |
---|
82 | //========================================================================== |
---|
83 | var Window_width = jQuery(window).width(); |
---|
84 | var Window_height = jQuery(window).height(); |
---|
85 | var winwidth = Window_width; |
---|
86 | var winheight = Window_height; |
---|
87 | if (old_w == winwidth && old_h == winheight) return; |
---|
88 | |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | if (old_w != winwidth) |
---|
93 | { old_w = winwidth; } |
---|
94 | else |
---|
95 | { if (old_h != winheight) old_h = winheight; } |
---|
96 | //=========================================================================== |
---|
97 | |
---|
98 | |
---|
99 | var Type_Img = ""; |
---|
100 | //====== détection du type d'images ====== |
---|
101 | if (jQuery("#charlie").length > 0) { |
---|
102 | Type_Img = "charlie"; |
---|
103 | } else if (jQuery("#pamoorama").length) { |
---|
104 | Type_Img = "pamoorama"; |
---|
105 | } else if (jQuery("#theImage embed").length > 0) { |
---|
106 | Type_Img = "embed"; |
---|
107 | } else if (jQuery("#map").length) { |
---|
108 | Type_Img = "map"; |
---|
109 | } else if (jQuery("#Panorama").length) { |
---|
110 | Type_Img = "panorama"; |
---|
111 | } else if (jQuery("#theImage").find("img").length > 0) { |
---|
112 | Type_Img = "img"; |
---|
113 | } else if (jQuery("img").length > 0) { |
---|
114 | Type_Img = "img_autre"; |
---|
115 | return; |
---|
116 | } else { |
---|
117 | return; |
---|
118 | } |
---|
119 | |
---|
120 | |
---|
121 | |
---|
122 | var Cadre = jQuery("#theImage").get(0); |
---|
123 | var info_Cadre = jQuery(Cadre).info(); |
---|
124 | //=============== Information cadre ====== |
---|
125 | var info_the_page = jQuery("#the_page").info(); |
---|
126 | |
---|
127 | //============================================================================= |
---|
128 | var info_HeaderBar = jQuery("#imageHeaderBar").info(); |
---|
129 | |
---|
130 | var info_content = jQuery("#content").info(); |
---|
131 | |
---|
132 | |
---|
133 | var info_titrePage = jQuery("#titrePage").info(); |
---|
134 | |
---|
135 | |
---|
136 | var Zone_Affichage = jQuery("#theImage").info(); |
---|
137 | |
---|
138 | var info_ToolBar = jQuery("#imageToolBar").info(); |
---|
139 | var info_imageInfoBar = jQuery("#imageInfoBar").info(); |
---|
140 | var info_theHeader = jQuery("#theHeader").info(); |
---|
141 | |
---|
142 | |
---|
143 | var marge = 0; |
---|
144 | if (info_ToolBar.width > 0) |
---|
145 | marge = (Zone_Affichage.width - info_ToolBar.width) / 2; |
---|
146 | |
---|
147 | var marge_right = marge; |
---|
148 | var marge_left = marge; |
---|
149 | |
---|
150 | if (info_content.width > 100) { |
---|
151 | marge_left = 0; |
---|
152 | marge_right = info_imageInfoBar.margin.left + info_imageInfoBar.margin.right; |
---|
153 | winwidth = info_content.width; |
---|
154 | marge_right = info_imageInfoBar.width + marge_right; |
---|
155 | |
---|
156 | } |
---|
157 | else |
---|
158 | winwidth = Zone_Affichage.width; |
---|
159 | |
---|
160 | winwidth -= (marge_right + marge_left); |
---|
161 | |
---|
162 | if (Type_Img == "pamoorama") { |
---|
163 | var myPamoorama = this.myPamoorama; |
---|
164 | //===================================================== |
---|
165 | if (typeof (myPamoorama) == "undefined") { |
---|
166 | return |
---|
167 | } |
---|
168 | |
---|
169 | var h01 = typeof (myPamoorama.imageHeight); |
---|
170 | |
---|
171 | if (h01 == "undefined") { |
---|
172 | old_w = 0; |
---|
173 | old_h = 0; |
---|
174 | return; |
---|
175 | } |
---|
176 | |
---|
177 | //============================================= |
---|
178 | if (myPamoorama.skipInit == false) |
---|
179 | return |
---|
180 | |
---|
181 | |
---|
182 | |
---|
183 | /* |
---|
184 | myPamoorama = new pamoorama('pamoorama',{ activateSlider: {$PANO_ACTIVATESLIDER}, |
---|
185 | width: {$PANO_WIDTH}, |
---|
186 | footercolor: '{$PANO_FOOTERCOLOR}', |
---|
187 | captioncolor: '{$PANO_CAPTIONCOLOR}', |
---|
188 | caption: '{$ALT_IMG}', |
---|
189 | enableAutoscroll: {$PANO_ENABLEAUTOSCROLL}, |
---|
190 | autoscrollSpeed: {$PANO_AUTOSCROLLSPEED}, |
---|
191 | autoscrollOnLoad: {$PANO_AUTOSCROLLONLOAD}, |
---|
192 | startAutoscroll: '{'pamooramics_startAutoscroll'|@translate}', |
---|
193 | stopAutoscroll: '{'pamooramics_stopAutoscroll'|@translate}', |
---|
194 | loadingMessage: '{'pamooramics_loading'|@translate}', |
---|
195 | clickMessage: '{'pamooramics_clickMessage'|@translate}', |
---|
196 | dragMessage: '{'pamooramics_dragMessage'|@translate}' |
---|
197 | }); |
---|
198 | */ |
---|
199 | /* |
---|
200 | pamoorama_outter |
---|
201 | pamoorama_inner |
---|
202 | pamoorama_footer |
---|
203 | pamoorama_caption |
---|
204 | pamoorama_thumb |
---|
205 | pamoorama_frame |
---|
206 | */ |
---|
207 | } else { |
---|
208 | //==== récupère Img la plus grande ===== |
---|
209 | if (jQuery("#theImg")) IMG = "#theImg"; |
---|
210 | else IMG = Cadre; |
---|
211 | |
---|
212 | TheImg2 = Get_Img_Maxi(IMG + " img"); |
---|
213 | //================================================================= |
---|
214 | if (TheImg2 == null) { |
---|
215 | if (jQuery(Cadre).find("img").length > 0) { |
---|
216 | IMG = Cadre; |
---|
217 | TheImg = Get_Img_Maxi("#theImage img"); |
---|
218 | } |
---|
219 | } else { |
---|
220 | TheImg = TheImg2 //luciano ? |
---|
221 | |
---|
222 | } |
---|
223 | } |
---|
224 | //================================================================= |
---|
225 | |
---|
226 | |
---|
227 | switch (Type_Img) { |
---|
228 | case "map": |
---|
229 | var info_image = jQuery("#map").info(); |
---|
230 | |
---|
231 | var info_map = jQuery("#mapPicture").info(); |
---|
232 | |
---|
233 | marge_left = info_map.width; |
---|
234 | jQuery("#map").css("left", marge_left); |
---|
235 | |
---|
236 | var TheImg = jQuery("#map").get(0); |
---|
237 | img_reelle.height = info_image.height; |
---|
238 | img_reelle.width = winwidth - marge_right - marge_right; |
---|
239 | Bandeau_bas.height = 10; |
---|
240 | marge_right = 10; |
---|
241 | |
---|
242 | info_the_page = jQuery("#the_page").info(); |
---|
243 | ; |
---|
244 | |
---|
245 | break |
---|
246 | |
---|
247 | |
---|
248 | case "panorama": |
---|
249 | // return; |
---|
250 | |
---|
251 | |
---|
252 | TheImg = Get_Img_Maxi("#Panorama img"); |
---|
253 | info_theImage = jQuery(TheImg).info(); |
---|
254 | info_the_page = jQuery("#the_page").info(); |
---|
255 | |
---|
256 | break |
---|
257 | case "img": |
---|
258 | |
---|
259 | if (!TheImg) return; |
---|
260 | if (theme.match(RegExp("luciano", "g"))) { |
---|
261 | TheImg = jQuery("#the_page #theImg"); |
---|
262 | } |
---|
263 | info_theImage = jQuery(TheImg).info(); |
---|
264 | info_the_page = jQuery("#the_page").info(); |
---|
265 | |
---|
266 | |
---|
267 | break |
---|
268 | case "img_autre": |
---|
269 | if (!TheImg) return; |
---|
270 | info_theImage = jQuery(TheImg).info(); |
---|
271 | info_the_page = jQuery("#the_page").info(); |
---|
272 | |
---|
273 | |
---|
274 | break |
---|
275 | case "embed": |
---|
276 | // |
---|
277 | |
---|
278 | TheImg = jQuery(Cadre).find("embed"); |
---|
279 | |
---|
280 | info_theImage = jQuery(Cadre).info(); |
---|
281 | info_the_page = jQuery("#the_page").info(); |
---|
282 | if (rapport < 0) { |
---|
283 | img_height = parseInt(jQuery(TheImg).outerHeight()); |
---|
284 | img_width = parseInt(jQuery(TheImg).outerWidth()); |
---|
285 | |
---|
286 | img_reelle.height = img_height; |
---|
287 | img_reelle.width = img_width; |
---|
288 | |
---|
289 | } |
---|
290 | |
---|
291 | break |
---|
292 | case "charlie": |
---|
293 | |
---|
294 | TheImg = jQuery('#charlie object').get(0); |
---|
295 | info_theImage = jQuery(Cadre).info(); |
---|
296 | info_the_page = jQuery("#the_page").info(); |
---|
297 | if (rapport < 0) { |
---|
298 | img_height = parseInt(TheImg.height); |
---|
299 | img_width = parseInt(TheImg.width); |
---|
300 | |
---|
301 | img_reelle.height = parseInt(TheImg.height); |
---|
302 | img_reelle.width = parseInt(TheImg.width); |
---|
303 | } |
---|
304 | |
---|
305 | break |
---|
306 | case "pamoorama": |
---|
307 | //========================================================= |
---|
308 | |
---|
309 | var info_pamoorama = jQuery("#pamoorama").info(); |
---|
310 | var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
---|
311 | var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); |
---|
312 | var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); |
---|
313 | TheImg = jQuery("#pamoorama"); |
---|
314 | |
---|
315 | if (info_pamoorama_outter.height == 0) { |
---|
316 | old_h = 0; |
---|
317 | jQuery(window).resize(); |
---|
318 | return |
---|
319 | } |
---|
320 | // event = window.event ? window.event : event; |
---|
321 | ; |
---|
322 | // jQuery("#pamoorama_outter").trigger(jQuery.browser.msie ? "propertychange" : "change", [event]); |
---|
323 | // |
---|
324 | // jQuery("#pamoorama_outter").trigger("onPropertychange", [event]); |
---|
325 | |
---|
326 | img_reelle.height = myPamoorama.imageHeight; |
---|
327 | img_reelle.width = myPamoorama.imageWidth; |
---|
328 | TheImg = myPamoorama.image; |
---|
329 | info_theImage = jQuery("#pamoorama").info(); |
---|
330 | info_the_page = jQuery("#the_page").info(); |
---|
331 | |
---|
332 | break |
---|
333 | |
---|
334 | |
---|
335 | } |
---|
336 | |
---|
337 | //=============== Vérification taille minimale autorizée ====================== |
---|
338 | var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); |
---|
339 | miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); |
---|
340 | |
---|
341 | |
---|
342 | var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); |
---|
343 | maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); |
---|
344 | |
---|
345 | mini_width = parseInt(miniWidth); |
---|
346 | mini_height = parseInt(miniHeight); |
---|
347 | |
---|
348 | img_reelle.width = parseInt(img_reelle.width); |
---|
349 | |
---|
350 | |
---|
351 | if (img_reelle.width < mini_width) return; |
---|
352 | |
---|
353 | img_reelle.height = parseInt(img_reelle.height); |
---|
354 | if (img_reelle.height < parseInt(mini_height)) return; |
---|
355 | //================================================================================== |
---|
356 | if (rapport < 0) { |
---|
357 | |
---|
358 | img_init.height = parseInt(img_height); |
---|
359 | img_init.width = parseInt(img_width); |
---|
360 | |
---|
361 | rapport = img_width / img_height; |
---|
362 | |
---|
363 | if (Type_Img != "map") |
---|
364 | rapport = (img_init.width / img_init.height); |
---|
365 | else |
---|
366 | rapport = 0; |
---|
367 | |
---|
368 | } |
---|
369 | |
---|
370 | |
---|
371 | //=============== Zone d'affichage ============================ |
---|
372 | |
---|
373 | borderW = Zone_Affichage.borderwidth.left; |
---|
374 | borderW += Zone_Affichage.borderwidth.right; |
---|
375 | |
---|
376 | |
---|
377 | Zone_Affichage.width = winwidth - borderW; |
---|
378 | |
---|
379 | |
---|
380 | |
---|
381 | var Licence = jQuery(".licencetag"); |
---|
382 | info_Licence = jQuery(".licencetag").info(); |
---|
383 | |
---|
384 | jQuery("#theImage #theImg IMG").css("marginTop", "0px") |
---|
385 | //========== Correction en fonction du thème ============================= |
---|
386 | var correction = 0; |
---|
387 | if (theme.match(RegExp("sobre", "g"))) { |
---|
388 | |
---|
389 | correction = -info_Licence.padding.top; |
---|
390 | |
---|
391 | } else if (theme.match(RegExp("Pure", "g"))) { |
---|
392 | correction += 0; //?? |
---|
393 | } else if (theme.match(RegExp("luciano", "g"))) { |
---|
394 | correction = 0; //?? |
---|
395 | |
---|
396 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
397 | correction += 0; //?? |
---|
398 | } else if (theme.match(RegExp("gally", "g"))) { |
---|
399 | correction += 0; //?? |
---|
400 | |
---|
401 | } |
---|
402 | //================ Licence ======================== |
---|
403 | |
---|
404 | if (Licence.length > 0) { |
---|
405 | jQuery(".licencetag").css("padding", "0px"); |
---|
406 | |
---|
407 | } |
---|
408 | //==================================================== |
---|
409 | info_img = jQuery(TheImg).info(); |
---|
410 | |
---|
411 | |
---|
412 | |
---|
413 | img_top = Bandeau; |
---|
414 | |
---|
415 | Marge_Basse = parseInt(marge_basse || 0); // hors bandeau |
---|
416 | //========================================================================== |
---|
417 | h = 0; |
---|
418 | Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction; |
---|
419 | var Image_height = Zone_Affichage.height - Bandeau_bas.height - Bandeau_bas.marge.top - Bandeau_bas.marge.bottom; |
---|
420 | |
---|
421 | //============================================================= |
---|
422 | var height_user = eval(user_status + "_height"); |
---|
423 | var reg1 = new RegExp("%", "g"); |
---|
424 | if (height_user.match(reg1)) |
---|
425 | Image_height = Image_height * parseInt(height_user) / 100; |
---|
426 | else |
---|
427 | Image_height = parseInt(height_user); |
---|
428 | |
---|
429 | echelle_max = parseFloat(echelle_max, '3'); |
---|
430 | var echelle = parseFloat(Image_height / img_reelle.height, 3); |
---|
431 | |
---|
432 | if (echelle > echelle_max) { echelle = echelle_max; } |
---|
433 | Image_height = parseInt(img_reelle.height * echelle); |
---|
434 | //============================================================ |
---|
435 | |
---|
436 | var Image_width; |
---|
437 | if (rapport > 0) |
---|
438 | Image_width = parseInt(Image_height * rapport); |
---|
439 | else if (Type_Img == "map") { |
---|
440 | Image_width = Zone_Affichage.width - marge_left - marge_right; |
---|
441 | } else { |
---|
442 | Image_width = Zone_Affichage.width; |
---|
443 | } |
---|
444 | |
---|
445 | //=============================================================== |
---|
446 | align_auto = "center"; |
---|
447 | if (jQuery("#theImg").css("textAlign")) |
---|
448 | align_auto = jQuery("#theImg").css("textAlign"); |
---|
449 | var widthmin = winwidth; |
---|
450 | |
---|
451 | if (check_auto_w == 'checked="checked"' || Type_Img == "pamoorama") { |
---|
452 | // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { |
---|
453 | //==== largeur à atteindre === |
---|
454 | var width_user = eval(user_status + "_width"); |
---|
455 | // Largeur maximale en fonction du statut |
---|
456 | if (width_user.match(reg1)) |
---|
457 | // pourcentage |
---|
458 | widthmin = widthmin * parseInt(width_user) / 100; |
---|
459 | else |
---|
460 | widthmin = parseInt(width_user); |
---|
461 | var marges = marges_llgbo; |
---|
462 | widthmin -= info_img.borderwidth.left; |
---|
463 | widthmin -= info_img.borderwidth.right; |
---|
464 | |
---|
465 | widthmin -= marges; |
---|
466 | if (Image_width > widthmin) { |
---|
467 | // Image_width largeur à atteindre |
---|
468 | // Calcul du rapport d'agrandissement |
---|
469 | var echelle_w = parseFloat((widthmin) / img_reelle.width, 3); |
---|
470 | if (echelle_w > echelle_max) { echelle_w = echelle_max; } |
---|
471 | Image_width = parseInt(img_reelle.width * echelle_w); |
---|
472 | if (Type_Img != "pamoorama") { |
---|
473 | if (rapport > 0) |
---|
474 | Image_height = parseInt(Image_width / rapport); |
---|
475 | } |
---|
476 | } |
---|
477 | |
---|
478 | |
---|
479 | |
---|
480 | } |
---|
481 | |
---|
482 | |
---|
483 | // } |
---|
484 | //=================================================== |
---|
485 | |
---|
486 | |
---|
487 | |
---|
488 | zoom = echelle; |
---|
489 | //=============LLGBO2 =========================== |
---|
490 | |
---|
491 | |
---|
492 | if (marges_llgbo > 0) { |
---|
493 | |
---|
494 | t1 = jQuery(llgboframe).info(); |
---|
495 | if (!TheImg.src) { |
---|
496 | TheImg = jQuery(TheImg).find("img").get(0) |
---|
497 | } |
---|
498 | if (TheImg.src) { |
---|
499 | |
---|
500 | Image_width -= marges_llgbo; // réduction frame |
---|
501 | Image_height -= marges_llgbo; // réduction frame |
---|
502 | if (rapport > 1) { |
---|
503 | if (Image_width > winwidth) { |
---|
504 | jQuery("#gbo").outerWidth(winwidth); |
---|
505 | jQuery("#gbo").css("width", winwidth + "px"); |
---|
506 | } |
---|
507 | else { |
---|
508 | jQuery("#gbo").outerWidth(Image_width); |
---|
509 | jQuery("#gbo").css("width", Image_width + "px"); |
---|
510 | } |
---|
511 | |
---|
512 | t1 = jQuery("#gbo div:last").info(); |
---|
513 | |
---|
514 | Image_width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); |
---|
515 | Image_height = parseInt(Image_width / rapport); |
---|
516 | |
---|
517 | jQuery("#gbo").outerHeight(Image_height + marges_llgbo); |
---|
518 | jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); |
---|
519 | if (jQuery.browser.msie) { |
---|
520 | jQuery("#gbo").css("paddingBottom", 17 + "px"); |
---|
521 | } |
---|
522 | |
---|
523 | } else { |
---|
524 | Image_height -= 4; |
---|
525 | Image_width -= 4; |
---|
526 | if (Image_width > winwidth) { |
---|
527 | jQuery("#gbo").outerWidth(winwidth); |
---|
528 | jQuery("#gbo").css("width", winwidth + "px"); |
---|
529 | } |
---|
530 | else { |
---|
531 | jQuery("#gbo").outerWidth(Image_width); |
---|
532 | jQuery("#gbo").css("width", Image_width + "px"); |
---|
533 | } |
---|
534 | |
---|
535 | jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); |
---|
536 | jQuery("#gbo").height(Image_height + marges_llgbo); |
---|
537 | |
---|
538 | jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); |
---|
539 | jQuery("#gbo").width(Image_width + marges_llgbo); |
---|
540 | |
---|
541 | |
---|
542 | |
---|
543 | if (jQuery.browser.msie) { |
---|
544 | jQuery("#gbo").css("paddingBottom", 17 + "px"); |
---|
545 | } |
---|
546 | |
---|
547 | } |
---|
548 | // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); |
---|
549 | a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); |
---|
550 | a1 = jQuery("area[rel=prev]"); |
---|
551 | a2 = jQuery("area[rel=next]"); |
---|
552 | a3 = jQuery("area[rel=up]"); |
---|
553 | nb_zone = 3; |
---|
554 | if (a1.length == 0) { |
---|
555 | nb_zone -= 1; |
---|
556 | } |
---|
557 | if (a2.length == 0) { |
---|
558 | nb_zone -= 1; |
---|
559 | } |
---|
560 | |
---|
561 | |
---|
562 | var Largeur_zone = (Image_width / nb_zone); |
---|
563 | var Hauteur_zone = (Image_height); |
---|
564 | var init_zone = 0; |
---|
565 | |
---|
566 | if (a1.length > 0) { |
---|
567 | coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone }; |
---|
568 | |
---|
569 | jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
570 | init_zone += Largeur_zone; |
---|
571 | } |
---|
572 | |
---|
573 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height }; |
---|
574 | |
---|
575 | if (a0.length > 0) { |
---|
576 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" }); |
---|
577 | jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
578 | } else { |
---|
579 | jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" }); |
---|
580 | } |
---|
581 | init_zone += Largeur_zone; |
---|
582 | |
---|
583 | if (a2.length > 0) { |
---|
584 | coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height }; |
---|
585 | jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); |
---|
586 | } |
---|
587 | } |
---|
588 | } |
---|
589 | |
---|
590 | //================ Zone affichage ========================= |
---|
591 | // Image_height, Image_width = valeur a atteindre. |
---|
592 | if (theme.match(RegExp("luciano", "g"))) { |
---|
593 | //---- information en dehors du cadre |
---|
594 | Zone_Affichage.height -= Bandeau_bas.height; |
---|
595 | jQuery(Cadre).height(Zone_Affichage.height); |
---|
596 | |
---|
597 | } |
---|
598 | |
---|
599 | //========================================================= |
---|
600 | |
---|
601 | // jQuery(Cadre).css("top", "0px"); |
---|
602 | jQuery("#standard").css("top", 0 + "px"); |
---|
603 | jQuery("#comments").css("top", 0 + "px"); |
---|
604 | |
---|
605 | |
---|
606 | jQuery(Cadre).width(Zone_Affichage.width); |
---|
607 | |
---|
608 | //============================================================== |
---|
609 | |
---|
610 | img_finale.height = Image_height; |
---|
611 | img_finale.width = Image_width; |
---|
612 | |
---|
613 | //========================================================================= |
---|
614 | |
---|
615 | |
---|
616 | if (typeof (gmaps) != "undefined") { |
---|
617 | Gmap_ = gmaps.maps[0]; |
---|
618 | if (Gmap_.sizeMode == 'A') { |
---|
619 | jQuery("#iGMapsIcon").css({ width: Window_width * gmaps.popupAutomaticSize + "px", height: Window_height * gmaps.popupAutomaticSize + "px" }); |
---|
620 | } |
---|
621 | } |
---|
622 | //============================================================== |
---|
623 | if (Type_Img == "charlie") { |
---|
624 | t1 = jQuery("#charlie").info(); |
---|
625 | /**/ |
---|
626 | pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); |
---|
627 | jQuery("#charlie").css({ |
---|
628 | width: Image_width + pdf, |
---|
629 | height: Image_height, |
---|
630 | margin: "auto" |
---|
631 | }); |
---|
632 | |
---|
633 | |
---|
634 | jQuery("#player").css("width", Image_width + 100 + "px"); |
---|
635 | jQuery("#player").css("height", Image_height); |
---|
636 | |
---|
637 | jQuery("#embedplayer").css("width", Image_width); |
---|
638 | jQuery("#embedplayer").css("height", Image_height); |
---|
639 | |
---|
640 | |
---|
641 | jQuery("object").width(Image_width); |
---|
642 | jQuery("object").height(Image_height); |
---|
643 | } else if (Type_Img == "panorama") { |
---|
644 | |
---|
645 | // ----- jQuery(TheImg).panorama2(img_finale.height, img_finale.width); |
---|
646 | // jQuery(TheImg).height(img_finale.height); |
---|
647 | // jQuery(TheImg).width(img_finale.width); |
---|
648 | jQuery("#Panorama div").height(Image_height); |
---|
649 | // class=simple_panorama |
---|
650 | |
---|
651 | jQuery(".panorama-viewport").css("left", "2px"); |
---|
652 | jQuery(".panorama-viewport").css("width", "auto"); |
---|
653 | // setTimeout("cl_Timer()", 500); |
---|
654 | |
---|
655 | } else if (Type_Img == "pamoorama") { |
---|
656 | |
---|
657 | img_height = myPamoorama.imageHeight |
---|
658 | |
---|
659 | |
---|
660 | new_width = Zone_Affichage.width; |
---|
661 | new_width -= 4; |
---|
662 | jQuery("#pamoorama").css({ marginLeft: "auto", |
---|
663 | marginRight: "auto", |
---|
664 | |
---|
665 | height: Image_height + info_pamoorama_footer.height + "px", |
---|
666 | width: new_width + "px" |
---|
667 | }); |
---|
668 | |
---|
669 | myPamoorama.options.width = new_width; |
---|
670 | jQuery("#pamoorama").width(new_width); |
---|
671 | |
---|
672 | |
---|
673 | |
---|
674 | |
---|
675 | jQuery("#pamoorama_outter").css({ |
---|
676 | left: marge_left + "px", |
---|
677 | height: myPamoorama.imageHeight + "px", |
---|
678 | width: (new_width) + "px" |
---|
679 | }); |
---|
680 | jQuery("#pamoorama_outter").width(new_width); |
---|
681 | h = info_theImage.height; |
---|
682 | jQuery("#pamoorama").css({ height: h + "px" }); |
---|
683 | |
---|
684 | jQuery("#pamoorama_footer").width(new_width); |
---|
685 | jQuery("#pamoorama_footer").css('width', new_width + "px"); |
---|
686 | |
---|
687 | jQuery("#linkNext").css({ width: "200px", overflow: "hidden" }); |
---|
688 | jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" }); |
---|
689 | zoom = Image_height / img_height; |
---|
690 | |
---|
691 | |
---|
692 | |
---|
693 | |
---|
694 | } else if (TheImg.src) { |
---|
695 | //--- background ?? --- |
---|
696 | jQuery(TheImg).height(img_finale.height); |
---|
697 | jQuery(TheImg).width(img_finale.width); |
---|
698 | jQuery(TheImg).css("height", img_finale.height + "px"); |
---|
699 | jQuery(TheImg).css("width", img_finale.width + "px"); |
---|
700 | |
---|
701 | } else { |
---|
702 | //===map ? === |
---|
703 | jQuery(TheImg).height(img_finale.height); |
---|
704 | jQuery(TheImg).width(img_finale.width); |
---|
705 | jQuery(TheImg).css("height", img_finale.height + "px"); |
---|
706 | jQuery(TheImg).css("width", img_finale.width + "px"); |
---|
707 | |
---|
708 | } |
---|
709 | |
---|
710 | /* |
---|
711 | jQuery("#Debug1").css({ |
---|
712 | position: "absolute", |
---|
713 | top: Bandeau + "px", |
---|
714 | textAlign: align_auto, |
---|
715 | margin: "0px auto", |
---|
716 | |
---|
717 | |
---|
718 | border: "solid 1px red", |
---|
719 | |
---|
720 | width: Image_width + "px", |
---|
721 | height: Image_height + "px" |
---|
722 | |
---|
723 | }); |
---|
724 | //=================================================== |
---|
725 | jQuery("#Debug2").css({ position: "absolute", |
---|
726 | left: Zone_Affichage.left + 'px', |
---|
727 | border: "solid 1px green", |
---|
728 | top: Zone_Affichage.top + "px", |
---|
729 | width: Zone_Affichage.width / 2 + "px", |
---|
730 | height: Zone_Affichage.height + "px" |
---|
731 | |
---|
732 | }); |
---|
733 | jQuery("#Debug2").text(info_Cadre.bottom); |
---|
734 | */ |
---|
735 | |
---|
736 | try { |
---|
737 | if (theme.match(RegExp("gally", "g"))) { |
---|
738 | |
---|
739 | //=========================================================================== |
---|
740 | |
---|
741 | if (jQuery("#navThumbPrev").length > 0) { |
---|
742 | jQuery("#navThumbPrev").css({ height: info_img.height + "px", |
---|
743 | top: info_img.top |
---|
744 | }); |
---|
745 | } |
---|
746 | if (jQuery("#navThumbNext").length > 0) { |
---|
747 | jQuery("#navThumbNext").css({ height: info_img.height + "px", |
---|
748 | top: info_img.top |
---|
749 | }); |
---|
750 | } |
---|
751 | if (!theme.match(RegExp("lapis", "gi"))) { } |
---|
752 | } else if (theme.match(RegExp("simple", "g"))) { |
---|
753 | |
---|
754 | jQuery("#imageToolBar").css("position", "static"); |
---|
755 | info_imageInfoBar = jQuery("#imageInfoBar").info(); |
---|
756 | info_theImage = jQuery("#theImage").info(); |
---|
757 | Maxi_b = info_theImage.bottom - info_imageInfoBar.top |
---|
758 | if (info_imageInfoBar.bottom < info_theImage.bottom) { |
---|
759 | jQuery("#imageInfoBar").height(info_theImage.height); |
---|
760 | jQuery("#imageInfoBar").css("height", info_theImage.height + "px"); |
---|
761 | } |
---|
762 | |
---|
763 | } else { |
---|
764 | |
---|
765 | // jQuery("#imageToolBar").css("position", "static"); |
---|
766 | } |
---|
767 | } catch (e) { |
---|
768 | |
---|
769 | } |
---|
770 | // |
---|
771 | if (!pos) pos = jQuery("#copyright").info(); |
---|
772 | if (pos != jQuery("#copyright").info()) |
---|
773 | pos = jQuery("#copyright").info(); |
---|
774 | if (pos.top > 100) jQuery("#the_page").height(pos.top); |
---|
775 | |
---|
776 | if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; |
---|
777 | |
---|
778 | |
---|
779 | return; |
---|
780 | }); // fin resize |
---|
781 | var pos; |
---|
782 | //================================================ |
---|
783 | function Info_entete(Parent) { |
---|
784 | |
---|
785 | var info_imageToolBar = jQuery("#imageToolBar").info(); |
---|
786 | if (info_imageToolBar.position == "absolute") { |
---|
787 | jQuery("#imageToolBar").css("position", "relative"); |
---|
788 | jQuery("#imageToolBar").css("top", 0 + "px"); |
---|
789 | } |
---|
790 | |
---|
791 | var info_theImage = jQuery("#theImage").info(); |
---|
792 | |
---|
793 | if (info_theImage.position == "relative") { |
---|
794 | //--- passage relative ==> static ===/ |
---|
795 | jQuery("#theImage").css("position", "static"); |
---|
796 | info_theImage = jQuery("#theImage").info(); |
---|
797 | |
---|
798 | } |
---|
799 | if (info_theImage.position == "absolute") { |
---|
800 | //--- passage absolute ==> static ===/ |
---|
801 | jQuery("#theImage").css("position", "static"); |
---|
802 | info_theImage = jQuery("#theImage").info(); |
---|
803 | |
---|
804 | } |
---|
805 | |
---|
806 | marge_top = Info_the_page.top + |
---|
807 | Info_the_page.borderwidth.top + |
---|
808 | info_theImage.borderwidth.top; |
---|
809 | |
---|
810 | img_top = info_theImage.top + info_theImage.borderwidth.top; |
---|
811 | return { marge_top: marge_top, img_top: img_top }; |
---|
812 | |
---|
813 | } |
---|
814 | |
---|
815 | /* Récupère les informations sur la description. |
---|
816 | * |
---|
817 | */ |
---|
818 | function Info_description(Parent) { |
---|
819 | // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); |
---|
820 | //============================================================================= |
---|
821 | var info_description = { top: 0, bottom: 0, height: 0 }; |
---|
822 | if (theme.match(RegExp("simple", "gi"))) { |
---|
823 | jQuery("#" + Parent).css({ padding: "0px", |
---|
824 | marginLeft: "0px", |
---|
825 | marginRight: "auto", |
---|
826 | marginTop: "0px", |
---|
827 | marginBottom: "0px", position: "absolute", top: Bandeau + "px" |
---|
828 | }); |
---|
829 | } else { |
---|
830 | |
---|
831 | jQuery("#" + Parent).css({ padding: "0px", |
---|
832 | marginLeft: "auto", |
---|
833 | marginRight: "auto", |
---|
834 | marginTop: "0px", |
---|
835 | marginBottom: "0px" |
---|
836 | }); |
---|
837 | |
---|
838 | |
---|
839 | } |
---|
840 | |
---|
841 | |
---|
842 | // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); |
---|
843 | |
---|
844 | |
---|
845 | if (theme.match(RegExp("luciano", "g"))) { |
---|
846 | info_img = jQuery("#" + Parent + " #theImg img").info(); |
---|
847 | |
---|
848 | } else { |
---|
849 | |
---|
850 | info_img = jQuery("#" + Parent + " img").info(); |
---|
851 | } |
---|
852 | |
---|
853 | info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, |
---|
854 | top: info_img.padding.top + info_img.borderwidth.top |
---|
855 | } |
---|
856 | |
---|
857 | info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom; |
---|
858 | //============================================================================= |
---|
859 | info_gbo = jQuery("#gbo").info(); |
---|
860 | if (info_description.top < info_gbo.bottom) |
---|
861 | info_description.top = info_gbo.bottom; |
---|
862 | //============================================================================= |
---|
863 | info_desc = jQuery("#" + Parent + " p:first").info(); |
---|
864 | if (info_desc.bottom < info_img.bottom) |
---|
865 | info_desc.bottom = info_img.bottom; |
---|
866 | |
---|
867 | // if (info_desc.top > info_img.bottom) |
---|
868 | // info_description.top = info_desc.top; |
---|
869 | |
---|
870 | if (jQuery("#Panorama").length) { |
---|
871 | Type_Img = "panorama"; |
---|
872 | // cl_visible = false; |
---|
873 | |
---|
874 | } |
---|
875 | info_table = jQuery(".infoTable").info(); |
---|
876 | |
---|
877 | if (info_table.top > info_description.bottom) |
---|
878 | info_description.bottom = info_table.top; |
---|
879 | //=========================================================================== |
---|
880 | |
---|
881 | info_licencetag = jQuery(".licencetag").info(); |
---|
882 | |
---|
883 | |
---|
884 | if (info_licencetag.bottom > 0) { |
---|
885 | jQuery(".licencetag").css("border", "solid 5px transparent"); |
---|
886 | if (info_licencetag.bottom > info_description.bottom) { |
---|
887 | info_description.bottom = info_licencetag.bottom; |
---|
888 | } |
---|
889 | else |
---|
890 | info_description.bottom += info_table.margin.top + info_table.padding.top; |
---|
891 | |
---|
892 | } |
---|
893 | //============================================================================= |
---|
894 | if (theme.match(RegExp("gally", "gi"))) { |
---|
895 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
896 | info_description.bottom = info_description.bottom |
---|
897 | } |
---|
898 | } |
---|
899 | |
---|
900 | |
---|
901 | |
---|
902 | |
---|
903 | |
---|
904 | if (info_description.top < 1) |
---|
905 | info_description.top = info_description.bottom; |
---|
906 | |
---|
907 | |
---|
908 | if (info_description.bottom < info_description.top) { |
---|
909 | info_description.bottom = info_description.top; |
---|
910 | |
---|
911 | info_desc = jQuery("#" + Parent + " p:last").info(); |
---|
912 | |
---|
913 | if (info_desc.bottom > info_img.bottom) |
---|
914 | info_description.bottom = info_desc.bottom; |
---|
915 | } |
---|
916 | |
---|
917 | |
---|
918 | if (theme.match(RegExp("gally", "g"))) { |
---|
919 | if (!theme.match(RegExp("lapis", "gi"))) { |
---|
920 | info_copyright = jQuery("#copyright").info(); |
---|
921 | info_description.bottom += info_copyright.height; |
---|
922 | } |
---|
923 | } |
---|
924 | |
---|
925 | if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 } |
---|
926 | |
---|
927 | info_description.height = info_description.bottom - info_description.top; |
---|
928 | |
---|
929 | |
---|
930 | if (DEBUG == "true") { |
---|
931 | |
---|
932 | /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); |
---|
933 | |
---|
934 | |
---|
935 | info_description.width = "800"; |
---|
936 | */ |
---|
937 | jQuery("#Debug").css('display', 'block'); |
---|
938 | jQuery("#Debug1").show(); |
---|
939 | jQuery("#Debug2").show(); |
---|
940 | Bandeau_bas = info_description; |
---|
941 | |
---|
942 | jQuery("#Debug").css({ |
---|
943 | opacity: "0.50", |
---|
944 | filter: 'alpha(opacity:50)', |
---|
945 | position: "absolute", |
---|
946 | width: "800px", |
---|
947 | border: "solid 1px green", |
---|
948 | top: Bandeau + "px" |
---|
949 | }); |
---|
950 | jQuery("#Debug").text("Debug:Bandeau : " + Bandeau); |
---|
951 | |
---|
952 | jQuery("#Debug1").css({ opacity: "0.50", |
---|
953 | filter: 'alpha(opacity:50)', |
---|
954 | position: "absolute", |
---|
955 | border: "solid 1px green", |
---|
956 | top: Bandeau_bas.top + "px", |
---|
957 | width: (200) + "px", |
---|
958 | height: Bandeau_bas.height + "px" |
---|
959 | }); |
---|
960 | |
---|
961 | // jQuery("#Debug1").text(jQuery("#Debug1").text()+"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height); |
---|
962 | |
---|
963 | jQuery("#Debug2").css({ opacity: "0.50", |
---|
964 | filter: 'alpha(opacity:50)', |
---|
965 | position: "absolute", |
---|
966 | left: '50px', |
---|
967 | width: (300) + "px", |
---|
968 | border: "solid 1px green", top: Bandeau_bas.bottom + "px" |
---|
969 | }); |
---|
970 | jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom); |
---|
971 | |
---|
972 | } |
---|
973 | |
---|
974 | if (check_desc_v != 'checked="checked"') { |
---|
975 | info_description.height = 0; |
---|
976 | } |
---|
977 | |
---|
978 | return info_description; |
---|
979 | |
---|
980 | } |
---|
981 | //================================================================================== |
---|
982 | |
---|
983 | //======== jQuery(window).resize();=========================================================== |
---|
984 | |
---|
985 | /* |
---|
986 | * recherche la plus grande image (hauteur ou largeur) |
---|
987 | */ |
---|
988 | |
---|
989 | |
---|
990 | function Get_Img_Maxi(myobj) { |
---|
991 | var w00 = 0; |
---|
992 | var TheImg = null; |
---|
993 | jQuery(myobj).each(function (i) { |
---|
994 | w0 = img_reelle.width; |
---|
995 | h0 = img_reelle.height; |
---|
996 | if (h0 > w0) w0 = h0; |
---|
997 | if (w0 > w00) { |
---|
998 | if (!this.src.match(RegExp(".png", "g"))) |
---|
999 | if (!this.src.match(RegExp(thumbnail, "g"))) { |
---|
1000 | TheImg = this; |
---|
1001 | w00 = w0; |
---|
1002 | } |
---|
1003 | |
---|
1004 | } |
---|
1005 | }); |
---|
1006 | return TheImg; |
---|
1007 | } |
---|
1008 | |
---|
1009 | jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' }); |
---|
1010 | |
---|
1011 | var Bandeau = 0; |
---|
1012 | var Info_the_page = jQuery("#the_page").info(); |
---|
1013 | var Zone_Affichage = jQuery("#theImage").info(); |
---|
1014 | var Bandeau_t = Info_entete("theImage"); |
---|
1015 | var Bandeau_bas = 0; |
---|
1016 | |
---|
1017 | //==================================================================================== |
---|
1018 | jQuery(window).load(function () { |
---|
1019 | |
---|
1020 | |
---|
1021 | |
---|
1022 | Info_the_page = jQuery("#the_page").info(); |
---|
1023 | Zone_Affichage = jQuery("#theImage").info(); |
---|
1024 | Bandeau_t = Info_entete("theImage") |
---|
1025 | Bandeau = Bandeau_t.img_top; |
---|
1026 | Bandeau_bas = Info_description("theImage"); |
---|
1027 | setTimeout('wait_Timer()', 10); |
---|
1028 | }); |
---|
1029 | //==================================================================================== |
---|
1030 | |
---|
1031 | } // function |
---|
1032 | ); |
---|
1033 | |
---|
1034 | //============================================================= |
---|
1035 | function cl_Timer() { |
---|
1036 | // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } |
---|
1037 | if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) |
---|
1038 | alert(jQuery.browser.version); |
---|
1039 | panoramaContainer = jQuery(".panorama-container"); |
---|
1040 | n = document.scripts[6]; //12--14affiche_script ; |
---|
1041 | t = n.src; |
---|
1042 | |
---|
1043 | currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left')); |
---|
1044 | if (currentPosition == NaN) return; |
---|
1045 | |
---|
1046 | |
---|
1047 | if (currentPosition > 1000) |
---|
1048 | jQuery(panoramaContainer).css('margin-left', "0px") |
---|
1049 | setTimeout("cl_Timer()", 500); |
---|
1050 | } |
---|
1051 | |
---|
1052 | |
---|
1053 | //============================================================ |
---|
1054 | jQuery("#iGMapsIcon").bind('resize', function () { |
---|
1055 | jQuery().recentrage_widget(); |
---|
1056 | }) |
---|
1057 | jQuery("#icon_gmaps").bind('click', function () { |
---|
1058 | jQuery().recentrage_widget(); |
---|
1059 | }) |
---|
1060 | |
---|
1061 | |
---|
1062 | //============================================================= |
---|
1063 | //frame.injectInside |
---|
1064 | function onPropertyChange(e) { |
---|
1065 | |
---|
1066 | var el = e.srcElement; |
---|
1067 | if (e.srcElement == null) return |
---|
1068 | ID = el.id; |
---|
1069 | if (jQuery.browser.msie) |
---|
1070 | PropertyName = window.event.propertyName; |
---|
1071 | else |
---|
1072 | PropertyName = window.evt.propertyName; |
---|
1073 | |
---|
1074 | if (!PropertyName) return; |
---|
1075 | Prop = PropertyName.split("."); |
---|
1076 | |
---|
1077 | Valeur = ""; |
---|
1078 | Property = Prop[1]; |
---|
1079 | if (typeof (Property) != "undefined") { |
---|
1080 | Valeur = parseInt(el.currentStyle[Property]); |
---|
1081 | } else { |
---|
1082 | Property = Prop[0]; |
---|
1083 | } |
---|
1084 | if (DEBUG == "true") { |
---|
1085 | |
---|
1086 | if (typeof (message) == "undefined") message = jQuery("#Debug1").text(); |
---|
1087 | |
---|
1088 | jQuery("#Debug1").css({ |
---|
1089 | filter: 'alpha(opacity:60)', |
---|
1090 | opacity: 0.8, |
---|
1091 | position: "absolute", |
---|
1092 | border: "solid 1px green", |
---|
1093 | top: 100 + "px", |
---|
1094 | width: "auto", |
---|
1095 | height: 400 + "px" |
---|
1096 | }); |
---|
1097 | if (ID != "pamoorama") { |
---|
1098 | message += "onPropertyChange : " + ID + " : " + Property + " : " + Valeur + "\n"; |
---|
1099 | jQuery("#Debug1").text(message); |
---|
1100 | } |
---|
1101 | |
---|
1102 | if (Valeur == "block") { |
---|
1103 | |
---|
1104 | |
---|
1105 | } |
---|
1106 | } |
---|
1107 | return; |
---|
1108 | } |
---|
1109 | //==================================================================== // ready |
---|
1110 | /* |
---|
1111 | * |
---|
1112 | */ |
---|
1113 | jQuery.extend(jQuery.expr[':'], { |
---|
1114 | // Nom du sélecteur personnalisé |
---|
1115 | Description: function (a) { |
---|
1116 | n = jQuery(a).info(); |
---|
1117 | return a; |
---|
1118 | |
---|
1119 | } |
---|
1120 | }); |
---|
1121 | |
---|
1122 | /* Extension |
---|
1123 | * absolutize: |
---|
1124 | * relativize: |
---|
1125 | */ |
---|
1126 | //========================================================= |
---|
1127 | jQuery.fn.extend({ |
---|
1128 | recentrage_widget: function () { |
---|
1129 | jQuery('html,body').stop().scrollTop(0); |
---|
1130 | jQuery('html,body').stop().scrollLeft(0); |
---|
1131 | jQuery(".ui-widget-overlay").css({opacity:"0.75",filter: 'alpha(opacity:65)'}); |
---|
1132 | |
---|
1133 | l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width()))/2; |
---|
1134 | h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height()))/2; |
---|
1135 | |
---|
1136 | jQuery(".gmapsPopup").css("left", l1 + "px"); |
---|
1137 | jQuery(".gmapsPopup").css("top", h1 + "px"); |
---|
1138 | |
---|
1139 | } |
---|
1140 | //========================================================= |
---|
1141 | }); // fin extend |
---|
1142 | |
---|
1143 | |
---|
1144 | function wait_Timer() { |
---|
1145 | old_w = 0; |
---|
1146 | old_h = 0; |
---|
1147 | |
---|
1148 | |
---|
1149 | if (jQuery("#pamoorama").length > 0) { |
---|
1150 | var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); |
---|
1151 | if (info_pamoorama_outter.height == 0) { |
---|
1152 | |
---|
1153 | jQuery("#theImage").css({ opacity: '0', filter: 'alpha(opacity:' + '0' + ')' }); |
---|
1154 | setTimeout('wait_Timer()', 200); |
---|
1155 | return |
---|
1156 | } |
---|
1157 | } |
---|
1158 | jQuery(window).resize(); |
---|
1159 | jQuery("#theImage").css({ opacity: '1', filter: 'alpha(opacity:' + '100' + ')' }); |
---|
1160 | |
---|
1161 | } |
---|
1162 | |
---|
1163 | |
---|