$(function() {
    // Test later .. insert big image in page, see how loading it works console.log("Init ..");
    var reset_skills = function() {
        $("#skills_summary").hide();
        $("#skills .selected").removeClass("selected");
    }
    
    var highlight_skill = function(skill) {
        $("#" + skill).addClass("selected");
    }

    var show_summary = function() {
        reset_skills();

        // Loop through the experience records. Fetch our selected one, then highlight the skills.
        for (var i = 0; i < experiences.length; i ++) {
            var obj = experiences[i];
            if (obj.id == this.id) {
                for (var j = 0; j < obj.skills.length; j ++) {
                    highlight_skill(obj.skills[j]);
                }

                $("#skills_summary").html(obj.description).show();
            }
        }

    
    };
    $("#work_headlines li").hover(show_summary, function() {});
});


var experiences = [
        {"id": "wesellit", 
            "description" : "CTO of WeSellit. Using Django (and previously, PHP) built and maintained internal tools for sales and customer service. Built several websites to promote and sell store goods via a custom built online checkout. Day to day tasks include systems maintenance, creation of marketing material, and assistance in sales.",
            "skills": ["django", "python", "html", "css", "mysql", "php", "jquery", "subversion"]},

        {"id": "csvbrant", 
	    "description" : "Used Django to build a system to allow teachers to book dates with Brant Safety Village and for the team there to review and control the bookings through a simple to use administration panel. Worked with <a href='http://www.wallofscribbles.com'>Corey Dutson</a>, who handled the design",
	    "skills": ["django", "python", "html", "apache", "css", "mysql", "jquery", "Git"]},

        {"id": "gamingw", 
            "description" : "Built several years ago but still stands to this day. Grew into a large community of over 20,000 indie game developers. Site was entirely self coded in PHP until I let it go in 2005 due to other obligations.",
            "skills": ["php", "mysql", "html", "css","javascript"]},

        {"id": "myblog",
            "description" : "A blog to post my thoughts and learnings on a mix of work and life. Generated using <a href='http://github.com/mojombo/jekyll/tree/master'>Jekyll</a>. Been blogging on and off for several years but unfortunately not all posts have been kept since the old days.",
            "skills": ["git","jquery","css","html"]}
        ];
