//siteConfig.spawnExe=false;
if(location.hostname=='en-da.partypoker.com'){
siteConfig.clientUrl = 'http://da.partypoker.com/Downloads/en/'+siteConfig['currentWM']+'/PartyPokerdkSetup.exe';
}else{
siteConfig.clientUrl = 'http://da.partypoker.com/Downloads/da/'+siteConfig['currentWM']+'/PartyPokerdkSetup.exe';
}
app['lobbyWindow']=null;
app['launchPoker']=function(event){
    event.preventDefault();
    if(app.lobbyWindow!=null&&!app.lobbyWindow.closed){if(app.lobbyWindow.isInitialized()){app.lobbyWindow.top.frames[6].document.GameLobby.doJob("36","","")}else{app.lobbyWindow.focus()}return}
    if(utils.getCookie("TDSET")==""&&typeof(siteConfig.tdpeh)!="undefined"){
        $("body").append('<img src="https://secure.partyaccount.dk/earlyexp/setTDUID.do?TDUID='+siteConfig.tdpeh+'" height="1" width="1" border="0" />');
        utils.setDefaultCookie('TDSET','1',siteConfig.domain);
    }
    var D=new Date();
    var a=parseInt(Math.round((window.screen.width-781)/2,0)+"");
    var b=parseInt(Math.round((window.screen.height-537)/2,0)+"");
    var B="FlashClient"+D.getHours()+""+D.getMinutes()+""+D.getSeconds()+""+D.getMilliseconds();
    app.lobbyWindow=window.open("https://poker.partyaccount.dk/client.html?lid="+siteConfig.lang_id+"&wm="+siteConfig.currentWM+"",""+B,"resizable=no,toolbar=no,status=no,height=537,width=781,screenX="+a+",screenY="+b+",left="+a+",top="+b);
    if($(this).attr('href').replace(/#/g,'')!="")location.href=$(this).attr('href');

   // location.href="/anywhere/index-holding.html";
}

//app.redirect("/download", "/instant_play.html");
app.redirect("/responsible_gaming.html", "/responsible-gaming.html","true");

$(function(){
    $('a.launchPoker,div.launchPoker a').click(app['launchPoker']);
    var enlinkchk=$("#language-navigation li:contains('English')");
if(enlinkchk.children('a').length<1){
    enlinkchk.html('<a href="http://en-da.partypoker.com">English</a>');
} 
});   
