jQuery.extend({BgImageTransitions:[]});jQuery.fn.extend({BgImageTransition:function(f,b){if(!f){return jQuery}function e(h,g){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(k,j){jQuery(g).css(j,jQuery(h).css(j))})}if(!this.css("zIndex")){this.css("zIndex",1)}var c=jQuery.extend({effect:{opacity:"toggle"},duration:"slow",easing:"linear",callback:function(){},helperElementId:this.attr("id")+"2",zindex:parseInt(this.css("zIndex"),10)+1},b);var a=null;if(!jQuery.BgImageTransitions[this.attr("id")]){a=this.clone();e(this,a);a.css("zIndex",c.zindex);a.css("display","none");a.attr("id",c.helperElementId);a.insertAfter(this);jQuery.BgImageTransitions[this.attr("id")]=a}else{a=jQuery.BgImageTransitions[this.attr("id")]}var d=new Image();jQuery(d).load(function(){var g=(a.css("display")=="block")?jQuery(this):jQuery(a);g.css("backgroundImage","url("+d.src+")");a.animate(c.effect,c.duration,c.easing,c.callback)});d.src=f;return jQuery}});
