MT 1110 : Balance cart and lists : cart is now in the intranet
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / lib / jquery / plugins / jquery.dropshadow-min.js
1 (function(B){var A=1;B.fn.dropShadow=function(C){var D=B.extend({left:4,top:4,blur:2,opacity:0.5,color:"black",swap:false},C);var E=B([]);this.not(".dropShadow").each(function(){var N=B(this);var J=[];var G=(D.blur<=0)?0:D.blur;var M=(G==0)?D.opacity:D.opacity/(G*8);var O=(D.swap)?A:A+1;var F=(D.swap)?A+1:A;var P;if(this.id){P=this.id+"_dropShadow"}else{P="ds"+(1+Math.floor(9999*Math.random()))}B.data(this,"shadowId",P);B.data(this,"shadowOptions",C);N.attr("shadowId",P).css("zIndex",O);if(N.css("position")!="absolute"){N.css({position:"relative",zoom:1})}bgColor=N.css("backgroundColor");if(bgColor=="rgba(0, 0, 0, 0)"){bgColor="transparent"}if(bgColor!="transparent"||N.css("backgroundImage")!="none"||this.nodeName=="SELECT"||this.nodeName=="INPUT"||this.nodeName=="TEXTAREA"){J[0]=B("<div></div>").css("background",D.color)}else{J[0]=N.clone().removeAttr("id").removeAttr("name").removeAttr("shadowId").css("color",D.color)}J[0].addClass("dropShadow").css({height:N.outerHeight(),left:G,opacity:M,position:"absolute",top:G,width:N.outerWidth(),zIndex:F});var L=(8*G)+1;for(K=1;K<L;K++){J[K]=J[0].clone()}var K=1;var I=G;while(I>0){J[K].css({left:I*2,top:0});J[K+1].css({left:I*4,top:I*2});J[K+2].css({left:I*2,top:I*4});J[K+3].css({left:0,top:I*2});J[K+4].css({left:I*3,top:I});J[K+5].css({left:I*3,top:I*3});J[K+6].css({left:I,top:I*3});J[K+7].css({left:I,top:I});K+=8;I--}var H=B("<div></div>").attr("id",P).addClass("dropShadow").css({left:N.position().left+D.left-G,marginTop:N.css("marginTop"),marginRight:N.css("marginRight"),marginBottom:N.css("marginBottom"),marginLeft:N.css("marginLeft"),position:"absolute",top:N.position().top+D.top-G,zIndex:F});for(K=0;K<L;K++){H.append(J[K])}N.after(H);E=E.add(H);B(window).resize(function(){try{H.css({left:N.position().left+D.left-G,top:N.position().top+D.top-G})}catch(Q){}});A+=2});return this.pushStack(E)};B.fn.redrawShadow=function(){this.removeShadow();return this.each(function(){var C=B.data(this,"shadowOptions");B(this).dropShadow(C)})};B.fn.removeShadow=function(){return this.each(function(){var C=B(this).shadowId();B("div#"+C).remove()})};B.fn.shadowId=function(){return B.data(this[0],"shadowId")};B(function(){var C="<style type='text/css' media='print'>";C+=".dropShadow{visibility:hidden;}</style>";B("head").append(C)})})(jQuery);