/**
   * jQuery.diaporing - Easy diaporing with fade process.
   * Copyright (c) 2010 Olivier Bolender- olivier(at)bolender(dot)org | http://weboa.org
   * Dual licensed under MIT and GPL.
   * Date: 31/12/2010
   * @author Olivier Bolender
   * @version 0.1.3
   *
   * http://wiki.weboa.org/index.php/JQuery/diaporing
   */
(function(a){a.fn.diaporing=function(c){function i(){if(b==f)var g=1;if(b<f)g=b+1;if(b>f){b=1;g=b+1}var d="#diapo_"+h+"_"+b,j="#diapo_"+h+"_"+g;a(d).fadeTo(0,1,function(){a(this).css({"z-index":2});a(j).fadeTo(0,1).css({"z-index":1}).show();a(d).fadeTo(c.fadespeed,0,function(){a(this).hide()})});b++}var h=a(this).attr("id");$("#"+h+"").css({width:c.width,height:c.height,overflow:"hidden",position:"relative"});a(this).attr("id");var e=0,b=1,f=0;c=a.extend({speed:1E3,fadespeed:500},c);current=a(this).find("img");
if(current.length){a.each(current,function(g,d){e++;a(d).attr({id:"diapo_"+h+"_"+e});a(d).css({position:"absolute",top:0,left:0,"z-index":-e});e>1&&a(d).css({display:"none"})});f=e;setInterval(i,c.speed)}}})(jQuery);
