var timeout=null;var current=0;var limit=1;function showHeader(){if(current>limit){current=0;}var c=current;var a=$("#comp"+c);var b=$("#home"+c);b.height(400);$("#home"+c+" .image").fadeIn("slow");a.fadeIn("slow");$("#ctrl"+c).addClass("active");timeout=setTimeout("hideHeader()",7000);}function hideHeader(){var c=current;var a=$("#comp"+c);var b=$("#home"+c);$("#home"+c+" .image").fadeOut("slow",function(){b.height(0);});$("#ctrl"+c).removeClass("active");a.fadeOut("slow");current=current+1;timeout=setTimeout("showHeader()",1000);}$(document).ready(function(){$("#ctrl0").click(function(){clearTimeout(timeout);var c=current;var a=$("#comp"+c);var b=$("#home"+c);$("#home"+c+" .image").fadeOut("slow",function(){b.height(0);});$("#ctrl"+c).removeClass("active");a.fadeOut("slow",function(){var f=0;current=0;var d=$("#comp"+f);var e=$("#home"+f);e.height(400);$("#home"+f+" .image").fadeIn("slow");d.fadeIn("slow");$("#ctrl"+f).addClass("active");});});$("#ctrl1").click(function(){clearTimeout(timeout);var c=current;var a=$("#comp"+c);var b=$("#home"+c);$("#home"+c+" .image").fadeOut("slow",function(){b.height(0);});$("#ctrl"+c).removeClass("active");a.fadeOut("slow",function(){var f=1;current=f;var d=$("#comp"+f);var e=$("#home"+f);e.height(400);$("#home"+f+" .image").fadeIn("slow");d.fadeIn("slow");$("#ctrl"+f).addClass("active");});});$("#ctrl2").click(function(){clearTimeout(timeout);var c=current;var a=$("#comp"+c);var b=$("#home"+c);$("#home"+c+" .image").fadeOut("slow",function(){b.height(0);});$("#ctrl"+c).removeClass("active");a.fadeOut("slow",function(){var f=2;current=f;var d=$("#comp"+f);var e=$("#home"+f);e.height(400);$("#home"+f+" .image").fadeIn("slow");d.fadeIn("slow");$("#ctrl"+f).addClass("active");});});timeout=setTimeout("showHeader()",600);});

