function activateArea(e,a){
    if(typeof(window.original_info1)=='undefined'|| window.original_info1==null){
        window.original_info1 = $('.info1').html();
    }
    var area = $(this).attr('id');
    var i = document.createElement('img');
    i.src = '/images/sprite/'+area+'.png';
    i.width = 44;
    i.height = 44;
    $('#bogus img').css({
        top:'140px',
        left:'140px'
    });
    $('#bogus').html(i);
    $('.sprite-grey_arrow').css({opacity:100}).fadeIn(60,function(){
        $('.sprite-grey_arrow').hide();
        // grow icon
        $('#bogus img').animate({
            width:200,
            height:200,
            top:'66px',
            left:'66px'
        },800);
    });
    if($('.info_holders .'+area).is('div')){
        $('.info1').hide();
        var content = $('.info_holders .'+area).html();
        $('.info2').empty().html(content);
    }
}

function deactivateArea(){
    if($('#bogus img').is('img')){
        $('#bogus img').remove();
    }
    $('.info2').empty();
    $('.info1').show();
}

function initMainAnimation(){
    $('.sprite-grey_arrow').hide();
    $('.options > .sprite').each(function(i,e){
        $(e).hover(activateArea,deactivateArea).click(function(){
            var area = $(e).attr('id').replace(/_/g,'-');
            location.href = '/'+area;
        });
    });
}

$(function(){
    //initMainAnimation();
});
