if (typeof jQuery == 'undefined') { // jQuery n'est pas chargé } else { // jQuery est chargé } //Chrome,Firefox,safari diaporama + GMaps incompatible pas de load. // si Description dans Categorie [gmaps:id=1; //[gmaps=id:1;width:200;height:120;] //[gmaps=id:2;width:200;height:120;] function Toggle_bp() { cl_visible = !cl_visible; if (cl_visible) src = src1; else src = src2; if (cl_visible) src_info = src3; else src_info = src4; jQuery('#bp_cla').attr('alt', src_info); jQuery('#bp_cla').attr('title', src_info); jQuery('#bp_img_cla').get(0).src = src; jQuery('#bp_img_cla').attr('alt', src_info); jQuery('#bp_img_cla').attr('title', src_info); jQuery('#bp_cla').attr('Stitle', src_info); jQuery('#bp_cla').attr('Stip', " "); jQuery().newResize(); } function Wait_pamoorama() { if (jQuery("#pamoorama").length) { mypanorama = window.myPamoorama; if (!mypanorama){ setTimeout("Wait_pamoorama()", 500); return false ; } if ( mypanorama.skipInit==false) { setTimeout("Wait_pamoorama()", 500); return false ; } info_pamoorama = jQuery("#pamoorama").infos(); new_width= info_pamoorama.width ; if ( Math.abs(new_width - myPamoorama.options.width)>10 ) { setTimeout("Wait_pamoorama()", 500); return false ; } nopano = true; old_window = { width: 0, height: 0 }; jQuery('#pamoorama').trigger('ON'); } } nu_img = 0; //========================================================================== function Wait_Affichage() { if(!jQuery().newResize()) { setTimeout("Wait_Affichage()", 500); return } fade_in = parseInt(fade_in); if (fade_in == 0) { if (msie) jQuery(Parent).css({opacity:"1",filter: "alpha(opacity=100)"}); else jQuery(Parent).css("opacity","1"); } else { jQuery(Parent).animate( { opacity: 1 }, fade_in, "swing" , function (i) { if (DEBUG == "true") { bp1 = jQuery('.debug').get(nu_img); if (!bp1) nu_img = 0; bp1 = jQuery('.debug').get(nu_img); jQuery(bp1).trigger('ON'); } } ); } } //========================================================= jQuery(document).ready( function (jQuery) { jQuery(window).load(function () { if (fade_in != 0) { if (msie) jQuery("#theImage").css({ opacity: "0" }); else jQuery("#theImage").css({ opacity: "0" }); } //======= cl_conflit ====== img_top = "0"; rapport = -1; marges_llgbo = 0; pos = 0; //============================================================= function cl_Timer() { // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) alert(jQuery.browser.version); panoramaContainer = jQuery(".panorama-container"); n = document.scripts[6]; //12--14affiche_script ; t = n.src; currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left')); if (currentPosition == NaN) return; if (currentPosition > 1000) jQuery(panoramaContainer).css('margin-left', "0px") setTimeout("cl_Timer()", 500); } Type_Img = ""; TheImg = null; nopano = false; /* * */ //============================================================ /* jQuery */ img_init = { height: img_height, width: img_width }; // taille initiale img_defaut = { height: scaled_height, width: scaled_width }; img_reelle = { height: img_height, width: img_width }; img_finale = { height: 0, width: 0 }; Zone_Affichage = { height: 0, width: 0 }; //============================================================ Info_the_page = jQuery("#the_page").infos(); Parent = "#theImage"; Zone_Affichage = jQuery(Parent).infos(); // var old_window = { width: 0, height: 0 }; if (Info_description(Parent)) { Bandeau_bas = Info_description(Parent); Bandeau = Bandeau_bas.top; } else { } old_window = { width: 0, height: 0 }; Wait_Affichage(); old_window = { width: 0, height: 0 }; jQuery().newResize(); //=================================================================== /* * window .resize */ jQuery(window).resize( function (event, ui) { jQuery().newResize(); }); //============== initialisation =================== var pos; var set_p = false; }); // window.onload /* Extension * affiche_debug * resize * : */ //========================================================= old_window = { width: 0, height: 0 }; jQuery.fn.extend({ //========================================================== Info_description: function (e) { return Info_description(e); }, //============================================================= onPropertyChange: function (e) { return; }, /* * recherche la plus grande image (hauteur ou largeur) */ Get_Img_Maxi: function (myobj) { return Get_Img_Maxi(myobj); }, //============================================================ affiche_debug: function (aff_infos) { affiche_debug(aff_infos); }, //==================================================== newResize: function () { // if (DEBUG == "true") { nu_img += 1; bp1 = jQuery('.debug').get(nu_img); if (!bp1) nu_img = 0; bp1 = jQuery('.debug').get(nu_img); jQuery(bp1).trigger('ON'); } var chk = eval(user_status + "_enabled"); if (!cl_visible == true) { return true; } if (chk == "") { return true; } //================================================================= var winwidth = jQuery(window).width(); var winheight = jQuery(window).height(); n = winwidth - old_window.width; if (n == 0) { n = winheight - old_window.height; if (n == 0) return true; } old_window = jQuery(window).infos(); //=========================================================================== Parent = "#theImage"; jQuery(Parent).width(winwidth); jQuery(Parent).height(winheight); var Cadre = jQuery(Parent).get(0); var info_Cadre = jQuery(Cadre).infos(); //=============== Information cadre ====== var info_the_page = jQuery("#the_page").infos(); //============================================================================= var info_HeaderBar = jQuery("#imageHeaderBar").infos(); var info_content = jQuery("#content").infos(); var info_titrePage = jQuery("#titrePage").infos(); var info_imageInfoBar = jQuery("#imageInfoBar").infos(); var info_theHeader = jQuery("#theHeader").infos(); var Zone_Affichage = jQuery(Parent).infos(); var info_ToolBar = jQuery("#imageToolBar").infos(); var marge = 0; marge_right = 0; marge_left = 0; if (theme.match(RegExp("simple", "g"))) { if (info_ToolBar.width > 0) marge = (Zone_Affichage.width - info_ToolBar.width) / 2; else if (info_the_page.width>0) marge = (Zone_Affichage.width - info_the_page.width) / 2; var marge_right = marge; var marge_left = marge; if (info_content.width > 100) { marge_left = 0; marge_right = (info_imageInfoBar.margin.left + info_imageInfoBar.margin.right); winwidth = info_content.width; marge_right = info_imageInfoBar.width + marge_right; } } else winwidth = info_the_page.width; marge_right += Zone_Affichage.borderwidth.right; marge_left += Zone_Affichage.borderwidth.left; winwidth -= (marge_right + marge_left); //--------------------------------------------- jQuery(Parent).width(winwidth); jQuery(Parent).css({ height: "auto" }); // jQuery(Parent).height(Zone_Affichage.height); //--------------------------------------------- if (Type_Img == "pamoorama") { mypanorama = window.myPamoorama; //============================================================ if (typeof (mypanorama) == "undefined") return false; var myPamoorama = mypanorama; if (typeof (myPamoorama.skipInit) == "undefined") return false; // if (myPamoorama.skipInit == false) { return false; } var info_pamoorama = jQuery("#pamoorama").infos(); var info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); var info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); var info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); var info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); TheImg = jQuery("#pamoorama"); obj = TheImg.get(0); } else { } //================================================================= switch (Type_Img) { case "map": img_reelle.height = info_img.height; info_map = jQuery("#mapPicture").infos(); marge_left = info_map.width; jQuery("#map").css("left", marge_left + "px"); Bandeau_bas.height = 10; marge_right = 10; img_reelle.width = winwidth - marge_left - marge_right; info_the_page = jQuery("#the_page").infos(); ; break case "panorama": // return; TheImg = jQuery().Get_Img_Maxi("#Panorama img"); info_theImage = jQuery(TheImg).infos(); info_the_page = jQuery("#the_page").infos(); break case "img": if (!TheImg) return true; if (theme.match(RegExp("luciano", "g"))) { TheImg = jQuery("#the_page #theImg"); } info_theImage = jQuery(TheImg).infos(); info_the_page = jQuery("#the_page").infos(); break case "img_autre": if (!TheImg) { if (DEBUG == "true") alert("TheImg=null"); return true; } info_theImage = jQuery(TheImg).infos(); info_the_page = jQuery("#the_page").infos(); break case "embed": // info_theImage = info_img; info_the_page = jQuery("#the_page").infos(); if (rapport < 0) { img_height = info_img.height; img_width = info_img.width; img_reelle.height = img_height; img_reelle.width = img_width; } break case "charlie": info_theImage = info_img; info_the_page = jQuery("#the_page").infos(); if (rapport < 0) { img_height = parseInt(info_img.height); img_width = parseInt(info_img.width); img_reelle.height = parseInt(info_img.height); img_reelle.width = parseInt(info_img.width); } break case "pamoorama": img_reelle = { height: img_height, width: img_width }; //========================================================= img_reelle.height = img_height; img_reelle.width = Zone_Affichage.width; TheImg = myPamoorama.image; info_theImage = jQuery("#pamoorama").infos(); info_theImage.height = img_reelle.height; info_the_page = jQuery("#the_page").infos(); break } //=============== Vérification taille minimale autorizée ====================== var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); var miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2); var miniHeight2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height2); var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); mini_width = parseInt(miniWidth); mini_height = parseInt(miniHeight); img_reelle.width = parseInt(img_reelle.width); if (img_reelle.width < mini_width) return true; img_reelle.height = parseInt(img_reelle.height); if (img_reelle.height < parseInt(mini_height)) return true; //================================================================================== if (rapport < 0) { img_init.height = parseInt(img_height); img_init.width = parseInt(img_width); rapport = img_width / img_height; if (Type_Img != "map") rapport = (img_init.width / img_init.height); else rapport = 0; } //=============== Zone d'affichage ============================ borderW = Zone_Affichage.borderwidth.left; borderW += Zone_Affichage.borderwidth.right; Zone_Affichage.width = winwidth - borderW; var Licence = jQuery(".licencetag"); info_Licence = jQuery(".licencetag").infos(); jQuery(Parent + " #theImg IMG").css("marginTop", "0px") //========== Correction en fonction du thème ============================= var correction = 0; if (theme.match(RegExp("sobre", "g"))) { // correction = -info_Licence.padding.top; if (Type_Img == 'img') { if (msie == true) correction = 0; else correction = 0; } } else if (theme.match(RegExp("Pure", "g"))) { correction += 0; //?? } else if (theme.match(RegExp("luciano", "g"))) { correction = 0; //?? } else if (theme.match(RegExp("simple", "g"))) { correction += 0; //?? } else if (theme.match(RegExp("gally", "g"))) { correction += 0; //?? } //==================================================== Marge_Basse = parseInt(marge_basse || 0); // hors bandeau //========================================================================== h = 0; h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); Bandeau = Bandeau_t.img_top; Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; //========================================================================= if (Zone_Affichage.height < mini_height2) Zone_Affichage.height = mini_height2; if (Zone_Affichage.width < mini_width2) Zone_Affichage.width = mini_width2; //========================================================================= if (typeof (Bandeau_bas) != "undefined") { Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); } else { } var Image_height = Zone_Affichage.height; //============================================================= var height_user = eval(user_status + "_height"); var reg1 = new RegExp("%", "g"); if (height_user.match(reg1)) Image_height = Image_height * parseInt(height_user) / 100; else Image_height = parseInt(height_user); echelle_max = parseFloat(echelle_max, '3'); var echelle = parseFloat(Image_height / img_reelle.height, 3); if (echelle > echelle_max) { echelle = echelle_max; } Image_height = parseInt(img_reelle.height * echelle); //============================================================ var Image_width; if (rapport > 0) Image_width = parseInt(Image_height * rapport); else if (Type_Img == "map") { Image_width = Zone_Affichage.width - marge_left - marge_right; } else { Image_width = Zone_Affichage.width; } //=============================================================== align_auto = "center"; if (jQuery("#theImg").css("textAlign")) align_auto = jQuery("#theImg").css("textAlign"); var widthmin = winwidth; if (check_auto_w == 'checked="checked"') { // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { //==== largeur à atteindre === var width_user = eval(user_status + "_width"); // Largeur maximale en fonction du statut if (width_user.match(reg1)) // pourcentage widthmin = widthmin * parseInt(width_user) / 100; else widthmin = parseInt(width_user); var marges = 0; if (typeof (info_img) != "undefined") { widthmin -= info_img.borderwidth.left || 0; widthmin -= info_img.borderwidth.right || 0; } widthmin -= marges; widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); if (Image_width > widthmin) { // Image_width largeur à atteindre // Calcul du rapport d'agrandissement var echelle_w = parseFloat((widthmin) / img_reelle.width, 3); if (echelle_w > echelle_max) { echelle_w = echelle_max; } Image_width = parseInt(img_reelle.width * echelle_w); if (rapport > 0) Image_height = parseInt(Image_width / rapport); } } // } //=================================================== img_finale.height = Image_height; img_finale.width = Image_width; if (theme.match(RegExp("stripped", "gi"))) { img_finale.width -= llgboframe.top; img_finale.height = img_finale.width / rapport; } zoom = echelle; if (llgboframe.height > 0) { //=============LLGBO2 =========================== t1 = llgboframe; if (!TheImg.src) { TheImg = jQuery(TheImg).find("img").get(0) } if (TheImg.src) { wingbo = img_finale.width; heightgbo = img_finale.height; img_finale.width -= marges_llgbo; img_finale.height -= marges_llgbo; if (wingbo > winwidth) { jQuery("#gbo").width(winwidth); jQuery("#gbo").height(winheight); jQuery("#gbo").css("width", winwidth + "px"); jQuery("#gbo").css("height", winheight + "px"); } else { jQuery("#gbo").width(wingbo); jQuery("#gbo").height(heightgbo); jQuery("#gbo").css("width", wingbo + "px"); jQuery("#gbo").css("height", heightgbo + "px"); } a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); a1 = jQuery("area[rel=prev]"); a2 = jQuery("area[rel=next]"); a3 = jQuery("area[rel=up]"); nb_zone = 3; if (a1.length == 0) { nb_zone -= 1; } if (a2.length == 0) { nb_zone -= 1; } var Largeur_zone = (img_finale.width / nb_zone); var Hauteur_zone = (img_finale.height); var init_zone = 0; if (a1.length > 0) { coord = { x0: init_zone, y0: 0, x1: Largeur_zone, y1: Hauteur_zone }; jQuery("area[rel=prev]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); init_zone += Largeur_zone; } coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; if (a0.length > 0) { jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1 / 2) + "'" }); jQuery(a0).attr({ coords: "'" + coord.x0 + "," + (coord.y1 / 2) + "," + coord.x1 + "," + (coord.y1) + "'" }); } else { jQuery("area[rel=up]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + (coord.y1) + "'" }); } init_zone += Largeur_zone; if (a2.length > 0) { coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); } } } //================ Zone affichage ========================= if (theme.match(RegExp("luciano", "g"))) { //---- information en dehors du cadre jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height); } //========================================================= // jQuery(Cadre).css("top", "0px"); jQuery("#standard").css("top", 0 + "px"); jQuery("#comments").css("top", 0 + "px"); //========== Image Remise à l'échelle ======================= Image_height = img_finale.height; Image_width = img_finale.width; //========================================================================= jQuery(Cadre).width(Zone_Affichage.width); // jQuery(Cadre).height(Zone_Affichage.height); if (typeof (gmaps) != "undefined") { Gmap_ = gmaps.maps[0]; if (Gmap_.sizeMode == 'A') { jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" }); } } //============= flv,mov,mpg ok /* wmv nok * avi nok //=========================================== */ if (Type_Img == "charlie") { t1 = jQuery("#charlie").infos(); /**/ pdf = 0; jQuery("#charlie div").each(function (i) { p1 = jQuery(this).infos(); pdf += p1.padding.right + p1.padding.left; }); img_finale.width -= pdf; jQuery("#charlie").css({ width: img_finale.width + pdf, height: img_finale.height, margin: "auto" }); jQuery("#player").css("width", img_finale.width + "px"); jQuery("#player").css("height", img_finale.height); jQuery("#embedplayer").css("width", img_finale.width); jQuery("#embedplayer").css("height", img_finale.height); jQuery("object").width(img_finale.width); jQuery("object").height(img_finale.height); } else if (Type_Img == "panorama") { // ----- jQuery(TheImg).panorama2(img_finale.height, img_finale.width); // jQuery(TheImg).height(img_finale.height); // jQuery(TheImg).width(img_finale.width); jQuery("#Panorama div").height(img_finale.height); // class=simple_panorama jQuery(".panorama-viewport").css("left", "2px"); jQuery(".panorama-viewport").css("width", "auto"); // setTimeout("cl_Timer()", 500); } else if (Type_Img == "pamoorama") { img_height = myPamoorama.imageHeight marge_left += 2; if (theme.match(RegExp("simple", "g"))) { marge_right = 2; } new_width = Zone_Affichage.width - marge_right - marge_left; info_theImage.height = Zone_Affichage.height; Zone_Affichage.height += info_pamoorama_footer.height; zoom = info_theImage.height / img_height; myPamoorama.options.width = new_width * zoom; // if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom }); //==================================================== jQuery("#pamoorama").css({ marginLeft: "auto", marginRight: "auto", // height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur; width: new_width + "px" }); jQuery("#pamoorama").width(new_width); //==================================================== info_pamoorama = jQuery("#pamoorama").infos(); img_finale.height = info_pamoorama.height - info_pamoorama_footer.height; img_finale.width = new_width; jQuery("#pamoorama_outter").width(new_width); // commenter sinon outter augmente à chaque resize // jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height); jQuery("#pamoorama_outter").css({ width: new_width + "px" }); // //==================================================== info_pamoorama = jQuery("#pamoorama").infos(); info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); info_frame = jQuery(myPamoorama.frame).infos(); zoom = img_finale.height / img_height; } else if (TheImg.src) { //--- background ?? --- jQuery(TheImg).height(img_finale.height); jQuery(TheImg).width(img_finale.width); jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); } else { //===map ? === jQuery(TheImg).height(img_finale.height); jQuery(TheImg).width(img_finale.width); jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); } jQuery("#navThumbPrev").css({ overflow: "hidden" }); jQuery("#navThumbNext").css({ overflow: "hidden" }); try { if (theme.match(RegExp("gally", "gi"))) { //=========================================================================== initializeImageMode("resize"); if (jQuery("#navThumbPrev").length > 0) { jQuery("#navThumbPrev").css({ height: info_img.height + "px", top: info_img.top + 20 + "px", overflow: "hidden" }); if (Type_Img == "map") jQuery("#navThumbPrevContainer").css({ background: 'none' }); } if (jQuery("#navThumbNext").length > 0) { jQuery("#navThumbNext").css({ height: info_img.height + "px", top: info_img.top + 20 + "px", overflow: "hidden" }); } if (Type_Img == "map") jQuery("#navThumbNextContainer").css({ background: 'none' }); if (!theme.match(RegExp("lapis", "gi"))) { initializeImageMode("resize"); } } else if (theme.match(RegExp("simple", "g"))) { jQuery("#imageToolBar").css("position", "static"); info_imageInfoBar = jQuery("#imageInfoBar").infos(); if (info_imageInfoBar.bottom < info_img.bottom) { jQuery("#imageInfoBar").height(info_img.bottom); } } else { // jQuery("#imageToolBar").css("position", "static"); } } catch (e) { } // --- rglage de la hauteur de page en fonction du copyright----------- if (typeof (pos) == "undefined") pos = jQuery("#copyright").infos(); if (pos != jQuery("#copyright").infos()) pos = jQuery("#copyright").infos(); if (!theme.match(RegExp("stripped", "gi"))) { if (pos.top > 100) jQuery("#the_page").height(pos.top); } if (!theme.match(RegExp("luciano", "gi"))) { jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" }); jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" }); jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); } info_frame = jQuery(Cadre).infos(); if (DEBUG == "true") { if (theme.match(RegExp("stripped", "gi"))) { pos = "absolute"; t1 = info_imageInfoBar.bottom; l1 = info_imageInfoBar.left; } else { pos = "absolute"; t1 = info_frame.top; l1 = info_frame.left; } // jQuery(Cadre).css("border", "solid green"); margins = jQuery(Cadre).css("margin"); jQuery("#Debug5").css({ background: "transparent", position: pos, border: "green solid 2px", textAlign: align_auto, margin: "4px", top: t1 + "px", left: l1 + "px", width: info_frame.width + "px", height: info_frame.height + "px" }); //red jQuery("#Debug4").css({ top: info_frame.bottom - info_description.height + "px" }); //green } return true; //_____________________________________________________ } // Resize(); //====================================================================== }); // fin extend } // function ); /* * recherche la plus grande image (hauteur ou largeur) */ function Get_Img_Maxi(myobj) { var w00 = 0; var myImg = null; jQuery(myobj).each(function (i) { w0 = img_reelle.width; h0 = img_reelle.height; if (h0 > w0) w0 = h0; if (w0 > w00) { if (!this.src.match(RegExp(".png", "g"))) if (!this.src.match(RegExp(thumbnail, "g"))) { myImg = this; w00 = w0; } } }); return myImg; } //============================================================ /* * */ function Info_entete(Parent) { if (typeof (marge_top) != "undefined") return result; info_imageToolBar = jQuery("#imageToolBar").infos(); if (info_imageToolBar.position == "absolute") { jQuery("#imageToolBar").css("position", "relative"); jQuery("#imageToolBar").css("top", 0 + "px"); } optiontop = 0; info_imageInfoBar = jQuery("#imageInfoBar").infos(); info_theImgContainer = jQuery("#"+ "theImgContainer").infos(); info_theImage = jQuery(Parent).infos(); info_thePicturePage = jQuery("#thePicturePage").infos(); if ( theme.match(RegExp("stripped", "gi"))) { optiontop = info_imageInfoBar.bottom + llgboframe.top; } if (info_theImage.position == "relative") { //--- passage relative ==> static ===/ jQuery(Parent).css("position", "static"); info_theImage = jQuery(Parent).infos(); } else { } if (info_theImage.position == "absolute") { //--- passage absolute ==> static ===/ jQuery(Parent).css("position", "static"); info_theImage = jQuery(Parent).infos(); } marge_top = Math.ceil(Info_the_page.top + Info_the_page.borderwidth.top + info_theImage.borderwidth.top + info_thePicturePage.margin.top ); img_top = Math.ceil(info_theImage.top + info_theImage.borderwidth.top + info_thePicturePage.margin.top + optiontop); result = info_imageToolBar; result.width = "20%"; result.left = "40%"; result.marge_top = marge_top; result.img_top = img_top; //=== Afficher le titre de l'image sur le cadre === llgboh2 = jQuery("#gboh2").infos(); result.img_top += llgboh2.height ; return result; } /* Récupère les informations sur la description. * */ //==================================================== function Info_description(Parent) { // jQuery(Parent + " p:not(:contains(' ')) ").remove(); //============================================================================= info_description = { top: 0, bottom: 0, height: 0 }; //====== détection du type d'images ====== if (jQuery("#charlie").length > 0) { Type_Img = "charlie"; } else if (jQuery("#pamoorama").length) { Type_Img = "pamoorama"; } else if (jQuery(Parent +" embed").length > 0) { Type_Img = "embed"; } else if (jQuery("#map").length) { Type_Img = "map"; } else if (jQuery("#Panorama").length) { Type_Img = "panorama"; } else if (jQuery(Parent).find("img").length > 0) { Type_Img = "img"; } else if (jQuery(Parent+"Box").find("img").length > 0) { Type_Img = "img"; Parent = Parent + "Box"; } else if (jQuery("img").length > 0) { Type_Img = "img_autre"; return; } else { return; } llgboframe = jQuery("#gbo").infos(); marges_llgbo = 0; //========================================================= if (llgboframe.height > 0) { ll1 = jQuery("#gbo div:first").infos(); ll2 = jQuery("#gbo div:last").infos(); ; ll1 = ll1.width; ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right; marges_llgbo = (ll1 - ll2) ; } Bandeau_t = Info_entete(Parent) Bandeau = Bandeau_t.img_top; if (theme.match(RegExp("simple", "gi"))) { jQuery(Parent).css({ padding: "0px", marginLeft: "0px", marginRight: "auto", marginTop: "0px", marginBottom: "0px" }); } else { } // jQuery(Parent + " p").css({ padding: "0px", margin: "0px " }); if (theme.match(RegExp("luciano", "g"))) { TheImg = jQuery(Parent + " #theImg img"); info_img = jQuery(TheImg).infos(); } else if (Type_Img == "map") { info_map = jQuery("#mapPicture").infos(); marge_left = info_map.width; jQuery("#map").css({ left: marge_left + "px", padding: "0px", marginLeft: "0px", marginRight: "4px", marginTop: "0px", marginBottom: "0px", position: "relative" }); TheImg = jQuery("#map"); info_img = jQuery(TheImg).infos(); } else if (jQuery("#charlie").length > 0) { jQuery("#charlie").css({ padding: "0px" }); TheImg = jQuery("#charlie") info_img = jQuery(TheImg).infos(); } else if (jQuery(Parent +" embed").length > 0) { TheImg = jQuery(Parent +" embed"); info_img = jQuery(TheImg).infos(); } else if (Type_Img == "pamoorama") { if (!nopano) { Wait_pamoorama(); return } TheImg = jQuery("#pamoorama"); info_img = jQuery(TheImg).infos(); info_footer = jQuery("#pamoorama_footer").infos(); info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); } else { TheImg = jQuery(Parent + " img"); TheImg = Get_Img_Maxi(TheImg); info_img = jQuery(TheImg).infos(); } //===================================================================================== switch (info_img.position) { case "relative": break; case "static": break; case "absolute": break; case "": break; default: break; } info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top } marges_ = info_img.margin.bottom + info_img.borderwidth.bottom; info_img.bottom += marges_ * 2; info_img.bottom += marges_llgbo / 2; info_img.bottom += info_description.marge.top + info_description.marge.bottom; info_img.right += marges_ * 2; info_img.width += marges_ * 2; info_img.height = info_img.bottom - info_img.top; //====================================================================================== info_description.top = info_img.bottom; info_description.bottom = info_description.top; //init //===================== Recherche Description Bas ================================== info_para = info_description; jQuery(Parent + " p").each(function (i) { para = jQuery(this).infos(); if (para.height > 0) { if (para.top >= info_description.top) { para.height = para.bottom - info_description.top; info_para = para; info_para.top = info_description.top; } } }); //===================== Recherche lmt Bas =====(bleu debug3)==================== info_licencetag = jQuery(Parent + ".licencetag").infos(); jQuery(".licencetag").css("position", "static"); jQuery(".licencetag table").each(function (i) { info_licencetag = jQuery(this).infos(); info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; if (jQuery.browser.msie == true) jQuery(this).css("padding", "0px"); jQuery(this).css("border", "solid 5px transparent"); }); if (info_licencetag.top == 0 && info_licencetag.height > 10) { info_licencetag.top = info_para.bottom; info_licencetag.bottom = info_para.bottom + info_licencetag.height; info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; } //======================================================== info_table = jQuery(Parent + " Table").infos(); if (info_table.height > 0) { info_table.bottom += info_table.margin.top + info_table.margin.bottom; info_licencetag.bottom = Math.max(info_table.bottom, info_licencetag.bottom) info_licencetag.top = info_table.top; info_licencetag.bottom = info_table.bottom; info_licencetag.height = info_table.height; } info_description.top = info_img.bottom; info_description.height = Math.max(info_para.bottom, info_licencetag.bottom) - info_description.top; info_description.bottom = info_description.bottom + info_description.height; //============================================================================= if (theme.match(RegExp("gally", "gi"))) { if (!theme.match(RegExp("lapis", "gi"))) { info_description.bottom = info_description.bottom } } info_description.height = info_description.bottom - info_description.top; if (theme.match(RegExp("gally", "g"))) { if (!theme.match(RegExp("lapis", "gi"))) { info_copyright = jQuery("#copyright").infos(); info_description.bottom += info_copyright.height; } } if (theme.match(RegExp("luciano", "g"))) { //info_description.bottom -= 30 } if (jQuery.browser.msie != true) info_description.bottom += 4; info_description.height = info_description.bottom - info_description.top; if (check_desc_v != 'checked="checked"') { info_description.height = 0; } Debug_pos(); return info_description; } //==================================================== function Debug_info(index,infos,nom) { if (DEBUG != "true") return ; if(infos.height>0){ message = browser.browser + " -- > Info : "+ nom +" " + infos.id +"\n"+ "Info nodeName: " + infos.nodeName +"\n"+ "Info width: " + infos.width +"\n"+ "Info height: " + infos.height +"\n"+ "Info top: " + infos.top +"\n"+ "Info left: " + infos.left +"\n"+ "Info position: " + infos.position +"\n"; myDebug = { id: "Debug" + index, texte: message, css: { color:"black", opacity: "0.5", position: "absolute", height: infos.height||100 +"px", width: infos.width||300 +"px", left: infos.left||0 +"px", border: "solid 1px green", top: infos.top + "px" } } return myDebug; }else{ return null ; } } //==================================================== function Debug_pos() { if (DEBUG == "true") { jQuery("[id ^='Debug']").show(); /* Debug2 background-color:yellow Debug3 background-color:blue Debug4 background-color:green Debug5 background-color:red */ affiche_debug({ Debug1: Debug_info(1, Bandeau_t,"Bandeau_t"), Debug3: Debug_info(3, info_licencetag, "info_licencetag"), Debug4: Debug_info(4, info_description, "info_description"), Debug5: Debug_info(5, info_img, "info_img") }); } } function affiche_debug(aff_infos) { jQuery(jQuery("[id ^='Debug']")).each(function (i) { if (aff_infos[this.id]) { if (aff_infos[this.id].css) { jQuery("#" + this.id).css(aff_infos[this.id].css); jQuery("#" + this.id).text(aff_infos[this.id].texte); } } }); return; } jQuery(function () { jQuery('#pamoorama').live('ON', function (e) { jQuery(jQuery('.debug').get(1)).trigger('ON'); Bandeau_bas = Info_description(Parent); Bandeau = Bandeau_bas.top; old_window = { width: 0, height: 0 }; Wait_Affichage(); }); // Custom Event, ON to turn on a debug. jQuery('.debug').live('ON', function (e) { jQuery('.debug').trigger('OFF'); jQuery(this).addClass('debugOn'); }); // On Click = debugs On jQuery('.debug').live('click', function (e) { jQuery(this).trigger('ON'); }); // Custom Event, Turn off a debug jQuery('.debug').live('OFF', function (e) { jQuery(this).removeClass('debugOn'); }); // on Double Click, remove the debug from the DOM jQuery('.debug').live('dblclick', function () { jQuery(this).fadeOut(function () { $(this).remove() }); }); // Add another debug to the DOM jQuery('#adddebugs').click(function () { jQuery('
') .addClass('debug') .appendTo('#debugsContainer'); }); // Add 10 testing debugs to start with jQuery(window).load(function () { if (DEBUG == "true") { for (var i = 0; i < 10; i++) { jQuery('#adddebugs').click(); } jQuery(jQuery('.debug').get(8)).click(); } }); //on load });