jQuery(document).ready(/*This function gets loaded when all the HTML, not including the portlets, isloaded.*/function() {// DiaporamaCpt = 0;ThContn = ".diaporama-frise-thumbs ul";ThOffset = -45;ThNbDis = 3;ThNbTot = jQuery(ThContn).find("li").length;ThWidth = 118;ITV = new Object();ITV_time = 5000;// Masquage de la frisejQuery(ThContn).hide();// Extensions pour boucleThExton = Math.floor( (ThNbDis/2) );// PositionnementThExtonEnd = ThExtonBeg = "";for(i=0; i<=ThExton; i++) {ThExtonEnd += "<li>";ThExtonEnd += jQuery(".diaporama-frise-thumbs ul li").eq(i).html();ThExtonEnd += "</li>";}for(i=(ThNbTot-ThExton-1); i<ThNbTot; i++) {ThExtonBeg += "<li>";ThExtonBeg += jQuery(".diaporama-frise-thumbs ul li").eq(i).html();ThExtonBeg += "</li>";}jQuery(ThContn).append(ThExtonEnd);jQuery(ThContn).prepend(ThExtonBeg);	jQuery(ThContn).css("marginLeft", -(ThWidth+ThOffset) );Cpt = 0;// 1ère imageD_display();// ActionsA_on();jQuery(".diaporama-frise-play a").click(function() {ITV = window.setInterval('D_move("next")', ITV_time);return false;});jQuery(".diaporama-frise-stop a").click(function() {D_stop();return false;});jQuery(".diaporama-frise-thumbs a").click(function() {/*c = jQuery(this);jQuery(".diaporama-frise-thumbs a").each(function(i) {	//console.log(jQuery(this).html(), c.html());if(jQuery(this).html() == c.html()) {//console.log("i >>> "+i);if( (i-ThExton > 0) && (i-ThExton <= ThNbTot) ) {e = i - ThExton - 1 - Cpt;if(e > 0) {for(i=0; i<e; i++) {D_move("next");}}console.log(i, ThExton, Cpt, ThNbTot);console.log(i - ThExton - 1 - Cpt);//console.log(e);}}});*/return false;});// Affichage de la frisejQuery(ThContn).slideDown();});// Diaporama fonctions// Actionsfunction A_on() {jQuery(".diaporama-frise-prev a").click(function() {D_stop();D_move("prev");return false;});jQuery(".diaporama-frise-next a").click(function() {D_stop();D_move("next");return false;});}function A_off() {jQuery(".diaporama-frise-prev a, .diaporama-frise-next a").unbind("click");jQuery(".diaporama-frise-prev a, .diaporama-frise-next a").click(function() {return false;});}// Mouvement des thumbsfunction D_move(s) {// Blocage des actionsA_off();// CompteurCpt = (s == "prev") ? (Cpt - 1) : (Cpt + 1);// Positionnement courant et nouveauThM = parseFloat(jQuery(ThContn).css("marginLeft"));ThM = (s == "prev") ? (ThM + ThWidth) : (ThM - ThWidth);// MouvementjQuery(ThContn).animate({marginLeft:ThM}, "fast", function() {// Affichage de l'imageD_display();// Boucleif(Cpt > (ThNbTot-1)) {jQuery(ThContn).css("marginLeft", -ThWidth);Cpt = 0;} else if(Cpt < 0) {jQuery(ThContn).css("marginLeft", -( (ThNbTot) * ThWidth) );Cpt = (ThNbTot-1);}// Déblocage des actionsA_on();});}function D_stop() {window.clearInterval(ITV);}function D_display() {	jQuery(".diaporama-big img").fadeOut("fast", function() {Bhf = jQuery(".diaporama-frise-thumbs ul li").eq( (Cpt+ThExton+1) ).find("a").attr("href");jQuery(".diaporama-big img").attr("src", Bhf);jQuery(".diaporama-big img").fadeIn("fast");});}function videoPlayerResize (h){jQuery("#player").css("height", h);}	Liferay.Portlet.ready(/*This function gets loaded after each and every portlet on the page.portletId: the current portlet's idjQueryObj: the jQuery wrapped object of the current portlet*/function(portletId, jQueryObj) {});jQuery(document).last(/*This function gets loaded when everything, including the portlets, is onthe page.*/function() {});