    $(document).ready(function(){
    });

  function login_popup() {
        if($('#login').css('display') == 'none')
                $('#login').show();
        else
                $('#login').hide();
  }

  function get_checked_programs() {
	  var programs_array = new Array();
	  $("#programs input:checked").each(function() {
			programs_array.push($(this).val());
	  });
	  return programs_array;
  }

 function loginform( ajax_url ) {
        $.ajax({
            url:"http://armeniatv.com/clear/users/login.php",
            type : 'POST',
            data:'log='+$("#log").val()+'&pwd='+$("#pwd").val(),
            success: function(data) {
                if(data == 1) {
                    window.location.href="";
                } else {
                   $('[id^="login_result"]').html("<font color='#CA1117'>"+$("#wrong_log_pwd").html()+"</font>");
                }
            }
        });
 }
 
  $(document).ready(function(){
        get_view_login();
    });
    function get_view_login() {
        $.ajax({
            url:"http://armeniatv.com/clear/users/view.php",
            type : 'POST',
            success: function(data) {
                $("#login_div").html(data);
            }
            });
    }
 
   $(document).ready(function(){
        setTimeout('change_news(1)', 20000);
        setTimeout('open_first_news()', 1000);
 
    });
 
    function open_first_news() {
        $("#marquee").animate({ opacity: "show" }, "slow");
    }
    function change_news(current) {
        $("#news"+current).fadeOut("fast", function() {
            if(current == parseInt($('#news_num').html())) {
            current = 1;
            } else {
                current = parseInt(current) + 1;
            }
 
            $("#news"+current).fadeIn("slaw");
 
            setTimeout('change_news('+current+')', 20000);
        });
    }
 
    $(document).ready(function(){
        setTimeout("satelite(1)", 600);
    });
 
    function satelite(count) {
        if(count == 4) {
            for(var i=1; i<4; i++) {
                $("#aliq"+i).fadeOut("normal");
            }
            count = 0;
        }
       $("#aliq"+count).fadeIn("normal");
 
       setTimeout("satelite("+(parseInt(count)+1)+")", 600);
    }
    
    
    
    $(document).ready(function(){
        $('#aaaaaa').click(function(){
            k = $(this).attr('my_url');
            $.ajax({
                url: k ,
                type:'POST',
                success:function(result)
                {
                    window.location.href = 'http://armeniatv.com/';
                }
            });
        });
    });
