(function($) {
	$.fn.toggleSlide = function(settings)
	{
		if(settings==undefined) {
			settings={ speedIn : 'slow'};
		}

		settings = jQuery.extend(
				{
					speedIn: "normal",
					speedOut: settings.speedIn
				}, settings
		);
		return this.each(function()
				{
			var isHidden = jQuery(this).is(":hidden");
			jQuery(this)[ isHidden ? "slideDown" : "slideUp" ]( isHidden ? settings.speedIn : settings.speedOut);
				});
	};
})(jQuery);

$(document).ready(function(){
	$("#fb a").click(function(){
		$("#facebook").toggleSlide("slow");
	});
	$("#vk a").click(function(){
		$("#vkontakte").css("visibility", "visible");
	});
	$("#tw a").click(function(){
		$("#twitter").toggleSlide("slow");
	});
});

$(document).mouseup(function(e){$("#facebook").hide('slow'); $("#twitter").hide('slow'); $("#vkontakte").css("visibility", "hidden");});

