Strange object expected error when using .html
<p>This all seems to work great just the really strange thing is when I try to reference the var with .html('g'+index) it throws an object expected error. I guessing building the var isn't the best thing?</p>

<pre><code>var g0 = "&lt;?php getFiles("gallery/Audience"); ?&gt;";
var g1 = "&lt;?php getFiles("gallery/Exhibition"); ?&gt;";
var g2 = "&lt;?php getFiles("gallery/registration"); ?&gt;";
var g3 = "&lt;?php getFiles("gallery/Speakers"); ?&gt;";

$(".galleryButton").each(function (index) {
    $(this).click(function(){
        $('#galleria').html();                              
        $('#galleria').html('g'+index);
        initiateGallery();
    }).mouseover(function() {
        $(this).css('cursor', 'pointer');
        $(this).css('backgroundColor', '#002E53');
    }).mouseout(function(){
        $(this).css('backgroundColor', '#000');
    });
});
</code></pre>
