
function swapVid(pLink, pTitle)
{
	//alert( "param: "+$('#ytparam').attr('value') );
	//alert( "embed: "+$('#ytembed').attr('src') );
	$('#ytparam').attr('value', pLink);
	//$('#ytembed').attr('src', pLink);
	//alert( "embed: "+$('#ytembed').attr('src') );
	
	var embedTag = $('#ytembed');
	var oParent = embedTag.parent().get(0);
	if( oParent != undefined )
	{
		embedTag.remove();
		var oEmbed = oParent.appendChild(document.createElement('embed'));
		
		oEmbed.src = pLink;
		oEmbed.id = "ytembed";
		oEmbed.type = "application/x-shockwave-flash";
		oEmbed.allowscriptaccess = "always";
		oEmbed.allowfullscreen = "true";
		oEmbed.width = "645";
		oEmbed.height = "388";
		
	}
	
	$('#subhead').html(pTitle);
}

$(document).ready(function(){
	$("ul.gallery").prettyGallery({
		itemsPerPage : 5,
		animationSpeed : 'normal', /* fast/normal/slow */
		navigation : 'bottom',  /* top/bottom/both */
		of_label: ' of ', /* The content in the page "1 of 2" */
		previous_title_label: 'Previous page', /* The title of the previous link */
		next_title_label: 'Next page', /* The title of the next link */
		previous_label: 'Previous', /* The content of the previous link */
		next_label: 'Next' /* The content of the next link */
	});
	
	$("ul#ytgallery li a").tooltip();
});