function Start(page) {
  OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no, width=800, height=700");
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

$(document).ready(function(){
closetimer = 0;
  if($("#nav")) {
    $("#nav span").mouseover(function() {
    clearTimeout(closetimer);
      if(this.className.indexOf("clicked") != -1) {
        $(this).parent().next().hide(0);
        $(this).removeClass("clicked");
      }
      else {
        $("#nav span").removeClass();
        $(this).addClass("clicked");
        $("#nav ul:visible").hide(0);
        $(this).parent().next().show(0);
      }
      return false;
    });
    $("#nav").mouseover(function() {
    clearTimeout(closetimer);
    });
    $("#nav").mouseout(function() {
      closetimer = window.setTimeout(function(){
      $("#nav ul:visible").hide(0);
      $("#nav span").removeClass("clicked");
      }, 100);
    }); 
  }

  $('a#lhbanner').click(function(e) {
    t = $(this);
    link = {
      href: t.attr('href'),
      target: t.attr('target')
    };
    e.preventDefault();
    page = t.attr('page');
    g = {
      type: 'banner1',
      id: page
    };
    $.get('/?page=lt.html', g, function(d) {
      if(link['target'] != '_blank') {
        window.location = link['href'];
      } else {
      }
    });      
    if(link['target'] == '_blank'){
      window.open(link['href'], '_blank');
    }

  });

  $('input[placeholder]').placeholder({ placeholderTextColour: "#999" });
  $('.round-corners').corner('8px');
  $('.slight-round-corners').corner('4px');

});

