var scrollSpeed = 30;
var step = 1;
var current = 0;
var imageWidth = 2000;
var headerWidth = 800;

var restartPosition = 2000;

function Clouds(){
    current -= step;
    if (current == restartPosition){
        current = 0;
    }

    $('#clouds').css("background-position",current+"px 0");
}

// var init = setInterval("Clouds()", scrollSpeed);
function SetTab(number){
    var tabIds = Array("whatTab","howTab","whereTab");
    for(var counter = 0; counter < tabIds.length; counter++){
        if (number != counter){
            $("#"+tabIds[counter]).removeClass("selected");
        }else{
             $("#"+tabIds[counter]).addClass("selected");
        }
    }
   ShowTabContent(number);
}//function SetTab(number){
$(document).ready(function(){
    //Tabs
    SetTab(0);
    // Clouds();
    $('#sky1').animate({
        opacity: 0
    }, 15000, function() {
        $('#sky2').animate({
            opacity: 0
        }, 15000, function() {
            // Animation complete.
            });
    });
});

function HideAndShow(hideId, showId){
var speed = 300;
$("#"+hideId).animate({opacity: 'toggle'},speed,function(){
    $("#"+showId).animate({opacity: 'toggle'},speed,function(){});
});
}
function ShowTabContent(number){
    var tabIds = Array("tabContent","howTab","whereTab");
    var speed = 300;
    for(var counter = 0; counter < tabIds.length; counter++){
        if (number != counter){
            $("#tabContent"+counter).animate({opacity: 0},speed,function(){});
        }else{
             $("#tabContent"+counter).animate({opacity: 1},speed,function(){});
        }
    }
}

