+// The Google Images database returns links like:
+// http://images.google.com/url?q=http://eofdreams.com/fish.html&sa=U&ei=RAB-U9XNDo2Dqga1o4L4Bw&ved=0CC4Q9QEwAA&usg=AFQjCNFhRtn6GMevHbpITZ6kfx6rsHV2ow
+// This Handlebars helper avoids a pointless redirect by transforming
+// this to the URL of the underling page, in this case
+// http://eofdreams.com/fish.html
+//
+Handlebars.registerHelper('mkws-googleurl', function(obj) {
+ if (!obj) {
+ return "obj undefined";
+ } else if (!obj[0]) {
+ return "obj[0] undefined, JSON=" + $.toJSON(obj);
+ } else {
+ return mkws.getParameterByName('q', obj[0]);
+ }
+});
+
+