function fadeSwitch() {
    var $active = $('#testimonial .items .active');

    if ( $active.length == 0 ) $active = $('#testimonial .items div:last');

    var $next =  $active.next().length ? $active.next()
        : $('#testimonial .items div:first');
    
    $active.addClass('last-active');
    
    $active.fadeOut(1000, function() {
    	 removeFilter($active);
    	 resizeParent($next);
    	 $next.fadeIn(1000, function() {
             $active.removeClass('active last-active');
             
             removeFilter($next);
         })
         .addClass('active');
    });
    
   
}


function removeFilter(e) {
	if(jQuery.browser.msie)
		$(e).get(0).style.removeAttribute('filter');
}

function resizeParent(e)
{
	$("#testimonial").animate({
		height: $(e).outerHeight() + 50
		});
//	console.log($(e).outerHeight());
//	var parent = $(e).parent();
//	console.log($(parent).height());
//	console.log(parent);
}

$(function() {
    setInterval( "fadeSwitch()", 10000 );
});