// JavaScript functions for ACG homepage
$(document).ready(function() {

	$('#slides').cycle({
	fx:     'fade', 
	speed:  1000, 
	timeout: 0, 
	pause: 1,		
	pager:  '#thumbnails', 
 	pagerAnchorBuilder: function(idx, slide) { 
	var src = $('img',slide).attr('src'); 
	var alt = $('img',slide).attr('alt'); 
	return '<div class="text"><a href="#" title="Thumbnail"><img src="' + src + '" alt="'+ alt +'" />'+ alt +'</a></div>'; 
	} 
	});

	$('#newsitem').cycle({ 
    //fx:     'fade', 
	fx:     'scrollDown', 
    timeout: 6000, 
    delay:  -2000,
	pause: 1
	});
	
	$('ul#newslist').cycle({ 
    fx:     'fade', 
	//fx:     'scrollDown', 
    timeout: 6000, 
    delay:  -2000,
	pause: 1
	});
});
var randomnumber=Math.floor(Math.random()*30);
$(function() {
    $("#bplogo").jCarouselLite({
        auto: 3000,
	    speed: 3000,
		visible: 9,
		start: randomnumber

    });
});
