if ($.browser.mozilla && parseFloat($.browser.version) < 1.9 && navigator.appVersion.indexOf('Mac') !== -1) $('body').css('-moz-opacity',.999);
$(document).ready(function(){
  if ($.browser.msie) {
    $("#main").addClass('main_ie');
  }
  fnSetElements();
  $(window).resize(function(){
    fnSetElements();
  });
  
  $("a.bigimg").fancybox({
    'hideOnContentClick': true,
    zoomSpeedIn: 800,
    zoomSpeedOut:600,
    fullsize: false
  });  
  
});

  function fnSetElements() {   
    left_col = $(".phone");   
    if (left_col.length != 0) {        
      $("#icons").css("top", (left_col.offset().top + 55) + "px");
      $("#icons").css("left", (left_col.offset().left + - 20) + "px");
    }
  } 

  var d = document;
  function GetById(id) { return d.all ? d.all[id] : d.getElementById(id); }
  function fnDivOn(id) { id.style.visibility = 'visible'; }
  function fnDivOff(id) { id.style.visibility = 'hidden'; }
  function fnx(e) { return e.offsetLeft + (e.offsetParent != null && e.tagName != 'BODY' ? fnx(e.offsetParent) : 0); }
  function fny(e) { return e.offsetTop + (e.offsetParent != null && e.tagName != 'BODY' ? fny(e.offsetParent) : 0); }
  function fnOff(id) { e = GetById(id); e.style.visibility = 'hidden'; }
  function fnOn(id, parent) { e = GetById(id); e.style.left = fnx(parent) + 10; e.style.top = fny(parent) + 34; e.style.visibility = 'visible'; }
  function fnOff2(id) { e = $("#"+ id +""); e.hide(); }
  function fnDivOn2(id) { $(id).show(); }
  function fnDivOff2(id) { $(id).hide(); }
  function fnOn2(id, parent) { e = $("#"+ id +""); e.css("left", (fnx(parent) + 24) + "px");  e.css("top", (fny(parent) + 17) + "px"); e.show(); }

