WS_OK_7.4.33
(function($){$.fn.flickrfeed=function(userid,tags,options){var defaults={limit:10,imagesize:'small',titletag:'h4',title:true,date:true};var options=$.extend(defaults,options);return this.each(function(i,e){var $e=$(e);var api='http://api.flickr.com/services/feeds/photos_public.gne?lang=en-us&format=json&jsoncallback=?';if(userid!='')api+='&id='+userid;if(tags!='')api+='&tags='+tags;$.getJSON(api,function(data){_callback(e,data,options);});});};var _callback=function(e,data,options){if(!data){return false;}
var html='';html+='<ul>';var feeds=data.items;var count=feeds.length;if(count>options.limit)count=options.limit;for(var i=0;i<count;i++){var photo=feeds[i];var link='<a href="'+photo.link+'">';html+='<li>';var src=photo.media.m;if(options.imagesize=='square')src=src.replace('_m','_s');if(options.imagesize=='thumbnail')src=src.replace('_m','_t');if(options.imagesize=='medium')src=src.replace('_m','');html+=link+'<img src="'+src+'" alt="'+photo.title+'" /></a>'
if(options.title)html+='<'+options.titletag+'>'+photo.title+'</'+options.titletag+'>';if(options.date){var photoDate=new Date(photo.date_taken);photoDate=photoDate.toLocaleDateString()+' '+photoDate.toLocaleTimeString();html+='<div>'+photoDate+'</div>';}
html+='</li>';}
html+='</ul>'
$(e).html(html);};})(jQuery);