Cufon.replace('h2,h3,.subnav span');

$(document).ready(function(){

	$("object.galleryvideo").each(function(){
		swfobject.registerObject($(this).attr("id"), "9.0.0");
	});

	$("#gallerythumbs").autopan();
	$("#gallerythumbs").galerio();
	$("#gallerythumbs a").append('<span class="overlay"></span><span class="shadow"></span>');
	$('#gallerythumbs .overlay').css({opacity:0.5}).hover(function(){$(this).stop().animate({opacity:0},200)},function(){$(this).stop().animate({opacity:0.5},600)});
	if (jQuery.support.opacity) {
		$("#gallerydetails").css({left:'-30px',opacity:0});
		$("#gallerydetails-container").hover(function(){$("#gallerydetails").stop().animate({left:0,opacity:1},200);},function(){$("#gallerydetails").stop().animate({left:'-30px',opacity:0},600);});
	} else {	
		$("#gallerydetails").css({left:'-360px'});
		$("#gallery").hover(function(){$("#gallerydetails").stop().animate({left:0},200);},function(){$("#gallerydetails").stop().animate({left:'-360px'},600);});
	}
	$("#header a").append('<span></span>');
	$("#header a span").css({opacity:0}).hover(function(){$(this).stop().fadeTo(200,1);},function(){$(this).stop().fadeTo(600, 0);});
	$("a[href^='http://']").attr("target","_blank");
	$("a[href$='.pdf']").attr("target","_blank");

	$("#homegallery").append('<div id="homegallerynav"><ul></ul></div>');
	$("#homegallery").cycle({
		slideExpr: '.homegalleryslide',
		speed: 1000, timeout: 4000,
		pause: 1, cleartype: 1,
		pager: '#homegallerynav ul', pagerAnchorBuilder: function(idx, slide) { return '<li><a href="#">' + idx + '</a></li>'; }
	});



});








