$(document).ready(function(){
//
var news_id = $('.but1').attr("id");
	var info = 'bn_id=' + news_id;
	$('#preloader').show();
		$.ajax({
			type: "GET",
			url: "/block_news_2.php",
			data: info,
			cache: false,
			success: function(html){
				$('#bigTop').empty().show();
				$('#bigTop').fadeTo(1300,0,function(){ $('#preloader').hide();$('#bigTop').append(html).fadeTo("slow",1); });
				
			}		
	});
//
var positionA = $("#but1").position();
var positionB = $("#but2").position();
var positionC = $("#but3").position();
var myYA = (positionA.top) + 'px';
var myYB = (positionA.top + 76) + 'px';
var myYC = (positionA.top + 152) + 'px';
$('.newsArr').css({"top": positionA.top});
$('#containerTop a img').hover(function(){
		$(this).stop().animate({ "opacity" : .5 });
	}, function(){
		$(this).stop().animate({ "opacity" : 1 });
});
$('.imgFade').hover(function(){
		$(this).stop().animate({ "opacity" : .5 });
	}, function(){
		$(this).stop().animate({ "opacity" : 1 });
});
$('a').hover(function(){
		var fade_id = $(this).attr("id");
		$("img#"+fade_id).stop().animate({ "opacity" : .5 });
	}, function(){
		var fade_id = $(this).attr("id");
		$("img#"+fade_id).stop().animate({ "opacity" : 1 });
});
$(".but1").click(function() {
	$('.newsArr').stop().animate({"top": myYA}, "slow");
});
$(".but2").click(function() {
	$('.newsArr').stop().animate({"top": myYB}, "slow");
});
$(".but3").click(function() {
	$('.newsArr').stop().animate({"top": myYC}, "slow");
});
$("#containerTop a").click(function() {
	var news_id = $(this).attr("id");
	var info = 'bn_id=' + news_id;
	$('#bigTop').fadeTo("slow",0, function(){	
	$('#bigTop').hide();
	$('#preloader').show();
		$.ajax({
			type: "GET",
			url: "/block_news_2.php",
			data: info,
			cache: false,
			success: function(html){
				$('#bigTop').empty().show();
				$('#bigTop').fadeTo(1300,0,function(){ $('#preloader').hide();$('#bigTop').empty().append(html).fadeTo("slow",1); });
				
			}		
		});	
	});	
	return false;
});
//
});