$(document).ready(function(){
  $('.header-logo a img, .header-heroes .pic,  .header-heroes .links a img').ifixpng();    
    
  if(function_exists("onready")) onready();
    
});

function is_numeric( mixed_var ) {
  return !isNaN(mixed_var * 1);
}

function is_int(val) {
  return (parseFloat(val) == parseInt(val)) && !isNaN(parseInt(val))
}

function function_exists( function_name ) {    // Return TRUE if the given function has been defined
    if (typeof function_name == 'string'){
        return (typeof window[function_name] == 'function');
    } else{
        return (function_name instanceof Function);
    }
}

function openChat() {
  if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) 
    window.event.preventDefault();
  this.newWindow = window.open('http://lite.webim.ru/anycode/webim/client.php?locale=ru', 'webim_', 'toolbar=0,scrollbars=0,location=0,menubar=0,width=600,height=420,resizable=1');
  if(this.newWindow!=null) {
    this.newWindow.focus();
    this.newWindow.opener=window;
  }
  return false;
}