function ajax_nav_loaded()
{
	Cufon.refresh();
	jQuery(".ajax-nav-content").show();
	//NS.Twitter.init();
	if(isfunc(set_ajax_nav_clicks))
		set_ajax_nav_clicks("#main .ajax-nav-links a, .internal-link:not(.no-ajax-nav)");
	init_checkboxes();
	init_album_covers();
	init_colorbox_links();
	jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
	//Lightbox.init.bind(Lightbox);
}

function isfunc(thing)
{
	return typeof thing === 'function';
}

function init_checkboxes()
{
	jQuery('.album input:checkbox').checkbox({cls:'jquery-safari-checkbox',empty:'images/empty.png'});
}

function init_album_covers()
{
	(function($){
		var covers = $('.album-covers a');
		if(!covers)
			return;
	
		covers.click(function(){
			$.scrollTo('#' + $(this).attr('rel'),400);
			covers.removeClass('on');
			$(this).addClass('on');
		});
		
	})(jQuery);
}

function init_colorbox_links()
{
	(function($){
		$('.colorbox-ajax').each(function(){
			$(this).colorbox({
				href:$(this).attr('href'),
				initialWidth:300,
				innerWidth:300,
				initialHeight:100,
				transition:'none'
			});
		})
	})(jQuery)
}

jQuery(document).ready(init_checkboxes);
jQuery(document).ready(init_album_covers);
jQuery(document).ready(init_colorbox_links);

