function setCookie()
{
    var c_name = 'swieta', value='1', exdays='2';
    var exdate=new Date();
    exdate.setHours(exdate.getHours()+exdays)
    //exdate.setDate(exdate.getDate() + exdays);
    var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
    document.cookie=c_name + "=" + c_value;
}
function getCookie()
{
    var c_name = 'swieta';
    var i,x,y,ARRcookies=document.cookie.split(";");
    for (i=0;i<ARRcookies.length;i++)
    {
        x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
        y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
        x=x.replace(/^\s+|\s+$/g,"");
        if (x==c_name)
        {
            return unescape(y);
        }
    }
    return '0';
}
$(document).ready(function(){
    //flash init

    //if( $('#sm_article').height() < $('#sm_aside').height() )
    //    $('#sm_article').height($('#sm_aside').height());

    //ie7 fix :)
    //if( $.browser.msie  && parseInt($.browser.version) == 7 )
    //{
    //        $('#sm_aside').css('margin-top', '-'+$('#sm_article').outerHeight()+'px');
    //  }

    var params = {};
    var attributes = {};
    swfobject.embedSWF(sm_config.swf1, "logo", "976", "613", "9.0.0",sm_config.swf2, sm_config.flashvars, {
        'wmode': 'opaque'
    }, attributes);
    $('a.gallery_root').fancybox({});

    /*if( getCookie() == '0' )
    {
        setCookie();
        var html  = '<div style="position: absolute; background: #ffffff; width: 100%; height: 100%; top: 0px; left: 0px; opacity: 0.8; filter:alpha(opacity=80); z-index: 1000000;" id="swieta_div"></div>';
            html += '<img src="./user_files/1.jpg" style="top: 50%; left: 50%; margin: -325px 0px 0px -430px; position: absolute; z-index: 10000003;" id="swieta_rek" />';            
        $('body').prepend(html);
        setTimeout("$('#swieta_rek').remove();$('#swieta_div').remove();",10000);
    }*/
});
