var l1open=null,l2open=null;function login(){window.location.href="demo.aspx/login?uid="+$("#username>input").val()+"&pwd="+$("#password>input").val()}function openL2header(a){if(a!=l2open){$(l2open).next("div").slideUp(200)}$(a).next("div").fadeIn(600);l2open=a}$(document).ready(function(){if($.browser.msie){$("body>div:first-child").css("top","8px")}$(".l1content, .l2content").hide();$(".l1header").click(function(){if(l2open!==null){$(l2open).next("div").hide();l2open=null}if(this!=l1open){$(l1open).next("div").slideUp(200)}$(this).next("div").fadeIn(600);l1open=this;var a=$(this).next().children(":first-child");if(a.hasClass("l2header")){openL2header(a[0])}else{$("input:first",$(this).next()).focus()}});$(".l2header").click(function(){openL2header(this)});$(".l1header, .l2header, .demo").hover(function(){$(this).addClass("highlight")},function(){$(this).removeClass("highlight")});$(".demo").click(function(){window.location.href="demo.aspx?uid=demo&pwd=demo"});$("#home").show();l1open=$("#homehdr")[0];$("#loginbtn").bind("click",login);$("#password").bind("keypress",function(a){if(a.keyCode==13){login()}});$("#username").bind("keypress",function(a){if(a.keyCode==13){$("#password input:first").focus()}})});