<!-- MainFlash begins-->
swfobject.embedSWF("/map.swf", "mainflash", "950", "415", "9.0.0", "expressInstall.swf", {path:"/", api_path:"api/getmap/"}, {allowscriptaccess:"always"});

function setImageSize()
{
    // *** Ugly fix for sifr object size and word wrap ***
    // get box div width
    var width = $('div.box').width();
    // image width

    var img_width = $(".imageblock img.image").width() + 15;

    // now set the p width accordinaly
    $('p.block_name').css('width', width - img_width + 'px');

    sIFR.replace(american,
    {
        selector: 'p.block_name',
        css: [ '.sIFR-root{ color:#000000;width:80px; }' ]
    });
    // *** /Ugly fix for sifr object size and word wrap ***
}

runOnLoad(setImageSize);

// Transform any video found in the page
$(document).ready(function()
{
    $('ul.video').each(function(i)
    {
        var id = "video_" + i;
        $(this).before('<div id="' + id + '"/>');
        var path = $(this).children('.video').html();
        swfobject.embedSWF('/player.swf' , id, "400", "300", "9.0.0", "expressInstall.swf", {path:"/", movie_path:"[% c.req.base.authority %]" + path});
    });
});
// /videos