added license. wrap it as a jquery plugin.