// wait until document is fully scriptable
jQuery(document).ready(function() {

	jQuery("a[rel=lightbox]").fancybox({
		hideOnContentClick: true,
		showNavArrows: false
	});


	// select #flowplanes and make it scrollable. use circular and navigator plugins
	var sheets = jQuery("div#partner-sheets")
		.scrollable({
			size: 1, 
			items: "sheets",
			next: "nextPage",
			prev: "prevPage",
			clickable: 0
		})
		.circular()
		.mousewheel(400)
		.navigator({
			// select #flowtabs to be used as navigator
			navi: "div#sheets-list",
			// select A tags inside the navigator to work as items (not direct children)
			naviItem: 'a',
			// assign "current" class name for the active A tag inside navigator
			activeClass: 'current',
			api: true
		});


    sheets.seekTo(Math.floor(Math.random() * sheets.getPageAmount())); 
    
        // select #flowplanes and make it scrollable. use circular and navigator plugins
    var logos = jQuery(".outer")
        .scrollable({
            size: 1, 
            items: "inner",
            next: "nextSponsorLogo",
            prev: "prevSponsorLogo",
            nextPage: "nextPageSponsorLogo",
            prevPage: "prevPageSponsorLogo",
            clickable: 0
        })
        .circular()
        .navigator({
            navi: ".partner-list",
            naviItem: 'a',
            activeClass: 'current',
            api: true
        });
        
    
    var api= jQuery("div#outer1").scrollable({api:true}); 
    api.seekTo(Math.floor(Math.random() * api.getPageAmount())); 
    
    var api= jQuery("div#outer2").scrollable({api:true}); 
    api.seekTo(Math.floor(Math.random() * api.getPageAmount()));	
    
});
