/* teaser */

function onFinishedPlayingCross() {close_banner();}
function onFinishedPlaying() {close_banner();}

var close_banner = function (){
    $('#lightbox_banner').jqmHide();
}
function show_banner (sec){
	if (!sec) {
		sec=8;
	}
    var modal_window_options =
    {
        overlay:80,
        modal:false
    };
    $('#lightbox_banner').jqm(modal_window_options);    
    $('#lightbox_banner').jqmShow(); 
    $('#countdown').countdown({
        until: sec,
        onExpiry: close_banner
    });
}

/* peel */
var phpads_deliverActiveX = function(content){
    document.write(content);	
}

/* floating */
var iab_hide = function (){
    $('#banner_floating_24sata').hide();
};

function setFlashHeight(divId, divH)
{
	//document.getElementById(divId).style.height = divH + 'px';
    $('#leaderboard.' + divId).attr('style', 'height:' + divH 
										+ 'px; width:'+ $('#leaderboard.' + divId).width() 
										+ 'px; left:' + $('#leaderboard.' + divId).css('left'));
}

function setFlashWidth(divId, divW)
{
	//document.getElementById(divId).style.borderLeft = ( divW > 310 ) ? 'none' : '10px solid #FFF';
	//document.getElementById(divId).style.width = divW + 'px';
    $('#kocka.' + divId).attr('style', 'width:' + divW + 'px;')
}

function setFlashDim(divId, divW, divH)
{
	document.getElementById(divId).style.width = divW + 'px';
	document.getElementById(divId).style.height = divH + 'px';
}

function setFlashWidthRollLeft(divId, divW)
{
	//document.getElementById(divId).style.width = divW + 'px';
    if($("#kocka").length > 0){
   		$('#kocka.' + divId).attr('style', 'width:' + divW + 'px;');
    }
    
    if($("#halfpage").length > 0){
    	$('#halfpage.' + divId).attr('style', 'width:' + divW + 'px;');
    }
}

function setDivHolderVisible()
{
	document.getElementById('xl_container_banner_still').style.overflow = 'visible';
}

$(document).ready(function() {
	
	if($("#peel_off object").length == 0){
		$("#peel_off").hide();
	}
});

