jQuery.fn.extend({  scrollTo : function(speed, adjust, easing) {    return this.each(function() {      var targetOffset = $(this).offset().top;      $('html,body').animate({scrollTop: targetOffset - adjust}, speed, easing);    });  }});


$(document).ready(function(){
	iss = $('#allslides').children().size();
	count = 0;

	$('#allslides').css('width', (iss*960)+'px');

	iFrequency = 8000;
	i = 0;
	slideshow = setInterval( "doSomething()", iFrequency );

	$(".slide").each(function (i) {
        var w = $(this).find(".text").outerWidth();
        var h = $(this).find(".text").outerHeight();
		$(this).find(".box").css({'height': h+'px','width':w+'px'});
      });

});

function doSomething() {
	if (count==iss){count = 0;}
	$('#allslides').animate({left: -(count*960)+'px'},500);
	count++;  
}