function show_div(div){
    //setInterval(function () {
        $(div).delay(1000).fadeToggle();
       // }, 2 * 1000);
}
$(function(){$(this).bind("contextmenu", function(e){e.preventDefault();});});

$(document).ready(function() {
    $("#poza1").show();
    $("#poza2").hide();
    $("#poza3").hide();
    $("#poza4").hide();
    $("#poza5").hide();
    $("#poza6").hide();
    $("#stire_poza1").hide();
    $("#stire_poza2").hide();
    $("#stire_poza3").hide();
    $("#stire_poza4").hide();
    $("#stire_poza5").hide();
    $("#stire_poza6").hide();
    $("#id_poza1").hide();
    $("#id_poza2").hide();
    $("#id_poza3").hide();
    $("#id_poza4").hide();
    $("#id_poza5").hide();
    $("#id_poza6").hide();
    var titlu = new Array();
    var text = new Array();
    var id_stire = new Array();
    var stire_poza = new Array();
    for(l=1;l<7;l++)
        {
        stire_poza[l] = $("#stire_poza"+l).html();
        $("#poza"+l).css("background-color","#CCCCCC");
        $("#poza"+l).css("background-image","url(pics/stiri/"+stire_poza[l]+")");
        $("#poza"+l).css("background-repeat","no-repeat");
        $("#poza"+l).css("width","474px");
        $("#poza"+l).css("height","356px");
        $("#poza"+l).css("border-bottom","solid 3px #000000");
        
        $("#titlu"+l).css("background-image","url(pics/bg.png)");
        $("#titlu"+l).css("margin-top","5px");
        $("#titlu"+l).css("margin-left","5px");
        $("#titlu"+l).css("float","left");
        $("#titlu"+l).css("color","#FFFFFF");
        $("#titlu"+l).css("text-align","center");
        $("#titlu"+l).css("padding","10px");
        $("#titlu"+l).css("min-width","100px");
        $("#titlu"+l).css("z-index","1");
        $("#titlu"+l).css("cursor","pointer");
        $("#titlu"+l).css("cursor","hand");
        titlu[l] = $("#titlu"+l).html();
        id_stire[l] = $("#id_poza"+l).html();
        $("#titlu"+l).html('<a href="stire.php?id='+id_stire[l]+'">'+titlu[l]+'</a>');
        
        $("#arrows"+l).hide();
        //$("#arrows"+l).css("margin-top","-20px");
        //$("#arrows"+l).css("margin-right","5px");
        //$("#arrows"+l).css("clear","both");
        //$("#arrows"+l).css("float","right");
        //$("#arrows"+l).css("z-index","1");
        //$("#arrows"+l).css("width","80px");
        //$("#prev"+l).css("float","left");
        //$("#next"+l).css("float","right");
        //$("#prev"+l).css("cursor","pointer");
        //$("#next"+l).css("cursor","pointer");
        //$("#prev"+l).css("cursor","hand");
        //$("#next"+l).css("cursor","hand");
        
        $("#text"+l).css("background-image","url(pics/bg.png)");
        $("#text"+l).css("margin-top","215px");
        $("#text"+l).css("margin-bottom","5px");
        $("#text"+l).css("margin-right","5px");
        $("#text"+l).css("float","right");
        $("#text"+l).css("text-align","justify");
        $("#text"+l).css("color","#FFFFFF");
        $("#text"+l).css("padding","10px");
        $("#text"+l).css("width","350px");
        $("#text"+l).css("height","70px");
        $("#text"+l).css("z-index","1");
        $("#text"+l).css("cursor","pointer");
        $("#text"+l).css("cursor","hand");
        text[l] = $("#text"+l).html();
        $("#text"+l).html('<a href="stire.php?id='+id_stire[l]+'">'+text[l]+'</a>');
        }
    var i = 1;
    setInterval(function () {
            $("#poza"+i).fadeIn("fast");
            for(j=1;j<7;j++)
                {
                    if (j != i)
                        $("#poza"+j).hide();
                }
            if (i == 6)
                i = 1;
            else
                i++;
    }, 7 * 1000);

});
