$(function(){
    if (scripts_isIE6) $(document).pngFix();

    $('a.ro').mbRollover();
    
    if ($.fn.prettyPhoto) {
        $("a[rel^='lightbox']").prettyPhoto({
            animationSpeed: 'slow',
            padding: 40,
            opacity: 0.85,
            showTitle: false,
            allowresize: true,
            counter_separator_label: '/',
            theme: 'light_rounded'
        });
    }
});

/* eventually replace functions below with Jquery methods */
function openFlash(id, which) {
    //alert('openFlash');
    dhtml_createDIVElement(id, '');

    document.getElementById(id).style.top = "140px";
    if (which == "2") document.getElementById(id).style.top = "140px";
    if (which == "3") document.getElementById(id).style.top = "273px";

    var so = new SWFObject("/swf/bubbleNav.swf", "bubbleNav", "600", "500", "8", "#000000");
    so.addParam("wmode", "transparent");
    so.addVariable("bubbleChoice", which);
    so.write("flashcontent");
}

function closeFlash(id) {
    //alert('closeFlash');
    dhtml_removeDIVElement(id);
}

function closeFlashSWF(which) {
    //alert('closeFlashSWF');
    dhtml_removeDIVElement('flashcontent');
}

function toggleFlash(id, which, href) {
    var hasFlash = so_testFlashVersion(8);
    if (hasFlash) {
        //alert('hasFlash is true');
        var d = document.getElementById(id);
        if (d) closeFlash(id);
        else openFlash(id, which);

    } else {
        //alert('hasFlash is false');
        window.location = href;
    }
}
