
jQuery.fn.wait = function(time, type) {
	time = time || 1000;
	type = type || "fx";
	return this.queue(type, function() {
		var self = this;
		setTimeout(function() {
			jQuery(self).dequeue();
		}, time);
	});
};

// Social Media Row (init and animate)
jQuery(document).ready(function() {	
	
	jQuery('#social_media_row').hover(
		function() {
			jQuery('ul',this).stop(true).animate({
				marginLeft: '0px'
			})
		},
		function() {
			jQuery('ul',this).stop(true).animate({
				marginLeft: '-20px'
			})
		}
	),
	jQuery('#social_media_row a').hover(
		function() {
			jQuery(this).stop(true).fadeTo('fast', 1.0)
		},
		function() {
			jQuery(this).stop(true).fadeTo('fast', 0.6)
		}
	),
	jQuery('#social_media_row a').wait().fadeTo('slow', 0.6, function() {
		jQuery('#social_media_row ul').stop(true).animate({
			marginLeft: '-20px'
		})
	})

});

