$(document).ready(function(){

	/* anti-aliased corners */
	$('.round').corner({antiAlias:true,autoPad:false});
	
	// margin fixes
	$('.block .medium:even').css({'margin-right':'40px'});
	$('#archive .item:last, .block:last, #authors .item:last, .authors li a:last').css({'border-bottom':'none','padding-bottom':'0'});
	$('.authors li a:first').css({'padding-top':'0'});
	
	// fancybox
	 $(".thumbnails a, .press a").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false });
	
	// external link
	$('a').each(function(){
		if(!this.href.match(/juritzen.no/) && !this.href.match(':3000')  && !this.href.match('')) $(this).addClass("blank");
	});
	$('.blank').click(function(){
		window.open($(this).attr('href'));
		return false; 
	});

	// news slideshow
	$('.slideshow').cycle({
		fx: 'fade',
		next: '.next',
		prev: '.prev',
		timeout: 6000
	});

	// campaign slideshow
	$('.campaign').cycle({
		fx: 'turnLeft',
		random: 1,
		timeout: 8000
	});
	$('.campaign').css({'display':'block'});
});

