+2  A: 

You are making a function that is immediately being called, with someWord as a parameter.

Rocket
@Rocket: Wow, this is the sharpest answer and I get it. thanks
Shaoz
You're welcome.
Rocket
+3  A: 

It's a way to define an anonymous function and then immediately executing it -- leaving no trace, as it were. The function's scope is truly local. The () brackets at the end execute the function -- the enclosing brackets are to disambiguate what is being executed.

fish2000
+3  A: 

Basically this lets you declare an anonymous function, and then by enclosing it in parentheses and writing (someWord) you are running the function. You could think of it as declaring an object and then immediately instantiating the object.

Justin Ethier
+1  A: 

Perhaps this post will help you a bit.

darioo
+2  A: 

It's used to create anonymous function (function without name that can be "nested" inside other function) and pass argument to that function. The someWord is passed as argument, and the function can read it using the keyword "arguments".

Simple example of usage:

function Foo(myval) {
    (function(){
      // Do something here
      alert(arguments[0]);
    })(myval); //pass myval as argument to anonymous function
}
...
Foo(10);
Shadow Wizard
+7  A: 

You're immediately calling an anonymus function with a specific parameter.

An example:

(function(name){
  alert(name);
})('peter')

This alerts "peter".

In the case of jQuery you might pass jQuery as a parameter and use $ in your function. So you can still use jQuery in noConflict-mode but use the handy $:

jQuery.noConflict()
(function($){
  var obj = $('<div/>', { id: 'someId' });
})(jQuery)
pex
@pex: thanks for the response, it makes sense now
Shaoz
A: 

Thank you very much all for your answers, now I get what it does.

Shaoz