The settings for a link to open in a new window vs opening in a tab is client based. You cannot make this choice programatically, even with normal jquery/javascript. Every browser is different and almost every browser allows the user to pick which default behavior they want when a link generating a "popup"is clicked. (tab vs window)
By default, IE opens in a new window and Firefox opens in a new tab, and some other browsers do not even have tabs. If you want to change your settings, here are the steps:
IE (7, 8, and 9):
Tools -> Internet Options -> Tabs -> Settings -> “When a pop-up is encountered”
Select “Always open pop-ups in a new tab”
Firefox:
Tools -> Options -> Tabs
Select “Open new windows in a new tab instead”
There may be newer functions you can use to override these browser settings, but I do not know of any.