From f952040dd44b914b2d5e405567eb655757dfc85d Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 17 Sep 2009 11:03:35 +0200 Subject: added shadowbody, first js gallery initializer and template modifications --- public/javascripts/shadowbox/adapters/shadowbox-jquery.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 public/javascripts/shadowbox/adapters/shadowbox-jquery.js (limited to 'public/javascripts/shadowbox/adapters/shadowbox-jquery.js') diff --git a/public/javascripts/shadowbox/adapters/shadowbox-jquery.js b/public/javascripts/shadowbox/adapters/shadowbox-jquery.js new file mode 100644 index 0000000..a0965a4 --- /dev/null +++ b/public/javascripts/shadowbox/adapters/shadowbox-jquery.js @@ -0,0 +1 @@ +if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox adapter, jQuery not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(a){return{getStyle:function(c,b){return a(c).css(b)},remove:function(b){a(b).remove()},getTarget:function(b){return b.target},getPageXY:function(b){return[b.pageX,b.pageY]},preventDefault:function(b){b.preventDefault()},keyCode:function(b){return b.keyCode},addEvent:function(d,b,c){a(d).bind(b,c)},removeEvent:function(d,b,c){a(d).unbind(b,c)},append:function(c,b){a(c).append(b)}}}(jQuery);jQuery(Shadowbox.load);(function(a){a.fn.shadowbox=function(b){return this.each(function(){var d=a(this);var e=a.extend({},b||{},a.metadata?d.metadata():a.meta?d.data():{});var c=this.className||"";e.width=parseInt((c.match(/w:(\d+)/)||[])[1])||e.width;e.height=parseInt((c.match(/h:(\d+)/)||[])[1])||e.height;Shadowbox.setup(d,e)})}})(jQuery); \ No newline at end of file -- cgit v1.3