function mycarousel_initCallback(carousel) {	 
	jQuery('#awardsCarousel-next').bind('click', function() {
		carousel.next();
		return false;
	});
 
	jQuery('#awardsCarousel-prev').bind('click', function() {
		carousel.prev();
		return false;
	});
};


$(document).ready(function(){
					
	$(".award-item").fancybox({
		'overlayShow'	: true,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'padding'		: 0,
		'overlayColor'	: '#FFF',
		'type'			: 'ajax'
	});
					
	// set up the carousel
	$("#awardsCarousel").jcarousel({
		scroll: 7,
		initCallback: mycarousel_initCallback,
		// This tells jCarousel NOT to autobuild prev/next buttons
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
	
	/*
	// set up modal windows
	$('.awardPopup').jqm({
		ajax:'@href', 
		overlay:50, 
		modal:false, 
		toTop:false,
		trigger: '.award-item',
		onHide: function(h) {
			h.o.remove(); // remove overlay
			h.w.animate({
				bottom: '-=90',
				opacity: 0
			}, 400, function(){
				h.w.hide();
			});
			
		},
		onShow: function(h) {
			//h.w.fadeIn(500); // show window
			h.w.show();
			h.w.fadeTo(0, 0.1);
			h.w.animate({
				bottom: '+=90',
				opacity: 1
			}, 400, function(){
				// complete
			});
		}
	}); 
	
	*/
	//$('.awardPopup').pngfix();
});
