function featuredVideo_initCallback(carousel) { 
	$('div#featured-videos a.next-btn').bind('click', function() {
		carousel.next();
		return false;
	});

	$('div#featured-videos a.previous-btn').bind('click', function() {
		carousel.prev();
		return false;
	});
}


$(document).ready(function(){
	$('#login-btn').click(function() { 
	    $('#account').slideToggle(),
		$(this).toggleClass('login-hover')}

	);
	
	$('div#featured-videos div.box3-content ul').jcarousel({initCallback: featuredVideo_initCallback});
	
	$('div#videos img').tooltip({ 
		delay: 0, 
		showURL: false,
		track: true, 
		bodyHandler: function() { 
			if($(this).attr('rel') != null)
				return $("<img/>").attr("src", $(this).attr('rel'));
			
			return false;
		} 
	});

	$('div.video-list').cycle({
		timeout: 0,
		fx: 'scrollRight',
		next:   'div#videos div.buttons a.next-btn', 
		prev:   'div#videos  div.buttons a.previous-btn'
	});

	// $("a.overlay_trigger").overlay({
	// 		finish:  { top: 20, left: 20 },
	// 		close: "a.close-btn",
	// 		closeOnClick: false,
	// 		onBeforeLoad: function(){
	// 			// grab wrapper element inside content 
	// 			var wrap = this.getContent().find("div.wrap");
	// 			wrap.load(this.getTrigger().attr("href")); 
	// 		}
	// 	});
	$("a[rel^='prettyPhoto']").prettyPhoto({
			theme: 'dark_rounded'
		});
	
});




