/**
 * jQuery.justifyElements() - Justifying inline elements
 * Copyright (c) 2011 Tuomas Velling - tuomas.velling(at)gmail(dot)com
 * Date: 08/07/2011
 * @author Tuomas Velling
 * @version 0.1
 * Usage: $(el).justifyElements();
 **/ 
jQuery.fn.justifyElements=function(){
	$w=$(this).width();
	$(this).children().each(function(){
		$(this).css('float','left');
		$w=$w-$(this).width();
	});
	$m=($w/($(this).children().length-1))/2;
	$(this).children().each(function(){
		$(this).css('margin-left',$m);
		$(this).css('margin-right',$m);
	});
	$(this).children(':first').css('margin-left',0);
	$(this).children(':last').css('margin-right',0);
};

