unity 4.6 UI disabling click/touch detection on objects behind user interface

Specifically I have a scene with some objects that are clickable!
They have a collider on them and a script which detectes OnClick() and reacts!
Now when I click one of them a pop up appears with some buttons!
When I click a button of the UI menu if there is an object behind that button it also clicks this! Is there a way to no detect click action behind a specific button or img?

There are a couple of ways to do this. The best is to kill OnClick and replace it with the IClickHandler interface from the UnityEngine.EventSystems namespace. You will also have to add a physics raycaster to the camera.

The alternative is to check EventSystem.IsPointerOverGameObject

Edit: Adding a YouTube video, since the question has been asked a few times