$(document).ready(function() {
    $('.banners').cycle({
		fx: 'fade',
		speed: 1200,
		timeout: 8000,
		pause: true,
		pager: '.banner-thumbs',
		pagerEvent: 'click',
		pauseOnPagerHover: true,
		// callback fn that creates a thumbnail to use as pager anchor
		pagerAnchorBuilder: function(idx, slide) {
		var src = $('img',slide).attr('src');
		return '<li><a href="' + src + '"><img src="' + src + '" width="30" height="12"/></a></li>';
		}
	});
});

$(document).ready(function() {
    $('#vendor1').cycle({
		fx: 'fade',
                speed: 1000,
                timeout: 6000,
                delay: -4000
	});
});

$(document).ready(function() {
    $('#vendor2').cycle({
		fx: 'fade',
                speed: 1000,
                timeout: 6000,
                delay: -2000
	});
});

$(document).ready(function() {
	$('.project_gallery').each(function(i){
	
		$(this).after('<ul class="project_gallery_tn project_gallery_tn'+i+'">').cycle({
			fx: 'fade',
			speed: 800,
			timeout: 8000,
			pause: true,
			pager: '.project_gallery_tn' + i,
   			pagerAnchorBuilder: function(idx, slide) {
				return '<li><a href="#"><img src="' + slide.src + '" width="75" height="75"/></a></li>'; 
    			}
		});
	});
});
