// chat image

jQuery(document).ready(initChat);

function initChat(){
  var wlh = window.location.hostname;
  switch(wlh){
  case 'rob.tui-interactive.com':
    // image
    if(window.location.href.indexOf('/headernavi/jobs/') == -1 && window.location.search != '?id=2367'){
   	 jQuery('#hotline').html('<div id="liveChat"><a href="javascript:void(0);" onclick="window.open(\'http://robinson.livehub.de/dialog.php?campaign=19&amp;serversession=0&amp;interval=15\',\'popup\',\'toolbar=no,width=700,height=700,resizable=yes,top=20,left=100,scrollbars=yes\');" ><img src="http://robinson.livehub.de/image.php?campaign=19&amp;what=getstate" border=0 ></a></div>');
    }
    break;
		
  case 'ww2.robinson.com':
    // image and tracking on TT pages, only on unsecure pages
    if(window.location.protocol != 'https:'){
    	jQuery('.tt_ibeSidebar div:first').html('<div id="liveChat"><a href="javascript:void(0);" onclick="window.open(\'http://robinson.livehub.de/dialog.php?campaign=1242296613&amp;serversession=0&amp;interval=15\',\'popup\',\'toolbar=no,width=700,height=700,resizable=yes,top=20,left=100,scrollbars=yes\');" ><img src="http://robinson.livehub.de/image.php?campaign=1242296613&amp;what=getstate" border=0 ></a></div><scr'+'ipt type="text/javascript" src="http://robinson.livehub.de/call_livehub.php?campaign=1242296613&amp;what=hidden&amp;serversession=0&amp;interval=15"></sc'+'ript>');
    }
	break;
	
  case 'www.robinson.com':
    // default image and tracking
    if(window.location.href.indexOf('/headernavi/jobs/') == -1 && window.location.search != '?id=2367'){
      jQuery('#hotline').html('<div id="liveChat"><a href="javascript:void(0);" onclick="window.open(\'http://robinson.livehub.de/dialog.php?campaign=19&amp;serversession=0&amp;interval=15\',\'popup\',\'toolbar=no,width=750,height=700,resizable=yes,top=20,left=100,scrollbars=yes\');" ><img src="http://robinson.livehub.de/image.php?campaign=19&amp;what=getstate" border=0 ></a></div><sc'+'ript type="text/javascript" src="http://robinson.livehub.de/call_livehub.php?campaign=19&amp;what=hidden&amp;serversession=0&amp;interval=15"></sc'+'ript>');
    }
    break;
  }
}