$('document').ready(function(){
	var url = (fullUrl == null)? fullUrl : window.location.href;
	
	$('.addtocopy').addtocopy({
		htmlcopytxt: '<br>Читать полностью: <a href="'+url+'">'+url+'</a>'
	});
	
	$('.magicimg').hover(
		function(){ $(this).animate({width: $(this).attr('rel'), height: $(this).attr('rel')},200); },
		function(){ $(this).animate({width: $(this).attr('name'), height: $(this).attr('name')},200); }
	);
	
	$('.blogbutton').click(function(){
		var pos = $(this).offset();
		popupbox = new popupBox({width: 400, top: pos.top - 100, scroll: false});
		popupbox.openBox($('#blogpost').html());
		return false;
	});
	
	$('.closepopup').live('click', function(){
		popupbox.closePopup();
		return false;
	});
});
