slider = new Array(); big = new Array(); big["width"] = 237; big["height"] = 237; big["height2"] = big["height"] + 0; small = new Array(); small["width"] = 145; small["height"] = 145; small["height2"] = small["height"] + 0; extraSmall = new Array(); extraSmall["width"] = 80; extraSmall["height"] = 80; extraSmall["height2"] = small["height"] + 0; font = new Array(); font["big"] = 16; font["small"] = 12; //smallMargin = new Array(); //smallMargin["top"] = 10; //bigMargin = new Array(); //bigMargin["top"] = 20; timer = -1; function equilibrate() { $('#slider ul li').each(function(i) { //alert(i); //alert(Math.abs(actual)); d = Math.abs(actual - i); //alert(actual - i); var a = $(this); //alert(d); var img = a.children('a').children('img'); //alert(img); var ttl = a.children('.imtitle'); //alert(actual); //alert(d); switch(d) { case 0: //alert('0'); a.animate({width: big["width"], height: big["height2"]}, function () { ttl.css({'font-size': font["big"]+'%'}); }); //showtext(a.attr('id').substr(5)); //img.css({'margin-top': '0px'}); img.animate({width: big["width"], height: big["height"] }); break; case 2: //alert('2'); //ttl.css({'font-size': font["small"]+'px'}); //img.css({'margin-top': bigMargin["top"]+'px'}); //if (a.css('display') == 'none') { if (slider[i] == 1) { //alert(slider[i]); slider[i] = 0; a.css({display: 'inline', width: '0px', height: '0px'}); //img.css({'margin-top': '0px'}); ttl.css({opacity: '0'}); img.css({width: '0px', height: '0px'}); } a.animate({width: extraSmall["width"], height: extraSmall["height2"]}); img.animate({width: extraSmall["width"], height: extraSmall["height"]}, function () { ttl.fadeTo(500, 1); }); //img.css({'margin-top': smallMargin["top"]+'px'}); break; case 1: //alert('1'); //ttl.css({'font-size': font["small"]+'px'}); //if (a.css('display') == 'none') { if (slider[i] == 1) { //alert(slider[i]); slider[i] = 0; a.css({display: 'inline', width: '0px', height: '0px'}); img.css({width: '0px', height: '0px'}); //img.css({'margin-top': '0px'}); ttl.css({opacity: '0'}); } a.animate({width: small["width"], height: small["height2"]}); img.animate({width: small["width"], height: small["height"]}, function () { ttl.fadeTo(500, 1); }); //img.css({'margin-top': smallMargin["top"]+'px'}); break; case 3: //alert('3'); if (slider[i] == 1) { slider[i] = 1; a.hide('fast'); } a.css({display: 'none', width: '0px', height: '0px'}); break; default: //alert('DEFAULT'); if (slider[i] != 1) { slider[i] = 1; a.hide('fast'); } a.css({display: 'none', width: '0px', height: '0px'}); //img.animate({width: small["width"], height: small["height"]}, function () { ttl.fadeTo(500, 1); }); //a.animate({width: small["width"], height: small["height2"]}); break; } }); directlink(); //rotate(); } function actual_change(diff) { if (actual + diff > 0 && actual + diff < max) { actual = actual + diff; //alert(actual); return true; } return false; }; function directlink() { $('#directlink').attr('href', location.href.replace(location.search, '') + '?show=' + actual); } $(document).ready(function(){ var requete = location.search.substring(1); //alert(requete); var tab_paires = requete.split("&"); var tab_elts = new Array(); //alert(tab_paires.length); for (var i = 0; i < tab_paires.length; i++) { temp = tab_paires[i].split("="); tab_elts[temp[0]] = unescape(temp[1]); } //$('#slider ul').css('overflow', 'hidden'); $('#slider ul').prepend('

