$(window).bind("load", function() {
		$("div#mygalone").slideView();
		$(".news_main_text_block .buttons a").click(function() {
			var ind = $(".stripTransmitter .current").html();
			var count = $(".stripTransmitter li:last a").html();
			currentItem = $(".stripTransmitter .current").parent();
			if ($(this).hasClass("left_button")) {
				if (ind > 1) {
					targetElement = currentItem.prev().find("a");
				} else {
					targetElement = currentItem.parent().find("li:last a")
				}
			} else {
				if (ind < count) {
					targetElement = currentItem.next().find("a");
				} else {
					targetElement = currentItem.parent().find("li:first a");
				}
			}
			targetElement.trigger("click");
			return false;
		});
		$(".stripTransmitter li a").click(function(){
			title = $(this).attr("title");
			$("#main_news_title")
				.fadeOut(500, function(){
					$(this)
						.html(title)
						.fadeIn(500);
				});
            var ind = $(".stripTransmitter .current").html();
            var new_id = $("#top_new_" + ind).val(); 
            $("#main_news_title").attr("href", "?mid=74&action=news_detail&new_id=" + new_id)
		});
        //$("#main_news_title").c
        
        homeNewsInterval = setInterval(function(){
            $(".news_main_text_block .buttons a.right_button").trigger("click");
        }, 6000);
        
        $("div#mygalone").mouseover(function(){
            clearInterval(homeNewsInterval);
        });
	});