(function($){
   
   
   window.jquery_gallery_list_init = function(category,list){
        var $list =$(list);
        $list.html('');
        
        var ul = $("<ul/>").addClass("jquery-gallery-list-normal").hide();
        $.each(category.photos,function(i,v){
            $('<li>').append(
            $('<a/>')
            .attr("href",this["href"])
            .attr("title",this["title"])
            .append($("<img/>")
                .attr("src",this["thumb"])))            
            .appendTo(ul);
        });
        $list.append(ul);
        
        
        var $iframe =$('<iframe></iframe>');
        if(window.jquery_gallery_cycle_iframe){
            $iframe.attr({
                "src":window.jquery_gallery_cycle_iframe,
                "width":600,
                "height":400,
                "frameBorder":0,
                "scrolling":"no",
                "marginHeight":0,
                "marginWidth":0
                
            }).appendTo($list);
            
            $iframe.load(function(){
                $iframe[0].contentWindow.__init(category.photos,ul);
            });
           
          
            
        } 

        if(window.jquery_gallery_view_init){
            $("div.jquery-gallery-viewer").each(function(){
                window.jquery_gallery_view_init(list,this);
            });
        }


   };
   $(function(){  
    

   });
})(jQuery);
