var Interlic = {
    initVideo:function(videoId, containerId, width, height, file, image) {
            var flashvars = {
                    file:file, 
                    image:image,
                    autostart:"false",
                    controlbar:"none"
            }
            var params = {
                    allowfullscreen:"true", 
                    allowscriptaccess:"always",
                    wmode:"transparent"
            }
            var attributes = {
                    id:videoId,  
                    name:videoId
            }
            swfobject.embedSWF("/flash/player.swf", containerId, width, height, "9.0.115", false, flashvars, params, attributes);
    },
    initAudio:function(audioId, containerId, file) {
            var flashvars = {
                    file:file, 
                    autostart:"false",
                    playlist:"over"
            }
            var params = {
                    allowfullscreen:"true", 
                    allowscriptaccess:"always",
                    wmode:"transparent"
            }
            var attributes = {
                    id:audioId,  
                    name:audioId
            }
            swfobject.embedSWF("/flash/player.swf",
                               containerId, "300", "196", "9.0.115", 
                               false, flashvars, params, attributes);
    },
    bookmark:function(title, url)
    {
    	if (window.sidebar) {// Mozilla Firefox Bookmark
    		window.sidebar.addPanel(title, url,"");
    	} else if(window.external) {// IE Favorite
    		window.external.AddFavorite( url, title); 
    	} else if(window.opera && window.print) {// Opera Hotlist
    		return true;
    	}
    },
    setHeaderTime:function(days) {
    	var today  = new Date();
    	var year   = today.getYear();
    	var month  = today.getMonth()+1;
    	var day    = today.getDate();
    	var h      = today.getHours();
    	var m      = today.getMinutes();
    	year       = year < 1000 ? year + 1900 : year;
    	month      = ((month < 10) ? "0" : "") + month;
    	day        = ((day < 10) ? "0" : "") + day;
    	$('#today-clock').html(days[today.getDay()] + " " + day + "." + month + "." + year + ", " + h + ((m < 10) ? ":0" : ":") + m);
    	setTimeout(function(){Interlic.setHeaderTime(days)}, 10000);
    },
    initMenu:function() {
        $('#nav ul > li').each(function(){
            $(this).find('.ct, .cb').ifixpng();
            var hoverClass = this.className.replace('-sel','')+'-hover';
            var container = $(this).find('ol');
            $(this).hover(function(){
                    $(this).addClass(hoverClass).css({'z-index':1001});
                    $('#header').css({'z-index':2});
                    if (container) {
                        $(container).show();
                    }
                },
                function(){
                    $(this).removeClass(hoverClass).css({'z-index':0});
                    $(container).hide();
                }
            );
        });
    }
}