jQuery.noConflict();

jQuery(function($){
  var labels = new Object();
  $("input:text").add("input:password").not('.notEmpty').addClass('empty');
  $("input:text").add("input:password").focus(function(){
    if ($(this).hasClass('empty')) {
      labels[$(this).attr('name')] = $(this).val();
      $(this).val('').removeClass('empty');
    }
  });
  $("input:text").add("input:password").blur(function(){
    if (!$(this).val()) {
      $(this).addClass('empty');
      $(this).val(labels[$(this).attr('name')]);
    }
  });
  $("#content ul li:last").css('border','0 none');
  $("#content li>a:first-child").click(function(){
    if (!$(this).hasClass('active')) {
      var parent = $(this).parent();
      $("#content a.active").removeClass('active');
      $(this).addClass('active');
      $(parent).find('img, span').css('z-index','6').animate({opacity:1},900);
      $("#content li.active span").animate({opacity:0},900);
      $("#content li.active img").animate({opacity:0},900,'linear',function(){
        $("#content li.active").find('img, span').css('opacity','0').css('z-index','1');
        $("#content li.active").removeClass('active');
        $(parent).addClass('active');
        $(parent).find('img, span').css('z-index','5');
      });
    }
    return false;
  });
  var impress = $("body").hasClass('showImpress');
  $("#footer a.impress").click(function(){
    if (!impress) {
      $("#minheight").css('margin-top','-4.7em');
      $("#minheight").animate({marginTop: '-12em'},500);
      $("#footer").animate({minHeight: '12em'},500);
      $("#footer div.impress").animate({height: '6.5em'},500);
    } else {
      $("#footer div.impress").animate({height: '0'},500);
      $("#footer").animate({minHeight: '4.6em'},500);
      $("#minheight").animate({marginTop: '-4.6em'},500);
    }
    impress = !impress;
    return false;
  });
});
