$(document).ready(function(){

	$('a[rel=external]').click(function(){
		window.open( $(this).attr('href') );
		return false;
	}); 


   $('#bgimage').cycle({
		fx: 'fade',
		timeout: 6000
		//before: fixSize
		//after: fixSize
	});






//	$(".archives li ul").hide();



//	$(".year").click(function(){
//		$(this).next('ul').slideToggle("fast");
//		return false;
//	});



//	if ( $(".archives .selected").length > 0 ) {

//		$(".archives").find(".selected").each(function(i) {
//			$(this).parents().show();
//		});

//	} else {

//		$(".archives li ul:eq(0)").show();
	
//	}


});

function fixSize(curr, next, opts) {
	$('#bgimage').css({ height: $("body").height(), width: $("body").width() });	
	$('#bgimage > div').css({ height: $("#bgimage").height(), width: $("#bgimage").width() });	
}


function fixBgHeightForIE() {
	$('#wrapperbg').css({ height: $("#wrapper").height(), width: $("body").width() });
	//alert('fixed');
}

