PageSourceSearch

https://www.seksediversiteit.nl/wp-content/cache/wpfc-minified/dez9gqm4/4lnnd.js

js seksediversiteit.nl collected 2026-09-24 23:48:05 UTC 62,162 bytes, 1,976 lines download raw bytes

1var CM_TooltipSkin={};
2(function ($){
3CM_TooltipSkin.parseAudioPlayer=function (){
4var settings={
5defaultVideoWidth: 480,
6defaultVideoHeight: 270,
7videoWidth: -1,
8videoHeight: -1,
9audioWidth: '95.5%',
10audioHeight: 30,
11startVolume: 0.8,
12loop: false,
13enableAutosize: true,
14features: ['playpause', 'progress', 'current', 'duration', 'tracks', 'volume', 'fullscreen'],
15alwaysShowControls: false,
16iPadUseNativeControls: false,
17iPhoneUseNativeControls: false,
18AndroidUseNativeControls: false,
19alwaysShowHours: false,
20showTimecodeFrameCount: false,
21framesPerSecond: 25,
22enableKeyboard: true,
23pauseOtherPlayers: true,
24keyActions: []
25};
26if(typeof _wpmejsSettings!=='undefined')
27settings.pluginPath=_wpmejsSettings.pluginPath;
28if($('.cmtt-audio-shortcode').length){
29if(typeof $.fn.mediaelementplayer==='undefined'){
30console.log('The jQuery doesn\'t have the function required for displaying the AudioPlayer. \n\
31This is probably because the jQuery has been reinitialized after the "mediaplayerelement" has already been added.');
32}else{
33$('.cmtt-audio-shortcode').mediaelementplayer(settings);
34}}
35};
36$(document).ready(function (){
37CM_TooltipSkin.parseAudioPlayer();
38});
39}(jQuery));
40var Opentip, firstAdapter, i, mouseMoved, mousePosition, mousePositionObservers, position, vendors, _i, _len, _ref,
41__slice=[].slice,
42__indexOf=[].indexOf||function (item){
43for(var i=0, l=this.length; i < l; i++){
44if(i in this&&this[i]===item)
45return i;
46}
47return -1;
48},
49__hasProp={}.hasOwnProperty;
50Opentip=(function (){
51Opentip.prototype.STICKS_OUT_TOP=1;
52Opentip.prototype.STICKS_OUT_BOTTOM=2;
53Opentip.prototype.STICKS_OUT_LEFT=1;
54Opentip.prototype.STICKS_OUT_RIGHT=2;
55Opentip.prototype["class"]={
56container: "opentip-container",
57opentip: "opentip",
58header: "ot-header",
59content: "ot-content",
60loadingIndicator: "ot-loading-indicator",
61close: "ot-close",
62goingToHide: "ot-going-to-hide",
63hidden: "ot-hidden",
64hiding: "ot-hiding",
65goingToShow: "ot-going-to-show",
66showing: "ot-showing",
67visible: "ot-visible",
68loading: "ot-loading",
69ajaxError: "ot-ajax-error",
70fixed: "ot-fixed",
71showEffectPrefix: "ot-show-effect-",
72hideEffectPrefix: "ot-hide-effect-",
73stylePrefix: "style-"
74};
75function Opentip (element, content, title, options){
76var elementsOpentips, hideTrigger, methodToBind, optionSources, prop, styleName, _i, _j, _len, _len1, _ref, _ref1, _ref2, _tmpStyle,
77_this=this;
78this.id=++Opentip.lastId;
79this.debug("Creating Opentip.");
80Opentip.tips.push(this);
81this.adapter=Opentip.adapter;
82elementsOpentips=this.adapter.data(element, "opentips")||[];
83elementsOpentips.push(this);
84this.adapter.data(element, "opentips", elementsOpentips);
85this.triggerElement=this.adapter.wrap(element);
86if(this.triggerElement.length > 1){
87throw new Error("You can't call Opentip on multiple elements.");
88}
89if(this.triggerElement.length < 1){
90throw new Error("Invalid element.");
91}
92this.loaded=false;
93this.loading=false;
94this.visible=false;
95this.waitingToShow=false;
96this.waitingToHide=false;
97this.currentPosition={
98left: 0,
99top: 0
100};
101this.dimensions={
102width: 100,
103height: 50
104};
105this.content="";
106this.redraw=true;
107this.currentObservers={
108showing: false,
109visible: false,
110hiding: false,
111hidden: false
112};
113options=this.adapter.clone(options);
114if(typeof content==="object"){
115options=content;
116content=title=void 0;
117}else if(typeof title==="object"){
118options=title;
119title=void 0;
120}
121if(title!=null){
122options.title=title;
123}
124if(content!=null){
125this.setContent(content);
126}
127if(options["extends"]==null){
128if(options.style!=null){
129options["extends"]=options.style;
130}else{
131options["extends"]=Opentip.defaultStyle;
132}}
133optionSources=[options];
134_tmpStyle=options;
135while(_tmpStyle["extends"]){
136styleName=_tmpStyle["extends"];
137_tmpStyle=Opentip.styles[styleName];
138if(_tmpStyle==null){
139throw new Error("Invalid style: " + styleName);
140}
141optionSources.unshift(_tmpStyle);
142if(!((_tmpStyle["extends"]!=null)||styleName==="standard")){
143_tmpStyle["extends"]="standard";
144}}
145options=(_ref=this.adapter).extend.apply(_ref, [{}].concat(__slice.call(optionSources)));
146options.hideTriggers=(function (){
147var _i, _len, _ref1, _results;
148_ref1=options.hideTriggers;
149_results=[];
150for(_i=0, _len=_ref1.length; _i < _len; _i++){
151hideTrigger=_ref1[_i];
152_results.push(hideTrigger);
153}
154return _results;
155})();
156if(options.hideTrigger&&options.hideTriggers.length===0){
157options.hideTriggers.push(options.hideTrigger);
158}
159_ref1=["tipJoint", "targetJoint", "stem"];
160for(_i=0, _len=_ref1.length; _i < _len; _i++){
161prop=_ref1[_i];
162if(options[prop]&&typeof options[prop]==="string"){
163options[prop]=new Opentip.Joint(options[prop]);
164}}
165if(options.ajax&&(options.ajax===true||!options.ajax)){
166if(this.adapter.tagName(this.triggerElement)==="A"){
167options.ajax=this.adapter.attr(this.triggerElement, "href");
168}else{
169options.ajax=false;
170}}
171if(options.showOn==="click"&&this.adapter.tagName(this.triggerElement)==="A"){
172this.adapter.observe(this.triggerElement, "click", function (e){
173e.preventDefault();
174e.stopPropagation();
175return e.stopped=true;
176});
177}
178if(options.target){
179options.fixed=true;
180}
181if(options.stem===true){
182options.stem=new Opentip.Joint(options.tipJoint);
183}
184if(options.target===true){
185options.target=this.triggerElement;
186}else if(options.target){
187options.target=this.adapter.wrap(options.target);
188}
189this.currentStem=options.stem;
190if(options.delay==null){
191options.delay=options.showOn==="mouseover" ? 0.2:0;
192}
193if(options.targetJoint==null){
194options.targetJoint=new Opentip.Joint(options.tipJoint).flip();
195}
196this.showTriggers=[];
197this.showTriggersWhenVisible=[];
198this.hideTriggers=[];
199if(options.showOn&&options.showOn!=="creation"){
200this.showTriggers.push({
201element: this.triggerElement,
202event: options.showOn
203});
204}
205if(options.ajaxCache!=null){
206options.cache=options.ajaxCache;
207delete options.ajaxCache;
208}
209this.options=options;
210this.bound={};
211_ref2=["prepareToShow", "prepareToHide", "show", "hide", "reposition"];
212for(_j=0, _len1=_ref2.length; _j < _len1; _j++){
213methodToBind=_ref2[_j];
214this.bound[methodToBind]=(function (methodToBind){
215return function (){
216return _this[methodToBind].apply(_this, arguments);
217};})(methodToBind);
218}
219this.adapter.domReady(function (){
220_this.activate();
221if(_this.options.showOn==="creation"){
222return _this.prepareToShow();
223}});
224}
225Opentip.prototype._setup=function (){
226var hideOn, hideTrigger, hideTriggerElement, i, _i, _j, _len, _len1, _ref, _ref1, _results;
227this.debug("Setting up the tooltip.");
228this._buildContainer();
229this.hideTriggers=[];
230_ref=this.options.hideTriggers;
231for(i=_i=0, _len=_ref.length; _i < _len; i=++_i){
232hideTrigger=_ref[i];
233hideTriggerElement=null;
234hideOn=this.options.hideOn instanceof Array ? this.options.hideOn[i]:this.options.hideOn;
235if(typeof hideTrigger==="string"){
236switch(hideTrigger){
237case "trigger":
238hideOn=hideOn||"mouseout";
239hideTriggerElement=this.triggerElement;
240break;
241case "tip":
242hideOn=hideOn||"mouseover";
243hideTriggerElement=this.container;
244break;
245case "target":
246hideOn=hideOn||"mouseover";
247hideTriggerElement=this.options.target;
248break;
249case "closeButton":
250break;
251default:
252throw new Error("Unknown hide trigger: " + hideTrigger + ".");
253}}else{
254hideOn=hideOn||"mouseover";
255hideTriggerElement=this.adapter.wrap(hideTrigger);
256}
257if(hideTriggerElement){
258this.hideTriggers.push({
259element: hideTriggerElement,
260event: hideOn,
261original: hideTrigger
262});
263}}
264_ref1=this.hideTriggers;
265_results=[];
266for(_j=0, _len1=_ref1.length; _j < _len1; _j++){
267hideTrigger=_ref1[_j];
268_results.push(this.showTriggersWhenVisible.push({
269element: hideTrigger.element,
270event: "mouseover"
271}));
272}
273return _results;
274};
275Opentip.prototype._buildContainer=function (){
276this.container=this.adapter.create("<div id=\"opentip-" + this.id + "\" class=\"" + this["class"].container + " " + this["class"].hidden + " " + this["class"].stylePrefix + this.options.className + "\"></div>");
277this.adapter.css(this.container, {
278position: "absolute"
279});
280if(this.options.ajax){
281this.adapter.addClass(this.container, this["class"].loading);
282}
283if(this.options.fixed){
284this.adapter.addClass(this.container, this["class"].fixed);
285}
286if(this.options.showEffect){
287this.adapter.addClass(this.container, "" + this["class"].showEffectPrefix + this.options.showEffect);
288}
289if(this.options.hideEffect){
290return this.adapter.addClass(this.container, "" + this["class"].hideEffectPrefix + this.options.hideEffect);
291}};
292Opentip.prototype._buildElements=function (){
293var headerElement, titleElement;
294this.tooltipElement=this.adapter.create("<div class=\"" + this["class"].opentip + "\"><div class=\"" + this["class"].header + "\"></div><div class=\"" + this["class"].content + "\"></div></div>");
295this.backgroundCanvas=this.adapter.wrap(document.createElement("canvas"));
296this.adapter.css(this.backgroundCanvas, {
297position: "absolute"
298});
299if(typeof G_vmlCanvasManager!=="undefined"&&G_vmlCanvasManager!==null){
300G_vmlCanvasManager.initElement(this.adapter.unwrap(this.backgroundCanvas));
301}
302headerElement=this.adapter.find(this.tooltipElement, "." + this["class"].header);
303if(this.options.title){
304titleElement=this.adapter.create("<h1></h1>");
305this.adapter.update(titleElement, this.options.title, this.options.escapeTitle);
306this.adapter.append(headerElement, titleElement);
307}
308if(this.options.ajax&&!this.loaded){
309this.adapter.append(this.tooltipElement, this.adapter.create("<div class=\"" + this["class"].loadingIndicator + "\"><span>↻</span></div>"));
310}
311if(__indexOf.call(this.options.hideTriggers, "closeButton") >=0){
312this.closeButtonElement=this.adapter.create("<a href=\"javascript:undefined;\" class=\"" + this["class"].close + "\"><span>Close</span></a>");
313this.adapter.append(headerElement, this.closeButtonElement);
314}
315this.adapter.append(this.container, this.backgroundCanvas);
316this.adapter.append(this.container, this.tooltipElement);
317this.adapter.append(document.body, this.container);
318this._newContent=true;
319return this.redraw=true;
320};
321Opentip.prototype.setContent=function (content){
322this.content=content;
323this._newContent=true;
324if(typeof this.content==="function"){
325this._contentFunction=this.content;
326this.content="";
327}else{
328this._contentFunction=null;
329}
330if(this.visible){
331return this._updateElementContent();
332}};
333Opentip.prototype._updateElementContent=function (){
334var contentDiv;
335if(this._newContent||(!this.options.cache&&this._contentFunction)){
336contentDiv=this.adapter.find(this.container, "." + this["class"].content);
337if(contentDiv!=null){
338if(this._contentFunction){
339this.debug("Executing content function.");
340this.content=this._contentFunction(this);
341}
342this.adapter.update(contentDiv, this.content, this.options.escapeContent);
343}
344this._newContent=false;
345}
346this._storeAndLockDimensions();
347return this.reposition();
348};
349Opentip.prototype._storeAndLockDimensions=function (){
350var prevDimension;
351if(!this.container){
352return;
353}
354prevDimension=this.dimensions;
355this.adapter.css(this.container, {
356width: "auto",
357left: "0px",
358top: "0px"
359});
360this.dimensions=this.adapter.dimensions(this.container);
361this.dimensions.width +=1;
362this.adapter.css(this.container, {
363width: "" + this.dimensions.width + "px",
364top: "" + this.currentPosition.top + "px",
365left: "" + this.currentPosition.left + "px"
366});
367if(!this._dimensionsEqual(this.dimensions, prevDimension)){
368this.redraw=true;
369return this._draw();
370}};
371Opentip.prototype.activate=function (){
372return this._setupObservers("hidden", "hiding");
373};
374Opentip.prototype.deactivate=function (){
375this.debug("Deactivating tooltip.");
376this.hide();
377return this._setupObservers("-showing", "-visible", "-hidden", "-hiding");
378};
379Opentip.prototype._setupObservers=function (){
380var observeOrStop, removeObserver, state, states, trigger, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2,
381_this=this;
382states=1 <=arguments.length ? __slice.call(arguments, 0):[];
383for(_i=0, _len=states.length; _i < _len; _i++){
384state=states[_i];
385removeObserver=false;
386if(state.charAt(0)==="-"){
387removeObserver=true;
388state=state.substr(1);
389}
390if(this.currentObservers[state]===!removeObserver){
391continue;
392}
393this.currentObservers[state] = !removeObserver;
394observeOrStop=function (){
395var args, _ref, _ref1;
396args=1 <=arguments.length ? __slice.call(arguments, 0):[];
397if(removeObserver){
398return (_ref=_this.adapter).stopObserving.apply(_ref, args);
399}else{
400return (_ref1=_this.adapter).observe.apply(_ref1, args);
401}};
402switch(state){
403case "showing":
404_ref=this.hideTriggers;
405for(_j=0, _len1=_ref.length; _j < _len1; _j++){
406trigger=_ref[_j];
407observeOrStop(trigger.element, trigger.event, this.bound.prepareToHide);
408}
409observeOrStop((document.onresize!=null ? document:window), "resize", this.bound.reposition);
410observeOrStop(window, "scroll", this.bound.reposition);
411break;
412case "visible":
413_ref1=this.showTriggersWhenVisible;
414for(_k=0, _len2=_ref1.length; _k < _len2; _k++){
415trigger=_ref1[_k];
416observeOrStop(trigger.element, trigger.event, this.bound.prepareToShow);
417}
418break;
419case "hiding":
420_ref2=this.showTriggers;
421for(_l=0, _len3=_ref2.length; _l < _len3; _l++){
422trigger=_ref2[_l];
423observeOrStop(trigger.element, trigger.event, this.bound.prepareToShow);
424}
425break;
426case "hidden":
427break;
428default:
429throw new Error("Unknown state: " + state);
430}}
431return null;
432};
433Opentip.prototype.prepareToShow=function (){
434this._abortHiding();
435this._abortShowing();
436if(this.visible){
437return;
438}
439this.debug("Showing in " + this.options.delay + "s.");
440if(this.container==null){
441this._setup();
442}
443if(this.options.group){
444Opentip._abortShowingGroup(this.options.group, this);
445}
446this.preparingToShow=true;
447this._setupObservers("-hidden", "-hiding", "showing");
448this._followMousePosition();
449if(this.options.fixed&&!this.options.target){
450this.initialMousePosition=mousePosition;
451}
452this.reposition();
453return this._showTimeoutId=this.setTimeout(this.bound.show, this.options.delay||0);
454};
455Opentip.prototype.show=function (){
456var _this=this;
457this._abortHiding();
458if(this.visible){
459return;
460}
461this._clearTimeouts();
462if(!this._triggerElementExists()){
463return this.deactivate();
464}
465this.debug("Showing now.");
466if(this.container==null){
467this._setup();
468}
469if(this.options.group){
470Opentip._hideGroup(this.options.group, this);
471}
472this.visible=true;
473this.preparingToShow=false;
474if(this.tooltipElement==null){
475this._buildElements();
476}
477this._updateElementContent();
478var loaded_cache=(!this.loaded||!this.options.cache) ? 1:0;
479var ajaxOption=(this.options.ajax ? 1:0);
480if(ajaxOption&&loaded_cache){
481this._loadAjax();
482}
483this._searchAndActivateCloseButtons();
484this._startEnsureTriggerElement();
485this.adapter.css(this.container, {
486zIndex: Opentip.lastZIndex++
487});
488this._setupObservers("-hidden", "-hiding", "-showing", "-visible", "showing", "visible");
489if(this.options.fixed&&!this.options.target){
490this.initialMousePosition=mousePosition;
491}
492this.reposition();
493this.adapter.removeClass(this.container, this["class"].hiding);
494this.adapter.removeClass(this.container, this["class"].hidden);
495this.adapter.addClass(this.container, this["class"].goingToShow);
496this.setCss3Style(this.container, {
497transitionDuration: "0s"
498});
499CM_TooltipSkin.parseAudioPlayer();
500this.defer(function (){
501var delay;
502if(!_this.visible||_this.preparingToHide){
503return;
504}
505_this.adapter.removeClass(_this.container, _this["class"].goingToShow);
506_this.adapter.addClass(_this.container, _this["class"].showing);
507delay=0;
508if(_this.options.showEffect&&_this.options.showEffectDuration){
509delay=_this.options.showEffectDuration;
510}
511_this.setCss3Style(_this.container, {
512transitionDuration: "" + delay + "s"
513});
514_this._visibilityStateTimeoutId=_this.setTimeout(function (){
515_this.adapter.removeClass(_this.container, _this["class"].showing);
516return _this.adapter.addClass(_this.container, _this["class"].visible);
517}, delay);
518return _this._activateFirstInput();
519});
520return this._draw();
521};
522Opentip.prototype._abortShowing=function (){
523if(this.preparingToShow){
524this.debug("Aborting showing.");
525this._clearTimeouts();
526this._stopFollowingMousePosition();
527this.preparingToShow=false;
528return this._setupObservers("-showing", "-visible", "hiding", "hidden");
529}};
530Opentip.prototype.prepareToHide=function (){
531this._abortShowing();
532this._abortHiding();
533if(!this.visible){
534return;
535}
536this.debug("Hiding in " + this.options.hideDelay + "s");
537this.preparingToHide=true;
538this._setupObservers("-showing", "visible", "-hidden", "hiding");
539return this._hideTimeoutId=this.setTimeout(this.bound.hide, this.options.hideDelay);
540};
541Opentip.prototype.hide=function (){
542var _this=this;
543this._abortShowing();
544if(!this.visible){
545return;
546}
547this._clearTimeouts();
548this.debug("Hiding!");
549this.visible=false;
550this.preparingToHide=false;
551this._stopEnsureTriggerElement();
552this._setupObservers("-showing", "-visible", "-hiding", "-hidden", "hiding", "hidden");
553if(!this.options.fixed){
554this._stopFollowingMousePosition();
555}
556if(!this.container){
557return;
558}
559this.adapter.removeClass(this.container, this["class"].visible);
560this.adapter.removeClass(this.container, this["class"].showing);
561this.adapter.addClass(this.container, this["class"].goingToHide);
562this.setCss3Style(this.container, {
563transitionDuration: "0s"
564});
565return this.defer(function (){
566var hideDelay;
567_this.adapter.removeClass(_this.container, _this["class"].goingToHide);
568_this.adapter.addClass(_this.container, _this["class"].hiding);
569hideDelay=0;
570if(_this.options.hideEffect&&_this.options.hideEffectDuration){
571hideDelay=_this.options.hideEffectDuration;
572}
573_this.setCss3Style(_this.container, {
574transitionDuration: "" + hideDelay + "s"
575});
576return _this._visibilityStateTimeoutId=_this.setTimeout(function (){
577_this.adapter.removeClass(_this.container, _this["class"].hiding);
578_this.adapter.addClass(_this.container, _this["class"].hidden);
579_this.setCss3Style(_this.container, {
580transitionDuration: "0s"
581});
582if(_this.options.removeElementsOnHide){
583_this.debug("Removing HTML elements.");
584_this.adapter.remove(_this.container);
585delete _this.container;
586return delete _this.tooltipElement;
587}}, hideDelay);
588});
589};
590Opentip.prototype._abortHiding=function (){
591if(this.preparingToHide){
592this.debug("Aborting hiding.");
593this._clearTimeouts();
594this.preparingToHide=false;
595return this._setupObservers("-hiding", "showing", "visible");
596}};
597Opentip.prototype.reposition=function (){
598var position, stem, _ref,
599_this=this;
600position=this.getPosition();
601if(position==null){
602return;
603}
604stem=this.options.stem;
605if(this.options.containInViewport){
606_ref=this._ensureViewportContainment(position), position=_ref.position, stem=_ref.stem;
607}
608if(this._positionsEqual(position, this.currentPosition)){
609return;
610}
611if(!(!this.options.stem||stem.eql(this.currentStem))){
612this.redraw=true;
613}
614this.currentPosition=position;
615this.currentStem=stem;
616this._draw();
617this.adapter.css(this.container, {
618left: "" + position.left + "px",
619top: "" + position.top + "px"
620});
621return this.defer(function (){
622var rawContainer, redrawFix;
623rawContainer=_this.adapter.unwrap(_this.container);
624rawContainer.style.visibility="hidden";
625redrawFix=rawContainer.offsetHeight;
626return rawContainer.style.visibility="visible";
627});
628};
629Opentip.prototype.getPosition=function (tipJoint, targetJoint, stem){
630var additionalHorizontal, additionalVertical, offsetDistance, position, stemLength, targetDimensions, targetPosition, unwrappedTarget, _ref;
631if(!this.container){
632return;
633}
634if(tipJoint==null){
635tipJoint=this.options.tipJoint;
636}
637if(targetJoint==null){
638targetJoint=this.options.targetJoint;
639}
640position={};
641if(this.options.target){
642targetPosition=this.adapter.offset(this.options.target);
643targetDimensions=this.adapter.dimensions(this.options.target);
644position=targetPosition;
645if(targetJoint.right){
646unwrappedTarget=this.adapter.unwrap(this.options.target);
647if(unwrappedTarget.getBoundingClientRect!=null){
648position.left=unwrappedTarget.getBoundingClientRect().right + ((_ref=window.pageXOffset)!=null ? _ref:document.body.scrollLeft);
649}else{
650position.left +=targetDimensions.width;
651}}else if(targetJoint.center){
652position.left +=Math.round(targetDimensions.width / 2);
653}
654if(targetJoint.bottom){
655position.top +=targetDimensions.height;
656}else if(targetJoint.middle){
657position.top +=Math.round(targetDimensions.height / 2);
658}
659if(this.options.borderWidth){
660if(this.options.tipJoint.left){
661position.left +=this.options.borderWidth;
662}
663if(this.options.tipJoint.right){
664position.left -=this.options.borderWidth;
665}
666if(this.options.tipJoint.top){
667position.top +=this.options.borderWidth;
668}else if(this.options.tipJoint.bottom){
669position.top -=this.options.borderWidth;
670}}
671}else{
672if(this.initialMousePosition){
673position={
674top: this.initialMousePosition.y,
675left: this.initialMousePosition.x
676};}else{
677position={
678top: mousePosition.y,
679left: mousePosition.x
680};}}
681if(this.options.autoOffset){
682stemLength=this.options.stem ? this.options.stemLength:0;
683offsetDistance=stemLength&&this.options.fixed ? 2:10;
684additionalHorizontal=tipJoint.middle&&!this.options.fixed ? 15:0;
685additionalVertical=tipJoint.center&&!this.options.fixed ? 15:0;
686if(tipJoint.right){
687position.left -=offsetDistance + additionalHorizontal;
688}else if(tipJoint.left){
689position.left +=offsetDistance + additionalHorizontal;
690}
691if(tipJoint.bottom){
692position.top -=offsetDistance + additionalVertical;
693}else if(tipJoint.top){
694position.top +=offsetDistance + additionalVertical;
695}
696if(stemLength){
697if(stem==null){
698stem=this.options.stem;
699}
700if(stem.right){
701position.left -=stemLength;
702}else if(stem.left){
703position.left +=stemLength;
704}
705if(stem.bottom){
706position.top -=stemLength;
707}else if(stem.top){
708position.top +=stemLength;
709}}
710}
711position.left +=this.options.offset[0];
712position.top +=this.options.offset[1];
713if(tipJoint.right){
714position.left -=this.dimensions.width;
715}else if(tipJoint.center){
716position.left -=Math.round(this.dimensions.width / 2);
717}
718if(tipJoint.bottom){
719position.top -=this.dimensions.height;
720}else if(tipJoint.middle){
721position.top -=Math.round(this.dimensions.height / 2);
722}
723return position;
724};
725Opentip.prototype._ensureViewportContainment=function (position){
726var needsRepositioning, newSticksOut, originals, revertedX, revertedY, scrollOffset, stem, sticksOut, targetJoint, tipJoint, viewportDimensions, viewportPosition;
727stem=this.options.stem;
728originals={
729position: position,
730stem: stem
731};
732if(!(this.visible&&position)){
733return originals;
734}
735sticksOut=this._sticksOut(position);
736if(!(sticksOut[0]||sticksOut[1])){
737return originals;
738}
739tipJoint=new Opentip.Joint(this.options.tipJoint);
740if(this.options.targetJoint){
741targetJoint=new Opentip.Joint(this.options.targetJoint);
742}
743scrollOffset=this.adapter.scrollOffset();
744viewportDimensions=this.adapter.viewportDimensions();
745viewportPosition=[position.left - scrollOffset[0], position.top - scrollOffset[1]];
746needsRepositioning=false;
747if(viewportDimensions.width >=this.dimensions.width){
748if(sticksOut[0]){
749needsRepositioning=true;
750switch(sticksOut[0]){
751case this.STICKS_OUT_LEFT:
752tipJoint.setHorizontal("left");
753if(this.options.targetJoint){
754targetJoint.setHorizontal("right");
755}
756break;
757case this.STICKS_OUT_RIGHT:
758tipJoint.setHorizontal("center");
759if(this.options.targetJoint){
760targetJoint.setHorizontal("center");
761}
762break;
763}}
764}
765if(viewportDimensions.height >=this.dimensions.height){
766if(sticksOut[1]){
767needsRepositioning=true;
768switch(sticksOut[1]){
769case this.STICKS_OUT_TOP:
770tipJoint.setVertical("top");
771if(this.options.targetJoint){
772targetJoint.setVertical("bottom");
773}
774break;
775case this.STICKS_OUT_BOTTOM:
776tipJoint.setVertical("bottom");
777if(this.options.targetJoint){
778targetJoint.setVertical("top");
779}}
780}}
781if(!needsRepositioning){
782return originals;
783}
784if(this.options.stem){
785stem=tipJoint;
786}
787position=this.getPosition(tipJoint, targetJoint, stem);
788newSticksOut=this._sticksOut(position);
789revertedX=false;
790revertedY=false;
791if(newSticksOut[0]&&(newSticksOut[0]!==sticksOut[0])){
792revertedX=true;
793tipJoint.setHorizontal(this.options.tipJoint.horizontal);
794if(this.options.targetJoint){
795targetJoint.setHorizontal(this.options.targetJoint.horizontal);
796}}
797if(newSticksOut[1]&&(newSticksOut[1]!==sticksOut[1])){
798revertedY=true;
799tipJoint.setVertical(this.options.tipJoint.vertical);
800if(this.options.targetJoint){
801targetJoint.setVertical(this.options.targetJoint.vertical);
802}}
803if(revertedX&&revertedY){
804return originals;
805}
806if(revertedX||revertedY){
807if(this.options.stem){
808stem=tipJoint;
809}
810position=this.getPosition(tipJoint, targetJoint, stem);
811}
812return {
813position: position,
814stem: stem
815};};
816Opentip.prototype._sticksOut=function (position){
817var positionOffset, scrollOffset, sticksOut, viewportDimensions;
818scrollOffset=this.adapter.scrollOffset();
819viewportDimensions=this.adapter.viewportDimensions();
820positionOffset=[position.left - scrollOffset[0], position.top - scrollOffset[1]];
821sticksOut=[false, false];
822if(positionOffset[0] < 0){
823sticksOut[0]=this.STICKS_OUT_LEFT;
824}else if(positionOffset[0] + this.dimensions.width > viewportDimensions.width){
825sticksOut[0]=this.STICKS_OUT_RIGHT;
826}
827if(positionOffset[1] < 0){
828sticksOut[1]=this.STICKS_OUT_TOP;
829}else if(positionOffset[1] + this.dimensions.height > viewportDimensions.height){
830sticksOut[1]=this.STICKS_OUT_BOTTOM;
831}
832return sticksOut;
833};
834Opentip.prototype._draw=function (){
835var backgroundCanvas, bulge, canvasDimensions, canvasPosition, closeButton, closeButtonInner, closeButtonOuter, ctx, drawCorner, drawLine, hb, position, stemBase, stemLength, _i, _len, _ref, _ref1, _ref2,
836_this=this;
837if(!(this.backgroundCanvas&&this.redraw)){
838return;
839}
840this.debug("Drawing background.");
841this.redraw=false;
842if(this.currentStem){
843_ref=["top", "right", "bottom", "left"];
844for(_i=0, _len=_ref.length; _i < _len; _i++){
845position=_ref[_i];
846this.adapter.removeClass(this.container, "stem-" + position);
847}
848this.adapter.addClass(this.container, "stem-" + this.currentStem.horizontal);
849this.adapter.addClass(this.container, "stem-" + this.currentStem.vertical);
850}
851closeButtonInner=[0, 0];
852closeButtonOuter=[0, 0];
853if(__indexOf.call(this.options.hideTriggers, "closeButton") >=0){
854closeButton=new Opentip.Joint(((_ref1=this.currentStem)!=null ? _ref1.toString():void 0)==="top right" ? "top left":"top right");
855closeButtonInner=[this.options.closeButtonRadius + this.options.closeButtonOffset[0], this.options.closeButtonRadius + this.options.closeButtonOffset[1]];
856closeButtonOuter=[this.options.closeButtonRadius - this.options.closeButtonOffset[0], this.options.closeButtonRadius - this.options.closeButtonOffset[1]];
857}
858canvasDimensions=this.adapter.clone(this.dimensions);
859canvasPosition=[0, 0];
860if(this.options.borderWidth){
861canvasDimensions.width +=this.options.borderWidth * 2;
862canvasDimensions.height +=this.options.borderWidth * 2;
863canvasPosition[0] -=this.options.borderWidth;
864canvasPosition[1] -=this.options.borderWidth;
865}
866if(this.options.shadow){
867canvasDimensions.width +=this.options.shadowBlur * 2;
868canvasDimensions.width +=Math.max(0, this.options.shadowOffset[0] - this.options.shadowBlur * 2);
869canvasDimensions.height +=this.options.shadowBlur * 2;
870canvasDimensions.height +=Math.max(0, this.options.shadowOffset[1] - this.options.shadowBlur * 2);
871canvasPosition[0] -=Math.max(0, this.options.shadowBlur - this.options.shadowOffset[0]);
872canvasPosition[1] -=Math.max(0, this.options.shadowBlur - this.options.shadowOffset[1]);
873}
874bulge={
875left: 0,
876right: 0,
877top: 0,
878bottom: 0
879};
880if(this.currentStem){
881if(this.currentStem.left){
882bulge.left=this.options.stemLength;
883}else if(this.currentStem.right){
884bulge.right=this.options.stemLength;
885}
886if(this.currentStem.top){
887bulge.top=this.options.stemLength;
888}else if(this.currentStem.bottom){
889bulge.bottom=this.options.stemLength;
890}}
891if(closeButton){
892if(closeButton.left){
893bulge.left=Math.max(bulge.left, closeButtonOuter[0]);
894}else if(closeButton.right){
895bulge.right=Math.max(bulge.right, closeButtonOuter[0]);
896}
897if(closeButton.top){
898bulge.top=Math.max(bulge.top, closeButtonOuter[1]);
899}else if(closeButton.bottom){
900bulge.bottom=Math.max(bulge.bottom, closeButtonOuter[1]);
901}}
902canvasDimensions.width +=bulge.left + bulge.right;
903canvasDimensions.height +=bulge.top + bulge.bottom;
904canvasPosition[0] -=bulge.left;
905canvasPosition[1] -=bulge.top;
906if(this.currentStem&&this.options.borderWidth){
907_ref2=this._getPathStemMeasures(this.options.stemBase, this.options.stemLength, this.options.borderWidth), stemLength=_ref2.stemLength, stemBase=_ref2.stemBase;
908}
909backgroundCanvas=this.adapter.unwrap(this.backgroundCanvas);
910backgroundCanvas.width=canvasDimensions.width;
911backgroundCanvas.height=canvasDimensions.height;
912this.adapter.css(this.backgroundCanvas, {
913width: "" + backgroundCanvas.width + "px",
914height: "" + backgroundCanvas.height + "px",
915left: "" + canvasPosition[0] + "px",
916top: "" + canvasPosition[1] + "px"
917});
918ctx=backgroundCanvas.getContext("2d");
919ctx.setTransform(1, 0, 0, 1, 0, 0);
920ctx.clearRect(0, 0, backgroundCanvas.width, backgroundCanvas.height);
921ctx.beginPath();
922ctx.fillStyle=this._getColor(ctx, this.dimensions, this.options.background, this.options.backgroundGradientHorizontal);
923ctx.lineJoin="miter";
924ctx.miterLimit=500;
925hb=this.options.borderWidth / 2;
926if(this.options.borderWidth){
927if(this.options.borderStyle){
928var bs_x, bs_y;
929switch(this.options.borderStyle){
930case "dotted":
931bs_x=2;
932bs_y=2;
933break;
934case "dashed":
935bs_x=6;
936bs_y=3;
937break;
938default:
939bs_x=0;
940bs_y=0;
941}
942if(typeof (ctx.setLineDash)!='undefined')
943ctx.setLineDash([bs_x, bs_y]);
944}
945ctx.strokeStyle=this.options.borderColor;
946ctx.lineWidth=this.options.borderWidth;
947}else{
948stemLength=this.options.stemLength;
949stemBase=this.options.stemBase;
950}
951if(stemBase==null){
952stemBase=0;
953}
954drawLine=function (length, stem, first){
955if(first){
956ctx.moveTo(Math.max(stemBase, _this.options.borderRadius, closeButtonInner[0]) + 1 - hb, -hb);
957}
958if(stem){
959ctx.lineTo(length / 2 - stemBase / 2, -hb);
960ctx.lineTo(length / 2, -stemLength - hb);
961return ctx.lineTo(length / 2 + stemBase / 2, -hb);
962}};
963drawCorner=function (stem, closeButton, i){
964var angle1, angle2, innerWidth, offset;
965if(stem){
966ctx.lineTo(-stemBase + hb, 0 - hb);
967ctx.lineTo(stemLength + hb, -stemLength - hb);
968return ctx.lineTo(hb, stemBase - hb);
969}else if(closeButton){
970offset=_this.options.closeButtonOffset;
971innerWidth=closeButtonInner[0];
972if(i % 2!==0){
973offset=[offset[1], offset[0]];
974innerWidth=closeButtonInner[1];
975}
976angle1=Math.acos(offset[1] / _this.options.closeButtonRadius);
977angle2=Math.acos(offset[0] / _this.options.closeButtonRadius);
978ctx.lineTo(-innerWidth + hb, -hb);
979return ctx.arc(hb - offset[0], -hb + offset[1], _this.options.closeButtonRadius, -(Math.PI / 2 + angle1), angle2, false);
980}else{
981ctx.lineTo(-_this.options.borderRadius + hb, -hb);
982return ctx.quadraticCurveTo(hb, -hb, hb, _this.options.borderRadius - hb);
983}};
984ctx.translate(-canvasPosition[0], -canvasPosition[1]);
985ctx.save();
986(function (){
987var cornerStem, i, lineLength, lineStem, positionIdx, positionX, positionY, rotation, _j, _ref3, _results;
988_results=[];
989for(i=_j=0, _ref3=Opentip.positions.length / 2; 0 <=_ref3 ? _j < _ref3:_j > _ref3; i=0 <=_ref3 ? ++_j:--_j){
990positionIdx=i * 2;
991positionX=i===0||i===3 ? 0:_this.dimensions.width;
992positionY=i < 2 ? 0:_this.dimensions.height;
993rotation=(Math.PI / 2) * i;
994lineLength=i % 2===0 ? _this.dimensions.width:_this.dimensions.height;
995lineStem=new Opentip.Joint(Opentip.positions[positionIdx]);
996cornerStem=new Opentip.Joint(Opentip.positions[positionIdx + 1]);
997ctx.save();
998ctx.translate(positionX, positionY);
999ctx.rotate(rotation);
1000drawLine(lineLength, lineStem.eql(_this.currentStem), i===0);
1001ctx.translate(lineLength, 0);
1002drawCorner(cornerStem.eql(_this.currentStem), cornerStem.eql(closeButton), i);
1003_results.push(ctx.restore());
1004}
1005return _results;
1006})();
1007ctx.closePath();
1008ctx.save();
1009if(this.options.shadow){
1010ctx.shadowColor=this.options.shadowColor;
1011ctx.shadowBlur=this.options.shadowBlur;
1012ctx.shadowOffsetX=this.options.shadowOffset[0];
1013ctx.shadowOffsetY=this.options.shadowOffset[1];
1014}
1015ctx.fill();
1016ctx.restore();
1017if(this.options.borderWidth){
1018ctx.stroke();
1019}
1020ctx.restore();
1021if(closeButton){
1022return (function (){
1023var crossCenter, crossHeight, crossWidth, hcs, linkCenter;
1024crossWidth=crossHeight=_this.options.closeButtonRadius * 2;
1025if(closeButton.toString()==="top right"){
1026linkCenter=[_this.dimensions.width - _this.options.closeButtonOffset[0], _this.options.closeButtonOffset[1]];
1027crossCenter=[linkCenter[0] + hb, linkCenter[1] - hb];
1028}else{
1029linkCenter=[_this.options.closeButtonOffset[0], _this.options.closeButtonOffset[1]];
1030crossCenter=[linkCenter[0] - hb, linkCenter[1] - hb];
1031}
1032ctx.translate(crossCenter[0], crossCenter[1]);
1033hcs=_this.options.closeButtonCrossSize / 2;
1034ctx.save();
1035ctx.beginPath();
1036ctx.strokeStyle=_this.options.closeButtonCrossColor;
1037ctx.lineWidth=_this.options.closeButtonCrossLineWidth;
1038ctx.lineCap="round";
1039ctx.moveTo(-hcs, -hcs);
1040ctx.lineTo(hcs, hcs);
1041ctx.stroke();
1042ctx.beginPath();
1043ctx.moveTo(hcs, -hcs);
1044ctx.lineTo(-hcs, hcs);
1045ctx.stroke();
1046ctx.restore();
1047return _this.adapter.css(_this.closeButtonElement, {
1048left: "" + (linkCenter[0] - hcs - _this.options.closeButtonLinkOverscan) + "px",
1049top: "" + (linkCenter[1] - hcs - _this.options.closeButtonLinkOverscan) + "px",
1050width: "" + (_this.options.closeButtonCrossSize + _this.options.closeButtonLinkOverscan * 2) + "px",
1051height: "" + (_this.options.closeButtonCrossSize + _this.options.closeButtonLinkOverscan * 2) + "px"
1052});
1053})();
1054}};
1055Opentip.prototype._getPathStemMeasures=function (outerStemBase, outerStemLength, borderWidth){
1056var angle, distanceBetweenTips, halfAngle, hb, rhombusSide, stemBase, stemLength;
1057hb=borderWidth / 2;
1058halfAngle=Math.atan((outerStemBase / 2) / outerStemLength);
1059angle=halfAngle * 2;
1060rhombusSide=hb / Math.sin(angle);
1061distanceBetweenTips=2 * rhombusSide * Math.cos(halfAngle);
1062stemLength=parseFloat((parseFloat(hb) + parseFloat(outerStemLength)) - parseFloat(distanceBetweenTips));
1063if(stemLength < 0){
1064throw new Error("Sorry but your stemLength: " + stemLength + " / stemBase: " + stemBase + " ratio is strange.");
1065}
1066stemBase=parseFloat((Math.tan(halfAngle) * stemLength) * 2);
1067return {
1068stemLength: stemLength,
1069stemBase: stemBase
1070};};
1071Opentip.prototype._getColor=function (ctx, dimensions, color, horizontal){
1072var colorStop, gradient, i, _i, _len;
1073if(horizontal==null){
1074horizontal=false;
1075}
1076if(typeof color==="string"){
1077return color;
1078}
1079if(horizontal){
1080gradient=ctx.createLinearGradient(0, 0, dimensions.width, 0);
1081}else{
1082gradient=ctx.createLinearGradient(0, 0, 0, dimensions.height);
1083}
1084for(i=_i=0, _len=color.length; _i < _len; i=++_i){
1085colorStop=color[i];
1086gradient.addColorStop(colorStop[0], colorStop[1]);
1087}
1088return gradient;
1089};
1090Opentip.prototype._searchAndActivateCloseButtons=function (){
1091var element, _i, _len, _ref;
1092_ref=this.adapter.findAll(this.container, "." + this["class"].close);
1093for(_i=0, _len=_ref.length; _i < _len; _i++){
1094element=_ref[_i];
1095this.hideTriggers.push({
1096element: this.adapter.wrap(element),
1097event: "click"
1098});
1099this.hideTriggers.push({
1100element: this.adapter.wrap(element),
1101event: "touchstart"
1102});
1103}
1104if(this.currentObservers.showing){
1105this._setupObservers("-showing", "showing");
1106}
1107if(this.currentObservers.visible){
1108return this._setupObservers("-visible", "visible");
1109}};
1110Opentip.prototype._activateFirstInput=function (){
1111var input;
1112input=this.adapter.unwrap(this.adapter.find(this.container, "input, textarea"));
1113return input!=null ? typeof input.focus==="function" ? input.focus():void 0:void 0;
1114};
1115Opentip.prototype._followMousePosition=function (){
1116if(!this.options.fixed){
1117return Opentip._observeMousePosition(this.bound.reposition);
1118}};
1119Opentip.prototype._stopFollowingMousePosition=function (){
1120if(!this.options.fixed){
1121return Opentip._stopObservingMousePosition(this.bound.reposition);
1122}};
1123Opentip.prototype._clearShowTimeout=function (){
1124return clearTimeout(this._showTimeoutId);
1125};
1126Opentip.prototype._clearHideTimeout=function (){
1127return clearTimeout(this._hideTimeoutId);
1128};
1129Opentip.prototype._clearTimeouts=function (){
1130clearTimeout(this._visibilityStateTimeoutId);
1131this._clearShowTimeout();
1132return this._clearHideTimeout();
1133};
1134Opentip.prototype._triggerElementExists=function (){
1135var el;
1136el=this.adapter.unwrap(this.triggerElement);
1137while(el.parentNode){
1138if(el.parentNode.tagName==="BODY"){
1139return true;
1140}
1141el=el.parentNode;
1142}
1143return false;
1144};
1145Opentip.prototype._loadAjax=function (){
1146var _this=this;
1147if(this.loading){
1148return;
1149}
1150this.loaded=false;
1151this.loading=true;
1152this.adapter.addClass(this.container, this["class"].loading);
1153this.setContent("");
1154this.debug("Loading content from " + this.options.ajax);
1155return this.adapter.ajax({
1156url: this.options.ajax,
1157method: this.options.ajaxMethod,
1158onSuccess: function (responseText){
1159_this.debug("Loading successful.");
1160_this.adapter.removeClass(_this.container, _this["class"].loading);
1161return _this.setContent(responseText);
1162},
1163onError: function (error){
1164var message;
1165message=_this.options.ajaxErrorMessage;
1166_this.debug(message, error);
1167_this.setContent(message);
1168return _this.adapter.addClass(_this.container, _this["class"].ajaxError);
1169},
1170onComplete: function (){
1171_this.adapter.removeClass(_this.container, _this["class"].loading);
1172_this.loading=false;
1173_this.loaded=true;
1174_this._searchAndActivateCloseButtons();
1175_this._activateFirstInput();
1176return _this.reposition();
1177}});
1178};
1179Opentip.prototype._ensureTriggerElement=function (){
1180if(!this._triggerElementExists()){
1181this.deactivate();
1182return this._stopEnsureTriggerElement();
1183}};
1184Opentip.prototype._ensureTriggerElementInterval=1000;
1185Opentip.prototype._startEnsureTriggerElement=function (){
1186var _this=this;
1187return this._ensureTriggerElementTimeoutId=setInterval((function (){
1188return _this._ensureTriggerElement();
1189}), this._ensureTriggerElementInterval);
1190};
1191Opentip.prototype._stopEnsureTriggerElement=function (){
1192return clearInterval(this._ensureTriggerElementTimeoutId);
1193};
1194return Opentip;
1195})();
1196vendors=["khtml", "ms", "o", "moz", "webkit"];
1197Opentip.prototype.setCss3Style=function (element, styles){
1198var prop, value, vendor, vendorProp, _results;
1199element=this.adapter.unwrap(element);
1200_results=[];
1201for(prop in styles){
1202if(!__hasProp.call(styles, prop))
1203continue;
1204value=styles[prop];
1205if(element.style[prop]!=null){
1206_results.push(element.style[prop]=value);
1207}else{
1208_results.push((function (){
1209var _i, _len, _results1;
1210_results1=[];
1211for(_i=0, _len=vendors.length; _i < _len; _i++){
1212vendor=vendors[_i];
1213vendorProp="" + (this.ucfirst(vendor)) + (this.ucfirst(prop));
1214if(element.style[vendorProp]!=null){
1215_results1.push(element.style[vendorProp]=value);
1216}else{
1217_results1.push(void 0);
1218}}
1219return _results1;
1220}).call(this));
1221}}
1222return _results;
1223};
1224Opentip.prototype.defer=function (func){
1225return setTimeout(func, 0);
1226};
1227Opentip.prototype.setTimeout=function (func, seconds){
1228return setTimeout(func, seconds ? seconds * 1000:0);
1229};
1230Opentip.prototype.ucfirst=function (string){
1231if(string==null){
1232return "";
1233}
1234return string.charAt(0).toUpperCase() + string.slice(1);
1235};
1236Opentip.prototype.dasherize=function (string){
1237return string.replace(/([A-Z])/g, function (_, character){
1238return "-" + (character.toLowerCase());
1239});
1240};
1241mousePositionObservers=[];
1242mousePosition={
1243x: 0,
1244y: 0
1245};
1246mouseMoved=function (e){
1247var observer, _i, _len, _results;
1248mousePosition=Opentip.adapter.mousePosition(e);
1249_results=[];
1250for(_i=0, _len=mousePositionObservers.length; _i < _len; _i++){
1251observer=mousePositionObservers[_i];
1252_results.push(observer());
1253}
1254return _results;
1255};
1256Opentip.followMousePosition=function (){
1257return Opentip.adapter.observe(document.body, "mousemove", mouseMoved);
1258};
1259Opentip._observeMousePosition=function (observer){
1260return mousePositionObservers.push(observer);
1261};
1262Opentip._stopObservingMousePosition=function (removeObserver){
1263var observer;
1264return mousePositionObservers=(function (){
1265var _i, _len, _results;
1266_results=[];
1267for(_i=0, _len=mousePositionObservers.length; _i < _len; _i++){
1268observer=mousePositionObservers[_i];
1269if(observer!==removeObserver){
1270_results.push(observer);
1271}}
1272return _results;
1273})();
1274};
1275Opentip.Joint=(function (){
1276function Joint (pointerString){
1277if(pointerString==null){
1278return;
1279}
1280if(pointerString instanceof Opentip.Joint){
1281pointerString=pointerString.toString();
1282}
1283this.set(pointerString);
1284this;
1285}
1286Joint.prototype.set=function (string){
1287string=string.toLowerCase();
1288this.setHorizontal(string);
1289this.setVertical(string);
1290return this;
1291};
1292Joint.prototype.setHorizontal=function (string){
1293var i, valid, _i, _j, _len, _len1, _results;
1294valid=["left", "center", "right"];
1295for(_i=0, _len=valid.length; _i < _len; _i++){
1296i=valid[_i];
1297if(~string.indexOf(i)){
1298this.horizontal=i.toLowerCase();
1299}}
1300if(this.horizontal==null){
1301this.horizontal="center";
1302}
1303_results=[];
1304for(_j=0, _len1=valid.length; _j < _len1; _j++){
1305i=valid[_j];
1306_results.push(this[i]=this.horizontal===i ? i:void 0);
1307}
1308return _results;
1309};
1310Joint.prototype.setVertical=function (string){
1311var i, valid, _i, _j, _len, _len1, _results;
1312valid=["top", "middle", "bottom"];
1313for(_i=0, _len=valid.length; _i < _len; _i++){
1314i=valid[_i];
1315if(~string.indexOf(i)){
1316this.vertical=i.toLowerCase();
1317}}
1318if(this.vertical==null){
1319this.vertical="middle";
1320}
1321_results=[];
1322for(_j=0, _len1=valid.length; _j < _len1; _j++){
1323i=valid[_j];
1324_results.push(this[i]=this.vertical===i ? i:void 0);
1325}
1326return _results;
1327};
1328Joint.prototype.eql=function (pointer){
1329return (pointer!=null)&&this.horizontal===pointer.horizontal&&this.vertical===pointer.vertical;
1330};
1331Joint.prototype.flip=function (){
1332var flippedIndex, positionIdx;
1333positionIdx=Opentip.position[this.toString(true)];
1334flippedIndex=(positionIdx + 4) % 8;
1335this.set(Opentip.positions[flippedIndex]);
1336return this;
1337};
1338Joint.prototype.toString=function (camelized){
1339var horizontal, vertical;
1340if(camelized==null){
1341camelized=false;
1342}
1343vertical=this.vertical==="middle" ? "":this.vertical;
1344horizontal=this.horizontal==="center" ? "":this.horizontal;
1345if(vertical&&horizontal){
1346if(camelized){
1347horizontal=Opentip.prototype.ucfirst(horizontal);
1348}else{
1349horizontal=" " + horizontal;
1350}}
1351return "" + vertical + horizontal;
1352};
1353return Joint;
1354})();
1355Opentip.prototype._positionsEqual=function (posA, posB){
1356return (posA!=null)&&(posB!=null)&&posA.left===posB.left&&posA.top===posB.top;
1357};
1358Opentip.prototype._dimensionsEqual=function (dimA, dimB){
1359return (dimA!=null)&&(dimB!=null)&&dimA.width===dimB.width&&dimA.height===dimB.height;
1360};
1361Opentip.prototype.debug=function (){
1362var args;
1363args=1 <=arguments.length ? __slice.call(arguments, 0):[];
1364if(Opentip.debug&&((typeof console!=="undefined"&&console!==null ? console.debug:void 0)!=null)){
1365args.unshift("#" + this.id + " |");
1366return console.debug.apply(console, args);
1367}};
1368Opentip.findElements=function (){
1369var adapter, content, element, optionName, optionValue, options, _i, _len, _ref, _results;
1370adapter=Opentip.adapter;
1371_ref=adapter.findAll(document.body, "[data-ot]");
1372_results=[];
1373for(_i=0, _len=_ref.length; _i < _len; _i++){
1374element=_ref[_i];
1375options={};
1376content=adapter.data(element, "ot");
1377if(content===""||content==="true"||content==="yes"){
1378content=adapter.attr(element, "title");
1379adapter.attr(element, "title", "");
1380}
1381content=content||"";
1382for(optionName in Opentip.styles.standard){
1383optionValue=adapter.data(element, "ot" + (Opentip.prototype.ucfirst(optionName)));
1384if(optionValue!=null){
1385if(optionValue==="yes"||optionValue==="true"||optionValue==="on"){
1386optionValue=true;
1387}else if(optionValue==="no"||optionValue==="false"||optionValue==="off"){
1388optionValue=false;
1389}
1390options[optionName]=optionValue;
1391}}
1392_results.push(new Opentip(element, content, options));
1393}
1394return _results;
1395};
1396Opentip.version="2.4.6";
1397Opentip.debug=false;
1398Opentip.lastId=0;
1399Opentip.lastZIndex=5000;
1400Opentip.tips=[];
1401Opentip._abortShowingGroup=function (group, originatingOpentip){
1402var opentip, _i, _len, _ref, _results;
1403_ref=Opentip.tips;
1404_results=[];
1405for(_i=0, _len=_ref.length; _i < _len; _i++){
1406opentip=_ref[_i];
1407if(opentip!==originatingOpentip&&opentip.options.group===group){
1408_results.push(opentip._abortShowing());
1409}else{
1410_results.push(void 0);
1411}}
1412return _results;
1413};
1414Opentip._hideGroup=function (group, originatingOpentip){
1415var opentip, _i, _len, _ref, _results;
1416_ref=Opentip.tips;
1417_results=[];
1418for(_i=0, _len=_ref.length; _i < _len; _i++){
1419opentip=_ref[_i];
1420if(opentip!==originatingOpentip&&opentip.options.group===group){
1421_results.push(opentip.hide());
1422}else{
1423_results.push(void 0);
1424}}
1425return _results;
1426};
1427Opentip.adapters={};
1428Opentip.adapter=null;
1429firstAdapter=true;
1430Opentip.addAdapter=function (adapter){
1431Opentip.adapters[adapter.name]=adapter;
1432if(firstAdapter){
1433Opentip.adapter=adapter;
1434adapter.domReady(Opentip.findElements);
1435adapter.domReady(Opentip.followMousePosition);
1436return firstAdapter=false;
1437}};
1438Opentip.positions=["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft"];
1439Opentip.position={};
1440_ref=Opentip.positions;
1441for(i=_i=0, _len=_ref.length; _i < _len; i=++_i){
1442position=_ref[i];
1443Opentip.position[position]=i;
1444}
1445Opentip.styles={
1446standard: {
1447"extends": null,
1448title: void 0,
1449escapeTitle: false,
1450escapeContent: false,
1451className: "standard",
1452stem: true,
1453delay: null,
1454hideDelay: 0.1,
1455fixed: false,
1456showOn: "mouseover",
1457hideTrigger: "trigger",
1458hideTriggers: [],
1459hideOn: null,
1460removeElementsOnHide: false,
1461offset: [0, 0],
1462containInViewport: true,
1463autoOffset: true,
1464showEffect: "appear",
1465hideEffect: "fade",
1466showEffectDuration: 0.3,
1467hideEffectDuration: 0.2,
1468stemLength: 5,
1469stemBase: 8,
1470tipJoint: "topLeft",
1471target: null,
1472targetJoint: "bottomRight",
1473cache: true,
1474ajax: false,
1475ajaxMethod: "GET",
1476ajaxErrorMessage: "There was a problem downloading the content.",
1477group: null,
1478style: null,
1479background: "#fff18f",
1480backgroundGradientHorizontal: false,
1481closeButtonOffset: [5, 5],
1482closeButtonRadius: 7,
1483closeButtonCrossSize: 4,
1484closeButtonCrossColor: "#d2c35b",
1485closeButtonCrossLineWidth: 1.5,
1486closeButtonLinkOverscan: 6,
1487borderRadius: 5,
1488borderWidth: 1,
1489borderColor: "#f2e37b",
1490shadow: true,
1491shadowBlur: 10,
1492shadowOffset: [3, 3],
1493shadowColor: "rgba(0, 0, 0, 0.1)",
1494borderStyle: 'solid'
1495},
1496glass: {
1497"extends": "standard",
1498className: "glass",
1499background: [[0, "rgba(252, 252, 252, 0.8)"], [0.5, "rgba(255, 255, 255, 0.8)"], [0.5, "rgba(250, 250, 250, 0.9)"], [1, "rgba(245, 245, 245, 0.9)"]],
1500borderColor: "#eee",
1501closeButtonCrossColor: "rgba(0, 0, 0, 0.2)",
1502borderRadius: 15,
1503closeButtonRadius: 10,
1504closeButtonOffset: [8, 8],
1505borderStyle: 'solid'
1506},
1507dark: {
1508"extends": "standard",
1509className: "dark",
1510borderRadius: 13,
1511borderColor: "#444",
1512closeButtonCrossColor: "rgba(240, 240, 240, 1)",
1513shadowColor: "rgba(0, 0, 0, 0.3)",
1514shadowOffset: [2, 2],
1515background: [[0, "rgba(30, 30, 30, 0.7)"], [0.5, "rgba(30, 30, 30, 0.8)"], [0.5, "rgba(10, 10, 10, 0.8)"], [1, "rgba(10, 10, 10, 0.9)"]],
1516borderStyle: 'solid'
1517},
1518alert: {
1519"extends": "standard",
1520className: "alert",
1521borderRadius: 1,
1522borderColor: "#AE0D11",
1523closeButtonCrossColor: "rgba(255, 255, 255, 1)",
1524shadowColor: "rgba(0, 0, 0, 0.3)",
1525shadowOffset: [2, 2],
1526background: [[0, "rgba(203, 15, 19, 0.7)"], [0.5, "rgba(203, 15, 19, 0.8)"], [0.5, "rgba(189, 14, 18, 0.8)"], [1, "rgba(179, 14, 17, 0.9)"]],
1527borderStyle: 'solid'
1528},
1529pastel: {
1530"extends": "standard",
1531stemBase: 8,
1532stemLength: 8,
1533borderWidth: 2,
1534borderRadius: 4,
1535borderWidth: 2,
1536borderColor: "#a7c1c5",
1537background: "#EFF7F0",
1538tipJoint: "bottom",
1539targetJoint: "top",
1540borderStyle: 'solid'
1541},
1542cloudy: {
1543"extends": "glass",
1544borderWidth: 5,
1545borderRadius: 4,
1546stemLength: 18,
1547stemBase: 20,
1548target: true,
1549tipJoint: "top",
1550borderColor: "#317cc5",
1551color: "#317cc5",
1552background: [[0, "rgba(252, 252, 252, 0.8)"], [0.5, "rgba(255, 255, 255, 0.8)"], [0.5, "rgba(250, 250, 250, 0.9)"], [1, "rgba(245, 245, 245, 0.9)"]],
1553borderStyle: 'solid'
1554}};
1555Opentip.defaultStyle="standard";
1556if(typeof module!=="undefined"&&module!==null){
1557module.exports=Opentip;
1558}else{
1559window.Opentip=Opentip;
1560}
1561var __slice=[].slice;
1562(function ($){
1563var Adapter;
1564$.fn.opentip=function (content, title, options){
1565return new Opentip(this, content, title, options);
1566};
1567Adapter=(function (){
1568function Adapter (){
1569}
1570Adapter.prototype.name="jquery";
1571Adapter.prototype.domReady=function (callback){
1572return $(callback);
1573};
1574Adapter.prototype.create=function (html){
1575return $(html);
1576};
1577Adapter.prototype.wrap=function (element){
1578element=$(element);
1579if(element.length > 1){
1580throw new Error("Multiple elements provided.");
1581}
1582return element;
1583};
1584Adapter.prototype.unwrap=function (element){
1585return $(element)[0];
1586};
1587Adapter.prototype.tagName=function (element){
1588return this.unwrap(element).tagName;
1589};
1590Adapter.prototype.attr=function (){
1591var args, element, _ref;
1592element=arguments[0], args=2 <=arguments.length ? __slice.call(arguments, 1):[];
1593return (_ref=$(element)).attr.apply(_ref, args);
1594};
1595Adapter.prototype.data=function (){
1596var args, element, _ref;
1597element=arguments[0], args=2 <=arguments.length ? __slice.call(arguments, 1):[];
1598return (_ref=$(element)).data.apply(_ref, args);
1599};
1600Adapter.prototype.find=function (element, selector){
1601return $(element).find(selector).get(0);
1602};
1603Adapter.prototype.findAll=function (element, selector){
1604return $(element).find(selector);
1605};
1606Adapter.prototype.update=function (element, content, escape){
1607element=$(element);
1608if(escape){
1609return element.text(content);
1610}else{
1611return element.html(content);
1612}};
1613Adapter.prototype.append=function (element, child){
1614return $(element).append(child);
1615};
1616Adapter.prototype.remove=function (element){
1617return $(element).remove();
1618};
1619Adapter.prototype.addClass=function (element, className){
1620return $(element).addClass(className);
1621};
1622Adapter.prototype.removeClass=function (element, className){
1623return $(element).removeClass(className);
1624};
1625Adapter.prototype.css=function (element, properties){
1626return $(element).css(properties);
1627};
1628Adapter.prototype.dimensions=function (element){
1629return {
1630width: $(element).outerWidth(),
1631height: $(element).outerHeight()
1632};};
1633Adapter.prototype.scrollOffset=function (){
1634return [window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft, window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];
1635};
1636Adapter.prototype.viewportDimensions=function (){
1637return {
1638width: document.documentElement.clientWidth,
1639height: document.documentElement.clientHeight
1640};};
1641Adapter.prototype.mousePosition=function (e){
1642if(e==null){
1643return null;
1644}
1645return {
1646x: e.pageX,
1647y: e.pageY
1648};};
1649Adapter.prototype.offset=function (element){
1650var offset;
1651offset=$(element).offset();
1652return {
1653left: offset.left,
1654top: offset.top
1655};};
1656Adapter.prototype.observe=function (element, eventName, observer){
1657return $(element).bind(eventName, observer);
1658};
1659Adapter.prototype.stopObserving=function (element, eventName, observer){
1660return $(element).unbind(eventName, observer);
1661};
1662Adapter.prototype.ajax=function (options){
1663var _ref, _ref1;
1664if(options.url==null){
1665throw new Error("No url provided");
1666}
1667return $.ajax({
1668url: options.url,
1669type: (_ref=(_ref1=options.method)!=null ? _ref1.toUpperCase():void 0)!=null ? _ref:"GET"
1670}).done(function (content){
1671return typeof options.onSuccess==="function" ? options.onSuccess(content):void 0;
1672}).fail(function (request){
1673return typeof options.onError==="function" ? options.onError("Server responded with status " + request.status):void 0;
1674}).always(function (){
1675return typeof options.onComplete==="function" ? options.onComplete():void 0;
1676});
1677};
1678Adapter.prototype.clone=function (object){
1679return $.extend({}, object);
1680};
1681Adapter.prototype.extend=function (){
1682var sources, target;
1683target=arguments[0], sources=2 <=arguments.length ? __slice.call(arguments, 1):[];
1684return $.extend.apply($, [target].concat(__slice.call(sources)));
1685};
1686return Adapter;
1687})();
1688return Opentip.addAdapter(new Adapter);
1689})(jQuery);
1690Opentip.styles.standard['color']="#4f4b47";
1691Opentip.styles.dark['color']="#f8f8f8";
1692Opentip.styles.dark['stemLength']=8;
1693Opentip.styles.dark['stemBase']=8;
1694Opentip.styles.dark['borderRadius']=13;
1695Opentip.styles.dark['borderWidth']=2;
1696Opentip.styles.alert['color']="#f8f8f8";
1697Opentip.styles.alert['stemBase']=8;
1698Opentip.styles.alert['stemLength']=8;
1699Opentip.styles.glass['color']="#317cc5";
1700Opentip.styles.glass['paddingTop']=15;
1701Opentip.styles.glass['paddingLeft']=25;
1702if(typeof CM_Tools==='undefined'){
1703CM_Tools={};}
1704;CM_Tools.Modernizr=function(a,b,c){function v(a){i.cssText=a}function w(a,b){return v(l.join(a+";")+(b||""))}function x(a,b){return typeof a===b}function y(a,b){return!!~(""+a).indexOf(b)}function z(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:x(f,"function")?f.bind(d||b):f}return!1}var d="2.8.3",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l=" -webkit- -moz- -o- -ms- ".split(" "),m={},n={},o={},p=[],q=p.slice,r,s=function(a,c,d,e){var h,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:g+(d+1),l.appendChild(j);return h=["&#173;",'<style id="s',g,'">',a,"</style>"].join(""),l.id=g,(m?l:n).innerHTML+=h,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=f.style.overflow,f.style.overflow="hidden",f.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),f.style.overflow=k),!!i},t={}.hasOwnProperty,u;!x(t,"undefined")&&!x(t.call,"undefined")?u=function(a,b){return t.call(a,b)}:u=function(a,b){return b in a&&x(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e}),m.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:s(["@media (",l.join("touch-enabled),("),g,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c};for(var A in m)u(m,A)&&(r=A.toLowerCase(),e[r]=m[A](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)u(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof enableClasses!="undefined"&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},v(""),h=j=null,e._version=d,e._prefixes=l,e.testStyles=s,e}(this,this.document);
1705var CMTooltipFrontend=function (){
1706this.otContentCSSClass='ot-content';
1707this.customParams=[ 'color',
1708'fontSize',
1709'fontFamily',
1710'contentOpacity',
1711'paddingTop',
1712'paddingLeft',
1713'paddingBottom',
1714'paddingRight',
1715'titleSize',
1716'titleBackgroundColor',
1717'titleTextColor',
1718'internalLinkColor',
1719'editLinkColor',
1720'mobileLinkColor',
1721'backgroundAlpha',
1722'backgroundHex', ];
1723this.titleParams=[
1724'paddingTop',
1725'paddingLeft',
1726'paddingBottom',
1727'paddingRight',
1728'titleSize',
1729'titleBackgroundColor' ];
1730this.defaultParams={
1731target: true,
1732showOn: 'mouseover',
1733fixed: false,
1734hideOn: 'mouseout',
1735removeElementsOnHide: true,
1736cache: false,
1737hideDelay: 0.5,
1738offset: [ 0, 0 ]
1739};
1740this.getTooltipParams=function(params, custom){
1741var options={ };
1742var customOptions={ };
1743if(typeof params==='object'){
1744for(var param in params){
1745if(params[param]=='false'){
1746params[param]=false;
1747}
1748if(params[param]=='true'){
1749params[param]=true;
1750}
1751if(jQuery.inArray(param, this.customParams)==-1){
1752if(params[param].length){
1753options[param]=this.checkType(param, params[param]);
1754}}else{
1755if(params[param].length){
1756customOptions[param]=params[param];
1757}}
1758}}
1759return(custom==true) ? customOptions:options;
1760};
1761this.checkType=function(param, value){
1762var tmp=value;
1763if(param=='borderWidth')
1764tmp=parseFloat(value);
1765if(param=='stemLength')
1766tmp=parseFloat(value);
1767if(param=='stemBase')
1768tmp=parseFloat(value);
1769return tmp;
1770};
1771this.applyCustomParams=function(element, params){
1772var content=element.data('cmtooltip');
1773var div=document.createElement('div');
1774div.setAttribute('style', '');
1775for(var param in params){
1776div=this.applyCustomParam(div, param, params[param]);
1777}
1778this.initTitleParams(params);
1779jQuery(div).html(content);
1780element.addClass('cm-tooltip-skins');
1781if(element.prop('tagName')==='A'&&(CM_Tools.Modernizr.touch||this.isIOS()) ){
1782jQuery(document).on('click', '.cm-tooltip-skins', function(e){
1783e.preventDefault();
1784});
1785if(window.cmtts_data.mobile_support=='1'){
1786var linkDiv, link=document.createElement('a');
1787hrefTitle=element.html().charAt(0).toUpperCase() + element.html().slice(1);
1788link.setAttribute('href', element.attr('href') );
1789link.setAttribute('class', 'mobileLink');
1790link.innerHTML=hrefTitle;
1791linkDiv=jQuery('<div class="mobile-link"/>')[0];
1792linkDiv.setAttribute('style', 'z-index: 10000');
1793linkDiv.appendChild(link);
1794div.appendChild(linkDiv);
1795}}
1796var container=document.createElement('div');
1797container.appendChild(div);
1798return container.innerHTML;
1799};
1800this.applyCustomParam=function(span, param, value){
1801if(param=='contentOpacity'){
1802span.style['filter']="alpha(opacity=" +(value * 100) + ")";
1803span.style['opacity']=value;
1804}else{
1805if(!param.match('padding') ){
1806span.style[param]=value;
1807}}
1808return span;
1809};
1810this.setTransparencyOption=function(element, settings){
1811var _class=element.attr('class');
1812if(typeof _class!=='undefined'){
1813if(_class.indexOf("transparent") >=0){
1814settings['background']='rgba(255, 255, 255, 0)';
1815settings['borderWidth']=0;
1816}}
1817return settings;
1818};
1819this.initTitleParams=function(params){
1820var style=jQuery("<style type='text/css'>").appendTo('head');
1821var css="\
1822.glossaryItemTitle {\
1823color:   " +(params['titleTextColor']!='undefined' ? params['titleTextColor']:'#000000') + ";\
1824background-color:   " +(params['titleBackgroundColor']!='undefined' ? params['titleBackgroundColor']:'#000000') + ";\
1825font-size:  " +(params['titleSize']!='undefined' ? params['titleSize']:'14px') + ";\
1826margin: 0px !important;\
1827border-top: 10px solid transparent;\
1828border-bottom: 10px solid transparent;\
1829}\
1830\
1831.glossaryItemTitle, .glossaryItemBody {\
1832padding-top:   " +(params['paddingTop']!='undefined' ? params['paddingTop']:'5px') + ";\
1833padding-right:   " +(params['paddingRight']!='undefined' ? params['paddingRight']:'5px') + ";\
1834padding-bottom:   " +(params['paddingBottom']!='undefined' ? params['paddingBottom']:'5px') + ";\
1835padding-left:   " +(params['paddingLeft']!='undefined' ? params['paddingLeft']:'5px') + ";\
1836}\
1837\
1838.glossaryItemBody a {\
1839color:   " +(params['internalLinkColor']!='undefined' ? params['internalLinkColor']:'#000000') + ";\
1840}\
1841\
1842.glossaryItemEditlink a {\
1843color:   " +(params['titleTextColor']!='undefined' ? params['titleTextColor']:'#000000') + ";\
1844}\
1845a.glossaryTooltipMoreLink {\
1846color:   " +(params['mobileLinkColor']!='undefined' ? params['mobileLinkColor']:'#000000') + ";\
1847}\
1848";
1849style.html(css);
1850};
1851this.applyTitleParam=function(element, param, value){
1852element.css(param, value);
1853};
1854this.getRequiredPredefinedParams=function(params){
1855var required=[ 'stemlength',
1856'stemBase',
1857'borderWidth',
1858'borderRadius',
1859'borderColor',
1860'background',
1861'tipJoint',
1862'targetJoint',
1863'borderStyle' ];
1864var data=[ ];
1865if(Object.keys(params).length){
1866for(var param in params){
1867if(jQuery.inArray(params[param], required) ){
1868data[param]=params[param];
1869}}
1870}
1871return data;
1872};
1873this.handleTooltip=function(element, setContent){
1874var CMTTS_tooltip=null;
1875var opentipContentSettings=this.getOpentipContentSettings(element);
1876CMTTS_tooltip=new Opentip(element, opentipContentSettings.content, this.setTransparencyOption(jQuery(element), opentipContentSettings.settings) );
1877if(setContent){
1878CMTTS_tooltip.setContent(jQuery(element).data('cmtooltip') );
1879}
1880var that=this;
1881element.addEventListener('click', function (){
1882setTimeout(function (){
1883that.addTouchEvents(jQuery('div[id^="opentip-"]') );
1884}, 500);
1885});
1886return CMTTS_tooltip;
1887};
1888this.getOpentipContentSettings=function(element){
1889var settings=null;
1890var wrappedContent=null;
1891if(window.cmtts_data.tooltip_skin==='custom'){
1892var tooltipParams=this.getRequiredPredefinedParams(window.cmtts_data.tooltip);
1893settings=jQuery.extend({ }, this.getTooltipParams(tooltipParams), this.defaultParams);
1894wrappedContent=this.applyCustomParams(jQuery(element), this.getTooltipParams(window.cmtts_data.tooltip, true) );
1895}else{
1896settings={ style: window.cmtts_data.tooltip_skin, fixed: false, tipJoint: 'bottomLeft', targetJoint: 'topRight', showOn: 'mouseover', removeElementsOnHide: true };
1897wrappedContent=this.applyCustomParams(jQuery(element), [ ]);
1898}
1899if(this.isIOS()){
1900jQuery.extend(settings, { hideTriggers: [ "closeButton" ], closeButtonRadius: 15, closeButtonCrossSize: 8, closeButtonCrossLineWidth: 2 });
1901}
1902return {
1903content: wrappedContent,
1904settings: settings
1905};};
1906this.replaceSelectedText=function(element){
1907var sel, range;
1908if(window.getSelection){
1909sel=window.getSelection();
1910if(sel.rangeCount){
1911range=sel.getRangeAt(0);
1912range.deleteContents();
1913range.insertNode(element);
1914}}else if(document.selection&&document.selection.createRange){
1915range=document.selection.createRange();
1916range.text=element.html();
1917}};
1918this.addTouchEvents=function(element){
1919element.each(function (){
1920this.addEventListener('touchstart', function(e){
1921}, false);
1922});
1923};
1924this.isIOS=function (){
1925var UA=navigator.userAgent;
1926if(( UA.indexOf('iPhone') > 0)||(UA.indexOf('iPad') > 0) ){
1927return true;
1928}
1929return false;
1930};};
1931(function($){
1932$(document).ready(function (){
1933var CMTooltipFrontendObject=new CMTooltipFrontend();
1934if(typeof window.cmtt_data!=='undefined'&&window.cmtt_data.cmtooltip){
1935window.cmtt_data.cmtooltip=null;
1936}
1937$(document).on("glossaryTooltipReady", function(event){
1938if(typeof window.cmtts_data!=='undefined'&&window.cmtts_data.tooltip_skin){
1939$('[data-cmtooltip]').each(function (){
1940var elem=$(this);
1941if(typeof elem.data('opentips')==='undefined'){
1942CMTooltipFrontendObject.handleTooltip(this);
1943}});
1944}});
1945setTimeout(function (){
1946$(document).trigger('glossaryTooltipReady');
1947}, 5);
1948if(window.cmtt_data!==undefined&&window.cmtt_data.doubleclick_api==="1"){
1949$(document).on('dblclick', function(e){
1950var $this=$(e.target);
1951var selection=(document.selection&&document.selection.createRange().text)||(window.getSelection&&window.getSelection().toString());
1952var selectionObject=(document.selection&&document.selection.createRange())||(window.getSelection&&window.getSelection());
1953var data={
1954action: 'cmtt_api_call',
1955selection: selection
1956};
1957if(typeof(window.cmtt_data)!=='undefined'){
1958clearTimeout(window.cmtt_data.dblclick_timeout);
1959}
1960var dynamicTooltipTarget=document.createElement('span');
1961dynamicTooltipTarget.innerHTML=selection;
1962CMTooltipFrontendObject.replaceSelectedText(dynamicTooltipTarget);
1963var $element=$(dynamicTooltipTarget).data('cmtooltip', 'Loading...');
1964var CMTTS_tooltip_dbclick=CMTooltipFrontendObject.handleTooltip($element[0], false);
1965$.post(window.cmtts_data.ajaxurl, data, function(response){
1966var opentipContentSettings=null;
1967if(response&&response.length > 2){
1968$element.data('cmtooltip', response);
1969opentipContentSettings=CMTooltipFrontendObject.getOpentipContentSettings($element[0]);
1970CMTTS_tooltip_dbclick.setContent(opentipContentSettings.content);
1971}else{
1972CMTTS_tooltip_dbclick.hide();
1973}});
1974});
1975}});
1976}(jQuery) );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.