$(document).ready(function() {
//	setMouseOvers();
	setIFrames();
	checkDiv();
});

function checkDiv()
{
	if($("#worknav").find('li').length <= 1)
	{
		$("#worknav").css("display","none");
	}
}

function setIFrames()
{
	$("#readbox a").addClass("iframe");
	$(".iframe").fancybox({
		'width' : 770,
		'height' : 568,
		'padding' : 0,
		'margin' : 0,
		'top' : 0,
		'autoscale' : false,
		'hideOnOverlayClick' : false,
		'transitionIn' : 'elastic',
		'showNavArrows' : false,
		'overlayOpacity' : 0.4,
		'overlayColor' : '#CCCCCC',
		'titleShow' : false,
		'overlayShow' : true,
		'hideOnContentClick' : false,
		'centerOnScroll' : false
	});
	$(window).resize(function() {
		$("#fancybox-wrap").css('margin-left','100px');
	});

}

function setMouseOvers()
{
	$(".subnav_link_off").hover
	(
		function()
		{
		$(this).css("opacity","0.9");
		$(this).css("filter", "alpha(opacity=90)");
		},
		function()
		{
		$(this).css("opacity","0.5");
		$(this).css("filter", "alpha(opacity=90)");
		}
	);
}


