 $(document).ready(function(){
/*******************
     WORKS SHARE TAP
	 ****************/
	 $('#works-share').stop().animate({
      marginRight: -157
    });
$('#works-share').hover(function() {
  $('#share-tap').addClass('hover');
    var $marginRighty = $(this);
    $marginRighty.stop().animate({
      marginRight: -80
    });
  },
  function(){
  $('#share-tap').removeClass('hover');
  var $marginRighty = $(this);
  $marginRighty.stop().animate({
      marginRight: -157
  });
  });
});
	
       	 // Custom sorting plugin
          (function($) {

          	$.fn.sorted = function(customOptions) {
          		var options = {
          			reversed: false,
          			by: function(a) { return a.text(); }
          		};
          		$.extend(options, customOptions);
          		$data = $(this);
          		arr = $data.get();
          		arr.sort(function(a, b) {
          		   	var valA = options.by($(a));
          		   	var valB = options.by($(b));
          			if (options.reversed) {
          				return (valA < valB) ? 1 : (valA > valB) ? -1 : 0;				
          			} else {		
          				return (valA < valB) ? -1 : (valA > valB) ? 1 : 0;	
          			}
          		});
          		return $(arr);
          	};
          })(jQuery);
