jQuery.extend({BgImageTransitions:[]}),jQuery.fn.extend({BgImageTransition:function(a,b){function c(a,b){jQuery(["border-bottom-color","border-bottom-style","border-bottom-width","border-left-lolor","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-spacing","border-top-color","border-top-style","border-top-width","bottom","height","left","margin-bottom","margin-left","margin-right","margin-top","marker-offset","max-height","max-width","min-height","min-width","opacity","outline-color","outline-offset","outline-width","padding-bottom","padding-left","padding-right","padding-top","position","right","top","width","z-index"]).each(function(c,d){jQuery(b).css(d,jQuery(a).css(d))})}if(!a)return jQuery;this.css("zIndex")||this.css("zIndex",1);var d=jQuery.extend({effect:{opacity:"toggle"},duration:"slow",easing:"linear",callback:function(){},helperElementId:this.attr("id")+"2",zindex:parseInt(this.css("zIndex"),10)+1},b),e=null;jQuery.BgImageTransitions[this.attr("id")]?e=jQuery.BgImageTransitions[this.attr("id")]:(e=this.clone(),c(this,e),e.css("zIndex",d.zindex),e.css("display","none"),e.attr("id",d.helperElementId),e.insertAfter(this),jQuery.BgImageTransitions[this.attr("id")]=e);var f=new Image;return jQuery(f).load(function(){var a=e.css("display")=="block"?jQuery(this):jQuery(e);a.css("backgroundImage","url("+f.src+")"),e.animate(d.effect,d.duration,d.easing,d.callback)}),f.src=a,jQuery}})
