$(function() {
     $('#content-bottom-click').click(function(){
        if ( $( "#botom" ).is(":visible") ) {
            $("#botom").hide();
        } else {
			$("#botom").show();
        }

        
        });
     
    $('.announcement-info').find('.announcement-info-in').html($('.items .item:not(.cloned):eq(0)').find('.announcement-info-in').html());

    var itemsNum = $('.items .item').size();

    $("#browsable").scrollable({
        circular: true,
        
        onBeforeSeek:function(){
            $('.announcement-info').find('.announcement-info-in').html($('.items .item:not(.cloned):eq('+ (this.getIndex() != (itemsNum - 1) ? (this.getIndex() + 1) : 0)  +')').find('.announcement-info-in').html());
        }
    }).navigator().autoscroll(10000);

    $(".navi a").click(function(){
        var aIndex = $(this).index();

        $('.announcement-info').find('.announcement-info-in').html($('.items .item:not(.cloned):eq('+ aIndex +')').find('.announcement-info-in').html());

        return false;
    });

    $('.announcement-info-slide-button').click(function(){

        if(!$(this).parent().hasClass('closed')) {
            $(this).prev().animate({width:'1px'}, function(){
                $(this).parent().addClass('closed');
            });
        }
        else {
            $(this).prev().animate({width:'323px'}, function(){
                $(this).parent().removeClass('closed');
            });
        }

        return false;
    });

    $('#mycarousel').jcarousel();
    $("#sity").change(function(){
      var  htm='<script>URL="http://img.gismeteo.ru/flash/fw88x31.swf?index='+this.value+'";w="88";h="31";value="'+this.value+'";lang="ru"</script>';
        alert($('#testi').html());
         $('#testi').html(htm);
        alert($('#testi').html());
       //document.getElementById('click').href="http://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*http://pogoda.yandex.ru/"+this.value;
     //  document.getElementById('clickk').src="http://info.weather.yandex.net/"+this.value+"/2_white.png";

       
         
    })
});

