


function close_shadowbox(mode){
	if (mode == 'refresh'){
		parent.location.reload();
	}
	
	self.parent.Shadowbox.close();	
	return false;
}


function externalLinks()
{
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for ( var i=0; i < anchors.length; i++ )
    {
        var anchor = anchors[i];
        if ( anchor.getAttribute("href") && anchor.getAttribute("rel") == "external" )
        {
            if ( anchor.getAttribute("className") )
            {
                anchor.target = anchor.getAttribute("className");
            }
            else
            {
                anchor.target = "_blank";
            }
        }
    }
}

function openSlideshow(slideshowid){
	images = $('a.lightboxgallery_image');
	Shadowbox.open(images[0],{
		slideshowDelay: 5,
		options: 	{ displayNav: true, modal: false, overlayOpacity: 0.4, animate: true, animateFade: true, overlayColor: 'ffffff'}
	});
}
