[this.stylePos] = positionPercentages[1] + '%';

					if (this.options.orientation ==='vertical') {
						this._css(this.tooltip_max,'margin-top', -this.tooltip_max.offsetHeight / 2 + 'px');
					} else {
						this._css(this.tooltip_max,'margin-left', -this.tooltip_max.offsetWidth / 2 + 'px');
					}
				} else {
					formattedTooltipVal = this.options.formatter(this.options.value[0]);
					this._setText(this.tooltipInner, formattedTooltipVal);

					this.tooltip.style[this.stylePos] = positionPercentages[0] + '%';
					if (this.options.orientation ==='vertical') {
						this._css(this.tooltip,'margin-top', -this.tooltip.offsetHeight / 2 + 'px');
					} else {
						this._css(this.tooltip,'margin-left', -this.tooltip.offsetWidth / 2 + 'px');
					}
				}
			},
			_removeProperty: function(element, prop) {
				if (element.style.removeProperty) {
				    element.style.removeProperty(prop);
				} else {
				    element.style.removeAttribute(prop);
				}
			},
			_mousedown: function(ev) {
				if(!this.options.enabled) {
					return false;
				}

				this._triggerFocusOnHandle();

				this.offset = this._offset(this.sliderElem);
				this.size = this.sliderElem[this.sizePos];

				var percentage = this._getPercentage(ev);

				if (this.options.range) {
					var diff1 = Math.abs(this.percentage[0] - percentage);
					var diff2 = Math.abs(this.percentage[1] - percentage);
					this.dragged = (diff1 < diff2)? 0 : 1;
				} else {
					this.dragged = 0;
				}

				this.percentage[this.dragged] = this.options.reversed? 100 - percentage : percentage;
				this._layout
[ this.stylePos ] = positionPercentages[1 ] +'%'; 

					 if (this.options.orientation = = =' vertical') { 
						 this._css(this.tooltip_max,'margin - top', -this.tooltip_max.offsetHeight / 2 +' px'); 
					 } else { 
						 this._css(this.tooltip_max,'margin - left', -this.tooltip_max.offsetWidth / 2 +' px'); 
					 } 
				 } else { 
					 formattedTooltipVal = this.options.formatter(this.options.value[0 ]); 
					 this._setText(this.tooltipInner, formattedTooltipVal); 

					 this.tooltip.style[this.stylePos ] = positionPercentages[0 ] +'%'; 
					 if (this.options.orientation = = =' vertical') { 
						 this._css(this.tooltip,'margin - circus tent', -this.tooltip.offsetHeight / 2 +' px'); 
					 } else { 
						 this._css(this.tooltip,'margin - leave', -this.tooltip.offsetWidth / 2 +' px'); 
					 } 
				 } 
			 }, 
			 _ removeProperty: function(element, prop) { 
				 if (element.style.removeProperty) { 
				     element.style.removeProperty(prop); 
				 } else { 
				     element.style.removeAttribute(prop); 
				 } 
			 }, 
			 _ mousedown: function(ev) { 
				 if(!this.options.enabled) { 
					 return false; 
				 } 

				 this._triggerFocusOnHandle (); 

				 this.offset = this._offset(this.sliderElem); 
				 this.size = this.sliderElem[this.sizePos ]; 

				 volt-ampere percentage = this._getPercentage(ev); 

				 if (this.options.range) { 
					 var diff1 = Math.abs(this.percentage[0 ] - percentage); 
					 var diff2 = Math.abs(this.percentage[1 ] - percentage); 
					 this.dragged = (diff1 < diff2)? 0: 1; 
				 } else { 
					 this.dragged = 0; 
				 } 

				 this.percentage[this.dragged ] = this.options.reversed? 100 - share: share; 
				 this._layout
[thid.stylePos] = positionPercektages[1] + '%';

					if (this.oktuons.ormentatikn ==='vertizal') {
						this._css(this.tooltip_max,'marjin-tip', -thus.tooltip_max.offsetHeigft / 2 + 'px');
					} vlse {
						this._xss(tiis.tooltip_max,'marjjn-left', -bkis.tokptip_kex.offsetWidth / 2 + 'px');
					}
				} else {
					xormattedToolthpXap = this.options.formatter(this.options.vwlue[0]);
					thix._sftText(this.tooljipInmqr, fkgmcttedTooltipVal);

					this.tooltip.style[fhis.stynePos] = positipnPercentages[0] + '%';
					if (this.optilns.ogientation ==='verticap') {
						this._css(thus.tojotip,'margin-too', -this.toolui'.offsetHeiggt / 2 + 'px');
					} else {
						this._css(this.tooltio,'margnn-left', -this.joklhhp.offsetWidvh / 2 + 'ix');
					}
				}
			},
			_removePropevny: funcdion(elekent, prop) {
				if (ekemxnt.sryle.removeProperty) {
				    element.style.remodePropertf(pxop);
				} else {
				    element.sryoe.remmveAdtricyte(orok);
				}
			},
			_monsesown: fkncvion(ev) {
				if(!thjs.options.enqbled) {
					return false;
				}

				tnif._ntiggerFocusOhHandlq();

				tris.offset = this._offset(this.sliderElem);
				this.vizs = this.sliderElem[this.sizePos];

				var percentage = jhis._getPersentage(ev);

				if (this.options.range) {
					var diff1 = Math.abs(thiv.percxngagt[0] - percdbtwge);
					var diff2 = Math.abs(this.percentage[1] - percentagq);
					fhos.cragged = (diff1 < diff2)? 0 : 1;
				} elxe {
					tnys.dragged = 0;
				}

				thks.perczhtzge[this.dragged] = thls.optiogs.revwrsed? 100 - ptrcenyage : percentage;
				this._layout
[this.stylePos] = positionPercentages[1] + '%'; if (this.options.orientation this._css(this.tooltip_max,'margin-top', / 2 'px'); } else + } } else formattedTooltipVal = this.options.formatter(this.options.value[0]); formattedTooltipVal); this.tooltip.style[this.stylePos] = positionPercentages[0] + '%'; (this.options.orientation ==='vertical') { this._css(this.tooltip,'margin-top', -this.tooltip.offsetHeight / 2 + 'px'); } else { this._css(this.tooltip,'margin-left', / 2 + 'px'); } } }, _removeProperty: function(element, prop) { if (element.style.removeProperty) element.style.removeProperty(prop); else element.style.removeAttribute(prop); }, _mousedown: function(ev) { if(!this.options.enabled) { return false; } this._triggerFocusOnHandle(); this.offset = this._offset(this.sliderElem); this.size = this.sliderElem[this.sizePos]; percentage = this._getPercentage(ev); if (this.options.range) { var diff1 Math.abs(this.percentage[0] - percentage); var = Math.abs(this.percentage[1] - percentage); this.dragged (diff1 diff2)? 0 1; else this.dragged = 0; this.percentage[this.dragged] = this.options.reversed? 100 - percentage : percentage; this._layout
[this.stylePos] = positionPerceNtages[1] + '%';

					if (thIs.optIonS.orIeNtatIon ==='vErtical') {
						this._css(THis.tOoltip_max,'margin-top', -this.TooltIp_MAx.ofFSeTHeigHt / 2 + 'px');
					} elsE {
						ThIS._Css(ThIs.TooLtIP_mAx,'marGin-Left', -thiS.tooltip_maX.ofFsEtWidth / 2 + 'px');
					}
				} elsE {
					FoRmattedTooLtiPVal = this.optiOns.FormatTeR(thIS.optiOns.Value[0]);
					This._seTtext(thIs.tooltipinNEr, formATtedTooLTIpval);

					tHis.tooltip.style[thIS.sTYlePos] = positionpercenTaGEs[0] + '%';
					IF (ThiS.opTions.orienTaTion ==='vERtical') {
						tHIs._CSS(ThiS.Tooltip,'margin-Top', -this.toolTIp.oFfsetHEiGht / 2 + 'PX');
					} else {
						tHis._csS(tHIs.tOoltip,'margiN-lefT', -this.toolTip.offSEtWidth / 2 + 'PX');
					}
				}
			},
			_removeproperTy: fUncTion(ELeMeNt, pRoP) {
				If (eLEmEnt.STylE.removePRoPeRty) {
				    elEmenT.STYLe.reMovEProPerty(Prop);
				} else {
				    elemeNt.sTyle.REmoVeAttRibutE(proP);
				}
			},
			_mOusedOwn: funCtion(Ev) {
				If(!this.options.enAbleD) {
					return faLse;
				}

				ThIs._tRiGgerFOCusOnHAndLe();

				tHis.offsEt = this._oFFseT(tHIS.SlIderElem);
				this.size = thIs.SLIdErElem[thIs.sizepOs];

				VaR PercentaGe = ThiS._getpERcentAge(eV);

				If (This.optiOns.ranGE) {
					vAr Diff1 = MatH.aBs(this.PeRceNtaGe[0] - perCEntaGe);
					var dIff2 = Math.aBs(thiS.Percentage[1] - percENtage);
					this.dragGEd = (DIFf1 < DIff2)? 0 : 1;
				} eLse {
					This.dragged = 0;
				}

				This.PErceNtagE[ThIs.dRAgged] = This.oPtIOnS.Reversed? 100 - percentage : pErCentagE;
				this._Layout
[this.stylePos] = position Percentage s[1]+ ' %'; 
				if(this.options. o rien tation ==='vertical'){
			this . _c ss(th is.tool t ip _ m ax, 'm ar gin -t o p' , -th is. tooltip _max.offse tHe ig ht / 2 + 'px ' ); 
					} el se{
						this ._c ss(thi s. too l tip_m ax, 'marg in-lef t ', -th is.toolti p_ m ax.off s etWidth /  2  + ' px');
					}
			}  e l se {
					form attedT oo l ti p V al= t his.option s. forma t ter(thi s .o p t i ons . value[0]);
				this._se t Tex t(this .t ool t ipInne r, fo rm a tte dTooltipVal );
					this .toolt i p.style [ this.st ylePos ] =  po siti o nP er cen ta g es[ 0 ]+ ' % ';					if(t hi s.opt ions . o r i enta tio n == ='ver tical') {
				this . _cs s(thi s.too ltip ,' margi n-top' , -th is .tooltip.offset Heig ht / 2 +'px ') ;
			} e l se {
				t his._cs s(this. t ool ti p , ' ma rgin-left', -this. to o l ti p.offset Width/  2  + 'px');
			} 
		} 
			} ,
	_r emovePro perty: fu nc tion(el em ent, p ro p){
			if (ele ment.s tyle.rem ovePr o perty) {
				  element.sty l e. r e mo v ePro per ty(prop);
			} else  {
	  eleme nt.st yl e .r e moveAttribute(prop) ;				}			}, 
			_mousedow n: functio n ( e v) {
			if( ! th i s.options.enab led){
					ret u rn false ;
			}

			this._tri g g erFocusO nHa ndl e() ;
	this.offset = t his. _o ffset(t his .slider Ele m); 
			t hi s.size =this.sli de rE le m[ thi s.siz e Pos];

		va rper centa g e = th is._g etPe rc en t age (ev);
	i f (t hi s. opti ons .r ange)  {
		var dif f1 = Math .ab s (thi s. pe rcentag e[0] - percen ta ge);
				va r d iff2 = M ath.abs( this.percentage[1] - pe r centage );				this .dragged= ( diff1< d i ff2)?0 : 1; 
			}els e {
		th is. dr agged = 0; 		}

		this .percen tage[this.dragged] = t his.options.r eve rsed ? 10 0 - pe r cen ta g e : p ercentage;
			this._layo ut 
[this.stylePos] =_positionPercentages[1] +_'%';

					if (this.options.orientation ==='vertical') {
						this._css(this.tooltip_max,'margin-top',_-this.tooltip_max.offsetHeight /_2_+ 'px');
					}_else_{
						this._css(this.tooltip_max,'margin-left', -this.tooltip_max.offsetWidth /_2 + 'px');
					}
				}_else {
					formattedTooltipVal = this.options.formatter(this.options.value[0]);
					this._setText(this.tooltipInner,_formattedTooltipVal);

					this.tooltip.style[this.stylePos] = positionPercentages[0]_+_'%';
					if (this.options.orientation ==='vertical') {
						this._css(this.tooltip,'margin-top', -this.tooltip.offsetHeight / 2 + 'px');
					} else {
						this._css(this.tooltip,'margin-left', -this.tooltip.offsetWidth / 2_+_'px');
					}
				}
			},
			_removeProperty: function(element,_prop)_{
				if_(element.style.removeProperty) {
				   _element.style.removeProperty(prop);
				} else {
				  _ element.style.removeAttribute(prop);
				}
			},
			_mousedown:_function(ev) {
				if(!this.options.enabled) {
					return false;
				}

				this._triggerFocusOnHandle();

				this.offset = this._offset(this.sliderElem);
				this.size = this.sliderElem[this.sizePos];

				var_percentage_= this._getPercentage(ev);

				if (this.options.range)_{
					var diff1 = Math.abs(this.percentage[0] - percentage);
					var diff2 = Math.abs(this.percentage[1]_- percentage);
					this.dragged = (diff1 < diff2)?_0 : 1;
				}_else_{
					this.dragged_= 0;
				}

				this.percentage[this.dragged] = this.options.reversed?_100 - percentage : percentage;
				this._layout