var pages_arr = new Array();
pages_arr[0] = "future";
pages_arr[1] = "about";
pages_arr[2] = "contact";
pages_arr[3] = "register";
pages_arr[4] = "advertisers";
pages_arr[5] = "terms";
pages_arr[6] = "debit";


function resetClass(){
    $(".navigation_link").removeClass("navigation_selected");
    $.each(pages_arr, function( intIndex, objValue ){
       $("#"+objValue+"_content").hide(); 
    });
    
}

$(document).ready(function(){
    var current_location = window.location.toString();
    var anchor_index = current_location.indexOf('?');
    if (anchor_index != -1) {
        // We have an anchor in the page
        var url_split = current_location.split("?");
        var current_anchor = url_split[1];
        resetClass();        
        $("#"+current_anchor).addClass("navigation_selected");
        $("#"+current_anchor+"_content").fadeIn('fast');
    }

    $(".navigation_link").click(function(event) {
            var current_div = this.id;
            if (current_div == "advertisewithgetfugu"){
                window.location = "http://advertise.getfugu.com/";
            }
            //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
            /*
            var parts = full_url.split("#");
            var trgt = parts[1]; */
            resetClass();
            $(this).addClass("navigation_selected");
            
            $("#"+this.id+"_content").fadeIn("slow");
    });
});
