$(document).ready(function() {
	$(".image a[rel=gallery], #photos a[rel=photos]").fancybox({
		'transitionIn'			: 'none',
		'transitionOut'			: 'none',
		'titlePosition'			: 'inside',
		'titleFormat'			: function(title, currentArray, currentIndex, currentOpts) {
			return '<span style="display:block; text-align:left;">Image ' + (currentIndex + 1) + ' of ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$(".video a[rel=group], #videos a[rel=videos]").fancybox({
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition'		: 'inside',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span style="display:block; text-align:left;">Image ' + (currentIndex + 1) + ' of ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		},
		'type'				: 'swf',
		'swf'				: {
		   	'wmode'				: 'transparent',
			'allowfullscreen'	: 'true'
		}
	});
	$("#allvideo, #allphoto").fancybox({
		'autoDimensions'	: false,
		'width'        		: 498,
		'height'       		: 'auto',
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span style="font-size:1.5em;">' + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});



$(function(){
	$('#navigation, #sidebar .box, #sidebar .box .head1, #sidebar .box .head2, #sidebar .box a img, input, textarea').each(function() {
		$(this).corner("round 3px")
	});
	$('#navigation').each(function() {
		$(this).corner("bottom round 6px")
	});
	$('#navigation ul').each(function() {
		$(this).corner("round 10px")
	});
	$('#content table.list tr td span.db').each(function() {
		$(this).corner("round 5px")
	});
});



$(document).ready(function() {
	$("#sidebar .box .box2 a img:odd").css("margin-right", "0");
	$("#sidebar .box .box2 a span:odd").css("right", "-6px");
	$("#content table.list tr td:last-child").css("width", "187px");
	$("#sidebar .box ul li:last-child").css("border", "0");
});



Cufon.replace('h1, h2, h3, #header p', { fontFamily: 'MyriadPro' });
