$(function(){
var infoBlockH = $("#text1");
var infoBlock = $("#text");
infoBlockH.children(".cut").appendTo(infoBlock);
var height_h = infoBlock.height();
infoBlockH.children().appendTo(infoBlock);
infoBlockH.remove();
var height = infoBlock.height();
infoBlock.css("height", height_h+'px');
if (height != height_h){
infoBlock.after(
'&lt;div class="site_info_block_text_link" '+
'onclick="javascript:'+
'var d=$(\'#text\');'+
'if(d.height()=='+height_h+'){'+
'd.animate({height:'+height+'+\'px\'},\'slow\');'+
'$(this).html(\'&lt;span&gt;Скрыть текст &lt;&lt;&lt;&lt;/span&gt;\');'+
'}'+
'else{'+
'd.animate({height:\''+height_h+'px\'},\'slow\');'+
'$(this).html(\'&lt;span&gt;Читать далее &gt;&gt;&gt;&lt;/span&gt;\');'+
'}'+
'"'+
'&gt;&lt;span&gt;Читать далее &gt;&gt;&gt;&lt;/span&gt;&lt;/div&gt;'
);
}
});
</script>
