$(function(){
clearInterval(timer);
liCount=$('.imp-news li').length;
if(liCount>1)
{
	var current = $('.imp-news li:first');
	var timer;
	$('.imp-news li:gt(0)').hide();
	$('.imp-news li:last').addClass('last');
	$('.imp-news li:first').addClass('first');
	
	timer=setInterval( function() {
          current.hide();
	    if (current.attr('class') == 'last')
		{
                    current= $('.imp-news li:first');
		}else{                                                          
		    current= current.next();
		    }
                    current.show();
                }, 4000);
        $('#forward').click( function() {
		current.hide();
		if (current.attr('class') == 'last')
			current = $('.imp-news li:first');
		else
			current = current.next();
		current.show();
	});
	$('#backImg').click( function() {
		current.hide();
		if (current.attr('class') == 'first')
			current = $('.imp-news li:last');
		else
			current = current.prev();
		current.show();
	});
}

});
