$(document).ready(function(){
	$('#closed-block a.more_link').click(function(){
	 var sStr = $(this).attr('href').replace('#','');

	 var iH = $('#block-wrap').height();

	 $('#block-wrap').css('height',iH);

	 $('#closed-block').fadeOut(200, function() {
	  $('#'+sStr).css('opacity',0);
	  $('#'+sStr).show();

	  var iNewH = $('#'+sStr).height() + 2;

	  $('#block-wrap').animate({height:iNewH},150,function(){
	   $('#'+sStr).css('opacity',1);
	   $('#'+sStr).fadeIn(200,function() {
	   if($.browser.msie) {
		$('#'+sStr).removeAttr('style');
	   }
	   });
	  });

	 });

	 return false;
	});
	$('.box_full a.back').click(function(){
	 var sStr = $(this).attr('id').replace('close_','');

	 $(this).parents('.box_full').fadeOut(200, function() {
	  $('#closed-block').css({
	   'display':'block',
	   'opacity':0
	  });

	  var iNewH = 0;//$('#closed-block').find()innerHeight();
	  $('#closed-block').find('.news').each(function(){
	   if( $(this).innerHeight()>iNewH ) {
	    iNewH = $(this).innerHeight();
	   }
	  });

	  $('#block-wrap').animate({height:iNewH},150,function(){
	   $('#closed-block').hide();
	   $('#closed-block').css('opacity',1);
	   $('#closed-block').fadeIn(200,function(){
	   if($.browser.msie) {
		$('#closed-block').removeAttr('style');
	   }
	   });
	  });
	 });

	 //$(this).parents('.box_full').hide();
	 //$('#closed-block').show();

	 return false;
	});
	$(".scontent").hide();
	$(".sheading").click(function() {
		var aID = $(this).attr('id').split('_');
		var oBlock = $('#cont_slide_'+aID[2]);
		if($(this).hasClass('current')) {
			$(this).removeClass('current');
		}
		else {
			$(this).addClass('current')
		}
		oBlock.slideToggle(50);
		
		return false;
	});

	$('.gallery').lightBox();
	
	$('.tTip').betterTooltip({speed: 100, delay: 100});
});




