var wtoh;
(function($)
{
  /*
  $(window).resize( function(){
    wtoh = $(window).width() / $(window).height();
    $('.full-screen-background-image img')
        .css('width', (wtoh > 1.55)? '100%' : 'auto')
        .css('height', (wtoh > 1.55)? 'auto' : '100%' ); ///images/orm_bg.jpg' : '/images/orm_bg2.jpg' );
  }); 
  $(window).resize();
  */
  
  jQuery('.website_logo a, a.website_link').click(function(){
    var loc = jQuery(this).attr("href");
    
    var newWindow = window.open(loc, '_blank');
    newWindow.focus();
    
    return false;
  })
 
})(jQuery);




function getWindowHeight() 
{
  var windowHeight=0;
  if (typeof(window.innerHeight)=='number') 
  {
    windowHeight=window.innerHeight;
  }
  else 
  {
    if (document.documentElement&&
    document.documentElement.clientHeight) 
    {
      windowHeight= document.documentElement.clientHeight;
    }
    else 
    {
      if (document.body&&document.body.clientHeight) 
      {
       windowHeight=document.body.clientHeight;
      }
    }
  }
  return windowHeight;
}

function setFooter(resize) 
{
  if (document.getElementById) 
  {
    var windowHeight=getWindowHeight();
    
    if (windowHeight>0) 
    {
      var contentHeight=document.getElementById('wrapper').offsetHeight;
      
      var footerElement=document.getElementById('footer');
      var footerHeight=footerElement.offsetHeight;
      if (contentHeight < windowHeight)
      {
        footerElement.style.marginTop='0px';
      }
      if (windowHeight-(contentHeight+footerHeight)>=0) 
      {

        footerElement.style.position='relative';
        footerElement.style.top=(windowHeight-(contentHeight+footerHeight))+'px';
       
      }
      else 
      {
        footerElement.style.position='relative';
      }
      
      
    }
  }
}

window.onload = function() {
  //setFooter(false);
}
window.onresize = function() {
  //setFooter(true);
}  
