I'm using jqtouch using blogging platforms. I wish to built an image gallery catching image from wordpress publish, demonstrate to them on the power grid after which in the tap event load just one image inside a devoted page. I acquired the image from wordpress but how do i implement the 2nd part?(in the tap event load just one image inside a devoted page) here's my code: HTML:

        <div id="home" class="current">
            <div class="toolbar">
                <h1>jQTouch</h1>
            </div>
            <div class="loader" style="display:none;"></div>
            <ul id="thumbs" class="thumbView" style="display:none;" >    
            </ul>
            <div class="info" style="display:none;" >
                  <p>some info</p>
            </div>
        </div>

    <div id="ui">
            <div class="toolbar">
                <h1>my picture</h1>
                <a class="back" href="#">Home</a>
            </div>

            <ul id="theimage" class="rounded">    
            </ul>
    </div>

Here's my javascript:

loadThumbs();

function html_entity_decode(str) {
    try {
        var tarea = document.createElement('textarea');
        tarea.innerHTML = str;
        return tarea.value;
        tarea.parentNode.removeChild(tarea);
    }
    catch (e) {
        //for IE add <div id="htmlconverter" style="display:none;"></div> to the page
        document.getElementById("htmlconverter").innerHTML = '<textarea id="innerConverter">' + str + '</textarea>';
        var content = document.getElementById("innerConverter").value;
        document.getElementById("htmlconverter").innerHTML = "";
        return content;
    }
}

function loadThumbs() {

    var thumbscontainer = $('#home.current');
    var loader = thumbscontainer.find('.loader');
    loader.show();
    var footer = thumbscontainer.find('.info');
    var lista = jQuery('#thumbs.thumbView');
    $.get("http://localhost/wordpress/?feed=rss2", function(data) {
        $(data).find('item').each(function(i, itemRSS) {
            if (!($.browser.webkit)) {
                var content = html_entity_decode($(this).children().eq(8).text());
            } else {
                var content = $(this).children().eq(8).text();
            }
            var image = jQuery(content).find('img').attr('src');
            console.log(content);
            console.log(image);
            var img = $('<img/>', {
                src: image
            });
            var li = $('<li/>', {
                className: 'arrow'
            });
            var a = $('<a/>', {
                href: '#ui'
            });
            a.append(img);
            li.append(a);
            lista.append(li);
            loader.hide();
            thumbscontainer.append(lista.show());
            footer.show();
            img.bind('click', loadPic(this));
        });
    }, 'xml');
}

function loadPic(img) {
    $('#ui').bind('pageAnimationEnd', function(e, info) {
        if (info.direction == 'in') {
            var li = $('<li/>', {
                className: 'arrow'
            });
            var pic_container = jQuery('#ui').find('#theimage.rounded'); /*var thisPic = $('<img/>', {src:immagine});*/
            pic_container.append(li);
            li.append(img);
        }
        else {
            $('#theimage.rounded').empty();
        }
    });
};

My code dies if this begin to run loadPic (img) as well as in firebug i acquired this error:

d is undefined
function(b){return"\\"+b})};c.event={a...if(k.indexOf(".")>-1){r=k.split(".");

I really hope i described good my problem.