

(function(B){B.ui={plugin:{add:function(F,G,D){var H=B.ui[F].prototype;for(var E in D){H.plugins[E]=H.plugins[E]||[];H.plugins[E].push([G,D[E]])}},call:function(E,G,F){var D=E.plugins[G];if(!D){return }for(var H=0;H<D.length;H++){if(E.options[D[H][0]]){D[H][1].apply(E.element,F)}}}},cssCache:{},css:function(E){if(B.ui.cssCache[E]){return B.ui.cssCache[E]}var F=B('<div class="ui-gen">').addClass(E).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");B.ui.cssCache[E]=!!((!(/auto|default/).test(F.css("cursor"))||(/^[1-9]/).test(F.css("height"))||(/^[1-9]/).test(F.css("width"))||!(/none/).test(F.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(F.css("backgroundColor"))));try{B("body").get(0).removeChild(F.get(0))}catch(D){}return B.ui.cssCache[E]},disableSelection:function(D){D.unselectable="on";D.onselectstart=function(){return false};if(D.style){D.style.MozUserSelect="none"}},enableSelection:function(D){D.unselectable="off";D.onselectstart=function(){return true};if(D.style){D.style.MozUserSelect=""}},hasScroll:function(D,F){var E=/top/.test(F||"top")?"scrollTop":"scrollLeft",G=false;if(D[E]>0){return true}D[E]=1;G=D[E]>0?true:false;D[E]=0;return G}};var A=B.fn.remove;B.fn.remove=function(){B("*",this).add(this).trigger("remove");return A.apply(this,arguments)};function C(F,G,D){var E=B[F][G].getter||[];E=(typeof E=="string"?E.split(/,?\s+/):E);return(B.inArray(D,E)!=-1)}B.widget=function(F,E){var D=F.split(".")[0];F=F.split(".")[1];B.fn[F]=function(H){var J=(typeof H=="string"),G=Array.prototype.slice.call(arguments,1);if(J&&C(D,F,H)){var I=B.data(this[0],F);return(I?I[H].apply(I,G):undefined)}return this.each(function(){var K=B.data(this,F);if(J&&K&&B.isFunction(K[H])){K[H].apply(K,G)}else{if(!J){B.data(this,F,new B[D][F](this,H))}}})};B[D][F]=function(I,H){var G=this;this.widgetName=F;this.widgetBaseClass=D+"-"+F;this.options=B.extend({},B.widget.defaults,B[D][F].defaults,H);this.element=B(I).bind("setData."+F,function(L,J,K){return G.setData(J,K)}).bind("getData."+F,function(K,J){return G.getData(J)}).bind("remove",function(){return G.destroy()});this.init()};B[D][F].prototype=B.extend({},B.widget.prototype,E)};B.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(D){return this.options[D]},setData:function(E,D){this.options[E]=D;if(E=="disabled"){this.element[D?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};B.widget.defaults={disabled:false};B.ui.mouse={mouseInit:function(){var D=this;this.element.bind("mousedown."+this.widgetName,function(E){return D.mouseDown(E)});if(B.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(B.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(G){(this._mouseStarted&&this.mouseUp(G));this._mouseDownEvent=G;var F=this,D=(G.which==1),E=(typeof this.options.cancel=="string"?B(G.target).is(this.options.cancel):false);if(!D||E||!this.mouseCapture(G)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){F._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(G)&&this.mouseDelayMet(G)){this._mouseStarted=(this.mouseStart(G)!==false);if(!this._mouseStarted){G.preventDefault();return true}}this._mouseMoveDelegate=function(H){return F.mouseMove(H)};this._mouseUpDelegate=function(H){return F.mouseUp(H)};B(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(D){if(B.browser.msie&&!D.button){return this.mouseUp(D)}if(this._mouseStarted){this.mouseDrag(D);return false}if(this.mouseDistanceMet(D)&&this.mouseDelayMet(D)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,D)!==false);(this._mouseStarted?this.mouseDrag(D):this.mouseUp(D))}return !this._mouseStarted},mouseUp:function(D){B(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(D)}return false},mouseDistanceMet:function(D){return(Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance)},mouseDelayMet:function(D){return this._mouseDelayMet},mouseStart:function(D){},mouseDrag:function(D){},mouseStop:function(D){},mouseCapture:function(D){return true}};B.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery); (function(A){A.widget("ui.draggable",A.extend(A.ui.mouse,{init:function(){var B=this.options;if(B.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.element.addClass("ui-draggable");(B.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(E){var C=this.options;if(this.helper||C.disabled||A(E.target).is(".ui-resizable-handle")){return false}var H=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==E.target){H=true}});if(!H){return false}if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.helper=A.isFunction(C.helper)?A(C.helper.apply(this.element[0],[E])):(C.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((C.appendTo=="parent"?this.element[0].parentNode:C.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:E.pageX-this.offset.left,top:E.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var G=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){G={top:0,left:0}}this.offset.parent={top:G.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:G.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var D=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:D.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:D.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(E);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(C.cursorAt){if(C.cursorAt.left!=undefined){this.offset.click.left=C.cursorAt.left+this.margins.left}if(C.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-C.cursorAt.right+this.margins.left}if(C.cursorAt.top!=undefined){this.offset.click.top=C.cursorAt.top+this.margins.top}if(C.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-C.cursorAt.bottom+this.margins.top}}if(C.containment){if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(C.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(C.containment)){var B=A(C.containment)[0];var F=A(C.containment).offset();this.containment=[F.left+(parseInt(A(B).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,F.top+(parseInt(A(B).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,F.left+Math.max(B.scrollWidth,B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),F.top+Math.max(B.scrollHeight,B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",E);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,E)}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(E);return true},convertPositionTo:function(D,B){if(!B){B=this.position}var C=D=="absolute"?1:-1;return{top:(B.top+this.offset.relative.top*C+this.offset.parent.top*C-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*C+(this.cssPosition=="fixed"?A(document).scrollTop():0)*C+this.margins.top*C),left:(B.left+this.offset.relative.left*C+this.offset.parent.left*C-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*C+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*C+this.margins.left*C)}},generatePosition:function(F){var B=this.options;var C={top:(F.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(F.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return C}if(this.containment){if(C.left<this.containment[0]){C.left=this.containment[0]}if(C.top<this.containment[1]){C.top=this.containment[1]}if(C.left>this.containment[2]){C.left=this.containment[2]}if(C.top>this.containment[3]){C.top=this.containment[3]}}if(B.grid){var E=this.originalPosition.top+Math.round((C.top-this.originalPosition.top)/B.grid[1])*B.grid[1];C.top=this.containment?(!(E<this.containment[1]||E>this.containment[3])?E:(!(E<this.containment[1])?E-B.grid[1]:E+B.grid[1])):E;var D=this.originalPosition.left+Math.round((C.left-this.originalPosition.left)/B.grid[0])*B.grid[0];C.left=this.containment?(!(D<this.containment[0]||D>this.containment[2])?D:(!(D<this.containment[0])?D-B.grid[0]:D+B.grid[0])):D}return C},mouseDrag:function(B){this.position=this.generatePosition(B);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},mouseStop:function(B){if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,B)}if(this.options.revert){var C=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){C.propagate("stop",B);C.clear()})}else{this.propagate("stop",B);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(B,C){A.ui.plugin.call(this,B,[C,this.uiHash()]);return this.element.triggerHandler(B=="drag"?B:"drag"+B,[C,this.uiHash()],this.options[B])},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});A.ui.plugin.add("draggable","cursor",{start:function(B,D){var C=A("body");if(C.css("cursor")){D.options._cursor=C.css("cursor")}C.css("cursor",D.options.cursor)},stop:function(B,C){if(C.options._cursor){A("body").css("cursor",C.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(B,D){var C=A(D.helper);if(C.css("zIndex")){D.options._zIndex=C.css("zIndex")}C.css("zIndex",D.options.zIndex)},stop:function(B,C){if(C.options._zIndex){A(C.helper).css("zIndex",C.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(B,D){var C=A(D.helper);if(C.css("opacity")){D.options._opacity=C.css("opacity")}C.css("opacity",D.options.opacity)},stop:function(B,C){if(C.options._opacity){A(C.helper).css("opacity",C.options._opacity)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){A(C.options.iframeFix===true?"iframe":C.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","scroll",{start:function(E,D){var B=D.options;var C=A(this).data("draggable");B.scrollSensitivity=B.scrollSensitivity||20;B.scrollSpeed=B.scrollSpeed||20;C.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);C.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){C.overflowYOffset=C.overflowY.offset()}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){C.overflowXOffset=C.overflowX.offset()}},drag:function(E,D){var B=D.options;var C=A(this).data("draggable");if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){if((C.overflowYOffset.top+C.overflowY[0].offsetHeight)-E.pageY<B.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop+B.scrollSpeed}if(E.pageY-C.overflowYOffset.top<B.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop-B.scrollSpeed}}else{if(E.pageY-A(document).scrollTop()<B.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-B.scrollSpeed)}if(A(window).height()-(E.pageY-A(document).scrollTop())<B.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+B.scrollSpeed)}}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){if((C.overflowXOffset.left+C.overflowX[0].offsetWidth)-E.pageX<B.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft+B.scrollSpeed}if(E.pageX-C.overflowXOffset.left<B.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft-B.scrollSpeed}}else{if(E.pageX-A(document).scrollLeft()<B.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-B.scrollSpeed)}if(A(window).width()-(E.pageX-A(document).scrollLeft())<B.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+B.scrollSpeed)}}}});A.ui.plugin.add("draggable","snap",{start:function(B,D){var C=A(this).data("draggable");C.snapElements=[];A(D.options.snap===true?".ui-draggable":D.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=C.element[0]){C.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(P,C){var O=A(this).data("draggable");var R=C.options.snapTolerance||20;var E=C.absolutePosition.left,J=E+O.helperProportions.width,F=C.absolutePosition.top,D=F+O.helperProportions.height;for(var N=O.snapElements.length-1;N>=0;N--){var K=O.snapElements[N].left,I=K+O.snapElements[N].width,H=O.snapElements[N].top,B=H+O.snapElements[N].height;if(!((K-R<E&&E<I+R&&H-R<F&&F<B+R)||(K-R<E&&E<I+R&&H-R<D&&D<B+R)||(K-R<J&&J<I+R&&H-R<F&&F<B+R)||(K-R<J&&J<I+R&&H-R<D&&D<B+R))){continue}if(C.options.snapMode!="inner"){var Q=Math.abs(H-D)<=20;var G=Math.abs(B-F)<=20;var M=Math.abs(K-J)<=20;var L=Math.abs(I-E)<=20;if(Q){C.position.top=O.convertPositionTo("relative",{top:H-O.helperProportions.height,left:0}).top}if(G){C.position.top=O.convertPositionTo("relative",{top:B,left:0}).top}if(M){C.position.left=O.convertPositionTo("relative",{top:0,left:K-O.helperProportions.width}).left}if(L){C.position.left=O.convertPositionTo("relative",{top:0,left:I}).left}}if(C.options.snapMode!="outer"){var Q=Math.abs(H-F)<=20;var G=Math.abs(B-D)<=20;var M=Math.abs(K-E)<=20;var L=Math.abs(I-J)<=20;if(Q){C.position.top=O.convertPositionTo("relative",{top:H,left:0}).top}if(G){C.position.top=O.convertPositionTo("relative",{top:B-O.helperProportions.height,left:0}).top}if(M){C.position.left=O.convertPositionTo("relative",{top:0,left:K}).left}if(L){C.position.left=O.convertPositionTo("relative",{top:0,left:I-O.helperProportions.width}).left}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(B,D){var C=A(this).data("draggable");C.sortables=[];A(D.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");C.sortables.push({instance:E,shouldRevert:E.options.revert});E.refreshItems();E.propagate("activate",B,C)}})},stop:function(B,D){var C=A(this).data("draggable");A.each(C.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;C.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(B);this.instance.element.triggerHandler("sortreceive",[B,A.extend(this.instance.ui(),{sender:C.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",B,C)}})},drag:function(B,F){var E=A(this).data("draggable"),C=this;var D=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G)};A.each(E.sortables,function(G){if(D.call(E,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(C).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return F.helper[0]};B.target=this.instance.currentItem[0];this.instance.mouseCapture(B,true);this.instance.mouseStart(B,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E.propagate("toSortable",B)}if(this.instance.currentItem){this.instance.mouseDrag(B)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(B,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E.propagate("fromSortable",B)}}})}});A.ui.plugin.add("draggable","stack",{start:function(B,C){var D=A.makeArray(A(C.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||C.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||C.options.stack.min)});A(D).each(function(E){this.style.zIndex=C.options.stack.min+E});this[0].style.zIndex=C.options.stack.min+D.length}})})(jQuery); (function(A){A.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var B=this.options,C=B.accept;B=A.extend(B,{accept:B.accept&&B.accept.constructor==Function?B.accept:function(D){return A(D).is(C)}});this.proportions={width:this.element.outerWidth(),height:this.element.outerHeight()};A.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}},destroy:function(){var C=A.ui.ddmanager.droppables;for(var B=0;B<C.length;B++){if(C[B]==this){C.splice(B,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},over:function(B){var C=A.ui.ddmanager.current;if(!C||(C.currentItem||C.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(C.currentItem||C.element))){A.ui.plugin.call(this,"over",[B,this.ui(C)]);this.element.triggerHandler("dropover",[B,this.ui(C)],this.options.over)}},out:function(B){var C=A.ui.ddmanager.current;if(!C||(C.currentItem||C.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(C.currentItem||C.element))){A.ui.plugin.call(this,"out",[B,this.ui(C)]);this.element.triggerHandler("dropout",[B,this.ui(C)],this.options.out)}},drop:function(E,D){var C=D||A.ui.ddmanager.current;if(!C||(C.currentItem||C.element)[0]==this.element[0]){return false}var B=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(C,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){B=true;return false}});if(B){return false}if(this.options.accept.call(this.element,(C.currentItem||C.element))){A.ui.plugin.call(this,"drop",[E,this.ui(C)]);this.element.triggerHandler("drop",[E,this.ui(C)],this.options.drop);return true}return false},activate:function(B){var C=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[B,this.ui(C)]);if(C){this.element.triggerHandler("dropactivate",[B,this.ui(C)],this.options.activate)}},deactivate:function(B){var C=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[B,this.ui(C)]);if(C){this.element.triggerHandler("dropdeactivate",[B,this.ui(C)],this.options.deactivate)}}});A.extend(A.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});A.ui.intersect=function(J,D,H){if(!D.offset){return false}var B=(J.positionAbs||J.position.absolute).left,L=B+J.helperProportions.width,G=(J.positionAbs||J.position.absolute).top,F=G+J.helperProportions.height;var C=D.offset.left,K=C+D.proportions.width,I=D.offset.top,E=I+D.proportions.height;switch(H){case"fit":return(C<B&&L<K&&I<G&&F<E);break;case"intersect":return(C<B+(J.helperProportions.width/2)&&L-(J.helperProportions.width/2)<K&&I<G+(J.helperProportions.height/2)&&F-(J.helperProportions.height/2)<E);break;case"pointer":return(C<((J.positionAbs||J.position.absolute).left+(J.clickOffset||J.offset.click).left)&&((J.positionAbs||J.position.absolute).left+(J.clickOffset||J.offset.click).left)<K&&I<((J.positionAbs||J.position.absolute).top+(J.clickOffset||J.offset.click).top)&&((J.positionAbs||J.position.absolute).top+(J.clickOffset||J.offset.click).top)<E);break;case"touch":return((G>=I&&G<=E)||(F>=I&&F<=E)||(G<I&&F>E))&&((B>=C&&B<=K)||(L>=C&&L<=K)||(B<C&&L>K));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(E,B){var C=A.ui.ddmanager.droppables;var F=B?B.type:null;for(var D=0;D<C.length;D++){if(C[D].options.disabled||(E&&!C[D].options.accept.call(C[D].element,(E.currentItem||E.element)))){continue}C[D].visible=C[D].element.is(":visible");if(!C[D].visible){continue}C[D].offset=C[D].element.offset();C[D].proportions={width:C[D].element.outerWidth(),height:C[D].element.outerHeight()};if(F=="dragstart"||F=="sortactivate"){C[D].activate.call(C[D],B)}}},drop:function(C,D){var B=false;A.each(A.ui.ddmanager.droppables,function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(C,this,this.options.tolerance)){B=this.drop.call(this,D)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(C.currentItem||C.element))){this.isout=1;this.isover=0;this.deactivate.call(this,D)}});return B},drag:function(C,B){if(C.options.refreshPositions){A.ui.ddmanager.prepareOffsets(C,B)}A.each(A.ui.ddmanager.droppables,function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(C,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(".ui-droppable:eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F.isover=0;F.isout=1;F.out.call(F,B)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"over":"out"].call(this,B);if(F&&G=="isout"){F.isout=0;F.isover=1;F.over.call(F,B)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(B,C){A(this).addClass(C.options.activeClass)},deactivate:function(B,C){A(this).removeClass(C.options.activeClass)},drop:function(B,C){A(this).removeClass(C.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(B,C){A(this).addClass(C.options.hoverClass)},out:function(B,C){A(this).removeClass(C.options.hoverClass)},drop:function(B,C){A(this).removeClass(C.options.hoverClass)}})})(jQuery); jQuery.extend({ImpromptuDefaults:{prefix:"jqi",buttons:{Ok:true},loaded:function(){},submit:function(){return true},callback:function(){},opacity:0.6,zIndex:999,overlayspeed:"slow",promptspeed:"fast",show:"show",focus:0,useiframe:false},SetImpromptuDefaults:function(A){jQuery.ImpromptuDefaults=jQuery.extend({},jQuery.ImpromptuDefaults,A)},prompt:function(F,C){C=jQuery.extend({},jQuery.ImpromptuDefaults,C);var I=(jQuery.browser.msie&&jQuery.browser.version<=7);var O=jQuery(document.body);var P=jQuery(window);var A='<div class="'+C.prefix+'box" id="'+C.prefix+'box">';if(C.useiframe&&((jQuery.browser.msie&&jQuery("object, applet").length>0)||I)){A+='<iframe src="javascript:;" class="'+C.prefix+'fade" id="'+C.prefix+'fade"></iframe>'}else{if(I){$("select").css("visibility","hidden")}A+='<div class="'+C.prefix+'fade" id="'+C.prefix+'fade"></div>'}A+='<div class="'+C.prefix+'" id="'+C.prefix+'"><div class="'+C.prefix+'container"><div class="'+C.prefix+'close">X</div><div class="'+C.prefix+'message">'+F+'</div><div class="'+C.prefix+'buttons" id="'+C.prefix+'buttons">';jQuery.each(C.buttons,function(S,R){A+='<button name="'+C.prefix+"button"+S+'" id="'+C.prefix+"button"+S+'" value="'+R+'">'+S+"</button>"});A+="</div></div></div></div>";var B=O.append(A).children("#"+C.prefix+"box");var D=B.children("#"+C.prefix);var Q=B.children("#"+C.prefix+"fade");var H=function(){return(document.documentElement.scrollTop||document.body.scrollTop)+"px"};var G=function(){var R={width:window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth),height:window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight)};return R};var J=function(){B.css({top:H()})};var N=function(){var S=0;B.addClass(C.prefix+"warning");var R=setInterval(function(){B.toggleClass(C.prefix+"warning");if(S++>1){clearInterval(R);B.removeClass(C.prefix+"warning")}},100)};var M=function(T){var R=(window.event)?event.keyCode:T.keyCode;var S=(window.event)?27:T.DOM_VK_ESCAPE;if(R==S){E()}};var K=function(){var R=G();B.css({position:(I)?"absolute":"fixed",height:R.height,width:"100%",top:(I)?H():0,left:0,right:0,bottom:0});Q.css({position:"absolute",height:R.height,width:"100%",top:0,left:0,right:0,bottom:0});D.css({position:"absolute",top:"100px",left:"50%",marginLeft:((((D.css("paddingLeft").split("px")[0]*1)+D.width())/2)*-1)})};var L=function(){Q.css({zIndex:C.zIndex,display:"none",opacity:C.opacity});D.css({zIndex:C.zIndex+1,display:"none"})};var E=function(S,R,T){D.remove();if(I){O.unbind("scroll",J)}P.unbind("resize",K);Q.fadeOut(C.overlayspeed,function(){Q.unbind("click",N);Q.remove();if(S){C.callback(R,T)}B.unbind("keypress",M);B.remove();if(I&&!C.useiframe){$("select").css("visibility","visible")}})};K();L();jQuery("#"+C.prefix+"buttons").children("button").click(function(){var S=D.children("."+C.prefix+"container").children("."+C.prefix+"message");var R=C.buttons[jQuery(this).text()];if(C.submit(R,S)){E(true,R,S)}});if(I){P.scroll(J)}Q.click(N);P.resize(K);B.keypress(M);D.find("."+C.prefix+"close").click(E);Q.fadeIn(C.overlayspeed);D[C.show](C.promptspeed,C.loaded);D.find("#"+C.prefix+"buttons button:eq("+C.focus+")").focus();return B}}); 
        var lstSidHT = new Array('5');function highlightWord(B,C){return true;if(B.hasChildNodes){var A;for(A=0;A<B.childNodes.length;A++){highlightWord(B.childNodes[A],C)}}if(B.nodeType==3){tempNodeVal=B.nodeValue.toLowerCase();tempWordVal=C.toLowerCase();if(tempNodeVal.indexOf(tempWordVal)!=-1){pn=B.parentNode;if(pn.className!="searchword"){nv=B.nodeValue;ni=tempNodeVal.indexOf(tempWordVal);before=document.createTextNode(nv.substr(0,ni));docWordVal=nv.substr(ni,C.length);after=document.createTextNode(nv.substr(ni+C.length));hiwordtext=document.createTextNode(docWordVal);hiword=document.createElement("span");hiword.className="searchword";hiword.appendChild(hiwordtext);pn.insertBefore(before,B);pn.insertBefore(hiword,B);pn.insertBefore(after,B);pn.removeChild(B)}}}}function googleSearchHighlight(){if(!document.createElement){return }ref=document.referrer;if(ref.indexOf("?")==-1){return }qs=ref.substr(ref.indexOf("?")+1);qsa=qs.split("&");for(i=0;i<qsa.length;i++){qsip=qsa[i].split("=");if(qsip.length==1){continue}if(qsip[0]=="q"||qsip[0]=="p"||qsip[0]=="s"){words=unescape(qsip[1].replace(/\+/g," ")).split(/\s+/);for(w=0;w<words.length;w++){highlightWord(document.getElementById("fpContainerOuter").lastChild,words[w])}}}}function purchase(B,A){document.forms["purchase"+B+A].submit()}function poppurchase(){document.forms.purchase.submit()}function caddie(){opener.location.href="/info/basket/t_caddie.cfm";opener.focus();self.close()}function resizePopXL2(A){document.getElementById("txt_PopXl2").style.display="none";A.style.display="block";my_div2=document.getElementById("div_popupXL2");if(A.height+60>document.body.clientHeight){A.height_origine=A.height;A.height=document.body.clientHeight-100;document.getElementById("img_zoompopupXL2").style.display="block"}my_div2.style.width=(A.width+4)+"px";my_div2.style.height=(A.height+40+6)+"px";my_div2.style.top=(((document.documentElement.clientHeight-A.height-40)/2)+document.documentElement.scrollTop)+"px";my_div2.style.left=(((document.documentElement.clientWidth-A.width)/2)+document.documentElement.scrollLeft)+"px"}function popupXL2(E,D){if(typeof (vcis)!="undefined"){vcis("hidden")}var A,B;if(D==null){D="fr-fr"}if(!(A=document.getElementById("div_opaque"))){A=document.createElement("DIV");A.id="div_opaque";document.body.appendChild(A)}A.style.cssText="position:absolute;z-index:99;top:0px;left:0px;filter:alpha(opacity:60);display:;background:white";A.style.opacity=0.6;A.style.height=document.body.scrollHeight+"px";A.style.width=document.body.scrollWidth+"px";if(!(B=document.getElementById("div_popupXL2"))){B=document.createElement("DIV");B.id="div_popupXL2";document.body.appendChild(B)}B.style.padding="2px";B.style.background="white";B.style.zIndex=101;B.style.position="absolute";B.style.filter=null;B.style.opacity=1;B.style.width="550px";B.style.height="60px";B.style.top=(((document.body.clientHeight-130)/2)+document.body.scrollTop)+"px";B.style.left=(((document.body.clientWidth-550)/2)+document.body.scrollLeft)+"px";B.style.display="block";B.style.border="1px solid black";var C="<div style='width:100%;text-align:center' id='txt_PopXl2'><img src='http://www.rueducommerce.fr/image/img-loading-sm.gif' width='65' height='49'/></div>";C+="<img src='"+document.getElementById("xlCont").getElementsByTagName("img")[0].src+"' onload='resizePopXL2(this)' id='img_PopXL2' onclick=\"document.getElementById('div_popupXL2').style.display='none';document.getElementById('div_opaque').style.display='none';vcis('visible');\" style='display:none'>";imgbtacht="/images/bouton_acheter.gif";if(D!="fr-fr"){imgbtacht="/images/locales/"+D+"/bouton_acheter.gif"}if(document.getElementById("fp_imgachat_main")){C+="<img src='"+imgbtacht+"' onclick=\"document.getElementById('div_popupXL2').style.display='none';vcis('visible');document.getElementById('fp_imgachat_main').onclick()\" width='108' height='40' style='float:left;cursor:pointer' id='bt_acheter_zoom'>"}C+="<img src='/images/shops/"+D+"/ficheprod/bouton_fermer.gif' onclick=\"document.getElementById('div_popupXL2').style.display='none';document.getElementById('div_opaque').style.display='none';vcis('visible');\" width='108' height='40' style='float:right;cursor:pointer'>";C+="<img src='/images/xlocales/zoom_plus.gif' id='img_zoompopupXL2' onclick=\"popupXL2_zoom(this)\" width='95' height='51' style='position:absolute;top:5px;left:5px;cursor:pointer;display:none;filter:alpha(opacity:40);opacity:0.4' onmouseover=\"this.style.filter=null;this.style.opacity=1\" onmouseout=\"this.style.filter='alpha(opacity:40)';this.style.opacity=0.4\">";B.innerHTML=C}function popupXL2_zoom(A){obj=document.getElementById("img_PopXL2");my_div2=document.getElementById("div_popupXL2");if(obj.height==obj.height_origine){obj.height=document.body.clientHeight-100;A.src="/images/xlocales/zoom_plus.gif"}else{obj.height=obj.height_origine;A.src="/images/xlocales/zoom_moins.gif"}my_div2.style.width=(obj.width+4)+"px";my_div2.style.height=(obj.height+40+6)+"px";my_div2.style.left=(((document.body.clientWidth-obj.width)/2)+document.body.scrollLeft)+"px"}function showpopDesc(idpopdesc,e){var posx=0;var posy=0;if(!e){var e=window.event}if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY}else{if(e.clientX||e.clientY){posx=e.clientX+document.documentElement.scrollLeft;posy=e.clientY+document.documentElement.scrollTop}}with(document.getElementById(idpopdesc).style){display="block";left=posx+5+"px";top=parseInt(posy)+5+"px"}}function hidepopDesc(A){document.getElementById(A).style.display="none"}function getReduction(D,A,C){var B="/shared/prix/ajax/fp/getEconomie.cfm?c="+D+"&p="+A+(C!=null?"&pk="+C:"");callHttpRequestRdc(B,"getReductionBack")}function getReductionBack(C){if(C.getElementsByTagName("erreur").length==0){var B=getCookie("SID");var A="0";if(lstSidHT.find(B)>=0){A=C.getElementsByTagName("ecoht")[0].childNodes[0].nodeValue}else{A=C.getElementsByTagName("ecottc")[0].childNodes[0].nodeValue}if(A!="0"){if(C.getElementsByTagName("soldes").length==1){$("#fpReduc").addClass("fpReducPriceSoldes");$("#fpReduc .fpReducAvec").html("&nbsp;");$("#fpReduc .fpReducEco").html("&nbsp;");$("#fpReducPrice").html("-"+A+(A.indexOf("%")==-1?"€":""))}else{$("#fpReducPrice").html(A+(A.indexOf("%")==-1?"€":""))}$("#fpReduc").css("display","block");$("#fpReduc").css("visibility","visible")}}}function purchaseProduct(A){fpServices=new Array();purchaseProductServices(A);URLPurchase="/info/basket/purchase_ba.cfm"}function purchaseProductServices(A){URLPurchase="/info/basket/purchase_ba.cfm";purchaseBundle(BAId,cidsBase,pidsBase,qtysBase,pp,A)}function acheterProduct(A,B){if(typeof (pageTracker)!="undefined"){pageTracker._trackEvent("Boutons","FicheProduitHT","Ajouter_au_panier")}URLPurchase="/info/basket/purchase.cfm";URLPurchase+="?Product_ID="+A+"&Product_CID="+B;window.location.href=URLPurchase}function acheterProductSer(B,C){if(typeof (pageTracker)!="undefined"){pageTracker._trackEvent("Boutons","FicheProduitHT_et_services","Ajouter_au_panier")}URLPurchase="/info/basket/purchase_ba.cfm";var A="";for(i=0;i<pidsBase.split(",").length-1;i++){A+=",o"}for(ser in fpServices){if(fpServices[ser].typ=="s"&&fpServices[ser].qty>0){cidsBase+=","+fpServices[ser].cid;pidsBase+=","+fpServices[ser].pid;qtysBase+=","+fpServices[ser].qty;A+=","+fpServices[ser].typ}}URLPurchase+="?baskdo=addproduct&FROMOPTIONCADDIE=yes&lstType="+A+"&Product_ID="+pidsBase+"&Product_CID="+cidsBase+"&qty="+qtysBase+"&BAId="+BAId+"&pp="+pp+"&addedFrom=2";if(fpServices.contrator!=undefined&&fpServices.contrator.qty>0){URLPurchase+="&okcontrator=oui"}window.location.href=URLPurchase}function acheterBundle(A){if(typeof (pageTracker)!="undefined"){var B="FicheProduitHT_pack_front";if(typeof (gmht)!="undefined"){B="FicheProduitGMHT_pack_front"}pageTracker._trackEvent("Boutons",B,"Ajouter_au_panier")}window.location.href=A}; var fpServices=new Array();function fpService(A,B){this.cid=A;this.pid=B;this.qty=0;this.typ="s"}function fpAddService(A){fps=fpServices[A.value];if(fps==undefined){fps=new fpService(A.value.split("-")[0],A.value.split("-")[1]);if(A.value=="contrator"){fps.typ="co"}fpServices[A.value]=fps}fps.qty=A.checked?1:0;if(computePrice){fSetPrice=parseFloat(getPriceInHTML(document.getElementById("serprice_"+A.value).innerHTML));if(!A.checked){fSetPrice=0-fSetPrice}fProductPrice=parseFloat(getPriceInHTML(document.getElementById("productPrice").innerHTML));setPriceInHTML(document.getElementById("productPrice"),(fProductPrice+fSetPrice).toFixed(2))}}function getPriceInHTML(A){return(A.replace("&nbsp;","").match(/[^\d]*(\d+[,.]\d+)[^\d]*/)[1]).replace(",",".")}function setPriceInHTML(A,B){A.innerHTML=A.innerHTML.replace("&nbsp;","").replace(/([^\d]*)(\d+[,.]\d+)([^\d]*)/,"$1"+B.replace(".",",")+"$3").replace(/(\d+)(\d{3},\d{2})/,"$1&nbsp;$2")}function purchaseProductCo(){fpServices=new Array();fps=new fpService(-1,-1);fps.typ="co";fpServices.contrator=fps;fps.qty=1;purchaseProductServices(3)}function purchaseProductService(A,B){fpServices=new Array();fps=new fpService(A,B);fpServices[A+"-"+B]=fps;fps.qty=1;purchaseProductServices(4)}function purchaseBundle(G,C,F,B,D,E){URLPurchase="/info/basket/purchase_ba.cfm";var A="";for(i=0;i<F.split(",").length-1;i++){A+=",o"}for(ser in fpServices){if(fpServices[ser].typ=="s"&&fpServices[ser].qty>0){C+=","+fpServices[ser].cid;F+=","+fpServices[ser].pid;B+=","+fpServices[ser].qty;A+=","+fpServices[ser].typ}}URLPurchase+="?affPop=OK&baskdo=addproduct&FROMOPTIONCADDIE=yes&lstType="+A+"&Product_ID="+F+"&Product_CID="+C+"&qty="+B+"&BAId="+G+"&pp="+D+"&addedFrom="+E;if(fpServices.contrator!=undefined&&fpServices.contrator.qty>0){URLPurchase+="&okcontrator=oui"}Shop_AddProduct(URLPurchase)}function purchaseProduct(A){fpServices=new Array();purchaseProductServices(A);URLPurchase="/info/basket/purchase_ba.cfm"}function purchaseProductServices(A){URLPurchase="/info/basket/purchase_ba.cfm";purchaseBundle(BAId,cidsBase,pidsBase,qtysBase,pp,A)}; 
        
	

loc_Txt_erreur_mutlipleAssurance = "Vous ne pouvez ajouter plusieurs assurances pour un même produit";
loc_Txt_erreur_mutlipleExtentionGarantie = "Vous ne pouvez ajouter plusieurs extention de garanties pour un même produit";
loc_Txt_ChargementEnCours = "Chargement en cours...";
loc_Txt_ErreurDeChargment = "Erreur de chargement";
loc_Txt_ImpossibleAjouterService = "Impossible d\'ajouter ce service";
function OptServ(B,A,C){this.prd_cid=B;this.prd_pid=A;this.prd_bunid=C;this.prd_px=null;this.prd_pxhc=null;this.coeff=null;this.coeffmin=null;this.HaveCoeff=null}OptServ.prototype.set_prd_price=function(A){this.prd_price=A};OptServ.prototype.set_prd_price_horscoeff=function(A){this.prd_pxhc=A};OptServ.prototype.set_coeff=function(A){this.coeff=A};OptServ.prototype.set_coeffmin=function(A){this.coeffmin=A;this.HaveCoeff=(A==1)};OptServ.prototype.init=function(){$(".ctLstOpts").height($(".ctLstCat").height()+5);$(".pkObjOS").draggable({helper:"clone",opacity:"0.5",appendTo:$("#pkdragg")[0]});$(".pkTarget").droppable({accept:".pkObjOS",tolerance:"touch",drop:mypk.drop,activeClass:"pkTargetActive",hoverClass:"pkTargetHover"})};OptServ.prototype.ajoutOpt=function(B,J){if(typeof B=="string"){B=$(B)}if(typeof J=="string"){J=$(J)}$("#OneShotHelp")[0].style.display="none";var C=false,A=false,G=0,D=0,H=0,I=0,F=1;$("#pkTarget li.pkObjOS").each(function(){if(this.getAttribute("isservice")){C=C||this.getAttribute("isAssurance");A=A||this.getAttribute("isExtentionGarantie")}});if((B[0].getAttribute("isAssurance")&&C)||(B[0].getAttribute("isExtentionGarantie")&&A)){if(B[0].getAttribute("isAssurance")){$.prompt("<h3>"+loc_Txt_ImpossibleAjouterService+"</h3><p>"+loc_Txt_erreur_mutlipleAssurance+"</p>",{prefix:"brownJqi"})}if(B[0].getAttribute("isExtentionGarantie")){$.prompt("<h3>"+loc_Txt_ImpossibleAjouterService+"</h3><p>"+loc_Txt_erreur_mutlipleExtentionGarantie+"</p>",{prefix:"brownJqi"})}}else{if($("#pksel_"+B[0].id).length!=0){var E=$("#pksel_"+B[0].id+" input")[0];E.value=parseInt(E.value)+1}else{var E=B.clone();E[0].id="pksel_"+E[0].id;J.append(E)}}this.refreshPrice()};OptServ.prototype.drop=function(A,B){mypk.ajoutOpt(B.draggable,B.element)};OptServ.prototype.refreshPrice=function(){var A=0,F=0,D=0,C=0,E=1,G=null;$("#pkTarget li").each(function(){var I=parseInt(this.getElementsByTagName("input")[0].value),H=parseFloat(this.getAttribute("px"));if(this.getAttribute("isservice")){D+=H*I}else{if(this.getAttribute("isoption")){F+=H*I;C+=I}}});if(C>=5){E=0.9}else{if(C>=3){E=0.95}else{if(C==2){E=0.97}}}if(E!=1){$("#pkPrice").removeClass().addClass("priceEco");document.getElementById("pkPrice").style.marginTop="30px";var B=$("#packEcoValue").html("<strong>- "+(100-E*100)+"%</stong>")}else{$("#pkPrice").removeClass().addClass("price")}A=this.prd_pxhc*parseInt($("#qte_CID"+this.prd_cid+"PID"+this.prd_pid)[0].value);A+=F*E;if(this.HaveCoeff){if(A>this.coeffmin){A=A*this.coeff}}A+=D;A=Math.round(A*100)/100+" &euro;";A=A.replace(/\./gi,",");if((G=A.indexOf(","))>-1){if(A.charAt(G+2)==" "){A=A.replace(/ /gi,"0 ")}}$("#PackOptionServicePrice")[0].innerHTML=A};OptServ.prototype.plusMoins=function(C,B){var A=$("#qte_"+C)[0];A.value=parseInt(A.value)+B;if(A.value==0){if($("#qte_"+C).hasClass("TheProduct")){A.value=1}else{$("#pksel_"+C).remove();if($("#pkTarget li").length==0){$("#OneShotHelp")[0].style.display="block"}}}this.refreshPrice()};OptServ.prototype.getNewList=function(D,C,E,A){$(".lstOpts .pkObjOS").remove();$(".lstOpts .ttrLstOpts").html(A);$(".lstOpts .ctLstOpts").html("<div class='loading'>"+loc_Txt_ChargementEnCours+"<br><img src='/images/img-loading-mini.gif' width='20' heigth='20'/></div>");var B="/shared/ficheprod/getoptionsservicesproductbygroup.cfm?";B+="cid="+this.prd_cid;B+="&pid="+this.prd_pid;B+="&type="+D;B+="&optcid="+C;B+="&optcatid="+E;callHttpRequestRdc(B,"mypk.getNewList_retour","mypk.getNewList_erreur")};OptServ.prototype.getNewList_retour=function(A){$(".lstOpts .ctLstOpts").html(A.getElementsByTagName("datas")[0].childNodes[0].nodeValue);$(".pkObjOS").draggable({helper:"clone",opacity:"0.5",appendTo:$("#pkdragg")[0]})};OptServ.prototype.getNewList_erreur=function(){$(".lstOpts .ctLstOpts").html("<div class='erreur'>"+loc_Txt_ErreurDeChargment+"</div>")};OptServ.prototype.Acheter=function(){if(typeof (pageTracker)!="undefined"){var E="FicheProduitHT_pack_auto";if(typeof (gmht)!="undefined"){E="FicheProduitGMHT_pack_auto"}pageTracker._trackEvent("Boutons",E,"Ajouter_au_panier")}var A="/info/basket/purchase_ba.cfm",D=this.prd_cid,F=this.prd_pid,B="",C=$("#qte_CID"+this.prd_cid+"PID"+this.prd_pid)[0].value;A+="?affPop=OK";A+="&baskdo=addproduct";A+="&FROMOPTIONCADDIE=yes";A+="&BaId="+this.prd_bunid;A+="&pp="+this.prd_cid+"|"+this.prd_pid;$("#pkTarget li").each(function(){D+=","+this.getAttribute("cid");F+=","+this.getAttribute("pid");B+=(B==""?"":",")+(this.getAttribute("isoption")?"o":"")+(this.getAttribute("isservice")?"s":"");C+=","+this.getElementsByTagName("input")[0].value});A+="&Product_ID="+F;A+="&Product_CID="+D;A+="&qty="+C;A+="&lstType="+B;A+="&r="+Math.round(Math.random()*100000);Shop_AddProduct(A)}; 