what is the difference b/w
$(function(){
});
and
(function ($) {
//found this code in jquery uobtrusive ajax
}(JQuery));
first code snippet is simply shorthand for document ready. i have no idea about second code snippet: what does it do and how does it differ from the first code snippet.