function ap_stopAll(){ }
function ap_registerPlayers(){ }

function external_link(event){
    window.open($(this).attr('href'),'MP',"toolbar=0,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=750,height=500");
    return false;
}


$(function(event){ 
    var flashvars   = {};
    var params      = {wmode:'transparent'};
    var attributes  = {};
    swfobject.embedSWF("/media/header.swf","flash_header","276","130","8.0.0","expressInstall.swf",flashvars,params,attributes);
    $('#flash_header').click(function(event){ location.href = '/'; });
});


$(document).ready(function(event){
    $('a[href^=http]').bind('click',external_link);

    if($('#staff').length > 0){
        function show_staff(member){
            if(!($.browser.msie && $.browser.version.substr(0,1)<7)){ 
                $('#staff_bio').load(
                    '/includes/page/staff_bio.inc.php?staff='+member,
                    null,
                    function(event){ 
                        $('#staff_background').fade_in(function(event){
                            $('#staff_bio').fade_in();
                            $('#staff_bio a').click(function(event){ 
                                $('#staff_background').fade_out(); 
                                $('#staff_bio').fade_out();
                                return false;
                            });
                        }); 
                    }
                );
            }
        }
    
        $('#staff img').click(function(event){ show_staff($(this).attr('alt').replace('Montpelier Pharmacy Staff - ','').toLowerCase()); });
    
        $('#staff a').click(function(event){
            if(!($.browser.msie && $.browser.version.substr(0,1)<7)){ 
                show_staff($(this).attr('href').replace('?staff=','')); 
                return false; 
            }
        });
    }
});