﻿/*
    functions for handling for example full screen flash behavior
    Richard Appelgren, Zooma By Semcon 2008
*/

var fullwidthcontent = new Object();
fullwidthcontent.AreaFullContentSelector = '#AreaFullContent';
fullwidthcontent.OffsetHeight = 66; // depending on how far from the top the flash will be positioned
fullwidthcontent.OffsetBottom = 27; // this is the pagefooter height, this should probably not be changed
fullwidthcontent.AreaHeight = null; // set this if using fixed height
fullwidthcontent.adjustFlash = function() {
    var areaHeight;
    if (fullwidthcontent.AreaHeight == null) { // with dyn height
        areaHeight = $(window).height() - (fullwidthcontent.OffsetHeight + fullwidthcontent.OffsetBottom);
    }
    else {
        areaHeight = fullwidthcontent.AreaHeight; // fixed height
    }
    $(fullwidthcontent.AreaFullContentSelector).css('width', $(window).width());
    $(fullwidthcontent.AreaFullContentSelector).css('height', areaHeight);
}