/* Homepage Tabs
/*----------------------------*/

$(function () {
	var tabContainers = $('div.tabs > div');
	tabContainers.hide().filter(':first').show();
    $('div.tabs ul.tabNavigation a.scrollpage').click(function () {
        $('html, body').animate({scrollTop: '410px'}, 500);
        tabContainers.hide();
        tabContainers.filter(this.hash).fadeIn("slow").show();
        $('div.tabs ul.tabNavigation a.scrollpage').removeClass('selected');
        $(this).addClass('selected');
        $("#footer").css("height","150px");
        return false;
    });

    $('.scrollpage1').click(function(){
      $('html, body').animate({scrollTop: '410px'}, 500);
       tabContainers.hide();
        tabContainers.filter(this.hash).fadeIn("slow").show();
        $('div.tabs ul.tabNavigation a').removeClass('selected');
        $(this).addClass('selected');
        $("#footer").css("height","150px");
        return false;
    });

	var $sh = screen.height;
	var $fh;
	if($sh > 830){
	   $fh = $sh - 690;
	   $("#footer").css("height",$fh+"px");
	}


});

$(document).ready(function(){
    // display first section - quick hack
    var tabContainers = $('div.tabs > div');

    tabContainers.hide();
    tabContainers.filter('#second').fadeIn("slow").show();
    $('div.tabs ul.tabNavigation a.scrollpage').removeClass('selected');
    $('.tabNavigation [href="\#second"]').addClass('selected');
    $("#footer").css("height","150px");
});

