{"version":3,"file":"ink-all.min.js","sources":["../../src/js/Ink/1/lib.js","../../src/js/Ink/Net/Ajax/1/lib.js","../../src/js/Ink/Net/JsonP/1/lib.js","../../src/js/Ink/Dom/Browser/1/lib.js","../../src/js/Ink/Dom/Css/1/lib.js","../../src/js/Ink/Dom/Element/1/lib.js","../../src/js/Ink/Dom/Event/1/lib.js","../../src/js/Ink/Dom/FormSerialize/1/lib.js","../../src/js/Ink/Dom/Loaded/1/lib.js","../../src/js/Ink/Dom/Selector/1/lib.js","../../src/js/Ink/UI/Animate/1/lib.js","../../src/js/Ink/UI/Carousel/1/lib.js","../../src/js/Ink/UI/Close/1/lib.js","../../src/js/Ink/UI/Common/1/lib.js","../../src/js/Ink/UI/DatePicker/1/lib.js","../../src/js/Ink/UI/Draggable/1/lib.js","../../src/js/Ink/UI/Drawer/1/lib.js","../../src/js/Ink/UI/Dropdown/1/lib.js","../../src/js/Ink/UI/Droppable/1/lib.js","../../src/js/Ink/UI/FormValidator/1/lib.js","../../src/js/Ink/UI/FormValidator/2/lib.js","../../src/js/Ink/UI/ImageQuery/1/lib.js","../../src/js/Ink/UI/LazyLoad/1/lib.js","../../src/js/Ink/UI/Modal/1/lib.js","../../src/js/Ink/UI/Pagination/1/lib.js","../../src/js/Ink/UI/ProgressBar/1/lib.js","../../src/js/Ink/UI/SmoothScroller/1/lib.js","../../src/js/Ink/UI/SortableList/1/lib.js","../../src/js/Ink/UI/Spy/1/lib.js","../../src/js/Ink/UI/Stacker/1/lib.js","../../src/js/Ink/UI/Sticky/1/lib.js","../../src/js/Ink/UI/Swipe/1/lib.js","../../src/js/Ink/UI/Table/1/lib.js","../../src/js/Ink/UI/Tabs/1/lib.js","../../src/js/Ink/UI/TagField/1/lib.js","../../src/js/Ink/UI/Toggle/1/lib.js","../../src/js/Ink/UI/Tooltip/1/lib.js","../../src/js/Ink/UI/TreeView/1/lib.js","../../src/js/Ink/UI/Upload/1/lib.js","../../src/js/Ink/Util/Array/1/lib.js","../../src/js/Ink/Util/BinPack/1/lib.js","../../src/js/Ink/Util/Cookie/1/lib.js","../../src/js/Ink/Util/Date/1/lib.js","../../src/js/Ink/Util/Dumper/1/lib.js","../../src/js/Ink/Util/I18n/1/lib.js","../../src/js/Ink/Util/Json/1/lib.js","../../src/js/Ink/Util/String/1/lib.js","../../src/js/Ink/Util/Url/1/lib.js","../../src/js/Ink/Util/Validator/1/lib.js"],"names":["window","document","paths","modules","modulesLoadOrder","modulesRequested","pendingRMs","modulesWaitingForDeps","apply","Function","prototype","isEmptyObject","o","k","hasOwnProperty","Ink","VERSION","_checkPendingRequireModules","I","F","dep","mod","cb","pRMs","length","left","args","remaining","push","setTimeout","getPath","key","noLib","split","curKey","i","root","path","slice","join","test","setPath","rootURI","replace","loadScript","uri","contentType","indexOf","givenUri","this","Error","scriptEl","createElement","setAttribute","onerror","onreadystatechange","ev","event","type","readyState","error","aHead","getElementsByTagName","appendChild","_loadLater","namespace","ns","returnParentAndKey","levels","nsobj","parent","f","getModule","version","createModule","ver","deps","modFn","modAll","Array","call","arguments","moduleContent","_version","isInkModule","t","requireModules","cbFn","undefined","_moduleRenames","warn","Ink.UI.Aux_1","getModulesLoadOrder","getModuleScripts","mlo","unshift","map","m","getModuleURL","createExt","moduleName","dependencies","bind","fn","context","innerArgs","finalArgs","concat","bindMethod","object","methodName","bindEvent","id","getElementById","ss","rule","from","Dom","Selector","select","s","extendObj","destination","sources","len","property","Object","log","console","Ajax","url","options","init","globalOptions","parameters","requestHeaders","xMLHttpRequestWithCredentials","XMLHttpRequest","userOptions","asynchronous","method","timeout","delay","postBody","onComplete","onSuccess","onFailure","onException","onHeaders","onCreate","onInit","onTimeout","sanitizeJSON","evalJS","xhrProxy","cors","debug","useCredentials","signRequest","globalParameters","paramsObjToStr","safeCall","urlLocation","_locationFromURL","isHTTP","_locationIsHTTP","isCrossDomain","_locationIsCrossDomain","location","requestHasBody","search","transport","getTransport","request","createElementNS","href","protocol","match","widget","host","usingXDomainReq","XDomainRequest","ActiveXObject","e","setHeaders","headers","Accept","Accept-Language","navigator","language","X-Requested-With","X-Ink-Version","headerReqName","overrideMimeType","userAgent","Connection","headerName","setRequestHeader","optParams","p","a","params","toString","isNaN","encodeURIComponent","pop","setParams","getHeader","name","getResponseHeader","getAllHeaders","getAllResponseHeaders","getResponse","r","headerJSON","responseJSON","timeTaken","Date","startTime","requestedUrl","responseText","responseXML","status","statusText","abort","clearTimeout","delayTimeout","stoTimeout","ex","finish","runStateChange","rs","getTime","responseContent","response","curStatus","makeError","isSuccess","headerContentType","evalJSON","mimeType","xmlDoc","DOMParser","parseFromString","xml","destroy","listener","first","rethrow","exception","message","stacktrace","stack","value","nodeType","crossDomain","open","withCredentials","onload","send","code","isJSON","str","strJSON","sanitize","JSON","parse","eval","load","callback","ping","JsonP","failureObj","callbackParam","internalCallback","randVar","parseInt","Math","random","Net","_removeScriptTag","_addScriptTag","_addParamsToGet","hasQuestionMark","sep","pKey","pValue","parts","_getScriptContainer","headEls","scriptEls","rnd_seed","src","scriptCtn","_requestFailed","scriptUri","getAttribute","parentNode","removeChild","Browser","IE","GECKO","OPERA","SAFARI","KONQUEROR","CHROME","model","cssPrefix","domPrefix","detectBrowser","setDimensions","setReferrer","myWidth","myHeight","innerWidth","innerHeight","documentElement","clientWidth","clientHeight","body","windowWidth","windowHeight","referrer","escape","_sniffUserAgent","sAgent","toLowerCase","rVersion","re","RegExp","reVersion","alert","getCs","defaultView","getComputedStyle","Css","addRemoveClassName","elm","className","addRemState","addClassName","removeClassName","classList","add","hasClassName","remove","elmClassName","setClassName","all","has","contains","blinkClass","element","negate","Number","toggleClassName","forceAdd","toggle","setOpacity","val","style","opacity","filter","_camelCase","_","$1","toUpperCase","getStyle","currentStyle","charAt","css","parseFloat","setStyle","cssText","prop","styleFloat","cssFloat","show","forceDisplayProperty","display","hide","showHide","forceShow","_getRefTag","head","firstElementChild","child","firstChild","nextSibling","appendStyleTag","selector","force","styles","oldStyle","l","innerHTML","defStyle","refTag","styleStr","styleSheet","createTextNode","insertBefore","appendStylesheet","media","rel","_loadingCSSFiles","_loadedCSSFiles","appendStylesheetCb","cbs","linkEl","headEl","imgEl","_url","callbacks","decToHex","dec","normalizeTo2","rDec","gDec","g","bDec","b","rgb","hexToDec","hex","substr","getPropertyFromStylesheet","getRuleFromStylesheet","getPropertyFromStylesheet2","rules","getRulesFromStylesheet","x","sheet","ri","rf","styleSheets","si","sf","cssRules","selectorText","res","getPropertiesFromRule","props","steps","pre","pos","substring","borderTopLeftRadius","borderBottomRightRadius","borderTopRightRadius","borderBottomLeftRadius","changeFontSize","delta","op","minVal","maxVal","that","TypeError","el","els","fontSize","rect","elem","dimensions","getBoundingClientRect","top","offsetTop","offsetLeft","createContextualFragmentSupport","createRange","Range","createContextualFragment","deleteThisTbodyToken","browserCreatesTbodies","div","InkElement","isDOMElement","get","create","tag","properties","parEl","scrollTo","scrollIntoView","elmOffset","elmTop","elmLeft","offsetParent","y","offset","positionedOffset","valueTop","valueLeft","tagName","position","doc","ownerDocument","docElem","box","clientTop","clientLeft","scrollTop","pageYOffset","scrollLeft","pageXOffset","scroll","_getPropPx","cs","n","c","getPropertyValue","offset2","hasAttribute","attr","insertAfter","newElm","targetElm","insertTop","insertBottom","textContent","node","text","innerText","lastChild","childNodes","nodeValue","setTextContent","isLink","hasAttributeNS","isAncestorOf","ancestor","compareDocumentPosition","descendantOf","descendant","lastElementChild","previousSibling","nextElementSibling","sibling","previousElementSibling","elementWidth","offsetWidth","elementHeight","offsetHeight","elementLeft","elementTop","elementDimensions","outerDimensions","bbox","right","bottom","inViewport","opts","dims","partial","margin","viewportWidth","viewportHeight","isHidden","w","h","isVisible","clonePosition","cloneTo","cloneFrom","ellipsizeText","overflow","whiteSpace","textOverflow","findUpwardsHaving","boolTest","findUpwardsByClass","tst","cls","findUpwardsByTag","nodeName","findUpwardsById","findUpwardsBySelector","sel","matchesSelector","getChildrenText","removeIt","j","part","nodes","jLen","_trimString","String","data","trim","getSelectValues","selectEl","values","_normalizeData","d","data2","fillSelect","container","skipEmpty","defaultValue","containerEl","optionEl","fillRadios","insertAfterEl","splitEl","inputEl","checked","fillChecks","parentIndexOf","parentEl","childEl","idx","nextSiblings","elements","siblings","children","index","previousSiblings","childElementCount","_wrapElements","TABLE","html","TBODY","THEAD","TFOOT","TR","_getWrapper","wrapper","wrapFunc","tds","tbody","appendHTML","prependHTML","setHTML","wrap","target","nextNode","unwrap","wrapperSelector","replacement","replaceChild","removeTextNodeChildren","prevEl","toRemove","htmlToFragment","range","createDocumentFragment","selectNode","fragment","tempElement","current","InkDomSelector","dataset","attrs","attributes","curAttr","curAttrName","curAttrValue","total","moveCursorTo","setSelectionRange","createTextRange","collapse","moveEnd","moveStart","pageWidth","xScroll","scrollMaxX","scrollWidth","self","pageHeight","yScroll","scrollMaxY","scrollHeight","bean","definition","win","old","namespaceRegex","nameRegex","addEvent","removeEvent","W3C_MODEL","eventSupport","ONE","str2arr","isString","isFunction","standardNativeEvents","w3cNativeEvents","nativeEvents","hash","events","customEvents","isAncestor","check","related","relatedTarget","prefix","mouseenter","base","condition","mouseleave","mousewheel","Event","commonProps","mouseProps","mouseWheelProps","keyProps","textProps","touchProps","messageProps","stateProps","overOutRegex","typeFixers","reg","fix","newEvent","keyCode","which","rightClick","button","pageX","pageY","clientX","clientY","typeFixerMap","isNative","parentWindow","originalEvent","isBean","srcElement","fixer","preventDefault","returnValue","stopPropagation","cancelBubble","stop","stopped","stopImmediatePropagation","isImmediatePropagationStopped","clone","currentTarget","ne","targetElement","RegEntry","wrappedHandler","eargs","findTarget","eventElement","__beanDel","ft","handler","original","namespaces","customType","once","removeListener","eventType","inNamespaces","checkNamespaces","matches","checkElement","checkOriginal","checkHandler","registry","forAll","pfx","list","entries","entry","put","del","splice","removed","selectorEngine","setSelectorEngine","querySelectorAll","rootListener","propertyName","listeners","custom","attachEvent","detachEvent","rm","originalFn","orgType","handlers","delegate","array","fireListener","evt","createEvent","dispatchEvent","fireEvent","createEventObject","off","typeSpec","isTypeStr","on","types","delfn","one","fire","names","beanDel","noConflict","cleanup","CollectGarbage","InkEvent","KEY_BACKSPACE","KEY_TAB","KEY_RETURN","KEY_ESC","KEY_SPACE","KEY_LEFT","KEY_UP","KEY_RIGHT","KEY_DOWN","KEY_DELETE","KEY_HOME","KEY_END","KEY_PAGEUP","KEY_PAGEDOWN","KEY_INSERT","throttle","func","wait","lastCall","throttled","now","timeDiff","delegationTarget","fromElement","toElement","findElement","elmTagName","observe","eventName","callBack","useCapture","addEventListener","observeOnce","onceBack","stopObserving","observeMulti","observeDelegated","cursor","Selector_1","removeEventListener","cancel","stopDefault","pointer","pointerX","pointerY","touches","isLeftClick","isRightClick","isMiddleClick","getCharFromKeyboardEvent","changeCasing","fromCharCode","shiftOn","shiftKey","InkArray","isArrayIsh","obj","isArray","toArray","FormSerialize","serialize","form","out","emptyArrayToken","pairs","asPairs","emptyArray","forEach","pair","_resultsInArray","emit","serializeEl","multiple","didEmit","thisOption","inputs","_isSerialized","fillIn","map2","_objToPairs","_fillInPairs","groupBy","reduce","_fillInOne","firstOne","firstNodeName","firstType","isSelectMulti","_fillInBoolean","min","checkAttr","input","isChecked","inArray","Loaded","_contexts","run","cbQueue","done","checkState","_checkState","poll","_poll","ael","rem","det","wet","csf","alreadyLoaded","frameElement","doScroll","where","_ready","rnative","createCache","cache","keys","Expr","cacheLength","shift","markFunction","expando","assert","Sizzle","results","seed","groups","nid","newContext","newSelector","preferredDoc","setDocument","documentIsHTML","rquickExpr","exec","support","getElementsByClassName","qsa","rbuggyQSA","tokenize","rescape","toSelector","rsibling","qsaError","removeAttribute","rtrim","siblingCheck","cur","diff","sourceIndex","MAX_NEGATIVE","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","parseOnly","matched","tokens","soFar","preFilters","cached","tokenCache","preFilter","rcomma","rcombinators","matchExpr","addCombinator","matcher","combinator","dir","checkNonElements","doneName","outerCache","dirkey","dirruns","cachedruns","elementMatcher","matchers","condense","unmatched","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","elems","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","relative","implicitRelative","matchContext","matchAnyContext","outermostContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","find","dirrunsUnique","uniqueSort","contexts","token","runescape","funescape","compile","setFilters","getText","isXML","recompare","sortInput","rbuggyMatches","classCache","compilerCache","hasDuplicate","sortOrder","strundefined","arr","push_native","whitespace","characterEncoding","identifier","operators","pseudos","rpseudo","ridentifier","ID","CLASS","NAME","TAG","ATTR","PSEUDO","CHILD","needsContext","rinputs","rheader","rattributeQuotes","escaped","high","createComment","getByName","pass","getElementsByName","sortDetached","div1","attrHandle","attrId","getAttributeNode","tmp","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","adown","bup","compare","aup","ap","bp","expr","ret","specified","msg","duplicates","detectDuplicates","sortStable","sort","selectors","createPseudo",">"," ","+","~","excess","unquoted","pattern","operator","result","what","last","simple","forward","ofType","nodeIndex","start","useCache","pseudo","not","lang","elemLang","focus","activeElement","hasFocus","tabIndex","enabled","disabled","selected","selectedIndex","empty","header","eq","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","group","filters","Common","Animate","BaseUIComponent","animationPrefix","animationEndEventName","animation","oAnimation","msAnimation","webkitAnimation","_name","_optionDefinition","trigger","duration","removeClass","onEnd","_init","_options","animate","_element","_animationPrefix","animationSupported","onAnimationEnd","animationName","elOrSelector","createUIComponent","Pagination","limitRange","max","Carousel","setTransitionProperty","newTransition","transitionProperty","oTransitionProperty","msTransitionProperty","mozTransitionProperty","webkitTransitionProperty","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","autoAdvance","axis","initialPage","spaceAfterLastSlide","hideLast","center","keyboardSupport","pagination","onChange","swipe","_handlers","paginationChange","windowResize","_isY","ulEl","_ulEl","_currentPage","refit","_setUpPagination","_setUpAutoAdvance","_setUpHider","size","perpendicular","_liEls","numSlides","contRect","_ctnLength","_elLength","_slidesPerPage","floor","isFinite","numPages","ceil","numPagesChanged","_numPages","_deltaLength","_center","_updateHider","_IE7","_pagination","setSize","setPage","getPage","setCurrent","nextPage","hiderEl","_hiderEl","gap","pad","padding","slides","stl","_onTouchStart","_swipeData","ulRect","firstUlPos","inUlX","inUlY","_touchMoveIsFirstTouchMove","_onTouchMove","deltaY","abs","deltaX","_scrolling","_onAnimationFrame","pointerPos","swipeData","elRect","newPos","_onTouchEnd","snapToNext","relProgress","curPage","progressInPages","_onPaginationChange","pgn","_setPage","getCurrent","page","_lengthToGo","isLastPage","_itemsInLastPage","previousPage","getSlidesPerPage","getTotalPages","getStageElm","getSlidesList","getTotalSlides","Close","Url","warnStub","constructor","stub","_componentOptions","elementIsOptional","elsOrSelector","isValidInstance","_validateInstance","registerInstance","_stubInstance","nothing","es6WeakMapSupport","instances","WeakMap","domRegistry","__InkInstances","set","thing","Layouts","TINY","SMALL","MEDIUM","LARGE","XLARGE","isInteger","fieldName","required","fieldId","defaults","overrides","optionValue","lType","defaultVal","invalidThrow","_coerce_funcs","fromDataAttrs","dataAttrs","_coerce_from_string","_options_validate","invalid","quote","invalidStr","paramName","_options_validate_types","number","boolean","string","function","integer","round","stringify","childIndex","ajaxJSON","endpoint","currentLayout","v","detectorEl","hashSet","hashParams","getAnchorString","genQueryString","cleanChildren","storeIdAndClasses","fromEl","inObj","_id","classes","_classes","restoreIdAndClasses","toEl","_instanceId","_warnDoubleInstantiation","newInstance","getName","getInstance","nameWithoutVersion","inst","unregisterInstance","UIComponent","getInstanceFromSelector","getInstanceIds","getInstances","destroyComponent","instance","err","_validate","_validationError","getOption","setOption","getElement","theConstructor","assertProp","propType","propVal","_oldProto","hideF","InkDate","clamp","dateishFromYMDString","YMD","dateishFromYMD","year","month","day","_year","_month","_day","dateishFromDate","date","getFullYear","getMonth","getDate","DatePicker","autoOpen","cleanText","closeText","pickerField","containerElement","cssClass","dateRange","displayInSelect","dayField","monthField","yearField","format","nextLinkText","ofText","onFocus","onMonthSelected","onSetDate","onYearSelected","prevLinkText","showClean","showClose","shy","startDate","startWeekDay","validDayFn","validMonthFn","validYearFn","nextValidDateFn","prevValidDateFn","yearRange",1,2,3,4,5,6,7,8,9,10,11,12,"wDay","_dateParsers","_hoverPicker","_picker","_setMinMax","setDate","_lang","_render","_listenToContainerObjectEvents","_containerObject","_renderSuperTopBar","calendarTop","_monthDescContainer","_monthPrev","_monthNext","_monthContainer","_monthSelector","_renderMonthSelector","_yearSelector","_appendDatePickerToDom","_renderMonth","_monthChanger","_ofText","_yearChanger","inline","_addOpenCloseEvents","_addDateChangeHandlersToInputs","fields","_updateDate","_showDefaultView","_inline","_hide","opener","cannotBe","ulSelector","mon","_renderMonthButton","liMonth","data-cal-month","appendTarget","parentIsControl","_wrapper","_wrapperIsControl","_superTopBar","_onClick","_onRelativeChangerClick","_onAbsoluteChangerClick","_showMonthSelector","_showYearSelector","_clean","_updateDescription","changeYear","change_year_next","change_year_prev","changeMonth","change_month_next","change_month_prev","_updateCal","elemData","calDay","calMonth","calYear","_changeYear","blur","noLimits","_min","noMinLimit","_max","noMaxLimit","MAX_VALUE","dates","rDate","each","noLim","lim","_daysInMonth","valid","_dateCmp","_fitDateToRange","_isValidDate","_dateWithinRange","_dateAboveMax","_dateBelowMin","oth","_dateCmpUntil","depth","_getPrevMonth","_getNextMonth","dataParsed","_parseDate","_setDate","inc","_incrementViewingYear","firstYear","thisYear","yearUl","prevYearLi","_getYearButton","nextYearLi","_acceptableYear","li","data-cal-year","_addMonthClassNames","dateStr","yearRegExp","validOneOrTwo","_isDate","_acceptableDay","_acceptableDateComponent","_acceptableMonth","userCb","_callUserCallbackBool","_writeDateInFormat","dateString","auxDate","objClicked","dt","_updateMonth","_y","_m","exceptions","incValue","_tryLeap","_getPrevYear","_getNextYear","atomName","directionName","advancer","maxOrMin","boundary","leapUserCb","_callUserCallbackDate","_getNextDecade","decade","_getCurrentDecade","_getPrevDecade","_callUserCallbackBase","yyyy-mm-dd","yyyy/mm/dd","yy-mm-dd","yy/mm/dd","dd-mm-yyyy","dd/mm/yyyy","dd-mm-yy","dd/mm/yy","mm/dd/yyyy","mm-dd-yyyy","_getMonthCalendarHeader","_getDayButtons","_getFirstDayIndex","wDayFirst","getDay","daysInMonth","ul","firstDayIndex","_getDayButton","dayButton","_addMonthButtonClassNames","btn","toDisable","showMonth","isMonthRendered","between","Draggable","constraint","constraintElm","handle","revert","zIndex","fps","droppableProxy","mouseAnchor","dragClass","skipChildren","onStart","onDrag","elmStartPosition","active","dragged","prevCoords","placeholder","zindex","firstDrag","deltaMs","lastRunAt","_onStart","dragFacade","_onDragFacade","drag","_onDrag","end","_onEnd","selectStart","_getCoords","ps","_cloneStyle","dst","borderWidth","width","height","tgtEl","originalPosition","marginTop","marginBottom","marginLeft","marginRight","visibility","delta2","ad","applyDelta","dragHandlerName","proxy","fs","backgroundColor","firstEl","mouseCoords","mPosX","mPosY","newX","newY","draggableSize","constTop","constBottom","constLeft","constRight","Droppable","updateAll","mouseCoords2","action","pt","Element","elNotFound","Drawer","parentSelector","leftDrawer","leftTrigger","rightDrawer","rightTrigger","contentDrawer","closeOnContentClick","closeOnLinkClick","mode","sides","_contentDrawers","_leftDrawer","_leftTriggers","_rightDrawer","_rightTriggers","_triggers","_isOpen","_direction","click","afterTransition","_afterTransition","_delay","_addEvents","triggerClicked","side","close","direction","Toggle","Dropdown","hoverOpen","dismissOnInsideClick","dismissOnOutsideClick","dismissAfter","onInsideClick","onOutsideClick","onOpen","onDismiss","_toggle","closeOnInsideClick","closeOnClick","onChangeState","newState","_openOrDismiss","_onMouseOver","getState","_openTimeout","_dismissTimeout","_onMouseOut","_onInsideClick","_handlerCall","dismiss","_onOutsideClick","foundElem","needle","foundTarget","callHandler","doNotInformToggle","_doNotInformToggle","setState","hAddClassName","hRemoveClassName","_droppables","_draggables","cleanStyle","draggable","opt","hoverClass","hoverclass","accept","onHover","onDrop","onDropOut","namedEventHandlers","move","droppable","copy","cloneNode","_findDraggable","originalParent","elementData","_update","_findData","elms","update","coords","InkValidator","elementsWithSameName","FormValidator","_flagMap","ink-fv-required","ink-fv-email","ink-fv-url","ink-fv-number","ink-fv-phone_pt","ink-fv-phone_cv","ink-fv-phone_mz","ink-fv-phone_ao","ink-fv-date","ink-fv-confirm","ink-fv-custom","confirmElms","hasConfirm","_errorClassName","_errorValidationClassName","_errorTypeWarningClassName","_errorTypeErrorClassName","validate","_free","onError","customFlag","confirmGroup","fail","_validateElements","_showError","_clearError","_clearCache","_getElements","formElms","curElm","totalElm","flag","flag2","oGroups","_makeConfirmGroups","errors","customErrors","_isValid","_isCustomValid","_validateConfirmGroups","curGroup","totalG","curFlag","tCustom","fieldType","inputType","_trim","aFormRadios","totalRadio","mail","isPTPhone","isCVPhone","isAOPhone","isMZPhone","validFormat","validValues","isDate","formElm","aFail","tFail","_showAnErrorOnElement","controlGroupElm","controlElm","errorClasses","_errorTypeClassName","errorMsg","aErrorLabel","control","aErrorLabel2","I18n","FormElement","validationFunctions","min_length","minSize","max_length","maxSize","exact_length","exactSize","email","fullCheck","ip","ipType","isIP","phone","phoneType","countryCode","credit_card","cardType","isCreditCard","alpha","supportSpaces","ascii","singleLineWhitespace","punctuation","unicode","unicodePunctuation","latin","latin1","latin1Punctuation","alpha_numeric","numbers","alpha_dash","dash","underscore","digit","positive","negative","decimalPlaces","decimal","decimalSeparator","leftDigits","decimalSep","maxDigits","numeric","minValue","maxValue","multipleOf","color","isColor","fieldToCompare","getFormElements","getValue","validationMessages","en_US","formvalidator.required","formvalidator.min_length","formvalidator.max_length","formvalidator.exact_length","formvalidator.email","formvalidator.url","formvalidator.ip","formvalidator.phone","formvalidator.credit_card","formvalidator.date","formvalidator.alpha","formvalidator.text","formvalidator.latin","formvalidator.alpha_numeric","formvalidator.alpha_dash","formvalidator.digit","formvalidator.integer","formvalidator.decimal","formvalidator.numeric","formvalidator.range","formvalidator.color","formvalidator.matches","formvalidator.validation_function_not_found","pt_PT","label","_errors","_rules","_value","_getLabel","_parseRules","rulesLength","paramStartPos","_addError","paramObj","field","i18nKey","getErrors","_formElements","eventTrigger","neverSubmit","searchFor","beforeValidation","setRule","errorMessage","getKey","langObj","dictObj","append","getI18n","setI18n","i18n","appendI18n","setLanguage","getRules","_rootElement","_errorMessages","_markedErrorElements","getElements","formElements","errorElement","errorElements","counter","cancelEventOnSuccess","formElement","controlGroupElement","controlElement","paragraph","errorArr","ImageQuery","retina","queries","onLoad","lastIndexOf","_filename","sortMulti","reverse","_onLoad","_onResize","_findCurrentQuery","devicePixelRatio","query","LazyLoad","item","source","scrollElement","touchEvents","onInsideViewport","onAfterAttributeChange","autoInit","_rootElm","_aData","_hasEvents","_activate","_getData","_onScrollThrottled","aElms","_onScroll","_removeEvents","_elInViewport","_userCallback","reload","upName","dimension","firstCharacter","maxName","Modal","opacitySupported","openModals","shadeClass","modalClass","triggerEvent","autoDisplay","markup","onShow","closeOnEscape","responsive","_onShadeClick","keyDown","_onKeyDown","resize","_wasDismissed","_markupMode","_modalDiv","_modalDivStyle","_modalShadow","_modalShadowStyle","_contentContainer","setContentMarkup","triggerElements","_reposition","runNow","_timeoutResizeFunction","_resizeTimeout","isPercentage","currentViewport","originalStatus","_resizeContainer","_shadeElement","alertsInTheModal","alertsLength","containerHeight","_modalHeader","_modalFooter","compatMode","_contentElement","_waitForFade","keyValue","htmlEl","transitionEndEventNames","classicName","evName","fadeChecker","getContentElement","contentMarkup","tempHeader","tempFooter","toAdd","genAEl","inner","aEl","wrapText","spanEl","totalItemCount","itemsPerPage","sideButtons","firstLabel","lastLabel","previousLabel","nextLabel","previousPageLabel","nextPageLabel","hashParameter","parentTag","childTag","wrapperClass","paginationClass","activeClass","disabledClass","hideClass","previousClass","previousPageClass","nextClass","nextPageClass","numberFormatter","_size","_calculateSize","_current","_itemLiEls","_generateMarkup","_updateItems","_observe","count","liEls","isSimpleToggle","liEl","_nextEl","pi","pf","_pageStart","_pageEnd","_page","_prevPageEl","hasPreviousPage","_nextPageEl","hasNextPage","_firstEl","isFirst","_lastEl","isLast","_prevEl","hasPrevious","hasNext","hasUlAlready","isChevron","isDotted","createLiEl","isPrev","isNext","isPrevPage","isNextPage","firstClass","lastClass","aElem","nr","setOnChange","sz","setSizeInItems","totalItems","pageNumber","isRelative","getSize","ProgressBar","startValue","_elementBar","setValue","newValue","cancelAnimationFrame","SmoothScroller","speed","changeHash","endPos","interval","onDone","onClick","render","link","thisDocument","linkedDocument","activeLiSelector","activeLi","Events","SortableList","hasTouch","maxTouchPoints","msMaxTouchPoints","placeholderClass","draggedClass","draggingClass","dragSelector","dragObject","handleSelector","moveSelector","swap","cancelMouseOut","down","_onDown","_onMove","up","_onUp","_isMoving","_down","_move","_up","stopMoving","_placeholder","_movePlaceholder","_addMovingClasses","touch","elementFromPoint","validateMove","droppedElement","_removeMovingClasses","target_position","placeholder_position","from_top","from_left","targetIndex","spyTargets","addSpied","spied","observeOnScroll","observingOnScroll","onScroll","onScrollForTarget","activeEl","findActiveElement","toDeactivate","menuLinkSelector","toActivate","closest","Infinity","closestIndex","bBox","Spy","Stacker","column","customBreakPoints","largeMax","largeMin","mediumMax","mediumMin","smallMax","smallMin","largeCols","mediumCols","smallCols","isOrdered","onRunCallback","onResizeCallback","onAPIReloadCallback","_aList","_curLayout","_runFirstTime","_getPageItemsToList","_canApplyLayoutChange","_applyLayoutChange","addItem","reloadItems","_removeDomItems","_setCurLayout","customBreakpoints","_getColumnsToShow","cols","curLayout","_aColumn","totalCols","aItems","aNewList","ii","countCol","Sticky","offsetBottom","topElement","stickyClass","inlineDimensions","inlinePosition","bottomElement","activateInLayouts","_dims","scrollTarget","_isDisabledInLayout","_getDims","unstick","_unstick","bottomOfSticky","maxBottomOfSticky","_stickTo","_inlineDimensions","_getBottomOffset","bottomOfViewport","toBottomOfDocument","oldPosition","oldWidth","dimensionsInStatic","Swipe","onMove","minDist","maxDist","minDuration","maxDuration","storeGesture","stopEvents","_supported","db","_isOn","_isMeOrParent","_pushGesture","_gesture","_time","changedTouches","_target","_t0","_p0","t1","gesture","p1","dr","dist","sqrt","time","overallMovement","overallTime","InkUrl","InkString","Json","maybeTurnIntoNumber","rNumber","cmp","numberishEnabledCmp","aValue","bValue","Table","sameSame","pageSize","caretUpClass","caretDownClass","createEndpointUrl","getDataFromEndPoint","processJSONRows","processJSONRow","processJSONField","processJSONHeaders","processJSONTotalRows","totalRows","getSortKey","allowResetSorting","visibleFields","tdClassNames","paginationOptions","_thead","tHead","createTHead","_headers","thClick","_originalFields","_sortableFields","_originalData","_data","_totalRows","_resetSortOrder","_addHeadersClasses","_setPagination","headerLabel","classNames","_onThClick","paginated","sortable","_invertSortOrder","_setSortOrderOfColumn","_paginate","sortAndReverse","isAscending","_sort","caretHtml","order","firstIndex","lastIndex","_registerFieldNames","_fieldIsVisible","userKey","keyFunction","columnIndex","columnName","trA","trB","elementA","elementB","_createHeadersFromJson","tr","insertRow","th","_createSingleHeaderFromJson","_createRowsFromJSON","rows","row","trIndex","_createSingleRowFromJson","rowIndex","_createFieldFromJson","fieldData","processor","_elOrFieldData","processed","isNumber","setEndpoint","currentPage","paginationEl","pageNo","_getSortOrder","_getDataViaAjax","_getUrl","urlCreator","parseUrl","sortField","endpointUri","success","JSONData","_onAjaxSuccess","getDataFromEndpoint","jsonResponse","_rowLength","Tabs","preventUrlChange","onBeforeChange","menuSelector","contentSelector","tabSelector","triggerEventsOnLoad","_menu","_initializeDom","_setFirstActive","contentTabs","activeMenuLink","_findLinkByHref","_changeTab","runCallbacks","activeTabs","_activeMenuTab","_activeSection","_activeMenuLink","_onTabClickedGeneric","_onTabClicked","tabElm","_dehashify","changeTab","_lastLayout","smallLayout","_hashify","links","disable","enable","activeTab","activeMenuTab","activeSection","activeContentTab","TagField","enterKey","backspaceKey","isTruthy","tags","tagQuery","tagQueryAsync","allowRepeated","maxTags","outSeparator","separator","autoSplit","_readInput","_viewElm","_input","_tagsFromMarkup","_tags","_onKeyUp","_onBlur","_refocus","tagname","option","_tagsToMarkup","_addTag","_removeTag","spc","_onEnterKeyDown","_onBackspaceKeyDown","_removeConfirm","_unsetRemovingVisual","_setRemovingVisual","tagIndex","_removeRemovingVisualTimeout","isAccordion","initialState","classNameOn","classNameOff","_targets","_accordion","_firstTime","_bindEvents","state","_onTriggerEvent","isAncestorOfClickedElement","some","thisOne","_updateAccordion","accordionElement","shades","ancestorOfTargets","shadesLength","Tooltip","EachTooltip","transitionDurationName","transitionPropertyName","transitionTimingFunctionName","bodies","spacing","forever","template","templatefield","fade","tooltips","tooltip","_destroy","_oppositeDirections","_onMouseMove","_delayTimeout","_makeTooltip","mousePosition","_getOpt","_createTooltipElement","_removeTooltip","_fadeInTooltipElement","_placeTooltipElement","_onTooltipMouseOver","_getFloatOpt","outerHTML","_getIntOpt","fadeTime","mPos","_setPos","targetElementPos","tleft","ttop","centerh","centerv","tooltipDims","elementDims","maxX","maxY","_getWhereValueInsideViewport","arrow","tooltipLeft","tooltipTop","toBottom","toRight","toLeft","toTop","viewport","dataAttrVal","instanceOption","_getMousePosition","pageDims","_getPageXY","elmDims","scrollDim","_getScroll","cWidth","cHeight","dd","TreeView","parentClass","openNodeClass","openClass","closedClass","iconTag","isParent","isOpen","_getIcon","_setNodeOpen","_getChild","beOpen","icon","DirectoryReader","maxDepth","_read","_readDirectories","running","_readEntries","currentEntry","createReader","readEntries","isDirectory","clearArray","fullPath","_stopActivityTimeout","readError","activity","checkActivity","clearInterval","readComplete","setInterval","Queue","lists","items","getItems","parentId","purge","keepList","pid","priority","view","_searchByPid","UI","Upload","_fileButton","fileButton","_dropzone","dropzone","_setDropEvent","_setFileButton","dropzones","ondrop","_dropEventHandler","ondragleave","_onDragLeave","ondragend","_onDragEndEventHandler","ondragdrop","ondragenter","_onDragEnterHandler","ondragover","_onDragOverHandler","publish","btns","_fileChangeHandler","files","FormData","_addFilesToQueue","_events","fileFormName","maxFilesize","INVALID_FILE_NAME","extraData","useChunks","chunkSize","minSizeToUseChunks","endpointChunk","endpointChunkCommit","foldersEnabled","directoryMaxDepth","_queueId","_queueRunning","_folders","_supportChunks","Blob","dataTransfer","_files","webkitGetAsEntry","folders","_addFolderToQueue","invalidFolders","getFiles","isFile","convertToFile","hasParent","getSubDirs","created","fileID","directory","_processQueue","internalUpload","queueLen","canceled","_doRequest","_upload","xhr","forceAbort","showError","lengthComputable","loaded","lastModifiedDate","upload","onprogress","chunk_offset","chunk_upload_id","fd","blob","upload_path","parentID","rootPath","invalidOffset","upload_id","chunk_expires","expires","onabort","abortAll","abortOne","subscribe","arrayProto","testedObject","outKey","latestGroup","initial","aKeys","shuffle","tmp1","rnd","filtered","intersect","arr1","arr2","shared","J","convert","unique","newArr","step","insert","rLen","output","iLen","Packer","fit","blocks","block","findNode","splitNode","used","GrowingPacker","growNode","canGrowDown","canGrowRight","shouldGrowRight","shouldGrowDown","growRight","growDown","sorts","area","msort","maxside","criteria","BinPack","binPack","bl","packer","sorter","dims2","fitted","unfitted","filled","Cookie","cookie","_Cookie","aCookie","aItem","decodeURIComponent","domain","secure","sName","sExpires","sPath","sDomain","sSecure","oDate","sDate","valueOf","nDate","expiresString","toGMTString","portClean","cookieName","expiresDate","_months","_iMonth","janeiro","jan","fevereiro","fev","março","mar","abril","abr","maio","mai","junho","jun","julho","jul","agosto","ago","setembro","outubro","novembro","nov","dezembro","dez","_wDays","_d","_iWeek","week","segunda","seg","terça","ter","quarta","qua","quinta","qui","sexta","sex","sábado","sáb","domingo","dom","nDays","_date","iFormat","escapeChar","jsDate","jsFirstDay","jsThisDay","jsHour","jsDay","suffixes","suffix","UTC","jsYearStart","days","jsMonth","getYear","jsYear","getHours","jsMinute","getMinutes","jsSecond","getSeconds","getTimezoneOffset","jsMinZone","jsMinutes","jsDayName","jsMonthName","str_date","mList","objIndex","dayY","dayW","hour","hourD","sec","msec","ampm","diffM","diffH","pattr","_haveDatetime","_haveYear","_haveYDay","_haveDay","_haveMonth","_haveMonthDay","_haveOnlyDay","_haveWDay","_haveWeek","_haveWeekWDay","_haveOnlyWDay","_validDate","_noDate","_haveHour12","_haveHour24","_haveHour","_haveMin","_haveSec","_haveMSec","_haveMoreM","_haveMoreS","_haveDiffM","_haveDiffH","dList","gmt","aux","Dumper","_tab","_formatParam","param","formated","_outputFormat","_getTabs","numberOfTabs","tabs","_i","dim","_typeof","printDump","write","returnDump","alertDump","windowDump","dumperwindow","pattrText","funcOrVal","dict","testMode","_dicts","_dict","_testMode","_gLang","bool","gLang","langGlobal","_gDict","pars","isObj","$2","$3","ntext","strSin","strPlur","ordinal","num","lastDig","ordDict","byLastDigit","alias","_gDicts","appendGlobal","twoDigits","function_call","cx","dateToISOString","toISOString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","InkJson","_nativeJSON","_convertToUnicode","_escape","theString","\b","\t","\n","\f","\r","\"","\\","charCodeAt","_toUnicode","unicodeString","inInt","theUnicode","_stringifyValue","toJSON","arrayString","objectString","convertToUnicode","reviver","walk","holder","SyntaxError","InkUtilString","_chars","_entities","_accentedChars","_accentedRemovedChars","_htmlUnsafeChars","<","&","'","ucFirst","firstWordOnly","replacer","stripTags","allowed","aAllowed","aNewAllowed","cleanedTag","strAllowed","reAllowed","aFoundTags","htmlEntitiesEncode","htmlEntitiesDecode","$0","utf8Encode","utfstring","shortString","words","resultstr","truncateString","utf8Decode","c2","c3","removeAccentedChars","newString","substrCount","haystack","htmlEscapeUnsafe","chars","normalizeWhitespace","toUnicode","unescape","es","hexNum","escapeText","txt","whiteList","txt2","C","escapedCharRegex","unescapeText","strcmp","str1","str2","packetize","maxLen","_keyStr","getUrl","getQueryString","aParams","queryStr","aQueryStr","pairVar","getAnchor","anchor","anchorStr","aAnchorStr","aURL","scheme","re1","re2","re3","regPort","tmpHost1","port","tmpHost2","tmpUserPass","user","urlObj","frag","hostname","currentScriptElement","aScripts","curScript","_debug","Validator","_countryCodes","_internacionalPT","_indicativosPT",21,22,231,232,233,234,235,236,238,239,241,242,243,244,245,249,251,252,253,254,255,256,258,259,261,262,263,265,266,268,269,271,272,273,274,275,276,277,278,279,281,282,283,284,285,286,289,291,292,295,296,91,93,96,92,707,760,800,808,30,"_internacionalCV","_indicativosCV",95,97,98,99,"_internacionalAO","_indicativosAO","_internacionalMZ","_indicativosMZ",82,84,"_internacionalTL","_indicativosTL","_characterGroups","asciiAlpha","latin1Alpha","unicodeAlpha","space","nicknamePunctuation","newline","asciiPunctuation","createRegExp","checkCharacterGroups","numb","inOptions","thousandSep","returnNumber","maxExcl","minExcl","_isLeapYear","parser","emailValido","full","reHTTP","reUrl","aInd","strInd","re351","reSpecialChars","reInt","reValid","isPortuguesePhone","re238","re244","re258","isTLPhone","re670","isPhone","codPostal","cp1","cp2","returnBothResults","cPostalSep","cPostal4","cPostal3","parserCPostal","cPostal","yearIndex","monthIndex","dayIndex","dateParser","keyword","hexa","rgba","hsl","hsla","_creditCardSpecs","default","luhn","american express","diners club","discover","jcb","maestro","mastercard","visa","_luhn","checksum","dbl","creditCardType","ccLength"],"mappings":"CAME,SAASA,EAAQC,GAEf,YAGA,MAAI,OAASD,IAAb,CASA,GAAIE,MACAC,KACAC,KACAC,KACAC,KACAC,KAEAC,EAAQC,SAASC,UAAUF,MAG3BG,EAAgB,SAASC,GAEzB,GAAiB,gBAANA,GAAkB,OAAO,CACpC,KAAK,GAAIC,KAAKD,GACV,GAAIA,EAAEE,eAAeD,GACjB,OAAO,CAGf,QAAO,EAOXb,GAAOe,KACHC,QAAS,QACTC,4BAA6B,WACzB,GAAIC,GAAGC,EAAGP,EAAGQ,EAAKC,EAAKC,EAAIC,IAC3B,KAAKL,EAAI,EAAGC,EAAIb,EAAWkB,OAAYL,EAAJD,IAASA,EAGxC,GAFAN,EAAIN,EAAWY,GAEf,CAEA,IAAKE,IAAOR,GAAEa,KACNb,EAAEa,KAAKX,eAAeM,KACtBC,EAAMlB,EAAQiB,GACVC,IACAT,EAAEc,KAAKd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AuhG,EAAiBA,EAAepvF,cAEsB,mBAA1CrR,MAAK4/F,iBAAiBa,GAC9B,OAAO,CAIX,IAAIliG,GAASgxF,EAAIhxF,OAAO,EAGxB,OAAoF,KAA/EyB,KAAK4/F,iBAAiBa,GAAwB,OAAEzhG,MAAM,KAAKc,QAAQvB,IAC7D,EAILyB,KAAK4/F,iBAAiBa,GAAwB,OAAElhG,KAAKgwF,GAKvDvvF,KAAK4/F,iBAAiBa,GAAsB,QAAM,GAC3C,EAGJzgG,KAAKsgG,MAAM/Q,IARP,GAYnB,OAAOkI","sourcesContent":["/**\n * Ink Core.\n * @module Ink_1\n * This module provides the necessary methods to create and load the modules using Ink.\n */\n\n;(function(window, document) {\n\n 'use strict';\n\n // skip redefinition of Ink core\n if ('Ink' in window) { return; }\n\n\n // internal data\n\n /*\n * NOTE:\n * invoke Ink.setPath('Ink', '/Ink/'); before requiring local modules\n */\n var paths = {};\n var modules = {};\n var modulesLoadOrder = [];\n var modulesRequested = {};\n var pendingRMs = [];\n var modulesWaitingForDeps = {};\n\n var apply = Function.prototype.apply;\n\n // auxiliary fns\n var isEmptyObject = function(o) {\n /*jshint unused:false */\n if (typeof o !== 'object') { return false; }\n for (var k in o) {\n if (o.hasOwnProperty(k)) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * @namespace Ink_1\n */\n\n window.Ink = {\n VERSION: '3.0.5',\n _checkPendingRequireModules: function() {\n var I, F, o, dep, mod, cb, pRMs = [];\n for (I = 0, F = pendingRMs.length; I < F; ++I) {\n o = pendingRMs[I];\n\n if (!o) { continue; }\n\n for (dep in o.left) {\n if (o.left.hasOwnProperty(dep)) {\n mod = modules[dep];\n if (mod) {\n o.args[o.left[dep] ] = mod;\n delete o.left[dep];\n --o.remaining;\n }\n }\n }\n\n if (o.remaining > 0) {\n pRMs.push(o);\n }\n else {\n cb = o.cb;\n if (!cb) { continue; }\n delete o.cb; // to make sure I won't call this more than once!\n cb.apply(false, o.args);\n }\n }\n\n pendingRMs = pRMs;\n\n if (pendingRMs.length > 0) {\n setTimeout( function() { Ink._checkPendingRequireModules(); }, 0 );\n }\n },\n\n /**\n * Get the full path of a module.\n * This method looks up the paths given in setPath (and ultimately the default Ink's path).\n *\n * @method getPath\n * @param {String} key Name of the module you want to get the path\n * @param {Boolean} [noLib] Flag to skip appending 'lib.js' to the returned path.\n */\n getPath: function(key, noLib) {\n var split = key.split(/[._]/g);\n var curKey;\n var i;\n var root;\n var path;\n\n // Look for Ink.Dom.Element.1, Ink.Dom.Element, Ink.Dom, Ink in this order.\n for (i = split.length; i >= 0; i -= 1) {\n curKey = split.slice(0, i + 1).join('.'); // See comment in setPath\n if (paths[curKey]) {\n root = curKey;\n break;\n }\n }\n\n if (root in paths) {\n path = paths[root];\n } else {\n return null;\n }\n\n if (!/\\/$/.test(path)) {\n path += '/';\n }\n if (i < split.length) {\n // Add the rest of the path. For example, if we found\n // paths['Ink.Dom'] to be 'http://example.com/Ink/Dom/',\n // we now add '/Element/' to get the full path.\n path += split.slice(i + 1).join('/') + '/';\n }\n if (!noLib) {\n path += 'lib.js';\n }\n return path;\n },\n \n /**\n * Sets the URL path for a namespace.\n * Use this to customize where requireModules and createModule will load dependencies from.\n * This can be useful to set your own CDN for dynamic module loading or simply to change your module folder structure\n * \n * @method setPath\n *\n * @param {String} key Module or namespace\n * @param {String} rootURI Base URL path and schema to be appended to the module or namespace\n *\n * @example\n * Ink.setPath('Ink', 'http://my-cdn/Ink/');\n * Ink.setPath('Lol', 'http://my-cdn/Lol/');\n *\n * // Loads from http://my-cdn/Ink/Dom/Whatever/lib.js\n * Ink.requireModules(['Ink.Dom.Whatever'], function () { ... });\n * // Loads from http://my-cdn/Lol/Whatever/lib.js\n * Ink.requireModules(['Lol.Whatever'], function () { ... });\n */\n setPath: function(key, rootURI) {\n // Replacing version separator with dot because the difference\n // between a submodule and a version doesn't matter here.\n // It would also overcomplicate the implementation of getPath\n paths[key.replace(/_/, '.')] = rootURI;\n },\n\n /**\n * Loads a script URL.\n * This creates a `script` tag in the `head` of the document.\n * Reports errors by listening to 'error' and 'readystatechange' events.\n *\n * @method loadScript\n * @param {String} uri Can be an external URL or a module name\n * @param {String} [contentType]='text/javascript' The `type` attribute of the new script tag.\n */\n loadScript: function(uri, contentType) {\n /*jshint evil:true */\n\n if (uri.indexOf('/') === -1) {\n var givenUri = uri; // For the error message\n uri = this.getPath(uri);\n if (uri === null) {\n throw new Error('Could not load script \"' + givenUri + '\". ' +\n 'Path not found in the registry. Did you misspell ' +\n 'the name, or forgot to call setPath()?');\n }\n }\n\n var scriptEl = document.createElement('script');\n scriptEl.setAttribute('type', contentType || 'text/javascript');\n scriptEl.setAttribute('src', uri);\n\n scriptEl.onerror = scriptEl.onreadystatechange = function (ev) {\n ev = ev || window.event;\n if (ev.type === 'readystatechange' && scriptEl.readyState !== 'loaded') {\n // if not readyState == 'loaded' it's not an error.\n return;\n }\n Ink.error(['Failed to load script from ', uri, '.'].join(''));\n };\n // CHECK ON ALL BROWSERS\n /*if (document.readyState !== 'complete' && !document.body) {\n document.write( scriptEl.outerHTML );\n }\n else {*/\n var aHead = document.getElementsByTagName('head');\n if(aHead.length > 0) {\n aHead[0].appendChild(scriptEl);\n }\n //}\n },\n\n _loadLater: function (dep) {\n setTimeout(function () {\n if (modules[dep] || modulesRequested[dep] ||\n modulesWaitingForDeps[dep]) {\n return;\n }\n modulesRequested[dep] = true;\n Ink.loadScript(dep);\n }, 0);\n },\n\n /**\n * Defines a module namespace.\n *\n * @method namespace\n * @param {String} ns Namespace to define.\n * @param {Boolean} [returnParentAndKey] Flag to change the return value to an array containing the namespace parent and the namespace key\n * @return {Object|Array} Returns the created namespace object\n */\n namespace: function(ns, returnParentAndKey) {\n if (!ns || !ns.length) { return null; }\n\n var levels = ns.split('.');\n var nsobj = window;\n var parent;\n\n for (var i = 0, f = levels.length; i < f; ++i) {\n nsobj[ levels[i] ] = nsobj[ levels[i] ] || {};\n parent = nsobj;\n nsobj = nsobj[ levels[i] ];\n }\n\n if (returnParentAndKey) {\n return [\n parent,\n levels[i-1]\n ];\n }\n\n return nsobj;\n },\n\n /**\n * Loads a module.\n * A synchronous method to get the module from the internal registry.\n * It assumes the module is defined and loaded already!\n *\n * @method getModule\n * @param {String} mod Module name\n * @param {Number} [version] Version number of the module\n * @return {Object|Function} Module object or function, depending how the module is defined\n */\n getModule: function(mod, version) {\n var key = version ? [mod, '_', version].join('') : mod;\n return modules[key];\n },\n\n /**\n * Creates a new module. \n * Use this to wrap your code and benefit from the module loading used throughout the Ink library\n *\n * @method createModule\n * @param {String} mod Module name, separated by dots. Like Ink.Dom.Selector, Ink.UI.Modal\n * @param {Number} version Version number\n * @param {Array} deps Array of module names which are dependencies of the module being created. The order in which they are passed here will define the order they will be passed to the callback function.\n * @param {Function} modFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared. The function itself should return the module.\n * @sample Ink_1_createModule.html \n *\n */\n createModule: function(mod, ver, deps, modFn) { // define\n if (typeof mod !== 'string') {\n throw new Error('module name must be a string!');\n }\n\n // validate version correctness\n if (!(typeof ver === 'number' || (typeof ver === 'string' && ver.length > 0))) {\n throw new Error('version number missing!');\n }\n\n var modAll = [mod, '_', ver].join('');\n\n modulesWaitingForDeps[modAll] = true;\n\n var cb = function() {\n //console.log(['createModule(', mod, ', ', ver, ', [', deps.join(', '), '], ', !!modFn, ')'].join(''));\n\n // make sure module in not loaded twice\n if (modules[modAll]) {\n //console.warn(['Ink.createModule ', modAll, ': module has been defined already.'].join(''));\n return;\n }\n\n\n // delete related pending tasks\n delete modulesRequested[modAll];\n delete modulesRequested[mod];\n\n\n // run module's supplied factory\n var args = Array.prototype.slice.call(arguments);\n var moduleContent = modFn.apply(window, args);\n modulesLoadOrder.push(modAll);\n // console.log('** loaded module ' + modAll + '**');\n\n\n // set version\n if (typeof moduleContent === 'object') { // Dom.Css Dom.Event\n moduleContent._version = ver;\n }\n else if (typeof moduleContent === 'function') {\n moduleContent.prototype._version = ver; // if constructor\n moduleContent._version = ver; // if regular function\n }\n\n\n // add to global namespace...\n var isInkModule = mod.indexOf('Ink.') === 0;\n var t;\n if (isInkModule) {\n t = Ink.namespace(mod, true); // for mod 'Ink.Dom.Css', t[0] gets 'Ink.Dom' object and t[1] 'Css'\n }\n\n\n // versioned\n modules[ modAll ] = moduleContent; // in modules\n delete modulesWaitingForDeps[ modAll ];\n\n if (isInkModule) {\n t[0][ t[1] + '_' + ver ] = moduleContent; // in namespace\n }\n\n\n // unversioned\n modules[ mod ] = moduleContent; // in modules\n\n if (isInkModule) {\n if (isEmptyObject( t[0][ t[1] ] )) {\n t[0][ t[1] ] = moduleContent; // in namespace\n }\n // else {\n // console.warn(['Ink.createModule ', modAll, ': module has been defined already with a different version!'].join(''));\n // }\n }\n\n\n if (this) { // there may be pending requires expecting this module, check...\n Ink._checkPendingRequireModules();\n }\n };\n\n this.requireModules(deps, cb);\n },\n\n /**\n * Requires modules asynchronously \n * Use this to get modules, even if they're not loaded yet\n *\n * @method requireModules\n * @param {Array} deps Array of module names. The order in which they are passed here will define the order they will be passed to the callback function. \n * @param {Function} cbFn The callback function to be executed when all the dependencies are resolved. The dependencies are passed as arguments, in the same order they were declared.\n * @sample Ink_1_requireModules.html \n */\n requireModules: function(deps, cbFn) { // require\n //console.log(['requireModules([', deps.join(', '), '], ', !!cbFn, ')'].join(''));\n var i, f, o, dep, mod;\n f = deps && deps.length;\n o = {\n args: new Array(f),\n left: {},\n remaining: f,\n cb: cbFn\n };\n\n if (!(typeof deps === 'object' && deps.length !== undefined)) {\n throw new Error('Dependency list should be an array!');\n }\n if (typeof cbFn !== 'function') {\n throw new Error('Callback should be a function!');\n }\n\n for (i = 0; i < f; ++i) {\n if (Ink._moduleRenames[deps[i]]) {\n Ink.warn(deps[i] + ' was renamed to ' + Ink._moduleRenames[deps[i]]);\n dep = Ink._moduleRenames[deps[i]];\n } else {\n dep = deps[i];\n }\n\n // Because trailing commas in oldIE bring us undefined values here\n if (!dep) {\n --o.remaining;\n continue;\n }\n\n mod = modules[dep];\n if (mod) {\n o.args[i] = mod;\n --o.remaining;\n continue;\n }\n else if (!modulesRequested[dep]) {\n Ink._loadLater(dep);\n }\n o.left[dep] = i;\n }\n\n if (o.remaining > 0) {\n pendingRMs.push(o);\n }\n else {\n cbFn.apply(true, o.args);\n }\n },\n\n _moduleRenames: {\n 'Ink.UI.Aux_1': 'Ink.UI.Common_1'\n },\n\n /**\n * Lists loaded module names.\n * The list is ordered by loaded time (oldest module comes first)\n *\n * @method getModulesLoadOrder\n * @return {Array} returns the order in which modules were resolved and correctly loaded\n */\n getModulesLoadOrder: function() {\n return modulesLoadOrder.slice();\n },\n\n /**\n * Builds the markup needed to load the modules.\n * This method builds the script tags needed to load the currently used modules\n * \n * @method getModuleScripts\n * @uses getModulesLoadOrder\n * @return {String} The script markup\n */\n getModuleScripts: function() {\n var mlo = this.getModulesLoadOrder();\n mlo.unshift('Ink_1');\n mlo = mlo.map(function(m) {\n return [''].join('');\n });\n\n return mlo.join('\\n');\n },\n \n /**\n * Creates an Ink.Ext module\n *\n * Does exactly the same as createModule but creates the module in the Ink.Ext namespace\n *\n * @method createExt\n * @uses createModule\n * @param {String} moduleName Extension name\n * @param {String} version Extension version\n * @param {Array} dependencies Extension dependencies\n * @param {Function} modFn Function returning the extension\n * @sample Ink_1_createExt.html \n */\n createExt: function (moduleName, version, dependencies, modFn) {\n return Ink.createModule('Ink.Ext.' + moduleName, version, dependencies, modFn);\n },\n\n /**\n * Function.prototype.bind alternative.\n * Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n *\n * @method bind\n * @param {Function} fn The function \n * @param {Object} context The value to be passed as the this parameter to the target function when the bound function is called. If used as false, it preserves the original context and just binds the arguments.\n * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments.\n * @return {Function}\n * @sample Ink_1_bind.html \n */\n bind: function(fn, context) {\n var args = Array.prototype.slice.call(arguments, 2);\n return function() {\n var innerArgs = Array.prototype.slice.call(arguments);\n var finalArgs = args.concat(innerArgs);\n return fn.apply(context === false ? this : context, finalArgs);\n };\n },\n\n /**\n * Function.prototype.bind alternative for class methods\n * Creates a new function that, when called, has this k\n * @method bindMethod\n * @uses bind\n * @param {Object} object The object that contains the method to bind\n * @param {String} methodName The name of the method that will be bound\n * @param {Any} [args*] Additional arguments will be sent to the new method as prefix arguments.\n * @return {Function}\n * @sample Ink_1_bindMethod.html \n */\n bindMethod: function (object, methodName) {\n return Ink.bind.apply(Ink,\n [object[methodName], object].concat([].slice.call(arguments, 2)));\n },\n\n /**\n * Function.prototype.bind alternative for event handlers.\n * Same as bind but keeps first argument of the call the original event.\n * Set \"context\" to `false` to preserve the original context of the function and just bind the arguments.\n *\n * @method bindEvent\n * @param {Function} fn The function \n * @param {Object} context The value to be passed as the this parameter to the target \n * @param {Any} [args*] Additional arguments will be sent to the original function as prefix arguments\n * @return {Function}\n * @sample Ink_1_bindEvent.html \n */\n bindEvent: function(fn, context) {\n var args = Array.prototype.slice.call(arguments, 2);\n return function(event) {\n var finalArgs = args.slice();\n finalArgs.unshift(event || window.event);\n return fn.apply(context === false ? this : context, finalArgs);\n };\n },\n\n /**\n * Alias to document.getElementById\n *\n * @method i\n * @param {String} id Element ID\n * @return {DOMElement}\n * @sample Ink_1_i.html \n */\n i: function(id) {\n if(!id) {\n throw new Error('Ink.i => id or element must be passed');\n }\n if(typeof(id) === 'string') {\n return document.getElementById(id);\n }\n return id;\n },\n\n /**\n * Alias for Ink.Dom.Selector\n *\n * @method ss\n * @uses Ink.Dom.Selector.select\n * @param {String} rule\n * @param {DOMElement} [from]\n * @return {Array} array of DOMElements\n * @sample Ink_1_ss.html \n */\n ss: function(rule, from)\n {\n if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') {\n throw new Error('This method requires Ink.Dom.Selector');\n }\n return Ink.Dom.Selector.select(rule, (from || document));\n },\n\n /**\n * Alias for Ink.Dom.Selector first result\n *\n * @method s\n * @uses Ink.Dom.Selector.select\n * @param {String} rule Selector string\n * @param {DOMElement} [from] Context element. If set to a DOM element, the rule will only look for descendants of this DOM Element.\n * @return {DOMElement}\n * @sample Ink_1_s.html \n */\n s: function(rule, from)\n {\n if(typeof(Ink.Dom) === 'undefined' || typeof(Ink.Dom.Selector) === 'undefined') {\n throw new Error('This method requires Ink.Dom.Selector');\n }\n return Ink.Dom.Selector.select(rule, (from || document))[0] || null;\n },\n\n /**\n * Extends an object with another\n * Copy all of the properties in one or more source objects over to the destination object, and return the destination object. It's in-order, so the last source will override properties of the same name in previous arguments.\n *\n * @method extendObj\n * @param {Object} destination The object that will receive the new/updated properties\n * @param {Object} source The object whose properties will be copied over to the destination object\n * @param {Object} [args*] Additional source objects. The last source will override properties of the same name in the previous defined sources\n * @return destination object, enriched with defaults from the sources\n * @sample Ink_1_extendObj.html \n */\n extendObj: function(destination/*, source... */) {\n var sources = [].slice.call(arguments, 1);\n\n for (var i = 0, len = sources.length; i < len; i++) {\n if (!sources[i]) { continue; }\n for (var property in sources[i]) {\n if(Object.prototype.hasOwnProperty.call(sources[i], property)) {\n destination[property] = sources[i][property];\n }\n }\n }\n\n return destination;\n },\n\n /**\n * Calls native console.log if available.\n *\n * @method log\n * @param {Any} [args*] Arguments to be evaluated\n * @sample Ink_1_log.html \n **/\n log: function () {\n // IE does not have console.log.apply in IE10 emulated mode\n var console = window.console;\n if (console && console.log) {\n apply.call(console.log, console, arguments);\n }\n },\n\n /**\n * Calls native console.warn if available.\n *\n * @method warn\n * @param {Any} [args*] Arguments to be evaluated\n * @sample Ink_1_warn.html \n **/\n warn: function () {\n // IE does not have console.log.apply in IE10 emulated mode\n var console = window.console;\n if (console && console.warn) {\n apply.call(console.warn, console, arguments);\n }\n },\n\n /**\n * Calls native console.error if available.\n *\n * @method error\n * @param {Any} [args*] Arguments to be evaluated\n * @sample Ink_1_error.html \n **/\n error: function () {\n // IE does not have console.log.apply in IE10 emulated mode\n var console = window.console;\n if (console && console.error) {\n apply.call(console.error, console, arguments);\n }\n }\n };\n\n\n // TODO for debug - to detect pending stuff\n /*\n var failCount = {}; // fail count per module name\n var maxFails = 3; // times\n var checkDelta = 0.5; //seconds\n\n var tmpTmr = setInterval(function() {\n var mk = Object.keys(modulesRequested);\n var l = mk.length;\n\n if (l > 0) {\n // console.log('** waiting for modules: ' + mk.join(', ') + ' **');\n\n for (var i = 0, f = mk.length, k, v; i < f; ++i) {\n k = mk[i];\n v = failCount[k];\n failCount[k] = (v === undefined) ? 1 : ++v;\n\n if (v >= maxFails) {\n console.error('** Loading of module ' + k + ' failed! **');\n delete modulesRequested[k];\n }\n }\n }\n else {\n // console.log('** Module loads complete. **');\n clearInterval(tmpTmr);\n }\n }, checkDelta*1000);\n */\n}(window, document));\n","/**\n * Cross Browser Ajax requests\n * @module Ink.Net.Ajax_1\n * @version 1\n */\n\nInk.createModule('Ink.Net.Ajax', '1', [], function() {\n\n 'use strict';\n\n /**\n * Creates a new XMLHttpRequest object\n *\n * @class Ink.Net.Ajax\n * @constructor\n *\n * @param {String} url Request URL\n * @param {Object} options Request options\n * @param {Boolean} [options.asynchronous]=true If false, the request synchronous.\n * @param {Boolean} [options.cors] Flag to activate CORS. Set this to true if you're doing a cross-origin request\n * @param {String} [options.method]='POST' HTTP request method. POST by default.\n * @param {Object|String} [options.parameters] Request parameters to be sent with the request\n * @param {Number} [options.timeout] Request timeout in seconds\n * @param {Number} [options.delay] Artificial delay. If the request is completed faster than this delay, wait the remaining time before executing the callbacks\n * @param {String} [options.postBody] POST request body. If not specified, it's filled with the contents from parameters\n * @param {String} [options.contentType] Content-type header to be sent. Defaults to 'application/x-www-form-urlencoded'\n * @param {Object} [options.requestHeaders] Key-value pairs for additional request headers\n * @param {Function} [options.onComplete] Callback executed after the request is completed, regardless of what happened during the request.\n * @param {Function} [options.onSuccess] Callback executed if the request is successful (requests with 2xx status codes)\n * @param {Function} [options.onFailure] Callback executed if the request fails (requests with status codes different from 2xx)\n * @param {Function} [options.onException] Callback executed if an exception occurs. Receives the exception as a parameter.\n * @param {Function} [options.onCreate] Callback executed after object initialization but before the request is made\n * @param {Function} [options.onInit] Callback executed before any initialization\n * @param {Function} [options.onTimeout] Callback executed if the request times out\n * @param {Boolean|String} [options.evalJS]=true If the request Content-type header is application/json, evaluates the response and populates responseJSON. Use 'force' if you want to force the response evaluation, no matter what Content-type it's using.\n * @param {Boolean} [options.sanitizeJSON] Flag to sanitize the content of responseText before evaluation\n * @param {String} [options.xhrProxy] URI for proxy service hosted on the same server as the web app, that can fetch documents from other domains. The service must pipe all input and output untouched (some input sanitization is allowed, like clearing cookies). e.g., requesting http://example.org/doc can become /proxy/http%3A%2F%2Fexample.org%2Fdoc The proxy service will be used for cross-domain requests, if set, else a network error is returned as exception.\n *\n * @sample Ink_Net_Ajax_1.html \n */\n var Ajax = function(url, options){\n\n // start of AjaxMock patch - uncomment to enable it\n /*var AM = SAPO.Communication.AjaxMock;\n if (AM && !options.inMock) {\n if (AM.autoRecordThisUrl && AM.autoRecordThisUrl(url)) {\n return new AM.Record(url, options);\n }\n if (AM.mockThisUrl && AM.mockThisUrl(url)) {\n return new AM.Play(url, options, true);\n }\n }*/\n // end of AjaxMock patch\n\n this.init(url, options);\n };\n\n /**\n * Options for all requests. These can then be overriden for individual ones.\n */\n Ajax.globalOptions = {\n parameters: {},\n requestHeaders: {}\n };\n\n\n // IE10 does not need XDomainRequest\n var xMLHttpRequestWithCredentials = 'XMLHttpRequest' in window && 'withCredentials' in (new XMLHttpRequest());\n\n\n\n Ajax.prototype = {\n\n init: function(url, userOptions) {\n if (!url) {\n throw new Error(\"WRONG_ARGUMENTS_ERR\");\n }\n var options = Ink.extendObj({\n asynchronous: true,\n method: 'POST',\n parameters: null,\n timeout: 0,\n delay: 0,\n postBody: '',\n contentType: 'application/x-www-form-urlencoded',\n requestHeaders: null,\n onComplete: null,\n onSuccess: null,\n onFailure: null,\n onException: null,\n onHeaders: null,\n onCreate: null,\n onInit: null,\n onTimeout: null,\n sanitizeJSON: false,\n evalJS: true,\n xhrProxy: '',\n cors: false,\n debug: false,\n useCredentials: false,\n signRequest: false\n }, Ajax.globalOptions);\n\n if (userOptions && typeof userOptions === 'object') {\n options = Ink.extendObj(options, userOptions);\n\n\n if (typeof userOptions.parameters === 'object') {\n options.parameters = Ink.extendObj(Ink.extendObj({}, Ajax.globalOptions.parameters), userOptions.parameters);\n } else if (userOptions.parameters !== null) {\n var globalParameters = this.paramsObjToStr(Ajax.globalOptions.parameters);\n if (globalParameters) {\n options.parameters = userOptions.parameters + '&' + globalParameters;\n }\n }\n\n options.requestHeaders = Ink.extendObj({}, Ajax.globalOptions.requestHeaders);\n options.requestHeaders = Ink.extendObj(options.requestHeaders, userOptions.requestHeaders);\n }\n\n this.options = options;\n\n this.safeCall('onInit');\n\n this.url = url;\n\n var urlLocation = this._locationFromURL(url);\n this.isHTTP = this._locationIsHTTP(urlLocation);\n this.isCrossDomain = this._locationIsCrossDomain(urlLocation, location);\n\n this.requestHasBody = options.method.search(/^get|head$/i) < 0;\n\n if(this.options.cors) {\n this.isCrossDomain = false;\n }\n\n this.transport = this.getTransport();\n\n this.request();\n },\n\n /**\n * Returns a location object from an URL\n *\n * @method _locationFromUrl\n * @param url\n * @private\n **/\n _locationFromURL: function (url) {\n var urlLocation = document.createElementNS ?\n document.createElementNS('http://www.w3.org/1999/xhtml', 'a') :\n document.createElement('a');\n urlLocation.href = url;\n return urlLocation;\n },\n\n /**\n * Checks whether a location is HTTP or HTTPS\n *\n * @method locationIsHttp\n * @param urlLocation\n * @private\n */\n _locationIsHTTP: function (urlLocation) {\n return urlLocation.protocol.match(/^https?:/i) ? true : false;\n },\n\n /**\n * Checks whether a location is cross-domain from another\n *\n * @method _locationIsCrossDomain\n * @param urlLocation {Location}\n * @param otherLocation {Location}\n */\n _locationIsCrossDomain: function (urlLocation, location) {\n location = location || window.location;\n if (!Ajax.prototype._locationIsHTTP(urlLocation) || location.protocol === 'widget:' || typeof window.widget === 'object') {\n return false;\n } else {\n return location.protocol !== urlLocation.protocol ||\n location.host.split(':')[0] !== urlLocation.host.split(':')[0];\n }\n },\n\n /**\n * Creates the appropriate XMLHttpRequest object\n *\n * @method getTransport\n * @return {Object} XMLHttpRequest object\n */\n getTransport: function()\n {\n /*global XDomainRequest:false, ActiveXObject:false */\n if (!xMLHttpRequestWithCredentials && this.options.cors && 'XDomainRequest' in window) {\n this.usingXDomainReq = true;\n return new XDomainRequest();\n }\n else if (typeof XMLHttpRequest !== 'undefined') {\n return new XMLHttpRequest();\n }\n else if (typeof ActiveXObject !== 'undefined') {\n try {\n return new ActiveXObject('Msxml2.XMLHTTP');\n } catch (e) {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n } else {\n return null;\n }\n },\n\n /**\n * Set the necessary headers for an ajax request\n *\n * @method setHeaders\n * @param {String} url The url for the request\n */\n setHeaders: function()\n {\n if (this.transport) {\n try {\n var headers = {\n \"Accept\": \"text/javascript,text/xml,application/xml,application/xhtml+xml,text/html,application/json;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\",\n \"Accept-Language\": navigator.language,\n \"X-Requested-With\": \"XMLHttpRequest\",\n \"X-Ink-Version\": \"2\"\n };\n if (this.options.cors) {\n if (!this.options.signRequest) {\n delete headers['X-Requested-With'];\n }\n delete headers['X-Ink-Version'];\n }\n\n if (this.options.requestHeaders && typeof this.options.requestHeaders === 'object') {\n for(var headerReqName in this.options.requestHeaders) {\n if (this.options.requestHeaders.hasOwnProperty(headerReqName)) {\n headers[headerReqName] = this.options.requestHeaders[headerReqName];\n }\n }\n }\n\n if (this.transport.overrideMimeType && (navigator.userAgent.match(/Gecko\\/(\\d{4})/) || [0,2005])[1] < 2005) {\n headers.Connection = 'close';\n }\n\n for (var headerName in headers) {\n if(headers.hasOwnProperty(headerName)) {\n this.transport.setRequestHeader(headerName, headers[headerName]);\n }\n }\n } catch(e) {}\n }\n },\n\n /**\n * Converts an object with parameters to a querystring\n *\n * @method paramsObjToStr\n * @param {Object|String} optParams parameters object\n * @return {String} querystring\n */\n paramsObjToStr: function(optParams) {\n var k, m, p, a, params = [];\n if (typeof optParams === 'object') {\n for (p in optParams){\n if (optParams.hasOwnProperty(p)) {\n a = optParams[p];\n if (Object.prototype.toString.call(a) === '[object Array]' && !isNaN(a.length)) {\n for (k = 0, m = a.length; k < m; k++) {\n params = params.concat([\n encodeURIComponent(p), '[]', '=',\n encodeURIComponent(a[k]), '&'\n ]);\n }\n }\n else {\n params = params.concat([\n encodeURIComponent(p), '=',\n encodeURIComponent(a), '&'\n ]);\n }\n }\n }\n if (params.length > 0) {\n params.pop();\n }\n }\n else\n {\n return optParams;\n }\n return params.join('');\n },\n\n /**\n * Set the url parameters for a GET request\n *\n * @method setParams\n */\n setParams: function()\n {\n var params = null, optParams = this.options.parameters;\n\n if(typeof optParams === \"object\"){\n params = this.paramsObjToStr(optParams);\n } else {\n params = '' + optParams;\n }\n\n if(params){\n if(this.url.indexOf('?') > -1) {\n this.url = this.url.split('#')[0] + '&' + params;\n } else {\n this.url = this.url.split('#')[0] + '?' + params;\n }\n }\n },\n\n /**\n * Gets an HTTP header from the response\n *\n * @method getHeader\n * @param {String} name Header name\n * @return {String} header Content\n */\n getHeader: function(name)\n {\n if (this.usingXDomainReq && name === 'Content-Type') {\n return this.transport.contentType;\n }\n try{\n return this.transport.getResponseHeader(name);\n } catch(e) {\n return null;\n }\n },\n\n /**\n * Gets all the HTTP headers from the response\n *\n * @method getAllHeaders\n * @return {String} The headers, each separated by a newline\n */\n getAllHeaders: function()\n {\n try {\n return this.transport.getAllResponseHeaders();\n } catch(e) {\n return null;\n }\n },\n\n /**\n * Sets the response object\n *\n * @method getResponse\n * @return {Object} the response object\n */\n getResponse: function(){\n // setup our own stuff\n var t = this.transport,\n r = {\n headerJSON: null,\n responseJSON: null,\n getHeader: this.getHeader,\n getAllHeaders: this.getAllHeaders,\n request: this,\n transport: t,\n timeTaken: new Date() - this.startTime,\n requestedUrl: this.url\n };\n\n // setup things expected from the native object\n r.readyState = t.readyState;\n try { r.responseText = t.responseText; } catch(e) {}\n try { r.responseXML = t.responseXML; } catch(e) {}\n try { r.status = t.status; } catch(e) { r.status = 0; }\n try { r.statusText = t.statusText; } catch(e) { r.statusText = ''; }\n\n return r;\n },\n\n /**\n * Aborts the request if still running. No callbacks are called\n *\n * @method abort\n */\n abort: function(){\n if (this.transport) {\n clearTimeout(this.delayTimeout);\n clearTimeout(this.stoTimeout);\n try { this.transport.abort(); } catch(ex) {}\n this.finish();\n }\n },\n\n /**\n * Executes the state changing phase of an ajax request\n *\n * @method runStateChange\n */\n runStateChange: function()\n {\n var rs = this.transport.readyState;\n if (rs === 3) {\n if (this.isHTTP) {\n this.safeCall('onHeaders');\n }\n } else if (rs === 4 || this.usingXDomainReq) {\n\n if (this.options.asynchronous && this.options.delay && (this.startTime + this.options.delay > new Date().getTime())) {\n this.delayTimeout = setTimeout(Ink.bind(this.runStateChange, this), this.options.delay + this.startTime - new Date().getTime());\n return;\n }\n\n var responseJSON,\n responseContent = this.transport.responseText,\n response = this.getResponse(),\n curStatus = this.transport.status;\n\n if (this.isHTTP && !this.options.asynchronous) {\n this.safeCall('onHeaders');\n }\n\n clearTimeout(this.stoTimeout);\n\n if (curStatus === 0) {\n // Status 0 indicates network error for http requests.\n // For http less requests, 0 is always returned.\n if (this.isHTTP) {\n this.safeCall('onException', this.makeError(18, 'NETWORK_ERR'));\n } else {\n curStatus = responseContent ? 200 : 404;\n }\n }\n else if (curStatus === 304) {\n curStatus = 200;\n }\n var isSuccess = this.usingXDomainReq || 200 <= curStatus && curStatus < 300;\n\n var headerContentType = this.getHeader('Content-Type') || '';\n if (this.options.evalJS &&\n (headerContentType.indexOf(\"application/json\") >= 0 || this.options.evalJS === 'force')){\n try {\n responseJSON = this.evalJSON(responseContent, this.sanitizeJSON);\n if(responseJSON){\n responseContent = response.responseJSON = responseJSON;\n }\n } catch(e){\n if (isSuccess) {\n // If the request failed, then this is perhaps an error page\n // so don't notify error.\n this.safeCall('onException', e);\n }\n }\n }\n\n if (this.usingXDomainReq && headerContentType.indexOf('xml') !== -1 && 'DOMParser' in window) {\n // http://msdn.microsoft.com/en-us/library/ie/ff975278(v=vs.85).aspx\n var mimeType;\n switch (headerContentType) {\n case 'application/xml':\n case 'application/xhtml+xml':\n case 'image/svg+xml':\n mimeType = headerContentType;\n break;\n default:\n mimeType = 'text/xml';\n }\n var xmlDoc = (new DOMParser()).parseFromString( this.transport.responseText, mimeType);\n this.transport.responseXML = xmlDoc;\n response.responseXML = xmlDoc;\n }\n\n if (this.transport.responseXML !== null && response.responseJSON === null && this.transport.responseXML.xml !== \"\"){\n responseContent = this.transport.responseXML;\n }\n\n if (curStatus || this.usingXDomainReq) {\n if (isSuccess) {\n this.safeCall('onSuccess', response, responseContent);\n } else {\n this.safeCall('onFailure', response, responseContent);\n }\n this.safeCall('on'+curStatus, response, responseContent);\n }\n this.finish(response, responseContent);\n }\n },\n\n /**\n * Last step after XHR is complete. Call onComplete and cleanup object\n *\n * @method finish\n * @param {Any} response\n * @param {Any} responseContent\n */\n finish: function(response, responseContent){\n if (response) {\n this.safeCall('onComplete', response, responseContent);\n }\n clearTimeout(this.stoTimeout);\n\n if (this.transport) {\n // IE6 sometimes barfs on this one\n try{ this.transport.onreadystatechange = null; } catch(e){}\n\n if (typeof this.transport.destroy === 'function') {\n // Stuff for Samsung.\n this.transport.destroy();\n }\n\n // Let XHR be collected.\n this.transport = null;\n }\n },\n\n /**\n * Safely calls a callback function.\n * Verifies that the callback is well defined and traps errors\n *\n * @method safeCall\n * @param {Function} listener\n */\n safeCall: function(listener, first/*, second*/) {\n function rethrow(exception){\n setTimeout(function() {\n // Rethrow exception so it'll land in\n // the error console, firebug, whatever.\n if (exception.message) {\n exception.message += '\\n'+(exception.stacktrace || exception.stack || '');\n }\n throw exception;\n }, 1);\n }\n if (typeof this.options[listener] === 'function') {\n //SAPO.safeCall(this, this.options[listener], first, second);\n //return object[listener].apply(object, [].slice.call(arguments, 2));\n try {\n this.options[listener].apply(this, [].slice.call(arguments, 1));\n } catch(ex) {\n rethrow(ex);\n }\n } else if (first && window.Error && (first instanceof Error)) {\n rethrow(first);\n }\n },\n\n /**\n * Sets a new request header for the next http request\n *\n * @method setRequestHeader\n * @param {String} name\n * @param {String} value\n */\n setRequestHeader: function(name, value){\n if (!this.options.requestHeaders) {\n this.options.requestHeaders = {};\n }\n this.options.requestHeaders[name] = value;\n },\n\n /**\n * Executes the request\n *\n * @method request\n */\n request: function()\n {\n if(this.transport) {\n var params = null;\n if(this.requestHasBody) {\n if(this.options.postBody !== null && this.options.postBody !== '') {\n params = this.options.postBody;\n this.setParams();\n } else if (this.options.parameters !== null && this.options.parameters !== ''){\n params = this.options.parameters;\n }\n\n if (typeof params === \"object\" && !params.nodeType) {\n params = this.paramsObjToStr(params);\n } else if (typeof params !== \"object\" && params !== null){\n params = '' + params;\n }\n\n if(this.options.contentType) {\n this.setRequestHeader('Content-Type', this.options.contentType);\n }\n } else {\n this.setParams();\n }\n\n var url = this.url;\n var method = this.options.method;\n var crossDomain = this.isCrossDomain;\n\n if (crossDomain && this.options.xhrProxy) {\n this.setRequestHeader('X-Url', url);\n url = this.options.xhrProxy + encodeURIComponent(url);\n crossDomain = false;\n }\n\n try {\n this.transport.open(method, url, this.options.asynchronous);\n } catch(e) {\n this.safeCall('onException', e);\n return this.finish(this.getResponse(), null);\n }\n\n this.setHeaders();\n\n this.safeCall('onCreate');\n\n if(this.options.timeout && !isNaN(this.options.timeout)) {\n this.stoTimeout = setTimeout(Ink.bind(function() {\n if(this.options.onTimeout) {\n this.safeCall('onTimeout');\n this.abort();\n }\n }, this), (this.options.timeout * 1000));\n }\n\n if(this.options.useCredentials && !this.usingXDomainReq) {\n this.transport.withCredentials = true;\n }\n\n if(this.options.asynchronous && !this.usingXDomainReq) {\n this.transport.onreadystatechange = Ink.bind(this.runStateChange, this);\n }\n else if (this.usingXDomainReq) {\n this.transport.onload = Ink.bind(this.runStateChange, this);\n }\n\n try {\n if (crossDomain) {\n // Need explicit handling because Mozila aborts\n // the script and Chrome fails silently.per the spec\n throw this.makeError(18, 'NETWORK_ERR');\n } else {\n this.startTime = new Date().getTime();\n this.transport.send(params);\n }\n } catch(e) {\n this.safeCall('onException', e);\n return this.finish(this.getResponse(), null);\n }\n\n if(!this.options.asynchronous) {\n this.runStateChange();\n }\n }\n },\n\n /**\n * Returns a new exception object that can be thrown\n *\n * @method makeError\n * @param code Error Code\n * @param message Message\n * @returns {Object}\n */\n makeError: function(code, message){\n if (typeof Error !== 'function') {\n return {code: code, message: message};\n }\n var e = new Error(message);\n e.code = code;\n return e;\n },\n\n /**\n * Checks if a given string is valid JSON\n *\n * @method isJSON\n * @param {String} str String to be evaluated\n * @return {Boolean} True if the string is valid JSON\n */\n isJSON: function(str)\n {\n if (typeof str !== \"string\" || !str){ return false; }\n str = str.replace(/\\\\./g, '@').replace(/\"[^\"\\\\\\n\\r]*\"/g, '');\n return (/^[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]*$/).test(str);\n },\n\n /**\n * Evaluates a given string as JSON\n *\n * @method evalJSON\n * @param {String} str String to be evaluated\n * @param {Boolean} sanitize Flag to sanitize the content\n * @return {Object} JSON content as an object\n */\n evalJSON: function(strJSON, sanitize)\n {\n if (strJSON && (!sanitize || this.isJSON(strJSON))) {\n try {\n if (typeof JSON !== \"undefined\" && typeof JSON.parse !== 'undefined'){\n return JSON.parse(strJSON);\n }\n /*jshint evil:true */\n return eval('(' + strJSON + ')');\n } catch(e) {\n throw new Error('ERROR: Bad JSON string...');\n }\n }\n return null;\n }\n };\n\n /**\n * Loads content from a given url through an XMLHttpRequest.\n *\n * Shortcut function for simple AJAX use cases. Works with JSON, XML and plain text.\n *\n * @method load\n * @param {String} url Request URL\n * @param {Function} callback Callback to be executed if the request is successful\n * @return {Object} XMLHttpRequest object\n *\n * @sample Ink_Net_Ajax_load.html \n */\n Ajax.load = function(url, callback){\n return new Ajax(url, {\n method: 'GET',\n onSuccess: function(response){\n callback(response.responseJSON || response.responseText, response);\n }\n });\n };\n\n /**\n * Loads content from a given url through an XMLHttpRequest.\n * Shortcut function for simple AJAX use cases.\n *\n * @method ping\n * @param {String} url Request url\n * @param {Function} callback Callback to be executed if the request is successful\n * @return {Object} XMLHttpRequest object\n */\n Ajax.ping = function(url, callback){\n return new Ajax(url, {\n method: 'HEAD',\n onSuccess: function(response){\n if (typeof callback === 'function'){\n callback(response);\n }\n }\n });\n };\n\n\n return Ajax;\n});\n","/**\n * Cross Browser JsonP requests\n * @module Ink.Net.JsonP_1\n * @version 1\n */\n\nInk.createModule('Ink.Net.JsonP', '1', [], function() {\n\n 'use strict';\n\n /**\n * Executes a JSONP request\n *\n * @class Ink.Net.JsonP\n * @constructor\n *\n * @param {String} uri Request URL\n * @param {Object} options Request options\n * @param {Function} options.onSuccess Success callback\n * @param {Function} [options.onFailure] Failure callback\n * @param {Object} [options.failureObj] Object to be passed as argument to failure callback\n * @param {Number} [options.timeout] Timeout for request fail, in seconds. defaults to 10\n * @param {Object} [options.params] Object with the parameters and respective values to unfold\n * @param {String} [options.callbackParam] Parameter to use as callback. defaults to 'jsoncallback'\n * @param {String} [options.internalCallback] Name of the callback function stored in the Ink.Net.JsonP object.\n * @param {String} [options.randVar] (Advanced, not recommended unless you know what you're doing) A string to append to the callback name. By default, generate a random number. Use an empty string if you already passed the correct name in the internalCallback option.\n *\n * @sample Ink_Net_JsonP_1.html \n */\n var JsonP = function(uri, options) {\n this.init(uri, options);\n };\n\n JsonP.prototype = {\n\n init: function(uri, options) {\n this.options = Ink.extendObj( {\n onSuccess: undefined,\n onFailure: undefined,\n failureObj: {},\n timeout: 10,\n params: {},\n callbackParam: 'jsoncallback',\n internalCallback: '_cb',\n randVar: false\n }, options || {});\n\n if(this.options.randVar !== false) {\n this.randVar = this.options.randVar;\n } else {\n this.randVar = parseInt(Math.random() * 100000, 10);\n }\n\n this.options.internalCallback += this.randVar;\n\n this.uri = uri;\n\n // prevent SAPO legacy onComplete - make it onSuccess\n if(typeof(this.options.onComplete) === 'function') {\n this.options.onSuccess = this.options.onComplete;\n }\n\n if (typeof this.uri !== 'string') {\n throw 'Please define an URI';\n }\n\n if (typeof this.options.onSuccess !== 'function') {\n throw 'please define a callback function on option onSuccess!';\n }\n\n Ink.Net.JsonP[this.options.internalCallback] = Ink.bind(function() {\n window.clearTimeout(this.timeout);\n delete window.Ink.Net.JsonP[this.options.internalCallback];\n this._removeScriptTag();\n this.options.onSuccess(arguments[0]);\n }, this);\n\n this._addScriptTag();\n },\n\n _addParamsToGet: function(uri, params) {\n var hasQuestionMark = uri.indexOf('?') !== -1;\n var sep, pKey, pValue, parts = [uri];\n\n for (pKey in params) {\n if (params.hasOwnProperty(pKey)) {\n if (!hasQuestionMark) { sep = '?'; hasQuestionMark = true; }\n else { sep = '&'; }\n pValue = params[pKey];\n if (typeof pValue !== 'number' && !pValue) { pValue = ''; }\n parts = parts.concat([sep, pKey, '=', encodeURIComponent(pValue)]);\n }\n }\n\n return parts.join('');\n },\n\n _getScriptContainer: function() {\n var headEls = document.getElementsByTagName('head');\n if (headEls.length === 0) {\n var scriptEls = document.getElementsByTagName('script');\n return scriptEls[0];\n }\n return headEls[0];\n },\n\n _addScriptTag: function() {\n // enrich options will callback and random seed\n this.options.params[this.options.callbackParam] = 'Ink.Net.JsonP.' + this.options.internalCallback;\n this.options.params.rnd_seed = this.randVar;\n this.uri = this._addParamsToGet(this.uri, this.options.params);\n // create script tag\n var scriptEl = document.createElement('script');\n scriptEl.type = 'text/javascript';\n scriptEl.src = this.uri;\n var scriptCtn = this._getScriptContainer();\n scriptCtn.appendChild(scriptEl);\n this.timeout = setTimeout(Ink.bind(this._requestFailed, this), (this.options.timeout * 1000));\n },\n\n _requestFailed : function () {\n delete Ink.Net.JsonP[this.options.internalCallback];\n this._removeScriptTag();\n if(typeof this.options.onFailure === 'function'){\n this.options.onFailure(this.options.failureObj);\n }\n },\n\n _removeScriptTag: function() {\n var scriptEl;\n var scriptEls = document.getElementsByTagName('script');\n var scriptUri;\n for (var i = 0, f = scriptEls.length; i < f; ++i) {\n scriptEl = scriptEls[i];\n scriptUri = scriptEl.getAttribute('src') || scriptEl.src;\n if (scriptUri !== null && scriptUri === this.uri) {\n scriptEl.parentNode.removeChild(scriptEl);\n return;\n }\n }\n }\n\n };\n\n return JsonP;\n\n});\n","/**\n * Browser Detection and User Agent sniffing\n * @module Ink.Dom.Browser_1\n * @version 1\n */\nInk.createModule('Ink.Dom.Browser', '1', [], function() {\n 'use strict'; \n\n /**\n * @namespace Ink.Dom.Browser\n * @version 1\n * @static\n * @example\n * \n */\n var Browser = {\n /**\n * True if the browser is Internet Explorer\n *\n * @property IE\n * @type {Boolean}\n * @public\n * @static\n */\n IE: false,\n\n /**\n * True if the browser is Gecko based\n *\n * @property GECKO\n * @type {Boolean}\n * @public\n * @static\n */\n GECKO: false,\n\n /**\n * True if the browser is Opera\n *\n * @property OPERA\n * @type {Boolean}\n * @public\n * @static\n */\n OPERA: false,\n\n /**\n * True if the browser is Safari\n *\n * @property SAFARI\n * @type {Boolean}\n * @public\n * @static\n */\n SAFARI: false,\n\n /**\n * True if the browser is Konqueror\n *\n * @property KONQUEROR\n * @type {Boolean}\n * @public\n * @static\n */\n KONQUEROR: false,\n\n /**\n * True if browser is Chrome\n *\n * @property CHROME\n * @type {Boolean}\n * @public\n * @static\n */\n CHROME: false,\n\n /**\n * The specific browser model.\n * False if it is unavailable.\n *\n * @property model\n * @type {Boolean|String}\n * @public\n * @static\n */\n model: false,\n\n /**\n * The browser version.\n * False if it is unavailable.\n *\n * @property version\n * @type {Boolean|String}\n * @public\n * @static\n */\n version: false,\n\n /**\n * The user agent string.\n * False if it is unavailable.\n *\n * @property userAgent\n * @type {Boolean|String}\n * @public\n * @static\n */\n userAgent: false,\n\n /**\n * The CSS prefix (-moz-, -webkit-, -ms-, ...)\n * False if it is unavailable \n *\n * @property cssPrefix \n * @type {Boolean|String}\n * @public \n * @static \n */\n cssPrefix: false, \n\n /**\n * The DOM prefix (Moz, Webkit, ms, ...)\n * False if it is unavailable \n * @property domPrefix \n * @type {Boolean|String}\n * @public \n * @static \n */\n domPrefix: false,\n\n /**\n * Initialization function for the Browser object.\n *\n * Is called automatically when this module is loaded, and calls setDimensions, setBrowser and setReferrer.\n *\n * @method init\n * @public\n */\n init: function() {\n this.detectBrowser();\n this.setDimensions();\n this.setReferrer();\n },\n\n /**\n * Retrieves and stores window dimensions in this object. Called automatically when this module is loaded.\n *\n * @method setDimensions\n * @public\n */\n setDimensions: function() {\n //this.windowWidth=window.innerWidth !== null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body !== null ? document.body.clientWidth : null;\n //this.windowHeight=window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;\n var myWidth = 0, myHeight = 0;\n if ( typeof window.innerWidth=== 'number' ) {\n myWidth = window.innerWidth;\n myHeight = window.innerHeight;\n } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {\n myWidth = document.documentElement.clientWidth;\n myHeight = document.documentElement.clientHeight;\n } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {\n myWidth = document.body.clientWidth;\n myHeight = document.body.clientHeight;\n }\n this.windowWidth = myWidth;\n this.windowHeight = myHeight;\n },\n\n /**\n * Stores the referrer. Called automatically when this module is loaded.\n *\n * @method setReferrer\n * @public\n */\n setReferrer: function() {\n if (document.referrer && document.referrer.length) {\n this.referrer = window.escape(document.referrer);\n } else {\n this.referrer = false;\n }\n },\n\n /**\n * Detects the browser and stores the found properties. Called automatically when this module is loaded.\n *\n * @method detectBrowser\n * @public\n */\n detectBrowser: function() {\n this._sniffUserAgent(navigator.userAgent);\n },\n\n _sniffUserAgent: function (sAgent) {\n this.userAgent = sAgent;\n\n sAgent = sAgent.toLowerCase();\n\n if (/applewebkit\\//.test(sAgent)) {\n this.cssPrefix = '-webkit-';\n this.domPrefix = 'Webkit';\n if(/(chrome|crios)\\//.test(sAgent)) {\n // Chrome\n this.CHROME = true;\n this.model = 'chrome';\n this.version = sAgent.replace(/(.*)chrome\\/([^\\s]+)(.*)/, \"$2\");\n } else {\n // Safari\n this.SAFARI = true;\n this.model = 'safari';\n var rVersion = /version\\/([^) ]+)/;\n if (rVersion.test(sAgent)) {\n this.version = sAgent.match(rVersion)[1];\n } else {\n this.version = sAgent.replace(/(.*)applewebkit\\/([^\\s]+)(.*)/, \"$2\");\n }\n }\n } else if (/opera/.test(sAgent)) {\n // Opera\n this.OPERA = true;\n this.model = 'opera';\n this.version = sAgent.replace(/(.*)opera.([^\\s$]+)(.*)/, \"$2\");\n this.cssPrefix = '-o-';\n this.domPrefix = 'O';\n } else if (/konqueror/.test(sAgent)) {\n // Konqueroh\n this.KONQUEROR = true;\n this.model = 'konqueror';\n this.version = sAgent.replace(/(.*)konqueror\\/([^;]+);(.*)/, \"$2\");\n this.cssPrefix = '-khtml-';\n this.domPrefix = 'Khtml';\n } else if (/(msie|trident)/i.test(sAgent)) {\n // MSIE\n this.IE = true;\n this.model = 'ie';\n if (/rv:((?:\\d|\\.)+)/.test(sAgent)) { // IE 11\n this.version = sAgent.match(/rv:((?:\\d|\\.)+)/)[1];\n } else {\n this.version = sAgent.replace(/(.*)\\smsie\\s([^;]+);(.*)/, \"$2\");\n }\n this.cssPrefix = '-ms-';\n this.domPrefix = 'ms';\n } else if (/gecko/.test(sAgent)) {\n // GECKO\n // Supports only:\n // Camino, Chimera, Epiphany, Minefield (firefox 3), Firefox, Firebird, Phoenix, Galeon,\n // Iceweasel, K-Meleon, SeaMonkey, Netscape, Songbird, Sylera,\n this.cssPrefix = '-moz-';\n this.domPrefix = 'Moz';\n\n this.GECKO = true;\n\n var re = /(camino|chimera|epiphany|minefield|firefox|firebird|phoenix|galeon|iceweasel|k\\-meleon|seamonkey|netscape|songbird|sylera)/;\n if(re.test(sAgent)) {\n this.model = sAgent.match(re)[1];\n this.version = sAgent.replace(new RegExp(\"(.*)\"+this.model+\"\\/([^;\\\\s$]+)(.*)\"), \"$2\");\n } else {\n // probably is mozilla\n this.model = 'mozilla';\n var reVersion = /(.*)rv:([^)]+)(.*)/;\n if(reVersion.test(sAgent)) {\n this.version = sAgent.replace(reVersion, \"$2\");\n }\n }\n }\n },\n\n /**\n * Debug function which displays browser (and Ink.Dom.Browser) information as an alert message.\n *\n * @method debug\n * @public\n * @sample Ink_Dom_Browser_1_debug.html\n */\n debug: function() {\n /*global alert:false */\n var str = \"known browsers: (ie, gecko, opera, safari, konqueror) \\n\";\n str += [this.IE, this.GECKO, this.OPERA, this.SAFARI, this.KONQUEROR] +\"\\n\";\n str += \"cssPrefix -> \"+this.cssPrefix+\"\\n\";\n str += \"domPrefix -> \"+this.domPrefix+\"\\n\";\n str += \"model -> \"+this.model+\"\\n\";\n str += \"version -> \"+this.version+\"\\n\";\n str += \"\\n\";\n str += \"original UA -> \"+this.userAgent;\n\n alert(str);\n }\n };\n\n Browser.init();\n\n return Browser;\n});\n","/**\n * CSS Utilities and toolbox\n * @module Ink.Dom.Css_1\n * @version 1\n */\n\nInk.createModule( 'Ink.Dom.Css', 1, [], function() {\n\n 'use strict';\n\n // getComputedStyle feature detection.\n var getCs = (\"defaultView\" in document) && (\"getComputedStyle\" in document.defaultView) ? document.defaultView.getComputedStyle : window.getComputedStyle;\n\n /**\n * @namespace Ink.Dom.Css\n * @static\n */\n\n var Css = {\n /**\n * Adds of removes a class.\n * Depending on addRemState, this method either adds a class if it's true or removes if if false.\n *\n * @method addRemoveClassName\n * @param {DOMElement|string} elm DOM element or element id\n * @param {string} className class name to add or remove.\n * @param {boolean} addRemState Whether to add or remove. `true` to add, `false` to remove.\n * @sample Ink_Dom_Css_addRemoveClassName.html \n */\n addRemoveClassName: function(elm, className, addRemState) {\n if (addRemState) {\n return this.addClassName(elm, className);\n }\n this.removeClassName(elm, className);\n },\n\n /**\n * Adds a class to a given element\n *\n * @method addClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String|Array} className Classes \n * @sample Ink_Dom_Css_addClassName.html\n */\n addClassName: function(elm, className) {\n elm = Ink.i(elm);\n if (!elm || !className) { return null; }\n className = ('' + className).split(/[, ]+/);\n var i = 0;\n var len = className.length;\n\n for (; i < len; i++) {\n // remove whitespace and ignore on empty string\n if (className[i].replace(/^\\s+|\\s+$/g, '')) {\n if (typeof elm.classList !== \"undefined\") {\n elm.classList.add(className[i]);\n } else if (!Css.hasClassName(elm, className[i])) {\n elm.className += (elm.className ? ' ' : '') + className[i];\n }\n }\n }\n },\n\n /**\n * Removes a class from a given element\n *\n * @method removeClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String|Array} className Class names to remove. You can either use a space separated string of classnames, comma-separated list or an array\n * @sample Ink_Dom_Css_removeClassName.html \n */\n removeClassName: function(elm, className) {\n elm = Ink.i(elm);\n if (!elm || !className) { return null; }\n \n className = ('' + className).split(/[, ]+/);\n var i = 0;\n var len = className.length;\n\n if (typeof elm.classList !== \"undefined\"){\n for (; i < len; i++) {\n elm.classList.remove(className[i]);\n }\n } else {\n var elmClassName = elm.className || '';\n var re;\n for (; i < len; i++) {\n re = new RegExp(\"(^|\\\\s+)\" + className[i] + \"(\\\\s+|$)\");\n elmClassName = elmClassName.replace(re, ' ');\n }\n elm.className = (elmClassName\n .replace(/^\\s+/, '')\n .replace(/\\s+$/, ''));\n }\n },\n\n /**\n * Alias to addRemoveClassName. \n * Utility function, saves many if/elses.\n *\n * @method setClassName\n * @uses addRemoveClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String|Array} className Class names to add\\remove. Comma separated, space separated or simply an Array\n * @param {Boolean} [add]=false Flag to switch behavior from removal to addition. true to add, false to remove\n */\n setClassName: function(elm, className, add) {\n this.addRemoveClassName(elm, className, add || false);\n },\n\n /**\n * Checks if an element has a class.\n * This method verifies if an element has ONE of a list of classes. If the last argument is flagged as true, instead checks if the element has ALL the classes\n * \n * @method hasClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String|Array} className Class names to test\n * @param {Boolean} [all]=false If flagged as true, it will check if the element contains ALL the CSS classes\n * @return {Boolean} true if a given class is applied to a given element\n * @sample Ink_Dom_Css_hasClassName.html \n */\n hasClassName: function(elm, className, all) {\n elm = Ink.i(elm);\n if (!elm || !className) { return false; }\n\n className = ('' + className).split(/[, ]+/);\n var i = 0;\n var len = className.length;\n var has;\n var re;\n\n for ( ; i < len; i++) {\n if (typeof elm.classList !== \"undefined\"){\n has = elm.classList.contains(className[i]);\n } else {\n var elmClassName = elm.className;\n if (elmClassName === className[i]) {\n has = true;\n } else {\n re = new RegExp(\"(^|\\\\s)\" + className[i] + \"(\\\\s|$)\");\n has = re.test(elmClassName);\n }\n }\n if (has && !all) { return true; } // return if looking for any class\n if (!has && all) { return false; } // return if looking for all classes\n }\n\n if (all) {\n // if we got here, all classes were found so far\n return true;\n } else {\n // if we got here with all == false, no class was found\n return false;\n }\n },\n\n /**\n * Blinks a class from an element\n * Add and removes the class from the element with a timeout, so it blinks\n *\n * @method blinkClass\n * @uses addRemoveClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String|Array} className Class name(s) to blink\n * @param {Number} timeout timeout in ms between adding and removing, default 100 ms\n * @param {Boolean} negate is true, class is removed then added\n * @sample Ink_Dom_Css_blinkClass.html \n */\n blinkClass: function(element, className, timeout, negate){\n element = Ink.i(element);\n Css.addRemoveClassName(element, className, !negate);\n setTimeout(function() {\n Css.addRemoveClassName(element, className, negate);\n }, Number(timeout) || 100);\n },\n\n /**\n * Toggles a class name from a given element\n *\n * @method toggleClassName\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String} className Class name\n * @param {Boolean} [forceAdd] Flag to force adding the the classe names if they don't exist yet.\n * @sample Ink_Dom_Css_toggleClassName.html \n */\n toggleClassName: function(elm, className, forceAdd) {\n if (elm && className){\n if (typeof elm.classList !== \"undefined\" && !/[, ]/.test(className)){\n elm = Ink.i(elm);\n if (elm !== null){\n elm.classList.toggle(className);\n }\n return true;\n }\n }\n\n if (typeof forceAdd !== 'undefined') {\n if (forceAdd === true) {\n Css.addClassName(elm, className);\n }\n else if (forceAdd === false) {\n Css.removeClassName(elm, className);\n }\n } else {\n if (Css.hasClassName(elm, className)) {\n Css.removeClassName(elm, className);\n } else {\n Css.addClassName(elm, className);\n }\n }\n },\n\n /**\n * Sets the opacity of given element \n *\n * @method setOpacity\n * @param {DOMElement|String} elm DOM element or element id\n * @param {Number} value allows 0 to 1(default mode decimal) or percentage (warning using 0 or 1 will reset to default mode)\n * @sample Ink_Dom_Css_setOpacity.html \n */\n setOpacity: function(elm, value) {\n elm = Ink.i(elm);\n if (elm !== null){\n var val = 1;\n\n if (!isNaN(Number(value))){\n if (value <= 0) { val = 0; }\n else if (value <= 1) { val = value; }\n else if (value <= 100) { val = value / 100; }\n else { val = 1; }\n }\n\n if (typeof elm.style.opacity !== 'undefined') {\n elm.style.opacity = val;\n }\n else {\n elm.style.filter = \"alpha(opacity:\"+(val*100|0)+\")\";\n }\n }\n },\n\n /**\n * Converts a css property name to a string in camelcase to be used with CSSStyleDeclaration.\n * @method _camelCase\n * @private\n * @param {String} str String to convert\n * @return {String} Converted string\n */\n _camelCase: function(str) {\n return str ? str.replace(/-(\\w)/g, function (_, $1) {\n return $1.toUpperCase();\n }) : str;\n },\n\n\n /**\n * Gets the value for an element's style attribute\n *\n * @method getStyle\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String} style Which css attribute to fetch\n * @return Style value\n * @sample Ink_Dom_Css_getStyle.html \n */\n getStyle: function(elm, style) {\n elm = Ink.i(elm);\n if (elm !== null && elm.style) {\n style = style === 'float' ? 'cssFloat': this._camelCase(style);\n\n var value = elm.style[style];\n\n if (getCs && (!value || value === 'auto')) {\n var css = getCs(elm, null);\n value = css ? css[style] : null;\n }\n else if (!value && elm.currentStyle) {\n value = elm.currentStyle[style];\n if (value === 'auto' && (style === 'width' || style === 'height')) {\n value = elm[\"offset\" + style.charAt(0).toUpperCase() + style.slice(1)] + \"px\";\n }\n }\n\n if (style === 'opacity') {\n return value ? parseFloat(value, 10) : 1.0;\n }\n else if (style === 'borderTopWidth' || style === 'borderBottomWidth' ||\n style === 'borderRightWidth' || style === 'borderLeftWidth' ) {\n if (value === 'thin') { return '1px'; }\n else if (value === 'medium') { return '3px'; }\n else if (value === 'thick') { return '5px'; }\n }\n\n return value === 'auto' ? null : value;\n }\n },\n\n\n /**\n * Adds CSS rules to an element's style attribute.\n *\n * @method setStyle\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String} style Which css attribute to set\n * @sample Ink_Dom_Css_setStyle.html \n */\n setStyle: function(elm, style) {\n elm = Ink.i(elm);\n if (elm === null) { return; }\n if (typeof style === 'string') {\n elm.style.cssText += '; '+style;\n\n if (style.indexOf('opacity') !== -1) {\n this.setOpacity(elm, style.match(/opacity:\\s*(\\d?\\.?\\d*)/)[1]);\n }\n }\n else {\n for (var prop in style) {\n if (style.hasOwnProperty(prop)){\n if (prop === 'opacity') {\n this.setOpacity(elm, style[prop]);\n }\n else if (prop === 'float' || prop === 'cssFloat') {\n if (typeof elm.style.styleFloat === 'undefined') {\n elm.style.cssFloat = style[prop];\n }\n else {\n elm.style.styleFloat = style[prop];\n }\n } else {\n elm.style[prop] = style[prop];\n }\n }\n }\n }\n },\n\n\n /**\n * Shows an element.\n * Internally it unsets the display property of an element. You can force a specific display property using forceDisplayProperty\n *\n * @method show\n * @param {DOMElement|String} elm DOM element or element id\n * @param {String} [forceDisplayProperty] Css display property to apply on show\n * @sample Ink_Dom_Css_show.html \n */\n show: function(elm, forceDisplayProperty) {\n elm = Ink.i(elm);\n if (elm !== null) {\n elm.style.display = (forceDisplayProperty) ? forceDisplayProperty : '';\n }\n },\n\n /**\n * Hides an element.\n *\n * @method hide\n * @param {DOMElement|String} elm DOM element or element id\n * @sample Ink_Dom_Css_hide.html \n */\n hide: function(elm) {\n elm = Ink.i(elm);\n if (elm !== null) {\n elm.style.display = 'none';\n }\n },\n\n /**\n * Shows or hides an element.\n * If the show parameter is true, it shows the element. Otherwise, hides it.\n *\n * @method showHide\n * @param {DOMElement|String} elm DOM element or element id\n * @param {boolean} [show]=false Whether to show or hide `elm`.\n * @sample Ink_Dom_Css_showHide.html \n */\n showHide: function(elm, show) {\n elm = Ink.i(elm);\n if (elm) {\n elm.style.display = show ? '' : 'none';\n }\n },\n\n /**\n * Toggles an element visibility.\n * \n * @method toggle\n * @param {DOMElement|String} elm DOM element or element id\n * @param {Boolean} forceShow Forces showing if element is hidden\n * @sample Ink_Dom_Css_toggle.html \n */\n toggle: function(elm, forceShow) {\n elm = Ink.i(elm);\n if (elm !== null) {\n if (typeof forceShow !== 'undefined') {\n if (forceShow === true) {\n this.show(elm);\n } else {\n this.hide(elm);\n }\n } else {\n if (this.getStyle(elm,'display').toLowerCase() === 'none') {\n this.show(elm);\n }\n else {\n this.hide(elm);\n }\n }\n }\n },\n\n _getRefTag: function(head){\n if (head.firstElementChild) {\n return head.firstElementChild;\n }\n\n for (var child = head.firstChild; child; child = child.nextSibling){\n if (child.nodeType === 1){\n return child;\n }\n }\n return null;\n },\n\n /**\n * Injects style tags with rules to the page.\n *\n * @method appendStyleTag\n * @param {String} selector The css selector for the rule\n * @param {String} style The content of the style rule\n * @param {Object} options Options for the tag\n * @param {String} [options.type]='text/css' File type\n * @param {Boolean} [options.force]=false If true, the style tag will be appended to end of head\n * \n * @sample Ink_Dom_Css_appendStyleTag.html \n */\n appendStyleTag: function(selector, style, options){\n options = Ink.extendObj({\n type: 'text/css',\n force: false\n }, options || {});\n\n var styles = document.getElementsByTagName(\"style\"),\n oldStyle = false, setStyle = true, i, l;\n\n for (i=0, l=styles.length; i= 0) {\n setStyle = false;\n }\n }\n\n if (setStyle) {\n var defStyle = document.createElement(\"style\"),\n head = document.getElementsByTagName(\"head\")[0],\n refTag = false, styleStr = '';\n\n defStyle.type = options.type;\n\n styleStr += selector +\" {\";\n styleStr += style;\n styleStr += \"} \";\n\n if (typeof defStyle.styleSheet !== \"undefined\") {\n defStyle.styleSheet.cssText = styleStr;\n } else {\n defStyle.appendChild(document.createTextNode(styleStr));\n }\n\n if (options.force){\n head.appendChild(defStyle);\n } else {\n refTag = this._getRefTag(head);\n if (refTag){\n head.insertBefore(defStyle, refTag);\n }\n }\n }\n },\n\n /**\n * Injects an external link tag.\n * This method add a stylesheet to the head of a page\n *\n * @method appendStylesheet\n * @param {String} path File path\n * @param {Object} options Options for the tag\n * @param {String} [options.media]='screen' Media type\n * @param {String} [options.type]='text/css' File type\n * @param {Boolean} [options.force]=false If true, tag will be appended to end of head\n * @sample Ink_Dom_Css_appendStylesheet.html \n */\n appendStylesheet: function(path, options){\n options = Ink.extendObj({\n media: 'screen',\n type: 'text/css',\n force: false\n }, options || {});\n\n var refTag,\n style = document.createElement(\"link\"),\n head = document.getElementsByTagName(\"head\")[0];\n\n style.media = options.media;\n style.type = options.type;\n style.href = path;\n style.rel = \"Stylesheet\";\n\n if (options.force){\n head.appendChild(style);\n }\n else {\n refTag = this._getRefTag(head);\n if (refTag){\n head.insertBefore(style, refTag);\n }\n }\n },\n\n /**\n * Injects an external link tag.\n * Loads CSS via LINK element inclusion in HEAD (skips append if already there)\n *\n * Works similarly to appendStylesheet but:\n * supports optional callback which gets invoked once the CSS has been applied\n *\n * @method appendStylesheetCb\n * @param {String} cssURI URI of the CSS to load, if empty ignores and just calls back directly\n * @param {Function(cssURI)} [callback] optional callback which will be called once the CSS is loaded\n * @sample Ink_Dom_Css_appendStylesheetCb.html \n */\n _loadingCSSFiles: {},\n _loadedCSSFiles: {},\n appendStylesheetCb: function(url, callback) {\n if (!url) {\n return callback(url);\n }\n\n if (this._loadedCSSFiles[url]) {\n return callback(url);\n }\n\n var cbs = this._loadingCSSFiles[url];\n if (cbs) {\n return cbs.push(callback);\n }\n\n this._loadingCSSFiles[url] = [callback];\n\n var linkEl = document.createElement('link');\n linkEl.type = 'text/css';\n linkEl.rel = 'stylesheet';\n linkEl.href = url;\n\n var headEl = document.getElementsByTagName('head')[0];\n headEl.appendChild(linkEl);\n\n var imgEl = document.createElement('img');\n /*\n var _self = this;\n (function(_url) {\n imgEl.onerror = function() {\n //var url = this;\n var url = _url;\n _self._loadedCSSFiles[url] = true;\n var callbacks = _self._loadingCSSFiles[url];\n for (var i = 0, f = callbacks.length; i < f; ++i) {\n callbacks[i](url);\n }\n delete _self._loadingCSSFiles[url];\n };\n })(url);\n */\n imgEl.onerror = Ink.bindEvent(function(event, _url) {\n //var url = this;\n var url = _url;\n this._loadedCSSFiles[url] = true;\n var callbacks = this._loadingCSSFiles[url];\n for (var i = 0, f = callbacks.length; i < f; ++i) {\n callbacks[i](url);\n }\n delete this._loadingCSSFiles[url];\n }, this, url);\n imgEl.src = url;\n },\n\n /**\n * Converts decimal to hexadecimal values\n * Useful to convert colors to their hexadecimal representation.\n *\n * @method decToHex\n * @param {String} dec Either a single decimal value, an rgb(r, g, b) string or an Object with r, g and b properties\n * @return {String} Hexadecimal value\n * @sample Ink_Dom_Css_decToHex.html \n */\n decToHex: function(dec) {\n var normalizeTo2 = function(val) {\n if (val.length === 1) {\n val = '0' + val;\n }\n val = val.toUpperCase();\n return val;\n };\n\n if (typeof dec === 'object') {\n var rDec = normalizeTo2(parseInt(dec.r, 10).toString(16));\n var gDec = normalizeTo2(parseInt(dec.g, 10).toString(16));\n var bDec = normalizeTo2(parseInt(dec.b, 10).toString(16));\n return rDec+gDec+bDec;\n }\n else {\n dec += '';\n var rgb = dec.match(/\\((\\d+),\\s?(\\d+),\\s?(\\d+)\\)/);\n if (rgb !== null) {\n return normalizeTo2(parseInt(rgb[1], 10).toString(16)) +\n normalizeTo2(parseInt(rgb[2], 10).toString(16)) +\n normalizeTo2(parseInt(rgb[3], 10).toString(16));\n }\n else {\n return normalizeTo2(parseInt(dec, 10).toString(16));\n }\n }\n },\n\n /**\n * Converts hexadecimal values to decimal\n * Useful to use with CSS colors\n *\n * @method hexToDec\n * @param {String} hex hexadecimal Value with 6, 3, 2 or 1 characters\n * @return {Number} Object with properties r, g, b if length of number is >= 3 or decimal value instead.\n * @sample Ink_Dom_Css_hexToDec.html \n */\n hexToDec: function(hex){\n if (hex.indexOf('#') === 0) {\n hex = hex.substr(1);\n }\n if (hex.length === 6) { // will return object RGB\n return {\n r: parseInt(hex.substr(0,2), 16),\n g: parseInt(hex.substr(2,2), 16),\n b: parseInt(hex.substr(4,2), 16)\n };\n }\n else if (hex.length === 3) { // will return object RGB\n return {\n r: parseInt(hex.charAt(0) + hex.charAt(0), 16),\n g: parseInt(hex.charAt(1) + hex.charAt(1), 16),\n b: parseInt(hex.charAt(2) + hex.charAt(2), 16)\n };\n }\n else if (hex.length <= 2) { // will return int\n return parseInt(hex, 16);\n }\n },\n\n /**\n * Get a single property from a stylesheet.\n * Use this to obtain the value of a CSS property (searched from loaded CSS documents)\n *\n * @method getPropertyFromStylesheet\n * @param {String} selector a CSS rule. must be an exact match\n * @param {String} property a CSS property\n * @return {String} value of the found property, or null if it wasn't matched\n */\n getPropertyFromStylesheet: function(selector, property) {\n var rule = this.getRuleFromStylesheet(selector);\n if (rule) {\n return rule.style[property];\n }\n return null;\n },\n\n getPropertyFromStylesheet2: function(selector, property) {\n var rules = this.getRulesFromStylesheet(selector);\n /*\n rules.forEach(function(rule) {\n var x = rule.style[property];\n if (x !== null && x !== undefined) {\n return x;\n }\n });\n */\n var x;\n for(var i=0, t=rules.length; i < t; i++) {\n x = rules[i].style[property];\n if (x !== null && x !== undefined) {\n return x;\n }\n }\n return null;\n },\n\n getRuleFromStylesheet: function(selector) {\n var sheet, rules, ri, rf, rule;\n var s = document.styleSheets;\n if (!s) {\n return null;\n }\n\n for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) {\n sheet = document.styleSheets[si];\n rules = sheet.rules ? sheet.rules : sheet.cssRules;\n if (!rules) { return null; }\n\n for (ri = 0, rf = rules.length; ri < rf; ++ri) {\n rule = rules[ri];\n if (!rule.selectorText) { continue; }\n if (rule.selectorText === selector) {\n return rule;\n }\n }\n }\n\n return null;\n },\n\n getRulesFromStylesheet: function(selector) {\n var res = [];\n var sheet, rules, ri, rf, rule;\n var s = document.styleSheets;\n if (!s) { return res; }\n\n for (var si = 0, sf = document.styleSheets.length; si < sf; ++si) {\n sheet = document.styleSheets[si];\n rules = sheet.rules ? sheet.rules : sheet.cssRules;\n if (!rules) {\n return null;\n }\n\n for (ri = 0, rf = rules.length; ri < rf; ++ri) {\n rule = rules[ri];\n if (!rule.selectorText) { continue; }\n if (rule.selectorText === selector) {\n res.push(rule);\n }\n }\n }\n\n return res;\n },\n\n getPropertiesFromRule: function(selector) {\n var rule = this.getRuleFromStylesheet(selector);\n var props = {};\n var prop, i, f;\n\n /*if (typeof rule.style.length === 'snumber') {\n for (i = 0, f = rule.style.length; i < f; ++i) {\n prop = this._camelCase( rule.style[i] );\n props[prop] = rule.style[prop];\n }\n }\n else { // HANDLES IE 8, FIREFOX RULE JOINING... */\n rule = rule.style.cssText;\n var parts = rule.split(';');\n var steps, val, pre, pos;\n for (i = 0, f = parts.length; i < f; ++i) {\n if (parts[i].charAt(0) === ' ') {\n parts[i] = parts[i].substring(1);\n }\n steps = parts[i].split(':');\n prop = this._camelCase( steps[0].toLowerCase() );\n val = steps[1];\n if (val) {\n val = val.substring(1);\n\n if (prop === 'padding' || prop === 'margin' || prop === 'borderWidth') {\n\n if (prop === 'borderWidth') { pre = 'border'; pos = 'Width'; }\n else { pre = prop; pos = ''; }\n\n if (val.indexOf(' ') !== -1) {\n val = val.split(' ');\n props[pre + 'Top' + pos] = val[0];\n props[pre + 'Bottom'+ pos] = val[0];\n props[pre + 'Left' + pos] = val[1];\n props[pre + 'Right' + pos] = val[1];\n }\n else {\n props[pre + 'Top' + pos] = val;\n props[pre + 'Bottom'+ pos] = val;\n props[pre + 'Left' + pos] = val;\n props[pre + 'Right' + pos] = val;\n }\n }\n else if (prop === 'borderRadius') {\n if (val.indexOf(' ') !== -1) {\n val = val.split(' ');\n props.borderTopLeftRadius = val[0];\n props.borderBottomRightRadius = val[0];\n props.borderTopRightRadius = val[1];\n props.borderBottomLeftRadius = val[1];\n }\n else {\n props.borderTopLeftRadius = val;\n props.borderTopRightRadius = val;\n props.borderBottomLeftRadius = val;\n props.borderBottomRightRadius = val;\n }\n }\n else {\n props[prop] = val;\n }\n }\n }\n //}\n //console.log(props);\n\n return props;\n },\n\n /**\n * Change the font size of elements.\n * Changes the font size of the elements which match the given CSS rule\n * For this function to work, the CSS file must be in the same domain than the host page, otherwise JS can't access it.\n *\n * @method changeFontSize\n * @param {String} selector CSS selector rule\n * @param {Number} delta Number of pixels to change on font-size\n * @param {String} [op] Supported operations are '+' and '*'. defaults to '+'\n * @param {Number} [minVal] If result gets smaller than minVal, change does not occurr\n * @param {Number} [maxVal] If result gets bigger than maxVal, change does not occurr\n */\n changeFontSize: function(selector, delta, op, minVal, maxVal) {\n var that = this;\n Ink.requireModules(['Ink.Dom.Selector_1'], function(Selector) {\n var e;\n if (typeof selector !== 'string') { e = '1st argument must be a CSS selector rule.'; }\n else if (typeof delta !== 'number') { e = '2nd argument must be a number.'; }\n else if (op !== undefined && op !== '+' && op !== '*') { e = '3rd argument must be one of \"+\", \"*\".'; }\n else if (minVal !== undefined && (typeof minVal !== 'number' || minVal <= 0)) { e = '4th argument must be a positive number.'; }\n else if (maxVal !== undefined && (typeof maxVal !== 'number' || maxVal < maxVal)) { e = '5th argument must be a positive number greater than minValue.'; }\n if (e) { throw new TypeError(e); }\n\n var val, el, els = Selector.select(selector);\n if (minVal === undefined) { minVal = 1; }\n op = (op === '*') ? function(a,b){return a*b;} : function(a,b){return a+b;};\n for (var i = 0, f = els.length; i < f; ++i) {\n el = els[i];\n val = parseFloat( that.getStyle(el, 'fontSize'));\n val = op(val, delta);\n if (val < minVal) { continue; }\n if (typeof maxVal === 'number' && val > maxVal) { continue; }\n el.style.fontSize = val + 'px';\n }\n });\n }\n\n };\n\n return Css;\n\n});\n","/**\n * DOM Traversal and manipulation\n * @module Ink.Dom.Element_1\n * @version 1\n */\n\nInk.createModule('Ink.Dom.Element', 1, [], function() {\n\n 'use strict';\n\n var createContextualFragmentSupport = (\n typeof document.createRange === 'function' &&\n typeof window.Range.prototype.createContextualFragment === 'function');\n\n var deleteThisTbodyToken = 'Ink.Dom.Element tbody: ' + Math.random();\n var browserCreatesTbodies = (function () {\n var div = document.createElement('div');\n div.innerHTML = '
';\n return div.getElementsByTagName('tbody').length !== 0;\n }());\n\n function rect(elem){\n var dimensions = {};\n try {\n dimensions = elem.getBoundingClientRect();\n } catch(e){\n dimensions = { top: elem.offsetTop, left: elem.offsetLeft };\n }\n return dimensions;\n }\n\n /**\n * @namespace Ink.Dom.Element_1\n */\n\n var InkElement = {\n\n /**\n * Checks if something is a DOM Element.\n *\n * @method isDOMElement\n * @static\n * @param {Mixed} o The object to be checked.\n * @return {Boolean} True if it's a valid DOM Element.\n * @example\n * var el = Ink.s('#element');\n * if( InkElement.isDOMElement( el ) === true ){\n * // It is a DOM Element.\n * } else {\n * // It is NOT a DOM Element.\n * }\n */\n isDOMElement: function(o) {\n return o !== null && typeof o === 'object' && 'nodeType' in o && o.nodeType === 1;\n },\n\n /**\n * Shortcut for `document.getElementById`\n *\n * @method get\n * @param {String|DOMElement} elm Either an ID of an element, or an element.\n * @return {DOMElement|null} The DOM element with the given id or null when it was not found\n * @sample Ink_Dom_Element_1_get.html\n */\n get: function(elm) {\n if(typeof elm !== 'undefined') {\n if(typeof elm === 'string') {\n return document.getElementById(elm);\n }\n return elm;\n }\n return null;\n },\n\n /**\n * Creates a DOM element\n *\n * @method create\n * @param {String} tag tag name\n * @param {Object} properties object with properties to be set on the element. You can also call other functions in Ink.Dom.Element like this\n * @sample Ink_Dom_Element_1_create.html\n */\n create: function(tag, properties) {\n var el = document.createElement(tag);\n //Ink.extendObj(el, properties);\n for(var property in properties) {\n if(properties.hasOwnProperty(property)) {\n if (property in InkElement) {\n InkElement[property](el, properties[property]);\n } else {\n if(property === 'className' || property === 'class') {\n el.className = properties.className || properties['class'];\n } else {\n el.setAttribute(property, properties[property]);\n }\n }\n }\n }\n return el;\n },\n\n /**\n * Removes a DOM Element\n *\n * @method remove\n * @param {DOMElement} elm The element to remove\n * @sample Ink_Dom_Element_1_remove.html\n */\n remove: function(el) {\n el = Ink.i(el);\n var parEl;\n if (el && (parEl = el.parentNode)) {\n parEl.removeChild(el);\n }\n },\n\n /**\n * Scrolls the window to an element\n *\n * @method scrollTo\n * @param {DOMElement|String} elm Element where to scroll\n * @sample Ink_Dom_Element_1_scrollTo.html\n */\n scrollTo: function(elm) {\n elm = InkElement.get(elm);\n if(elm) {\n if (elm.scrollIntoView) {\n return elm.scrollIntoView();\n }\n\n var elmOffset = {},\n elmTop = 0, elmLeft = 0;\n\n do {\n elmTop += elm.offsetTop || 0;\n elmLeft += elm.offsetLeft || 0;\n\n elm = elm.offsetParent;\n } while(elm);\n\n elmOffset = {x: elmLeft, y: elmTop};\n\n window.scrollTo(elmOffset.x, elmOffset.y);\n }\n },\n\n /**\n * Gets the top offset of an element\n *\n * @method offsetTop\n * @uses Ink.Dom.Browser\n *\n * @param {DOMElement|String} elm Target element\n * @return {Number} Offset from the target element to the top of the document\n * @sample Ink_Dom_Element_1_offsetTop.html\n */\n offsetTop: function(elm) {\n return InkElement.offset(elm)[1];\n },\n\n /**\n * Gets the left offset of an element\n *\n * @method offsetLeft\n * @uses Ink.Dom.Browser\n *\n * @param {DOMElement|String} elm Target element\n * @return {Number} Offset from the target element to the left of the document\n * @sample Ink_Dom_Element_1_offsetLeft.html\n */\n offsetLeft: function(elm) {\n return InkElement.offset(elm)[0];\n },\n\n /**\n * Gets the relative offset of an element\n *\n * @method positionedOffset\n * @param {DOMElement|String} elm Target element\n * @return {Array} Array with the element offsetleft and offsettop relative to the closest positioned ancestor\n * @sample Ink_Dom_Element_1_positionedOffset.html\n */\n positionedOffset: function(element) {\n var valueTop = 0, valueLeft = 0;\n element = InkElement.get(element);\n do {\n valueTop += element.offsetTop || 0;\n valueLeft += element.offsetLeft || 0;\n element = element.offsetParent;\n if (element) {\n if (element.tagName.toLowerCase() === 'body') { break; }\n\n var value = element.style.position;\n if (!value && element.currentStyle) {\n value = element.currentStyle.position;\n }\n if ((!value || value === 'auto') && typeof getComputedStyle !== 'undefined') {\n var css = getComputedStyle(element, null);\n value = css ? css.position : null;\n }\n if (value === 'relative' || value === 'absolute') { break; }\n }\n } while (element);\n return [valueLeft, valueTop];\n },\n\n /**\n * Gets the cumulative offset for an element\n *\n * Returns the top left position of the element on the page\n *\n * @method offset\n * @uses Ink.Dom.Browser\n *\n * @method offset\n * @param {DOMElement|String} elm Target element\n * @return {[Number, Number]} Array with pixel distance from the target element to the top left corner of the document\n * @sample Ink_Dom_Element_1_offset.html\n */\n offset: function(el) {\n /*jshint boss:true */\n el = Ink.i(el);\n var res = [0, 0];\n var doc = el.ownerDocument,\n docElem = doc.documentElement,\n box = rect(el),\n body = doc.body,\n clientTop = docElem.clientTop || body.clientTop || 0,\n clientLeft = docElem.clientLeft || body.clientLeft || 0,\n scrollTop = doc.pageYOffset || docElem.scrollTop || body.scrollTop,\n scrollLeft = doc.pageXOffset || docElem.scrollLeft || body.scrollLeft,\n top = box.top + scrollTop - clientTop,\n left = box.left + scrollLeft - clientLeft;\n res = [left, top];\n return res;\n },\n\n /**\n * Gets the scroll of the element\n *\n * @method scroll\n * @param {DOMElement|String} [elm] Target element or document.body\n * @returns {Array} offset values for x and y scroll\n * @sample Ink_Dom_Element_1_scroll.html\n */\n scroll: function(elm) {\n elm = elm ? Ink.i(elm) : document.body;\n return [\n ( ( !window.pageXOffset ) ? elm.scrollLeft : window.pageXOffset ),\n ( ( !window.pageYOffset ) ? elm.scrollTop : window.pageYOffset )\n ];\n },\n\n _getPropPx: function(cs, prop) {\n var n, c;\n var val = cs.getPropertyValue ? cs.getPropertyValue(prop) : cs[prop];\n if (!val) { n = 0; }\n else {\n c = val.indexOf('px');\n if (c === -1) { n = 0; }\n else {\n n = parseFloat(val, 10);\n }\n }\n\n //console.log([prop, ' \"', val, '\" ', n].join(''));\n\n return n;\n },\n\n /**\n * Alias for offset()\n *\n * @method offset2\n * @deprecated Kept for historic reasons. Use offset() instead.\n */\n offset2: function(el) {\n return InkElement.offset(el);\n },\n\n /**\n * Checks if an element has an attribute\n *\n * @method hasAttribute\n * @param {Object} elm Target element\n * @param {String} attr Attribute name\n * @return {Boolean} Boolean based on existance of attribute\n * @sample Ink_Dom_Element_1_hasAttribute.html\n */\n hasAttribute: function(elm, attr){\n elm = Ink.i(elm);\n return elm.hasAttribute ? elm.hasAttribute(attr) : !!elm.getAttribute(attr);\n },\n /**\n * Inserts an element right after another\n *\n * @method insertAfter\n * @param {DOMElement} newElm Element to be inserted\n * @param {DOMElement|String} targetElm Key element\n * @sample Ink_Dom_Element_1_insertAfter.html\n */\n insertAfter: function(newElm, targetElm) {\n /*jshint boss:true */\n if (targetElm = InkElement.get(targetElm)) {\n if (targetElm.nextSibling !== null) {\n targetElm.parentNode.insertBefore(newElm, targetElm.nextSibling);\n } else {\n targetElm.parentNode.appendChild(newElm);\n }\n }\n },\n\n /**\n * Inserts an element before another\n *\n * @method insertBefore\n * @param {DOMElement} newElm Element to be inserted\n * @param {DOMElement|String} targetElm Key element\n * @sample Ink_Dom_Element_1_insertBefore.html\n */\n insertBefore: function (newElm, targetElm) {\n /*jshint boss:true */\n if ( (targetElm = InkElement.get(targetElm)) ) {\n targetElm.parentNode.insertBefore(newElm, targetElm);\n }\n },\n\n /**\n * Inserts an element as the first child of another\n *\n * @method insertTop\n * @param {DOMElement} newElm Element to be inserted\n * @param {DOMElement|String} targetElm Key element\n * @sample Ink_Dom_Element_1_insertTop.html\n */\n insertTop: function(newElm,targetElm) {\n /*jshint boss:true */\n if (targetElm = InkElement.get(targetElm)) {\n if (targetElm.firstChild) {\n targetElm.insertBefore(newElm, targetElm.firstChild);\n } else {\n targetElm.appendChild(newElm);\n }\n }\n },\n\n /**\n * Inserts an element as the last child of another\n *\n * @method insertBottom\n * @param {DOMElement} newElm Element to be inserted\n * @param {DOMElement|String} targetElm Key element\n * @sample Ink_Dom_Element_1_insertBottom.html\n */\n insertBottom: function(newElm, targetElm) {\n /*jshint boss:true */\n targetElm = Ink.i(targetElm);\n targetElm.appendChild(newElm);\n },\n\n /**\n * Retrieves textContent from node\n *\n * @method textContent\n * @param {DOMNode} node Where to retreive text from. Can be any node type.\n * @return {String} the text\n * @sample Ink_Dom_Element_1_textContent.html\n */\n textContent: function(node){\n node = Ink.i(node);\n var text, k, cs, m;\n\n switch(node && node.nodeType) {\n case 9: /*DOCUMENT_NODE*/\n // IE quirks mode does not have documentElement\n return InkElement.textContent(node.documentElement || node.body && node.body.parentNode || node.body);\n\n case 1: /*ELEMENT_NODE*/\n text = node.innerText;\n if (typeof text !== 'undefined') {\n return text;\n }\n /* falls through */\n case 11: /*DOCUMENT_FRAGMENT_NODE*/\n text = node.textContent;\n if (typeof text !== 'undefined') {\n return text;\n }\n\n if (node.firstChild === node.lastChild) {\n // Common case: 0 or 1 children\n return InkElement.textContent(node.firstChild);\n }\n\n text = [];\n cs = node.childNodes;\n for (k = 0, m = cs.length; k < m; ++k) {\n text.push( InkElement.textContent( cs[k] ) );\n }\n return text.join('');\n\n case 3: /*TEXT_NODE*/\n case 4: /*CDATA_SECTION_NODE*/\n return node.nodeValue;\n }\n return '';\n },\n\n /**\n * Replaces text content of a DOM Node\n * This method removes any child node previously present\n *\n * @method setTextContent\n * @param {DOMNode} node node Target node where the text will be added.\n * @param {String} text text Text to be added on the node.\n * @sample Ink_Dom_Element_1_setTextContent.html\n */\n setTextContent: function(node, text){\n node = Ink.i(node);\n switch(node && node.nodeType)\n {\n case 1: /*ELEMENT_NODE*/\n if ('innerText' in node) {\n node.innerText = text;\n break;\n }\n /* falls through */\n case 11: /*DOCUMENT_FRAGMENT_NODE*/\n if ('textContent' in node) {\n node.textContent = text;\n break;\n }\n /* falls through */\n case 9: /*DOCUMENT_NODE*/\n while(node.firstChild) {\n node.removeChild(node.firstChild);\n }\n if (text !== '') {\n var doc = node.ownerDocument || node;\n node.appendChild(doc.createTextNode(text));\n }\n break;\n\n case 3: /*TEXT_NODE*/\n case 4: /*CDATA_SECTION_NODE*/\n node.nodeValue = text;\n break;\n }\n },\n\n /**\n * Checks if an element is a link\n *\n * @method isLink\n * @param {DOMNode} node Node to check if it's link\n * @return {Boolean}\n * @sample Ink_Dom_Element_1_isLink.html\n */\n isLink: function(element){\n var b = element && element.nodeType === 1 && ((/^a|area$/i).test(element.tagName) ||\n element.hasAttributeNS && element.hasAttributeNS('http://www.w3.org/1999/xlink','href'));\n return !!b;\n },\n\n /**\n * Checks if a node is an ancestor of another\n *\n * @method isAncestorOf\n * @param {DOMNode} ancestor Ancestor node\n * @param {DOMNode} node Descendant node\n * @return {Boolean}\n * @sample Ink_Dom_Element_1_isAncestorOf.html\n */\n isAncestorOf: function(ancestor, node){\n /*jshint boss:true */\n if (!node || !ancestor) {\n return false;\n }\n if (node.compareDocumentPosition) {\n return (ancestor.compareDocumentPosition(node) & 0x10) !== 0;/*Node.DOCUMENT_POSITION_CONTAINED_BY*/\n }\n while (node = node.parentNode){\n if (node === ancestor){\n return true;\n }\n }\n return false;\n },\n\n /**\n * Checks if a node is descendant of another\n *\n * @method descendantOf\n * @param {DOMNode} node The ancestor\n * @param {DOMNode} descendant The descendant\n * @return {Boolean} true if 'descendant' is descendant of 'node'\n * @sample Ink_Dom_Element_1_descendantOf.html\n */\n descendantOf: function(node, descendant){\n return node !== descendant && InkElement.isAncestorOf(node, descendant);\n },\n\n /**\n * Get first child element of another\n * @method firstElementChild\n * @param {DOMElement} elm Parent node\n * @return {DOMElement} the Element child\n * @sample Ink_Dom_Element_1_firstElementChild.html\n */\n firstElementChild: function(elm){\n if(!elm) {\n return null;\n }\n if ('firstElementChild' in elm) {\n return elm.firstElementChild;\n }\n var child = elm.firstChild;\n while(child && child.nodeType !== 1) {\n child = child.nextSibling;\n }\n return child;\n },\n\n /**\n * Get the last child element of another\n * @method lastElementChild\n * @param {DOMElement} elm Parent node\n * @return {DOMElement} the Element child\n * @sample Ink_Dom_Element_1_lastElementChild.html\n */\n lastElementChild: function(elm){\n if(!elm) {\n return null;\n }\n if ('lastElementChild' in elm) {\n return elm.lastElementChild;\n }\n var child = elm.lastChild;\n while(child && child.nodeType !== 1) {\n child = child.previousSibling;\n }\n return child;\n },\n\n /**\n * Get the first sibling element after the node\n *\n * @method nextElementSibling\n * @param {DOMNode} node The current node\n * @return {DOMElement|Null} The first sibling element after node or null if none is found\n * @sample Ink_Dom_Element_1_nextElementSibling.html \n */\n nextElementSibling: function(node){\n var sibling = null;\n\n if(!node){ return sibling; }\n\n if(\"nextElementSibling\" in node){\n return node.nextElementSibling;\n } else {\n sibling = node.nextSibling;\n\n // 1 === Node.ELEMENT_NODE\n while(sibling && sibling.nodeType !== 1){\n sibling = sibling.nextSibling;\n }\n\n return sibling;\n }\n },\n\n /**\n * Get the first sibling element before the node\n *\n * @method previousElementSibling\n * @param {DOMNode} node The current node\n * @return {DOMElement|Null} The first element sibling before node or null if none is found\n * @sample Ink_Dom_Element_1_previousElementSibling.html \n */\n previousElementSibling: function(node){\n var sibling = null;\n\n if(!node){ return sibling; }\n\n if(\"previousElementSibling\" in node){\n return node.previousElementSibling;\n } else {\n sibling = node.previousSibling;\n\n // 1 === Node.ELEMENT_NODE\n while(sibling && sibling.nodeType !== 1){\n sibling = sibling.previousSibling;\n }\n\n return sibling;\n }\n },\n\n /**\n * Get an element's width in pixels.\n *\n * @method elementWidth\n * @param {DOMElement|String} element Target DOM element or target ID\n * @return {Number} The element's width\n * @sample Ink_Dom_Element_1_elementWidth.html \n */\n elementWidth: function(element) {\n if(typeof element === \"string\") {\n element = document.getElementById(element);\n }\n return element.offsetWidth;\n },\n\n /**\n * Get an element's height in pixels.\n *\n * @method elementHeight\n * @param {DOMElement|String} element DOM element or target ID\n * @return {Number} The element's height\n * @sample Ink_Dom_Element_1_elementHeight.html \n */\n elementHeight: function(element) {\n if(typeof element === \"string\") {\n element = document.getElementById(element);\n }\n return element.offsetHeight;\n },\n\n /**\n * Deprecated. Alias for offsetLeft()\n *\n * @method elementLeft\n * @param {DOMElement|String} element DOM element or target ID\n * @return {Number} Element's left position\n */\n elementLeft: function(element) {\n return InkElement.offsetLeft(element);\n },\n\n /**\n * Deprecated. Alias for offsetTop()\n *\n * @method elementTop\n * @param {DOMElement|string} element Target DOM element or target ID\n * @return {Number} element's top position\n */\n elementTop: function(element) {\n return InkElement.offsetTop(element);\n },\n\n /**\n * Get an element's dimensions in pixels.\n *\n * @method elementDimensions\n * @param {DOMElement|string} element DOM element or target ID\n * @return {Array} Array with element's width and height\n * @sample Ink_Dom_Element_1_elementDimensions.html \n */\n elementDimensions: function(element) {\n element = Ink.i(element);\n return [element.offsetWidth, element.offsetHeight];\n },\n\n /**\n * Get the outer dimensions of an element in pixels.\n *\n * @method outerDimensions\n * @uses Ink.Dom.Css\n *\n * @param {DOMElement} element Target element\n * @return {Array} Array with element width and height.\n * @sample Ink_Dom_Element_1_outerDimensions.html \n */\n outerDimensions: function (element) {\n var bbox = rect(element);\n\n var Css = Ink.getModule('Ink.Dom.Css_1');\n var getStyle = Ink.bindMethod(Css, 'getStyle', element);\n\n return [\n bbox.right - bbox.left + parseFloat(getStyle('marginLeft') || 0) + parseFloat(getStyle('marginRight') || 0), // w\n bbox.bottom - bbox.top + parseFloat(getStyle('marginTop') || 0) + parseFloat(getStyle('marginBottom') || 0) // h\n ];\n },\n\n /**\n * Check if an element is inside the viewport\n *\n * @method inViewport\n * @param {DOMElement} element DOM Element\n * @param {Object} [options] Options object. If you pass a Boolean value here, it is interpreted as `options.partial`\n * @param {Boolean} [options.partial]=false Return `true` even if it is only partially visible.\n * @param {Number} [options.margin]=0 Consider a margin all around the viewport with `opts.margin` width a dead zone.\n * @return {Boolean}\n * @sample Ink_Dom_Element_1_inViewport.html \n */\n inViewport: function (element, opts) {\n var dims = rect(Ink.i(element));\n if (typeof opts === 'boolean') {\n opts = {partial: opts, margin: 0};\n }\n opts = Ink.extendObj({ partial: false, margin: 0}, opts || {});\n if (opts.partial) {\n return dims.bottom + opts.margin > 0 && // from the top\n dims.left - opts.margin < InkElement.viewportWidth() && // from the right\n dims.top - opts.margin < InkElement.viewportHeight() && // from the bottom\n dims.right + opts.margin > 0; // from the left\n } else {\n return dims.top + opts.margin > 0 && // from the top\n dims.right - opts.margin < InkElement.viewportWidth() && // from the right\n dims.bottom - opts.margin < InkElement.viewportHeight() && // from the bottom\n dims.left + opts.margin > 0; // from the left\n }\n },\n\n /**\n * Check if an element is hidden.\n * Taken from Mootools Element extras ( https://gist.github.com/cheeaun/73342 )\n * Does not take into account visibility:hidden\n * @method isHidden\n * @param {DOMElement} element Element to check\n * @return {Boolean}\n * @sample Ink_Dom_Element_1_isHidden.html \n */\n\n isHidden: function (element) {\n var w = element.offsetWidth, \n h = element.offsetHeight,\n force = (element.tagName.toLowerCase() === 'tr');\n\n var Css = Ink.getModule('Ink.Dom.Css_1');\n\n return (w===0 && h===0 && !force) ? true :\n (w!==0 && h!==0 && !force) ? false :\n Css.getStyle(element, 'display').toLowerCase() === 'none';\n },\n\n /**\n * Check if an element is visible \n *\n * @method isVisible\n * @uses isHidden\n * @param {DOMElement} element Element to check\n * @return {Boolean}\n * @sample Ink_Dom_Element_1_isVisible.html \n */\n\n isVisible: function (element) {\n return !this.isHidden(element);\n },\n\n /**\n * Clones an element's position to another\n *\n * @method clonePosition\n * @param {DOMElement} cloneTo element to be position cloned\n * @param {DOMElement} cloneFrom element to get the cloned position\n * @return {DOMElement} The element with positionClone\n * @sample Ink_Dom_Element_1_clonePosition.html \n */\n clonePosition: function(cloneTo, cloneFrom){\n var pos = InkElement.offset(cloneFrom);\n cloneTo.style.left = pos[0]+'px';\n cloneTo.style.top = pos[1]+'px';\n\n return cloneTo;\n },\n\n /**\n * Text-overflow: ellipsis emulation\n * Slices off a piece of text at the end of the element and adds the ellipsis so all text fits inside.\n *\n * @method ellipsizeText\n * @param {DOMElement} element Element to modify text content\n * @param {String} [ellipsis]='\\u2026' String to append to the chopped text\n */\n ellipsizeText: function(element/*, ellipsis*/){\n if ((element = Ink.i(element))) {\n element.style.overflow = 'hidden';\n element.style.whiteSpace = 'nowrap';\n element.style.textOverflow = 'ellipsis';\n }\n },\n\n /**\n * Finds the closest ancestor element matching your test function\n * \n *\n * @method findUpwardsHaving\n * @param {DOMElement} element Element to base the search from\n * @param {Function} boolTest Testing function\n * @return {DOMElement|false} The matched element or false if did not match\n * @sample Ink_Dom_Element_1_findUpwardsHaving.html \n */\n findUpwardsHaving: function(element, boolTest) {\n while (element && element.nodeType === 1) {\n if (boolTest(element)) {\n return element;\n }\n element = element.parentNode;\n }\n return false;\n },\n\n /**\n * Finds the closest ancestor by class name\n *\n * @method findUpwardsByClass\n * @uses findUpwardsHaving\n * @param {DOMElement} element Element to base the search from\n * @param {String} className Class name to search\n * @returns {DOMElement|false} The matched element or false if did not match\n * @sample Ink_Dom_Element_1_findUpwardsByClass.html \n */\n findUpwardsByClass: function(element, className) {\n var re = new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\");\n var tst = function(el) {\n var cls = el.className;\n return cls && re.test(cls);\n };\n return InkElement.findUpwardsHaving(element, tst);\n },\n\n /**\n * Finds the closest ancestor by tag name\n *\n * @method findUpwardsByTag\n * @param {DOMElement} element Element to base the search from\n * @param {String} tag Tag to search\n * @returns {DOMElement|false} the matched element or false if did not match\n * @sample Ink_Dom_Element_1_findUpwardsByTag.html \n */\n findUpwardsByTag: function(element, tag) {\n tag = tag.toUpperCase();\n var tst = function(el) {\n return el.nodeName && el.nodeName.toUpperCase() === tag;\n };\n return InkElement.findUpwardsHaving(element, tst);\n },\n\n /**\n * Finds the closest ancestor by id\n *\n * @method findUpwardsById\n * @param {HtmlElement} element Element to base the search from\n * @param {String} id ID to search\n * @returns {HtmlElement|false} The matched element or false if did not match\n * @sample Ink_Dom_Element_1_findUpwardsById.html \n */\n findUpwardsById: function(element, id) {\n var tst = function(el) {\n return el.id === id;\n };\n return InkElement.findUpwardsHaving(element, tst);\n },\n\n /**\n * Finds the closest ancestor by CSS selector\n *\n * @method findUpwardsBySelector\n * @param {HtmlElement} element Element to base the search from\n * @param {String} sel CSS selector\n * @returns {HtmlElement|false} The matched element or false if did not match\n * @sample Ink_Dom_Element_1_findUpwardsBySelector.html \n */\n findUpwardsBySelector: function(element, sel) {\n var Selector = Ink.getModule('Ink.Dom.Selector', '1');\n if (!Selector) {\n throw new Error('This method requires Ink.Dom.Selector');\n }\n var tst = function(el) {\n return Selector.matchesSelector(el, sel);\n };\n return InkElement.findUpwardsHaving(element, tst);\n },\n\n /**\n * Gets the trimmed text of an element\n *\n * @method getChildrenText\n * @param {DOMElement} el Element to base the search from\n * @param {Boolean} [removeIt] Flag to remove the text from the element\n * @return {String} Text found\n * @sample Ink_Dom_Element_1_getChildrenText.html \n */\n getChildrenText: function(el, removeIt) {\n var node,\n j,\n part,\n nodes = el.childNodes,\n jLen = nodes.length,\n text = '';\n\n if (!el) {\n return text;\n }\n\n for (j = 0; j < jLen; ++j) {\n node = nodes[j];\n if (!node) { continue; }\n if (node.nodeType === 3) { // TEXT NODE\n part = InkElement._trimString( String(node.data) );\n if (part.length > 0) {\n text += part;\n if (removeIt) { el.removeChild(node); }\n }\n else { el.removeChild(node); }\n }\n }\n\n return text;\n },\n\n /**\n * String trim implementation\n * Used by getChildrenText\n *\n * function _trimString\n * param {String} text\n * return {String} trimmed text\n */\n _trimString: function(text) {\n return (String.prototype.trim) ? text.trim() : text.replace(/^\\s*/, '').replace(/\\s*$/, '');\n },\n\n /**\n * Gets value of a select element\n *\n * @method getSelectValues\n * @param {DOMElement|String} select element\n * @return {Array} The selected values\n * @sample Ink_Dom_Element_1_getSelectValues.html \n */\n getSelectValues: function (select) {\n var selectEl = Ink.i(select);\n var values = [];\n for (var i = 0; i < selectEl.options.length; ++i) {\n values.push( selectEl.options[i].value );\n }\n return values;\n },\n\n\n /* used by fills */\n _normalizeData: function(data) {\n var d, data2 = [];\n for (var i = 0, f = data.length; i < f; ++i) {\n d = data[i];\n\n if (!(d instanceof Array)) { // if not array, wraps primitive twice: val -> [val, val]\n d = [d, d];\n }\n else if (d.length === 1) { // if 1 element array: [val] -> [val, val]\n d.push(d[0]);\n }\n data2.push(d);\n }\n return data2;\n },\n\n\n /**\n * Fills a select element with options\n *\n * @method fillSelect\n * @param {DOMElement|String} container Select element which will get filled\n * @param {Array} data Data to populate the component\n * @param {Boolean} [skipEmpty] Flag to skip empty option\n * @param {String|Number} [defaultValue] Initial selected value\n *\n * @sample Ink_Dom_Element_1_fillSelect.html \n */\n fillSelect: function(container, data, skipEmpty, defaultValue) {\n var containerEl = Ink.i(container);\n if (!containerEl) { return; }\n\n containerEl.innerHTML = '';\n var d, optionEl;\n\n if (!skipEmpty) {\n // add initial empty option\n optionEl = document.createElement('option');\n optionEl.setAttribute('value', '');\n containerEl.appendChild(optionEl);\n }\n\n data = InkElement._normalizeData(data);\n\n for (var i = 0, f = data.length; i < f; ++i) {\n d = data[i];\n\n optionEl = document.createElement('option');\n optionEl.setAttribute('value', d[0]);\n if (d.length > 2) {\n optionEl.setAttribute('extra', d[2]);\n }\n optionEl.appendChild( document.createTextNode(d[1]) );\n\n if (d[0] === defaultValue) {\n optionEl.setAttribute('selected', 'selected');\n }\n\n containerEl.appendChild(optionEl);\n }\n },\n\n\n /**\n * Creates a set of radio buttons from an array of data\n *\n * @method fillRadios\n * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created\n * @param {String} name Name for the form field ([] is added if not present as a suffix)\n * @param {Array} data Data to populate the component\n * @param {Boolean} [skipEmpty] Flag to skip creation of empty options\n * @param {String|Number} [defaultValue] Initial selected value\n * @param {String} [splitEl] Name of element to add after each input element (example: 'br')\n * @return {DOMElement} Wrapper element around the radio buttons\n */\n fillRadios: function(insertAfterEl, name, data, skipEmpty, defaultValue, splitEl) {\n insertAfterEl = Ink.i(insertAfterEl);\n var containerEl = document.createElement('span');\n InkElement.insertAfter(containerEl, insertAfterEl);\n\n data = InkElement._normalizeData(data);\n\n /*\n if (name.substring(name.length - 1) !== ']') {\n name += '[]';\n }\n */\n\n var d, inputEl;\n\n if (!skipEmpty) {\n // add initial empty option\n inputEl = document.createElement('input');\n inputEl.setAttribute('type', 'radio');\n inputEl.setAttribute('name', name);\n inputEl.setAttribute('value', '');\n containerEl.appendChild(inputEl);\n if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); }\n }\n\n for (var i = 0; i < data.length; ++i) {\n d = data[i];\n\n inputEl = document.createElement('input');\n inputEl.setAttribute('type', 'radio');\n inputEl.setAttribute('name', name);\n inputEl.setAttribute('value', d[0]);\n containerEl.appendChild(inputEl);\n containerEl.appendChild( document.createTextNode(d[1]) );\n if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); }\n\n if (d[0] === defaultValue) {\n inputEl.checked = true;\n }\n }\n\n return containerEl;\n },\n\n\n /**\n * Creates set of checkbox buttons\n *\n * @method fillChecks\n * @param {DOMElement|String} insertAfterEl Element after which the input elements will be created\n * @param {String} name Name for the form field ([] is added if not present as a suffix)\n * @param {Array} data Data to populate the component\n * @param {Boolean} [skipEmpty] Flag to skip creation of empty options\n * @param {String|Number} [defaultValue] Initial selected value\n * @param {String} [splitEl] Name of element to add after each input element (example: 'br')\n * @return {DOMElement} Wrapper element around the checkboxes\n */\n fillChecks: function(insertAfterEl, name, data, defaultValue, splitEl) {\n insertAfterEl = Ink.i(insertAfterEl);\n var containerEl = document.createElement('span');\n InkElement.insertAfter(containerEl, insertAfterEl);\n\n data = InkElement._normalizeData(data);\n\n if (name.substring(name.length - 1) !== ']') {\n name += '[]';\n }\n\n var d, inputEl;\n\n for (var i = 0; i < data.length; ++i) {\n d = data[i];\n\n inputEl = document.createElement('input');\n inputEl.setAttribute('type', 'checkbox');\n inputEl.setAttribute('name', name);\n inputEl.setAttribute('value', d[0]);\n containerEl.appendChild(inputEl);\n containerEl.appendChild( document.createTextNode(d[1]) );\n if (splitEl) { containerEl.appendChild( document.createElement(splitEl) ); }\n\n if (d[0] === defaultValue) {\n inputEl.checked = true;\n }\n }\n\n return containerEl;\n },\n\n\n /**\n * Gets the index of an element relative to a parent\n *\n * @method parentIndexOf\n * @param {DOMElement} parentEl Element to parse\n * @param {DOMElement} childEl Child Element to look for\n * @return {Number} The index of the childEl inside parentEl. Returns -1 if it's not a direct child\n * @sample Ink_Dom_Element_1_parentIndexOf.html \n */\n parentIndexOf: function(parentEl, childEl) {\n var node, idx = 0;\n for (var i = 0, f = parentEl.childNodes.length; i < f; ++i) {\n node = parentEl.childNodes[i];\n if (node.nodeType === 1) { // ELEMENT\n if (node === childEl) { return idx; }\n ++idx;\n }\n }\n return -1;\n },\n\n\n /**\n * Gets the next siblings of an element\n *\n * @method nextSiblings\n * @param {String|DOMElement} elm Element\n * @return {Array} Array of next sibling elements\n * @sample Ink_Dom_Element_1_nextSiblings.html \n */\n nextSiblings: function(elm) {\n elm = Ink.i(elm);\n if(typeof(elm) === 'object' && elm !== null && elm.nodeType && elm.nodeType === 1) {\n var elements = [],\n siblings = elm.parentNode.children,\n index = InkElement.parentIndexOf(elm.parentNode, elm);\n\n for(var i = ++index, len = siblings.length; i\" + html + \"
';\n return div.firstChild.firstChild.firstChild;\n }\n },\n\n /**\n * Gets a wrapper DIV with a certain HTML content to be inserted inside another element.\n * This is necessary for appendHTML,prependHTML functions, because they need a container element to copy the children from.\n *\n * Works around IE table quirks\n * @method _getWrapper\n * @private\n * @param elm\n * @param html\n */\n _getWrapper: function (elm, html) {\n var nodeName = elm.nodeName && elm.nodeName.toUpperCase();\n var wrapper = document.createElement('div');\n var wrapFunc = InkElement._wrapElements[nodeName];\n\n if ( !wrapFunc ) {\n wrapper.innerHTML = html;\n return wrapper;\n }\n // special cases\n wrapper = wrapFunc(wrapper, html);\n // worst case: tbody auto-creation even when our HTML has a tbody.\n if (browserCreatesTbodies && nodeName === 'TABLE') {\n // terrible case. Deal with tbody creation too.\n var tds = wrapper.getElementsByTagName('td');\n for (var i = 0, len = tds.length; i < len; i++) {\n if (tds[i].innerHTML === deleteThisTbodyToken) {\n var tbody = tds[i].parentNode.parentNode;\n tbody.parentNode.removeChild(tbody);\n }\n }\n }\n return wrapper;\n },\n\n /**\n * Appends HTML to an element.\n * This method parses the html string and doesn't modify its contents\n *\n * @method appendHTML\n * @param {String|DOMElement} elm Element\n * @param {String} html Markup string\n * @sample Ink_Dom_Element_1_appendHTML.html \n */\n appendHTML: function(elm, html){\n elm = Ink.i(elm);\n if(elm !== null) {\n var wrapper = InkElement._getWrapper(elm, html);\n while (wrapper.firstChild) {\n elm.appendChild(wrapper.firstChild);\n }\n }\n },\n\n /**\n * Prepends HTML to an element.\n * This method parses the html string and doesn't modify its contents\n *\n * @method prependHTML\n * @param {String|DOMElement} elm Element\n * @param {String} html Markup string\n * @sample Ink_Dom_Element_1_prependHTML.html \n */\n prependHTML: function(elm, html){\n elm = Ink.i(elm);\n if(elm !== null) {\n var wrapper = InkElement._getWrapper(elm, html);\n while (wrapper.lastChild) {\n elm.insertBefore(wrapper.lastChild, elm.firstChild);\n }\n }\n },\n\n /**\n * Sets the inner HTML of an element.\n *\n * @method setHTML\n * @param {String|DOMElement} elm Element\n * @param {String} html Markup string\n * @sample Ink_Dom_Element_1_setHTML.html \n */\n setHTML: function (elm, html) {\n elm = Ink.i(elm);\n if(elm !== null) {\n try {\n elm.innerHTML = html;\n } catch (e) {\n // Tables in IE7\n while (elm.firstChild) {\n elm.removeChild(elm.firstChild);\n }\n InkElement.appendHTML(elm, html);\n }\n }\n },\n\n /**\n * Wraps an element inside a container.\n *\n * The container may or may not be in the document yet.\n *\n * @method wrap\n * @param {String|DOMElement} target Element to be wrapped\n * @param {String|DOMElement} container Element to wrap the target\n * @return Container element\n * @sample Ink_Dom_Element_1_wrap.html \n *\n * @example\n * before:\n *\n * \n *\n * call this function to wrap #target with a wrapper div.\n *\n * InkElement.wrap('target', InkElement.create('div', {id: 'container'});\n * \n * after: \n *\n *
\n */\n wrap: function (target, container) {\n target = Ink.i(target);\n container = Ink.i(container);\n \n var nextNode = target.nextSibling;\n var parent = target.parentNode;\n\n container.appendChild(target);\n\n if (nextNode !== null) {\n parent.insertBefore(container, nextNode);\n } else {\n parent.appendChild(container);\n }\n\n return container;\n },\n\n /**\n * Places an element outside a wrapper.\n *\n * @method unwrap\n * @param {DOMElement} elem The element you're trying to unwrap. This should be an ancestor of the wrapper.\n * @param {String} [wrapperSelector] CSS Selector for the ancestor. Use this if your wrapper is not the direct parent of elem.\n * @sample Ink_Dom_Element_1_unwrap.html \n *\n * @example\n *\n * When you have this:\n *\n *
\n * \n *
\n *\n * If you do this:\n *\n * InkElement.unwrap('unwrapMe');\n *\n * You get this:\n *\n * \n * \n * \n **/\n unwrap: function (elem, wrapperSelector) {\n elem = Ink.i(elem);\n var wrapper;\n if (typeof wrapperSelector === 'string') {\n wrapper = InkElement.findUpwardsBySelector(elem, wrapperSelector);\n } else if (typeof wrapperSelector === 'object' && wrapperSelector.tagName) {\n wrapper = InkElement.findUpwardsHaving(elem, function (ancestor) {\n return ancestor === wrapperSelector;\n });\n } else {\n wrapper = elem.parentNode;\n }\n if (!wrapper || !wrapper.parentNode) { return; }\n\n InkElement.insertBefore(elem, wrapper);\n },\n\n /**\n * Replaces an element with another.\n *\n * @method replace\n * @param element The element to be replaced.\n * @param replacement The new element.\n * @sample Ink_Dom_Element_1_replace.html \n *\n * @example\n * var newelement1 = InkElement.create('div');\n * // ...\n * replace(Ink.i('element1'), newelement1);\n */\n replace: function (element, replacement) {\n element = Ink.i(element);\n if(element !== null) {\n element.parentNode.replaceChild(replacement, element);\n }\n },\n\n /**\n * Removes direct text children.\n * Useful to remove nasty layout gaps generated by whitespace on the markup.\n *\n * @method removeTextNodeChildren\n * @param {DOMElement} el Element to remove text from\n * @sample Ink_Dom_Element_1_removeTextNodeChildren.html \n */\n removeTextNodeChildren: function(el) {\n el = Ink.i(el);\n if(el !== null) {\n var prevEl, toRemove, parent = el;\n el = el.firstChild;\n while (el) {\n toRemove = (el.nodeType === 3);\n prevEl = el;\n el = el.nextSibling;\n if (toRemove) {\n parent.removeChild(prevEl);\n }\n }\n }\n },\n\n /**\n * Creates a documentFragment from an HTML string.\n *\n * @method htmlToFragment\n * @param {String} html HTML string\n * @return {DocumentFragment} DocumentFragment containing all of the elements from the html string\n * @sample Ink_Dom_Element_1_htmlToFragment.html \n */\n htmlToFragment: (createContextualFragmentSupport ?\n function(html){\n var range;\n\n if(typeof html !== 'string'){ return document.createDocumentFragment(); }\n\n range = document.createRange();\n\n // set the context to document.body (firefox does this already, webkit doesn't)\n range.selectNode(document.body);\n\n return range.createContextualFragment(html);\n } : function (html) {\n var fragment = document.createDocumentFragment(),\n tempElement,\n current;\n\n if(typeof html !== 'string'){ return fragment; }\n\n tempElement = document.createElement('div');\n tempElement.innerHTML = html;\n\n // append child removes elements from the original parent\n while( (current = tempElement.firstChild) ){ // intentional assignment\n fragment.appendChild(current);\n }\n\n return fragment;\n }),\n\n _camelCase: function(str)\n {\n return str ? str.replace(/-(\\w)/g, function (_, $1){\n return $1.toUpperCase();\n }) : str;\n },\n\n /**\n * Gets data attributes from an element\n *\n * @method data\n * @param {String|DOMElement} selector Element or CSS selector\n * @return {Object} Object with the data-* properties. If no data-attributes are present, an empty object is returned.\n * @sample Ink_Dom_Element_1_data.html \n */\n data: function(selector) {\n var el;\n if (typeof selector !== 'object' && typeof selector !== 'string') {\n throw '[Ink.Dom.Element.data] :: Invalid selector defined';\n }\n\n if (typeof selector === 'object') {\n el = selector;\n }\n else {\n var InkDomSelector = Ink.getModule('Ink.Dom.Selector', 1);\n if (!InkDomSelector) {\n throw \"[Ink.Dom.Element.data] :: this method requires Ink.Dom.Selector - v1\";\n }\n el = InkDomSelector.select(selector);\n if (el.length <= 0) {\n throw \"[Ink.Dom.Element.data] :: Can't find any element with the specified selector\";\n }\n el = el[0];\n }\n\n var dataset = {};\n var attrs = el.attributes || [];\n\n var curAttr, curAttrName, curAttrValue;\n if (attrs) {\n for (var i = 0, total = attrs.length; i < total; ++i) {\n curAttr = attrs[i];\n curAttrName = curAttr.name;\n curAttrValue = curAttr.value;\n if (curAttrName && curAttrName.indexOf('data-') === 0) {\n dataset[InkElement._camelCase(curAttrName.replace('data-', ''))] = curAttrValue;\n }\n }\n }\n\n return dataset;\n },\n\n /**\n * Move the cursor on an input or textarea element.\n * @method moveCursorTo\n * @param {DOMElement} el Input or Textarea element\n * @param {Number} t Index of the character to move the cursor to\n * @sample Ink_Dom_Element_1_moveCursorTo.html \n */\n moveCursorTo: function(el, t) {\n el = Ink.i(el);\n if(el !== null) {\n if (el.setSelectionRange) {\n el.setSelectionRange(t, t);\n //el.focus();\n }\n else {\n var range = el.createTextRange();\n range.collapse(true);\n range.moveEnd( 'character', t);\n range.moveStart('character', t);\n range.select();\n }\n }\n },\n\n /**\n * Get the page's width.\n * @method pageWidth\n * @return {Number} Page width in pixels\n * @sample Ink_Dom_Element_1_pageWidth.html \n */\n pageWidth: function() {\n var xScroll;\n\n if (window.innerWidth && window.scrollMaxX) {\n xScroll = window.innerWidth + window.scrollMaxX;\n } else if (document.body.scrollWidth > document.body.offsetWidth){\n xScroll = document.body.scrollWidth;\n } else {\n xScroll = document.body.offsetWidth;\n }\n\n var windowWidth;\n\n if (window.self.innerWidth) {\n if(document.documentElement.clientWidth){\n windowWidth = document.documentElement.clientWidth;\n } else {\n windowWidth = window.self.innerWidth;\n }\n } else if (document.documentElement && document.documentElement.clientWidth) {\n windowWidth = document.documentElement.clientWidth;\n } else if (document.body) {\n windowWidth = document.body.clientWidth;\n }\n\n if(xScroll < windowWidth){\n return xScroll;\n } else {\n return windowWidth;\n }\n },\n\n /**\n * Get the page's height.\n * @method pageHeight\n * @return {Number} Page height in pixels\n * @sample Ink_Dom_Element_1_pageHeight.html \n */\n pageHeight: function() {\n var yScroll;\n\n if (window.innerHeight && window.scrollMaxY) {\n yScroll = window.innerHeight + window.scrollMaxY;\n } else if (document.body.scrollHeight > document.body.offsetHeight){\n yScroll = document.body.scrollHeight;\n } else {\n yScroll = document.body.offsetHeight;\n }\n\n var windowHeight;\n\n if (window.self.innerHeight) {\n windowHeight = window.self.innerHeight;\n } else if (document.documentElement && document.documentElement.clientHeight) {\n windowHeight = document.documentElement.clientHeight;\n } else if (document.body) {\n windowHeight = document.body.clientHeight;\n }\n\n if(yScroll < windowHeight){\n return windowHeight;\n } else {\n return yScroll;\n }\n },\n\n /**\n * Get the viewport's width.\n * @method viewportWidth\n * @return {Number} Viewport width in pixels\n * @sample Ink_Dom_Element_1_viewportWidth.html \n */\n viewportWidth: function() {\n if(typeof window.innerWidth !== \"undefined\") {\n return window.innerWidth;\n }\n if (document.documentElement && typeof document.documentElement.offsetWidth !== \"undefined\") {\n return document.documentElement.offsetWidth;\n }\n },\n\n /**\n * Get the viewport's height.\n * @method viewportHeight\n * @return {Number} Viewport height in pixels\n * @sample Ink_Dom_Element_1_viewportHeight.html \n */\n viewportHeight: function() {\n if (typeof window.innerHeight !== \"undefined\") {\n return window.innerHeight;\n }\n if (document.documentElement && typeof document.documentElement.offsetHeight !== \"undefined\") {\n return document.documentElement.offsetHeight;\n }\n },\n\n /**\n * Get the scroll's width.\n * @method scrollWidth\n * @return {Number} Scroll width\n */\n scrollWidth: function() {\n if (typeof window.self.pageXOffset !== 'undefined') {\n return window.self.pageXOffset;\n }\n if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollLeft !== 'undefined') {\n return document.documentElement.scrollLeft;\n }\n return document.body.scrollLeft;\n },\n\n /**\n * Get the scroll's height.\n * @method scrollHeight\n * @return {Number} Scroll height\n */\n scrollHeight: function() {\n if (typeof window.self.pageYOffset !== 'undefined') {\n return window.self.pageYOffset;\n }\n if (typeof document.documentElement !== 'undefined' && typeof document.documentElement.scrollTop !== 'undefined') {\n return document.documentElement.scrollTop;\n }\n return document.body.scrollTop;\n }\n };\n\n return InkElement;\n\n});\n","/**\n * Event management\n * @module Ink.Dom.Event_1\n * @version 1\n */\n\nInk.createModule('Ink.Dom.Event', 1, [], function() {\n /* jshint\n asi:true,\n strict:false,\n laxcomma:true,\n eqeqeq:false,\n laxbreak:true,\n boss:true,\n curly:false,\n expr:true\n */\n\n /**\n * @namespace Ink.Dom.Event_1\n * @static\n */\n\n /*!\n * Bean - copyright (c) Jacob Thornton 2011-2012\n * https://github.com/fat/bean\n * MIT license\n */\n var bean = (function (name, context, definition) {\n return definition()\n })('bean', this, function (name, context) {\n name = name || 'bean'\n context = context || this\n\n var win = window\n , old = context[name]\n , namespaceRegex = /[^\\.]*(?=\\..*)\\.|.*/\n , nameRegex = /\\..*/\n , addEvent = 'addEventListener'\n , removeEvent = 'removeEventListener'\n , doc = document || {}\n , root = doc.documentElement || {}\n , W3C_MODEL = root[addEvent]\n , eventSupport = W3C_MODEL ? addEvent : 'attachEvent'\n , ONE = {} // singleton for quick matching making add() do one()\n\n , slice = Array.prototype.slice\n , str2arr = function (s, d) { return s.split(d || ' ') }\n , isString = function (o) { return typeof o == 'string' }\n , isFunction = function (o) { return typeof o == 'function' }\n\n // events that we consider to be 'native', anything not in this list will\n // be treated as a custom event\n , standardNativeEvents =\n 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons\n 'mousewheel mousemultiwheel DOMMouseScroll ' + // mouse wheel\n 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement\n 'keydown keypress keyup ' + // keyboard\n 'orientationchange ' + // mobile\n 'focus blur change reset select submit ' + // form elements\n 'load unload beforeunload resize move DOMContentLoaded ' + // window\n 'readystatechange message ' + // window\n 'error abort scroll ' // misc\n // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event\n // that doesn't actually exist, so make sure we only do these on newer browsers\n , w3cNativeEvents =\n 'show ' + // mouse buttons\n 'input invalid ' + // form elements\n 'touchstart touchmove touchend touchcancel ' + // touch\n 'gesturestart gesturechange gestureend ' + // gesture\n 'textinput' + // TextEvent\n 'readystatechange pageshow pagehide popstate ' + // window\n 'hashchange offline online ' + // window\n 'afterprint beforeprint ' + // printing\n 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd\n 'loadstart progress suspend emptied stalled loadmetadata ' + // media\n 'loadeddata canplay canplaythrough playing waiting seeking ' + // media\n 'seeked ended durationchange timeupdate play pause ratechange ' + // media\n 'volumechange cuechange ' + // media\n 'checking noupdate downloading cached updateready obsolete ' // appcache\n\n // convert to a hash for quick lookups\n , nativeEvents = (function (hash, events, i) {\n for (i = 0; i < events.length; i++) events[i] && (hash[events[i]] = 1)\n return hash\n }({}, str2arr(standardNativeEvents + (W3C_MODEL ? w3cNativeEvents : ''))))\n\n // custom events are events that we *fake*, they are not provided natively but\n // we can use native events to generate them\n , customEvents = (function () {\n var isAncestor = 'compareDocumentPosition' in root\n ? function (element, container) {\n return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16\n }\n : 'contains' in root\n ? function (element, container) {\n container = container.nodeType === 9 || container === window ? root : container\n return container !== element && container.contains(element)\n }\n : function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , check = function (event) {\n var related = event.relatedTarget\n return !related\n ? related == null\n : (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString())\n && !isAncestor(related, this))\n }\n\n return {\n mouseenter: { base: 'mouseover', condition: check }\n , mouseleave: { base: 'mouseout', condition: check }\n , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' }\n }\n }())\n\n // we provide a consistent Event object across browsers by taking the actual DOM\n // event object and generating a new one from its properties.\n , Event = (function () {\n // a whitelist of properties (for different event types) tells us what to check for and copy\n var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' +\n 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' +\n 'srcElement target timeStamp type view which propertyName')\n , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' +\n 'fromElement offsetX offsetY pageX pageY screenX screenY toElement'))\n , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' +\n 'axis')) // 'axis' is FF specific\n , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' +\n 'keyLocation location'))\n , textProps = commonProps.concat(str2arr('data'))\n , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation'))\n , messageProps = commonProps.concat(str2arr('data origin source'))\n , stateProps = commonProps.concat(str2arr('state'))\n , overOutRegex = /over|out/\n // some event types need special handling and some need special properties, do that all here\n , typeFixers = [\n { // key events\n reg: /key/i\n , fix: function (event, newEvent) {\n newEvent.keyCode = event.keyCode || event.which\n return keyProps\n }\n }\n , { // mouse events\n reg: /click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i\n , fix: function (event, newEvent, type) {\n newEvent.rightClick = event.which === 3 || event.button === 2\n newEvent.pos = { x: 0, y: 0 }\n if (event.pageX || event.pageY) {\n newEvent.clientX = event.pageX\n newEvent.clientY = event.pageY\n } else if (event.clientX || event.clientY) {\n newEvent.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft\n newEvent.clientY = event.clientY + doc.body.scrollTop + root.scrollTop\n }\n if (overOutRegex.test(type)) {\n newEvent.relatedTarget = event.relatedTarget\n || event[(type == 'mouseover' ? 'from' : 'to') + 'Element']\n }\n return mouseProps\n }\n }\n , { // mouse wheel events\n reg: /mouse.*(wheel|scroll)/i\n , fix: function () { return mouseWheelProps }\n }\n , { // TextEvent\n reg: /^text/i\n , fix: function () { return textProps }\n }\n , { // touch and gesture events\n reg: /^touch|^gesture/i\n , fix: function () { return touchProps }\n }\n , { // message events\n reg: /^message$/i\n , fix: function () { return messageProps }\n }\n , { // popstate events\n reg: /^popstate$/i\n , fix: function () { return stateProps }\n }\n , { // everything else\n reg: /.*/\n , fix: function () { return commonProps }\n }\n ]\n , typeFixerMap = {} // used to map event types to fixer functions (above), a basic cache mechanism\n\n , Event = function (event, element, isNative) {\n if (!arguments.length) return\n event = event || ((element.ownerDocument || element.document || element).parentWindow || win).event\n this.originalEvent = event\n this.isNative = isNative\n this.isBean = true\n\n if (!event) return\n\n var type = event.type\n , target = event.target || event.srcElement\n , i, l, p, props, fixer\n\n this.target = target && target.nodeType === 3 ? target.parentNode : target\n\n if (isNative) { // we only need basic augmentation on custom events, the rest expensive & pointless\n fixer = typeFixerMap[type]\n if (!fixer) { // haven't encountered this event type before, map a fixer function for it\n for (i = 0, l = typeFixers.length; i < l; i++) {\n if (typeFixers[i].reg.test(type)) { // guaranteed to match at least one, last is .*\n typeFixerMap[type] = fixer = typeFixers[i].fix\n break\n }\n }\n }\n\n props = fixer(event, this, type)\n for (i = props.length; i--;) {\n if (!((p = props[i]) in this) && p in event) this[p] = event[p]\n }\n }\n }\n\n // preventDefault() and stopPropagation() are a consistent interface to those functions\n // on the DOM, stop() is an alias for both of them together\n Event.prototype.preventDefault = function () {\n if (this.originalEvent.preventDefault) this.originalEvent.preventDefault()\n else this.originalEvent.returnValue = false\n }\n Event.prototype.stopPropagation = function () {\n if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation()\n else this.originalEvent.cancelBubble = true\n }\n Event.prototype.stop = function () {\n this.preventDefault()\n this.stopPropagation()\n this.stopped = true\n }\n // stopImmediatePropagation() has to be handled internally because we manage the event list for\n // each element\n // note that originalElement may be a Bean#Event object in some situations\n Event.prototype.stopImmediatePropagation = function () {\n if (this.originalEvent.stopImmediatePropagation) this.originalEvent.stopImmediatePropagation()\n this.isImmediatePropagationStopped = function () { return true }\n }\n Event.prototype.isImmediatePropagationStopped = function () {\n return this.originalEvent.isImmediatePropagationStopped && this.originalEvent.isImmediatePropagationStopped()\n }\n Event.prototype.clone = function (currentTarget) {\n //TODO: this is ripe for optimisation, new events are *expensive*\n // improving this will speed up delegated events\n var ne = new Event(this, this.element, this.isNative)\n ne.currentTarget = currentTarget\n return ne\n }\n\n return Event\n }())\n\n // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both\n , targetElement = function (element, isNative) {\n return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element\n }\n\n /**\n * Bean maintains an internal registry for event listeners. We don't touch elements, objects\n * or functions to identify them, instead we store everything in the registry.\n * Each event listener has a RegEntry object, we have one 'registry' for the whole instance.\n */\n , RegEntry = (function () {\n // each handler is wrapped so we can handle delegation and custom events\n var wrappedHandler = function (element, fn, condition, args) {\n var call = function (event, eargs) {\n return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs)\n }\n , findTarget = function (event, eventElement) {\n return fn.__beanDel ? fn.__beanDel.ft(event.target, element) : eventElement\n }\n , handler = condition\n ? function (event) {\n var target = findTarget(event, this) // deleated event\n if (condition.apply(target, arguments)) {\n if (event) event.currentTarget = target\n return call(event, arguments)\n }\n }\n : function (event) {\n if (fn.__beanDel) event = event.clone(findTarget(event)) // delegated event, fix the fix\n return call(event, arguments)\n }\n handler.__beanDel = fn.__beanDel\n return handler\n }\n\n , RegEntry = function (element, type, handler, original, namespaces, args, root) {\n var customType = customEvents[type]\n , isNative\n\n if (type == 'unload') {\n // self clean-up\n handler = once(removeListener, element, type, handler, original)\n }\n\n if (customType) {\n if (customType.condition) {\n handler = wrappedHandler(element, handler, customType.condition, args)\n }\n type = customType.base || type\n }\n\n this.isNative = isNative = nativeEvents[type] && !!element[eventSupport]\n this.customType = !W3C_MODEL && !isNative && type\n this.element = element\n this.type = type\n this.original = original\n this.namespaces = namespaces\n this.eventType = W3C_MODEL || isNative ? type : 'propertychange'\n this.target = targetElement(element, isNative)\n this[eventSupport] = !!this.target[eventSupport]\n this.root = root\n this.handler = wrappedHandler(element, handler, null, args)\n }\n\n // given a list of namespaces, is our entry in any of them?\n RegEntry.prototype.inNamespaces = function (checkNamespaces) {\n var i, j, c = 0\n if (!checkNamespaces) return true\n if (!this.namespaces) return false\n for (i = checkNamespaces.length; i--;) {\n for (j = this.namespaces.length; j--;) {\n if (checkNamespaces[i] == this.namespaces[j]) c++\n }\n }\n return checkNamespaces.length === c\n }\n\n // match by element, original fn (opt), handler fn (opt)\n RegEntry.prototype.matches = function (checkElement, checkOriginal, checkHandler) {\n return this.element === checkElement &&\n (!checkOriginal || this.original === checkOriginal) &&\n (!checkHandler || this.handler === checkHandler)\n }\n\n return RegEntry\n }())\n\n , registry = (function () {\n // our map stores arrays by event type, just because it's better than storing\n // everything in a single array.\n // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for\n // rootListeners so we can look them up fast\n var map = {}\n\n // generic functional search of our registry for matching listeners,\n // `fn` returns false to break out of the loop\n , forAll = function (element, type, original, handler, root, fn) {\n var pfx = root ? 'r' : '$'\n if (!type || type == '*') {\n // search the whole registry\n for (var t in map) {\n if (t.charAt(0) == pfx) {\n forAll(element, t.substr(1), original, handler, root, fn)\n }\n }\n } else {\n var i = 0, l, list = map[pfx + type], all = element == '*'\n if (!list) return\n for (l = list.length; i < l; i++) {\n if ((all || list[i].matches(element, original, handler)) && !fn(list[i], list, i, type)) return\n }\n }\n }\n\n , has = function (element, type, original, root) {\n // we're not using forAll here simply because it's a bit slower and this\n // needs to be fast\n var i, list = map[(root ? 'r' : '$') + type]\n if (list) {\n for (i = list.length; i--;) {\n if (!list[i].root && list[i].matches(element, original, null)) return true\n }\n }\n return false\n }\n\n , get = function (element, type, original, root) {\n var entries = []\n forAll(element, type, original, null, root, function (entry) {\n return entries.push(entry)\n })\n return entries\n }\n\n , put = function (entry) {\n var has = !entry.root && !this.has(entry.element, entry.type, null, false)\n , key = (entry.root ? 'r' : '$') + entry.type\n ;(map[key] || (map[key] = [])).push(entry)\n return has\n }\n\n , del = function (entry) {\n forAll(entry.element, entry.type, null, entry.handler, entry.root, function (entry, list, i) {\n list.splice(i, 1)\n entry.removed = true\n if (list.length === 0) delete map[(entry.root ? 'r' : '$') + entry.type]\n return false\n })\n }\n\n // dump all entries, used for onunload\n , entries = function () {\n var t, entries = []\n for (t in map) {\n if (t.charAt(0) == '$') entries = entries.concat(map[t])\n }\n return entries\n }\n\n return { has: has, get: get, put: put, del: del, entries: entries }\n }())\n\n // we need a selector engine for delegated events, use querySelectorAll if it exists\n // but for older browsers we need Qwery, Sizzle or similar\n , selectorEngine\n , setSelectorEngine = function (e) {\n if (!arguments.length) {\n selectorEngine = doc.querySelectorAll\n ? function (s, r) {\n return r.querySelectorAll(s)\n }\n : function () {\n throw new Error('Bean: No selector engine installed') // eeek\n }\n } else {\n selectorEngine = e\n }\n }\n\n // we attach this listener to each DOM event that we need to listen to, only once\n // per event type per DOM element\n , rootListener = function (event, type) {\n if (!W3C_MODEL && type && event && event.propertyName != '_on' + type) return\n\n var listeners = registry.get(this, type || event.type, null, false)\n , l = listeners.length\n , i = 0\n\n event = new Event(event, this, true)\n if (type) event.type = type\n\n // iterate through all handlers registered for this type, calling them unless they have\n // been removed by a previous handler or stopImmediatePropagation() has been called\n for (; i < l && !event.isImmediatePropagationStopped(); i++) {\n if (!listeners[i].removed) listeners[i].handler.call(this, event)\n }\n }\n\n // add and remove listeners to DOM elements\n , listener = W3C_MODEL\n ? function (element, type, add) {\n // new browsers\n element[add ? addEvent : removeEvent](type, rootListener, false)\n }\n : function (element, type, add, custom) {\n // IE8 and below, use attachEvent/detachEvent and we have to piggy-back propertychange events\n // to simulate event bubbling etc.\n var entry\n if (add) {\n registry.put(entry = new RegEntry(\n element\n , custom || type\n , function (event) { // handler\n rootListener.call(element, event, custom)\n }\n , rootListener\n , null\n , null\n , true // is root\n ))\n if (custom && element['_on' + custom] == null) element['_on' + custom] = 0\n entry.target.attachEvent('on' + entry.eventType, entry.handler)\n } else {\n entry = registry.get(element, custom || type, rootListener, true)[0]\n if (entry) {\n entry.target.detachEvent('on' + entry.eventType, entry.handler)\n registry.del(entry)\n }\n }\n }\n\n , once = function (rm, element, type, fn, originalFn) {\n // wrap the handler in a handler that does a remove as well\n return function () {\n fn.apply(this, arguments)\n rm(element, type, originalFn)\n }\n }\n\n , removeListener = function (element, orgType, handler, namespaces) {\n var type = orgType && orgType.replace(nameRegex, '')\n , handlers = registry.get(element, type, null, false)\n , removed = {}\n , i, l\n\n for (i = 0, l = handlers.length; i < l; i++) {\n if ((!handler || handlers[i].original === handler) && handlers[i].inNamespaces(namespaces)) {\n // TODO: this is problematic, we have a registry.get() and registry.del() that\n // both do registry searches so we waste cycles doing this. Needs to be rolled into\n // a single registry.forAll(fn) that removes while finding, but the catch is that\n // we'll be splicing the arrays that we're iterating over. Needs extra tests to\n // make sure we don't screw it up. @rvagg\n registry.del(handlers[i])\n if (!removed[handlers[i].eventType] && handlers[i][eventSupport])\n removed[handlers[i].eventType] = { t: handlers[i].eventType, c: handlers[i].type }\n }\n }\n // check each type/element for removed listeners and remove the rootListener where it's no longer needed\n for (i in removed) {\n if (!registry.has(element, removed[i].t, null, false)) {\n // last listener of this type, remove the rootListener\n listener(element, removed[i].t, false, removed[i].c)\n }\n }\n }\n\n // set up a delegate helper using the given selector, wrap the handler function\n , delegate = function (selector, fn) {\n //TODO: findTarget (therefore $) is called twice, once for match and once for\n // setting e.currentTarget, fix this so it's only needed once\n var findTarget = function (target, root) {\n var i, array = isString(selector) ? selectorEngine(selector, root) : selector\n for (; target && target !== root; target = target.parentNode) {\n for (i = array.length; i--;) {\n if (array[i] === target) return target\n }\n }\n }\n , handler = function (e) {\n var match = findTarget(e.target, this)\n if (match) fn.apply(match, arguments)\n }\n\n // __beanDel isn't pleasant but it's a private function, not exposed outside of Bean\n handler.__beanDel = {\n ft : findTarget // attach it here for customEvents to use too\n , selector : selector\n }\n return handler\n }\n\n , fireListener = W3C_MODEL ? function (isNative, type, element) {\n // modern browsers, do a proper dispatchEvent()\n var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents')\n evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1)\n element.dispatchEvent(evt)\n } : function (isNative, type, element) {\n // old browser use onpropertychange, just increment a custom property to trigger the event\n element = targetElement(element, isNative)\n isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++\n }\n\n /**\n * Public API: off(), on(), add(), (remove()), one(), fire(), clone()\n */\n\n /**\n * off(element[, eventType(s)[, handler ]])\n */\n , off = function (element, typeSpec, fn) {\n var isTypeStr = isString(typeSpec)\n , k, type, namespaces, i\n\n if (isTypeStr && typeSpec.indexOf(' ') > 0) {\n // off(el, 't1 t2 t3', fn) or off(el, 't1 t2 t3')\n typeSpec = str2arr(typeSpec)\n for (i = typeSpec.length; i--;)\n off(element, typeSpec[i], fn)\n return element\n }\n\n type = isTypeStr && typeSpec.replace(nameRegex, '')\n if (type && customEvents[type]) type = customEvents[type].base\n\n if (!typeSpec || isTypeStr) {\n // off(el) or off(el, t1.ns) or off(el, .ns) or off(el, .ns1.ns2.ns3)\n if (namespaces = isTypeStr && typeSpec.replace(namespaceRegex, '')) namespaces = str2arr(namespaces, '.')\n removeListener(element, type, fn, namespaces)\n } else if (isFunction(typeSpec)) {\n // off(el, fn)\n removeListener(element, null, typeSpec)\n } else {\n // off(el, { t1: fn1, t2, fn2 })\n for (k in typeSpec) {\n if (typeSpec.hasOwnProperty(k)) off(element, k, typeSpec[k])\n }\n }\n\n return element\n }\n\n /**\n * on(element, eventType(s)[, selector], handler[, args ])\n */\n , on = function(element, events, selector, fn) {\n var originalFn, type, types, i, args, entry, first\n\n //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps?\n if (selector === undefined && typeof events == 'object') {\n //TODO: this can't handle delegated events\n for (type in events) {\n if (events.hasOwnProperty(type)) {\n on.call(this, element, type, events[type])\n }\n }\n return\n }\n\n if (!isFunction(selector)) {\n // delegated event\n originalFn = fn\n args = slice.call(arguments, 4)\n fn = delegate(selector, originalFn, selectorEngine)\n } else {\n args = slice.call(arguments, 3)\n fn = originalFn = selector\n }\n\n types = str2arr(events)\n\n // special case for one(), wrap in a self-removing handler\n if (this === ONE) {\n fn = once(off, element, events, fn, originalFn)\n }\n\n for (i = types.length; i--;) {\n // add new handler to the registry and check if it's the first for this element/type\n first = registry.put(entry = new RegEntry(\n element\n , types[i].replace(nameRegex, '') // event type\n , fn\n , originalFn\n , str2arr(types[i].replace(namespaceRegex, ''), '.') // namespaces\n , args\n , false // not root\n ))\n if (entry[eventSupport] && first) {\n // first event of this type on this element, add root listener\n listener(element, entry.eventType, true, entry.customType)\n }\n }\n\n return element\n }\n\n /**\n * add(element[, selector], eventType(s), handler[, args ])\n *\n * Deprecated: kept (for now) for backward-compatibility\n */\n , add = function (element, events, fn, delfn) {\n return on.apply(\n null\n , !isString(fn)\n ? slice.call(arguments)\n : [ element, fn, events, delfn ].concat(arguments.length > 3 ? slice.call(arguments, 5) : [])\n )\n }\n\n /**\n * one(element, eventType(s)[, selector], handler[, args ])\n */\n , one = function () {\n return on.apply(ONE, arguments)\n }\n\n /**\n * fire(element, eventType(s)[, args ])\n *\n * The optional 'args' argument must be an array, if no 'args' argument is provided\n * then we can use the browser's DOM event system, otherwise we trigger handlers manually\n */\n , fire = function (element, type, args) {\n var types = str2arr(type)\n , i, j, l, names, handlers\n\n for (i = types.length; i--;) {\n type = types[i].replace(nameRegex, '')\n if (names = types[i].replace(namespaceRegex, '')) names = str2arr(names, '.')\n if (!names && !args && element[eventSupport]) {\n fireListener(nativeEvents[type], type, element)\n } else {\n // non-native event, either because of a namespace, arguments or a non DOM element\n // iterate over all listeners and manually 'fire'\n handlers = registry.get(element, type, null, false)\n args = [false].concat(args)\n for (j = 0, l = handlers.length; j < l; j++) {\n if (handlers[j].inNamespaces(names)) {\n handlers[j].handler.apply(element, args)\n }\n }\n }\n }\n return element\n }\n\n /**\n * clone(dstElement, srcElement[, eventType ])\n *\n * TODO: perhaps for consistency we should allow the same flexibility in type specifiers?\n */\n , clone = function (element, from, type) {\n var handlers = registry.get(from, type, null, false)\n , l = handlers.length\n , i = 0\n , args, beanDel\n\n for (; i < l; i++) {\n if (handlers[i].original) {\n args = [ element, handlers[i].type ]\n if (beanDel = handlers[i].handler.__beanDel) args.push(beanDel.selector)\n args.push(handlers[i].original)\n on.apply(null, args)\n }\n }\n return element\n }\n\n , bean = {\n 'on' : on\n , 'add' : add\n , 'one' : one\n , 'off' : off\n , 'remove' : off\n , 'clone' : clone\n , 'fire' : fire\n , 'Event' : Event\n , 'setSelectorEngine' : setSelectorEngine\n , 'noConflict' : function () {\n context[name] = old\n return this\n }\n }\n\n // for IE, clean up on unload to avoid leaks\n if (win.attachEvent) {\n var cleanup = function () {\n var i, entries = registry.entries()\n for (i in entries) {\n if (entries[i].type && entries[i].type !== 'unload') off(entries[i].element, entries[i].type)\n }\n win.detachEvent('onunload', cleanup)\n win.CollectGarbage && win.CollectGarbage()\n }\n win.attachEvent('onunload', cleanup)\n }\n\n // initialize selector engine to internal default (qSA or throw Error)\n setSelectorEngine(Ink.ss)\n\n return bean\n });\n\n /**\n * Keep this declaration here and off Bean as it extends the Event\n * object and some properties are readonly in strict mode\n */\n 'use strict';\n\n var InkEvent = {\n\n KEY_BACKSPACE: 8,\n KEY_TAB: 9,\n KEY_RETURN: 13,\n KEY_ESC: 27,\n KEY_SPACE: 32,\n KEY_LEFT: 37,\n KEY_UP: 38,\n KEY_RIGHT: 39,\n KEY_DOWN: 40,\n KEY_DELETE: 46,\n KEY_HOME: 36,\n KEY_END: 35,\n KEY_PAGEUP: 33,\n KEY_PAGEDOWN: 34,\n KEY_INSERT: 45,\n \n /**\n * Creates a debounced version of a function.\n * Returns a function which calls `func`, waiting at least `wait` milliseconds between calls. This is useful for events such as `scroll` or `resize`, which can be triggered too many times per second, slowing down the browser with needless function calls.\n *\n * *note:* This does not delay the first function call to the function.\n *\n * @method throttle\n * @param {Function} func Function to call. Arguments and context are both passed.\n * @param {Number} [wait]=0 Milliseconds to wait between calls.\n * @sample Ink_Dom_Event_1_throttle.html \n **/\n throttle: function (func, wait) {\n wait = wait || 0;\n var lastCall = 0; // Warning: This breaks on Jan 1st 1970 0:00\n var timeout;\n var throttled = function () {\n var now = +new Date();\n var timeDiff = now - lastCall;\n if (timeDiff >= wait) {\n lastCall = now;\n return func.apply(this, [].slice.call(arguments));\n } else {\n var that = this;\n var args = [].slice.call(arguments);\n if (!timeout) {\n timeout = setTimeout(function () {\n timeout = null;\n return throttled.apply(that, args);\n }, wait - timeDiff);\n }\n }\n };\n return throttled;\n },\n\n /**\n * Gets the event's target element.\n *\n * @method element\n * @param {Object} ev Event object\n * @return {DOMNode} The target\n * @sample Ink_Dom_Event_1_element.html \n */\n element: function(ev) {\n var node = ev.delegationTarget ||\n ev.target ||\n // IE stuff\n (ev.type === 'mouseout' && ev.fromElement) ||\n (ev.type === 'mouseleave' && ev.fromElement) ||\n (ev.type === 'mouseover' && ev.toElement) ||\n (ev.type === 'mouseenter' && ev.toElement) ||\n ev.srcElement ||\n null;\n return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node;\n },\n\n /**\n * Gets the event's related target element.\n *\n * @method relatedTarget\n * @param {Object} ev event object\n * @return {DOMNode} The related target\n * @sample Ink_Dom_Event_1_relatedTarget.html \n */\n relatedTarget: function(ev){\n var node = ev.relatedTarget ||\n // IE stuff\n (ev.type === 'mouseout' && ev.toElement) ||\n (ev.type === 'mouseleave' && ev.toElement) ||\n (ev.type === 'mouseover' && ev.fromElement) ||\n (ev.type === 'mouseenter' && ev.fromElement) ||\n null;\n return node && (node.nodeType === 3 || node.nodeType === 4) ? node.parentNode : node;\n },\n\n /**\n * Find closest ancestor element by tag name related to the event target.\n * Navigate up the DOM tree, looking for a tag with the name `elmTagName`.\n *\n * If such tag is not found, `document` is returned.\n *\n * @method findElement\n * @param {Object} ev Event object\n * @param {String} elmTagName Tag name to find\n * @param {Boolean} [force]=false Flag to skip returning `document` and to return `false` instead.\n * @return {DOMElement} the first element which matches given tag name or the document element if the wanted tag is not found\n * @sample Ink_Dom_Event_1_findElement.html \n */\n findElement: function(ev, elmTagName, force)\n {\n var node = this.element(ev);\n while(true) {\n if(node.nodeName.toLowerCase() === elmTagName.toLowerCase()) {\n return node;\n } else {\n node = node.parentNode;\n if(!node) {\n if(force) {\n return false;\n }\n return document;\n }\n if(!node.parentNode){\n if(force){ return false; }\n return document;\n }\n }\n }\n },\n\n /**\n * Attaches an event to element\n *\n * @method observe\n * @param {DOMElement|String} element Element id or element\n * @param {String} eventName Event name\n * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event.\n * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture.\n * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later.\n * @sample Ink_Dom_Event_1_observe.html \n */\n observe: function(element, eventName, callBack, useCapture) {\n element = Ink.i(element);\n if(element) {\n if(element.addEventListener) {\n element.addEventListener(eventName, callBack, !!useCapture);\n } else {\n element.attachEvent('on' + eventName, (callBack = Ink.bind(callBack, element)));\n }\n return callBack;\n }\n },\n\n /**\n * Like observe, but listen to the event only once.\n *\n * @method observeOnce\n * @param {DOMElement|String} element Element id or element\n * @param {String} eventName Event name\n * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event.\n * @param {Boolean} [useCapture] Flag to change event listening from bubbling to capture.\n * @return {Function} The event handler used. Hang on to this if you want to `stopObserving` later.\n * @sample Ink_Dom_Event_1_observeOnce.html \n */\n observeOnce: function (element, eventName, callBack, useCapture) {\n var onceBack = function () {\n InkEvent.stopObserving(element, eventName, onceBack);\n return callBack();\n };\n return InkEvent.observe(element, eventName, onceBack, useCapture);\n },\n\n /**\n * Attaches an event to a selector or array of elements.\n *\n * @method observeMulti\n * @param {Array|String} elements \n * @param {String} eventName Event name\n * @param {Function} callBack Receives the event object as a parameter. If you're manually firing custom events, check it's eventName property to make sure you're handling the right event.\n * @param {Boolean} [useCapture] Flag change event listening from bubbling to capture.\n * @return {Function} The used callback.\n * @sample Ink_Dom_Event_1_observeMulti.html \n */\n observeMulti: function (elements, eventName, callBack, useCapture) {\n if (typeof elements === 'string') {\n elements = Ink.ss(elements);\n } else if ( /* is an element */ elements && elements.nodeType === 1) {\n elements = [elements];\n }\n if (!elements[0]) { return false; }\n\n for (var i = 0, len = elements.length; i < len; i++) {\n this.observe(elements[i], eventName, callBack, useCapture);\n }\n return callBack;\n },\n\n /**\n * Observes an event on an element and its descendants matching the selector.\n *\n * Requires Ink.Dom.Selector if you need to use a selector.\n *\n * @method observeDelegated\n * @param {DOMElement|String} element Element to observe.\n * @param {String} eventName Event name to observe.\n * @param {String} selector Child element selector. When null, finds any element.\n * @param {Function} callback Callback to be called when the event is fired\n * @return {Function} The used callback, for ceasing to listen to the event later.\n * @sample Ink_Dom_Event_1_observeDelegated.html \n **/\n observeDelegated: function (element, eventName, selector, callback) {\n return InkEvent.observe(element, eventName, function (event) {\n var fromElement = InkEvent.element(event);\n if (!fromElement || fromElement === element) { return; }\n\n var cursor = fromElement;\n\n // Go up the document tree until we hit the element itself.\n while (cursor !== element && cursor !== document && cursor) {\n if (Ink.Dom.Selector_1.matchesSelector(cursor, selector)) {\n event.delegationTarget = cursor;\n return callback(event);\n }\n cursor = cursor.parentNode;\n }\n });\n },\n\n /**\n * Removes an event attached to an element.\n *\n * @method stopObserving\n * @param {DOMElement|String} element Element id or element\n * @param {String} eventName Event name\n * @param {Function} callBack Callback function\n * @param {Boolean} [useCapture] Set to true if the event was being observed with useCapture set to true as well.\n * @sample Ink_Dom_Event_1_stopObserving.html \n */\n stopObserving: function(element, eventName, callBack, useCapture) {\n element = Ink.i(element);\n\n if(element) {\n if(element.removeEventListener) {\n element.removeEventListener(eventName, callBack, !!useCapture);\n } else {\n element.detachEvent('on' + eventName, callBack);\n }\n }\n },\n\n /**\n * Stops event propagation and bubbling.\n *\n * @method stop\n * @param {Object} event Event handle\n * @sample Ink_Dom_Event_1_stop.html \n */\n stop: function(event)\n {\n if(event.cancelBubble !== null) {\n event.cancelBubble = true;\n }\n if(event.stopPropagation) {\n event.stopPropagation();\n }\n if(event.preventDefault) {\n event.preventDefault();\n }\n if(window.attachEvent) {\n event.returnValue = false;\n }\n if(event.cancel !== null) {\n event.cancel = true;\n }\n },\n\n /**\n * Stops event propagation.\n *\n * @method stopPropagation\n * @param {Object} event Event handle\n * @sample Ink_Dom_Event_1_stopPropagation.html \n */\n stopPropagation: function(event) {\n if(event.cancelBubble !== null) {\n event.cancelBubble = true;\n }\n if(event.stopPropagation) {\n event.stopPropagation();\n }\n },\n\n /**\n * Stops event default behaviour.\n *\n * @method stopDefault\n * @param {Object} event Event handle\n * @sample Ink_Dom_Event_1_stopDefault.html \n */\n stopDefault: function(event)\n {\n if(event.preventDefault) {\n event.preventDefault();\n }\n if(window.attachEvent) {\n event.returnValue = false;\n }\n if(event.cancel !== null) {\n event.cancel = true;\n }\n },\n\n /**\n * Gets the pointer's coordinates from the event object.\n *\n * @method pointer\n * @param {Object} ev Event object\n * @return {Object} An object with the mouse X and Y position\n * @sample Ink_Dom_Event_1_pointer.html \n */\n pointer: function(ev)\n {\n return {\n x: this.pointerX(ev),\n y: this.pointerY(ev)\n };\n },\n\n /**\n * Gets the pointer's X coordinate.\n *\n * @method pointerX\n * @param {Object} ev Event object\n * @return {Number} Mouse X position\n */\n pointerX: function(ev)\n {\n return (ev.touches && ev.touches[0] && ev.touches[0].clientX) ||\n (ev.pageX) ||\n (ev.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft));\n },\n\n /**\n * Gets the pointer's Y coordinate.\n *\n * @method pointerY\n * @param {Object} ev Event object\n * @return {Number} Mouse Y position\n */\n pointerY: function(ev)\n {\n return (ev.touches && ev.touches[0] && ev.touches[0].clientY) ||\n (ev.pageY) ||\n (ev.clientY + (document.documentElement.scrollTop || document.body.scrollTop));\n },\n\n /**\n * Checks if an event is a left click.\n *\n * @method isLeftClick\n * @param {Object} ev Event object\n * @return {Boolean} True if the event is a left click\n * @sample Ink_Dom_Event_1_isLeftClick.html \n */\n isLeftClick: function(ev) {\n if (window.addEventListener) {\n if(ev.button === 0){\n return true;\n } else if(ev.type === 'touchend' && ev.button === null){\n // [todo] do the above check for pointerEvents too\n return true;\n }\n }\n else {\n if(ev.button === 1){ return true; }\n }\n return false;\n },\n\n /**\n * Checks if an event is a right click.\n *\n * @method isRightClick\n * @param {Object} ev Event object\n * @return {Boolean} True if the event is a right click\n * @sample Ink_Dom_Event_1_isRightClick.html \n */\n isRightClick: function(ev) {\n return (ev.button === 2);\n },\n\n /**\n * Checks if an event is a middle click.\n *\n * @method isMiddleClick\n * @param {Object} ev Event object\n * @return {Boolean} True if the event is a middle click\n * @sample Ink_Dom_Event_1_isMiddleClick.html \n */\n isMiddleClick: function(ev) {\n if (window.addEventListener) {\n return (ev.button === 1);\n }\n else {\n return (ev.button === 4);\n }\n return false;\n },\n\n /**\n * Gets character from an event.\n *\n * @method getCharFromKeyboardEvent\n * @param {Object} event Keyboard event\n * @param {Boolean} [changeCasing] If true uppercases, if false lowercases, otherwise keeps casing\n * @return {String} Character representation of pressed key combination\n * @sample Ink_Dom_Event_1_getCharFromKeyboardEvent.html \n */\n getCharFromKeyboardEvent: function(event, changeCasing) {\n var k = event.keyCode;\n var c = String.fromCharCode(k);\n\n var shiftOn = event.shiftKey;\n if (k >= 65 && k <= 90) { // A-Z\n if (typeof changeCasing === 'boolean') {\n shiftOn = changeCasing;\n }\n return (shiftOn) ? c : c.toLowerCase();\n }\n else if (k >= 96 && k <= 105) { // numpad digits\n return String.fromCharCode( 48 + (k-96) );\n }\n switch (k) {\n case 109: case 189: return '-';\n case 107: case 187: return '+';\n }\n return c;\n },\n\n debug: function(){}\n};\n\n/**\n * Lets you attach event listeners to both elements and objects.\n * http://github.com/fat/bean#on\n *\n * @method on\n * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object\n * @param {String} eventType An Event (or multiple events, space separated) to listen to\n * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector\n * @param {Function} [handler] The callback function\n * @param {Object} [args...] Additional arguments to pass to the callback function when triggered\n * \n * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object\n * @sample Ink_Dom_Event_1_on.html \n */\n\n/**\n * Alias for `on` but will only be executed once.\n * bean.one() is an alias for bean.on() except that the handler will only be executed once and then removed for the event type(s).\n * http://github.com/fat/bean#one\n *\n * @method one\n * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object\n * @param {String} eventType An Event (or multiple events, space separated) to listen to\n * @param {String} [selector] A CSS DOM Element selector string to bind the listener to child elements matching the selector\n * @param {Function} [handler] The callback function\n * @param [args...] Additional arguments to pass to the callback function when triggered\n * \n * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object\n * @sample Ink_Dom_Event_1_one.html \n */\n\n/**\n * Removes event handlers.\n * bean.off() is how you get rid of handlers once you no longer want them active. It's also a good idea to call off on elements before you remove them from your DOM; this gives Bean a chance to clean up some things and prevents memory leaks.\n * http://github.com/fat/bean#off\n *\n * @method off\n * @param {DOMElement|Object} element An HTML DOM element or any JavaScript Object\n * @param {String} eventType An Event (or multiple events, space separated) to remove\n * @param {Function} [handler] The specific callback function to remove\n * \n * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object\n * @sample Ink_Dom_Event_1_off.html \n */\n\n/**\n * Clones events from one object to another\n * bean.clone() is a method for cloning events from one DOM element or object to another.\n * http://github.com/fat/bean#clone\n *\n * @method clone\n * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object to copy events to\n * @param {String} srcElement An HTML DOM element or any JavaScript Object to copy events from\n * @param {String} [eventType] An Event (or multiple events, space separated) to clone\n * \n * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object\n * @sample Ink_Dom_Event_1_clone.html \n */\n\n/**\n * Triggers events.\n * http://github.com/fat/bean#fire\n *\n * @method fire\n * @param {DOMElement|Object} destElement An HTML DOM element or any JavaScript Object fire the event on\n * @param {String} eventType An Event (or multiple events, space separated) to fire\n * @param [args...] Additional arguments to pass to the callback function when triggered\n *\n * @return {DOMElement|Object} Returns the original DOM Element or Javascript Object\n * @sample Ink_Dom_Event_1_fire.html \n */\n\nreturn Ink.extendObj(InkEvent, bean);\n\n});\n","/**\n * @module Ink.Dom.FormSerialize_1\n * Two way serialization of form data and javascript objects.\n * Valid applications are ad hoc AJAX/syndicated submission of forms, restoring form values from server side state, etc.\n */\n\nInk.createModule('Ink.Dom.FormSerialize', 1, ['Ink.Util.Array_1', 'Ink.Dom.Element_1', 'Ink.Dom.Selector_1'], function (InkArray, InkElement, Selector) {\n 'use strict';\n\n // Check whether something is not a string or a DOM element, but still has length.\n function isArrayIsh(obj) {\n return obj != null &&\n (!InkElement.isDOMElement(obj)) &&\n (InkArray.isArray(obj) || (typeof obj !== 'string' && typeof obj.length === 'number'));\n }\n\n function toArray(obj) {\n if (isArrayIsh(obj)) { return obj; }\n else { return [obj]; }\n }\n\n /**\n * @namespace Ink.Dom.FormSerialize\n * @static\n **/\n var FormSerialize = {\n\n /**\n * Serializes a form element into a JS object\n * It turns field names into keys and field values into values.\n *\n * note: Multi-select and checkboxes with multiple values will result in arrays\n *\n * @method serialize\n * @param {DOMElement|String} form Form element to extract data\n * @return {Object} Map of fieldName -> String|String[]|Boolean\n * @sample Ink_Dom_FormSerialize_serialize.html \n */\n serialize: function(form) {\n var out = {};\n var emptyArrayToken = {}; // A hack so that empty select[multiple] elements appear although empty.\n\n var pairs = this.asPairs(form, { elements: true, emptyArray: emptyArrayToken });\n if (pairs == null) { return pairs; }\n InkArray.forEach(pairs, function (pair) {\n var name = pair[0].replace(/\\[\\]$/, '');\n var value = pair[1];\n var el = pair[2];\n\n if (value === emptyArrayToken) {\n out[name] = []; // It's an empty select[multiple]\n } else if (!(FormSerialize._resultsInArray(el) || /\\[\\]$/.test(pair[0]))) {\n out[name] = value;\n } else {\n out[name] = out[name] || [];\n out[name].push(value);\n }\n });\n\n return out;\n },\n\n /**\n * Like `serialize`, but returns an array of [fieldName, value] pairs.\n *\n * @method asPairs\n * @param {DOMElement|String} form Form element\n * @param {Object} [options] Options object, containing:\n * @param {Boolean} [options.elements] Instead of returning an array of [fieldName, value] pairs, return an array of [fieldName, value, fieldElement] triples.\n * @param {Boolean} [options.emptyArray] What to emit as the value of an empty select[multiple]. If you don't pass this option, nothing comes out.\n *\n * @return Array of [fieldName, value] pairs.\n **/\n asPairs: function (form, options) {\n var out = [];\n options = options || {};\n\n function emit(name, val, el) {\n if (options.elements) {\n out.push([name, val, el]);\n } else {\n out.push([name, val]);\n }\n }\n\n function serializeEl(el) {\n if (el.nodeName.toLowerCase() === 'select' && el.multiple) {\n var didEmit = false;\n InkArray.forEach(Selector.select('option:checked', el), function (thisOption) {\n emit(el.name, thisOption.value, el);\n didEmit = true;\n });\n if (!didEmit && 'emptyArray' in options) {\n emit(el.name, options.emptyArray, el);\n }\n } else {\n emit(el.name, el.value, el);\n }\n }\n\n if ((form = Ink.i(form))) {\n var inputs = InkArray.filter(form.elements, FormSerialize._isSerialized);\n for (var i = 0, len = inputs.length; i < len; i++) {\n serializeEl(inputs[i]);\n }\n return out;\n }\n\n return null;\n },\n\n /**\n * Sets form elements' values with values from an object\n *\n * Note: You can't set the values of an input with `type=\"file\"` (browser prohibits it)\n *\n * @method fillIn \n * @param {DOMElement|String} form Form element to be populated\n * @param {Object|Array} map2 mapping of fields to values contained in fields. Can be a hash (keys as names, strings or arrays for values), or an array of [name, value] pairs.\n * @sample Ink_Dom_FormSerialize_fillIn.html \n */\n fillIn: function(form, map2) {\n if (!(form = Ink.i(form))) { return null; }\n\n var pairs;\n\n if (typeof map2 === 'object' && !isArrayIsh(map2)) {\n pairs = FormSerialize._objToPairs(map2);\n } else if (isArrayIsh(map2)) {\n pairs = map2;\n } else {\n return null;\n }\n\n return FormSerialize._fillInPairs(form, pairs);\n },\n\n _objToPairs: function (obj) {\n var pairs = [];\n var val;\n for (var name in obj) if (obj.hasOwnProperty(name)) {\n val = toArray(obj[name]);\n for (var i = 0, len = val.length; i < len; i++) {\n pairs.push([name, val[i]]);\n }\n if (len === 0) {\n pairs.push([name, []]);\n }\n }\n return pairs;\n },\n\n _fillInPairs: function (form, pairs) {\n pairs = InkArray.groupBy(pairs, {\n key: function (pair) { return pair[0].replace(/\\[\\]$/, ''); }\n });\n\n // For each chunk...\n pairs = InkArray.map(pairs, function (pair) {\n // Join the items in the chunk by concatenating the values together and leaving the names alone\n var values = InkArray.reduce(pair, function (left, right) {\n return [null, left[1].concat([right[1]])];\n }, [null, []])[1];\n return [pair[0][0], values];\n });\n\n var name;\n var inputs;\n var values;\n for (var i = 0, len = pairs.length; i < len; i++) {\n name = pairs[i][0];\n\n if (name in form) {\n inputs = form[name];\n } else if ((name + '[]') in form) {\n inputs = form[name + '[]'];\n name = name + '[]';\n } else {\n continue;\n }\n\n inputs = toArray(inputs);\n values = pairs[i][1];\n\n FormSerialize._fillInOne(name, inputs, values);\n }\n },\n\n _fillInOne: function (name, inputs, values) {\n var firstOne = inputs[0];\n var firstNodeName = firstOne.nodeName.toLowerCase();\n var firstType = firstOne.getAttribute('type');\n firstType = firstType && firstType.toLowerCase();\n var isSelectMulti = firstNodeName === 'select' && InkElement.hasAttribute(firstOne, 'multiple');\n\n if (firstType === 'checkbox' || firstType === 'radio') {\n FormSerialize._fillInBoolean(inputs, values, 'checked');\n } else if (isSelectMulti) {\n FormSerialize._fillInBoolean(inputs[0].options, values, 'selected');\n } else {\n if (inputs.length !== values.length) {\n Ink.warn('Form had ' + inputs.length + ' inputs named \"' + name + '\", but received ' + values.length + ' values.');\n }\n\n for (var i = 0, len = Math.min(inputs.length, values.length); i < len; i += 1) {\n inputs[i].value = values[i];\n }\n }\n },\n\n _fillInBoolean: function (inputs, values, checkAttr /* 'selected' or 'checked' */) {\n InkArray.forEach(inputs, function (input) {\n var isChecked = InkArray.inArray(input.value, values);\n input[checkAttr] = isChecked;\n });\n },\n\n /**\n * Whether FormSerialize.serialize() should produce an array when looking at this element.\n * @method _resultsInArray\n * @private\n * @param element\n **/\n _resultsInArray: function (element) {\n var type = element.getAttribute('type');\n var nodeName = element.nodeName.toLowerCase();\n\n return type === 'checkbox' ||\n (nodeName === 'select' && InkElement.hasAttribute(element, 'multiple'));\n },\n\n _isSerialized: function (element) {\n if (!InkElement.isDOMElement(element)) { return false; }\n if (!InkElement.hasAttribute(element, 'name')) { return false; }\n\n var nodeName = element.nodeName.toLowerCase();\n\n if (!nodeName || nodeName === 'fieldset') { return false; }\n\n if (element.type === 'checkbox' || element.type === 'radio') {\n return !!element.checked;\n }\n\n return true;\n }\n };\n\n return FormSerialize;\n});\n","/**\n * Execute code only when the DOM is loaded.\n * @module Ink.Dom.Loaded_1\n * @version 1\n */\n \nInk.createModule('Ink.Dom.Loaded', 1, [], function() {\n\n 'use strict';\n\n /**\n * @namespace Ink.Dom.Loaded_1\n **/\n var Loaded = {\n\n /**\n * Callbacks and their contexts. Array of 2-arrays.\n *\n * []\n *\n * @attribute _contexts Array\n * @private\n * \n */\n _contexts: [], // Callbacks' queue\n\n /**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @method run\n * @param {Object} [win]=window Window object to attach/add the event\n * @param {Function} fn Callback function to be executed after the DOM is ready\n * @public\n * @sample Ink_Dom_Loaded_run.html \n */\n run: function(win, fn) {\n if (!fn) {\n fn = win;\n win = window;\n }\n\n var context;\n\n for (var i = 0, len = this._contexts.length; i < len; i++) {\n if (this._contexts[i][0] === win) {\n context = this._contexts[i][1];\n break;\n }\n }\n if (!context) {\n context = {\n cbQueue: [],\n win: win,\n doc: win.document,\n root: win.document.documentElement,\n done: false,\n top: true\n };\n context.handlers = {\n checkState: Ink.bindEvent(this._checkState, this, context),\n poll: Ink.bind(this._poll, this, context)\n };\n this._contexts.push(\n [win, context] // Javascript Objects cannot map different windows to\n // different values.\n );\n }\n\n var ael = context.doc.addEventListener;\n context.add = ael ? 'addEventListener' : 'attachEvent';\n context.rem = ael ? 'removeEventListener' : 'detachEvent';\n context.pre = ael ? '' : 'on';\n context.det = ael ? 'DOMContentLoaded' : 'onreadystatechange';\n context.wet = context.pre + 'load';\n\n var csf = context.handlers.checkState;\n var alreadyLoaded = (\n /complete|interactive|loaded/.test(context.doc.readyState) &&\n context.win.location.toString() !== 'about:blank'); // https://code.google.com/p/chromium/issues/detail?id=32357\n\n if (alreadyLoaded){\n setTimeout(Ink.bind(function () {\n fn.call(context.win, 'lazy');\n }, this), 0);\n } else {\n context.cbQueue.push(fn);\n\n context.doc[context.add]( context.det , csf );\n context.win[context.add]( context.wet , csf );\n\n var frameElement = 1;\n try{\n frameElement = context.win.frameElement;\n } catch(e) {}\n if ( !ael && context.root && context.root.doScroll ) { // IE HACK\n try {\n context.top = !frameElement;\n } catch(e) { }\n if (context.top) {\n this._poll(context);\n }\n }\n }\n },\n\n /**\n * Function that will be running the callbacks after the page is loaded\n *\n * @method _checkState\n * @param {Event} event Triggered event\n * @private\n */\n _checkState: function(event, context) {\n if ( !event || (event.type === 'readystatechange' && context.doc.readyState !== 'complete')) {\n return;\n }\n var where = (event.type === 'load') ? context.win : context.doc;\n where[context.rem](context.pre+event.type, context.handlers.checkState, false);\n this._ready(context);\n },\n\n /**\n * Polls the load progress of the page to see if it has already loaded or not\n *\n * @method _poll\n * @private\n */\n\n /**\n *\n * function _poll\n */\n _poll: function(context) {\n try {\n context.root.doScroll('left');\n } catch(e) {\n return setTimeout(context.handlers.poll, 50);\n }\n this._ready(context);\n },\n\n /**\n * Function that runs the callbacks from the queue when the document is ready.\n *\n * @method _ready\n * @private\n */\n _ready: function(context) {\n if (!context.done) {\n context.done = true;\n for (var i = 0; i < context.cbQueue.length; ++i) {\n context.cbQueue[i].call(context.win);\n }\n context.cbQueue = [];\n }\n }\n };\n\n return Loaded;\n\n});\n","/**\n * CSS selector engine\n * @module Ink.Dom.Selector_1\n * @version 1\n */\n \nInk.createModule('Ink.Dom.Selector', 1, [], function() {\n /*jshint forin:false, eqnull:true, noempty:false, expr:true, boss:true, maxdepth:false*/\n\t'use strict';\n\n/*!\n * Sizzle CSS Selector Engine\n * Copyright 2013 jQuery Foundation and other contributors\n * Released under the MIT license\n * http://sizzlejs.com/\n */\n\nvar i,\n\tcachedruns,\n\tExpr,\n\tgetText,\n\tisXML,\n\tcompile,\n\toutermostContext,\n\trecompare,\n\tsortInput,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + -(new Date()),\n\tpreferredDoc = window.document,\n\tsupport = {},\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\thasDuplicate = false,\n\tsortOrder = function() { return 0; },\n\n\t// General-purpose constants\n\tstrundefined = typeof undefined,\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Array methods\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf if we can't use a native one\n\tindexOf = arr.indexOf || function( elem ) {\n\t\tvar i = 0,\n\t\t\tlen = this.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( this[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\n\t// Regular expressions\n\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\t// http://www.w3.org/TR/css3-syntax/#characters\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Loosely modeled on CSS identifier characters\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\n\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\n\toperators = \"([*^$|!~]?=)\",\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\n\t\t\"*(?:\" + operators + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\n\n\t// Prefer arguments quoted,\n\t// then not containing pseudos/brackets,\n\t// then attribute selectors/non-parenthetical expressions,\n\t// then anything else\n\t// These preferences are here to reduce the number of selectors\n\t// needing tokenize in the PSEUDO preFilter\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\" + whitespace + \"*\" ),\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\n\t\t\"NAME\": new RegExp( \"^\\\\[name=['\\\"]?(\" + characterEncoding + \")['\\\"]?\\\\]\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trsibling = /[\\x20\\t\\r\\n\\f]*[+~]/,\n\n\trnative = /^[^{]+\\{\\s*\\[native code/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trescape = /'|\\\\/g,\n\trattributeQuotes = /\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = /\\\\([\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|.)/g,\n\tfunescape = function( _, escaped ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\treturn high !== high ?\n\t\t\tescaped :\n\t\t\t// BMP codepoint\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\n/*\n * For feature detection\n * @param {Function} fn The function to test for native support\n */\nfunction isNative( fn ) {\n\treturn rnative.test( fn + \"\" );\n}\n\n/*\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar cache,\n\t\tkeys = [];\n\n\treturn (cache = function( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key ] = value);\n\t});\n}\n\n/*\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/*\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar match, elem, m, nodeType,\n\t\t// QSA vars\n\t\ti, groups, old, nid, newContext, newSelector;\n\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\n\tcontext = context || document;\n\tresults = results || [];\n\n\tif ( !selector || typeof selector !== \"string\" ) {\n\t\treturn results;\n\t}\n\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\n\t\treturn [];\n\t}\n\n\tif ( documentIsHTML && !seed ) {\n\n\t\t// Shortcuts\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\n\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\tif ( (m = match[1]) ) {\n\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\telem = context.getElementById( m );\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Context is not a document\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\n\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t} else if ( match[2] ) {\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\treturn results;\n\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\treturn results;\n\t\t\t}\n\t\t}\n\n\t\t// QSA path\n\t\tif ( support.qsa && !rbuggyQSA.test(selector) ) {\n\t\t\told = true;\n\t\t\tnid = expando;\n\t\t\tnewContext = context;\n\t\t\tnewSelector = nodeType === 9 && selector;\n\n\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t// IE 8 doesn't work on object elements\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\tgroups = tokenize( selector );\n\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\n\t\t\t\t} else {\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t}\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\n\n\t\t\t\ti = groups.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\n\t\t\t\t}\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\n\t\t\t\tnewSelector = groups.join(\",\");\n\t\t\t}\n\n\t\t\tif ( newSelector ) {\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch(qsaError) {\n\t\t\t\t} finally {\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/*\n * Detect xml\n * @param {Element|Object} elem An element or a document\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/*\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar doc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// If no document and documentElement is available, return\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Set our document\n\tdocument = doc;\n\tdocElem = doc.documentElement;\n\n\t// Support tests\n\tdocumentIsHTML = !isXML( doc );\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( doc.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Check if attributes should be retrieved by attribute nodes\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.innerHTML = \"\";\n\t\tvar type = typeof div.lastChild.getAttribute(\"multiple\");\n\t\t// IE8 returns a string for some attributes even when not present\n\t\treturn type !== \"boolean\" && type !== \"string\";\n\t});\n\n\t// Check if getElementsByClassName can be trusted\n\tsupport.getElementsByClassName = assert(function( div ) {\n\t\t// Opera can't find a second classname (in 9.6)\n\t\tdiv.innerHTML = \"\";\n\t\tif ( !div.getElementsByClassName || !div.getElementsByClassName(\"e\").length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Safari 3.2 caches class attributes and doesn't catch changes\n\t\tdiv.lastChild.className = \"e\";\n\t\treturn div.getElementsByClassName(\"e\").length === 2;\n\t});\n\n\t// Check if getElementsByName privileges form controls or returns elements by ID\n\t// If so, assume (for broader support) that getElementById returns elements by name\n\tsupport.getByName = assert(function( div ) {\n\t\t// Inject content\n\t\tdiv.id = expando + 0;\n\t\t// Support: Windows 8 Native Apps\n\t\t// Assigning innerHTML with \"name\" attributes throws uncatchable exceptions\n\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx\n\t\tdiv.appendChild( document.createElement(\"a\") ).setAttribute( \"name\", expando );\n\t\tdiv.appendChild( document.createElement(\"i\") ).setAttribute( \"name\", expando );\n\t\tdocElem.appendChild( div );\n\n\t\t// Test\n\t\tvar pass = doc.getElementsByName &&\n\t\t\t// buggy browsers will return fewer than the correct 2\n\t\t\tdoc.getElementsByName( expando ).length === 2 +\n\t\t\t// buggy browsers will return more than the correct 0\n\t\t\tdoc.getElementsByName( expando + 0 ).length;\n\n\t\t// Cleanup\n\t\tdocElem.removeChild( div );\n\n\t\treturn pass;\n\t});\n\n\t// Support: Webkit<537.32\n\t// Detached nodes confoundingly follow *each other*\n\tsupport.sortDetached = assert(function( div1 ) {\n\t\treturn div1.compareDocumentPosition &&\n\t\t\t// Should return 1, but Webkit returns 4 (following)\n\t\t\t(div1.compareDocumentPosition( document.createElement(\"div\") ) & 1);\n\t});\n\n\t// IE6/7 return modified attributes\n\tExpr.attrHandle = assert(function( div ) {\n\t\tdiv.innerHTML = \"\";\n\t\treturn div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&\n\t\t\tdiv.firstChild.getAttribute(\"href\") === \"#\";\n\t}) ?\n\t\t{} :\n\t\t{\n\t\t\t\"href\": function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"href\", 2 );\n\t\t\t},\n\t\t\t\"type\": function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"type\");\n\t\t\t}\n\t\t};\n\n\t// ID find and filter\n\tif ( support.getByName ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== strundefined && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [m] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== strundefined && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\n\t\t\t\treturn m ?\n\t\t\t\t\tm.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode(\"id\").value === id ?\n\t\t\t\t\t\t[m] :\n\t\t\t\t\t\tundefined :\n\t\t\t\t\t[];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\t\t\t}\n\t\t} :\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Name\n\tExpr.find[\"NAME\"] = support.getByName && function( tag, context ) {\n\t\tif ( typeof context.getElementsByName !== strundefined ) {\n\t\t\treturn context.getElementsByName( name );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21),\n\t// no need to also add to buggyMatches since matches checks buggyQSA\n\t// A support test would require too much code (would include document ready)\n\trbuggyQSA = [ \":focus\" ];\n\n\tif ( (support.qsa = isNative(doc.querySelectorAll)) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdiv.innerHTML = \"\";\n\n\t\t\t// IE8 - Some boolean attributes are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\n\t\t\t// Opera 10-12/IE8 - ^= $= *= and empty values\n\t\t\t// Should not select anything\n\t\t\tdiv.innerHTML = \"\";\n\t\t\tif ( div.querySelectorAll(\"[i^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:\\\"\\\"|'')\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t// Element contains another\n\t// Purposefully does not implement inclusive descendent\n\t// As in, an element does not contain itself\n\tcontains = isNative(docElem.contains) || docElem.compareDocumentPosition ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t// Document order sorting\n\tsortOrder = docElem.compareDocumentPosition ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );\n\n\t\tif ( compare ) {\n\t\t\t// Disconnected nodes\n\t\t\tif ( compare & 1 ||\n\t\t\t\t(recompare && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t\tif ( a === doc || contains(preferredDoc, a) ) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tif ( b === doc || contains(preferredDoc, b) ) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\t// Maintain original order\n\t\t\t\treturn sortInput ?\n\t\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t\t0;\n\t\t\t}\n\n\t\t\treturn compare & 4 ? -1 : 1;\n\t\t}\n\n\t\t// Not directly comparable, sort on existence of method\n\t\treturn a.compareDocumentPosition ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\t} else if ( !aup || !bup ) {\n\t\t\treturn a === doc ? -1 :\n\t\t\t\tb === doc ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\t// rbuggyQSA always contains :focus, so no need for an existence check\n\tif ( support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch(e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\tvar val;\n\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tif ( documentIsHTML ) {\n\t\tname = name.toLowerCase();\n\t}\n\tif ( (val = Expr.attrHandle[ name ]) ) {\n\t\treturn val( elem );\n\t}\n\tif ( !documentIsHTML || support.attributes ) {\n\t\treturn elem.getAttribute( name );\n\t}\n\treturn ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?\n\t\tname :\n\t\tval && val.specified ? val.value : null;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n// Document sorting and removing duplicates\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\t// Compensate for sort limitations\n\trecompare = !support.sortDetached;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\treturn results;\n};\n\n/*\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns Returns -1 if a precedes b, 1 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n// Returns a function to use in pseudos for input types\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n// Returns a function to use in pseudos for buttons\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n// Returns a function to use in pseudos for positionals\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/*\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\tfor ( ; (node = elem[i]); i++ ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (see #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[5] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[4] ) {\n\t\t\t\tmatch[2] = match[4];\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeName ) {\n\t\t\tif ( nodeName === \"*\" ) {\n\t\t\t\treturn function() { return true; };\n\t\t\t}\n\n\t\t\tnodeName = nodeName.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\")) || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n\t\t\t\t\t\t\tdiff = cache[1];\n\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\n\t\t\t// not comment, processing instructions, or others\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\n\t\t\t// Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\n\t\t\t// use getAttribute instead to test this case\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( tokens = [] );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar data, cache, outerCache,\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\n\t\t\t\t\t\t\t\treturn data === true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\t// A counter to specify which element is currently being matched\n\tvar matcherCachedRuns = 0,\n\t\tbySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tsetMatched = [],\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\toutermost = expandContext != null,\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context !== document && context;\n\t\t\t\tcachedruns = matcherCachedRuns;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\tmatchedCount += i;\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !group ) {\n\t\t\tgroup = tokenize( selector );\n\t\t}\n\t\ti = group.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( group[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\t}\n\treturn cached;\n};\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tmatch = tokenize( selector );\n\n\tif ( !seed ) {\n\t\t// Try to minimize operations if there is only one group\n\t\tif ( match.length === 1 ) {\n\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\t\ttokens = match[0] = match[0].slice( 0 );\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\t\tcontext.nodeType === 9 && documentIsHTML &&\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\t\tif ( !context ) {\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t\t}\n\n\t\t\t// Fetch a seed set for right-to-left matching\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\ttoken = tokens[i];\n\n\t\t\t\t// Abort if we hit a combinator\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\t\tif ( (seed = find(\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\n\t\t\t\t\t)) ) {\n\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\tcompile( selector, match )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\trsibling.test( selector )\n\t);\n\treturn results;\n}\n\n// Deprecated\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\n// Check sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Initialize with the default document\nsetDocument();\n\n// Always assume the presence of duplicates if sort doesn't\n// pass them to our comparison function (as in Google Chrome).\n[0, 0].sort( sortOrder );\nsupport.detectDuplicates = hasDuplicate;\n\n// EXPOSE\n/*if ( typeof define === \"function\" && define.amd ) {\n\tdefine(function() { return Sizzle; });\n} else {\n\twindow.Sizzle = Sizzle;\n}*/\n// EXPOSE\n\n/**\n * @namespace Ink.Dom.Selector\n * @static\n */\n\n/**\n * Alias for the Sizzle selector engine\n *\n * @method select\n * @param {String} selector CSS selector to search for elements\n * @param {DOMElement} [context] By default the search is done in the document element. However, you can specify an element as search context\n * @param {Array} [results] By default this is considered an empty array. But if you want to merge it with other searches you did, pass their result array through here.\n * @return {Array} Array of resulting DOM Elements\n * @sample Ink_Dom_Selector_select.html\n */\n\n/**\n * Filters elements that match a CSS selector.\n *\n * @method matches\n * @param {String} selector CSS selector to search for elements\n * @param {Array} matches Elements to be 'matched' with\n * @return {Array} Elements that matched\n * @sample Ink_Dom_Selector_matches.html\n */\n\n/**\n * Checks if an element matches a given selector\n *\n * @method matchesSelector\n * @param {DOMElement} element Element to test\n * @param {String} selector CSS selector to test the element with\n * @return {Boolean} True if element matches the CSS selector\n * @sample Ink_Dom_Selector_matchesSelector.html \n */\n\nreturn {\n select: Sizzle,\n matches: Sizzle.matches,\n matchesSelector: Sizzle.matchesSelector\n};\n\n\n}); //( window );\n","/**\n * Animate.css Utility\n *\n * This module is a wrapper around animate.css's CSS classes to produce animation.\n * It contains options to ease common tasks, like listen to the \"animationend\" event with all necessary prefixes, remove the necessary class names when the animation finishes, or configure the duration of your animation with the necessary browser prefix.\n *\n * @module Ink.UI.Animate_1\n * @version 1\n */\n\nInk.createModule('Ink.UI.Animate', 1, ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1'], function (Common, InkEvent, Css) {\n 'use strict';\n\n var animationPrefix = (function (el) {\n return ('animationName' in el.style) ? 'animation' :\n ('oAnimationName' in el.style) ? 'oAnimation' :\n ('msAnimationName' in el.style) ? 'msAnimation' :\n ('webkitAnimationName' in el.style) ? 'webkitAnimation' : null;\n }(document.createElement('div')));\n\n var animationEndEventName = {\n animation: 'animationend',\n oAnimation: 'oanimationend',\n msAnimation: 'MSAnimationEnd',\n webkitAnimation: 'webkitAnimationEnd'\n }[animationPrefix];\n\n /**\n * @class Ink.UI.Animate_1\n * @constructor\n *\n * @param {DOMElement} element Animated element\n * @param {Object} options Options object\n * @param {String} options.animation Animation name\n * @param {String|Number} [options.duration] Duration name (fast|medium|slow) or duration in milliseconds. Defaults to 'medium'.\n * @param {Boolean} [options.removeClass] Flag to remove the CSS class when finished animating. Defaults to false.\n * @param {Function} [options.onEnd] Callback for the animation end\n *\n * @sample Ink_UI_Animate_1.html\n *\n **/\n function Animate() {\n Common.BaseUIComponent.apply(this, arguments);\n }\n\n Animate._name = 'Animate_1';\n\n Animate._optionDefinition = {\n trigger: ['Element', null],\n duration: ['String', 'slow'], // Actually a string with a duration name, or a number of ms\n animation: ['String'],\n removeClass: ['Boolean', true],\n onEnd: ['Function', function () {}]\n };\n\n Animate.prototype._init = function () {\n if (!isNaN(parseInt(this._options.duration, 10))) {\n this._options.duration = parseInt(this._options.duration, 10);\n }\n\n if (this._options.trigger) {\n InkEvent.observe(this._options.trigger, 'click', Ink.bind(function () {\n this.animate();\n }, this)); // later\n } else {\n this.animate();\n }\n };\n\n Animate.prototype.animate = function () {\n Animate.animate(this._element, this._options.animation, this._options);\n };\n\n Ink.extendObj(Animate, {\n /**\n * Browser prefix for the CSS animations.\n *\n * @property _animationPrefix\n * @private\n **/\n _animationPrefix: animationPrefix,\n\n /**\n * Boolean which says whether this browser has CSS3 animation support.\n *\n * @property animationSupported\n **/\n animationSupported: !!animationPrefix,\n\n /**\n * Prefixed 'animationend' event name.\n *\n * @property animationEndEventName\n **/\n animationEndEventName: animationEndEventName,\n\n /**\n * Animate an element using one of the animate.css classes\n *\n * **Note: This is a utility method inside the `Animate` class, which you can access through `Animate.animate()`. Do not mix these up.**\n *\n * @static\n * @method animate\n * @param element {DOMElement} animated element\n * @param animation {String} animation name\n * @param [options] {Object}\n * @param [options.onEnd=null] {Function} callback for animation end\n * @param [options.removeClass=false] {Boolean} whether to remove the Css class when finished\n * @param [options.duration=medium] {String|Number} duration name (fast|medium|slow) or duration in ms\n *\n * @sample Ink_UI_Animate_1_animate.html\n **/\n animate: function (element, animation, options) {\n element = Common.elOrSelector(element);\n\n if (typeof options === 'number' || typeof options === 'string') {\n options = { duration: options };\n } else if (!options) {\n options = {};\n }\n\n if (typeof arguments[3] === 'function') {\n options.onEnd = arguments[3];\n }\n\n if (typeof options.duration !== 'number' && typeof options.duration !== 'string') {\n options.duration = 400;\n }\n\n if (!Animate.animationSupported) {\n if (options.onEnd) {\n setTimeout(function () {\n options.onEnd(null);\n }, 0);\n }\n return;\n }\n\n if (typeof options.duration === 'number') {\n element.style[animationPrefix + 'Duration'] = options.duration + 'ms';\n } else if (typeof options.duration === 'string') {\n Css.addClassName(element, options.duration);\n }\n\n Css.addClassName(element, ['animated', animation]);\n\n function onAnimationEnd(event) {\n if (event.target !== element) { return; }\n if (event.animationName !== animation) { return; }\n if (options.onEnd) { options.onEnd(event); }\n if (options.removeClass) {\n Css.removeClassName(element, animation);\n }\n if (typeof options.duration === 'string') {\n Css.removeClassName(element, options.duration);\n }\n element.removeEventListener(animationEndEventName, onAnimationEnd, false);\n }\n\n element.addEventListener(animationEndEventName, onAnimationEnd, false);\n }\n });\n\n Common.createUIComponent(Animate);\n\n return Animate;\n});\n","/**\n * Flexible Carousel\n * @module Ink.UI.Carousel_1\n * @version 1\n */\n\nInk.createModule('Ink.UI.Carousel', '1',\n ['Ink.UI.Common_1', 'Ink.Dom.Event_1', 'Ink.Dom.Css_1', 'Ink.Dom.Element_1', 'Ink.UI.Pagination_1', 'Ink.Dom.Browser_1', 'Ink.Dom.Selector_1'],\n function(Common, InkEvent, Css, InkElement, Pagination, Browser/*, Selector*/) {\n 'use strict';\n\n /*\n * TODO:\n * keyboardSupport\n */\n\n function limitRange(n, min, max) {\n return Math.min(max, Math.max(min, n));\n }\n\n var requestAnimationFrame = window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n function (cb) {return setTimeout(cb, 1000 / 30); };\n\n /**\n * @class Ink.UI.Carousel_1\n * @constructor\n *\n * @param {String|DOMElement} selector DOM element or element id\n * @param {Object} [options] Carousel Options\n * @param {Integer} [options.autoAdvance] Milliseconds to wait before auto-advancing pages. Set to 0 to disable auto-advance. Defaults to 0.\n * @param {String} [options.axis] Axis of the carousel. Set to 'y' for a vertical carousel. Defaults to 'x'.\n * @param {Number} [options.initialPage] Initial index page of the carousel. Defaults to 0.\n * @param {Boolean} [options.spaceAfterLastSlide=true] If there are not enough slides to fill the full width of the last page, leave white space. Defaults to `true`.\n * @param {Boolean} [options.swipe] Enable swipe support if available. Defaults to true.\n * @param {Mixed} [options.pagination] Either an ul element to add pagination markup to or an `Ink.UI.Pagination` instance to use.\n * @param {Function} [options.onChange] Callback to be called when the page changes.\n *\n * @sample Ink_UI_Carousel_1.html\n */\n function Carousel() {\n Common.BaseUIComponent.apply(this, arguments);\n }\n\n Carousel._name = 'Carousel_1';\n\n Carousel._optionDefinition = {\n autoAdvance: ['Integer', 0],\n axis: ['String', 'x'],\n initialPage: ['Integer', 0],\n spaceAfterLastSlide: ['Boolean', true],\n hideLast: ['Boolean', false],\n // [3.1.0] Deprecate \"center\". It is only needed when things are of unknown widths.\n center: ['Boolean', false],\n keyboardSupport:['Boolean', false],\n pagination: ['String', null],\n onChange: ['Function', null],\n onInit: ['Function', function () {}],\n swipe: ['Boolean', true]\n // TODO exponential swipe\n // TODO specify break point for next page when moving finger\n };\n\n Carousel.prototype = {\n _init: function () {\n this._handlers = {\n paginationChange: Ink.bindMethod(this, '_onPaginationChange'),\n windowResize: InkEvent.throttle(Ink.bindMethod(this, 'refit'), 200)\n };\n\n InkEvent.observe(window, 'resize', this._handlers.windowResize);\n\n this._isY = (this._options.axis === 'y');\n\n var ulEl = Ink.s('ul.stage', this._element);\n this._ulEl = ulEl;\n\n InkElement.removeTextNodeChildren(ulEl);\n\n if (this._options.pagination == null) {\n this._currentPage = this._options.initialPage;\n }\n\n this.refit(); // recalculate this._numPages\n\n if (this._isY) {\n // Override white-space: no-wrap which is only necessary to make sure horizontal stuff stays horizontal, but breaks stuff intended to be vertical.\n this._ulEl.style.whiteSpace = 'normal';\n }\n\n if (this._options.swipe) {\n InkEvent.observe(this._element, 'touchstart', Ink.bindMethod(this, '_onTouchStart'));\n InkEvent.observe(this._element, 'touchmove', Ink.bindMethod(this, '_onTouchMove'));\n InkEvent.observe(this._element, 'touchend', Ink.bindMethod(this, '_onTouchEnd'));\n }\n\n this._setUpPagination();\n this._setUpAutoAdvance();\n this._setUpHider();\n\n this._options.onInit.call(this, this);\n },\n\n /**\n * Repositions elements around.\n * Measure the carousel once again, adjusting the involved elements' sizes. This is called automatically when the window resizes, in order to cater for changes from responsive media queries, for instance.\n *\n * @method refit\n * @public\n */\n refit: function() {\n var _isY = this._isY;\n\n var size = function (elm, perpendicular) {\n if (!elm) { return 0; }\n\n if (!perpendicular) {\n return InkElement.outerDimensions(elm)[_isY ? 1 : 0];\n } else {\n return InkElement.outerDimensions(elm)[_isY ? 0 : 1];\n }\n };\n\n this._liEls = Ink.ss('li.slide', this._ulEl);\n var numSlides = this._liEls.length;\n\n var contRect = this._ulEl.getBoundingClientRect();\n this._ctnLength = _isY ? contRect.bottom - contRect.top : contRect.right - contRect.left;\n this._elLength = size(this._liEls[0]);\n this._slidesPerPage = Math.floor( this._ctnLength / this._elLength ) || 1;\n if (!isFinite(this._slidesPerPage)) { this._slidesPerPage = 1; }\n\n var numPages = Math.ceil( numSlides / this._slidesPerPage );\n var numPagesChanged = this._numPages !== numPages;\n this._numPages = numPages;\n this._deltaLength = this._slidesPerPage * this._elLength;\n \n this._center();\n this._updateHider();\n this._IE7();\n\n if (this._pagination && numPagesChanged) {\n this._pagination.setSize(this._numPages);\n }\n this.setPage(limitRange(this.getPage(), 0, this._numPages));\n },\n\n _setUpPagination: function () {\n if (this._options.pagination) {\n if (Common.isDOMElement(this._options.pagination) ||\n typeof this._options.pagination === 'string') {\n // if dom element or css selector string...\n this._pagination = new Pagination(this._options.pagination, {\n size: this._numPages,\n onChange: this._handlers.paginationChange\n });\n } else {\n // assumes instantiated pagination\n this._pagination = this._options.pagination;\n this._pagination._options.onChange = this._handlers.paginationChange;\n this._pagination.setSize(this._numPages);\n }\n this._pagination.setCurrent(this._options.initialPage || 0);\n } else {\n this._currentPage = this._options.initialPage || 0;\n }\n },\n\n _setUpAutoAdvance: function () {\n if (!this._options.autoAdvance) { return; }\n var self = this;\n\n setTimeout(function autoAdvance() {\n self.nextPage(true /* wrap */);\n setTimeout(autoAdvance, self._options.autoAdvance);\n }, this._options.autoAdvance);\n },\n\n _setUpHider: function () {\n if (this._options.hideLast) {\n var hiderEl = InkElement.create('div', {\n className: 'hider',\n insertBottom: this._element\n });\n hiderEl.style.position = 'absolute';\n hiderEl.style[ this._isY ? 'left' : 'top' ] = '0'; // fix to top..\n hiderEl.style[ this._isY ? 'right' : 'bottom' ] = '0'; // and bottom...\n hiderEl.style[ this._isY ? 'bottom' : 'right' ] = '0'; // and move to the end.\n this._hiderEl = hiderEl;\n }\n },\n\n // [3.1.0] Deprecate this already\n _center: function() {\n if (!this._options.center) { return; }\n var gap = Math.floor( (this._ctnLength - (this._elLength * this._slidesPerPage) ) / 2 );\n\n var pad;\n if (this._isY) {\n pad = [gap, 'px 0'];\n } else {\n pad = ['0 ', gap, 'px'];\n }\n\n this._ulEl.style.padding = pad.join('');\n },\n\n // [3.1.0] Deprecate this already\n _updateHider: function() {\n if (!this._hiderEl) { return; }\n if (this.getPage() === 0) {\n var gap = Math.floor( this._ctnLength - (this._elLength * this._slidesPerPage) );\n if (this._options.center) {\n gap /= 2;\n }\n this._hiderEl.style[ this._isY ? 'height' : 'width' ] = gap + 'px';\n } else {\n this._hiderEl.style[ this._isY ? 'height' : 'width' ] = '0px';\n }\n },\n \n /**\n * Refits elements for IE7 because it doesn't support inline-block.\n *\n * @method _IE7\n * @private\n */\n _IE7: function () {\n if (Browser.IE && '' + Browser.version.split('.')[0] === '7') {\n // var numPages = this._numPages;\n var slides = Ink.ss('li.slide', this._ulEl);\n var stl = function (prop, val) {slides[i].style[prop] = val; };\n for (var i = 0, len = slides.length; i < len; i++) {\n stl('position', 'absolute');\n stl(this._isY ? 'top' : 'left', (i * this._elLength) + 'px');\n }\n }\n },\n\n _onTouchStart: function (event) {\n if (event.touches.length > 1) { return; }\n\n this._swipeData = {\n x: InkEvent.pointerX(event),\n y: InkEvent.pointerY(event)\n };\n\n var ulRect = this._ulEl.getBoundingClientRect();\n\n this._swipeData.firstUlPos = ulRect[this._isY ? 'top' : 'left'];\n\n this._swipeData.inUlX = this._swipeData.x - ulRect.left;\n this._swipeData.inUlY = this._swipeData.y - ulRect.top;\n\n setTransitionProperty(this._ulEl, 'none');\n\n this._touchMoveIsFirstTouchMove = true;\n },\n\n _onTouchMove: function (event) {\n if (event.touches.length > 1) { return; /* multitouch event, not my problem. */ }\n\n var pointerX = InkEvent.pointerX(event);\n var pointerY = InkEvent.pointerY(event);\n\n var deltaY = Math.abs(pointerY - this._swipeData.y);\n var deltaX = Math.abs(pointerX - this._swipeData.x);\n\n if (this._touchMoveIsFirstTouchMove) {\n this._touchMoveIsFirstTouchMove = undefined;\n this._scrolling = this._isY ?\n deltaX > deltaY :\n deltaY > deltaX ;\n\n if (!this._scrolling) {\n this._onAnimationFrame();\n }\n }\n\n if (!this._scrolling && this._swipeData) {\n InkEvent.stopDefault(event);\n\n this._swipeData.pointerPos = this._isY ? pointerY : pointerX;\n }\n },\n\n _onAnimationFrame: function () {\n var swipeData = this._swipeData;\n\n if (!swipeData || this._scrolling || this._touchMoveIsFirstTouchMove) { return; }\n\n var elRect = this._element.getBoundingClientRect();\n\n var newPos;\n\n if (!this._isY) {\n newPos = swipeData.pointerPos - swipeData.inUlX - elRect.left;\n } else {\n newPos = swipeData.pointerPos - swipeData.inUlY - elRect.top;\n }\n\n this._ulEl.style[this._isY ? 'top' : 'left'] = newPos + 'px';\n\n requestAnimationFrame(Ink.bindMethod(this, '_onAnimationFrame'));\n },\n\n _onTouchEnd: function (event) {\n if (this._swipeData && this._swipeData.pointerPos && !this._scrolling && !this._touchMoveIsFirstTouchMove) {\n var snapToNext = 0.1; // swipe 10% of the way to change page\n\n var relProgress = this._swipeData.firstUlPos -\n this._ulEl.getBoundingClientRect()[this._isY ? 'top' : 'left'];\n\n var curPage = this.getPage();\n\n // How many pages were advanced? May be fractional.\n var progressInPages = relProgress / this._elLength / this._slidesPerPage;\n\n // Have we advanced enough to change page?\n if (Math.abs(progressInPages) > snapToNext) {\n curPage += Math[ relProgress < 0 ? 'floor' : 'ceil' ](progressInPages);\n }\n\n // If something used to calculate progressInPages was zero, we get NaN here.\n if (!isNaN(curPage)) {\n this.setPage(curPage);\n }\n\n InkEvent.stopDefault(event);\n }\n\n setTransitionProperty(this._ulEl, null /* transition: left, top */);\n this._swipeData = null;\n this._touchMoveIsFirstTouchMove = undefined;\n this._scrolling = undefined;\n },\n\n _onPaginationChange: function(pgn) {\n this._setPage(pgn.getCurrent());\n },\n\n /**\n * Gets the current page index\n * @method getPage\n * @return The current page number\n **/\n getPage: function () {\n if (this._pagination) {\n return this._pagination.getCurrent();\n } else {\n return this._currentPage || 0;\n }\n },\n\n /**\n * Sets the current page index\n * @method setPage\n * @param {Number} page Index of the destination page.\n * @param {Boolean} [wrap] Flag to activate circular counting.\n **/\n setPage: function (page, wrap) {\n if (wrap) {\n // Pages outside the range [0..this._numPages] are wrapped.\n page = page % this._numPages;\n if (page < 0) { page = this._numPages - page; }\n }\n page = limitRange(page, 0, this._numPages - 1);\n\n if (this._pagination) {\n this._pagination.setCurrent(page); // _setPage is called by pagination because it listens to its Change event.\n } else {\n this._setPage(page);\n }\n },\n\n _setPage: function (page) {\n var _lengthToGo = page * this._deltaLength;\n var isLastPage = page === (this._numPages - 1);\n\n if (!this._options.spaceAfterLastSlide && isLastPage && page > 0) { \n var _itemsInLastPage = this._liEls.length - (page * this._slidesPerPage);\n if(_itemsInLastPage < this._slidesPerPage) {\n _lengthToGo = ((page - 1) * this._deltaLength) + (_itemsInLastPage * this._elLength);\n }\n }\n\n this._ulEl.style[ this._isY ? 'top' : 'left'] =\n ['-', _lengthToGo, 'px'].join('');\n\n if (this._options.onChange) {\n this._options.onChange.call(this, page);\n }\n\n this._currentPage = page;\n\n this._updateHider();\n },\n\n /**\n * Goes to the next page\n * @method nextPage\n * @param {Boolean} [wrap] Flag to loop from last page to first page.\n **/\n nextPage: function (wrap) {\n this.setPage(this.getPage() + 1, wrap);\n },\n\n /**\n * Goes to the previous page\n * @method previousPage\n * @param {Boolean} [wrap] Flag to loop from first page to last page.\n **/\n previousPage: function (wrap) { this.setPage(this.getPage() - 1, wrap); },\n\n /**\n * Returns how many slides fit into a page\n * @method getSlidesPerPage\n * @return {Number} The number of slides per page\n * @public\n */\n getSlidesPerPage: function() {\n return this._slidesPerPage;\n },\n\n /**\n * Get the amount of pages in the carousel.\n * @method getTotalPages\n * @return {Number} The number of pages\n * @public\n */\n getTotalPages: function() {\n return this._numPages;\n },\n\n /**\n * Get the stage element (your UL with the class \".stage\").\n * @method getStageElm\n * @public\n * @return {DOMElement} Stage element\n **/\n getStageElm: function() {\n return this._ulEl;\n },\n\n /**\n * Get a list of your slides (elements with the \".slide\" class inside your stage)\n * @method getSlidesList\n * @return {DOMElement[]} Array containing the slides.\n * @public\n */\n getSlidesList: function() {\n return this._liEls;\n },\n\n /**\n * Get the total number of slides\n * @method getTotalSlides\n * @return {Number} The number of slides\n * @public\n */\n getTotalSlides: function() {\n return this.getSlidesList().length;\n }\n };\n\n function setTransitionProperty(el, newTransition) {\n el.style.transitionProperty =\n el.style.oTransitionProperty =\n el.style.msTransitionProperty =\n el.style.mozTransitionProperty =\n el.style.webkitTransitionProperty = newTransition;\n }\n\n Common.createUIComponent(Carousel);\n\n return Carousel;\n\n});\n","/**\n * Closing utilities\n * @module Ink.UI.Close_1\n * @version 1\n */\nInk.createModule('Ink.UI.Close', '1', ['Ink.Dom.Event_1','Ink.Dom.Element_1'], function(InkEvent, InkElement) {\n 'use strict';\n\n /**\n * Subscribes clicks on the document.body.\n * Whenever an element with the classes \".ink-close\" or \".ink-dismiss\" is clicked, this module finds an ancestor \".ink-alert\" or \".ink-alert-block\" element and removes it from the DOM.\n * This module should be created only once per page.\n * \n * @class Ink.UI.Close\n * @constructor\n * @example\n * \n *\n * @sample Ink_UI_Close_1.html\n */\n var Close = function() {\n InkEvent.observe(document.body, 'click', function(ev) {\n var el = InkEvent.element(ev);\n\n el = InkElement.findUpwardsByClass(el, 'ink-close') ||\n InkElement.findUpwardsByClass(el, 'ink-dismiss');\n\n if (!el) {\n return; // ink-close or ink-dismiss class not found\n }\n\n var toRemove = InkElement.findUpwardsByClass(el, 'ink-alert') ||\n InkElement.findUpwardsByClass(el, 'ink-alert-block') ||\n el;\n\n if (toRemove) {\n InkEvent.stop(ev);\n InkElement.remove(toRemove);\n }\n });\n };\n\n Close._name = 'Close_1';\n\n return Close;\n});\n","/**\n * Auxiliar utilities for UI Modules\n * @module Ink.UI.Common_1\n * @version 1\n */\n \nInk.createModule('Ink.UI.Common', '1', ['Ink.Dom.Element_1', 'Ink.Net.Ajax_1','Ink.Dom.Css_1','Ink.Dom.Selector_1','Ink.Util.Url_1'], function(InkElement, Ajax,Css,Selector,Url) {\n\n 'use strict';\n\n var nothing = {} /* a marker, for reference comparison. */;\n\n var keys = Object.keys || function (obj) {\n var ret = [];\n for (var k in obj) if (obj.hasOwnProperty(k)) {\n ret.push(k);\n }\n return ret;\n };\n\n var es6WeakMapSupport = 'WeakMap' in window;\n var instances = es6WeakMapSupport ? new WeakMap() : null;\n\n var domRegistry = {\n get: function get(el) {\n return es6WeakMapSupport ?\n instances.get(el) :\n el.__InkInstances;\n },\n set: function set(el, thing) {\n if (es6WeakMapSupport) {\n instances.set(el, thing);\n } else {\n el.__InkInstances = thing;\n }\n }\n };\n\n /**\n * @namespace Ink.UI.Common_1\n */\n\n var Common = {\n\n /**\n * Supported Ink Layouts\n *\n * @property Layouts\n * @type Object\n * @readOnly\n */\n Layouts: {\n TINY: 'tiny',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n XLARGE: 'xlarge'\n },\n\n /**\n * Checks if an item is a valid DOM Element.\n *\n * @method isDOMElement\n * @static\n * @param {Mixed} o The object to be checked.\n * @return {Boolean} True if it's a valid DOM Element.\n * @example\n * var el = Ink.s('#element');\n * if( Ink.UI.Common.isDOMElement( el ) === true ){\n * // It is a DOM Element.\n * } else {\n * // It is NOT a DOM Element.\n * }\n */\n isDOMElement: InkElement.isDOMElement,\n\n /**\n * Checks if an item is a valid integer.\n *\n * @method isInteger\n * @static\n * @param {Mixed} n The value to be checked.\n * @return {Boolean} True if it's a valid integer.\n * @example\n * var value = 1;\n * if( Ink.UI.Common.isInteger( value ) === true ){\n * // It is an integer.\n * } else {\n * // It is NOT an integer.\n * }\n */\n isInteger: function(n) {\n return (typeof n === 'number' && n % 1 === 0);\n },\n\n /**\n * Gets a DOM Element. \n *\n * @method elOrSelector\n * @static\n * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector\n * @param {String} fieldName The name of the field. Commonly used for debugging.\n * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception.\n * @example\n * // In case there are several .myInput, it will retrieve the first found\n * var el = Ink.UI.Common.elOrSelector('.myInput','My Input');\n */\n elOrSelector: function(elOrSelector, fieldName) {\n if (!this.isDOMElement(elOrSelector)) {\n var t = Selector.select(elOrSelector);\n if (t.length === 0) {\n Ink.warn(fieldName + ' must either be a DOM Element or a selector expression!\\nThe script element must also be after the DOM Element itself.');\n return null;\n }\n return t[0];\n }\n return elOrSelector;\n },\n\n /**\n * Alias for `elOrSelector` but returns an array of elements.\n *\n * @method elsOrSelector\n *\n * @static\n * @param {DOMElement|String} elOrSelector DOM Element or CSS Selector\n * @param {String} fieldName The name of the field. Commonly used for debugging.\n * @return {DOMElement} Returns the DOMElement passed or the first result of the CSS Selector. Otherwise it throws an exception.\n * @param {Boolean} required Flag to accept an empty array as output.\n * @return {Array} The selected DOM Elements.\n * @example\n * var elements = Ink.UI.Common.elsOrSelector('input.my-inputs', 'My Input');\n */\n elsOrSelector: function(elsOrSelector, fieldName, required) {\n var ret;\n if (typeof elsOrSelector === 'string') {\n ret = Selector.select(elsOrSelector);\n } else if (Common.isDOMElement(elsOrSelector)) {\n ret = [elsOrSelector];\n } else if (elsOrSelector && typeof elsOrSelector === 'object' && typeof elsOrSelector.length === 'number') {\n ret = elsOrSelector;\n }\n\n if (ret && ret.length) {\n return ret;\n } else {\n if (required) {\n throw new TypeError(fieldName + ' must either be a DOM Element, an Array of elements, or a selector expression!\\nThe script element must also be after the DOM Element itself.');\n } else {\n return [];\n }\n }\n },\n\n /**\n * Gets options an object and element's metadata.\n *\n * The element's data attributes take precedence. Values from the element's data-atrributes are coerced into the required type.\n *\n * @method options\n *\n * @param {Object} [fieldId] Name to be used in debugging features.\n * @param {Object} defaults Object with the options' types and defaults.\n * @param {Object} overrides Options to override the defaults. Usually passed when instantiating an UI module.\n * @param {DOMElement} [element] Element with data-attributes\n *\n * @example\n *\n * this._options = Ink.UI.Common.options('MyComponent', {\n * 'anobject': ['Object', null], // Defaults to null\n * 'target': ['Element', null],\n * 'stuff': ['Number', 0.1],\n * 'stuff2': ['Integer', 0],\n * 'doKickFlip': ['Boolean', false],\n * 'targets': ['Elements'], // Required option since no default was given\n * 'onClick': ['Function', null]\n * }, options || {}, elm)\n *\n * @example\n *\n * ### Note about booleans\n *\n * Here is how options are read from the markup\n * data-attributes, for several values`data-a-boolean`.\n *\n * Options considered true:\n *\n * - `data-a-boolean=\"true\"`\n * - (Every other value which is not on the list below.)\n * \n * Options considered false:\n *\n * - `data-a-boolean=\"false\"`\n * - `data-a-boolean=\"\"`\n * - `data-a-boolean`\n *\n * Options which go to default:\n *\n * - (no attribute). When `data-a-boolean` is ommitted, the\n * option is not considered true nor false, and as such\n * defaults to what is in the `defaults` argument.\n *\n **/\n options: function (fieldId, defaults, overrides, element) {\n if (typeof fieldId !== 'string') {\n element = overrides;\n overrides = defaults;\n defaults = fieldId;\n fieldId = '';\n }\n overrides = overrides || {};\n var out = {};\n var dataAttrs = element ? InkElement.data(element) : {};\n var fromDataAttrs;\n var type;\n var lType;\n var defaultVal;\n\n var invalidStr = function (str) {\n if (fieldId) { str = fieldId + ': \"' + ('' + str).replace(/\"/, '\\\\\"') + '\"'; }\n return str;\n };\n\n var quote = function (str) {\n return '\"' + ('' + str).replace(/\"/, '\\\\\"') + '\"';\n };\n\n var invalidThrow = function (str) {\n throw new Error(invalidStr(str));\n };\n\n var invalid = function (str) {\n Ink.error(invalidStr(str) + '. Ignoring option.');\n };\n\n function optionValue(key) {\n type = defaults[key][0];\n lType = type.toLowerCase();\n defaultVal = defaults[key].length === 2 ? defaults[key][1] : nothing;\n\n if (!type) {\n invalidThrow('Ink.UI.Common.options: Always specify a type!');\n }\n if (!(lType in Common._coerce_funcs)) {\n invalidThrow('Ink.UI.Common.options: ' + defaults[key][0] + ' is not a valid type. Use one of ' + keys(Common._coerce_funcs).join(', '));\n\n }\n if (!defaults[key].length || defaults[key].length > 2) {\n invalidThrow('the \"defaults\" argument must be an object mapping option names to [typestring, optional] arrays.');\n }\n\n if (key in dataAttrs) {\n fromDataAttrs = Common._coerce_from_string(lType, dataAttrs[key], key, fieldId);\n // (above can return `nothing`)\n } else {\n fromDataAttrs = nothing;\n }\n\n if (fromDataAttrs !== nothing) {\n if (!Common._options_validate(fromDataAttrs, lType)) {\n invalid('(' + key + ' option) Invalid ' + lType + ' ' + quote(fromDataAttrs));\n return defaultVal;\n } else {\n return fromDataAttrs;\n }\n } else if (key in overrides) {\n return overrides[key];\n } else if (defaultVal !== nothing) {\n return defaultVal;\n } else {\n invalidThrow('Option ' + key + ' is required!');\n }\n }\n\n for (var key in defaults) {\n if (defaults.hasOwnProperty(key)) {\n out[key] = optionValue(key);\n }\n }\n\n return out;\n },\n\n _coerce_from_string: function (type, val, paramName, fieldId) {\n if (type in Common._coerce_funcs) {\n return Common._coerce_funcs[type](val, paramName, fieldId);\n } else {\n return val;\n }\n },\n\n _options_validate: function (val, type) {\n if (type in Common._options_validate_types) {\n return Common._options_validate_types[type].call(Common, val);\n } else {\n // 'object' options cannot be passed through data-attributes.\n // Json you say? Not any good to embed in HTML.\n return false;\n }\n },\n\n _coerce_funcs: (function () {\n var ret = {\n element: function (val) {\n return Common.elOrSelector(val, '');\n },\n elements: function (val) {\n return Common.elsOrSelector(val, '', false /*not required, so don't throw an exception now*/);\n },\n object: function (val) { return val; },\n number: function (val) { return parseFloat(val); },\n 'boolean': function (val) {\n return !(val === 'false' || val === '' || val === null);\n },\n string: function (val) { return val; },\n 'function': function (val, paramName, fieldId) {\n Ink.error(fieldId + ': You cannot specify the option \"' + paramName + '\" through data-attributes because it\\'s a function');\n return nothing;\n }\n };\n ret['float'] = ret.integer = ret.number;\n return ret;\n }()),\n\n _options_validate_types: (function () {\n var types = {\n string: function (val) {\n return typeof val === 'string';\n },\n number: function (val) {\n return typeof val === 'number' && !isNaN(val) && isFinite(val);\n },\n integer: function (val) {\n return val === Math.round(val);\n },\n element: function (val) {\n return Common.isDOMElement(val);\n },\n elements: function (val) {\n return val && typeof val === 'object' && typeof val.length === 'number' && val.length;\n },\n 'boolean': function (val) {\n return typeof val === 'boolean';\n },\n object: function () { return true; }\n };\n types['float'] = types.number;\n return types;\n }()),\n\n /**\n * Deep copy (clone) an object.\n * Note: The object cannot have referece loops.\n *\n * @method clone\n * @static\n * @param {Object} o The object to be cloned/copied.\n * @return {Object} Returns the result of the clone/copy.\n * @example\n * var originalObj = {\n * key1: 'value1',\n * key2: 'value2',\n * key3: 'value3'\n * };\n * var cloneObj = Ink.UI.Common.clone( originalObj );\n */\n clone: function(o) {\n try {\n return JSON.parse( JSON.stringify(o) );\n } catch (ex) {\n throw new Error('Given object cannot have loops!');\n }\n },\n\n\n /**\n * Gets an element's one-base index relative to its parent.\n *\n * @method childIndex\n * @static\n * @param {DOMElement} childEl Valid DOM Element.\n * @return {Number} Numerical position of an element relatively to its parent.\n * @example\n * \n *
\n *
One
\n *
Two
\n *
Three
\n *
Four
\n *
\n *\n * \n */\n childIndex: function(childEl) {\n if( Common.isDOMElement(childEl) ){\n var els = Selector.select('> *', childEl.parentNode);\n for (var i = 0, f = els.length; i < f; ++i) {\n if (els[i] === childEl) {\n return i;\n }\n }\n }\n throw 'not found!';\n },\n\n\n /**\n * AJAX JSON request shortcut method\n * It provides a more convenient way to do an AJAX request and expect a JSON response.It also offers a callback option, as third parameter, for better async handling.\n *\n * @method ajaxJSON\n * @static\n * @async\n * @param {String} endpoint Valid URL to be used as target by the request.\n * @param {Object} params This field is used in the thrown Exception to identify the parameter.\n * @param {Function} cb Callback for the request.\n * @example\n * // In case there are several .myInput, it will retrieve the first found\n * var el = Ink.UI.Common.elOrSelector('.myInput','My Input');\n */\n ajaxJSON: function(endpoint, params, cb) {\n new Ajax(\n endpoint,\n {\n evalJS: 'force',\n method: 'POST',\n parameters: params,\n\n onSuccess: function( r) {\n try {\n r = r.responseJSON;\n if (r.status !== 'ok') {\n throw 'server error: ' + r.message;\n }\n cb(null, r);\n } catch (ex) {\n cb(ex);\n }\n },\n\n onFailure: function() {\n cb('communication failure');\n }\n }\n );\n },\n\n\n /**\n * Gets the current Ink layout.\n *\n * @method currentLayout\n * @static\n * @return {String} A string representation of the current layout name.\n * @example\n * var inkLayout = Ink.UI.Common.currentLayout();\n * if (inkLayout === 'small') {\n * // ...\n * }\n */\n currentLayout: function() {\n var i, f, k, v, el, detectorEl = Selector.select('#ink-layout-detector')[0];\n if (!detectorEl) {\n detectorEl = document.createElement('div');\n detectorEl.id = 'ink-layout-detector';\n for (k in this.Layouts) {\n if (this.Layouts.hasOwnProperty(k)) {\n v = this.Layouts[k];\n el = document.createElement('div');\n el.className = 'show-' + v + ' hide-all';\n el.setAttribute('data-ink-layout', v);\n detectorEl.appendChild(el);\n }\n }\n document.body.appendChild(detectorEl);\n }\n\n for (i = 0, f = detectorEl.children.length; i < f; ++i) {\n el = detectorEl.children[i];\n if (Css.getStyle(el, 'display') === 'block') {\n return el.getAttribute('data-ink-layout');\n }\n }\n\n return 'large';\n },\n\n\n /**\n * Sets the location's hash (window.location.hash).\n *\n * @method hashSet\n * @static\n * @param {Object} o Object with the info to be placed in the location's hash.\n * @example\n * // It will set the location's hash like: #key1=value1&key2=value2&key3=value3\n * Ink.UI.Common.hashSet({\n * key1: 'value1',\n * key2: 'value2',\n * key3: 'value3'\n * });\n */\n hashSet: function(o) {\n if (typeof o !== 'object') { throw new TypeError('o should be an object!'); }\n var hashParams = Url.getAnchorString();\n hashParams = Ink.extendObj(hashParams, o);\n window.location.hash = Url.genQueryString('', hashParams).substring(1);\n },\n\n /**\n * Removes children nodes from a given object.\n * This method was initially created to help solve a problem in Internet Explorer(s) that occurred when trying to set the innerHTML of some specific elements like 'table'.\n *\n * @method cleanChildren\n * @static\n * @param {DOMElement} parentEl Valid DOM Element\n * @example\n * \n *
\n *
One
\n *
Two
\n *
Three
\n *
Four
\n *
\n *\n * \n *\n * \n *
\n */\n cleanChildren: function(parentEl) {\n if( !Common.isDOMElement(parentEl) ){\n throw 'Please provide a valid DOMElement';\n }\n var prevEl, el = parentEl.lastChild;\n while (el) {\n prevEl = el.previousSibling;\n parentEl.removeChild(el);\n el = prevEl;\n }\n },\n\n /**\n * Stores the id and/or classes of an element in an object.\n *\n * @method storeIdAndClasses\n * @static\n * @param {DOMElement} fromEl Valid DOM Element to get the id and classes from.\n * @param {Object} inObj Object where the id and classes will be saved.\n * @example\n * \n *\n * \n */\n storeIdAndClasses: function(fromEl, inObj) {\n if( !Common.isDOMElement(fromEl) ){\n throw 'Please provide a valid DOMElement as first parameter';\n }\n\n var id = fromEl.id;\n if (id) {\n inObj._id = id;\n }\n\n var classes = fromEl.className;\n if (classes) {\n inObj._classes = classes;\n }\n },\n\n /**\n * Sets the id and className properties of an element based \n *\n * @method restoreIdAndClasses\n * @static\n * @param {DOMElement} toEl Valid DOM Element to set the id and classes on.\n * @param {Object} inObj Object where the id and classes to be set are. This method uses the same format as the one given in `storeIdAndClasses`\n * @example\n * \n *\n * \n *\n * \n * \n */\n restoreIdAndClasses: function(toEl, inObj) {\n\n if( !Common.isDOMElement(toEl) ){\n throw 'Please provide a valid DOMElement as first parameter';\n }\n\n if (inObj._id && toEl.id !== inObj._id) {\n toEl.id = inObj._id;\n }\n\n if (inObj._classes && toEl.className.indexOf(inObj._classes) === -1) {\n if (toEl.className) { toEl.className += ' ' + inObj._classes; }\n else { toEl.className = inObj._classes; }\n }\n\n if (inObj._instanceId && !toEl.getAttribute('data-instance')) {\n toEl.setAttribute('data-instance', inObj._instanceId);\n }\n },\n\n _warnDoubleInstantiation: function (elm, newInstance) {\n var instances = Common.getInstance(elm);\n\n if (getName(newInstance) === '') { return; }\n if (!instances) { return; }\n\n var nameWithoutVersion = getName(newInstance);\n\n if (!nameWithoutVersion) { return; }\n\n for (var i = 0, len = instances.length; i < len; i++) {\n if (nameWithoutVersion === getName(instances[i])) {\n // Yes, I am using + to concatenate and , to split\n // arguments.\n //\n // Elements can't be concatenated with strings, but if\n // they are passed in an argument, modern debuggers will\n // pretty-print them and make it easy to find them in the\n // element inspector.\n //\n // On the other hand, if strings are passed as different\n // arguments, they get pretty printed. And the pretty\n // print of a string has quotes around it.\n //\n // If some day people find out that strings are not\n // just text and they start preserving contextual\n // information, then by all means change this to a\n // regular concatenation.\n //\n // But they won't. So don't change this.\n Ink.warn('Creating more than one ' + nameWithoutVersion + '.',\n '(Was creating a ' + nameWithoutVersion + ' on:', elm, ').');\n return false;\n }\n }\n\n function getName(thing) {\n return ((thing.constructor && (thing.constructor._name)) ||\n thing._name ||\n '').replace(/_.*?$/, '');\n }\n\n return true;\n },\n\n /**\n * Saves a component's instance reference for later retrieval.\n *\n * @method registerInstance\n * @static\n * @param {Object} inst Object that holds the instance.\n * @param {DOMElement} el DOM Element to associate with the object.\n */\n registerInstance: function(inst, el) {\n if (!inst) { return; }\n\n if (!Common.isDOMElement(el)) { throw new TypeError('Ink.UI.Common.registerInstance: The element passed in is not a DOM element!'); }\n\n // [todo] this belongs in the BaseUIComponent's initialization\n if (Common._warnDoubleInstantiation(el, inst) === false) {\n return false;\n }\n\n var instances = domRegistry.get(el);\n\n if (!instances) {\n instances = [];\n domRegistry.set(el, instances);\n }\n\n instances.push(inst);\n\n return true;\n },\n\n /**\n * Deletes an instance with a given id.\n *\n * @method unregisterInstance\n * @static\n * @param {String} id Id of the instance to be destroyed.\n */\n unregisterInstance: function(inst) {\n if (!inst || !inst._element) { return; }\n var instances = domRegistry.get(inst._element);\n for (var i = 0, len = instances.length; i < len; i++) {\n if (instances[i] === inst) {\n instances.splice(i, 1);\n }\n }\n },\n\n /**\n * Gets an UI instance from an element or instance id.\n *\n * @method getInstance\n * @static\n * @param {String|DOMElement} el DOM Element from which we want the instances.\n * @return {Object|Array} Returns an instance or a collection of instances.\n */\n getInstance: function(el, UIComponent) {\n el = Common.elOrSelector(el);\n var instances = domRegistry.get(el);\n\n if (!instances) {\n instances = [];\n }\n\n if (typeof UIComponent !== 'function') {\n return instances;\n }\n\n for (var i = 0, len = instances.length; i < len; i++) {\n if (instances[i] instanceof UIComponent) {\n return instances[i];\n }\n }\n\n return null;\n },\n\n /**\n * Gets an instance based on a selector.\n *\n * @method getInstanceFromSelector\n * @static\n * @param {String} selector CSS selector to get the instances from.\n * @return {Object|Array} Returns an instance or a collection of instances.\n */\n getInstanceFromSelector: function(selector) {\n return Common.getInstance(Common.elOrSelector(selector));\n },\n\n /**\n * Gets all the instance ids\n *\n * @method getInstanceIds\n * @static\n * @return {Array} Collection of instance ids\n */\n getInstanceIds: function() {\n var res = [];\n for (var id in instances) {\n if (instances.hasOwnProperty(id)) {\n res.push( id );\n }\n }\n return res;\n },\n\n /**\n * Gets all the instances\n *\n * @method getInstances\n * @static\n * @return {Array} Collection of existing instances.\n */\n getInstances: function() {\n var res = [];\n for (var id in instances) {\n if (instances.hasOwnProperty(id)) {\n res.push( instances[id] );\n }\n }\n return res;\n },\n\n /**\n * Boilerplate method to destroy a component.\n * Components should copy this method as its destroy method and modify it.\n *\n * @method destroyComponent\n * @static\n */\n destroyComponent: function() {\n Common.unregisterInstance(this);\n this._element.parentNode.removeChild(this._element);\n }\n\n };\n\n\n\n\n /**\n * Ink UI Base Class\n **/\n\n function warnStub() {\n /* jshint validthis: true */\n if (!this || this === window || typeof this.constructor !== 'function') { return; }\n Ink.warn('You called a method on an incorrectly instantiated ' + this.constructor._name + ' component. Check the warnings above to see what went wrong.');\n }\n\n function stub(prototype, obj) {\n for (var k in prototype) if (prototype.hasOwnProperty(k)) {\n if (k === 'constructor') { continue; }\n if (typeof obj[k] === 'function') {\n obj[k] = warnStub;\n }\n }\n }\n\n /**\n * Ink UI Base Class\n *\n * You don't use this class directly, or inherit from it directly.\n *\n * See createUIComponent() (in this module) for how to create a UI component and inherit from this. It's not plain old JS inheritance, for several reasons.\n *\n * @class Ink.UI.Common.BaseUIComponent\n * @constructor\n *\n * @param element\n * @param options\n **/\n function BaseUIComponent(element, options) {\n var constructor = this.constructor;\n var _name = constructor._name;\n\n if (!this || this === window) {\n throw new Error('Use \"new InkComponent()\" instead of \"InkComponent()\"');\n }\n\n if (this && !(this instanceof BaseUIComponent)) {\n throw new Error('You forgot to call Ink.UI.Common.createUIComponent() on this module!');\n }\n\n if (!element && !constructor._componentOptions.elementIsOptional) {\n Ink.error(new Error(_name + ': You need to pass an element or a selector as the first argument to \"new ' + _name + '()\"'));\n return;\n } else {\n this._element = Common.elsOrSelector(element,\n _name + ': An element with the selector \"' + element + '\" was not found!')[0];\n }\n\n if (!this._element && !constructor._componentOptions.elementIsOptional) {\n isValidInstance = false;\n Ink.error(new Error(element + ' does not match an element on the page. You need to pass a valid selector to \"new ' + _name + '\".'));\n }\n\n // TODO Change Common.options's signature? the below looks better, more manageable\n // var options = Common.options({\n // element: this._element,\n // modName: constructor._name,\n // options: constructor._optionDefinition,\n // defaults: constructor._globalDefaults\n // });\n\n this._options = Common.options(_name, constructor._optionDefinition, options, this._element);\n\n var isValidInstance = BaseUIComponent._validateInstance(this) === true;\n\n if (isValidInstance && typeof this._init === 'function') {\n try {\n this._init.apply(this, arguments);\n } catch(e) {\n isValidInstance = false;\n Ink.error(e);\n }\n }\n\n if (!isValidInstance) {\n BaseUIComponent._stubInstance(this, constructor, _name);\n } else if (this._element) {\n Common.registerInstance(this, this._element);\n }\n }\n\n /**\n * Calls the `instance`'s _validate() method so it can validate itself.\n *\n * Returns false if the method exists, was called, but no Error was returned or thrown.\n *\n * @method _validateInstance\n * @private\n */\n BaseUIComponent._validateInstance = function (instance) {\n var err;\n\n if (typeof instance._validate !== 'function') { return true; }\n\n try {\n err = instance._validate();\n } catch (e) {\n err = e;\n }\n\n if (err instanceof Error) {\n instance._validationError = err;\n return false;\n }\n\n return true;\n };\n\n\n /**\n * Replaces every method in the instance with stub functions which just call Ink.warn().\n *\n * This avoids breaking the page when there are errors.\n *\n * @method _stubInstance\n * @param instance\n * @param constructor\n * @param name\n * @private\n */\n BaseUIComponent._stubInstance = function (instance, constructor, name) {\n stub(constructor.prototype, instance);\n stub(BaseUIComponent.prototype, instance);\n Ink.warn(name + ' was not correctly created. ' + (instance._validationError || ''));\n };\n\n // TODO BaseUIComponent.setGlobalOptions = function () {}\n // TODO BaseUIComponent.createMany = function (selector) {}\n BaseUIComponent.getInstance = function (elOrSelector) {\n elOrSelector = Common.elOrSelector(elOrSelector);\n return Common.getInstance(elOrSelector, this /* get instance by constructor */);\n };\n\n Ink.extendObj(BaseUIComponent.prototype, {\n /**\n * Get an UI component's option's value.\n *\n * @method getOption\n * @param name\n *\n * @return The option value, or undefined if nothing is found.\n *\n * @example\n *\n * var myUIComponent = new Modal('#element', { trigger: '#trigger' }); // or anything else inheriting BaseUIComponent\n * myUIComponent.getOption('trigger'); // -> The trigger element (not the selector string, mind you)\n *\n **/\n getOption: function (name) {\n if (this.constructor && !(name in this.constructor._optionDefinition)) {\n Ink.error('\"' + name + '\" is not an option for ' + this.constructor._name);\n return undefined;\n }\n\n return this._options[name];\n },\n\n /**\n * Sets an option's value\n *\n * @method getOption\n * @param name\n * @param value\n *\n * @example\n *\n * var myUIComponent = new Modal(...);\n * myUIComponent.setOption('trigger', '#some-element');\n **/\n setOption: function (name, value) {\n if (this.constructor && !(name in this.constructor._optionDefinition)) {\n Ink.error('\"' + name + ' is not an option for ' + this.constructor._name);\n return;\n }\n\n this._options[name] = value;\n },\n\n /**\n * Get the element associated with an UI component (IE the one you used in the constructor)\n *\n * @method getElement\n * @return {Element} The component's element.\n *\n * @example\n * var myUIComponent = new Modal('#element'); // or anything else inheriting BaseUIComponent\n * myUIComponent.getElement(); // -> The '#element' (not the selector string, mind you).\n *\n **/\n getElement: function () {\n return this._element;\n }\n });\n\n Common.BaseUIComponent = BaseUIComponent;\n\n /**\n * @method createUIComponent\n * @param theConstructor UI component constructor. It should have an _init function in its prototype, an _optionDefinition object, and a _name property indicating its name.\n * @param options\n * @param [options.elementIsOptional=false] Whether the element argument is optional (For example, when the component might work on existing markup or create its own).\n **/\n Common.createUIComponent = function createUIComponent(theConstructor, options) {\n theConstructor._componentOptions = options || {};\n\n function assert(test, msg) {\n if (!test) {\n throw new Error('Ink.UI_1.createUIComponent: ' + msg);\n }\n }\n\n function assertProp(prop, propType, message) {\n var propVal = theConstructor[prop];\n // Check that the property was passed\n assert(typeof propVal !== 'undefined',\n theConstructor + ' doesn\\'t have a \"' + prop + '\" property. ' + message);\n // Check that its type is correct\n assert(propType && typeof propVal === propType,\n 'typeof ' + theConstructor + '.' + prop + ' is not \"' + propType + '\". ' + message);\n }\n\n assert(typeof theConstructor === 'function',\n 'constructor argument is not a function!');\n\n assertProp('_name', 'string', 'This property is used for error ' +\n 'messages. Set it to the full module path and version (Ink.My.Module_1).');\n assertProp('_optionDefinition', 'object', 'This property contains the ' +\n 'option names, types and defaults. See Ink.UI.Common.options() for reference.');\n\n // Extend the instance methods and props\n var _oldProto = theConstructor.prototype;\n\n if (typeof Object.create === 'function') {\n theConstructor.prototype = Object.create(BaseUIComponent.prototype);\n } else {\n theConstructor.prototype = (function hideF() {\n function F() {}\n F.prototype = BaseUIComponent.prototype;\n return new F();\n }());\n }\n\n Ink.extendObj(theConstructor.prototype, _oldProto);\n theConstructor.prototype.constructor = theConstructor;\n // Extend static methods\n Ink.extendObj(theConstructor, BaseUIComponent);\n };\n\n return Common;\n\n});\n","/**\n * Date selector\n * @module Ink.UI.DatePicker_1\n * @version 1\n */\n\nInk.createModule('Ink.UI.DatePicker', '1', ['Ink.UI.Common_1','Ink.Dom.Event_1','Ink.Dom.Css_1','Ink.Dom.Element_1','Ink.Dom.Selector_1','Ink.Util.Array_1','Ink.Util.Date_1', 'Ink.Dom.Browser_1'], function(Common, Event, Css, InkElement, Selector, InkArray, InkDate ) {\n 'use strict';\n\n // Clamp a number into a min/max limit\n function clamp(n, min, max) {\n if (n > max) { n = max; }\n if (n < min) { n = min; }\n\n return n;\n }\n\n function dateishFromYMDString(YMD) {\n var split = YMD.split('-');\n return dateishFromYMD(+split[0], +split[1] - 1, +split[2]);\n }\n\n function dateishFromYMD(year, month, day) {\n return {_year: year, _month: month, _day: day};\n }\n\n function dateishFromDate(date) {\n return {_year: date.getFullYear(), _month: date.getMonth(), _day: date.getDate()};\n }\n\n /**\n * @class Ink.UI.DatePicker\n * @constructor\n * @version 1\n *\n * @param {String|DOMElement} selector\n * @param {Object} [options] Options\n * @param {Boolean} [options.autoOpen] Flag to automatically open the datepicker.\n * @param {String} [options.cleanText] Text for the clean button. Defaults to 'Clear'.\n * @param {String} [options.closeText] Text for the close button. Defaults to 'Close'.\n * @param {String} [options.cssClass] CSS class to be applied on the datepicker\n * @param {String|DOMElement} [options.pickerField] (if not using in an input[type=\"text\"]) Element which displays the DatePicker when clicked. Defaults to an \"open\" link.\n * @param {String} [options.dateRange] Enforce limits to year, month and day for the Date, ex: '1990-08-25:2020-11'\n * @param {Boolean} [options.displayInSelect] Flag to display the component in a select element.\n * @param {String|DOMElement} [options.dayField] (if using options.displayInSelect) `select` field with days.\n * @param {String|DOMElement} [options.monthField] (if using options.displayInSelect) `select` field with months.\n * @param {String|DOMElement} [options.yearField] (if using options.displayInSelect) `select` field with years.\n * @param {String} [options.format] Date format string\n * @param {Object} [options.month] Hash of month names. Defaults to portuguese month names. January is 1.\n * @param {String} [options.nextLinkText] Text for the previous button. Defaults to '«'.\n * @param {String} [options.ofText] Text to show between month and year. Defaults to ' of '.\n * @param {Boolean} [options.onFocus] If the datepicker should open when the target element is focused. Defaults to true.\n * @param {Function} [options.onMonthSelected] Callback to execute when the month is selected.\n * @param {Function} [options.onSetDate] Callback to execute when the date is set.\n * @param {Function} [options.onYearSelected] Callback to execute when the year is selected.\n * @param {String} [options.position] Position for the datepicker. Either 'right' or 'bottom'. Defaults to 'right'.\n * @param {String} [options.prevLinkText] Text for the previous button. Defaults to '«'.\n * @param {Boolean} [options.showClean] If the clean button should be visible. Defaults to true.\n * @param {Boolean} [options.showClose] If the close button should be visible. Defaults to true.\n * @param {Boolean} [options.shy] If the datepicker should start automatically. Defaults to true.\n * @param {String} [options.startDate] Date to define initial month. Must be in yyyy-mm-dd format.\n * @param {Number} [options.startWeekDay] First day of the week. Sunday is zero. Defaults to 1 (Monday).\n * @param {Function} [options.validYearFn] Callback to execute when 'rendering' the month (in the month view)\n * @param {Function} [options.validMonthFn] Callback to execute when 'rendering' the month (in the month view)\n * @param {Function} [options.validDayFn] Callback to execute when 'rendering' the day (in the month view)\n * @param {Function} [options.nextValidDateFn] Function to calculate the next valid date, given the current. Useful when there's invalid dates or time frames.\n * @param {Function} [options.prevValidDateFn] Function to calculate the previous valid date, given the current. Useful when there's invalid dates or time frames.\n * @param {Object} [options.wDay] Hash of week day names. Sunday is 0. Defaults to { 0:'Sunday', 1:'Monday', etc...\n * @param {String} [options.yearRange] Enforce limits to year for the Date, ex: '1990:2020' (deprecated)\n *\n * @sample Ink_UI_DatePicker_1.html\n */\n var DatePicker = function() {\n Common.BaseUIComponent.apply(this, arguments);\n };\n\n DatePicker._name = 'DatePicker_1';\n\n DatePicker._optionDefinition = {\n autoOpen: ['Boolean', false],\n cleanText: ['String', 'Clear'],\n closeText: ['String', 'Close'],\n pickerField: ['Element', null],\n containerElement:['Element', null],\n cssClass: ['String', 'ink-calendar bottom'],\n dateRange: ['String', null],\n \n // use this in a