(function($) {
$(function() {

  $('ul.tabs').delegate('li:not(.current)', 'click', function() {
    $(this).addClass('current').siblings().removeClass('current')
      .parents('div.section').find('div.box').hide().eq($(this).index()).fadeIn(150);
  })

 $('.infotextlite').click (function() {
 $('.infotextlite p').toggle()
	$('#textlite').slideToggle('slow');
 });
  
  $('#search input').focus(function(){
	$(this).attr('value','');
  });
  
  

	$('#search input').blur(function(){
	var atrib = $(this).attr('value');
	if( atrib == '') {
	$(this).attr('value','Что искать?');
  }
  });
  
	var wr = $('.social');
  wr.find('a').css({opacity: 0.5}).hover(
		function() { $(this).css({opacity: 1}); },
		function() { $(this).css({opacity: 0.7}); }
	);
	wr.hover(
		function() { $(this).find('a').css({opacity: 0.5});
			$(this).css({background: '#fff',border: '1px solid #c0c0c0', padding: '7px 7px 0'});
			$(this).find('.soc2').css({visibility: 'visible'});
		},
		function() { $(this).find('a').css({opacity: 0.3});
			$(this).css({background: 'none',border: 'none', padding: '8px 8px 0'});
			$(this).find('.soc2').css({visibility: 'hidden'});
		}
	);
})

})(jQuery)

function social(u,t) {
	var f = 'http://rumasters.net/images/';
	var links = '<div class="social"><div class="soc1"><a href="http://twitter.com/home?status=RT @esender_ ' + t + ' - ' + u + '" title="Добавить в Twitter"><img src="' + f + 'twitter.png" alt="" /></a>' +
		'<a href="http://www.google.com/reader/link?url=' + u + '&title=' + t + '&srcURL=http://rumasters.net/" title="Добавить в Google Buzz"><img src="' + f + 'google-buzz.png" alt="" /></a>' +
		'<a href="http://www.friendfeed.com/share?title=' + t + ' - ' + u + '" title="Добавить в FriendFeed"><img src="' + f + 'friendfeed.png" alt="" /></a>' +
		'<a href="http://www.facebook.com/sharer.php?u=' + u + '" title="Поделиться в Facebook"><img src="' + f + 'facebook.png" alt="" /></a>' +
		'<a href="http://vkontakte.ru/share.php?url=' + u + '" title="Поделиться ВКонтакте"><img src="' + f + 'vkontakte.png" alt="" /></a>' +
		'<a href="http://connect.mail.ru/share?share_url=' + u + '" title="Поделиться в Моем Мире"><img src="' + f + 'moy-mir.png" alt="" /></a>' +
		'</div><div class="soc2"><a href="http://www.livejournal.com/update.bml?event=' + u + '&subject=' + t + '" title="Опубликовать в своем блоге livejournal.com"><img src="' + f + 'livejournal.png" alt="" /></a>' +
		'<a href="http://delicious.com/save?url=' + u + '&title=' + t + '" title="Сохранить закладку в Delicious"><img src="' + f + 'delicious.png" alt="" /></a>' +
		'<a href="http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=' + u + '&title=' + t + '" title="Сохранить закладку в Google"><img src="' + f + 'google.png" alt="" /></a>' +
		'<a href="http://bobrdobr.ru/add.html?url=' + u + '&title=' + t + '" title="Забобрить"><img src="' + f + 'bobrdobr.png" alt="" /></a>' +
		'<a href="http://memori.ru/link/?sm=1&u_data[url]=' + u + '&u_data[name]=' + t + '" title="Сохранить закладку в Memori.ru"><img src="' + f + 'memori.png" alt="" /></a>' +
		'<a href="http://www.mister-wong.ru/index.php?action=addurl&bm_url=' + u + '&bm_description=' + t + '" title="Сохранить закладку в Мистер Вонг"><img src="' + f + 'mister-wong.png" alt="" /></a></div></div>' + '';
	document.write(links);
}
