/*v1.1*/
(function($) {
$.fn.vSlide = function(container, col, wot) { var $this = $(this); var slideWidth = parseInt($(col).width()) + parseInt($(col).css('padding-left')) + parseInt($(col).css('padding-right')); var currentPosition = 0; $this.each(function() { var hash = $(this).attr('href').indexOf('#'); if(location.hash == '') $(wot+':first').addClass('actif'); else{ if($(this).attr('href').substring(hash) == location.hash) { currentPosition = slideWidth*($this.index(this)); $(this).addClass('actif'); } else $(this).removeClass('actif'); } $(this).click(function(e) { e.preventDefault(); $this.each(function() { $(this).removeClass('actif'); }); $(this).addClass('actif'); $(container).animate({marginLeft : currentPosition + slideWidth * (-$this.index(this))}); }); }); return $this; };
})(jQuery);
