function goToByScroll(id){
    	$("#subHeader ul li").removeClass("selected"); 
		$("#subHeader ul li."+id+"Sub").addClass("selected");
		// $("object").css("visibility","hidden");
		$('html,body').animate({scrollTop: $("body ."+id).offset().top},'slow');
		// $("object").css("visibility","visible");
}
$(function()
{
        $('.slide') .css({'height': (($(window).height()) )});
        $('.content-frame') .css({'height': (($(window).height()) - 63)+'px'});
    
        $(window).bind('resize', function(){
            $('.slide') .css({'height': (($(window).height()) )});
            $('.content-frame') .css({'height': (($(window).height()) - 63)+'px'});
        });
});
 
$('document').ready(function(){
	$("div.content-frame").vAlign("div");
	$("#subHeader ul li").hover(function(){
        // $(this).css("border-bottom","3px solid #000");
    }, function() {
        // $(this).css("border-bottom","0px solid #000");
	});
	$("#subHeader ul li").click(function(){
       $("#subHeader ul li").removeClass("selected"); 
	   $(this).addClass("selected"); 
	});
});
 
(function ($) {
	$.fn.vAlign = function(container) {
		return this.each(function(i){
			if(container == null) {
				container = 'div';
			}
			$(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
			var el = $(this).children(container + ":first");
			var elh = $(el).height(); //new element height
			var ph = $(this).height(); //parent height
			var nh = (ph - elh) / 2; //new height to apply
			$(el).css('padding-top', nh);
		});
	};
})(jQuery);
