/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
; (function (global, $, undefined) {
	"use strict";
	//CHECK IF NAMESPACE EXISTS 
	if (typeof (Telerik) != "undefined" && typeof (Telerik.Utilities) != "undefined") throw new Error("Telerik scripts already loaded! Check for duplicate script tags.");
	var win = WinJS,
        define = win.Class.define,
        derive = win.Class.derive,
        mix = win.Class.mix,
        namespace = win.Namespace.define,
        resources = win.Resources,
		STRING = "string",
		NUMBER = "number",
		BOOLEAN = "boolean",
		ARRAY = "array",
		OBJECT = "object",
		FUNCTION = "function",
		REGEXP = "regexp",
		NULL = null,
		NOOP = function () { },
		DOT = ".",
		extend = $.extend,
		getProto = Object.getPrototypeOf,
		keys = Object.keys,
		prop = Object.defineProperty,
		unsafe = MSApp.execUnsafeLocalFunction,
			telerik = namespace("Telerik", {
				Error: derive(Error, function (name, message) {
					/// <summary>
					/// Represents a Telerik-specific error with a name and message
					/// </summary>
	})
			}),
			localization = namespace("Telerik.Localization", {
				cultures: {
					"en-US": {
					}
				},
				_strings: {
					elementIsInvalid: "Invalid argument: the control expects a valid DOM element as the first argument.",
					pageContainerIsInvalid: "Invalid page container.",
					pageableControlIsInvalid: "Invalid argument: the function expects a valid constructor function as the first argument.",
					pageProviderIsInvalid: "Invalid argument: the function expects a valid constructor deriving from Telerik.UI.Pagination.PageProvider as the second argument."
				},
				_getString: function (key) {
					var resource = resources.getString(key);
					if (resource.empty) {
						var keys = key.split("/"),
							strings = this["_" + keys[0]];
						if (!strings) {
							return undefined;
						}
						resource = strings[keys[1]];
					}
					else {
						resource = resource.value;
					}
					return resource;
				}
			}),
			util = namespace("Telerik.Utilities", {
				getPropertyValue: function (obj, property) {
					/// <summary>
					/// Retrieves a property value from an object. Supports retrieving sub-properties.
					/// </summary>
					/// <param name="obj" type="Object">The object whose property to retrieve.</param>
					/// <param name="property" type="String">The name of the property to retrieve.</param>
					/// <returns type="Object">The property value</returns>
					property = property.replace(/\[('|\")?/g, ".").replace(/('|\")?\]/g, "");
					if (property.indexOf(DOT) > 0) {
						var props = property.split(DOT),
							sub = obj;
						while (props.length > 1) {
							var prop = props.shift();
							if (typeof sub[prop] !== OBJECT) {
								return undefined
							}
							sub = sub[prop];
						}
						return sub[props.shift()];
					}
					return obj[property];
				},
				setPropertyValue: function (obj, property, value) {
					/// <summary>
					/// Sets the specified value to a property. Supports setting sub-property values.
					/// </summary>
					/// <param name="obj" type="Object">The object whose property will be set.</param>
					/// <param name="property" type="String">The name of the property to set.</param>
					/// <param name="value" type="Object">The value to set.</param>
					property = property.replace(/\[('|\")?/g, ".").replace(/('|\")?\]/g, "");
					if (property.indexOf(DOT) > 0) {
						var props = property.split(DOT),
							sub = obj;
						while (props.length > 1) {
							var prop = props.shift();
							if (typeof sub[prop] !== OBJECT) {
								if (props.length && props[0] === +props[0] + "") { //next property is an array index
									props[0] = +props[0];
									sub[prop] = [];
								}
								else {
									sub[prop] = {};
								}
							}
							sub = sub[prop];
						}
						sub[props.shift()] = value;
					}
					else {
						obj[property] = value;
					}
				},
				getType: function (value) {
					/// <summary>
					/// Returns the type of the specified value as a string.
					/// </summary>
					/// <param name="value">The value whose type to retreive</param>
					/// <returns type="String">The type name string</returns>
					return Object.prototype.toString.call(value).split(" ")[1].split("]")[0].toLowerCase();
				},
				setPrivate: function (obj, property, value, writable) {
					/// <summary>
					/// Creates or assignes a private property (enumerable=false) to an object)
					/// </summary>
					/// <param name="obj" type="Object">The object that will receive the property.</param>
					/// <param name="property" type="String">The name of the property.</param>
					/// <param name="value" type="Object">The value of the property.</param>
					/// <param name="writable" type="Boolean" optional="true">Optional. Indicates whether the property should be writable. Default is read-only.</param>
					/// <returns type="Object">The value, which was set</returns>
					var desc = Object.getOwnPropertyDescriptor(obj, property);
					if (desc) {
						obj[property] = value;
					}
					else {
						prop(obj, property, {
							value: value,
							writable: !!writable
						});
					}
					return value;
				},
				merge: function (to, from) {
					/// <summary>
					/// Recursively merges properties from a source object to a target object.
					/// </summary>
					/// <param name="to" type="Object">The target object that will receive the properties of the source.</param>
					/// <param name="from" type="Object">The source object that will have its properties recursively copied.</param>
					var target = arguments[0] || {},
						types = [OBJECT, ARRAY],
						getType = this.getType;
					//support arbitrary number of arguments to merge
					for (var i = 1, len = arguments.length; i < len; i++) {
						var source = arguments[i];
						if (types.indexOf(getType(source)) < 0) {
							continue;
						}
						for (var key in source) {
							var sourceValue = source[key],
								targetValue = target[key],
								sourceType = getType(sourceValue),
								targetType = getType(targetValue);
							//break never-ending loop
							if (sourceValue === targetValue) {
								continue;
							}
							//recursively merge properties of inner objects
							if (types.indexOf(sourceType) >= 0) {
								var newObj = sourceType === OBJECT ? {} : [];
								if (targetType !== sourceType) {
									targetValue = target[key] = newObj;
								}
								this.merge(targetValue, sourceValue);
							}
								//if value is non-null copy directly to target
							else if (sourceValue !== undefined) {
								target[key] = sourceValue;
							}
						}
					}
					return target;
				},
				clone: function (toClone, excludes, constructors, replacer) {
					/// <summary>
					/// Returns a clone of the specified object. Performs a deep clone with the ability
					/// to copy instances of objects directly and to exclude properties from cloning. An optional
					/// replacer function can be provided that will be called with each key and value pair recursively. If
					/// the function returns a non-undefined value, the value will be copied instead of the original value.
					/// </summary>
					/// <param name="toClone" type="Object">The object to clone.</param>
					/// <param name="excludes" type="Array" elementType="String" optional="true">Optional. An array of properties (can be nested) to ignore when cloning.</param>
					/// <param name="constructors" type="Array" elementType="Function" optional="true">Optional. An array of constructor functions whose instances to copy directly without cloning.</param>					
					/// <param name="replacer" type="Function" optional="true">A function that will be called with each key and value pair.</param>
					var that = this,
						ex = excludes || [],
						cons = constructors || [],
						clone = that.getType(toClone) === ARRAY ? [] : {};
					if (!toClone || typeof toClone !== OBJECT) {
						//do not clone if argument is not an object
						return toClone;
					}
					if (cons.indexOf(Date) < 0) {
						//instances of Date should be copied directly and not recursed
						cons.push(Date);
					}
					(function iterator(clone, toClone, cons, ex) {
						for (var key in toClone) {
							if (ex.indexOf(key) > -1) {
								continue;
							}
							var value = toClone[key],
								replaced = false;
							//call the replacer function if it's defined
							if (replacer) {
								var replacedValue = replacer(key, value, toClone);
								replaced = value !== replacedValue;
								value = replacedValue;
							}
							//recurse only if the replacer function returned a different value
							if (value && typeof value === OBJECT && !replaced) {
								var copy = false;
								//copy object directly if it's an instance of one of the specified constructors
								for (var i = 0, len = cons.length; i < len; i++) {
									if (value instanceof cons[i]) {
										copy = true;
										break;
									}
								}
								//filter all compound excluded keys and reduce the array to a set of keys 
								//that apply to the inner call to iterator() that follows (e.g. ["key.subkey"] -> ["subkey"])
								var subex = ex.reduce(function (arr, exkey) {
									var parts = exkey.split(".");
									if (parts.indexOf(key) > -1) {
										var subkey = parts.slice(1).join(".");
										if (subkey) {
											arr.push(subkey);
										}
									}
									return arr;
								}, []);
								value = copy ? value : iterator(that.getType(value) === ARRAY ? [] : {}, value, cons, subex);
							}
							//copy the value ony if it's defined
							if (value !== undefined) {
								clone[key] = value;
							}
						}
						return clone;
					})(clone, toClone, cons, ex);
					return clone;
				},
				htmlToString: function (nodes) {
					/// <summary>
					/// Convert the specified HTML element or list of HTML elements to string.
					/// </summary>
					/// <param name="nodes">An HTML element or a list of HTML elements.</param>
					return $("<div></div>").append(nodes).html();
				},
				getTemplate: function (templateObject, asString) {
					/// <summary>
					/// Converts one of the supported template types to a common executable template function. The result function accepts
					/// a data object passed to the template and returns the rendered HTML content.
					/// </summary>
					/// <param name="templateObject" type="Object">
					/// WinJS.Binding.Template instance, HTML element hosting a WinJS.Binding.Template, 
					/// a function, or a string defining a template.
					/// </param>				
					/// <param name="asString" type="Boolean" optional="true">
					/// Optional. If set to true, the returned template function returns the resulting HTML as a string. By default, the 
					/// type of the resulting HTML depends on the original template object passed to this function.
					/// </param>
					/// <returns type="Function"></returns>
					var templateFunc,
						toStr = function (content) {
							var result = content;
							//convert content to string, if required
							if (asString && typeof content !== STRING) {
								try {
									result = Telerik.Utilities.htmlToString($(content));
								}
								catch (e) {
									result = document.createTextNode(content).textContent;
								}
							}
							return result;
						};
					if (templateObject === NULL) {
						return NULL;
					}
					if (!templateObject) {
						return undefined;
					}
					//templateObject is a plain function that accepts data and returns HTML (string or DOM)
					if (typeof templateObject === FUNCTION) {
						templateFunc = function (data) {
							return toStr(templateObject(data));
						};
					}
						//templateObject is a string - treat as kendo template string
					else if (typeof templateObject === STRING) {
						templateFunc = function (data) {
							return toStr(templateFunc._kendoTemplate(data));
						}
						//compile the kendo template for reuse
						templateFunc._kendoTemplate = kendo.template(templateObject);
					}
						//templateObject is an instance of WinJS.Binding.Template, or a host element
					else {
						var template = templateObject.getAttribute && templateObject.winControl ? templateObject.winControl : templateObject;
						if (template instanceof WinJS.Binding.Template) {
							templateFunc = function (data) {
								//WARNING: The binding architecture in WinJS doesn't like kendo's observable objects.
								//If the data is not JSON-ized, the render() method below never completes.							
								data = data instanceof kendo.data.ObservableObject ? data.toJSON() : data;
								var host = document.createElement(template.element.tagName),
									result = [];
								template.render(data, host).then(function (element) {
									var child = element.firstElementChild;
									while (child) {
										result.push(child);
										child = child.nextElementSibling;
									}
								});
								return toStr(result);
							}
						}
					}
					if (templateFunc) {
						//save original template object for internal access
						templateFunc._originalTemplate = templateObject;
					}
					return templateFunc || undefined;
				},
				/// <summary>
				/// Converts array like object to array.
				/// </summary>
				/// <param name="obj" type="Object">Object to convert in array</param>
				/// <returns type="Array"></returns>
				makeArray: function (obj) {
					return obj != null ?
						(util.getType(obj) === "array" ? obj : [obj]) :
						[];
				},
				intersection: function (left, right) {
					/// <summary>
					/// Returns the intersection of two arrays or array-like objects that have zero-indexed numeric fields and a length field. 
					/// </summary>
					/// <param name="left" type="Array"></param>
					/// <param name="right" type="Array"></param>
					/// <returns type="Array"></returns>
					var ret = [];
					for (var i = 0, len = left.length; i < len; i++) {
						var val = left[i];
						if (ret.indexOf(val) < 0 && right.indexOf(val) > -1) {
							ret.push(val);
						}
					}
					return ret;
				},
				//common validator functions
				_validators: {
					unifiedTemplate: function (value) {
						//if value can be converted to a unified template function, accept it
						return util.getTemplate(value, true) !== undefined ? value : undefined;
					},
					stringOrUnifiedTemplate: function (value) {
						//if value is a string, accept it, otherwise try to convert to a unified template function
						return typeof value === "string" ? value : util.getTemplate(value, true);
					}
				},
				toString: function(object, format, culture) {
					/// <summary>
					/// Returns a string representation of the current object taking into account the given format and culture.
					/// </summary>
					/// <param name="object" type="Object"></param>
					/// <param name="format" type="String"></param>
					/// <param name="culture" type="String"></param>
					/// <returns type="String">String representation of the formatted value.</returns>
					// To support composite formatting: {0:c}
					format = kendo._extractFormat(format);
					if (culture) {
						Telerik.Culture._checkCulture(culture);
					}
					return kendo.toString(object, format, culture);
				},
				format: function() {
					/// <summary>
					/// Replaces each format item in a specified string with the text equivalent of a corresponding object's value.
					/// Example: Telerik.Utilities.format("{0:c} - {1:c}", 12, 24) //$12.00 - $24.00
					/// </summary>
					/// <returns type="String">The formatted string.</returns>
					return kendo.format.apply(this, arguments);
				}
			}),
			priv = util.setPrivate,
			ui = namespace("Telerik.UI"),
			common = namespace("Telerik.UI.Common", {
				EventBase: define(function (type, target, extended) {
					/// <summary>
					/// Represents an event object for an event thrown by a control.
					/// </summary>
					/// <param name="type" type="String">The type (name) of the event.</param>
					/// <param name="target" type="Object">The event target object.</param>
					/// <param name="extended" type="Object">An object specifying additional details for this event.</param>
}, {
					target: NULL,
					timeStamp: NULL,
					type: NULL,
					bubbles: { value: false, writable: false },
					cancelable: { value: false, writable: false },
					trusted: { value: false, writable: false },
					eventPhase: { value: 0, writable: false },
					currentTarget: {get:function(){}},
					defaultPrevented: {get:function(){}},
					isDefaultPrevented: function () {
},
					preventDefault: function () {
},
					stopImmediatePropagation: function () {
},
					stopPropagation: function () {
}
				}),
				eventMixin: {
					addEventListener: function (type, listener, useCapture) {
						/// <summary>
						/// Adds an event listener that will be called when the specified event is raised.
						/// </summary>
						/// <param name="type" type="string">The type (name) of the event.</param>
						/// <param name="listener" type="function">The listener to invoke when the event gets raised.</param>
						/// <param name="useCapture" type="boolean">If true, initiates capture, otherwise false.</param>
						var that = this,
							events = that._events ? that._events : priv(that, "_events", {}),
							listeners = (events[type] = events[type] || []);
						for (var i = 0, len = listeners.length; i < len; i++) {
							var item = listeners[i];
							if (item.capture === !!useCapture && item.handler === listener) {
								return;
							}
						}
						listeners.push({ capture: !!useCapture, handler: listener });
					},
					removeEventListener: function (type, listener, useCapture) {
						/// <summary>
						/// Removes an event listener for the specified event.
						/// </summary>
						/// <param name="type" type="string">The type (name) of the event.</param>
						/// <param name="listener" type="function">The listener to remove.</param>
						/// <param name="useCapture" type="boolean">Specifies a capturing listener.</param>
						var that = this,
							events = that._events ? that._events : priv(that, "_events", {}),
							listeners = events[type];
						if (listeners) {
							for (var i = 0, len = listeners.length; i < len; i++) {
								var item = listeners[i];
								if (item.handler === listener && item.capture === !!useCapture) {
									listeners.splice(i, 1);
									if (!listeners.length) {
										delete events[type];
									}
									break;
								}
							}
						}
					},
					dispatchEvent: function (type, details) {
						/// <summary>
						/// Raises an event of the specified type and with the specified additional properties.
						/// </summary>
						/// <param name="type" type="string">The type (name) of the event.</param>
						/// <param name="details" type="object">The event details object.</param>
						var that = this,
							events = that._events ? that._events : priv(that, "_events", {}),
							listeners = events[type];
						if (listeners) {
							var listenersCopy = listeners.slice(0, listeners.length),
								evt = new common.EventBase(type, that, details);
							for (var i = 0, len = listenersCopy.length; i < len && !evt._stopImmediatePropagationCalled; i++) {
								listenersCopy[i].handler(evt);
							}
							return evt.defaultPrevented;
						}
						return false;
					},
					_disposeEvents: function () {
						var that = this,
							events = that._events || {};
						for (var evt in events) {
							delete events[evt];
						}
					}
				}
			});
	var GC_DISPOSE_WINDOW = 2000; // ms to wait before running the "garbage collector".
	var gcActiveControls = []; // array containing all active Telerik controls
	var gcTimeout = null;
	function gcRun() {
		gcTimeout = null;
		gcActiveControls = gcActiveControls.filter(function filter_activeControls(control) {
			if (control._gcCheck()) {
				//dispose orphaned control
				if (typeof (control._destroy) === "function") control._destroy();
				return false;
			}
			return true;
		});
	}
	function gcNotify(control) {
		gcActiveControls.push(control);
		if (gcTimeout != null) clearTimeout(gcTimeout);
		gcTimeout = setTimeout(gcRun, GC_DISPOSE_WINDOW);
	}
	/// <summary>
	/// Defines an object that can be disposed. For internal use only!
	/// </summary>
	var _Disposable = define(function Disposable_constructor(element, options) {
		/// <summary>
		/// Internal use only.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
},
	{
		});
	
	/// <summary>
	/// Serves as a base class for all Telerik.UI controls.
	/// </summary>
	/// <excludetoc />
	var Control = derive(_Disposable, function (element, options) {
		/// <summary>
		/// Internal use only.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
		/// <field type="HTMLElement" domElement="true" hidden="true">
		/// Gets the DOM element that hosts this control.
		/// </field>
		element: NULL,
		/// <field type="Boolean" readonly="true" hidden="true">
		/// Indicates whether the control is initialized.
		/// </field>
		initialized: {get:function(){}},
		});
	mix(Control, common.eventMixin);
	function isControlConfigurationType(func) {
		var proto = func.prototype;
		while (proto) {
			if (proto === _ControlConfiguration.prototype) {
				return true;
			}
			proto = getProto(proto);
		}
		return false;
	}
	//check if the specified object is an instance of WinJS.Binding.List or a
	//WinJS.Binding.List.dataSource instance and retrieve the list object
	function getBindingList(dataSource) {
		if (dataSource instanceof WinJS.Binding.List) {
			return dataSource;
		}
		else if (dataSource && typeof dataSource.createListBinding === FUNCTION && dataSource.list instanceof win.Binding.List) {
			return dataSource.list;
		}
		return undefined;
	}
	function replaceOptions(key, value) {
		if (util.getType(value) === OBJECT) {
			var bList = getBindingList(value);
			if (bList) {
				return bList;
			}
			if (value instanceof _ControlConfiguration) {
				return value._toOption();
			}
			//convert options received from data-win-options attributes
			//into plain objects that can recognize configuration type definitions
			//like { prop: { type:Telerik.UI._ControlConfiguration } }
			if (value && typeof value.type === FUNCTION && isControlConfigurationType(value.type)) {
				var config = new value.type();
				delete value.type;
				config._modified = value;
				return config._toOption();
			}
		}
		return value;
	}
	//gathers all properties of type object from all prototypes in the prototype chain
	function mergeAcrossPrototypes(obj, property) {
		var value = obj[property];
		if (typeof value === OBJECT) {
			var proto = obj.constructor.prototype;
			while (proto) {
				var protoValue = proto[property];
				if (protoValue !== value && typeof protoValue === OBJECT && keys(protoValue).length) {
					value = extend(true, {}, protoValue, value);
				}
				proto = getProto(proto);
			}
		}
		return value;
	}
	function mapDataSourceEvents(wrapper, dataSourceOptions) {
		var map = Telerik.Data.DataSource.prototype._eventsMap;
		keys(map).forEach(function (eventName) {
			var shortEventName = eventName.substr(2),
				handler = dataSourceOptions[eventName];
			if (typeof handler === FUNCTION) {
				//register an event handler to the kendo.data.DataSource
				dataSourceOptions[map[eventName]] = function mappingHandler(e) {
					//register and dispatch the event through the DataSource component
					var kendoDS = e.sender,
						justCreated = !(wrapper._dataSource instanceof Telerik.Data.DataSource),
						dataSource = wrapper.dataSource;
					if (!dataSource) {
						dataSource = new Telerik.Data.DataSource(kendoDS);
						priv(wrapper, "_dataSource", dataSource, true);
					}
					//register the original handler if it is not already registered for this event
					dataSource.addEventListener(shortEventName, handler);
					//remove this mapping handler from the kendo data source
					kendoDS.unbind(map[eventName], mappingHandler);
					//if the Telerik.Data.DataSource instance is just created, dispatch the event explicitly,
					//as the dataSource won't dispatch this event after this point
					if (justCreated) {
						var dispatchArgs = Array.apply(NULL, arguments);
						dispatchArgs.unshift(shortEventName);
						dataSource.dispatchEvent.apply(dataSource, dispatchArgs);
					}
				}
				//delete original field (eg."ondatabinding"), as now we have "dataBinding" in its place going to the widget
				delete dataSourceOptions[eventName];
			}
		});
	}
	/// <excludetoc />
	var WidgetWrapper = derive(Control, function (element, options) {
		/// <summary>
		/// Serves as a base class for all widget wrapper controls.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
	});
	///<excludetoc />
	var _ControlConfiguration = define(function (owner, parentMapping, defaults, onchange) {
		/// <summary>
		/// For internal usage only.
		/// </summary>
}, {
		}, {
		createGetter: function (key, defaultValue) {
			return function () {
				var that = this;
				if (!that._initialized) {
					return defaultValue;
				}
				var owner = that instanceof WidgetWrapper ? that : that._owner,
					widget = owner && owner._widget ? owner._widget : NULL,
					value = that._modified[key],
					def = that._defaults[key] !== undefined ? that._defaults[key] : defaultValue,
					mappedKey = (that._optionsMap || {})[key] || key;
				if (value !== undefined) {
					return value;
				}
				if (typeof def === FUNCTION) {
					def = def.call(that, key);
				}
				if (!widget) {
					if (that._seriesOption) {
						//value = that._seriesOption[key];
						value = util.getPropertyValue(that._seriesOption, mappedKey);
						if (value !== undefined) {
							return value;
						}
					}
					value = def;
				}
				else {
					var mapping = typeof that._parentMapping === FUNCTION ? that._parentMapping() : that._parentMapping,
				        mapped = mapping ? mapping + "." + mappedKey : mappedKey;
					value = util.getPropertyValue(widget.options, mapped);
					if (value === undefined) {
						value = def;
					}
				}
				if (value === defaultValue && util.getType(value) === ARRAY) {
					value = that._modified[key] = Array.apply(NULL, value);
				}
				return value;
			}
		},
		createSetter: function (key) {
			return function (value) {
				var that = this,
					oldValue = that[key],
					value = _ControlConfiguration.validate(that._validators || {}, key, value, oldValue);
				//quit if validation fails or value is default
				if (value === undefined || value === oldValue) {
					return;
				}
				that._modified[key] = value;
				if (that._onchange) {
					that._onchange({
						key: key,
						value: value,
						oldValue: oldValue
					});
				}
			}
		},
		defineProperty: function (key, defaultValue) {
			return {
				get: _ControlConfiguration.createGetter(key, defaultValue),
				set: _ControlConfiguration.createSetter(key),
				enumerable: true,
				configurable: false
			}
		},
		convert: function (value, type) {
			var currentType = util.getType(value);
			if (currentType !== type) {
				if (type === STRING) {
					value = value + "";
				}
				else if (type === NUMBER) {
					value = parseFloat(value);
					if (isNaN(value)) {
						return; //invalid value
					}
				}
				else if (type === BOOLEAN) {
					value = !!value;
				}
				else {
					//all other type mismatches are invalid
					return;
				}
			}
			return value;
		},
		validate: function (validators, key, value, oldValue) {
			var that = this,
				type = util.getType(value),
				defaultType = util.getType(oldValue),
				validator = util.getPropertyValue(validators, key),
				isTypeValidator = validator && validator.hasOwnProperty("type"),
				validatorType = util.getType(validator);
			if (type !== defaultType && !isTypeValidator && validatorType !== FUNCTION) {
				//try to convert between types to get value in required type.
				//DO NOT convert if there is a type validator for this property,
				//or if the validator is a custom function. In this case,
				//we will validate the type further down.
				value = that.convert(value, defaultType);
			}
			if (value === undefined) {
				return;
			}
			//validate converted value, if a validator is registered for this property
			if (validator) {
				if (isTypeValidator) {
					var allowedTypes = util.getType(validator.type) === ARRAY ? validator.type : [validator.type],
						typeValid = false;
					for (var i = 0, len = allowedTypes.length; i < len; i++) {
						var allowedType = allowedTypes[i],
					        noconvert = allowedType.substr(allowedType.length - 10) === ":noconvert",
					        allowedType = noconvert ? allowedType.substr(0, allowedType.length - 10) : allowedType;
						if (type === allowedType) {
							typeValid = true;
							break;
						}
						if (!noconvert) {
							var converted = that.convert(value, allowedType);
							if (converted !== undefined) {
								typeValid = true;
								value = converted;
								break;
							}
						}
					}
					if (!typeValid) {
						return; //value type not among accepted types
					}
				}
				else if (validatorType === ARRAY && validator.indexOf(value) < 0) {
					return; //value not in the set of valid values
				}
				else if (validatorType === FUNCTION) {
					return validator(value); //validate through a custom function
				}
				else if (validatorType === REGEXP) {
					if (!validator.test(value)) {
						return; //value does not match regular expression
					}
				}
				else if (validator.hasOwnProperty("min") || validator.hasOwnProperty("max")) {
					if (validator.min && value < validator.min) {
						return; //min defined and value is less than min
					}
					if (validator.max && value > validator.max) {
						return; //max defined and value is greater than max
					}
				}
			}
			return value;
		},
		getMapping: function (config, key) {
			var mapping;
			if (config._optionsMap) {
				mapping = config._optionsMap[key];
				if (mapping) {
					return mapping;
				}
			}
			mapping = config._parentMapping;
			if (mapping) {
				if (typeof mapping === FUNCTION) {
					return function () {
						return mapping() + "." + key;
					}
				}
				return mapping + "." + key;
			}
			return key;
		}
	});
	namespace("Telerik.UI", {
		Control: Control,
		WidgetWrapper: WidgetWrapper,
		_ControlConfiguration: _ControlConfiguration,
		_Disposable: _Disposable,
		progress: function (element, show, modal) {
			/// <summary>
			/// Toggles a progress indicator over the specified element.
			/// </summary>
			/// <param name="element" type="HTMLElement">The target HTML element.</param>
			/// <param name="show" type="Boolean">Specifies whether to show or hide the progress indicator.</param>
			/// <param name="modal" type="Boolean" optional="true">Optional. Specifies whether to show a modal mask over the target element that prevents interaction.</param>
			$(element).each(function () {
				var elem = $(this),
					modal = modal || elem.hasClass("k-grid-content") || elem.hasClass("k-chart"),
					dataKey = "t-progress-id",
					data = elem.data(dataKey) || {},
					progress = $("#" + data.id);
				if (show) {
					if (!progress.length) {
						data.id = kendo.guid();
						data.position = elem[0].style.position;
						progress = $("<div class='t-progress'><div class='t-mask' /><progress /></div>").attr("id", data.id);
						elem.data(dataKey, data);
					}
					progress[modal ? "addClass" : "removeClass"]("t-modal");
					if (data.position !== "relative" && data.position !== "absolute") {
						elem.css("position", "relative");
					}
					elem.append(progress);
				}
				else {
					progress.remove();
					elem.css("position", data.position);
				}
			});
		}
	});
	//use our own progress UI
	kendo.ui.progress = Telerik.UI.progress;
	var defineProperty = _ControlConfiguration.defineProperty;
	namespace("Telerik.UI.Common", {
		_runGC: gcRun,
		_BorderConfiguration: derive(_ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of a border.
			/// </summary>
}, {
			/// <field type="String">Gets or sets the color of the border/line.</field>
			color: defineProperty("color", "black"),
			/// <field type="String" defaultValue="solid">
			/// Gets or sets the dash type of the border/line. Accepted valies are:
			/// "solid", "dot", "dash", "longDash", "dashDot", "longDashDot", "longDashDotDot"
			/// </field>
			/// <options>
			/// <option value="solid">solid</option>
			/// <option value="dot">dot</option>
			/// <option value="dash">dash</option>
			/// <option value="longDash">longDash</option>
			/// <option value="dashDot">dashDot</option>
			/// <option value="longDashDot">longDashDot</option>
			/// <option value="longDashDotDot">longDashDotDot</option>
			/// </options>
			dashType: defineProperty("dashType", "solid"),
			/// <field type="Number">Gets or sets the width of the border/line in pixels.</field>
			width: defineProperty("width", 0)
		}),
		_BoxConfiguration: derive(_ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of a bounding box such as padding or margin.
			/// </summary>
}, {
			/// <field type="Number">Gets or sets the left value.</field>
			left: defineProperty("left", 0),
			/// <field type="Number">Gets or sets the right value.</field>
			right: defineProperty("right", 0),
			/// <field type="Number">Gets or sets the top value.</field>
			top: defineProperty("top", 0),
			/// <field type="Number">Gets or sets the bottom value.</field>
			bottom: defineProperty("bottom", 0)
		})
	});
	//kendo overrides
	var oldRenderSVG = kendo.dataviz.renderSVG;
	kendo.dataviz.renderSVG = function (container, svg) {
		unsafe(function () {
			oldRenderSVG(container, svg);
		});
	};
	//kendo.support.scrollbar = function () {
	//	//same as kendo.support.scrollbar() but with added style -ms-overflow-style:scrollbar;
	//	var div = document.createElement("div"), result;
	//	div.style.cssText = "-ms-overflow-style:scrollbar;overflow:scroll;overflow-x:hidden;zoom:1;clear:both";
	//	div.innerHTML = "&nbsp;";
	//	document.body.appendChild(div);
	//	result = div.offsetWidth - div.scrollWidth;
	//	document.body.removeChild(div);
	//	return result;
	//};
	if (Windows && Windows.Devices && Windows.Devices.Input && Windows.Devices.Input.TouchCapabilities) {
		//var tc = new Windows.Devices.Input.TouchCapabilities();
		//kendo.support.kineticScrollNeeded = !!tc.touchPresent;
		//Kendo kinetic scroll is pretty broken
		kendo.support.kineticScrollNeeded = false;
	}
	//jQuery animation extends
	extend($.easing, {
		easeInOutSine: function (unused, time, start, end, duration) {
			return -end / 2 * (Math.cos(Math.PI * time / duration) - 1) + start;
		}
	});
})(this, jQuery);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.8.3.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
        namespace = win.Namespace.define,
		globalization = Windows.Globalization,
		calendarIdentifier = globalization.CalendarIdentifiers.gregorian,
		NUMBER = "number",
		twenty = "24HourClock",
		twelve = "12HourClock";
	namespace("Telerik.Culture", {
		_current: "en-US",
		setCurrent: function (culture, twentyFourHour) {
			/// <summary>
			/// Set global current culture.
			/// </summary>
			/// <param name="culture" type="String">BCP-47 language tag with language and region. For example: en-US, fr-FR, ar-KW</param>
			/// <param name="twentyFourHour" type="Boolean" optional="true">Optional. Indicates whether the clock is 24 hour format. Default value is set according to the culture.</param>
			var that = this;
			if (culture) {
				that._current = culture;
			}
			that.getCultureInfo(culture, twentyFourHour);
			kendo.culture(culture);
		},
		getCurrent: function () {
			/// <summary>
			/// Get the current culture.
			/// </summary>
			return this._current;
		},
		getCultureInfo: function (culture, twentyFourHour) {
			/// <summary>
			/// Create culture object (if it doesn't already exists).
			/// </summary>
			/// <param name="culture" type="String">BCP-47 language tag with language and region. For example: en-US, fr-FR, ar-KW</param>
			/// <param name="twentyFourHour" type="Boolean" optional="true">Optional. Indicates whether the clock is 24 hour format. Default is 12 hour format.</param>
			/// <returns type="Object">Culture object</returns>
			var cultures = kendo.cultures;
			if (twentyFourHour === undefined) {
				twentyFourHour = clockFormat(twentyFourHour, culture);
			}
			if (cultures[culture] && cultures[culture].twentyFourHour === twentyFourHour) {
				return cultures[culture];
			}
			var kendoCulture = buildKendoCulture(culture, twentyFourHour);
			cultures[culture] = kendoCulture;
			return cultures[culture];
		},
		setCultureInfo: function (culture, object) {
			/// <summary>
			/// Set culture object.
			/// </summary>
			/// <param name="culture" type="String">BCP-47 language tag with language and region. For example: en-US, fr-FR, ar-KW</param>
			/// <param name="object" type="Object">Culture object to set</param>
			object = object || {};
			kendo.cultures[culture] = object;
		},
		/// <excludetoc />
		_checkCulture: function (culture) {
			if (!kendo.cultures[culture]) {
				this.getCultureInfo(culture);
			}
		}
	});
	function getRegion(culture) {
		var parts, len;
		parts = culture.split("-");
		len = parts.length;
		return len > 3 ? parts[3] : parts[len-1];
	}
	function returnPeriod(hour, culture) {
		var formatter = new globalization.DateTimeFormatting.DateTimeFormatter( "{period.abbreviated}",  [culture], getRegion(culture), calendarIdentifier, globalization.ClockIdentifiers["twelveHour"] ),
			period = formatter.format( new Date(2003, 1, 2, hour) );
		return period;
	}
	function clockFormat(twentyFourHour, culture) {
		var period = returnPeriod(1, culture);
		if (period.length > 0) {
			twentyFourHour = false;
		} else {
			twentyFourHour = true;
		}
		return twentyFourHour;
	}
	function buildKendoCulture(culture, twentyFourHour) {
		var region = getRegion(culture),
			numberFormatting = globalization.NumberFormatting,
			// Number formatters
			decimalFormatter = new numberFormatting.DecimalFormatter( [culture], region ),
			percentFormatter = new numberFormatting.PercentFormatter( [culture], region ),
			currencyFormatter = new numberFormatting.CurrencyFormatter( currency(culture), [culture], region ),
			// Clock identifiers
			clockToIdentifier = twentyFourHour ? "twentyFourHour" : "twelveHour",
			clockIdentifier = globalization.ClockIdentifiers[clockToIdentifier],
			defaultNumberFraction = decimalFormatter.fractionDigits,
			defaultPercentFraction = percentFormatter.fractionDigits,
			defaultCurrencyFraction = currencyFormatter.fractionDigits,
			kendoCulture = {},
			symbols = {p: "", c: ""},
			group, separator, dateMap, timeMap, mapKendoPatterns;
		dateMap = {
			// Date patterns
			"{day.integer(2)}": "dd",
			"{day.integer}": "d",
			"{dayofweek.abbreviated(2)}/{dayofweek.abbreviated}/{dayofweek.solo.abbreviated(2)}/{dayofweek.solo.abbreviated}": "ddd",
			"{dayofweek.full}/{dayofweek.solo.full}": "dddd",
			"{month.integer(2)}": "MM",
			"{month.integer}": "M",
			"{month.abbreviated(2)}/{month.abbreviated}/{month.solo.abbreviated(2)}/{month.solo.abbreviated}": "MMM",
			"{month.full}/{month.solo.full}": "MMMM",
			"{year.abbreviated(2)}/{year.abbreviated}": "yy",
			"{year.full}": "yyyy"
		}
		timeMap = {
			// Time patterns
			"{hour.integer(2)}": "hh",
			"{hour.integer}": "h",
			"{minute.integer(2)}": "mm",
			"{minute.integer}": "m",
			"{second.integer(2)}": "ss",
			"{second.integer}": "s",
			"{period.abbreviated}": "tt"
		}
		mapKendoPatterns = {
			// short date pattern
			d: { date: "shortdate" },
			// long date pattern
			D: { date: "longdate" },
			// Full date/time pattern
			F: {
				date: "longdate",
				time: "longtime"
			},
			// General date/time pattern (short time)
			g: {
				date: "day month.numeric year.full",
				time: "hour minute"
			},
			// General date/time pattern (long time)
			G: {
				date: "day month.numeric year.full",
				time: "hour minute second"
			},
			// Month/day pattern
			m: { date: "day month.full" },
			// Month/day pattern
			M: { date: "day month.full" },
			// coordinated universal time
			s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
			// short time pattern
			t: { time: "shorttime" },
			// long time pattern
			T: { time: "longtime" },
			// Universal sortable date/time pattern
			u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
			// Year/month pattern
			y: { date: "month.full year.full" },
			// Year/month pattern
			Y: { date: "month.full year.full" }
		}
		function formatNumber(num, fraction) {
			decimalFormatter.fractionDigits = typeof fraction === NUMBER ? fraction : defaultNumberFraction;
			return decimalFormatter.format(num);
		}
		function separator(formatter, number) {
			var num, sep;
			formatter.fractionDigits = 1;
			num = formatter.format(1.1);
			sep = num.indexOf(",") > -1 ? "," : ".";
			return sep;
		}
		function groupSeparator(formatter, symbol) {
			var num;
			formatter.isGrouped = true;
			formatter.fractionDigits = 0;
			num = formatter.format(1234567);
			if (symbol) {
				num = num.replace(symbol, "").replace(" ", "");
			}
			group = num.charAt(num.length - 4);
			return group;
		}
		function groupSize(formatter, symbol) {
			var num, parts;
			formatter.isGrouped = true;
			formatter.fractionDigits = 0;
			num = formatter.format(1234567);
			if (symbol) {
				num = num.replace(symbol, "").replace(" ", "");
			}
			parts = num.split(group);
			return parts.length === 2 ? [3,0] : ( parts[1].length === 2 ? [3,2] : [3] );
		}
		function numberPattern() {
			var decimal = formatNumber(2, 0),
				leftParenthesis = "",
				rightParenthesis = "",
				nSymbol = "-",
				dashPosition, num, numPosition, space, RTL;
			num = formatNumber(-2);
			numPosition = num.indexOf(decimal);
			dashPosition = num.indexOf("-");
			RTL = dashPosition > numPosition;
			if (!RTL) {
				if (num.indexOf("(") > -1) {
					leftParenthesis = "(";
					rightParenthesis = ")";
					nSymbol = "";
				}
			}
			space = num.indexOf(" ") > -1 ? " " : "";
			if (RTL) {
				return [leftParenthesis + "n" + space + nSymbol + rightParenthesis];
			} else {
				return [leftParenthesis + nSymbol + space + "n" + rightParenthesis];
			}
		}
		function percentPattern() {
			var num;
			num = percentFormatter.format(2);
			return num.charAt(0) === symbols.p ? ["-%n","%n"] : (num.indexOf(" ") > -1 ? ["-n %","n %"] : ["-n%","n%"]);
		}
		function currency(culture) {
			var geographicRegion = new globalization.GeographicRegion( getRegion(culture).toUpperCase() ),
				topCurrencyInUse = geographicRegion.currenciesInUse[0];
			return topCurrencyInUse;
		}
		function currencyPattern() {
			var decimal = formatNumber(2, 0),
				leftParenthesis = "",
				rightParenthesis = "",
				nSymbol = "-",
				num, numPosition, space, nSpace, symbolPosition, dashPosition, RTL;
			num = currencyFormatter.format(-2);
			numPosition = num.indexOf(decimal);
			symbolPosition = num.indexOf(symbols.c);
			dashPosition = num.indexOf("-");
			nSpace = num.indexOf(" ") > -1 ? " " : "";
			RTL = dashPosition > numPosition;
			if (!RTL) {
				if (num.indexOf("(") > -1) {
					leftParenthesis = "(";
					rightParenthesis = ")";
					nSymbol = "";
				}
			}
			num = currencyFormatter.format(2);
			space = num.indexOf(" ") > -1 ? " " : "";
			if (RTL) {
				if (numPosition < symbolPosition) {
					return dashPosition > symbolPosition ? 
						["n" + nSpace + "$" + nSymbol, "n" + space + "$"] : 
						["n" + nSymbol + nSpace + "$", "n" + space + "$"];
				} else {
					return ["$" + nSpace + "n" + nSymbol, "$" + space + "n"];
				}
			} else {
				if (symbolPosition < numPosition) {
					return dashPosition > symbolPosition ? 
						[leftParenthesis + "$" + nSpace + nSymbol + "n" + rightParenthesis, "$" + space + "n"] : 
						[leftParenthesis + nSymbol + "$" + nSpace + "n" + rightParenthesis, "$" + space + "n"];
				} else {
					return [leftParenthesis + nSymbol + "n" + nSpace + "$" + rightParenthesis, "n" + space + "$"];
				}
			}
		}
		function parseSymbol(formatter, number, symbol) {
			var num = formatNumber(number, 0);
			formatter.fractionDigits = 0;
			symbols[symbol] = formatter.format(2).replace(num, "").replace(" ", "");
			return symbols[symbol];
		}
		function replacePatterns () {
			for (var key in mapKendoPatterns) {
				var formatter, 
					pattern,
					matches,
					separators = [],
					newPattern = "",
					date = mapKendoPatterns[key].date,
					time = mapKendoPatterns[key].time;
				if (date) {
					formatter = new globalization.DateTimeFormatting.DateTimeFormatter( date,  [culture], region, calendarIdentifier, clockIdentifier );
					pattern = formatter.patterns[0];
					matches = pattern.match(/(?=\})[^{]+(?=\{)/g);
					matches.forEach(function (item) {
						if (separators.indexOf(item) === -1) {
							var sub = item.substring(1),
								reg = new RegExp(sub, "g");
							separators.push(item);
							pattern = pattern.replace(reg, "'" + sub + "'");
						}
					});
					for (var item in dateMap) {
						var items = item.split("/");
						for (var i=0; i < items.length; i++) {
							pattern = pattern.replace(items[i], dateMap[item]);
						}
					}
					// fix for hidden symbol that comes from the formatter's patterns array => microsoft's bug
					var re = new RegExp(pattern[0], "g");
					pattern = pattern.replace(re, "");
					newPattern += pattern;
				}
				if (time) {
					formatter = new globalization.DateTimeFormatting.DateTimeFormatter( time,  [culture], region, calendarIdentifier, clockIdentifier );
					pattern = formatter.patterns[0];
					if (date) {
						newPattern += " ";
					}
					if (twentyFourHour) {
						timeMap["{hour.integer(2)}"] = "HH";
						timeMap["{hour.integer}"] = "H";
					}
					for (var item in timeMap) {
						pattern = pattern.replace(item, timeMap[item]);
					}
					// fix for hidden symbol that comes from the formatter's patterns array => microsoft's bug
					var re = new RegExp(pattern[0], "g");
					pattern = pattern.replace(re, "");
					newPattern += pattern;
				}
				if (!date && !time) {
					newPattern = mapKendoPatterns[key];
				}
				mapKendoPatterns[key] = newPattern;
			}
			return mapKendoPatterns;
		}
		function parsePeriod (hour) {
			var period = returnPeriod(hour, culture);
			return period.length > 1 ? [period, period.toLowerCase(), period] : 
									   hour == 1 ? ["AM"] : ["PM"];
		}
		function parseDateSeparator (dateOrtime) {
			var formatter = new globalization.DateTimeFormatting.DateTimeFormatter( dateOrtime,  [culture], region, calendarIdentifier, clockIdentifier ),
				sep = formatter.patterns[0].replace("{period.abbreviated}", "").match(/\}(.*?)\{/)[1];
			return sep || ".";
		}
		function formatMonths() {
			var months = {
					// Array
					// full month names
					names: [],
					// Array
					// abbreviated month names
					namesAbbr: []
				},
				formatterNames = globalization.DateTimeFormatting.DateTimeFormatter( "{month.full}",  [culture], region, calendarIdentifier, clockIdentifier ),
				formatterAbbr = globalization.DateTimeFormatting.DateTimeFormatter( "{month.abbreviated}",  [culture], region, calendarIdentifier, clockIdentifier ),
				names = months.names,
				namesAbbr = months.namesAbbr;
			for (var i=0; i<12; i++) {
				names.push( formatterNames.format( new Date(2000, i, 1)) );
				namesAbbr.push( formatterAbbr.format( new Date(2000, i, 1)) );
			}
			return months;
		}
		function formatDays() {
			var days = {
					// Array
					// full day names
					names: [],
					// Array
					// abbreviated day names
					namesAbbr: [],
					// Array
					// shortest day names
					namesShort: []
				},
				formatterNames = globalization.DateTimeFormatting.DateTimeFormatter( "{dayofweek.full}",  [culture], region, calendarIdentifier, clockIdentifier ),
				formatterAbbr = globalization.DateTimeFormatting.DateTimeFormatter( "{dayofweek.abbreviated}",  [culture], region, calendarIdentifier, clockIdentifier ),
				formatterShort = globalization.DateTimeFormatting.DateTimeFormatter( "{dayofweek.abbreviated(1)}",  [culture], region, calendarIdentifier, clockIdentifier ),
				names = days.names,
				namesAbbr = days.namesAbbr,
				namesShort = days.namesShort;
			// kendo have sunday for first element
			names.push( formatterNames.format( new Date(2000, 1, 6)) );
			namesAbbr.push( formatterAbbr.format( new Date(2000, 1, 6)) );
			namesShort.push( formatterShort.format( new Date(2000, 1, 6)) );
			for (var i=0; i<6; i++) {
				names.push( formatterNames.format( new Date(2000, 1, i)) );
				namesAbbr.push( formatterAbbr.format( new Date(2000, 1, i)) );
				namesShort.push( formatterShort.format( new Date(2000, 1, i)) );
			}
			return days;
		}
		function firstDayOfWeek (region) {
			var firstDay = Windows.System.UserProfile.GlobalizationPreferences.weekStartsOn,
				locations = [];
			locations[0] = ["AG","AR","AS","AU","BR","BS","BT","BW","BY","BZ","CA","CN","CO","DM","DO","ET","GT","GU","HK","HN","ID","IE","IL","IN","JM","JP","KE","KH","KR","LA","MH","MM","MO","MT","MX","MZ","NI","NP","NZ","PA","PE","PH","PK","PR","PY","SG","SV","TH","TN","TT","TW","UM","US","VE","VI","WS","ZA","ZW"];
			locations[1] = ["AD","AI","AL","AM","AN","AT","AX","AZ","BA","BE","BG","BM","BN","CH","CL","CM","CR","CY","CZ","DE","DK","EC","EE","ES","FI","FJ","FO","FR","GB","GE","GF","GP","GR","HR","HU","IS","IT","KG","KZ","LB","LI","LK","LT","LU","LV","MC","MD","ME","MK","MN","MQ","MY","NL","NO","PL","PT","RE","RO","RS","RU","SE","SI","SK","SM","TJ","TM","TR","UA","UY","UZ","VA","VN"];
			locations[5] = ["BD","MV"];
			locations[6] = ["AE","AF","BH","DJ","DZ","EG","IQ","IR","JO","KW","LY","MA","OM","QA","SA","SD","SY","YE"];
			for (var i=0; i<7; i++) {
				if (locations[i]) {
					if (locations[i].indexOf(region) > -1) {
						firstDay = i;
						break;
					}
				}
			}
			return firstDay;
		}
		kendoCulture = {
			// String
			// BCP-47 language tag <language code>-<region code>
			name: culture,
			// "numberFormat" defines general number formatting rules
			numberFormat: {
				// Array
				// numberFormat has only negative pattern unlike the percent and currency
				// negative pattern: one of (n)|-n|- n|n-|n -
				pattern: numberPattern(),
				// Number
				// number of decimal places
				decimals: defaultNumberFraction,
				// String
				// string that separates the number groups (1,000,000)
				",": groupSeparator(decimalFormatter),
				// String
				// string that separates a number from the fractional point
				".": separator(decimalFormatter, 1.1),
				// Array
				// the length of each number group
				groupSize: groupSize(decimalFormatter),
				// formatting rules for percent number
				percent: {
					// Number
					// number of decimal places
					decimals: defaultPercentFraction,
					// String
					// percent symbol
					symbol: parseSymbol(percentFormatter, 200, "p"),
					// Array
					// [negative pattern, positive pattern]
					// negativePattern: one of -n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %
					// positivePattern: one of n %|n%|%n|% n
					pattern: percentPattern(),
					// String
					// string that separates the number groups (1,000,000 %)
					",": groupSeparator(percentFormatter, symbols.p),
					// String
					// string that separates a number from the fractional point
					".": separator(percentFormatter, 0.1),
					// Array
					// the length of each number group
					groupSize: groupSize(percentFormatter, symbols.p)
				},
				// formatting rules for currency
				currency: {
					// Number
					// number of decimal places
					decimals: defaultCurrencyFraction,
					// String
					// currency symbol
					symbol: parseSymbol(currencyFormatter, 2, "c"),
					// String
					// string that separates the number groups (1,000,000 $)
					",": groupSeparator(currencyFormatter, symbols.c),
					// String
					// string that separates a number from the fractional point
					".": separator(currencyFormatter, 1.1),
					// Array
					// the length of each number group
					groupSize: groupSize(currencyFormatter, symbols.c),
					// Array
					// [negative pattern, positive pattern]
					// negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
					// positivePattern: one of "$n|n$|$ n|n $"
					pattern: currencyPattern()
				}
			},
			// "calendars" defines general date and time formatting rules
			calendars: {
				standard: {
					days: formatDays(),
					months: formatMonths(),
					// Array
					// AM designator
					// [standard,lowercase,uppercase]
					AM: parsePeriod(1),
					// Array
					// PM designator
					// [standard,lowercase,uppercase]
					PM: parsePeriod(12),
					// set of predefined date and time patterns used by the culture.
					patterns: replacePatterns(),
					// String
					// date delimiter
					"/": parseDateSeparator("shortdate"),
					// String
					// time delimiter
					":": parseDateSeparator("shorttime"),
					// Number
					// the first day of the week (0 = Sunday, 1 = Monday, etc)
					firstDay: firstDayOfWeek(region),
					// Number
					// the last year of a 100-year range that can be represented by a 2-digit year
					twoDigitYearMax: 2029
				}
			},
			// boolean
			// 24-hour format
			twentyFourHour: twentyFourHour
		}
		return kendoCulture;
	}
	// clear all kendo cultures and set our own default culture
	kendo.cultures = {};
	Telerik.Culture.setCurrent("en-US");
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		define = win.Class.define,
		derive = win.Class.derive,
		mix = win.Class.mix,
		namespace = win.Namespace.define,
		utilities = win.Utilities,
		telerik = Telerik,
		ui = telerik.UI,
		util = telerik.Utilities,
		common = ui.Common,
		nsName = "Telerik.Data",
		keys = Object.keys,
		ObservableObject = kendo.data.ObservableObject,
		ObservableArray = kendo.data.ObservableArray,
		OBJECT = "object",
		NUMBER = "number",
		ARRAY = "array",
		FUNCTION = "function",
		NULL = null,
		CHANGE = "change",
		ERROR = "error";
	var ObservableArrayProxy = derive(ObservableArray, function (list) {
		/// <summary>
		/// Represents a proxy to a WinJS.Binding.List
		/// </summary>
		/// <param name="list" type="WinJS.Binding.List">The WinJS.Binding.List to watch.</param>
}, null, {
		observe: function (obj) {
			/// <summary>
			/// Get a corresponding kendo.data.ObservableObject instance if the provided obj parameter is a WinJS observable object.
			/// Otherwise return the original passed value.
			/// </summary>
			/// <param name="obj" type="Object">The WinJS observable to watch.</param>
},
		getWinJSObservable: function (obj) {
			/// <summary>
			/// Get the WinJS observable object for this object.
			/// </summary>
			/// <param name="obj" type="Object">The object that is or has a WinJS observable behind.</param>
},
		bind: function (kendo, winjs) {
			/// <summary>
			/// Bind the kendo and WinJS observables together
			/// </summary>
			/// <param name="kendo" type="kendo.data.ObservableObject">The kendo observable</param>
			/// <param name="winjs" type="Object">The WinJS observable</param>
},
		unbind: function (winjs) {
			/// <summary>
			/// Unbind the provided WinJS observable from its connected kendo ObservableObject
			/// </summary>
			/// <param name="winjs" type="Object">The WinJS observable</param>
}
	});
	function defineProperty(name, defaultValue, getterMapping, mergeState) {
		return {
			get: function () {
				var ds = this._ds,
					key = getterMapping || name,
					value;
				//try calling ds.value() function
				if (typeof (ds[name]) === FUNCTION) {
					value = ds[name]();
				}
				//try getting ds.options.value or ds.value property
				if (value === undefined) {
					value = util.getPropertyValue(ds, key);
				}
				//default value
				if (value === undefined) {
					value = defaultValue;
				}
				return value;
			},
			set: function (value) {
				var that = this,
					key = getterMapping || name,
					oldValue = that[name],
					value = ui._ControlConfiguration.validate(that._validators || {}, name, value, oldValue);
				if (value !== undefined) {
					util.setPropertyValue(that._ds, key, value);
					if (mergeState) {
						var newOption = {};
						newOption[name] = value;
						that._ds._mergeState($.extend({}, {
							page: that._ds.page(),
							pageSize: that._ds.pageSize(),
							sort: that._ds.sort(),
							filter: that._ds.filter(),
							group: that._ds.group(),
							aggregate: that._ds.aggregate()
						}, newOption));
					}
					that._change(name, value, oldValue);
				}
			},
			enumerable: true
		};
	}
	function normalizeOptions(opts) {
		var options = opts || {},
			kendoDS = NULL;
		if (options instanceof kendo.data.DataSource) {
			kendoDS = options;
			options = {};
		}
		else if (options instanceof win.Binding.List) {
			options = { data: new ObservableArrayProxy(options) };
		}
		else if (options.data instanceof win.Binding.List) {
			options.data = new ObservableArrayProxy(options.data);
		}
		else if (util.getType(options) === ARRAY) {
			options = { data: options };
		}
		return {
			options: options,
			kendoDS: kendoDS
		};
	}
	var DataSource = define(function (options) {
		/// <summary>
		/// Initializes a new instance of the Telerik.Data.DataSource component.
		/// </summary>
		/// <param name="options" type="Object" optional="true">The configuration options for this DataSource component.</param>
		/// <event name="change">Fires when the underlying data is changed.</event>
		/// <event name="error">Fires when an error occurs during data retrieval.</event>
		/// <event name="requeststart">Fires before a data request is made.</event>
		/// <event name="requestend">Fires when a request ends.</event>
		/// <event name="sync">Fires after changes are synced.</event>
}, {
		/// <field type="Array">
		/// Gets or sets the underlying raw data array.
		/// </field>
		data: {get:function(){}, set:function(value){}},
		/// <field type="Object">
		/// Gets the object that describes the raw data format. Once configured through
		/// the constructor options, the schema is read-only.
		/// </field>
		schema: {get:function(){}},
		/// <field type="Object">
		/// Gets or sets the object that describes how data is loaded from a remote endpoint.
		/// Once configured through the constructor options, the transport is read-only.
		/// </field>
		transport: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the name of a transport with preconfigured settings. Currently only "odata" is supported.
		/// Once configured through the constructor options, the transport type is read-only.
		/// </field>
		/// <options>
		/// <option value=""></option>
		/// <option value="odata">odata</option>
		/// </options>
		type: {get:function(){}},
		/// <field type="Number" integer="true" mayBeNull="true">
		/// Gets or sets the page index. Default value is null.
		/// </field>
		page: defineProperty("page", NULL, "options.page", true),
		/// <field type="Number" integer="true" mayBeNull="true">
		/// Gets or sets the number of items a page of data contains. Default value is null, indicating no paging is used.
		/// </field>
		pageSize: defineProperty("pageSize", NULL, "options.pageSize", true),
		/// <field type="Object">
		/// Gets or sets the filter descriptors. Accepts an object or an array of objects for multiple filter descriptors.
		/// </field>
		filter: defineProperty("filter", NULL, "options.filter", true),
		/// <field type="Object">
		/// Gets or sets the group descriptors. Accepts an object or an array of objects for multiple group descriptors.
		/// </field>
		group: defineProperty("group", NULL, "options.group", true),
		/// <field type="Object">
		/// Gets or sets the sort descriptors. Accepts an object or an array of objects for multiple sort descriptors.
		/// </field>
		sort: defineProperty("sort", NULL, "options.sort", true),
		/// <field type="Object">
		/// Gets or sets the aggregate descriptors. Accepts an object or an array of objects for multiple aggregate descriptors.
		/// </field>
		aggregate: defineProperty("aggregate", NULL, "options.aggregate", true),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether aggregates should be calculated on the server when a remote endpoint is used.
		/// </field>
		serverAggregates: defineProperty("serverAggregates", false, "options.serverAggregates"),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether filtering should be applied on the server when a remote endpoint is used.
		/// </field>
		serverFiltering: defineProperty("serverFiltering", false, "options.serverFiltering"),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether grouping should be applied on the server when a remote endpoint is used.
		/// </field>
		serverGrouping: defineProperty("serverGrouping", false, "options.serverGrouping"),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether paging should be applied on the server when a remote endpoint is used.
		/// </field>
		serverPaging: defineProperty("serverPaging", false, "options.serverPaging"),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether sorting should be applied on the server when a remote endpoint is used.
		/// </field>
		serverSorting: defineProperty("serverSorting", false, "options.serverSorting"),
		/// <field type="Boolean">
		/// Enables or disables the automatic invocation of the sync method after each change made to the data.
		/// </field>
		autoSync: defineProperty("autoSync", false, "options.autoSync"),
		/// <field type="Boolean" defaultValue="false">
		/// Enables or disables batch mode.
		/// </field>
		batch: defineProperty("batch", false, "options.batch"),
		/// <field type="Number" integer="true">
		/// Retrieves the number of available pages.
		/// </field>
		totalPages: {get:function(){}},
		/// <field type="Number" integer="true">
		/// Retrieves the total number of data records.
		/// </field>
		total: {get:function(){}},
		/// <field type="Object" readonly="true" hidden="true">
		/// Retrieves the result of aggregation.
		/// </field>
		aggregates: {get:function(){}},
		/// <field type="Array" readonly="true" hidden="true">
		/// Gets a view of the data with operations such as sorting, paging, filtering and grouping applied. To ensure data is
		/// available, this property should be used from within the change event of the data source, or from a success callback
		/// of the promise returned by a data-processing method such as fetch or read.
		/// </field>
		view: {get:function(){}},
		at: function (index) {
			/// <summary>
			/// Returns the data record at the specified index.
			/// </summary>
			/// <param name="index" type="Number" integer="true">The index of the data record to retrieve.</param>
			/// <returns type="Object"></returns>
},
		indexOf: function (model) {
			/// <summary>
			/// Retrieve the index of a specified observable object from the underlying data.
			/// </summary>
			/// <param name="model" type="Object">The observable object whose index to retreive.</param>
},
		fetch: function () {
			/// <summary>
			/// Fetches data using the current filter/sort/group/paging information. If data is not available or remote operations 
			/// are enabled, data is requested through the transport, otherwise operations are executed over the available data.
			/// </summary>
			/// <returns type="WinJS.Promise"></returns>
},
		read: function () {
			/// <summary>
			/// Read the data into the DataSource using the transport read definition.
			/// </summary>
			/// <returns type="WinJS.Promise"></returns>
},
		query: function (options) {
			/// <summary>
			/// Executes a query over the data. Available operations are paging, sorting, filtering, grouping. 
			/// If data is not available or remote operations are enabled, data is requested through the transport. 
			/// Otherwise operations are executed over the available data.
			/// </summary>
			/// <param name="options" type="Object">Configuration options for this query. Contains page, sort, filter, group and aggregate descriptors.</param>
			/// <returns type="WinJS.Promise"></returns>
},
		add: function (model) {
			/// <summary>
			/// Adds a new data item to the DataSource
			/// </summary>
			/// <param name="model" type="Object">The new data item to add.</param>
},
		insert: function (index, model) {
			/// <summary>
			/// Inserts a new item into the DataSource at the specified index.
			/// </summary>
			/// <param name="index" type="Number">The zero-based index of the position to insert.</param>
			/// <param name="model" type="Object">The Javascript object to insert.</param>
},
		remove: function (model) {
			/// <summary>
			/// Remove the specified item from the DataSource
			/// </summary>
			/// <param name="model" type="Object">The item to remove.</param>
			/// <returns type="Object">The removed item.</returns>
},
		hasChanges: function () {
			/// <summary>
			/// Gets or sets a boolean value indicating whether data in the DataSource have changed.
			/// </summary>
},
		cancelChanges: function (model) {
			/// <summary>
			/// Cancels any changes made to the data since the last sync.
			/// </summary>
			/// <param name="model" type="Object" optional="true">Optional. The data item to cancel any changes for.</param>
},
		//HACK: this function cannot be named simply 'get', because this will not allow adding a DataSource to a WinJS namespace (treats it as a getter)
		getById: function (id) {
			/// <summary>
			/// Retrieves a model by a given ID.
			/// </summary>
			/// <param name="id" type="Object">The ID of the model to retrieve. The ID of a model is defined through the schema.model.id option.</param>
			/// <returns type="Object"></returns>
},
		getByUid: function (uid) {
			/// <summary>
			/// Retrieves a model by a its uid field.
			/// </summary>
			/// <param name="uid" type="String">The uid of the item to retrieve.</param>
			/// <returns type="Object"></returns>
},
		sync: function () {
			/// <summary>
			/// Synchronizes changes through the transport. Any pending CRUD operations will be sent to the server. If the 
			/// DataSource is in batch mode, only one call will be made for each type of operation (Create, Update, Destroy).
			/// Otherwise, the DataSource will send one request per item change and change type.
			/// </summary>
},
		clone: function () {
			/// <summary>
			/// Clones this Telerik.Data.DataSource instance along with options and data.
			/// </summary>
			/// <returns type="Telerik.Data.DataSource"></returns>
}
	});
	mix(DataSource, common.eventMixin, utilities.createEventProperties("change", "error", "requeststart", "requestend", "sync"));
	namespace(nsName, {
		DataSource: DataSource
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		derive = win.Class.derive,
		mix = win.Class.mix,
		namespace = win.Namespace.define,
		ui = Telerik.UI,
		util = Telerik.Utilities,
		DataSource = Telerik.Data.DataSource,
		priv = util.setPrivate,
		BOOLEAN = "boolean",
		RADIX = 10,
		CONTAINERCSSCLASS = "t-list",
		INTERACTIVECSSCLASS = "win-interactive";
	/// <summary>
	/// Serves as a base class for the AutoComplete, DropDownList and ComboBox controls. For internal use only.
	/// </summary>
	/// <event name="change">Fires when the value of the control changes.</event>
	/// <event name="open">Fires when the drop-down list is shown.</event>
	/// <event name="close">Fires when the drop-down list is closed.</event>
	/// <event name="select">Fires when an item is selected from the drop-down list.</event>
	/// <event name="databinding">Fires when the control is about to databind.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <excludetoc />
	var ListBase = derive(ui.WidgetWrapper, function (element, options) {
		/// <summary>
		/// Serves as a base class for the AutoComplete, DropDownList and ComboBox controls. For internal use only.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
		//Override this method when the control needs to set additional
		//options after the widget has been initialized. Call this
		//method in derived classes after ensuring widget is initialized.
		/// <field type="String">
		/// Gets or sets the text of the control.
		/// </field>
		text: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the value of the control. When setting the value, if no item with
		/// the specified value exists, the control value will not be set.
		/// </field>
		value: {get:function(){}, set:function(value){}},
		/// <field type="Object">
		/// Gets the animation options to be used for opening/closing the popup.
		/// </field>
		animation: {get:function(){}},
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets a value indicating whether to bind the widget to the dataSource on initialization.
		/// </field>
		autoBind: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.Data.DataSource">
		/// Gets or sets the data source of the control.
		/// </field>
		dataSource: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the field of the data item that provides the text content of the list items.
		/// </field>
		dataTextField: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the field of the data item that provides the value content of the list items.
		/// </field>
		dataValueField: {get:function(){}, set:function(value){}},
		/// <field type="Number">
		/// Gets or sets the delay in ms after which the control will start filtering the dataSource.
		/// </field>
		delay: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the enabled state of the control.
		/// </field>
		enabled: {get:function(){}, set:function(value){}},
		/// <field type="Number"  defaultValue="200">
		/// Gets or sets the height of the drop-down list in pixels.
		/// </field>
		height: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the template to be used for rendering the items in the list.
		/// </field>
		template: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets a value indicating whether the search should be case sensitive.
		/// </field>
		ignoreCase: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" hidden="true">
		/// Gets a value indicating whether the list container is currently open.
		/// </field>
		isOpen: {get:function(){}},
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether the control is read-only.
		/// </field>
		readonly: {get:function(){}, set:function(value){}},
		/// <field type="Object" hidden="true">
		/// Gets the jQuery-wrapped list of items in the control.
		/// </field>
		list: {get:function(){}},
		dataItem: function (index) {
			/// <summary>
			/// Returns the raw data record at the specified index or the selected index.
			/// </summary>
			/// <param name="index" type="Number" integer="true" optional="true">Optional. The zero-based index of the data record to retrieve.</param>
},
		refresh: function () {
			/// <summary>
			/// Re-renders the items in the drop-down list.
			/// </summary>
},
		search: function (word) {
			/// <summary>
			/// Filters the data using the provided parameter and rebinds drop-down list.
			/// </summary>
			/// <param name="word" type="String">The value to search for.</param>
},
		select: function (li) {
			/// <summary>
			/// Selects drop-down list item and sets the text of the combobox control.
			/// </summary>
			/// <param name="li" type="HTMLElement" domElement="true">The list item element to select.</param>
},
		close: function () {
			/// <summary>
			/// Closes the drop-down list.
			/// </summary>
},
		focus: function () {
			/// <summary>
			/// Gives focus to the input element of the control.
			/// </summary>
}
		});
	mix(ListBase, win.Utilities.createEventProperties("open", "close", "select", "change", "databinding", "databound"));
	/// <summary>
	/// Serves as a base class for the DropDownList and ComboBox controls. Implements cascade support. For internal use only.
	/// </summary>	
	/// <excludetoc />
	var CascadingListBase = derive(ListBase, function (element, options) {
}, {
		/// <field type="String">
		/// Gets the ID of the parent ComboBox control that will filter the values of this BomboBox. This property is read-only.
		/// </field>
		cascadeFrom: {get:function(){}, set:function(value){}},
	});
	namespace("Telerik.UI", {
		ListBase: ListBase,
		CascadingListBase: CascadingListBase
	});
	// Modify _cascade method to implement cascading functionality for RadDropDownList and RadComboBox
	var originalCascade = kendo.ui.Select.prototype._cascade;
	kendo.ui.Select.prototype._cascade = function () {
		var that = this,
			cascade = that.options.cascadeFrom,
			parentElement,
			wrapper,
			widgetId;
		if (cascade) {
			parentElement = $("#" + cascade);
			if (parentElement[0]) {
				wrapper = parentElement[0].winControl;
				if (wrapper && wrapper._widget) {
					widgetId = wrapper._widget.element.attr("id");
					if (!widgetId) {
						widgetId = kendo.guid();
						wrapper._widget.element.attr("id", widgetId);						
					}
					//use a temporary ID for the cascadeFrom functionality, so that the original _cascade method can find the widget
					that.options.cascadeFrom = widgetId;
				}
			}
		}
		originalCascade.apply(that, arguments);
		//restore the original cascadeFrom value;
		that.options.cascadeFrom = cascade;
	}
	//modify the busy indicator logic
	kendo.ui.Select.prototype._showBusy = function () {
		var that = this;
		that._request = true;
		if (that._busy) {
			return;
		}
		that._busy = setTimeout(function () {
			that._focused.attr("aria-busy", true);
			Telerik.UI.progress(that.element.parents(".t-list"), true);
		}, 100);
	}
	kendo.ui.Select.prototype._hideBusy = function () {
		var that = this;
		clearTimeout(that._busy);
		Telerik.UI.progress(that.element.parents(".t-list"), false);
		that._focused.attr("aria-busy", false);
		that._busy = null;
	}
	kendo.ui.AutoComplete.prototype._showBusy = kendo.ui.Select.prototype._showBusy;
	kendo.ui.AutoComplete.prototype._hideBusy = kendo.ui.Select.prototype._hideBusy;
	kendo.ui.MultiSelect.prototype._showBusy = kendo.ui.Select.prototype._showBusy;
	kendo.ui.MultiSelect.prototype._hideBusy = kendo.ui.Select.prototype._hideBusy;
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		derive = win.Class.derive,
		mix = win.Class.mix,
		namespace = win.Namespace.define,
		utilities = win.Utilities,
		telerik = Telerik,
		ui = telerik.UI,
		cul = telerik.Culture,
		nsName = "Telerik.UI.Chart",
		ns = namespace(nsName),
		common = ui.Common,
		util = telerik.Utilities,
		DataSource = Telerik.Data.DataSource,
		OBJECT = "object",
		ARRAY = "array",
		FUNCTION = "function",
		NULL = null,
		config = ui._ControlConfiguration,
		defineProperty = config.defineProperty,
		getMapping = config.getMapping,
		priv = util.setPrivate;
	/// <summary>
	/// A charting control that can visualize different chart types.
	/// </summary>
	/// <icon src="chart_html_12.png" width="12" height="12" />
	/// <icon src="chart_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadChart"></div>]]></htmlSnippet>
	/// <event name="axislabelclick">Fires when an axis label is clicked.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <event name="dragstart">Fires when the user has used the mouse or a swipe gesture to drag the chart.</event>
	/// <event name="drag">Fires as long as the user is dragging the chart using the mouse or swipe gestures.</event>
	/// <event name="dragend">Fires when the user stops dragging the chart.</event>
	/// <event name="legenditemclick">Fires when a series in the chart legend is clicked.</event>
	/// <event name="legenditemhover">Fires when a series in the chart legend is hovered.</event>
	/// <event name="plotareaclick">Fires when the plot area is clicked.</event>
	/// <event name="seriesclick">Fires when any of the chart series is clicked.</event>
	/// <event name="serieshover">Fires when any of the chart series is hovered.</event>
	/// <event name="zoomstart">Fires when the user has used the mousewheel to zoom the chart..</event>
	/// <event name="zoom">Fires as long as the user is zooming the chart using the mousewheel.</event>
	/// <event name="zoomend">Fires when the user stops zooming the chart.</event>
	/// <event name="selectstart">Fires when the user starts modifying the axis selection.</event>
	/// <event name="select">Fires when the user modifies the selection.</event>
	/// <event name="selectend">Fires when the user completes modifying the selection.</event>
	/// <part name="chart" class="k-chart">The RadChart widget.</part>
	/// <part name="tooltip" class="k-tooltip">The tooltip of the chart.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadChart = derive(ui.WidgetWrapper, function (element, options) {
		/// <summary>
		/// Creates a new RadChart control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Telerik.Data.DataSource">
		/// Gets or sets the data source object for this control.
		/// </field>
		dataSource: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Indicates whether the chart will call read on the DataSource initially.
		/// </field>
		autoBind: defineProperty("autoBind", true),
		/// <field type="Boolean" defaultValue="true">
		/// Enables or disables transitions. True by default.
		/// </field>
		transitions: defineProperty("transitions", true),
		/// <field type="String" defaultValue="dark">
		/// Gets or sets the visual theme of the chart.
		/// </field>
		theme: defineProperty("theme", "dark"),
		/// <field type="Array" elementType="String">
		/// Gets or sets the color collection that will be used for styling the chart series.
		/// Array elements must be valid CSS color definitions.
		/// </field>
		seriesColors: defineProperty("seriesColors", []),
		/// <field type="String" defaultValue="none">
		/// Gets or sets the background of the chart area.
		/// </field>
		background: defineProperty("background", "none"),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the background opacity of the chart area.
		/// </field>
		opacity: defineProperty("opacity", 1),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the chart area.
		/// </field>
		border: {get:function(){}},
		/// <field type="Number" defaultValue="600">
		/// Gets or sets the width of the chart area in pixels.
		/// </field>
		width: defineProperty("width", 600),
		/// <field type="Number" defaultValue="400">
		/// Gets or sets the height of the chart area in pixels.
		/// </field>
		height: defineProperty("height", 400),
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the chart area.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Telerik.UI.Chart._TitleConfiguration">
		/// Gets the title settings of the chart.
		/// </field>
		title: {get:function(){}},
		/// <field type="Telerik.UI.Chart._LegendConfiguration">
		/// Gets the legend settings of the chart.
		/// </field>
		legend: {get:function(){}},
		/// <field type="Array" elementType="Telerik.UI.Chart.Pane">
		/// The chart panes configuration.
		/// Panes are used to split the chart in two or more parts. The panes are ordered from top to bottom.
		/// Each axis can be associated with a pane by setting its pane option to the name of the desired pane. Axis that don't have specified pane are placed in the top (default) pane.
		/// Series are moved to the desired pane by associating them with an axis.
		/// </field>
		panes: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Chart._TooltipConfiguration">
		/// Gets the tooltip settings of the chart.
		/// </field>
		tooltip: {get:function(){}},
		/// <field type="Telerik.UI.Chart._PlotAreaConfiguration">
		/// Gets the plot are settings.
		/// </field>
		plotArea: {get:function(){}},
		/// <field type="Telerik.UI.Chart.Axis">
		/// Gets the default settings that apply to all axes.
		/// </field>
		axisDefaults: {get:function(){}},
		/// <field type="Telerik.UI.Chart.Axis">
		/// Gets the value axis settings.
		/// </field>
		valueAxis: {get:function(){}},
		/// <field type="Array" elementType="Telerik.UI.Chart.Axis">
		/// Gets the array of all value axis defined for the chart.
		/// </field>
		valueAxes: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Chart._CategoryAxisConfiguration">
		/// Gets the category axis settings.
		/// </field>
		categoryAxis: {get:function(){}},
		/// <field type="Telerik.UI.Chart.Axis">
		/// Gets the X axis settings when a scatter chart type is used.
		/// </field>
		xAxis: {get:function(){}},
		/// <field type="Array" elementType="Telerik.UI.Chart.Axis">
		/// Gets the array of all X axis defined for the chart.
		/// </field>
		xAxes: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Chart.Axis">
		/// Gets the Y axis settings when a scatter chart type is used.
		/// </field>
		yAxis: {get:function(){}},
		/// <field type="Array" elementType="Telerik.UI.Chart.Axis">
		/// Gets the array of all Y axis defined for the chart.
		/// </field>
		yAxes: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Chart.Series">
		/// Gets the default settings common to all series.
		/// </field>
		seriesDefaults: {get:function(){}, set:function(value){}},
		/// <field type="Array">
		/// Gets or sets the data series in the chart.
		/// </field>
		series: {get:function(){}, set:function(value){}},
		/// <field type="String" readonly="true" hidden="true">
		/// Gets the SVG representation of the current chart.
		/// </field>
		svg: {get:function(){}},
		refresh: function () {
			/// <summary>
			/// Reloads the data and repaints the chart.
			/// </summary>
},
		redraw: function () {
			/// <summary>
			/// Repaints the chart.
			/// </summary>
}
	});
	namespace("Telerik.UI", {
		RadChart: RadChart
	});
	mix(RadChart, utilities.createEventProperties("axislabelclick", "databound", "dragstart", "drag", "dragend", "legenditemclick", "legenditemhover", "plotareaclick", "seriesclick", "serieshover", "zoomstart", "zoom", "zoomend", "selectstart", "select", "selectend"));
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Chart",
		common = Telerik.UI.Common,
		util = Telerik.Utilities,
		cul = Telerik.Culture,
		NULL = null,
		SANS12 = "12px Arial,Helvetica,sans-serif",
		config = Telerik.UI._ControlConfiguration,
		defineProperty = config.defineProperty,
		getMapping = config.getMapping,
		priv = util.setPrivate;
	var _TitleConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart title.
		/// </summary>
}, {
		/// <field type="String" defaultValue="center">
		/// Gets or sets the chart title alignment. Accepted values are: "left", "center", "right". Default is "center"
		/// </field>
		/// <options>
		/// <option value="left">left</option>
		/// <option value="center">center</option>
		/// <option value="right">right</option>
		/// </options>
		align: defineProperty("align", "center"),
		/// <field type="String">
		/// Gets or sets the background color of the chart title.
		/// </field>
		background: defineProperty("background", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the chart title.
		/// </field>
		border: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the text color of the chart title.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="String">
		/// Gets or sets the title font.
		/// </field>
		font: defineProperty("font", SANS12),
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the chart title.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the padding settings of the chart title.
		/// </field>
		padding: {get:function(){}},
		/// <field type="String" defaultValue="top">
		/// Gets or sets the vertical position of the chart title. Accepted values are: "top" and "bottom". Default is "top".
		/// </field>
		/// <options>
		/// <option value="top">top</option>
		/// <option value="bottom">bottom</option>
		/// </options>
		position: defineProperty("position", "top"),
		/// <field type="String">
		/// Gets or sets the title text.
		/// </field>
		text: defineProperty("text", ""),
		/// <field type="Boolean">
		/// Gets or sets the title visibility. Default is false.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var _LegendLabelConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of chart legend labels.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the text color of the label. Any valid CSS color value is accepted.
		/// </field>
		color: defineProperty("color", "black"),
		/// <field type="String">
		/// Gets or sets the label font style.
		/// </field>
		font: defineProperty("font", SANS12)
	});
	var _LegendConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart legend.
		/// </summary>
}, {
		/// <field type="String" defaultValue="white">
		/// Gets or sets the background color of chart legend. Any valid CSS value is accepted.
		/// </field>
		background: defineProperty("background", "white"),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the chart legend.
		/// </field>
		border: {get:function(){}},
		/// <field type="Telerik.UI.Chart._LegendLabelConfiguration">
		/// Gets the label settings of the chart legend.
		/// </field>
		labels: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the chart legend.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the padding settings of the chart legend.
		/// </field>
		padding: {get:function(){}},
		/// <field type="Number" defaultValue="0">
		/// Gets or sets the X offset of the legend from its positions.
		/// </field>
		offsetX: defineProperty("offsetX", 0),
		/// <field type="Number" defaultValue="0">
		/// Gets or sets the Y offset of the legend from its positions.
		/// </field>
		offsetY: defineProperty("offsetY", 0),
		/// <field type="String" defaultValue="right">
		/// Gets or sets the position of the chart legend. Accepted values are:
		/// "top", "bottom", "left", "right", "custom". When a value of "custom"
		/// is used, the legend is positioned using its offsetX and offsetY
		/// properties. Default value is "right".
		/// </field>
		/// <options>
		/// <option value="top">top</option>
		/// <option value="bottom">bottom</option>
		/// <option value="left">left</option>
		/// <option value="right">right</option>
		/// <option value="custom">custom</option>
		/// </options>
		position: defineProperty("position", "right"),
		/// <field type="Boolean" defautlValue="true">
		/// Gets or sets the legend visibility. Default is true.
		/// </field>
		visible: defineProperty("visible", true)
	});
	var _TooltipConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart tooltip.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the background color of the tooltip. The default value is
		/// determined from the series color.
		/// </field>
		background: defineProperty("background", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the tooltip border settings.
		/// </field>
		border: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the text color of the tooltip. The default value is
		/// determined from the series label color.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="String">
		/// Gets or sets the tooltip font.
		/// </field>
		font: defineProperty("font", SANS12),
		/// <field type="String">
		/// Gets or sets the tooltip format. Format variables depend on the series type: 
		/// Area, bar, column, line and pie 0 - value; 
		/// Bubble, scatter and scatterLine 0 - x value, 1 - y value; 
		/// Candlestick and OHLC 0 - open value, 1 - high value, 2 - low value, 3 - close value, 4 - category name; 
		/// For Example: "{0:C}--{1:C}" to show a tooltip on candlestick series for open and high values.
		/// </field>
		format: defineProperty("format", ""),
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the padding settings of the tooltip.
		/// </field>
		padding: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the templated that is used to render the tooltip. Available
		/// template variables are value, category, series and dataItem.
		/// </field>
		template: defineProperty("template", ""),
		/// <field type="Boolean">
		/// Gets or sets the tooltip visibility. Default is false.
		/// </field>
		visible: defineProperty("visible", false),
		/// <field type="Boolean">
		/// A value indicating if the tooltip should be shared. Default is false.
		/// </field>
		shared: defineProperty("shared", false),
		/// <field type="String">
		/// The shared tooltip template.
		/// Template variables: points - the category points, category - the category name
		/// </field>
		sharedTemplate: defineProperty("sharedTemplate", ""),
	});
	var _PlotAreaConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart plot area.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the background color of the plot area.
		/// </field>
		background: defineProperty("background", "white"),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the plot area opacity.
		/// </field>
		opacity: defineProperty("opacity", 1),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the plot area.
		/// </field>
		border: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the plot area.
		/// </field>
		margin: {get:function(){}}
	});
	var _LabelConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of chart labels.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the background color of the labels. Any valid CSS color is accepted.
		/// </field>
		background: defineProperty("background", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the labels.
		/// </field>
		border: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the text color of the labels. Any valid CSS color is accepted.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="String">
		/// Gets or sets the culture of the labels.
		/// </field>
		culture: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the font style of the labels.
		/// </field>
		font: defineProperty("font", ""),
		/// <field type="String">
		/// Gets or sets the format of the labels.
		/// </field>
		format: defineProperty("format", ""),
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the labels.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the padding settings of the labels.
		/// </field>
		padding: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the label template. Inside the template, the 'value' variable exposes the label value.
		/// </field>
		template: defineProperty("template", ""),
		/// <field type="Boolean">
		/// Gets or sets the visibility of the labels.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var _AxisCrossHairConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis crosshair.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the id of the crosshair. If not set, it will be autogenerated.
		/// </field>
		id: defineProperty("id", ""),
		/// <field type="String" defaultValue="#000">
		/// Gets or sets the color of the crosshair. Any valid CSS color is accepted.
		/// </field>
		color: defineProperty("color", "#000"),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the width of the crosshair in pixels.
		/// </field>
		width: defineProperty("width", 1),
		/// <field type="Number" defaultValue="-11">
		/// Gets or sets the zIndex of the crosshair.
		/// </field>
		zIndex: defineProperty("zIndex", -1),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the crosshair opacity.
		/// </field>
		opacity: defineProperty("opacity", 1),
		/// <field type="String">
		/// Gets or sets the dash type of the crosshair.
		/// </field>
		/// <options>
		/// <option value="solid">solid</option>
		/// <option value="dot">dot</option>
		/// <option value="dash">dash</option>
		/// <option value="longDash">longDash</option>
		/// <option value="dashDot">dashDot</option>
		/// <option value="longDashDot">longDashDot</option>
		/// <option value="longDashDotDot">longDashDotDot</option>
		/// </options>
		dashType: defineProperty("dashType", "solid"),
		/// <field type="Telerik.UI.Chart._CrossHairTooltipConfiguration">
		/// Retrieves the tooltip settings for this crosshair.
		/// </field>
		tooltip: {get:function(){}},
		/// <field type="Boolean">
		/// Gets or sets the visibility of the crosshair.
		/// </field>
		visible: defineProperty("visible", false),
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _CrossHairTooltipConfiguration = derive(_TooltipConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a crosshair tooltip.
		/// </summary>
}, {
		/// <field type="Number" defaultValue="10">
		/// Gets or sets the padding of the tooltip.
		/// </field>
		padding: defineProperty("padding", 10),
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _AxisTitleConfiguration = derive(_TitleConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis title.
		/// </summary>
}, {
		/// <field type="Number">
		/// Gets or sets the rotation angle of the axis title.
		/// </field>
		rotation: defineProperty("rotation", 0)
	});
	var _AxisLabelDateFormatConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the date label format on a chart axis.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the format for displaying hour values in the axis labels. Default value is "HH:mm".
		/// </field>
		hours: defineProperty("hours", "HH:mm"),
		/// <field type="String">
		/// Gets or sets the format for displaying day values in the axis labels. Default value is "M/d".
		/// </field>
		days: defineProperty("days", "M/d"),
		/// <field type="String">
		/// Gets or sets the format for displaying month values in the axis labels. Default value is "MMM 'yy".
		/// </field>
		months: defineProperty("months", "MMM 'yy"),
		/// <field type="String">
		/// Gets or sets the format for displaying year values in the axis labels. Default value is "yyyy".
		/// </field>
		years: defineProperty("years", "yyyy"),
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _AxisLabelConfiguration = derive(_LabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart axis labels.
		/// </summary>
}, {
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether the labels and ticks are mirrored. Mirrored labels
		/// usually rendered on the left side will be rendered on the right.
		/// </field>
		mirror: defineProperty("mirror", false),
		/// <field type="Number">
		/// Gets or sets the rotation angle of the labels.
		/// </field>
		rotation: defineProperty("rotation", 0),
		/// <field type="Number">
		/// Gets or sets the number of labels from the beginning of the axis to skip rendering.
		/// </field>
		skip: defineProperty("skip", 0),
		/// <field type="Number">
		/// Gets or sets the label rendering step. Every n-th label is rendered, where n is the step value.
		/// </field>
		step: defineProperty("step", 1),
		/// <field type="Telerik.UI.Chart._AxisLabelDateFormatConfiguration">
		/// Gets the date formatting settings for the axis labels when the axis values are of Date type.
		/// </field>
		dateFormats: {get:function(){}}
	});
	var _AxisLineConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis line.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the color of the axis line. Any valid CSS color is accepted.
		/// </field>
		color: defineProperty("color", "black"),
		/// <field type="Boolean">
		/// Gets or sets the visibility of the axis line.
		/// </field>
		visible: defineProperty("visible", true),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the width of the axis line in pixels.
		/// </field>
		width: defineProperty("width", 1),
		/// <field type="String">
		/// Gets or sets the dash type of the line.
		/// </field>
		/// <options>
		/// <option value="solid">solid</option>
		/// <option value="dot">dot</option>
		/// <option value="dash">dash</option>
		/// <option value="longDash">longDash</option>
		/// <option value="dashDot">dashDot</option>
		/// <option value="longDashDot">longDashDot</option>
		/// <option value="longDashDotDot">longDashDotDot</option>
		/// </options>
		dashType: defineProperty("dashType", "solid")
	});
	var _AxisTickConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis tick.
		/// </summary>
}, {
		/// <field type="Number">
		/// Gets or sets the width of the axis tick lines in pixels.
		/// </field>
		size: defineProperty("size", 0),
		/// <field type="Boolean">
		/// Gets or sets the visibility of the axis tick lines.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var Axis = derive(config, function () {
		/// <summary>
		/// Represents an axis on a chart.
		/// </summary>
}, {
		/// <field type="Number">
		/// Gets or sets the value at which this axis crosses the perpendicular axis.
		/// </field>
		axisCrossingValue: defineProperty("axisCrossingValue", 0),
		/// <field type="String">
		/// Gets or sets the color to all apply to all axis elements. Individual color settings
		/// for line and labels take priority. Any valid CSS color is accepted.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="Telerik.UI.Chart._AxisCrossHairConfiguration">
		/// Gets the axis crosshair settings.
		/// </field>
		crosshair: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisLabelConfiguration">
		/// Gets the axis label settings.
		/// </field>
		labels: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisLineConfiguration">
		/// Gets the axis line settings.
		/// </field>
		line: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisLineConfiguration">
		/// Gets the major grid line settings.
		/// </field>
		majorGridLines: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisLineConfiguration">
		/// Gets the minor grid line settings.
		/// </field>
		minorGridLines: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisTickConfiguration">
		/// Gets the major tick settings
		/// </field>
		majorTicks: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisTickConfiguration">
		/// Gets the minor tick settings
		/// </field>
		minorTicks: {get:function(){}},
		/// <field type="Number">
		/// Gets or sets the minimum value of the axis. This property is often used in combination
		/// with the max property to adjust the size of the chart relative to the charting area.
		/// </field>
		min: defineProperty("min", 0),
		/// <field type="Number">
		/// Gets or sets the maximum value of the axis. This property is often used in combination
		/// with the min property to adjust the size of the chart relative to the charting area.
		/// </field>
		max: defineProperty("max", 1),
		/// <field type="Number">
		/// Gets or sets the interval between major divisions. For example, on a column chart, this property
		/// determines the step size whole going up the vertical axis. You can additionally have minor steps
		/// and ticks in between the major ones by adjusting the minorUnit and minorTick.size properties.
		/// </field>
		majorUnit: defineProperty("majorUnit", 0),
		/// <field type="Number">
		/// Gets or sets the interval between minor divisions. For more information, refer to the
		/// majorUnit property description.
		/// </field>
		minorUnit: defineProperty("minorUnit", 0),
		/// <field type="String">
		/// Gets or sets the unique axis name.
		/// </field>
		name: defineProperty("name", ""),
		/// <field type="Boolean">
		/// Prevents the automatic axis range from snapping to 0.
		/// </field>
		narrowRange: defineProperty("narrowRange", false),
		/// <field type="String">
		/// The name of the pane that the axis should be rendered in. The axis will be rendered in the first (default) pane if not set.
		/// </field>
		pane: defineProperty("pane", ""),
		/// <field type="Array" elementType="{ from:0, to: 100, color: 'navy', opacity: 1 }">
		/// Gets or sets the plot bands of the axis. Elements of this array must be
		/// objects of the form { from:0, to: 100, color: 'navy' }
		/// </field>
		plotBands: defineProperty("plotBands", []),
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets a value indicating whether the axis direction is reversed.
		/// </field>
		reverse: defineProperty("reverse", false),
		/// <field type="Telerik.UI.Chart._AxisTitleConfiguration">
		/// Retrieves the chart axis title settings.
		/// </field>
		title: {get:function(){}},
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the visibility of this axis.
		/// </field>
		visible: defineProperty("visible", true),
		/// <field type="String">
		/// Gets or sets the base time interval for the axis when axis values are of Date type. Accepted values are
		/// "minutes", "hours", "days", "months" and "years". The default value is determined automatically from the
		/// minimum difference between subsequent categories.
		/// </field>
		/// <options>
		/// <option value="minutes">minutes</option>
		/// <option value="hours">hours</option>
		/// <option value="days">days</option>
		/// <option value="months">months</option>
		/// <option value="years">years</option>
		/// </options>
		baseUnit: defineProperty("baseUnit", NULL)
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _CategoryAxisConfiguration = derive(Axis, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart category axis.
		/// </summary>
}, {
		/// <field type="Array">
		/// Gets or sets the array of category names that will be used to label the categories in the chart.
		/// </field>
		categories: defineProperty("categories", []),
		/// <field type="String">
		/// Gets or sets the field from the objects in the categories array that will be used to retrieve
		/// the category name. Use this property when the categories array contains objects instead
		/// of primitive types.
		/// </field>
		field: defineProperty("field", ""),
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets a value indicating whether the categories and series are positioned on major ticks. This removes
		/// the empty space before and after the series. Default is true. This option is ignored for bar, column, ohlc or candlestick series.
		/// </field>
		justified: defineProperty("justified", true),
		/// <excludetoc />
		narrowRange: defineProperty("narrowRange", false)
	});
	var _SeriesMarkersConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the markers of a chart series.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the background color of the markers.
		/// </field>
		background: defineProperty("background", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings for the markers.
		/// </field>
		border: {get:function(){}},
		/// <field type="Number" defaultValue="6">
		/// Gets or sets the size of the markers.
		/// </field>
		size: defineProperty("size", 6),
		/// <field type="String" defaultValue="circle">
		/// Gets or sets the shape type of the markers. Accepted values are: "circle", "square" and "triangle". Default is "circle".
		/// </field>
		/// <options>
		/// <option value="circle">circle</option>
		/// <option value="square">square</option>
		/// <option value="triangle">triangle</option>
		/// </options>
		type: defineProperty("type", "circle"),
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the visibility of the markers.
		/// </field>
		visible: defineProperty("visible", true)
	});
	var _SeriesNegativeValuesConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the negative values for a chart series.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the color of the negative values.
		/// </field>
		color: defineProperty("color", "#ffffff"),
		/// <field type="Boolean">
		/// Gets or sets the visibility of the negative values.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var _SeriesLineConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the lines of an area series in a chart.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the color of the area series line.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the opacity of the area series line.
		/// </field>
		opacity: defineProperty("opacity", 1),
		/// <field type="Number" defaultValue="4">
		/// Gets or sets the line width of the area series.
		/// </field>
		width: defineProperty("width", 4),
		/// <field type="String">
		/// Gets or sets the dash type of the line.
		/// </field>
		/// <options>
		/// <option value="solid">solid</option>
		/// <option value="dot">dot</option>
		/// <option value="dash">dash</option>
		/// <option value="longDash">longDash</option>
		/// <option value="dashDot">dashDot</option>
		/// <option value="longDashDot">longDashDot</option>
		/// <option value="longDashDotDot">longDashDotDot</option>
		/// </options>
		dashType: defineProperty("dashType", "solid")
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _PieLabelConnectorConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the pie series label connectors in a chart.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets teh color of the connector line.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="Number" defaultValue="4">
		/// Gets or sets the padding between the connector line and the label, and connector line and the pie chart.
		/// </field>
		padding: defineProperty("padding", 4),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the width of the connector line.
		/// </field>
		width: defineProperty("width", 1)
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _PieLabelConfiguration = derive(_LabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the pie series labels in a chart.
		/// </summary>
}, {
		/// <field type="String" defaultValue="circle">
		/// Defines the alignment of the pie labels. Accepted values are "circle" - the labels are positioned
		/// in a circle around the pie chart; "column" - the labels are positioned in columns to the left and
		/// right of the pie chart.
		/// </field>
		/// <options>
		/// <option value="circle">circle</option>
		/// <option value="column">column</option>
		/// </options>
		align: defineProperty("align", "circle"),
		/// <field type="Number" defaultValue="35">
		/// Gets or sets the distance of the labels from the pie arcs.
		/// </field>
		distance: defineProperty("distance", 35),
		/// <field type="String" defaultValue="outsideEnd">
		/// Defines the position of the pie labels. Accepted values are: "outsideEnd" - labels are positioned outside,
		/// near the end of the pie segments; "insideEnd" - labels are positioned inside, near the end of the pie segments;
		/// "center" - labels are positioned at the center of the pie segments. Default value is "outsideEnd".
		/// </field>
		/// <options>
		/// <option value="outsideEnd">outsideEnd</option>
		/// <option value="insideEnd">insideEnd</option>
		/// <option value="center">center</option>
		/// </options>
		position: defineProperty("position", "outsideEnd")
	});
	var _SeriesTargetConfiguration = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the target in a bullet chart.
		/// </summary>
}, {
		/// <field type="String" defaultValue="#ff0000">
		/// Gets or sets the color of the area series line.
		/// </field>
		color: defineProperty("color", "#ff0000"),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the target.
		/// </field>
		border: {get:function(){}},
		/// <field type="Telerik.UI.Chart._AxisLineConfiguration">
		/// Gets the target line settings.
		/// </field>
		line: {get:function(){}}
	});
	var Pane = derive(config, function (owner, parentMapping, defaults) {
		/// <summary>
		/// Describes the properties of a chart pane.
		/// </summary>
},
	{
		/// <field type="String">
		/// Gets or sets the unique pane name.
		/// </field>
		name: defineProperty("name", ""),
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin of the pane.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the padding of the pane.
		/// </field>
		padding: {get:function(){}},
		/// <field type="String">
		/// Gets or sets the background color of the pane.
		/// </field>
		background: defineProperty("background", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the chart pane.
		/// </field>
		border: {get:function(){}},
		/// <field type="Number">
		/// Gets or sets the width of the crosshair in pixels.
		/// </field>
		height: defineProperty("height", 0),
		/// <field type="Telerik.UI.Chart._TitleConfiguration">
		/// Gets the title settings of the pane.
		/// </field>
		title: {get:function(){}}
	});
	namespace(nsName, {
		_TitleConfiguration: _TitleConfiguration,
		_LegendLabelConfiguration: _LegendLabelConfiguration,
		_LegendConfiguration: _LegendConfiguration,
		_TooltipConfiguration: _TooltipConfiguration,
		_PlotAreaConfiguration: _PlotAreaConfiguration,
		_LabelConfiguration: _LabelConfiguration,
		_AxisCrossHairConfiguration: _AxisCrossHairConfiguration,
		_CrossHairTooltipConfiguration: _CrossHairTooltipConfiguration,
		_AxisTitleConfiguration: _AxisTitleConfiguration,
		_AxisLabelDateFormatConfiguration: _AxisLabelDateFormatConfiguration,
		_AxisLabelConfiguration: _AxisLabelConfiguration,
		_AxisLineConfiguration: _AxisLineConfiguration,
		_AxisTickConfiguration: _AxisTickConfiguration,
		_CategoryAxisConfiguration: _CategoryAxisConfiguration,
		_SeriesMarkersConfiguration: _SeriesMarkersConfiguration,
		_SeriesNegativeValuesConfiguration: _SeriesNegativeValuesConfiguration,
		_SeriesLineConfiguration: _SeriesLineConfiguration,
		_PieLabelConnectorConfiguration: _PieLabelConnectorConfiguration,
		_PieLabelConfiguration: _PieLabelConfiguration,
		_SeriesTargetConfiguration: _SeriesTargetConfiguration,
		Axis: Axis,
		Pane: Pane
	});
})(this, jQuery);/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
(function (global, $, undefined) {
	"use strict";
	//override the default Candlestick point coloring to match the border and 
	//line colors to the specified series color
	var originalGetBorderColor = kendo.dataviz.Candlestick.prototype.getBorderColor;
	kendo.dataviz.Candlestick.prototype.getBorderColor = function () {
		var point = this,
			options = point.options;
		if (!options.border.color) {
			options.border.color = options.color;
		}
		if (!options.line.color) {
			options.line.color = options.color;
		}
		return originalGetBorderColor.apply(point, Array.apply(null, arguments));
	}
	//remove highlight fill overlay from hollow candlestick points
	var originalHighlightOverlay = kendo.dataviz.Candlestick.prototype.highlightOverlay;
	kendo.dataviz.Candlestick.prototype.highlightOverlay = function (view, options) {
		var point = this;
		if (point.value.close < point.value.open) {
			options.fillOpacity = 0;
		}
		return originalHighlightOverlay.apply(point, Array.apply(null, arguments));
	}
	//prepare dataSource for progress indication
	var ui = kendo.dataviz.ui,
		originalInitDataSource = ui.Chart.prototype._initDataSource,
		originalDestroy = ui.Chart.prototype.destroy,
		originalSetDataSource = ui.Chart.prototype.setDataSource;
	ui.Chart.prototype._initDataSource = function (userOptions) {
		var chart = this;
		originalInitDataSource.apply(chart, arguments);
		chart._progressHandler = $.proxy(chart._showBusy, chart);
		chart.dataSource.bind("progress", chart._progressHandler);
		chart.first("dataBound", $.proxy(chart._hideBusy, chart));
		if (chart.dataSource._requestInProgress) {
			chart._showBusy();
		}
	}
	ui.Chart.prototype.destroy = function () {
		var chart = this;
		originalDestroy.apply(chart, arguments);
		chart.dataSource.unbind("progress", chart._progressHandler);
	}
	ui.Chart.prototype.setDataSource = function (dataSource) {
		var chart = this;
		chart.dataSource.unbind("progress", chart._progressHandler);
		originalSetDataSource.apply(chart, arguments);
		chart.dataSource.bind("progress", chart._progressHandler);
	}
	ui.Chart.prototype._showBusy = function () {
		var that = this;
		if (that._busy) {
			return;
		}
		that._busy = setTimeout(function () {
			that.element.attr("aria-busy", true);
			Telerik.UI.progress(that.element, true);
		}, 10);
	}
	ui.Chart.prototype._hideBusy = function () {
		var that = this;
		clearTimeout(that._busy);
		Telerik.UI.progress(that.element, false);
		that.element.attr("aria-busy", false);
		that._busy = null;
	}
})(this, jQuery);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Chart",
		ns = namespace(nsName),
		util = Telerik.Utilities,
		NULL = null,
		config = Telerik.UI._ControlConfiguration,
		defineProperty = config.defineProperty,
		getMapping = config.getMapping,
		priv = util.setPrivate;
	var Series = derive(config, function () {
		/// <summary>
		/// Interal base class for all chart series.
		/// </summary>
}, {
		/// <field type="String" hidden="true">
		/// Gets the type of this series.
		/// </field>
		type: { value: "" },
		/// <field type="String">
		/// Gets or sets the color with which this series is displayed on the plot area.
		/// </field>
		color: defineProperty("color", ""),
		/// <field type="Telerik.UI.Chart._LabelConfiguration">
		/// Gets or sets the settings for the series data labels.
		/// </field>
		labels: {get:function(){}},
		/// <field type="Boolean">
		/// Indicates whether the series should be stacked.
		/// </field>
		stack: defineProperty("stack", false),
		/// <field type="Telerik.UI.Chart._TooltipConfiguration">
		/// Retrieves the tooltip settings for this series.
		/// </field>
		tooltip: {get:function(){}},
		/// <field type="Array">
		/// Gets or sets the array of data points for this series.
		/// </field>
		data: defineProperty("data", []),
		/// <field type="String">
		/// Gets or sets the data field containing the series value.
		/// </field>
		field: defineProperty("field", ""),
		/// <field type="String">
		/// Gets or sets the name template for auto-generated series when binding to grouped data.
		/// Template variables: series, group, group.field, group.value.
		/// </field>
		groupNameTemplate: defineProperty("groupNameTemplate", ""),
		/// <field type="String">
		/// Gets or sets the series name visible in the legend.
		/// </field>
		name: defineProperty("name", ""),
		/// <field type="Boolean" defaultValue="true">
		/// Indicates whether to show the series in the legend.
		/// </field>
		visibleInLegend: defineProperty("visibleInLegend", true),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets series opacity.
		/// </field>
		opacity: defineProperty("opacity", 1)
	});
	/// <excludetoc />
	var _SeriesWithBorder = derive(Series, function () {
		/// <summary>
		/// Base class for all chart series with borders.
		/// </summary>
}, {
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings for this series.
		/// </field>
		border: {get:function(){}}
	});
	var AreaSeries = derive(Series, function () {
		/// <summary>
		/// Creates an instance of an area series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "area" },
		/// <field type="Telerik.UI.Chart._SeriesLineConfiguration">
		/// Gets the line settings for the area series.
		/// </field>
		line: {get:function(){}},
		/// <field type="Telerik.UI.Chart._SeriesMarkersConfiguration">
		/// Gets the marker settings for the area series.
		/// </field>
		markers: {get:function(){}},
		/// <field type="String" defaultValue="gap">
		/// Gets or sets the behavior for handling missing values in area series. Accepted values are:
		/// "gap" - the line stops before missing point and continues after it; "interpolate" - the value
		/// is interpolated from neighboring points; "zero" - the value is assumed to be zero. Default is "gap".
		/// </field>
		/// <options>
		/// <option value="gap">gap</option>
		/// <option value="interpolate">interpolate</option>
		/// <option value="zero">zero</option>
		/// </options>
		missingValues: defineProperty("missingValues", "gap"),
		/// <field type="Number" defaultValue="0.4">
		/// Gets or sets the opacity of the area series.
		/// </field>
		opacity: defineProperty("opacity", 0.4),
		/// <field type="String">
		/// Gets or sets the name of the value axis to use. Defaults to the primary axis.
		/// </field>
		axis: defineProperty("axis", "")
	});
	var _BarSeriesBase = derive(_SeriesWithBorder, function () {
		/// <summary>
		/// Creates an instance of a bar series for RadChart
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the name of the value axis to use. Defaults to the primary axis.
		/// </field>
		axis: defineProperty("axis", ""),
		/// <field type="Number" defaultValue="1.5">
		/// Gets or sets the distance between category clusters.
		/// </field>
		gap: defineProperty("gap", 1.5),
		/// <field type="Number" defaultValue="0.4">
		/// Gets or sets the space between bars.
		/// </field>
		spacing: defineProperty("spacing", 0.4),
		/// <field type="String" defaultValue="none">
		/// Gets or sets the overlay gradient used for this series. Allowed values are "none", "glass", "roundedBevel". Default value is "none".
		/// </field>
		/// <options>
		/// <option value="none">none</option>
		/// <option value="glass">glass</option>
		/// </options>
		overlayGradient: defineProperty("overlayGradient", "none"),
		/// <field type="String">
		/// Gets or sets the name of the data field that contains the series color.
		/// </field>
		colorField: defineProperty("colorField", "")
	});
	var BarSeries = derive(_BarSeriesBase, function () {
		/// <summary>
		/// Creates an instance of a bar series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "bar" },
		/// <field type="String">
		/// Gets or sets the color to use for bars with negative values.
		/// </field>
		negativeColor: defineProperty("negativeColor", "")
	});
	var ColumnSeries = derive(BarSeries, function () {
		/// <summary>
		/// Creates an instance of a column series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "column" }
	});
	var LineSeries = derive(Series, function () {
		/// <summary>
		/// Creates an instance of a line series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "line" },
		/// <field type="String">
		/// Gets or sets the name of the value axis to use. Defaults to the primary axis.
		/// </field>
		axis: defineProperty("axis", ""),
		/// <field type="String">
		/// Gets or sets the dash type of the line.
		/// </field>
		/// <options>
		/// <option value="solid">solid</option>
		/// <option value="dot">dot</option>
		/// <option value="dash">dash</option>
		/// <option value="longDash">longDash</option>
		/// <option value="dashDot">dashDot</option>
		/// <option value="longDashDot">longDashDot</option>
		/// <option value="longDashDotDot">longDashDotDot</option>
		/// </options>
		dashType: defineProperty("dashType", "solid"),
		/// <field type="Telerik.UI.Chart._SeriesMarkersConfiguration">
		/// Gets the marker settings for the line series.
		/// </field>
		markers: {get:function(){}},
		/// <field type="String" defaultValue="gap">
		/// Gets or sets the behavior for handling missing values in line series. Accepted values are:
		/// "gap" - the line stops before missing point and continues after it; "interpolate" - the value
		/// is interpolated from neighboring points; "zero" - the value is assumed to be zero. Default is "gap".
		/// </field>
		/// <options>
		/// <option value="gap">gap</option>
		/// <option value="interpolate">interpolate</option>
		/// <option value="zero">zero</option>
		/// </options>
		missingValues: defineProperty("missingValues", "gap"),
		/// <field type="Number" defaultValue="4">
		/// Gets or sets the line width for this series.
		/// </field>
		width: defineProperty("width", 4)
	});
	var PieSeries = derive(_SeriesWithBorder, function () {
		/// <summary>
		/// Creates an instance of a pie series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "pie" },
		/// <field type="String">
		/// Gets or sets the data field containing the sector category name.
		/// </field>
		categoryField: defineProperty("categoryField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the sector color.
		/// </field>
		colorField: defineProperty("colorField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the boolean value that indicates if the sector is exploded.
		/// </field>
		explodeField: defineProperty("explodeField", ""),
		/// <field type="Telerik.UI.Chart._PieLabelConnectorConfiguration">
		/// Gets the settings for the label connector lines.
		/// </field>
		connectors: {get:function(){}},
		/// <field type="Telerik.UI.Chart._PieLabelConfiguration">
		/// Gets or sets the settings for the series data labels.
		/// </field>
		labels: {get:function(){}},
		/// <field type="Number" defaultValue="0">
		/// Gets the padding value around the pie chart (equal on all sides).
		/// </field>
		padding: defineProperty("padding", 0),
		/// <field type="Number" defaultValue="90">
		/// Gets or sets the start angle of the first pie segment. Default is 90 degrees.
		/// </field>
		startAngle: defineProperty("startAngle", 90),
		/// <field type="String" defaultValue="roundedBevel">
		/// Gets or sets the overlay gradient used for this series. Accepted values are "roundedBevel", "glass" and "none".
		/// </field>
		/// <options>
		/// <option value="none">none</option>
		/// <option value="sharpBevel">sharpBevel</option>
		/// <option value="roundedBevel">roundedBevel</option>
		/// </options>
		overlayGradient: defineProperty("overlayGradient", "roundedBevel")
	});
	var DonutSeries = derive(PieSeries, function () {
		/// <summary>
		/// Creates an instance of a donut series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "donut" },
		/// <field type="Number">
		/// The the radius of the donut hole. If the value is not set, it will be automatically calculated based on the chart size.
		/// </field>
		holeSize: defineProperty("holeSize", 0),
		/// <field type="Number">
		/// The margin around each series (not available for the last level of the series).
		/// </field>
		margin: defineProperty("margin", 1),
		/// <field type="Number">
		/// The width of the donut ring. If the value is not set, it will be automatically calculated based on the chart size.
		/// </field>
		size: defineProperty("size", 0),
		/// <field type="String" defaultValue="none">
		/// Gets or sets the overlay gradient used for this series. Accepted values are "roundedBevel", "glass" and "none".
		/// </field>
		/// <options>
		/// <option value="none">none</option>
		/// <option value="sharpBevel">sharpBevel</option>
		/// <option value="roundedBevel">roundedBevel</option>
		/// </options>
		overlayGradient: defineProperty("overlayGradient", "none")
	});
	var _ScatterBaseSeries = derive(Series, function () {
		/// <summary>
		/// Creates an instance of a scatter series for RadChart
		/// </summary>
}, {
		/// <field type="String">
		/// The data field containing the scatter x value.
		/// </field>
		xField: defineProperty("xField", ""),
		/// <field type="String">
		/// The data field containing the scatter y value.
		/// </field>
		yField: defineProperty("yField", ""),
		/// <field type="String">
		/// Gets or sets name of the X axis to use. If not specified, defaults to the primary axis.
		/// </field>
		xAxis: defineProperty("xAxis", ""),
		/// <field type="String">
		/// Gets or sets name of the Y axis to use. If not specified, defaults to the primary axis.
		/// </field>
		yAxis: defineProperty("yAxis", "")
	});
	var ScatterSeries = derive(_ScatterBaseSeries, function () {
		/// <summary>
		/// Creates an instance of a scatter series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "scatter" },
		/// <field type="Telerik.UI.Chart._SeriesMarkersConfiguration">
		/// Gets the marker settings for the scatter series.
		/// </field>
		markers: {get:function(){}}
	});
	var BubbleSeries = derive(_ScatterBaseSeries, function () {
		/// <summary>
		/// Creates an instance of a bubble series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "bubble" },
		/// <field type="String">
		/// The data field containing the bubble category name.
		/// </field>
		categoryField: defineProperty("categoryField", ""),
		/// <field type="String">
		/// The data field containing the bubble color.
		/// </field>
		colorField: defineProperty("colorField", ""),
		/// <field type="Number">
		/// The max size of the bubble.
		/// </field>
		maxSize: defineProperty("maxSize", 100),
		/// <field type="Number">
		/// The min size of the bubble.
		/// </field>
		minSize: defineProperty("minSize", 5),
		/// <field type="Telerik.UI.Chart._SeriesNegativeValuesConfiguration">
		/// The settings for negative values.
		/// </field>
		negativeValues: {get:function(){}},
		/// <field type="String">
		/// The data field containing the bubble size value.
		/// </field>
		sizeField: defineProperty("sizeField", ""),
		/// <field type="String">
		/// The data field containing the bubble x value.
		/// </field>
		xField: defineProperty("xField", ""),
		/// <field type="String">
		/// The data field containing the bubble y value.
		/// </field>
		yField: defineProperty("yField", ""),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings for this series.
		/// </field>
		border: {get:function(){}}
	});
	var ScatterLineSeries = derive(ScatterSeries, function () {
		/// <summary>
		/// Creates an instance of a scatter line series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "scatterLine" },
		/// <field type="String">
		/// Gets or sets the dash type of the line.
		/// </field>
		/// <options>
		/// <option value="solid">solid</option>
		/// <option value="dot">dot</option>
		/// <option value="dash">dash</option>
		/// <option value="longDash">longDash</option>
		/// <option value="dashDot">dashDot</option>
		/// <option value="longDashDot">longDashDot</option>
		/// <option value="longDashDotDot">longDashDotDot</option>
		/// </options>
		dashType: defineProperty("dashType", "solid"),
		/// <field type="String" defaultValue="gap">
		/// Gets or sets the behavior for handling missing values in scatter line series. Accepted values are:
		/// "gap" - the line stops before missing point and continues after it; "interpolate" - the value
		/// is interpolated from neighboring points; "zero" - the value is assumed to be zero. Default is "gap".
		/// </field>
		/// <options>
		/// <option value="gap">gap</option>
		/// <option value="interpolate">interpolate</option>
		/// <option value="zero">zero</option>
		/// </options>
		missingValues: defineProperty("missingValues", "gap"),
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the line width for this series.
		/// </field>
		width: defineProperty("width", 1)
	});
	var VerticalAreaSeries = derive(AreaSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical area series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "verticalArea" }
	});
	var VerticalLineSeries = derive(LineSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical line series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "verticalLine" }
	});
	var _CandleStickOhlcBase = derive(_BarSeriesBase, function () {
		/// <summary>
		/// Base for the candlestick and ohlc financial series for RadChart.
		/// </summary>
}, {
		/// <field type="Object">
		/// Aggregate function for date series. This function is used when a category (year, month, etc.) contains two or more points. The function return values are displayed instead of the individual points.
		/// </field>
		aggregates: NULL,
		/// <field type="String">
		/// Gets or sets the data field containing the base series color.
		/// </field>
		colorField: defineProperty("colorField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the open value.
		/// </field>
		openField: defineProperty("openField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the high value.
		/// </field>
		highField: defineProperty("highField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the low value.
		/// </field>
		lowField: defineProperty("lowField", ""),
		/// <field type="String">
		/// Gets or sets the data field containing the close value.
		/// </field>
		closeField: defineProperty("closeField", ""),
		/// <field type="Telerik.UI.Chart._SeriesLineConfiguration">
		/// Gets the line settings for this series.
		/// </field>
		line: {get:function(){}},
		/// <field type="Number" defaultValue="1">
		/// Gets or sets the distance between category clusters.
		/// </field>
		gap: defineProperty("gap", 1),
		/// <field type="Number" defaultValue="0.3">
		/// Gets or sets the space between bars.
		/// </field>
		spacing: defineProperty("spacing", 0.3),
	});
	var CandleStickSeries = derive(_CandleStickOhlcBase, function () {
		/// <summary>
		/// Creates an instance of a candlestick financial series for RadChart.
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "candlestick" },
		/// <field type="String">
		/// Gets or sets the series color when the close value is smaller than the open value.
		/// </field>
		downColor: defineProperty("downColor", ""),
		/// <field type="String">
		/// Gets or sets the field name that contains the series color when the close value is smaller than the open value.
		/// </field>
		downColorField: defineProperty("downColorField", "")
	});
	var OhlcSeries = derive(_CandleStickOhlcBase, function () {
		/// <summary>
		/// Creates an instance of a candlestick financial series for RadChart.
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "ohlc" }
	});
	var BulletSeries = derive(_SeriesWithBorder, function () {
		/// <summary>
		/// Creates an instance of a bullet series for RadChart.
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "bullet" },
		/// <field type="String">
		/// Gets or sets the field from the objects in the data array that will be used to retrieve
		/// the current value.
		/// </field>
		currentField: defineProperty("currentField", ""),
		/// <field type="String">
		/// Gets or sets the field from the objects in the data array that will be used to retrieve
		/// the target value.
		/// </field>
		targetField: defineProperty("targetField", ""),
		/// <field type="Telerik.UI.Chart._SeriesTargetConfiguration">
		/// Gets the target settings for this series.
		/// </field>
		target: {get:function(){}},
		/// <field type="Number" defaultValue="1.5">
		/// Gets or sets the distance between elements in the bullet chart.
		/// </field>
		gap: defineProperty("gap", 1.5)
	});
	var VerticalBulletSeries = derive(BulletSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical bullet series for RadChart.
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "verticalBullet" }
	});
	namespace(nsName, {
		Series: Series,
		_SeriesWithBorder: _SeriesWithBorder,
		AreaSeries: AreaSeries,
		BarSeries: BarSeries,
		ColumnSeries: ColumnSeries,
		LineSeries: LineSeries,
		PieSeries: PieSeries,
		DonutSeries: DonutSeries,
		ScatterSeries: ScatterSeries,
		BubbleSeries: BubbleSeries,
		ScatterLineSeries: ScatterLineSeries,
		VerticalAreaSeries: VerticalAreaSeries,
		VerticalLineSeries: VerticalLineSeries,
		CandleStickSeries: CandleStickSeries,
		OhlcSeries: OhlcSeries,
		BulletSeries: BulletSeries,
		VerticalBulletSeries: VerticalBulletSeries
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		config = Telerik.UI._ControlConfiguration,
		util = Telerik.Utilities,
		chartConfig = Telerik.UI.Chart,
		defineProperty = config.defineProperty,
		nsName = "Telerik.UI.Sparkline",
		ns = namespace(nsName),
		getMapping = config.getMapping,
		priv = util.setPrivate,
		NULL = null;
	var Axis = derive(chartConfig.Axis, function () {
		/// <summary>
		/// Represents an axis on a chart.
		/// </summary>
}, {
		/// <field type="Boolean">
		/// Prevents the automatic axis range from snapping to 0.
		/// </field>
		narrowRange: defineProperty("narrowRange", true),
		/// <field type="Telerik.UI.Sparkline._AxisLineConfiguration">
		/// Gets the major grid line settings.
		/// </field>
		majorGridLines: {get:function(){}},
		/// <field type="Telerik.UI.Sparkline._AxisCrossHairConfiguration">
		/// Gets the axis crosshair settings.
		/// </field>
		crosshair: {get:function(){}},
		/// <excludetoc />
		pane: defineProperty("pane", ""),
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets the visibility of this axis.
		/// </field>
		visible: defineProperty("visible", false)
	});
	/// <excludetoc />
	var Pane = derive(chartConfig.Pane, function (owner, parentMapping, defaults) {
		/// <summary>
		/// Describes the properties of a chart pane.
		/// </summary>
	});
	var Series = derive(chartConfig.Series, function () {
		/// <summary>
		/// Interal base class for all chart series.
		/// </summary>
}, {
		/// <excludetoc />
		visibleInLegend: defineProperty("visibleInLegend", true)
	});
	var AreaSeries = derive(chartConfig.AreaSeries, function () {
		/// <summary>
		/// Creates an instance of an area series for RadChart
		/// </summary>
}, {
		/// <excludetoc />
		visibleInLegend: {}
	});
	var BarSeries = derive(chartConfig.BarSeries, function () {
		/// <summary>
		/// Creates an instance of a bar series for RadChart
		/// </summary>
}, {
		/// <excludetoc />
		visibleInLegend: {},
		/// <field type="Boolean">
		/// Indicates whether the series should be stacked.
		/// </field>
		stack: defineProperty("stack", true)
	});
	var BulletSeries = derive(chartConfig.BulletSeries, function () {
		/// <summary>
		/// Creates an instance of a bullet series for RadChart.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the field from the objects in the data array that will be used to retrieve
		/// the target value.
		/// </field>
		targetField: defineProperty("targetField", ""),
		/// <excludetoc />
		visibleInLegend: {}
	});
	var ColumnSeries = derive(BarSeries, function () {
		/// <summary>
		/// Creates an instance of a column series for RadChart
		/// </summary>
}, {
		/// <field type="String" readonly="true">
		/// Gets the type of the series.
		/// </field>
		type: { value: "column" },
		/// <excludetoc />
		visibleInLegend: {}
	});
	var LineSeries = derive(chartConfig.LineSeries, function () {
		/// <summary>
		/// Creates an instance of a line series for RadChart
		/// </summary>
}, {
		/// <excludetoc />
		visibleInLegend: {},
		/// <field type="Number" defaultValue="0.5">
		/// Gets or sets the line width of the area series.
		/// </field>
		width: defineProperty("width", 0.5)
	});
	/// <excludetoc />
	var CandleStickSeries = derive(chartConfig.CandleStickSeries, function () {
		/// <summary>
		/// Creates an instance of a candlestick financial series for RadChart.
		/// </summary>
	});
	/// <excludetoc />
	var OhlcSeries = derive(chartConfig.OhlcSeries, function () {
		/// <summary>
		/// Creates an instance of a candlestick financial series for RadChart.
		/// </summary>
	});
	/// <excludetoc />
	var BubbleSeries = derive(chartConfig.BubbleSeries, function () {
		/// <summary>
		/// Creates an instance of a bubble series for RadChart
		/// </summary>
	});
	var PieSeries = derive(chartConfig.PieSeries, function () {
		/// <summary>
		/// Creates an instance of a pie series for RadChart
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the field from the objects in the data array that will be used to retrieve
		/// the target value.
		/// </field>
		targetField: defineProperty("targetField", ""),
		/// <excludetoc />
		visibleInLegend: {},
		/// <field type="String" defaultValue="none">
		/// Gets or sets the overlay gradient used for this series. Accepted values are "roundedBevel", "glass" and "none".
		/// </field>
		/// <options>
		/// <option value="none">none</option>
		/// <option value="sharpBevel">sharpBevel</option>
		/// <option value="roundedBevel">roundedBevel</option>
		/// </options>
		overlayGradient: defineProperty("overlayGradient", "none")
	});
	/// <excludetoc />
	var DonutSeries = derive(chartConfig.PieSeries, function () {
		/// <summary>
		/// Creates an instance of a donut series for RadChart
		/// </summary>
	});
	/// <excludetoc />
	var ScatterSeries = derive(chartConfig.ScatterSeries, function () {
		/// <summary>
		/// Creates an instance of a scatter series for RadChart
		/// </summary>
	});
	/// <excludetoc />
	var ScatterLineSeries = derive(chartConfig.ScatterLineSeries, function () {
		/// <summary>
		/// Creates an instance of a scatter line series for RadChart
		/// </summary>
	});
	/// <excludetoc />
	var VerticalAreaSeries = derive(AreaSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical area series for RadChart
		/// </summary>
	});
	/// <excludetoc />
	var VerticalLineSeries = derive(LineSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical line series for RadChart
		/// </summary>
	});
	var VerticalBulletSeries = derive(BulletSeries, function () {
		/// <summary>
		/// Creates an instance of a vertical bullet series for RadChart.
		/// </summary>
}, {
		/// <field type="String">
		/// Gets or sets the field from the objects in the data array that will be used to retrieve
		/// the target value.
		/// </field>
		targetField: defineProperty("targetField", ""),
		/// <excludetoc />
		visibleInLegend: {}
	});
	var _AxisLineConfiguration = derive(chartConfig._AxisLineConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis line.
		/// </summary>
}, {
		/// <field type="Boolean">
		/// Gets or sets the visibility of the axis line.
		/// </field>
		visible: defineProperty("visible", false),
		/// <field type="Number" defaultValue="0.5">
		/// Gets or sets the width of the axis line in pixels.
		/// </field>
		width: defineProperty("width", 0.5)
	});
	var _AxisTickConfiguration = derive(chartConfig._AxisTickConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis tick.
		/// </summary>
	});
	var _CrossHairTooltipConfiguration = derive(chartConfig._CrossHairTooltipConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a crosshair tooltip.
		/// </summary>
	});
	var _AxisCrossHairConfiguration = derive(chartConfig._AxisCrossHairConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis crosshair.
		/// </summary>
}, {
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the visibility of the crosshair. Default is true
		/// </field>
		visible: defineProperty("visible", true),
	});
	/// <ancestor type="Telerik.UI._ControlConfiguration" />
	var _CategoryAxisConfiguration = derive(Axis, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart category axis.
		/// </summary>
	});
	var _AxisLabelConfiguration = derive(chartConfig._AxisLabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart axis labels.
		/// </summary>
	});
	var _AxisTitleConfiguration = derive(chartConfig._AxisTitleConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the date label format on a chart axis.
		/// </summary>
	});
	var _AxisLabelDateFormatConfiguration = derive(chartConfig._AxisLabelDateFormatConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart axis title.
		/// </summary>
	});
	/// <excludetoc />
	var _LegendLabelConfiguration = derive(chartConfig._LegendLabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of chart legend labels.
		/// </summary>
	});
	/// <excludetoc />
	var _LegendConfiguration = derive(chartConfig._LegendConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart legend.
		/// </summary>
}, {
		/// <field type="Boolean" defautlValue="false">
		/// Gets or sets the legend visibility. Default is false.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var _LabelConfiguration = derive(chartConfig._LabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of chart labels.
		/// </summary>
	});
	var _PieLabelConnectorConfiguration = derive(chartConfig._PieLabelConnectorConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the pie series label connectors in a chart.
		/// </summary>
	});
	var _PieLabelConfiguration = derive(chartConfig._PieLabelConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the pie series labels in a chart.
		/// </summary>
	});
	var _SeriesLineConfiguration = derive(chartConfig._SeriesLineConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the lines of an area series in a chart.
		/// </summary>
}, {
		/// <field type="Number" defaultValue="0.5">
		/// Gets or sets the line width of the area series.
		/// </field>
		width: defineProperty("width", 0.5)
	});
	var _TitleConfiguration = derive(chartConfig._TitleConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart title.
		/// </summary>
	});
	var _TooltipConfiguration = derive(chartConfig._TooltipConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of a chart tooltip.
		/// </summary>
}, {
		/// <field type="Boolean">
		/// Gets or sets the tooltip visibility. Default is true.
		/// </field>
		visible: defineProperty("visible", true),
		/// <field type="Boolean">
		/// A value indicating if the tooltip should be shared. Default is true.
		/// </field>
		shared: defineProperty("shared", true)
	});
	var _PlotAreaConfiguration = derive(chartConfig._PlotAreaConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the chart plot area.
		/// </summary>
	});
	var _SeriesMarkersConfiguration = derive(chartConfig._SeriesMarkersConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the markers of a chart series.
		/// </summary>
}, {
		/// <field type="Number" defaultValue="2">
		/// Gets or sets the size of the markers.
		/// </field>
		size: defineProperty("size", 2),
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets the visibility of the markers.
		/// </field>
		visible: defineProperty("visible", false)
	});
	var _SeriesNegativeValuesConfiguration = derive(chartConfig._SeriesNegativeValuesConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the negative values for a chart series.
		/// </summary>
	});
	var _SeriesTargetConfiguration = derive(chartConfig._SeriesTargetConfiguration, function (owner, parentMapping, defaults) {
		/// <summary>
		/// For internal usage only. Describes the properties of the negative values for a chart series.
		/// </summary>
	});
	namespace(nsName, {
		Axis: Axis,
		AreaSeries: AreaSeries,
		BarSeries: BarSeries,
		ColumnSeries: ColumnSeries,
		LineSeries: LineSeries,
		PieSeries: PieSeries,
		Series: Series,
		CandleStickSeries: CandleStickSeries,
		OhlcSeries: OhlcSeries,
		BubbleSeries: BubbleSeries,
		DonutSeries: DonutSeries,
		ScatterSeries: ScatterSeries,
		ScatterLineSeries: ScatterLineSeries,
		VerticalAreaSeries: VerticalAreaSeries,
		VerticalLineSeries: VerticalLineSeries,
		BulletSeries: BulletSeries,
		VerticalBulletSeries: VerticalBulletSeries,
		_AxisLineConfiguration: _AxisLineConfiguration,
		_AxisTickConfiguration: _AxisTickConfiguration,
		_AxisCrossHairConfiguration: _AxisCrossHairConfiguration,
		_AxisLabelConfiguration: _AxisLabelConfiguration,
		_AxisTitleConfiguration: _AxisTitleConfiguration,
		_AxisLabelDateFormatConfiguration: _AxisLabelDateFormatConfiguration,
		_TooltipConfiguration: _TooltipConfiguration,
		_PlotAreaConfiguration: _PlotAreaConfiguration,
		_CrossHairTooltipConfiguration: _CrossHairTooltipConfiguration,
		_CategoryAxisConfiguration: _CategoryAxisConfiguration,
		_LegendLabelConfiguration: _LegendLabelConfiguration,
		_LegendConfiguration: _LegendConfiguration,
		_LabelConfiguration: _LabelConfiguration,
		_PieLabelConnectorConfiguration: _PieLabelConnectorConfiguration,
		_PieLabelConfiguration: _PieLabelConfiguration,
		_TitleConfiguration: _TitleConfiguration,
		_SeriesLineConfiguration: _SeriesLineConfiguration,
		_SeriesMarkersConfiguration: _SeriesMarkersConfiguration,
		_SeriesNegativeValuesConfiguration: _SeriesNegativeValuesConfiguration,
		_SeriesTargetConfiguration: _SeriesTargetConfiguration
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		derive = win.Class.derive,
		namespace = win.Namespace.define,
		utilities = win.Utilities,
		mix = win.Class.mix,
		util = Telerik.Utilities,
		ui = Telerik.UI,
		nsName = "Telerik.UI.Sparkline",
		ns = namespace(nsName),
		common = ui.Common,
		OBJECT = "object",
		ARRAY = "array",
		FUNCTION = "function",
		NULL = null,
		config = ui._ControlConfiguration,
		defineProperty = config.defineProperty,
		getMapping = config.getMapping,
		priv = util.setPrivate;
	/// <summary>
	/// A charting control that can visualize sparkline chart type.
	/// </summary>
	/// <icon src="sparkline_html_12.png" width="12" height="12" />
	/// <icon src="sparkline_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadSparkline"></div>]]></htmlSnippet>
	/// <event name="axislabelclick">Fires when an axis label is clicked.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <event name="dragstart">Fires when the user has used the mouse or a swipe gesture to drag the chart.</event>
	/// <event name="drag">Fires as long as the user is dragging the chart using the mouse or swipe gestures.</event>
	/// <event name="dragend">Fires when the user stops dragging the chart.</event>
	/// <event name="plotareaclick">Fires when the plot area is clicked.</event>
	/// <event name="seriesclick">Fires when any of the chart series is clicked.</event>
	/// <event name="serieshover">Fires when any of the chart series is hovered.</event>
	/// <event name="zoomstart">Fires when the user has used the mousewheel to zoom the chart..</event>
	/// <event name="zoom">Fires as long as the user is zooming the chart using the mousewheel.</event>
	/// <event name="zoomend">Fires when the user stops zooming the chart.</event>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	var RadSparkline = derive(ui.RadChart, function (element, options) {
		/// <summary>
		/// Creates a new RadSparkline control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Telerik.UI.Common._BoxConfiguration">
		/// Gets the margin settings of the chart area.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Array">
		/// The data for the default sparkline series. Will be discarded if series are supplied.
		/// </field>
		data: {get:function(){}, set:function(value){}},
		/// <excludetoc />
		legend: {},
		/// <excludetoc />
		panes: {},
		/// <field type="Number" defaultValue="5">
		/// The width to allocate for each data point.
		/// </field>
		pointWidth: defineProperty("pointWidth", 5),
		refresh: function () {
			/// <summary>
			/// Reloads the data and repaints the chart.
			/// </summary>
},
		redraw: function () {
			/// <excludetoc />
			/// <summary>
			/// Repaints the chart.
			/// </summary>
},
		/// <excludetoc />
		title: {},
		/// <field type="String">
		/// Gets or sets the type of the serie
		/// </field>
		type: {get:function(){}, set:function(value){}},
		/// <excludetoc />
		xAxis: {},
		/// <excludetoc />
		xAxes: {},
		/// <excludetoc />
		yAxis: {},
		/// <excludetoc />
		yAxes: {}
	});
	mix(RadSparkline, utilities.createEventProperties("axislabelclick", "databound", "dragstart", "drag", "dragend", "plotareaclick", "seriesclick", "serieshover", "zoomstart", "zoom", "zoomend"));
	namespace("Telerik.UI", {
		RadSparkline: RadSparkline
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datasource.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Grid",
		config = Telerik.UI._ControlConfiguration,
		defineProperty = config.defineProperty,
		util = Telerik.Utilities,
		templateValidator = util._validators.unifiedTemplate,
		STRING = "string",
		ARRAY = "array",
		OBJECT = "object",
		FUNCTION = "function",
		NULL = "null";
	namespace(nsName, {
		Column: derive(config, function () {
			/// <summary>
			/// A class representing a grid column.
			/// </summary>
}, {
			/// <field type="Object">
			/// Definition of column cells' HTML attributes.
			/// Reserved words in Javascript should be enclosed in quotation marks.
			/// </field>
			attributes: defineProperty("attributes", null),
			/// <field type="Object">
			/// Definition of column header cell's HTML attributes.
			/// Reserved words in Javascript should be enclosed in quotation marks.
			/// </field>
			headerAttributes: defineProperty("headerAttributes", null),
			/// <field type="Object">
			/// Definition of column footer cell's HTML attributes.
			/// Reserved words in Javascript should be enclosed in quotation marks.
			/// </field>
			footerAttributes: defineProperty("footerAttributes", null),
			/// <field type="Object">
			/// The aggregates to be used when grouping is applied.
			/// </field>
			aggregates: defineProperty("aggregates", null),
			/// <field type="String">
			/// Definition of command column. The supported built-in commands are: "create", "cancel", "save", "destroy".
			/// Accepts a string or an array of strings to specify multiple commands.
			/// </field>
			command: defineProperty("command", ""),
			/// <field type="Function">
			/// Provides a way to specify custom editor for this column.
			/// </field>
			editor: defineProperty("editor", null),
			/// <field type="Boolean" defaultValue="true">
			/// Specified whether the column content is escaped. Disable encoding if the data contains HTML markup.
			/// </field>
			encoded: defineProperty("encoded", true),
			/// <field type="String">
			/// The field from the datasource that will be displayed in the column.
			/// </field>
			field: defineProperty("field", ""),
			/// <field type="Telerik.UI.Grid._ColumnFilterableConfiguration">
			/// Specifies filtering options for this column. This property is read-only, but accepts a boolean
			/// value indicating whether filtering is enabled for the column, providing a shortcut for filterable.enabled.
			/// </field>
			filterable: {get:function(){}, set:function(value){}},
			/// <field type="Array">
			/// Gets or sets an array of values that will be displayed instead of the bound values.
			/// Each item in the array must have a text and a value field.
			/// </field>
			values: defineProperty("values", null),
			/// <field type="String">
			/// The format that will be applied on the column cells.
			/// </field>
			format: defineProperty("format", ""),
			/// <field type="Boolean" defaultValue="false">
			/// Specifies whether given column is hidden.
			/// </field>
			hidden: defineProperty("hidden", false),
			/// <field type="Boolean" defaultValue="true">
			/// Specifies whether given column is sortable.
			/// </field>
			sortable: defineProperty("sortable", true),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for column's cells.
			/// </field>
			template: defineProperty("template", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for column's header cells.
			/// </field>
			headerTemplate: defineProperty("headerTemplate", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for column's footer cells.
			/// </field>
			footerTemplate: defineProperty("footerTemplate", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for column's group header cells.
			/// </field>
			groupHeaderTemplate: defineProperty("groupHeaderTemplate", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for column's group footer cells.
			/// </field>
			groupFooterTemplate: defineProperty("groupFooterTemplate", null),
			/// <field type="String">
			/// The text that will be displayed in the column header.
			/// </field>
			title: defineProperty("title", ""),
			/// <field type="String">
			/// The width of the column.
			/// </field>
			width: defineProperty("width", "")
			}),
		_ColumnFilterableConfiguration: derive(config, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the filtering properties in a grid.
			/// </summary>			
}, {
			/// <field type="Boolean" defaultvalue="true">
			/// Gets or sets whether editing is enabled in the grid. Default is false.
			/// </field>
			enabled: defineProperty("enabled", true),
			/// <field type="Object">
			/// Gets or sets the template rendered in the filter menu.
			/// </field>
			template: defineProperty("template", null),
			/// <field type="Function" defaultValue="null">
			/// Gets or sets a function that will update the custom filter UI with values from the grid's filter expression. The
			/// function accepts two arguments - the HTML element that contains the rendered filter menu and a filter expressions object
			/// that contains the filter state of the grid.
			/// </field>
			refresh: defineProperty("refresh", null),
			/// <field type="Function" defaultValue="null">
			/// Gets or sets a function that will collect and return a filter expression from a custom filter UI. The functions accepts
			/// a single parameter - the HTML element that contains the rendered filter menu. The developer must collect filter data
			/// and return a filter expression object from the function.
			/// </field>
			apply: defineProperty("apply", null)
			}, {
			adjust: function (userOptions) {
				if (userOptions && util.getType(userOptions.columns) === ARRAY) {
					userOptions.columns.forEach(function (column, index) {
						if (util.getType(column) === STRING) {
							userOptions.columns[index] = column = { field: column };
						}
						if (util.getType(column) === OBJECT) {
							delete column._filterable;
							if (util.getType(column.filterable) === OBJECT &&
								column.filterable.enabled === false) {
								column._filterable = column.filterable;
								column.filterable = false;
							}
							else if (column.filterable === false) {
								column._filterable = { enabled: false }
							}
						}
					});
				}
			}
		}),
		/// <excludetoc />
		ToolBarItem: derive(config, function () {
			/// <summary>
			/// A class representing a grid toolbar command.
			/// </summary>
}, {
			/// <field type="String">
			/// The name of the command. One of the predefined or a custom.
			/// </field>
			name: defineProperty("name", ""),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// The template for the command button.
			/// </field>
			template: defineProperty("template", null),
			/// <field type="String">
			/// The text of the command that will be set on the button.
			/// </field>
			text: defineProperty("text", "")
			}),
		EditableConfiguration: derive(config, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the editing properties in a grid.
			/// </summary>
}, {
			/// <field type="Boolean" defaultvalue="false">
			/// Gets or sets whether editing is enabled in the grid. Default is false.
			/// </field>
			enabled: {get:function(){}, set:function(value){}},
			/// <field type="Boolean" defaultvalue="true">
			/// Gets or sets whether items should be immediately deleted or only marked for deletion. Default is true.
			/// </field>
			destroy: defineProperty("destroy", true),
			/// <field type="String" defaultvalue="cell">
			/// Gets or sets the editing mode. Accepted values are "cell", "cellBatch", and "row". Default is "cell".
			/// </field>
			/// <options>
			/// <option value="cell">cell</option>
			/// <option value="cellBatch">cellBatch</option>
			/// <option value="row">row</option>
			/// </options>
			mode: defineProperty("mode", "cell"),
			/// <field type="String" defaultvalue="top">
			/// Indicates whether the created record should be inserted at the top or at the bottom of the current page. Available values are "top" and "bottom". Default value is "top".
			/// </field>
			/// <options>
			/// <option value="top">top</option>
			/// <option value="bottom">bottom</option>
			/// </options>
			createAt: defineProperty("createAt", "top"),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Gets or sets the template for that will be used when editing in "popup" mode.
			/// </field>
			template: defineProperty("template", null),
			/// <field type="Boolean" defaultvalue="true">
			/// Gets or sets whether an item should be switched to edit mode on click. Default is true.
			/// </field>
			update: defineProperty("update", true),
			/// <field type="Boolean" defaultvalue="true">
			/// Gets or sets whether an the insert new item button is visible. Default is true.
			/// </field>
			create: defineProperty("create", true)
			})
	});
})(this, jQuery);
//Override kendo editable with our own editors
(function ($, kendo) {
	var utilities = WinJS.Utilities,
		BOOLEAN = "boolean";
	function fieldType(field) {
		field = field != null ? field : "";
		return field.type || $.type(field) || "string";
	}
	function createAttributes(options) {
		var specialRules = ["url", "email", "number", "date", "boolean"],
			field = (options.model.fields || options.model)[options.field],
			type = fieldType(field),
			validation = field ? field.validation : {},
			ruleName,
			DATATYPE = kendo.attr("type"),
			BINDING = kendo.attr("bind"),
			rule,
			attr = {
				name: options.field
			};
		for (ruleName in validation) {
			rule = validation[ruleName];
			if ($.inArray(ruleName, specialRules) >= 0) {
				attr[DATATYPE] = ruleName;
			} else if (!$.isFunction(rule)) {
				attr[ruleName] = $.isPlainObject(rule) ? rule.value || ruleName : rule;
			}
			attr[kendo.attr(ruleName + "-msg")] = rule.message;
		}
		if ($.inArray(type, specialRules) >= 0) {
			attr[DATATYPE] = type;
		}
		attr[BINDING] = (type === BOOLEAN ? "checked:" : "value:") + options.field;
		return attr;
	}
	kendo.ui.Editable.prototype._originalEditor = kendo.ui.Editable.prototype.editor;
	kendo.ui.Editable.prototype.editor = function winEditorOverride(field, modelField) {
		var that = this,
			nameSpecialCharRegExp = /("|'|\[|\]|\$|\.|\:|\+)/g,
				isObject = $.isPlainObject(field),
				fieldName = isObject ? field.field : field,
			containerFor = fieldName.replace(nameSpecialCharRegExp, "\\$1"),
				cellWrapper = document.createElement("div");
			cellWrapper.className = "t-edit-cell-wrapper";
		cellWrapper.setAttribute(kendo.attr("container-for"), containerFor);
		if (that.element && that.element.length) {	
			if (that.element[0].tagName === "TD") {
			that.element[0].appendChild(cellWrapper);
			} else {
				var cell = that.element.find("td:visible").eq(0).filter("[data-container-for=" + containerFor + "]");
				if (cell[0]) {
					cell[0].removeAttribute(kendo.attr("container-for"));
					cell[0].appendChild(cellWrapper);
				}
			}
		}
		that._originalEditor(field, modelField);
	};
	kendo.ui.Editable.prototype.options.editors.number = function winNumberEditor(container, options) {
		var attr = createAttributes(options),
			numInput = $("<input/>").attr(attr),
			numericBox = new Telerik.UI.RadNumericBox(numInput[0], { swipe: false, format: options.format });
		var el = numericBox.element;
		container.append(el);
		$('<span ' + kendo.attr("for") + '="' + options.field + '" class="k-invalid-msg"/>').hide().appendTo(container);
	};
	kendo.ui.Editable.prototype.options.editors.values = function winValuesEditor(container, options) {
		var attr = createAttributes(options),
			ddlInput = $("<input/>").attr(attr),
			ddl = new Telerik.UI.RadDropDownList(ddlInput[0], { dataSource: options.values });
		var el = ddl.element;
		container.append(el);
		$('<span ' + kendo.attr("for") + '="' + options.field + '" class="k-invalid-msg"/>').hide().appendTo(container);
	};
	kendo.ui.Editable.prototype.options.editors.date = function winDateEditor(container, options) {
		var attr = createAttributes(options);
		//var format = options.format;
		//TODO: Format
		//if (format) {
		//	format = kendo._extractFormat(format);
		//	attr[kendo.attr("format")] = format;
		//}
		var dpel = document.createElement("div");
		container.append(dpel);
		var datePicker = new Telerik.UI.RadDatePicker(dpel, { value: options.model[options.field] });
		datePicker.onchange = function myfunction(args) {
			var hiddenInput = $(args.target._hiddenInput),
				newValue = args.target.value instanceof Date ? args.target.value.toISOString() : "";
			hiddenInput.val(newValue).change();
		}
		// fix when navigatable is true and you focused the datepicker you should not be able to navigate with arrows
		$(datePicker.element).on("keydown.kendoGrid", function (e) {
			e.stopPropagation();
		});
		$(datePicker._hiddenInput).attr(attr);
		setImmediate(function () {
			var initialValue = datePicker.value instanceof Date ? datePicker.value.toISOString() : "";
			datePicker._hiddenInput.value = initialValue;
		});
		$('<span ' + kendo.attr("for") + '="' + options.field + '" class="k-invalid-msg"/>').hide().appendTo(container);
	};
	//override instances of window.confirm in kendo grid
	kendo.ui.Grid.prototype._showMessage = function _showMessageWin(text) {
		return true;
	}
	kendo.ui.Grid.prototype._originalCloseCell = kendo.ui.Grid.prototype.closeCell;
	kendo.ui.Grid.prototype.closeCell = function replacedCloseCell() {
		var that = this,
			cell = that._editContainer;
		if (cell && cell.length) {
			//remove custom CSS class added in grid._startEdit()
			cell.removeClass("t-edit-container");
			var cancelButton = cell.find(".k-grid-cancel");
			//remove onclick event added in grid._startEdit()
			if (cancelButton.length && cancelButton[0].onclick) cancelButton[0].onclick = null;
		}
		var grid = that.element.parents(".t-table-view")[0],
			cellEditMode = grid && grid.winControl && grid.winControl.editable.mode === "cell",
			dirtyClass = "k-dirty-cell",
			shouldSync = false;
		if (cellEditMode) {
			if (cell.hasClass(dirtyClass)) {
				cell.removeClass(dirtyClass);
				shouldSync = true;
			}
		}
		that._originalCloseCell();
		if (shouldSync) {
			//save changes immediately if not batch
			var stopDB = function tempDisableRefresh(e) {
				e.preventDefault();
				return false;
			}
			that.one("dataBinding", stopDB);
			that.saveChanges();
		}
	};
	kendo.ui.Grid.prototype._originalEditable = kendo.ui.Grid.prototype._editable;
	kendo.ui.Grid.prototype._editable = function replacedEditable() {
		var that = this,
			DBLCLICK = "dblclick",
			NS = ".kendoGrid";
		//changes have been made in the original code as well to support cell double click editing
		that._originalEditable()
		//edit rows by double click as well
		var mode = that._editMode();
		if (mode === "inline") {
			if (that.options.editable.update !== false) {
				that.wrapper.on(DBLCLICK + NS, "tr:not(.k-grouping-row) > td", function (e) {
					if (that.editable) {
						if (that.editable.end() && $(e.target).closest("tr").attr("data-uid") !== $(that.editable.element).attr("data-uid"))
							that.saveRow();
						else
							return;
					}
					that.editRow($(this).closest("tr"));
				});
			}
		}
	};
	kendo.ui.Grid.prototype._originalRemoveRow = kendo.ui.Grid.prototype.removeRow;
	kendo.ui.Grid.prototype.removeRow = function replacedRemoveRow(row) {
		if (!row || !row.length) return;
		var that = this,
			confirmMessage = that.options.editable && that.options.editable.messages.confirmation,
			rowDeleteButton = row.find("td a.k-grid-delete");
		//no confirmation message - delete immediately
		if (!confirmMessage) return that._originalRemoveRow(row);
		if (rowDeleteButton.length) {
			if (utilities.hasClass(rowDeleteButton[0], "t-edit-delete-expanded")) {
				//confirmed - delete
				if (!that._deleteRowTransition)
					that._originalRemoveRow(row);
			}
			else {
				//expand delete button to confirm
				utilities.addClass(rowDeleteButton[0], "t-edit-delete-expanded");
				rowDeleteButton[0].textContent = confirmMessage;
				that._deleteRowTransition = true;
				setTimeout(function () {
					that._deleteRowTransition = false;
				}, 367);
			}
		}
		else {
			//show a normal flyout if no delete button is onscreen
			var flyoutContainer = document.createElement("div");
			utilities.addClass(flyoutContainer, "t-gridConfirmation");
			var spanText = document.createElement("p");
			spanText.innerText = confirmMessage;
			var buttonConfirm = document.createElement("button");
			buttonConfirm.type = "button";
			buttonConfirm.innerText = "OK";//TODO: LOCALIZATION
			buttonConfirm.addEventListener("click", function deleteConfirmedFunc() {
				that._originalRemoveRow(row);
				flyoutContainer.winControl.hide();
			}, false);
			flyoutContainer.appendChild(spanText);
			flyoutContainer.appendChild(buttonConfirm);
			document.body.appendChild(flyoutContainer);
			var dialog = new WinJS.UI.Flyout(flyoutContainer);
			dialog.anchor = row[0];
			dialog.onafterhide = function confirmAfterHide() {
				flyoutContainer.removeNode(true);
			}
			dialog.show();
		}
	};
})(jQuery, kendo);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
(function (global, $, undefined) {
	"use strict";
	var kendo = window.kendo,
		ui = kendo.ui,
        proxy = $.proxy,
        POPUP = "kendoPopup",
        INIT = "init",
        NS = ".kendoFilterMenu",
        EQ = "Is equal to",
        NEQ = "Is not equal to",
        roles = {
        	"number": "numerictextbox",
        	"date": "datepicker"
        },
        isFunction = $.isFunction,
        Widget = ui.Widget,
		oldFilterMenu = ui.FilterMenu;
	var booleanTemplate =
            '<div class="t-filter-menu t-filter-boolean">' +
                '<div class="k-filter-help-text">#=messages.info#</div>' +
                '<label>' +
                    '<input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>' +
                    '#=messages.isTrue#' +
                '</label>' +
                '<label>' +
                    '<input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>' +
                    '#=messages.isFalse#' +
                '</label>' +
				'<button type="submit" class="k-button">#=messages.filter#</button>' +
                '<div class="t-filter-buttons">' +
					'<button type="reset" class="k-button">#=messages.clear#</button>' +
                '</div>' +
            '</div>';
	var defaultTemplate =
            '<div class="t-filter-menu">' +
                '<div class="k-filter-help-text">#=messages.info#</div>' +
                '<select data-class="t-filter-operators" data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">' +
                    '#for(var op in operators){#' +
                        '<option value="#=op#">#=operators[op]#</option>' +
                    '#}#' +
                '</select>' +
                '#if(values){#' +
                    '<select data-#=ns#bind="value:filters[0].value" data-#=ns#role="dropdownlist">' +
						'<option value="">#=messages.selectValue#</option>' +
						'#for(var i in values){#' +
							'<option value="#=values[i].value#">#=values[i].text#</option>' +
						'#}#' +
                    '</select>' +
                '#}else{#' +
                    '<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />' +
                '#}#' +
                '#if(extra){#' +
					'<div class="t-extra">' +
						'<select data-class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist">' +
							'<option value="and">#=messages.and#</option>' +
							'<option value="or">#=messages.or#</option>' +
						'</select>' +
						'<select data-class="t-filter-operators" data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">' +
							'#for(var op in operators){#' +
								'<option value="#=op#">#=operators[op]#</option>' +
							'#}#' +
						'</select>' +
						'#if(values){#' +
							'<select data-#=ns#bind="value:filters[1].value" data-#=ns#role="dropdownlist">' +
								'<option value="">#=messages.selectValue#</option>' +
								'#for(var i in values){#' +
									'<option value="#=values[i].value#">#=values[i].text#</option>' +
								'#}#' +
							'</select>' +
						'#}else{#' +
							'<input data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>' +
						'#}#' +
					'</div>' +
                '#}#' +
				'<button type="submit" class="k-button">#=messages.filter#</button>' +
                '<div class="t-filter-buttons">' +
					'<button type="button" class="k-button"></button>' +
					'<button type="reset" class="k-button">#=messages.clear#</button>' +
                '</div>' +
            '</div>';
	var customTemplateWrap =
		'<div class="t-filter-menu">' +
			'<div class="k-filter-help-text">#=messages.info#</div>' +
			'</div>' +
		'</div>';
	function convertItems(items) {
		var idx,
            length,
            item,
            value,
            text,
            result;
		if (items && items.length) {
			result = [];
			for (idx = 0, length = items.length; idx < length; idx++) {
				item = items[idx];
				text = item.text || item.value || item;
				value = item.value == null ? (item.text || item) : item.value;
				result[idx] = { text: text, value: value };
			}
		}
		return result;
	}
	var newFilterMenu = oldFilterMenu.extend({
		init: function (element, options) {
			var that = this;
			oldFilterMenu.prototype.init.apply(that, arguments);
			that._updateFilterUI();
		},
		_init: function winCore_FilterMenu_init() {
			var that = this,
                options = that.options,
                template = options.template ? Telerik.Utilities.getTemplate(options.template) : null,
                role = roles[type],
                type = that.type,
				operators = (that.operators || {})[type] || options.operators[type] || {},
                context = {
                	field: that.field,
                	format: options.format,
                	messages: options.messages,
                	operators: operators,
                	extra: options.extra,
                	ns: kendo.ns,
                	type: type,
                	role: role,
                	values: convertItems(options.values)
                };
			// fix header dislocation after popup close
			var originalCloseCallback = options.closeCallback;
			if (originalCloseCallback)
				options.closeCallback = function (e) {
					if (that.element.parents("table").length)
						originalCloseCallback(e);
				};
			//prevent unsafe HTML exception
			MSApp.execUnsafeLocalFunction(function () {
				that.form = $('<form class="k-filter-menu"/>')
					.on("keydown" + NS, proxy(that._keydown, that))
					.on("submit" + NS, proxy(that._submit, that))
					.on("reset" + NS, proxy(that._reset, that));
				if (isFunction(template)) {
					that.template = template;
					context.operators = Object.keys(operators).map(function (key) {
						return { text: operators[key], value: key }
					});
					that.form.append(customTemplateWrap)
						.find(".t-filter-menu")
						.append(template(context));
				}
				else {
					that.form.html(kendo.template(type === "boolean" ? booleanTemplate : defaultTemplate)(context));
				}
				if (!options.appendToElement) {
					that.popup = that.form[POPUP]({
						anchor: that.link,
						open: proxy(that._open, that),
						activate: proxy(that._activate, that),
						close: options.closeCallback,
						position: "top right",
						origin: "bottom right"
					}).data(POPUP);
				} else {
					that.element.append(that.form);
					that.popup = that.element.closest(".k-popup").data(POPUP);
				}
				that.form.find("[" + kendo.attr("role") + "=dropdownlist]").removeAttr(kendo.attr("role")).each(function createDDLs() {
					var ddl = new Telerik.UI.RadDropDownList(this),
						elem = ddl.element,
						cls = this.getAttribute("data-class");
					if (cls) {
						elem.className += " " + cls;
					}
				});
				that.form.find(".k-textbox")
                    .removeClass("k-textbox")
                    .each(function () {
                    	switch (type) {
                    		case "number":
                    			new Telerik.UI.RadNumericBox(this, { swipe: false });
                    			break;
                    		case "date":
                    			new Telerik.UI.RadDatePicker(this);
                    			break;
                    		case "string":
                    		default:
                    			$(this).addClass("k-textbox");
                    			break;
                    	}
                    });
			});
			that.form
                 .find("[" + kendo.attr("role") + "=numerictextbox]")
                 .removeClass("k-textbox")
                 .end()
                 .find("[" + kendo.attr("role") + "=datetimepicker]")
                 .removeClass("k-textbox")
                 .end()
                 .find("[" + kendo.attr("role") + "=timepicker]")
                 .removeClass("k-textbox")
                 .end()
                 .find("[" + kendo.attr("role") + "=datepicker]")
                 .removeClass("k-textbox");
			that._delegates = {
				moreFilters: that._toggleMoreFilters.bind(that),
				closePopup: that._closePopup.bind(that)
			};
			that.form.find("button[type='button']").on("click" + NS, that._delegates.moreFilters).end();
			that.link.on("MSPointerDown" + NS, that._delegates.closePopup);
			that.refresh();
			that.trigger(INIT, { field: that.field, container: that.form });
		},
		_closePopup: function winCore_FilterMenu_closePopup() {
			var that = this;
			that.popup.close();
		},
		_toggleMoreFilters: function winCore_FilterMenu_toggleMoreFilters(e) {
			//go to wrapper div
			$(e.target).parents("div").toggleClass("t-expanded");
			var that = this;
			that.popup._position();
			that._fixPopupPosition();
		},
		_fixPopupPosition: function winCore_FilterMenu_fixPopupPosition() {
			//move popup 2px up/down so borders overlap
			var that = this,
				fixLine = that.popup.element.find(".k-filter-help-text");
			if (fixLine.length) {
				var parentElement = that.popup.element.parent()[0],
					filterElement = that.element.find(".k-grid-filter")[0],
					popupPosition = parentElement ? WinJS.Utilities.getPosition(parentElement) : { left: 0 },
					iconPosition = filterElement ? WinJS.Utilities.getPosition(filterElement) : { left: 0 },
                    borderWidth = parseInt(that.element.css("border-left-width")),
                    gridBorderWidth = parseInt(that.element.closest(".k-grid").css("border-left-width"), 10),
					diff = parseInt(popupPosition.left, 10) - parseInt(iconPosition.left, 10);
				fixLine.css("left", (diff >= 0 ? diff - borderWidth + gridBorderWidth : -diff + borderWidth + gridBorderWidth));
			}
		},
		_updateFilterUI: function (expression) {
			var that = this;
			that.element.closest("th").removeClass("t-filtered");
			if (!expression) {
				if (that.dataSource && that.dataSource.filter) {
					var filterExpr = that.dataSource.filter();
					if (filterExpr) {
						that._updateFilterUI(filterExpr);
					}
				}
				return;
			}
			for (var i = 0, len = expression.filters.length; i < len; i++) {
				var field = expression.filters[i].field;
				if (!field && expression.filters[i].filters && expression.filters[i].filters.length)
					that._updateFilterUI(expression.filters[i]);
				if (field === that.field) {
					that.element.closest("th").addClass("t-filtered");
					break;
				}
			}
		},
		refresh: function () {
			var that = this,
				expression = that.dataSource.filter() || { filters: [], logic: "and" },
				callback = that.options.refresh;
			oldFilterMenu.prototype.refresh.apply(that, arguments);
			that._updateFilterUI();
			if (that.form && that.form.length && isFunction(callback)) {
				callback(that.form[0], expression);
			}
		},
		clear: function () {
			var that = this;
			oldFilterMenu.prototype.clear.call(that);
			that.element.closest("th").removeClass("t-filtered");
			//find datepickers and clear their values
			$(that.form).find(".t-date-picker, .t-time-picker").each(function datePicker_clear() {
				var dp = this.winControl;
				if (dp) dp.value = null;
			});
		},
		_submit: function (e) {
			var that = this,
				callback = that.options.apply,
				expression = that._merge(that.filterModel.toJSON()),
				result;
			e.preventDefault();
			if (typeof callback === "function") {
				result = callback(that.form[0], $.extend(true, {}, expression));
				if (result === false) {
					//return and prevent the menu from closing
					return;
				}
				if (Telerik.Utilities.getType(result) === "object") {
					expression = result;
				}
			}
			if (expression.filters && expression.filters.length) {
				that.dataSource.filter(expression);
			}
			that.popup.close();
		},
		_open: function wincore_FilterMenu_open() {
			var that = this;
			oldFilterMenu.prototype._open.call(that);
			msSetImmediate(that._fixPopupPosition.bind(that));
		},
		destroy: function winCore_FilterMenu_destroy() {
			var that = this;
			if (that._delegates) {
				that.form.find("button[type='button']").off(NS);
				that.link.off(NS);
				that._delegates = null;
			}
			oldFilterMenu.prototype.destroy.call(that);
		}
	});
	ui.plugin(newFilterMenu);
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datasource.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Grid",
		config = Telerik.UI._ControlConfiguration,
		defineProperty = config.defineProperty,
		utilities = WinJS.Utilities,
		util = Telerik.Utilities,
		priv = util.setPrivate,
		DataSource = Telerik.Data.DataSource,
		templateValidator = util._validators.unifiedTemplate,
		STRING = "string",
		BOOLEAN = "boolean",
		OBJECT = "object",
		ARRAY = "array",
		FUNCTION = "function",
		POINTERDOWN = "MSPointerDown",
		POINTERMOVE = "MSPointerMove",
		POINTERUP = "MSPointerUp",
		css = {
			tableView: "t-table-view",
			selected: "k-state-selected",
			groupingRow: "k-grouping-row",
			expand: "t-expand",
			active: "t-active",
			rangeStart: "t-range-start",
			northWest: "t-nw",
			serviceView: "t-service-view",
			serviceColumn: "t-service-column",
			serviceCommands: "t-service-commands",
			groupEdit: "t-group-edit",
			beforeMasterExpand: "t-before-masterExpand",
			detailRowCollapse: "t-detailRow-collapse",
			masterRowExpand: "t-masterRow-expand",
			serviceButton: "t-service-button",
			insertCommand: "t-insert-command",
			saveAllCommand: "t-save-command",
			cancelAllCommand: "t-cancel-command"
		};
	function buildLocalizationObject(map) {
		var obj = {},
			inner = {};
		Object.defineProperties(obj, Object.keys(map).reduce(function (descriptor, prop) {
			var value = map[prop];
			if (typeof value === OBJECT) {
				inner[prop] = value;
			}
			else {
				/// <field type="String">
				/// The localized string.
				/// </field>
				descriptor[prop] = {
					get: function () {
						var modified = this["_" + prop];
						return modified !== undefined ? modified : Telerik.Localization._getString("radgrid/" + value);
					},
					set: function (value) {
						priv(this, "_" + prop, value, true);
					},
					configurable: false,
					enumerable: true
				};
			}
			return descriptor;
		}, {}));
		Object.keys(inner).forEach(function (innerProp) {
			obj[innerProp] = buildLocalizationObject(inner[innerProp]);
		});
		return obj;
	}
	namespace(nsName, {
		TableView: derive(Telerik.UI.WidgetWrapper, function (element, options) {
			/// <summary>
			/// Represents a table object in a Grid control.
			/// </summary>
			/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
			/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
			//prevent options from going to the widget
			//prevent options from going to the widget, but set as local wrapper properties
			/// <field type="Telerik.UI.Grid" readonly="true" hidden="true">
			/// Gets the owner RadGrid instance.
			/// </field>
			owner: {get:function(){}},
			/// <field type="HTMLElement" readonly="true" hidden="true">
			/// Gets the parent row of the table if it is nested.
			/// </field>
			parentRow: {get:function(){}},
			/// <field type="Telerik.UI.Grid.TableView" readonly="true" hidden="true">
			/// Gets the parent row of the table if it is nested.
			/// </field>
			parentTable: {get:function(){}},
			/// <field type="Array" elementType="Telerik.UI.Grid.TableView" readonly="true" hidden="true">
			/// Gets an array of all initialized child tables for this table.
			/// </field>
			detailTables: {get:function(){}},
			/// <field type="Object">
			/// Gets or sets the options for the detail tables. All newly initialized detail
			/// tables will inherit these options automatically.
			/// </field>
			detailTable: {get:function(){}, set:function(value){}},
			/// <field type="Object">
			/// Gets the parent relations for this table as an object or an array of objects in the form: 
			/// { masterField: 'field1', detailField: 'field2' }. To configure parent relations, set the
			/// detailTable.parentRelation property of the parent table.
			/// </field>
			parentRelation: {get:function(){}, set:function(value){}},
			/// <field type="Boolean" defaultValue="true">
			/// Indicates whether the grid will call read on the DataSource initially.
			/// </field>
			autoBind: defineProperty("autoBind", true),
			/// <field type="Array" elementType="Telerik.UI.Grid.Column">
			/// A collection of column objects or collection of strings that represents the name of the fields.
			/// </field>
			columns: {get:function(){}, set:function(value){}},
			/// <field type="Telerik.Data.DataSource">
			/// Gets or sets the data source object for this control.
			/// </field>
			dataSource: {get:function(){}, set:function(value){}},
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Template to be used for rendering the detail rows. 
			/// </field>
			detailTemplate: defineProperty("detailTemplate", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Template to be used for rendering the rows. 
			/// </field>
			rowTemplate: defineProperty("rowTemplate", null),
			/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
			/// Template to be used for rendering the alternating rows. 
			/// </field>
			altRowTemplate: defineProperty("altRowTemplate", null),
			/// <field type="Number" defaultValue="null">
			/// Sets the height of the grid.
			/// </field>
			height: defineProperty("height", null),
			/// <field type="String" defaultValue="none">
			/// Indicates whether grouping is enabled.
			/// </field>
			/// <options>
			/// <option value="none">none</option>
			/// <option value="enabled">enabled</option>
			/// <option value="staticHeaders">staticHeaders</option>
			/// <option value="enabled, staticHeaders">enabled, staticHeaders</option>
			/// </options>
			groupable: {get:function(){}, set:function(value){}},
			/// <field type="String">
			/// Indicates whether selection is enabled.
			/// </field>
			/// <options>
			/// <option value="none">none</option>
			/// <option value="row">row</option>
			/// <option value="cell">cell</option>
			/// <option value="multiple, row">multiple, row</option>
			/// <option value="multiple, cell">multiple, cell</option>
			/// </options>
			selectable: {get:function(){}, set:function(value){}},
			/// <field type="Object">
			/// Gets or sets selected rows/cells.
			/// </field>
			selection: {get:function(){}, set:function(value){}},
			/// <field type="Telerik.UI.Grid.EditableConfiguration">
			/// Gets and sets the editing related (create/update/delete) options.
			/// </field>
			editable: {get:function(){}, set:function(value){}},
			/// <field type="String">
			/// Indicates whether sorting is enabled.
			/// </field>
			/// <options>
			/// <option value="none">none</option>
			/// <option value="single">single</option>
			/// <option value="multiple">multiple</option>
			/// <option value="single, allowUnsort">single, allowUnsort</option>
			/// <option value="multiple, allowUnsort">multiple, allowUnsort</option>
			/// </options>
			sortable: {get:function(){}, set:function(value){}},
			/// <field type="Boolean">
			/// Indicates whether column resizing is enabled/disable.
			/// </field>
			resizable: {get:function(){}, set:function(value){}},
			/// <field type="Boolean" defaultValue="false">
			/// Indicates whether filtering is enabled/disabled.
			/// </field>
			filterable: {get:function(){}, set:function(value){}},
			/// <field type="Boolean">
			/// Gets or sets a value indicating whether column reordering is enabled.
			/// </field>
			reorderable: {get:function(){}, set:function(value){}},
			/// <field type="Boolean" defaultValue="false">
			/// Indicates whether keboard navigation is enabled/disabled.
			/// </field>
			navigatable: defineProperty("navigatable", false),
			///// <field type="Array">
			///// This is a list of commands for which the corresponding buttons will be rendered. 
			///// The supported built-in commands are: "create", "cancel", "save", "destroy".
			///// </field>
			//toolbar: {
			//	get: function () {
			//		var that = this;
			//		if (!that._toolbar) {
			//			var arr = [];
			//			if (that._widget) {
			//				that._syncToolbar(arr);
			//			}
			//			priv(that, "_toolbar", arr, true);
			//		}
			//		return that._toolbar;
			//	},
			//	set: function (value) {
			//		if (util.getType(value) === ARRAY) {
			//			priv(this, "_toolbar", value, true);
			//		}
			//	}
			//},
			/// <field type="Object">
			/// Gets the localization messages used by the control.
			/// </field>
			messages: {},
			clearSelection: function () {
				/// <summary>
				/// Clears currently selected items.
				/// </summary>
},
			collapseGroup: function (element) {
				/// <summary>
				/// Collapses specified group.
				/// </summary>
				/// <param name="element" domElement="true">Target group item to collapse.</param>
},
			collapseRow: function (element) {
				/// <summary>
				/// Collapses specified master row.
				/// </summary>
				/// <param name="element" domElement="true">Target master row to collapse.</param>
},
			dataItem: function (element) {
				/// <summary>
				/// Returns the data item to which a given table row (tr DOM element) is bound.
				/// </summary>
				/// <param name="element" domElement="true">Target row.</param>
},
			expandGroup: function (element) {
				/// <summary>
				/// Expands specified group.
				/// </summary>
				/// <param name="element" domElement="true">Target group item to expand.</param>
},
			expandRow: function (element) {
				/// <summary>
				/// Expands specified master row.
				/// </summary>
				/// <param name="element" domElement="true">Target master row to expand.</param>
},
			hideColumn: function (column) {
				/// <summary>
				/// Hides the specified column.
				/// </summary>
				/// <param name="column">The index or the bound field of the column to hide.</param>
},
			refresh: function (isInitial) {
				/// <summary>
				/// Reloads the data and repaints the control.
				/// </summary>
},
			reorderColumn: function (destIndex, column) {
				/// <summary>
				/// Changes the position of the specified column.
				/// </summary>
				/// <param name="destIndex">Destination column index</param>
				/// <param name="column">Column index, DOM element or array element from columns option</param>
},
			showColumn: function (column) {
				/// <summary>
				/// Shows the specified column.
				/// </summary>
				/// <param name="column">The index or the bound field of the column to show.</param>
},
			editCell: function (cell) {
				/// <summary>
				/// Switches the specified table cell in edit mode. Requires editable: { mode: "cell" }.
				/// </summary>
				/// <param name="cell" domElement="true">The cell to edit.</param>
}
		})
	});
	WinJS.Class.mix(Telerik.UI.Grid.TableView, utilities.createEventProperties(
		"change",
		"columnhide",
		"columnreorder",
		"columnresize",
		"columnshow",
		"databinding",
		"databound",
		"detailcollapse",
		"detailexpand",
		"detailinit",
		"edit",
		"remove",
		"save",
		"savechanges"
	));
	/// <summary>
	/// A grid control that can display and edit data.
	/// </summary>
	/// <icon src="grid_html_12.png" width="12" height="12" />
	/// <icon src="grid_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadGrid"></div>]]></htmlSnippet>
	/// <event name="change">Fires when the grid selection has changed.</event>
	/// <event name="columnresize">Fires when the user resizes a column.</event>
	/// <event name="databinding">Fires when the grid is about to receive data from the data source.</event>
	/// <event name="databound">Fires when the grid has received data from the data source.</event>
	/// <event name="detailcollapse">Fires when the grid detail row is collapsed.</event>
	/// <event name="detailexpand">Fires when the grid detail row is expanded.</event>
	/// <event name="detailinit">Fires when the grid detail is initialized.</event>
	/// <event name="edit">Fires when the grid enters edit mode.</event>
	/// <event name="remove">Fires before the grid item is removed.</event>
	/// <event name="save">Fires before the grid item is changed.</event>
	/// <event name="savechanges">Fires before the grid calls DataSource sync.</event>
	/// <part name="grid" class="k-grid">The RadGrid widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadGrid = derive(Telerik.UI.Grid.TableView, function (element, options) {
		/// <summary>
		/// Creates a new RadGrid control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="String">
		/// Enable/disable scrolling. Possible values are "none", "enabled" and "virtual".
		/// </field>
		/// <options>
		/// <option value="none">none</option>
		/// <option value="enabled">enabled</option>
		/// <option value="virtual">virtual</option>
		/// </options>
		scrollable: {get:function(){}, set:function(value){}}
	});
	namespace("Telerik.UI", {
		RadGrid: RadGrid
	});
})(this, jQuery);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datasource.js" />
(function (global, $, undefined) {
	"use strict";
	var define = WinJS.Class.define,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Grid",
		util = Telerik.Utilities,
		tmpl = kendo.template,
		css = {
			groupPanel: "t-group-panel",
			groupCaption: "t-group-caption",
			groupPopup: "t-group-popup",
			serviceCommands: "t-service-commands",
			serviceButton: "t-service-button",
			//groupEdit: "t-group-edit",
			hasGroups: "t-has-groups",
			highlight: "t-highlight",
			over: "t-over",
			open: "t-open",
			dragged: "t-dragged",
			fixedHeaderTable: "t-fixedGroupHeader"
		},
		templates = {
			groupPopup: "<div>" +
					"# for (var i = 0; i < data.length; i++) { #" +
						"<ul class='k-reset' data-level='#=i#'>" +
							"# for (var j = 0, groups = data[i].groups; j < groups.length; j++) { #" +
								"<li data-field='#=groups[j].field#' data-desc='#=groups[j].desc#'>" +
									"<div>" +
										"<span>" +
											"<span class='k-icon'>Drag group to arrange</span>" +
											"<span>#=groups[j].title#</span>" +
											"<span class='k-icon k-i-arrow-#=groups[j].desc ? \'s\' : \'n\'#'></span>" +
										"</span>" +
										"<button class='k-icon'>Tap here to ungroup</button>" +
									"</div>" +
								"</li>" +
							"# } #" +
						"</ul>" +
					"# } #" +
				"</div>"
		},
		selectors = {
			header: ".k-header:not(.k-group-cell):not(.k-hierarchy-cell)[data-field]"
		};
	namespace(nsName, {
		/// <excludetoc />
		Grouping: define(function (owner) {
			/// <summary>
			/// Internal use only.
			/// </summary>
}, {
			owner: null,
			dispose: function () {
}
		})
	});
	function groupRowClick(e, staticHeaderRow) {
		if (!e.currentTarget || e.currentTarget.nodeName != "TR") return;
		var group = $(e.currentTarget),
			element = group.find("a"),
			grid = group.parents(".k-grid").data("kendoGrid");
		if (grid) {
			if (element.hasClass('k-i-collapse')) {
				grid.collapseGroup(group);
				if (staticHeaderRow) grid.collapseGroup(staticHeaderRow);
			} else {
				grid.expandGroup(group);
				if (staticHeaderRow) grid.expandGroup(staticHeaderRow);
			}
		}
		e.preventDefault();
		e.stopPropagation();
	}
	//override default groupable to make clicking the whole grid row possible 
	var CLICK = "click",
		NS = ".kendoGrid";
	kendo.ui.Grid.prototype._groupable = function () {
		var that = this;
		if (that._groupableClickHandler) {
			that.table.off(CLICK + NS, that._groupableClickHandler);
		} else {
			that._groupableClickHandler = groupRowClick;
		}
		//WinJS: remove .k-i-expand, .k-i-collapse
			that.table.on(CLICK + NS, ".k-grouping-row", that._groupableClickHandler);
		that._attachGroupable();
	};
	var oldExpandGroup = kendo.ui.Grid.prototype.expandGroup,
		oldCollapseGroup = kendo.ui.Grid.prototype.collapseGroup,
		callUpdateGroupedRows = function (grid) {
			var tableView = grid.element.parents(".t-table-view"),
				winGrid = tableView[0];
			if (winGrid && winGrid.winControl && winGrid.winControl._grouping) {
				var grouping = winGrid.winControl._grouping;
				if (!grouping._updateGroupedRowsInProgress) {
					grouping._updateGroupedRowsInProgress = true;
					grouping._updateGroupedRows();
				}
			}
		},
		toggleStaticHeader = function (group, oldExpandCollapseMethod) {
			var that = this,
				fixedHeader = that.element.parents(".t-table-view").find(".t-fixedGroupHeader"),
				groupId = $(group).attr("data-group-id");
			if (fixedHeader.length && groupId) {
				oldExpandCollapseMethod.call(that, fixedHeader.find("[data-group-id='" + groupId + "']"));
			}
		};
	//override expand/collapse group to update grouped rows
	kendo.ui.Grid.prototype.expandGroup = function (group) {
		toggleStaticHeader.apply(this, [group, oldExpandGroup]);
		oldExpandGroup.apply(this, [group]);
		callUpdateGroupedRows(this);
	}
	kendo.ui.Grid.prototype.collapseGroup = function (group) {
		toggleStaticHeader.apply(this, [group, oldCollapseGroup]);
		oldCollapseGroup.apply(this, [group]);
		callUpdateGroupedRows(this);
	}
	//override set current method to highlight group headers when using keyboard navigation
	kendo.ui.Grid.prototype._oldCurrent = kendo.ui.Grid.prototype.current,
	kendo.ui.Grid.prototype.current = function (element) {
		var that = this;
		if (element && element.length && that.dataSource) {
			var group = that.dataSource.group(),
				isGrouped = group && group.length,
				fixedHeader = that.element.find(".t-fixedGroupHeader");
			if (isGrouped && fixedHeader.length) {
				var parent = element.parents("TR"),
					parentGroup = parent.attr("data-group-id");
				fixedHeader.find("TD").removeClass("k-state-focused");
				if (parentGroup) {
					fixedHeader.find("TR").each(function (index, item) {
						var $item = $(item);
						if ($item.attr("data-group-id") === parentGroup) {
							$item.find("TD").addClass("k-state-focused");
						}
					});
				}
			}
		}
		return that._oldCurrent(element);
	}
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datasource.js" />
/// <reference path="/js/behaviors.js" />
(function (global, $, undefined) {
	"use strict";
	var define = WinJS.Class.define,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Grid";
	namespace(nsName, {
		/// <excludetoc />
		Reorder: define(function (owner) {
			/// <summary>
			/// Internal use only.
			/// </summary>
}, {
			owner: null,
			dispose: function () {
}
		})
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	'use strict';
	// WinJS refs
	var win = WinJS,
        define = win.Class.define,
		derive = win.Class.derive,
        namespace = win.Namespace.define,
		MINHEADERWIDTH = 40,
		NULL = null,
		DOTGRIDHEADERFIRST = '.k-grid-header:first ',
		DOTKHEADER = '.k-header',
		NOTGROUPANDHIERARCHYCELL = ':not(.k-group-cell,.k-hierarchy-cell)',
		TSELECTED = 't-selected',
		TLAST = 't-last-column',
		TRESIZEHANDLE = 't-resize-handle',
		DOTRESIZING = '.resizing',
		COLONVISIBLE = ':visible',
		CLICK = 'click',
        MSPOINTERDOWN = 'MSPointerDown',
		PX = 'px',
        DATABOUND = 'dataBound';
	var ops = {
		negate: function (value) {
			return value * (-1);
		},
		same: function (value) {
			return value;
		}
	}
	/// <excludetoc />
	var Resizing = define(function (kendoGrid, isRtl) {
		/// <summary>
		/// Internal use only.
		/// </summary>
}, {
		resizeHandleElement: {get:function(){}},
		attachResizeHandle: function (th) {
			/// <summary>
			/// Attaches the resize handle to the specified column's th element.
			/// This must be done before calling the resizeColumn method.
			/// </summary>
},
		detachResizeHandle: function () {
},
		resizeColumn: function (deltaX) {
},
		refresh: function () {
},
		dispose: function () {
}
	}, {
		create: function (kendoGrid, grid) {
			var isRtl = grid ? grid._isRtl : false;
			if (kendoGrid.options.scrollable) {
				if (grid && grid.detailTable) {
					return new ResizingTableLayoutFixedHierarchy(kendoGrid, isRtl);
				}
				else {
					return new ResizingTableLayoutFixed(kendoGrid, isRtl);
				}
			}
			else {
				return new ResizingTableLayoutAuto(kendoGrid, isRtl);
			}
		}
	});
	/// <excludetoc />
	var ResizingTableLayoutFixed = derive(Resizing, function (kendoGrid, isRtl) {
		/// <summary>
		/// Internal use only.
		/// Use it to enable resizing only when the grid is scrollable.
		/// </summary>
}, {
		resizeColumn: function (deltaX) {
			/// <summary>
			/// Resizes the column to which the resize handle has been attached prior to calling the method.
			/// </summary>
},
		dispose: function () {
}
	});
	/// <excludetoc />
	var ResizingTableLayoutFixedHierarchy = derive(ResizingTableLayoutFixed, function (kendoGrid, isRtl) {
		/// <summary>
		/// Internal use only.
		/// Use it to enable resizing only when the grid is scrollable.
		/// </summary>
}, {
		attachResizeHandle: function (th) {
},
		detachResizeHandle: function () {
},
		resizeColumn: function (deltaX) {
},
		dispose: function () {
}
	}, {
		_masterResizings: NULL,
		registerMasterResizing: function (resizing) {
			var that = this;
			if (!that._masterResizings) {
				that._masterResizings = [];
			}
			that._masterResizings.push(resizing);
		},
		unregisterMasterResizing: function (resizing) {
			var that = this,
				resizings = that._masterResizings,
				index;
			if (resizings) {
				index = resizings.indexOf(resizing);
				if (index > -1) {
					resizings.splice(index, 1);
				}
			}
			if (!resizings.length) {
				that._masterResizings = NULL;
			}
		},
		notifyDetailRowExpand: function (row) {
			var that = this,
				masterResizings = that._masterResizings,
				length,
				master;
			if (masterResizings) {
				length = masterResizings.length;
				master = that._getMasterGridWidget(row);
				for (var i = 0; i < length; i++) {
					if (masterResizings[i]._grid == master) {
						masterResizings[i]._onDetailExpanded(row.find('.k-grid').data('kendoGrid'));
					}
				}
			}
		},
		_getMasterGridWidget: function (detailRow) {
			var master = detailRow.parents('.k-grid')
				.filter(function () {
					return !$(this).parents('.k-detail-cell').length; // filter out parent detail grids
				});
			return master.data('kendoGrid');
		}
	});
	kendo.ui.Grid.prototype._details = function () {
		var that = this,
			NS = ".kendoGrid",
			CLICK = "click",
			DETAILINIT = "detailInit",
			DETAILEXPAND = "detailExpand",
			DETAILCOLLAPSE = "detailCollapse";
		that.table.on(CLICK + NS, ".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus", function (e) {
			var button = $(this),
				expanding = button.hasClass("k-plus"),
				masterRow = button.closest("tr.k-master-row"),
				detailRow,
				detailTemplate = that.detailTemplate,
				data,
				hasDetails = that._hasDetails();
			button.toggleClass("k-plus", !expanding)
				.toggleClass("k-minus", expanding);
			if (hasDetails && !masterRow.next().hasClass("k-detail-row")) {
				data = that.dataItem(masterRow);
				$(detailTemplate(data))
					.addClass(masterRow.hasClass("k-alt") ? "k-alt" : "")
					.insertAfter(masterRow);
				that.trigger(DETAILINIT, { masterRow: masterRow, detailRow: masterRow.next(), data: data, detailCell: masterRow.next().find(".k-detail-cell") });
			}
			detailRow = masterRow.next();
			that.trigger(expanding ? DETAILEXPAND : DETAILCOLLAPSE, { masterRow: masterRow, detailRow: detailRow });
			detailRow.toggle(expanding);
			if (expanding) {
				ResizingTableLayoutFixedHierarchy.notifyDetailRowExpand(detailRow);
			}
			if (that._current) {
				that._current.attr("aria-expanded", expanding);
			}
			e.preventDefault();
			return false;
		});
	};
	/// <excludetoc />
	var ResizingTableLayoutAuto = derive(Resizing, function (kendoGrid, isRtl) {
		/// <summary>
		/// Internal use only.
		/// Use it to enable resizing only when the grid is scrollable: 'none'.
		/// </summary>
}, {
		attachResizeHandle: function (th) {
},
		detachResizeHandle: function () {
},
		resizeColumn: function (deltaX) {
			/// <summary>
			/// Resizes the column to which the resize handle has been attached prior to calling the method
			/// as well as the next sibling (or the previous in the case of the last column).
			/// The sibling is resized in the opposite direciton to compensate the width.
			/// </summary>
},
		refresh: function () {
},
		dispose: function () {
}
	}, {
		getPreciseWidth: function(element) {
			var computedStyle = window.getComputedStyle(element),
				width = parseFloat(computedStyle.width);
			width += parseFloat(computedStyle.borderLeftWidth);
			width += parseFloat(computedStyle.borderRightWidth);
			width += parseFloat(computedStyle.paddingLeft);
			width += parseFloat(computedStyle.paddingRight);
			return width;
		},
		initializeHeadersParameters: function (kendoGrid) {
			var that = this,
				header, preciseWidth, minWidth,
				headers = kendoGrid.wrapper.find(DOTGRIDHEADERFIRST + DOTKHEADER + COLONVISIBLE);
			// Calculate the initial and min widths of the columns.
			// 1) Get the initial widths as they are.
			// 2) Remove all widths of the columns (set to auto).
			// 3) Set each column width to 1px to get is min width; reset its width to auto.
			// 4) Set the initial widths explicitly.
			// If the above is not done soe,
			// the minWidth of the first (only when all cols have fixed widths)
			// and last column (always) are calculated incorrectly,
			// because the browser cannot resize a col to its minimum width when all other cols
			// have explicit widths already set.
			kendoGrid.wrapper.find('col').each(function (index) {
				header = headers.eq(index);
				preciseWidth = ResizingTableLayoutAuto.getPreciseWidth(header[0]);
				header.data('info', {
					col: this,
					width: preciseWidth
				});
			}).each(function () {
				this.style.width = '';
			}).each(function (index) {
				header = headers.eq(index);
				this.style.width = '1px';
				minWidth = ResizingTableLayoutAuto.getPreciseWidth(header[0]);
				this.style.width = '';
				if (header.data('info').width >= MINHEADERWIDTH) {
					minWidth = Math.max(minWidth, MINHEADERWIDTH);
				}
				header.data('info').minWidth = minWidth;
			}).each(function (index) {
				this.style.width = headers.eq(index).data('info').width + PX;
			});
		}
	});
	namespace("Telerik.UI.Grid", {
		_Resizing: Resizing,
		_ResizingTableLayoutFixed: ResizingTableLayoutFixed,
		_ResizingTableLayoutFixedHierarchy: ResizingTableLayoutFixedHierarchy,
		_ResizingTableLayoutAuto: ResizingTableLayoutAuto
	});
})(this, jQuery);
(function (global, $, undefined) {
	"use strict";
//helper functions
	var indexDetailTables = function (masterTable, dataSource) {
	//first pass - calculate total items for each table view (DFS)
	var queue = [masterTable];
	while (queue.length > 0) {
		var childTable = queue.pop(), childTotal = 0;
		if (childTable._indices && childTable._indices.length) {
			if (!childTable._childCalculated) queue.push(childTable);
			for (var index in childTable._indices) {
				if (childTable._indices[index].open) {
					var detailTable = childTable._indices[index].detailTable;
					if (!childTable._childCalculated) {
						queue.push(detailTable);
					}
					else {
						var detailTableTotal = childTable._indices[index].detailTable._childTotal;
						childTotal += detailTableTotal ? detailTableTotal : 0;
					}
				}
			}
		}
		//count header row
		childTotal++;
			childTable._childTotal = childTotal + (childTable.dataSource ? childTable.dataSource.total : 0);
			//dataSource is the kendo dataSource object so call total() function instead of total field!
			if (childTable === masterTable && !childTable.dataSource && dataSource) childTable._childTotal += dataSource.total();
		childTable._childCalculated = true;
	}
	//dont count header row on master table
	if (masterTable._childTotal) masterTable._childTotal--;
	//second pass - calculate virtual item index for each table view (BFS)
	queue.push(masterTable);
	masterTable._virtualItemStart = 0;
	while (queue.length > 0) {
		var parentTable = queue.shift();
		parentTable._childCalculated = false;
		if (parentTable._indices && parentTable._indices.length) {
			var childStartIndex = 0;
			for (var index = 0, len = parentTable._indices.length; index < len; index++) {
				if (parentTable._indices[index].open) {
					var detailTable = parentTable._indices[index].detailTable;
					detailTable._virtualItemStart = parentTable._virtualItemStart + childStartIndex + parentTable._indices[index].index;
					childStartIndex += detailTable._childTotal;
					queue.push(detailTable);
				}
			}
		}
	}
	queue = null;
	return masterTable._childTotal;
};
//kendo overrides
var math = Math;
kendo.ui.Grid.prototype._averageRowHeight = function () {
	var that = this,
	rowHeight = that._rowHeight;
	if (!that._rowHeight) {
		that._rowHeight = rowHeight = that.table.outerHeight() / that.table[0].rows.length;
	}
	return rowHeight;
};
kendo.ui.VirtualScrollable.prototype._foundParentTableView = null;
kendo.ui.VirtualScrollable.prototype._getParentTableView = function (element) {
	var that = this;
	if (that._foundParentTableView == null) {
		//find parent table view
		var elParent = element.parent();
		while (elParent && elParent.length && !elParent[0].winControl) { elParent = elParent.parent(); }
		if (elParent && elParent.length)
			that._foundParentTableView = elParent[0].winControl;
	}
	return that._foundParentTableView;
};
kendo.ui.VirtualScrollable.prototype._scroll = function (e) {
	var that = this,
		scrollTop = e.currentTarget.scrollTop,
		dataSource = that.dataSource,
		rowHeight = that.itemHeight,
		skip = dataSource.skip() || 0,
		start = that._rangeStart || skip,
		height = that.element.innerHeight(),
		isScrollingUp = !!(that._scrollbarTop && that._scrollbarTop > scrollTop),
		firstItemIndex = math.max(math.floor(scrollTop / rowHeight), 0),
		lastItemIndex = math.max(firstItemIndex + math.floor(height / rowHeight), 0);
	that._scrollTop = scrollTop - (start * rowHeight);
	that._scrollbarTop = scrollTop;
	//Take into account hierarchy
	var itemsToSubtract = 0;
	var winTableView = that._getParentTableView(that.element);
	if (winTableView._indices && winTableView._indices.length) {
		for (var i = 0, len = winTableView._indices.length; i < len; i++) {
			if (winTableView._indices[i].open) {
				var detailTable = winTableView._indices[i].detailTable;
				if (detailTable._virtualItemStart < firstItemIndex) {
					if ((detailTable._virtualItemStart + detailTable._childTotal) >= firstItemIndex) {
						firstItemIndex = detailTable._virtualItemStart;
						break;
					}
					else {
						itemsToSubtract += detailTable._childTotal;
					}
				}
				else {
					break;
				}
			}
		}
		firstItemIndex -= itemsToSubtract;
		lastItemIndex = math.max(firstItemIndex + math.floor(height / rowHeight), 0);
	}
	that._isScrollingUp = isScrollingUp;
	//END MODIFICATION
	if (!that._fetch(firstItemIndex, lastItemIndex, isScrollingUp)) {
		that.wrapper[0].scrollTop = that._scrollTop;
	}
	//Take into account hierarchy
	else if (itemsToSubtract > 0) {
		that.wrapper[0].scrollTop = that._scrollTop + itemsToSubtract * rowHeight;
	}
	//END MODIFICATION
};
kendo.ui.VirtualScrollable.prototype._oldWrap = kendo.ui.VirtualScrollable.prototype.wrap;
kendo.ui.VirtualScrollable.prototype._newScrollbar = function () {
	var that = this;
	if (!that._newScrollbarWidth) {
		//same as kendo.support.scrollbar() but with added style -ms-overflow-style:scrollbar;
		var div = document.createElement("div");
		div.style.cssText = "-ms-overflow-style:scrollbar;overflow:scroll;overflow-x:hidden;zoom:1;clear:both";
		div.innerHTML = "&nbsp;";
		document.body.appendChild(div);
		that._newScrollbarWidth = div.offsetWidth - div.scrollWidth;
		document.body.removeChild(div);
	}
	return that._newScrollbarWidth;
};
kendo.ui.VirtualScrollable.prototype.wrap = function () {
	var that = this,
		scrollbarwidth = that._newScrollbar() + 1;
	that._oldWrap();
	that.verticalScrollbar.css("width", scrollbarwidth + "px")
};
kendo.ui.VirtualScrollable.prototype.refresh = function () {
	var that = this,
		html = "",
		maxHeight = 250000,
		dataSource = that.dataSource,
		rangeStart = that._rangeStart,
		scrollbar = kendo.support.scrollbar(),
		wrapperElement = that.wrapper[0],
		totalHeight,
		idx,
		itemHeight;
	kendo.ui.progress(that.wrapper.parent(), false);
	clearTimeout(that._timeout);
	itemHeight = that.itemHeight = that.options.itemHeight() || 0;
	var addScrollBarHeight = (wrapperElement.scrollWidth > wrapperElement.offsetWidth) ? scrollbar : 0;
	//Take into account Hierarchy
		var winTableView = that._getParentTableView(that.element);
		//pass the dataSource here in case the TableView doesn't have one yet.
		var total = indexDetailTables(winTableView, dataSource);
	totalHeight = total * itemHeight + addScrollBarHeight;
	//END MODIFICATION
	for (idx = 0; idx < math.floor(totalHeight / maxHeight) ; idx++) {
		html += '<div style="width:1px;height:' + maxHeight + 'px"></div>';
	}
	if (totalHeight % maxHeight) {
		html += '<div style="width:1px;height:' + (totalHeight % maxHeight) + 'px"></div>';
	}
	that.verticalScrollbar.html(html);
	wrapperElement.scrollTop = that._scrollTop;
	if (that.drag) {
		that.drag.cancel();
	}
	if (rangeStart && !that._fetching) { // we are rebound from outside local range should be reset
		that._rangeStart = dataSource.skip();
	}
	that._fetching = false;
};
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var define = WinJS.Class.define,
		derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		nsName = "Telerik.UI.Grid",
		NS = namespace(nsName),
		utilities = WinJS.Utilities,
		util = Telerik.Utilities,
		setOptions = WinJS.UI.setOptions,
		root = document.documentElement,
		NOOP = function () { },
		POINTERDOWN = "MSPointerDown",
		POINTERMOVE = "MSPointerMove",
		POINTERUP = "MSPointerUp",
		POINTERCANCEL = "MSPointerCancel",
		css = {
			selected: "k-state-selected",
			expand: "t-expand",
			active: "t-active",
			northWest: "t-nw"
		};
	var SelectionRange = function (options) {
		setOptions(this, options);
	}
	SelectionRange.prototype = {
		items: null,
		isCell: false,
		left: 0,
		top: 0,
		width: 0,
		height: 0,
		dispose: function () {
			this.items = null;
		}
	}
	//create a selection range only if the selected items form a regular rectangle for range selection
	SelectionRange.create = function (selected, isCell) {
		var left, top, right, bottom;
		if (!selected.length) {
			return null;
		}
		if (isCell) {
			left = selected[0].cellIndex;
			top = selected[0].parentNode.rowIndex;
			right = selected[selected.length - 1].cellIndex;
			bottom = selected[selected.length - 1].parentNode.rowIndex;
			//ensure no "gaps" in the selection, i.e. all cells inside the bounding rectangle are selected
			if (selected.length !== (right - left + 1) * (bottom - top + 1)) {
				return null;
			}
			//ensure no outstanding cell beyond the rectangle marked by the first and last cell position
			for (var i = 0, len = selected.length; i < len; i++) {
				var cell = selected[i],
					x = cell.cellIndex,
					y = cell.parentNode.rowIndex;
				if (x < left || x > right || y < top || y > bottom) {
					return null;
				}
			}
		}
		else {
			left = 0;
			top = selected[0].rowIndex;
			right = 0;
			bottom = selected[selected.length - 1].rowIndex;
			//check consecutive row indexes when row selection is used
			if (top + selected.length - 1 !== bottom) {
				return null;
			}
		}
		return new SelectionRange({
			items: selected,
			isCell: isCell,
			left: left,
			top: top,
			width: right - left + 1,
			height: bottom - top + 1
		});
	}
	namespace(nsName, {
		/// <excludetoc />
		SelectionExpander: define(function (range) {
}, {
			//override this function to get notified on range change
			onchange: NOOP,
			//override these empty methods in derived classes
			dispose: function () {
}
		})
	});
	namespace(nsName, {
		/// <excludetoc />
		RowSelectionExpander: derive(NS.SelectionExpander, function (range) {
			/// <summary>
			/// Internal use only.
			/// </summary>
}, {
			}),
		/// <excludetoc />
		CellSelectionExpander: derive(NS.SelectionExpander, function (original) {
			/// <summary>
			/// Internal use only.
			/// </summary>
}, {
			})
	});
	namespace(nsName, {
		/// <excludetoc />
		Selection: define(function (owner) {
			/// <summary>
			/// Internal use only.
			/// </summary>
}, {
			owner: null,
			//supports range selection only if the table does not have grouping, hierarchy and is not a detail table itself
			dispose: function () {
}
		})
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	'use strict';
		// WinJS refs
	var win = WinJS,
        define = win.Class.define,
        namespace = win.Namespace.define,
		utilities = win.Utilities;
	var _LoopingListItem = define(function (element) {
}, {
		element: null,
		value: {get:function(){}, set:function(value){}},
		enabled: {get:function(){}, set:function(value){}},
		selected: {get:function(){}, set:function(value){}}
	});
	namespace('Telerik.UI', {
		_LoopingListItem: _LoopingListItem
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        define = win.Class.define,
        namespace = win.Namespace.define,
		// Constants
		NULL = null;
	namespace("Telerik.UI", {
		_Range: define(function (start, end) {
}, {
			end: {get:function(){}, set:function(value){}},
			length: {get:function(){}},
			value: function (index) {
},
			index: function (value) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_Range = ui._Range;
	namespace("Telerik.UI", {
		_LoopingRange: derive(_Range, function (options) {
}, {
			rangeFrom: function (value) {
},
			range: function () {
},
			prev: function () {
},
			next: function () {
},
			centerAt: function (value) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
	// WinJS refs
	var win = WinJS,
        define = win.Class.define,
        namespace = win.Namespace.define;
	namespace("Telerik.UI", {
		_LoopingQueue: define(function (array) {
}, {
			array: {get:function(){}},
			add: function (item) {
},
			shiftLeft: function () {
},
			shiftRight: function () {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict"
	var win = WinJS,
        derive = win.Class.derive,
        mix = win.Class.mix,
        namespace = win.Namespace.define,
        animation = win.UI.Animation,
        ui = Telerik.UI,
		_LoopingListItem = ui._LoopingListItem,
		_LoopingRange = ui._LoopingRange,
		_LoopingQueue = ui._LoopingQueue,
		NULL = null,
        ITEMCOUNT = 3,
        ITEMLENGTH = 70,
        ITEMSPACING = 10,
        PX = "px",
        TLOOPINGLIST = "t-looping-list",
        TSELECTED = "t-selected",
		TFOCUSED = "t-focused",
        TRUE = true,
        FALSE = false;
	var _LoopingList = derive(ui.Control, function (element, options) {
}, {
		/// <field type="HTMLElement" domElement="TRUE" hidden="TRUE">
		/// Gets the DOM element that hosts this control.
		/// </field>
		element: NULL,
		itemCount: {get:function(){}, set:function(value){}},
		itemLength: {get:function(){}, set:function(value){}},
		itemSpacing: {get:function(){}, set:function(value){}},
		value: {get:function(){}, set:function(value){}},
		minValue: {get:function(){}, set:function(value){}},
		maxValue: {get:function(){}, set:function(value){}},
		maxHeight: {get:function(){}, set:function(value){}},
		itemBound: {set:function(value){}},
		moveSelectionUp: function () {
},
		moveSelectionDown: function () {
},
		showOutline: function () {
},
		hideOutline: function () {
},
		bind: function (loopingRange) {
},
		showSelectionItems: function () {
},
		hideSelectionItems: function () {
},
		focus: function () {
},
		blur: function () {
},
		createItem: function (element) {
},
		refresh: function () {
},
		// Gesture handling methods
		});	
	mix(_LoopingList, win.Utilities.eventMixin);
	namespace("Telerik.UI", {
		_LoopingList: _LoopingList
	});
})(this, jQuery);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_LoopingList = ui._LoopingList,
		// Constants
		NULL = null,
		TRUE = true;
	namespace("Telerik.UI", {
		_SlidingList: derive(_LoopingList, function (element, options) {
}, {
			moveSelectionUp: function () {
},
			moveSelectionDown: function () {
},
			refresh: function () {
},
			bind: function (loopingRange) {
},
			})
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datetimepickers/lists/base/loopinglist/loopinglistitem.js" />
(function (global, undefined) {
	'use strict';
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
		// Imports
		_LoopingListItem = Telerik.UI._LoopingListItem;
	namespace('Telerik.UI', {
		_DateListItem: derive(_LoopingListItem, function (element) {
}, {
			label: {get:function(){}, set:function(value){}},
			})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		calendar = Windows.Globalization.Calendar,
		// Imports
		_LoopingList = ui._LoopingList;
	namespace("Telerik.UI", {
		_YearList: derive(_LoopingList, function (element, options) {
}, {
			createItem: function (element) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_LoopingList = ui._LoopingList;
	namespace("Telerik.UI", {
		_MonthList: derive(_LoopingList, function (element, options) {
}, {
			createItem: function (element) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_LoopingList = ui._LoopingList;
	namespace("Telerik.UI", {
		_DayList: derive(_LoopingList, function (element, options) {
}, {
			createItem: function (element) {
},
			updateRangeEnd: function (date) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/datetimepickers/lists/base/loopinglist/loopinglistitem.js" />
(function (global, undefined) {
	'use strict';
	// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
		// Imports
		_LoopingListItem = Telerik.UI._LoopingListItem;
	namespace('Telerik.UI', {
		_TimeListItem: derive(_LoopingListItem, function (element) {
}, {
			})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
	// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_LoopingList = ui._LoopingList,
		TWELVE = 12,
		NULL = null;
	namespace("Telerik.UI", {
		_HourList: derive(_LoopingList, function (element, options) {
}, {
			createItem: function (element) {
}
		}, {
			getHourInPeriod: function (date, twentyFourHour) {
				var shortTime = twentyFourHour ? 0 : 12,
					lastHour = shortTime ? TWELVE : 23,
					hour = date.getHours(),
					hourLastHourDelta = hour - lastHour;
				if (!hour) {
					return shortTime;
				}
				return hourLastHourDelta > 0 ? hourLastHourDelta : hour;
			}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_LoopingList = ui._LoopingList;
	namespace("Telerik.UI", {
		_MinuteList: derive(_LoopingList, function (element, options) {
}, {
			createItem: function (element) {
}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_SlidingList = ui._SlidingList;
	namespace("Telerik.UI", {
		_PeriodList: derive(_SlidingList, function (element, options) {
}, {
			createItem: function (element) {
}
		}, {
			_getPeriodIndexFromHour: function (date, twentyFourHour) {
				var lastHour = twentyFourHour ? 23 : 12,
					hour = date.getHours(),
					hourLastHourDelta = hour - lastHour;
				return hourLastHourDelta >= 0 ? 2 : 1;
			},
			_getPeriodIndexFromString: function (periodList, periodString) {
				if (periodString == periodList._AM) {
					return 1;
				}
				if (periodString == periodList._PM) {
					return 2;
				}
				return null;
			}
		})
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
(function (global, undefined) {
	"use strict";
	WinJS.Namespace.define("Telerik.UI", {
		_DisplayMode: {
			/// <field type="String">
			/// This is the default mode of the control. Both the picker and selector parts of the control
			/// are available. Selection changes when the 'OK' button in the selector is pressed.
			/// </field>
			standard: 'standard',
			/// <field type="String">
			/// In this mode the picker part of the control is not available. The selector renders
			/// inline in the document and is always open. Once the selected value of any of the lists
			/// changes, the control.value property is immediately updated.
			/// </field>
			inline: 'inline'
		}
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_DisplayMode = ui._DisplayMode;
	namespace("Telerik.UI", {
		_Utility: {
			removeRtlMarks: function (string) {
				var sanitizedString = [],
					i, c;
				for (i = 0; i < string.length; i++) {
					c = string.charAt(i);
					if (c != "\u200E" && c != "\u200F") {
						sanitizedString.push(c);
					}
				}
				return sanitizedString.join("");
			},
			is12HourFormat: function () {
				return new Windows.Globalization.Calendar().numberOfHoursInThisPeriod == 12;
			},
			tryParseObject: function (value) {
				if (typeof value == 'string') {
					var trimmed = value.trim();
					if (trimmed[0] == "{" && trimmed[trimmed.length - 1] == "}")
						return JSON.parse(trimmed);
				}
				return value;
			},
			isInline: function (control) {
				return control.displayMode == _DisplayMode.inline;
			}
		}
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        define = win.Class.define,
        namespace = win.Namespace.define,
		// Constants
		TPRESS = "t-press",
        TOUTLINE = "t-outline",
		NULL = null;
	var _SelectorButton = define(function (element, value) {
}, {
		element: NULL,
		value: {get:function(){}},
		focus: function () {
},
		blur: function () {
},
		focused: function () {
},
		press: function () {
},
		release: function () {
}
	});
	namespace("Telerik.UI", {
		_SelectorButton: _SelectorButton
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        define = win.Class.define,
        namespace = win.Namespace.define;
	var _SelectorControlList = define(function (lists, buttons) {
}, {
		focusNextList: function () {
},
		focusPreviousList: function () {
},
		focusNext: function () {
},
		focusPrevious: function () {
},
		pressButton: function () {
},
		releaseButton: function () {
},
		moveListSelectionDown: function () {
},
		moveListSelectionUp: function () {
},
		focusList: function (list) {
},
		blur: function () {
},
		hasFocusedControl: function () {
},
		isFirstControlFocused: function () {
},
		isLastControlFocused: function () {
},
		getFocusedList: function () {
}
	});
	namespace("Telerik.UI", {
		_SelectorControlList: _SelectorControlList
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        mix = win.Class.mix,
        namespace = win.Namespace.define,
        animation = win.UI.Animation,
        ui = Telerik.UI,
        util = Telerik.Utilities,
		priv = util.setPrivate,
		cul = Telerik.Culture,
		// Imports
		_SelectorButton = ui._SelectorButton,
		_SelectorControlList = ui._SelectorControlList,
		_DisplayMode = ui._DisplayMode,
		_Utility = ui._Utility,
		// Constants
		ITEMSPACING = 10,
		ITEMLENGTH = 70,
		ITEMCOUNT = 3,
		THEADER = "t-header",
        TBODY = "t-body",
        TFOOTER = "t-footer",
        TCOL = "t-col",
        TBUTTON = "t-button",
        TOK = "t-ok",
        TCANCEL = "t-cancel",
        OK = "OK",
        OPEN = "open",
        CLOSE = "close",
		NULL = null,
		TRUE = true,
		FALSE = false,
		VISIBLE = 'visible',
		HIDDEN = 'hidden',
		BLOCK = 'block',
		NONE = 'none',
		FUNCTION = 'function',
		PX = 'px';
	namespace("Telerik.UI", {
		_DateTimeSelector: derive(ui.Control, function (element, options) {
}, {
			culture: {get:function(){}, set:function(value){}},
			itemCount: {get:function(){}, set:function(value){}},
			itemSpacing: {get:function(){}, set:function(value){}},
			itemLength: {get:function(){}, set:function(value){}},
			format: {get:function(){}, set:function(value){}},
			value: {get:function(){}, set:function(value){}},
			minValue: {get:function(){}, set:function(value){}},
			maxValue: {get:function(){}, set:function(value){}},
			isOpen: {get:function(){}},
			headerContent: {get:function(){}, set:function(value){}},
			headerTemplate: {get:function(){}, set:function(value){}},
			itemTemplate: {get:function(){}, set:function(value){}},
			displayMode: {get:function(){}, set:function(value){}},
			open: function () {
},
			close: function (keepFocus) {
},
			repaint: function () {
}
			})
	});
	mix(Telerik.UI._DateTimeSelector, win.Utilities.eventMixin,
        win.Utilities.createEventProperties(OK, OPEN, CLOSE));
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	'use strict';
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		cul = Telerik.Culture,
		// Imports
		_Utility = ui._Utility,
		_DateTimeSelector = ui._DateTimeSelector,
		_YearList = ui._YearList,
		_MonthList = ui._MonthList,
		_DayList = ui._DayList,
		// Constants
        TDATESELECTOR = 't-date-selector',
        Y = 'y',
		M = 'm',
		D = 'd',
        OK_LOWERCASE = "ok",
		NULL = null;
	var _DateSelector = derive(_DateTimeSelector, function (element, options) {
}, {
		});
	namespace('Telerik.UI', {
		_DateSelector: _DateSelector
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	'use strict';
		// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		cul = Telerik.Culture,
		// Imports
		_Utility = ui._Utility,
		_DateTimeSelector = ui._DateTimeSelector,
		_HourList = ui._HourList,
		_MinuteList = ui._MinuteList,
		_PeriodList = ui._PeriodList,
		// Constants
        TTIMESELECTOR = 't-time-selector',
        H = 'h',
		M = 'm',
		T = 't',
        OK_LOWERCASE = 'ok',
		NULL = null;
	var _TimeSelector = derive(_DateTimeSelector, function (element, options) {
}, {
		});
	namespace('Telerik.UI', {
		_TimeSelector: _TimeSelector
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
    "use strict";
    var win = WinJS,
        derive = win.Class.derive,
        mix = win.Class.mix,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
        util = Telerik.Utilities,
		cul = Telerik.Culture,
		_DisplayMode = ui._DisplayMode,
		_Utility = ui._Utility,
		_DateTimeSelector = ui._DateTimeSelector,
		OBJECT = "object",
        FUNCTION = "function",
        DIV = "DIV",
        PX = "px",
        TPICKER = "t-picker",
        TPRESS = "t-press",
        TINPUT = "t-input",
        TARROW = "t-arrow",
        TDISABLED = "t-disabled",
        TEMPTY = "t-empty",
        TFOCUSED = "t-focused",
        OK_LOWERCASE = "ok",
        OPEN = "open",
        CLOSE = "close",
        EMPTYSTRING = "",
        CHANGE = "change",
		MSPOINTERDOWN = "MSPointerDown",
        NULL = null,
        TRUE = true,
        FALSE = false,
        ITEMCOUNT = 3,
        ITEMLENGTH = 70,
        ITEMSPACING = 10;
    var _DateTimePicker = derive(ui.Control, function (element, options) {
    	/// <summary>
    	/// Creates a new RadDatePicker/RadTimePicker control.
    	/// </summary>
    	/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
    	/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
    	 // Change to -1 when (if??) IE10's bug is fixed: tabIndex: -1 cannot be focused with focus().
    	/// <field type="Date">
    	/// Gets or sets the value of the picker. (Only the date/time part of the Date object
    	/// will be applied.) It can be null/undefined (not set).
    	/// </field>
    	value: {get:function(){}, set:function(value){}},
    	/// <field type="String" readonly="true">
    	/// Gets the string representation of the current value. 
    	/// The string representation is the current value formatted 
    	/// according to the settings of the device and the control.
    	/// </field>
    	valueString: {get:function(){}},
    	/// <field type="Date">
    	/// Gets or sets the minimum value of the value range for the control.
    	/// (Only the date/time part of the Date object will be applied.)
    	/// </field>
    	minValue: {get:function(){}, set:function(value){}},
    	/// <field type="Date">
    	/// Gets or sets the maximum value of the value range for the control.
    	/// (Only the date/time part of the Date object will be applied.)
    	/// </field>
    	maxValue: {get:function(){}, set:function(value){}},
    	/// <field type="Number" Integer="true">
    	/// Gets or sets the number of items visible within the selector part of the control.
    	/// This property is used to determine the height of the selector part when opened. 
    	/// The calculated height will not exceed the height of the view port.
    	/// Pass non-positive value to stretch the selector vertically.
		/// Default value is 3.
    	/// </field>
    	itemCount: {get:function(){}, set:function(value){}},
    	/// <field type="Number" Integer="true">
    	/// Gets or sets the length (width and height; in pixels) of the items that appear in the selector part of the control.
		/// Default value is 70.
    	/// </field>
    	itemLength: {get:function(){}, set:function(value){}},
    	/// <field type="Number" Integer="true">
    	/// Gets or sets the spacing (in pixels) between the items that appear in the selector part of the control.
    	/// This propery also determines the spacing between the different 
    	/// parts of the selector, e.g. lists, buttons, header.
		/// Default value is 10.
    	/// </field>
    	itemSpacing: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets the selector format. This value defines how the different selector components will be ordered. 
    	/// By setting this property, you can also define which editable parts of the selector will be visible. 
    	/// For example 'y/m' will display the Year and Month components in a DatePicker.
    	/// Valid values are:
    	/// * h - hour, m - minute, t - period [AM/PM] if applicable for a TimePicker;
    	/// * y - year, m - month, d - day for a DatePicker;
    	/// </field>
    	selectorFormat: {get:function(){}, set:function(value){}},
    	/// <field type="Date">
    	/// Gets or sets the value that represents the default value displayed in the selector part. 
    	/// The default value is shown when the value property is not set (null/undefined).
    	/// If no default value is specified, the current date/time on the system is displayed when the selector opens.
    	/// </field>
    	selectorDefaultValue: {get:function(){}, set:function(value){}},
    	/// <field type="Boolean">
    	/// Gets or sets a value determining whether the selector part of the control is open.
    	/// </field>
    	isSelectorOpen: {get:function(){}, set:function(value){}},
    	/// <field type="Boolean">
    	/// Gets or sets a value determining whether the control is in read only mode. 
    	/// If set to true, the control does not allow the user to modify its value.
    	/// </field>
    	isReadOnly: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets a string representing the value format for the control. 
    	/// The value format determines how the edited value is displayed on the screen after it has been selected. 
    	/// If not set, the format from the current system clock configuration is used.
    	/// </field>
    	displayValueFormat: {get:function(){}, set:function(value){}},
    	/// <field type="Boolean">
    	/// Gets or sets a value indicating whether the control will automatically calculate its picker width,
    	/// so that it equals the width of the selector part.
    	/// </field>
    	autoSizeWidth: {get:function(){}, set:function(value){}},
    	/// <field type="Boolean">
    	/// Gets or sets a value indicating whether the control is enabled (default).
    	/// </field>
    	enabled: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets a value determining how the items in all lists in the selector will be rendered.
    	/// With this propery the default template can be overridden.
    	/// Internally all items are bound to a data object having two fields: 'value' and 'label'.
    	/// These correspond to the number of year, month, hour, etc. and to the name of the
    	/// month, day and whether the year is leap respectively. In order to utilize either or both of the
    	/// data object properties the template should have mappings to them, e.g.
    	/// <div>#= value #</div>'#= label #'
    	/// </field>
    	itemTemplate: {get:function(){}, set:function(value){}},
    	/// <field type="Object">
    	/// Gets or sets the header displayed in the selector.
    	/// By default the 'Select Date' text is shown.
    	/// This property value can be either a string or a data object.
    	/// If the value is an object, the selectorHeaderTemplate property must also be set
    	/// to specify which properties of the object will be rendered.
    	/// </field>
    	selectorHeader: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets a value determining how the selectorHeader property value will be rendered.
    	/// If the selectorHeader property is of a primitive type, this property should not be set - 
    	/// the value will render as text.
    	/// If the selectorHeader is an object the template should specify mappings in the form #= objectPropertyName #.
    	/// Example:
    	/// <div class="selector-header">#= value #</div>
    	/// provided that the selectorHeader property is set to { value: 'Header Text' }.
    	/// </field>
    	selectorHeaderTemplate: {get:function(){}, set:function(value){}},
    	/// <field type="Object">
    	/// Gets or sets the object that represents the header content.
    	/// This property value can be either a string or a data object.
    	/// If the value is an object, the headerTemplate property must also be set
    	/// to specify which properties of the object will be rendered.
    	/// </field>
    	header: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets a value determining how the header property value will be rendered.
    	/// If the header property is of a primitive type, this property should not be set - 
    	/// the value will render as text.
    	/// If the header is an object the template should specify mappings in the form #= objectPropertyName #.
    	/// Example:
    	/// <div class="header">#= value #</div>
    	/// provided that the header property is set to { value: 'Header Text' }.
    	/// </field>
    	headerTemplate: {get:function(){}, set:function(value){}},
    	/// <field type="Object">
    	/// Gets or sets the empty content of the picker part of the control. 
    	/// The empty content is displayed when there is no value defined.
    	/// This property value can be either a string or a data object.
    	/// If the value is an object, the headerTemplate property must also be set
    	/// to specify which properties of the object will be rendered.
    	/// </field>
    	emptyContent: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Gets or sets a value determining how the emptyContent property value will be rendered.
    	/// If the emptyContent property is of a primitive type, this property should not be set - 
    	/// the value will render as text.
    	/// If the emptyContent is an object the template should specify mappins in the form #= objectPropertyName #.
    	/// Example:
    	/// <div class="empty-content">#= value #</div>
    	/// provided that the emptyContent property is set to { value: 'Empty' }.
    	/// </field>
    	emptyContentTemplate: {get:function(){}, set:function(value){}},
    	/// <field type="Number" Integer="true">
    	/// Gets or sets the tab index of the control.
    	/// The default value is -1.
    	/// </field>
    	tabIndex: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// Specifies the rendering and functioning mode of the control.
    	/// Accepts values from the enums RadDatePicker.DisplayMode and RadTimePicker.DisplayMode.
    	/// (Both enums are one and the same - they are available in both places for convenience.
    	/// Default value is DisplayMode.standard.
    	/// </field>
    	displayMode: {get:function(){}, set:function(value){}},
    	/// <field type="String">
    	/// BCP-47 language tag with language and region. For example: en-US, fr-FR, ar-KW
    	/// </field>
		culture: {get:function(){}, set:function(value){}},
    	//the kendo binding model does not trigger change event of inputs, so we need onpropertychange
        });        
    mix(_DateTimePicker, win.Utilities.eventMixin,
        win.Utilities.createEventProperties(CHANGE, OPEN, CLOSE));
    namespace("Telerik.UI", {
        _DateTimePicker: _DateTimePicker
    });
})(this, jQuery);
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	'use strict';
	// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_DateTimePicker = ui._DateTimePicker,
		_DateSelector = ui._DateSelector,
		_DisplayMode = ui._DisplayMode,
		// Constants
        TDATEPICKER = 't-date-picker';
		/// <summary>
		/// Allows the selection of a date value from maximum three different components:
		/// year/month/day via intuitive and easy to use vertical looping lists that show in a popup.
		/// </summary>
		/// <icon src="datepicker_html_12.png" width="12" height="12" />
		/// <icon src="datepicker_html_16.png" width="16" height="16" />
		/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadDatePicker"></span>]]></htmlSnippet>
		/// <event name="open">Fires after the selector popup opens.</event>
		/// <event name="close">Fires after the selecotr popup closes.</event>
		/// <event name="change">Fires when the date is changed via the selector.</event>
		/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
		/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
		/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
		/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadDatePicker = derive(_DateTimePicker, function (element, options) {
		/// <summary>
		/// Create a new RadDatePicker control that allows selection of a date using year/month/day pickers.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		}, {
		/// <field type="String" static="true">
		/// Specifies the rendering and functioning mode of RadDatePicker.
		/// Same as RadTimePicker.DisplayMode.
		/// </field>
		DisplayMode: _DisplayMode
	});
	namespace('Telerik.UI', {
		RadDatePicker: RadDatePicker
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, undefined) {
	'use strict';
	// WinJS refs
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
		// Imports
		_DateTimePicker = ui._DateTimePicker,
		_TimeSelector = ui._TimeSelector,
		_DisplayMode = ui._DisplayMode,
		// Constants
        TTIMEPICKER = 't-time-picker',
		NULL = null;
		/// <summary>
		/// Allows the selection of a time value from maximum three different components:
		/// hour/minute/perio via intuitive and easy to use vertical looping lists that show in a popup.
		/// </summary>
		/// <icon src="timepicker_html_12.png" width="12" height="12" />
		/// <icon src="timepicker_html_16.png" width="16" height="16" />
		/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadTimePicker"></span>]]></htmlSnippet>
		/// <event name="open">Fires after the selector popup opens.</event>
		/// <event name="close">Fires after the selecotr popup closes.</event>
		/// <event name="change">Fires when the time is changed via the selector.</event>
		/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
		/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
		/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
		/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadTimePicker = derive(_DateTimePicker, function (element, options) {
		/// <summary>
		/// Create a new RadTimePicker control that allows selection of a time using hour/minute/period pickers.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element that hosts this control.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Date">
		/// Gets or sets the Date object, which date components (year, month, day)
		/// will be used as base for the Date object returned by the value property.
		/// Default value is null; in this case the value property returns a Date object
		/// with date components equal to today's.
		/// </field>
		baseDate: {get:function(){}, set:function(value){}},
		}, {
		/// <field type="String" static="true">
		/// Specifies the rendering and functioning mode of RadTimePicker.
		/// Same as RadDatePicker.DisplayMode.
		/// </field>
		DisplayMode: _DisplayMode
	});
	namespace('Telerik.UI', {
		RadTimePicker: RadTimePicker
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	'use strict'
	var win = WinJS,
		derive = win.Class.derive,
		namespace = win.Namespace.define,
		controlConfig = Telerik.UI._ControlConfiguration;
	var _MonthConfiguration = derive(controlConfig, function (owner, parentMapping, defaults, onchange) {
		/// <summary>
		/// For internal usage only. Describes the properties of the Calendar month object.
		/// </summary>
}, {
		/// <field type="String" defaultValue="">
		/// Template to be used for rendering the cells in the 'month' view, which are in range.
		/// Default value is "".
		/// </field>
		template: controlConfig.defineProperty('template', ''),
		/// <field type="String"  defaultValue="">
		/// Template to be used for rendering the cells in the 'month' view, which are not in the min/max range.
		/// Default value is "".
		/// </field>
		disabledTemplate: controlConfig.defineProperty('disabledTemplate', '')
	});
	var _FooterConfiguration = derive(controlConfig, function (owner, parentMapping, defaults, onchange) {
		/// <summary>
		/// For internal usage only. Describes the properties of the Calendar footer object.
		/// </summary>
}, {
		/// <field type="String" defaultValue="">
		/// Template to be used for rendering the footer.
		/// Default value is "".
		/// </field>
		template: controlConfig.defineProperty('template', function () {
			var owner = this._owner,
				widget = owner ? owner._widget : null,
				footer = widget ? widget.options.footer : '';
			if (typeof footer == 'string') {
				return footer;
			}
			else if (typeof footer == 'boolean') {
				return '';
			}
			return '';
		}),
		/// <field type="Boolean" defaultValue="true">
		/// If false, the footer will not be rendered.
		/// Default value is true.
		/// </field>
		enabled: controlConfig.defineProperty('enabled', function () {
			var owner = this._owner,
				widget = owner ? owner._widget : null,
				value = widget ? widget.options.footer : true;
			if (typeof value == 'string') {
				value = true;
			}
			return value;
		})
	});
	namespace('Telerik.UI.Calendar', {
		_MonthConfiguration: _MonthConfiguration,
		_FooterConfiguration: _FooterConfiguration
	});
})(this, jQuery);/// <reference path="/kendo/js/kendo.winjs.js" />
(function () {
	var DATE = Date,
		template = kendo.template,
		getCulture = kendo.getCulture,
		views = kendo.calendar.viewsEnum,
		cellTemplate = template('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>', { useWithBlock: false }),
        emptyCellTemplate = template('<td role="gridcell">&nbsp;</td>', { useWithBlock: false }),
        OTHERMONTH = "k-other-month",
        OTHERMONTHCLASS = ' class="' + OTHERMONTH + '"';
	function getCalendarInfo(culture) {
		return getCulture(culture).calendars.standard;
	}
	function isInRange(date, min, max) {
		return +date >= +min && +date <= +max;
	}
	function view(options) {
		var idx = 0,
            data,
            min = options.min,
            max = options.max,
            start = options.start,
            setter = options.setter,
            build = options.build,
            length = options.cells || 12,
            cellsPerRow = options.perRow || 4,
            content = options.content || cellTemplate,
            empty = options.empty || emptyCellTemplate,
            html = options.html || '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';
		for (; idx < length; idx++) {
			if (idx > 0 && idx % cellsPerRow === 0) {
				html += '</tr><tr role="row">';
			}
			data = build(start, idx);
			html += isInRange(start, min, max) ? content(data) : empty(data);
			setter(start, 1);
		}
		return html + "</tr></tbody></table>";
	}
	kendo.calendar.views[views.year].content = function (options) {
		var namesAbbr = getCalendarInfo(options.culture).months.namesAbbr,
			toDateString = this.toDateString,
			min = options.min,
			max = options.max;
		return view({
			perRow: 2,
			min: new DATE(min.getFullYear(), min.getMonth(), 1),
			max: new DATE(max.getFullYear(), max.getMonth(), 1),
			start: new DATE(options.date.getFullYear(), 0, 1),
			setter: this.setDate,
			build: function (date) {
				return {
					value: namesAbbr[date.getMonth()],
					ns: kendo.ns,
					dateString: toDateString(date),
					cssClass: ""
				};
			}
		});
	};
	kendo.calendar.views[views.decade].content = function (options) {
		var year = options.date.getFullYear(),
			toDateString = this.toDateString;
		return view({
			perRow: 2,
			start: new DATE(year - year % 10 - 1, 0, 1),
			min: new DATE(options.min.getFullYear(), 0, 1),
			max: new DATE(options.max.getFullYear(), 0, 1),
			setter: this.setDate,
			build: function (date, idx) {
				return {
					value: date.getFullYear(),
					ns: kendo.ns,
					dateString: toDateString(date),
					cssClass: idx === 0 || idx == 11 ? OTHERMONTHCLASS : ""
				};
			}
		});
	};
	kendo.calendar.views[views.century].content = function (options) {
		var year = options.date.getFullYear(),
			min = options.min.getFullYear(),
			max = options.max.getFullYear(),
			toDateString = this.toDateString,
			minYear = min,
			maxYear = max;
		minYear = minYear - minYear % 10;
		maxYear = maxYear - maxYear % 10;
		if (maxYear - minYear < 10) {
			maxYear = minYear + 9;
		}
		return view({
			perRow: 2,
			start: new DATE(year - year % 100 - 10, 0, 1),
			min: new DATE(minYear, 0, 1),
			max: new DATE(maxYear, 0, 1),
			setter: this.setDate,
			build: function (date, idx) {
				var start = date.getFullYear(),
					end = start + 9;
				if (start < min) {
					start = min;
				}
				if (end > max) {
					end = max;
				}
				return {
					ns: kendo.ns,
					value: start + " - " + end,
					dateString: toDateString(date),
					cssClass: idx === 0 || idx == 11 ? OTHERMONTHCLASS : ""
				};
			}
		});
	};
})();/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	'use strict'
	var win = WinJS,
		derive = win.Class.derive,
		namespace = win.Namespace.define,
		ui = Telerik.UI,
		utilities = Telerik.Utilities,
		cul = Telerik.Culture;
	var UNDEFINED = 'undefined',
		OBJECT = 'object',
		ANIMATIONDURATION = 367,
		EASINGOUTEXPO = 'cubic-bezier(0.19, 1, 0.22, 1)';
	/// <summary>
	/// A calendar control for picking dates, with navigation.
	/// </summary>
	/// <icon src="calendar_html_12.png" width="12" height="12" />
	/// <icon src="calendar_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadCalendar"></div>]]></htmlSnippet>
	/// <event name="change">Fires when the selected date is changed.</event>
	/// <event name="navigate">Fires when the control navigates.</event>
	/// <part name="calendar" class="t-calendar">The RadCalendar widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadCalendar = derive(ui.WidgetWrapper, function (element, options) {
		/// <summary>
		/// Creates a new RadCalendar control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="String">
		/// Gets or sets the culture of the calendar.
		/// </field>
		culture: {get:function(){}, set:function(value){}},
		/// <field type="Array" elementType="Date" defaultValue="[]">
		/// Specifies a list of dates, which will be passed to the month template. Default value is [].
		/// </field>
		dates: {get:function(){}, set:function(value){}},
		/// <field type="String" defaultValue="month">
		/// Specifies the navigation depth.
		/// Valid values are: 'month', 'year', 'decade', 'century'. Default value is "month".
		/// </field>
		/// <options>
		/// <option value="month">month</option>
		/// <option value="year">year</option>
		/// <option value="decade">decade</option>
		/// <option value="century">century</option>
		/// </options>
		depth: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Calendar._FooterConfiguration">
		/// Configuration options for the footer.
		/// </field>
		footer: {get:function(){}},
		/// <field type="Date" defaultValue="11/31/2099">
		/// Specifies the maximum date, which the calendar can show. Default value is Date(2099, 11, 31).
		/// </field>
		max: {get:function(){}, set:function(value){}},
		/// <field type="Date" defaultValue="0/1/1900">
		/// Specifies the minimum date, which the calendar can show. Default value is Date(1900, 0, 1).
		/// </field>
		min: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Calendar._MonthConfiguration">
		/// Templates for the cells rendered in the "month" view.
		/// </field>
		month: {get:function(){}},
		/// <field type="String" defaultValue="month">
		/// Gets or sets the current view.
		/// Valid values are: 'month', 'year', 'decade', 'century'. Default value is "month".
		/// </field>
		/// <options>
		/// <option value="month">month</option>
		/// <option value="year">year</option>
		/// <option value="decade">decade</option>
		/// <option value="century">century</option>
		/// </options>
		view: {get:function(){}, set:function(value){}},
		/// <field type="Date" defaultValue="null">
		/// Specifies the selected date. Default value is null.
		/// </field>
		value: {get:function(){}, set:function(value){}},
		/// <field type="Date" hidden="true">
		/// Returns the currently focused date.
		/// </field>
		current: {get:function(){}},
		navigate: function (value, view) {
			/// <summary>
			/// Navigates to the value in the specified view.
			/// View defaults to 'month'.
			/// Value defaults to today.
			/// </summary>
			/// <param name="value" type="Date" optional="true">The value to navigate to.</param>
			/// <param name="view" type="string" optional="true">The view to navigate to.</param>
},
		navigateDown: function (value) {
			/// <summary>
			/// Navigates with one step to a more specific period view.
			/// </summary>
			/// <param name="value" type="Date">The value to navigate to.</param>
},
		navigateToFuture: function () {
			/// <summary>
			/// Navigates to the next period (e.g. month, year, century, decade).
			/// </summary>
},
		navigateToPast: function () {
			/// <summary>
			/// Navigates to the previous period (e.g. month, year, century, decade).
			/// </summary>
},
		navigateUp: function (value) {
			/// <summary>
			/// Navigates with one step to a more general period view.
			/// </summary>
			/// <param name="value" type="Date" optional="true">The value to navigate to.</param>
},
		destroy: function (keepEvents) {
			/// <excludetoc />
			/// <summary>
			/// Destroys the widget and clears the content of the container element.
			/// Does not remove the container element from the DOM.
			/// </summary>
},
		});
	WinJS.Class.mix(RadCalendar, WinJS.Utilities.createEventProperties('navigate', 'change'));
	namespace('Telerik.UI', {
		RadCalendar: RadCalendar
	});
})(this, jQuery);
(function (global, $, undefined) {
	var RELATIVE = 'relative',
		HIDDEN = 'hidden',
		DIV = '<div/>',
		DISPLAY = 'display',
		THEAD = 'thead',
		transitions = kendo.support.transitions,
        transitionOrigin = transitions ? transitions.css + "transform-origin" : "",
		kendoPrototype = kendo.ui.Calendar.prototype,
        kendoNavigate = kendoPrototype.navigate,
		animationTo,
        animationGrid,
		toFocusedCell;
	kendoPrototype.navigate = function () {
		kendoNavigate.apply(this, arguments);
		if (animationTo && animationGrid) {
			animationTo.find('td').each(function (index) {
				if ($(this).hasClass('k-state-focused')) {
					// Transfer the focused cell state from the 'to' table to the grid.
					// This improves the animation, which had a flicker of the focused cell before.
					animationGrid.find('td').eq(index).addClass('k-state-focused');
					toFocusedCell = $(this).removeClass('k-state-focused');
				}
			});
		}
	};
	kendoPrototype._animate = function (options) {
		var that = this,
			from = options.from,
			to = options.to,
			active = that._active;
		if (that._cellsHeight) {
			// Sets the Calendar cells's height only if we have cached ones
			var height = that._view.name === "month" ? that._cellsHeight.realMonthHeight : that._cellsHeight.realMetaHeight;
			to.find("td .k-link").height(height);
			to.find("td:not(:has(.k-link))").height(height);
		}
		if (!from) {
			to.insertAfter(that.element[0].firstChild);
			that._bindTable(to);
		} else if (from.parent().data("animating")) {
			from.parent().kendoStop(true, true).remove();
			from.remove();
			to.insertAfter(that.element[0].firstChild);
			that._focusView(active);
		} else if (!from.is(":visible") || that.options.animation === false) {
			to.insertAfter(from);
			from.remove();
			that._focusView(active);
		} else {
			that[options.vertical ? "_vertical" : "_horizontal"](from, to, options.future);
		}
	};
	kendoPrototype._horizontal = function (from, to, future) {
		var that = this,
			active = that._active,
			horizontal = that.options.animation.horizontal,
			effects = horizontal.effects,
			// Use precise height otherwise the calendar header jumps with one pixel
			// at the start and end of the animation.
			viewHeight = from[0].getBoundingClientRect().height,
			header = from.find('thead')[0],
			headerHeight = header ? header.getBoundingClientRect().height : 0,
			animatedViewHeight = viewHeight - headerHeight,
			grid = animationGrid = $(from).clone().css({
				position: 'absolute',
				top: from.prev().outerHeight()
			});
		animationTo = to;
		grid.addClass("t-animation-grid");
		grid.find('a').css('visibility', HIDDEN);
		grid.find('th').css('background-color', that.element[0].currentStyle.backgroundColor);
		grid.find('.k-state-selected').removeClass('k-state-selected');
		grid.find('.k-state-focused').removeClass('k-state-focused');
		grid.find('.k-today').removeClass('k-today');
		if (effects && effects.indexOf('slideIn') != -1) {
			from.add(to).find('thead').css(DISPLAY, 'none');
			from.add(to).find('td').css({ borderColor: 'transparent' });
			from.wrap($(DIV).css({
					position: RELATIVE,
					height: (animatedViewHeight * 2)
				}))
				.parent().wrap($(DIV).css({
					overflow: HIDDEN,
					height: viewHeight
				}))
				.parent().after(grid);
			that._focusView(active, from);
			to[future ? 'insertAfter' : 'insertBefore'](from);
			// Set top after the to table has been added
			// otherwise the animation container is off with one (possibly more in some cases) pixels.
			from.parent().css({
				top: future ? headerHeight : headerHeight - animatedViewHeight
			});
			$.extend(horizontal, {
				effects: 'slideIn:' + (future ? 'down' : 'up'),
				complete: function () {
					from.add(to).find('td, th').css({
						borderColor: ''
					});
					from.add(to).find('thead').css(DISPLAY, '');
					from.remove();
					grid.remove();
					to.parent().unwrap();
					to.unwrap();
					that._focusView(active);
					that._oldTable = undefined;
					animationTo = null;
					animationGrid = null;
					if (toFocusedCell) {
						toFocusedCell.addClass('k-state-focused');
					}
				}
			});
			from.parent().kendoStop(true, true).kendoAnimate(horizontal);
		}
	};
	kendoPrototype._vertical = function (from, to) {
		var that = this,
			vertical = that.options.animation.vertical,
			effects = vertical.effects,
			active = that._active, //active state before from's blur
			position;
		if (effects && effects.indexOf("zoom") != -1) {
			to.css({
				position: "absolute",
				top: from.prev().outerHeight(),
				left: 0
			}).insertBefore(from);
			if (transitionOrigin) {
				position = (parseInt(from.width() / 2, 10)) + "px" + " " + (parseInt(from.height() / 2, 10) + "px");
				to.css(transitionOrigin, position);
			}
			from.kendoStop(true, true).kendoAnimate({
				effects: "fadeOut",
				duration: 367,
				complete: function() {
					from.remove();
					to.css({
						position: "static",
						top: 0,
						left: 0
					});
					that._focusView(active);
					that._oldTable = undefined;
				}
			});
			to.kendoStop(true, true).kendoAnimate(vertical);
		}
	};
	(function (originalFocusView) {
		originalFocusView = kendoPrototype._focusView;
		kendoPrototype._focusView = function () {
			var that = this;
			if (that._table.parent().data('animating')) {
				return;
			}
			originalFocusView.apply(that, arguments);
		};
	})();
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	var SWIPETRESHOLD = .2;
	var TouchSupport = WinJS.Class.define(function (calendar) {
		var that = this,
			widget = calendar._widget;
		widget.element
			.off('click.kendoCalendar')
			.off('mouseup.kendoCalendar');
		that._calendar = calendar;
		that._widget = widget;
		that._element = widget.element[0];
		that._initialize();
	}, {
		_calendar: null,
		_widget: null,
		_element: null,
		_srcElement: null,
		_gestureRecognizer: null,
		_isSwipeInProgress: false,
		_initialize: function () {
			var that = this;
			// Initialize gesture recognizer
			that._gestureRecognizer = new Windows.UI.Input.GestureRecognizer();
			// Configuring GestureRecognizer to detect manipulation translation, scaling + the tap gesture
			that._gestureRecognizer.gestureSettings =
				Windows.UI.Input.GestureSettings.tap |
				Windows.UI.Input.GestureSettings.manipulationTranslateY |
				Windows.UI.Input.GestureSettings.manipulationScale;
			// Turn off UI feedback for gestures (we'll still see UI feedback for PointerPoints)
			that._gestureRecognizer.showGestureFeedback = false;
			that._manipulationHandler = that._manipulationHandler.bind(that);
			that._manipulationCompleted = that._manipulationCompleted.bind(that);
			that._tappedHandler = that._tappedHandler.bind(that);
			// Register event listeners for the gestures that we just configured
			that._gestureRecognizer.addEventListener('manipulationstarted', that._manipulationHandler);
			that._gestureRecognizer.addEventListener('manipulationupdated', that._manipulationHandler);
			that._gestureRecognizer.addEventListener('manipulationcompleted', that._manipulationCompleted);
			that._gestureRecognizer.addEventListener('tapped', that._tappedHandler);
			that._processDown = that._processDown.bind(that);
			that._processMove = that._processMove.bind(that);
			that._processUp = that._processUp.bind(that);
			// Register event listeners for DOM pointer events, these are the
			// raw touch events we will be using to feed the gestureRecognizer
			that._element.addEventListener('MSPointerDown', that._processDown, false);
			that._element.addEventListener('MSPointerMove', that._processMove, false);
			that._element.addEventListener('MSPointerUp', that._processUp, false);
			that._element.addEventListener('MSPointerCancel', that._processUp, false);
		},
		destroy: function () {
			var that = this;
			that._element.removeEventListener('MSPointerDown', that._processDown, false);
			that._element.removeEventListener('MSPointerMove', that._processMove, false);
			that._element.removeEventListener('MSPointerUp', that._processUp, false);
			that._element.removeEventListener('MSPointerCancel', that._processUp, false);
			that._gestureRecognizer.removeEventListener('manipulationstarted', that._manipulationHandler);
			that._gestureRecognizer.removeEventListener('manipulationupdated', that._manipulationHandler);
			that._gestureRecognizer.removeEventListener('manipulationcompleted', that._manipulationCompleted);
			that._gestureRecognizer.removeEventListener('tapped', that._tappedHandler);
			that._calendar = null;
			that._widget = null;
			that._element = null;
			that._srcElement = null;
			that._gestureRecognizer = null;
		},
		_manipulationCompleted: function (e) {
			this._isSwipeInProgress = false;
		},
		_manipulationHandler: function (e) {
			if (e.delta) {
				var that = this,
					translationY = e.delta.translation.y,
					expansion = e.delta.expansion;
				if (expansion < -SWIPETRESHOLD) { // detect only pinch
					that._calendar.navigateUp(new Date());
				}
				else if (Math.abs(translationY) >= SWIPETRESHOLD && !that._isSwipeInProgress) { // swipe
					that._isSwipeInProgress = true;
					if (translationY < 0) {
						that._calendar.navigateToFuture();
					}
					else {
						that._calendar.navigateToPast();
					}
				}
				that._gestureRecognizer.completeGesture();
			}
		},
		_tappedHandler: function () {
			var that = this,
				element = that._srcElement,
				link = $(element).hasClass('k-link') && $(element).parent().is('td') ?
					element : $(element).parents('.k-calendar td > .k-link')[0];
			if (link) {
				that._calendar._cacheRefreshedProperties = true;
				that._widget._click($(link));
				that._widget._focusView(that._widget.options.focusOnNav !== false);
				that._calendar._cacheRefreshedProperties = false;
				if (that._calendar._hasCachedRefreshedPropeties) {
					that._calendar._reInitialize();
				}
			}
		},
		_processDown: function (e) {
			var that = this,
				pp = e.getCurrentPoint(that._element);
			that._srcElement = e.srcElement;
			// Abusing the calendar with > 2 contact points breaks the gesture recognizer,
			// so at least suppress the exceptions.
			try {
				that._gestureRecognizer.processDownEvent(pp);
			} catch (e) { }
			e.preventDefault();
		},
		_processMove: function (e) {
			var that = this,
				pps = e.getIntermediatePoints(that._element);
			// Abusing the calendar with > 2 contact points breaks the gesture recognizer,
			// so at least suppress the exceptions.
			try {
				that._gestureRecognizer.processMoveEvents(pps);
			} catch (e) { }
		},
		_processUp: function (e) {
			var that = this,
				pp = e.getCurrentPoint(that._element);
			// Abusing the calendar with > 2 contact points breaks the gesture recognizer,
			// so at least suppress the exceptions.
			try {
				that._gestureRecognizer.processUpEvent(pp);
			} catch (e) { }
		}
	});
	WinJS.Namespace.define('Telerik.UI.Calendar', {
		_TouchSupport: TouchSupport
	});
})(this, jQuery);(function (global, $, undefined) {
	var DATE = Date,
		keys = kendo.keys;
	function getToday() {
		var today = new DATE();
		return new DATE(today.getFullYear(), today.getMonth(), today.getDate());
	}
	function restrictValue(value, min, max) {
		var today = getToday();
		if (value) {
			today = new DATE(+value);
		}
		if (min > today) {
			today = new DATE(+min);
		} else if (max < today) {
			today = new DATE(+max);
		}
		return today;
	}
	kendo.ui.Calendar.prototype._move = function (e) {
		var that = this,
			options = that.options,
			key = e.keyCode,
			view = that._view,
			index = that._index,
			currentValue = new DATE(+that._current),
			isRtl = kendo.support.isRtl(that.wrapper),
			value, prevent, method, temp;
		if (e.target === that._table[0]) {
			that._active = true;
		}
		if (e.ctrlKey) {
			if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {
				that.navigateToFuture();
				prevent = true;
			} else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {
				that.navigateToPast();
				prevent = true;
			} else if (key == keys.UP) {
				that.navigateUp();
				prevent = true;
			} else if (key == keys.DOWN) {
				that._click($(that._cell[0].firstChild));
				prevent = true;
			}
		} else {
			if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {
				value = 1;
				prevent = true;
			} else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {
				value = -1;
				prevent = true;
			} else if (key == keys.UP) {
				// Original meta view has three columns,
				// whereas ours has two.
				//value = index === 0 ? -7 : -4;
				value = index === 0 ? -7 : -2;
				prevent = true;
			} else if (key == keys.DOWN) {
				// Original meta view has three columns,
				// whereas ours has two.
				//value = index === 0 ? 7 : 4;
				value = index === 0 ? 7 : 2;
				prevent = true;
			} else if (key == keys.ENTER) {
				that._click($(that._cell[0].firstChild));
				prevent = true;
			} else if (key == keys.HOME || key == keys.END) {
				method = key == keys.HOME ? "first" : "last";
				temp = view[method](currentValue);
				currentValue = new DATE(temp.getFullYear(), temp.getMonth(), temp.getDate(), currentValue.getHours(), currentValue.getMinutes(), currentValue.getSeconds(), currentValue.getMilliseconds());
				prevent = true;
			} else if (key == keys.PAGEUP) {
				prevent = true;
				that.navigateToPast();
			} else if (key == keys.PAGEDOWN) {
				prevent = true;
				that.navigateToFuture();
			}
			if (value || method) {
				if (!method) {
					view.setDate(currentValue, value);
				}
				that._focus(restrictValue(currentValue, options.min, options.max));
			}
		}
		if (prevent) {
			e.preventDefault();
		}
		return that._current;
	};
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
        util = Telerik.Utilities,
        RADIX = 10;
	/// <summary>
	/// A textbox providing text suggestions.
	/// </summary>
	/// <icon src="autocompletebox_html_12.png" width="12" height="12" />
	/// <icon src="autocompletebox_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadAutoCompleteBox"></span>]]></htmlSnippet>
	/// <event name="open">Fires when the drop-down list of RadAutoComplete is shown.</event>
	/// <event name="close">Fires when the drop-down list of RadAutoComplete is closed.</event>
	/// <event name="select">Fires when an item is selected from the drop-down list.</event>
	/// <event name="change">Fires when the value of the RadAutoComplete changes.</event>
	/// <event name="databinding">Fires when the control is about to databind.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <part name="autoCompleteBox" class="k-autocomplete">The RadAutoCompleteBox widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadAutoCompleteBox = derive(ui.ListBase, function (element, options) {
		/// <summary>
		/// Creates a new RadAutoCompleteBox control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="String">
		/// Gets or sets the value of the autocomplete.
		/// </field>
		text: {get:function(){}, set:function(value){}},
		/// <field type="String" defaultValue="startswith">
		/// Gets or sets the type of filtration to use when filtering the data items. Possible values include "startswith", "endswith", "contains", "eq", "neq". Default value is "startswith".
		/// </field>
		filter: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true" defaultValue="1">
		/// Gets or sets the minimum amount of characters that should be typed before RadAutoCompleteBox queries the dataSource.
		/// </field>
		minLength: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the string that appears in the textbox when it has no value.
		/// </field>
		placeholder: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether RadAutoCompleteBox should automatically auto-type the rest of text.
		/// </field>
		autoSuggest: {get:function(){}, set:function(value){}},
		suggest: function (value) {
			/// <summary>
			/// Forces a suggestion onto the text of the AutoComplete.
			/// </summary>
			/// <param name="value" type="String">Characters to force a suggestion.</param>
},
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets a value indicating whether RadAutoCompleteBox should automatically highlight the first shown item. Default value is false.
		/// </field>
		highlightFirst: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the separator for completion. Empty by default, allowing for only one completion.
		/// </field>
		separator: {get:function(){}, set:function(value){}},
		});
	namespace("Telerik.UI", {
		RadAutoCompleteBox: RadAutoCompleteBox
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
(function (global, $, undefined) {
	"use strict";
	var define = WinJS.Class.define,
		derive = WinJS.Class.derive,
		mix = WinJS.Class.mix,
		namespace = WinJS.Namespace.define,
		utilities = WinJS.Utilities,
		util = Telerik.Utilities,
		priv = util.setPrivate,
		root = document.documentElement,
		setOptions = WinJS.UI.setOptions,
		executeTransition = WinJS.UI.executeTransition,
		nsName = "Telerik.UI.Behaviors",
		NS = namespace(nsName),
		Promise = WinJS.Promise,
		OBJECT = "object",
		STRING = "string",
		NUMBER = "number",
		NULL = null,
		POINTERDOWN = "MSPointerDown",
		POINTERMOVE = "MSPointerMove",
		POINTERUP = "MSPointerUp",
		POINTERCANCEL = "MSPointerCancel",
		//Drag events
		DRAGSTART = "dragstart",
		DRAG = "drag",
		DRAGEND = "dragend",
		DRAGCANCEL = "dragcancel",
		TRANSITIONEND = "transitionend",
		//DropTarget events
		DRAGENTER = "dragenter",
		DRAGLEAVE = "dragleave",
		DROP = "drop", //both a DropTarget and a Reorder event
		//Reorder events
		REORDER = "reorder",
		TRANSFORM = "transform",
		TIMING = "cubic-bezier(0.1, 0.9, 0.2, 1)",
		css = {
			dragged: "t-dragged",
			noscroll: "t-no-scroll"
		};
	namespace(nsName, {
		Behavior: define(function (options) {
			/// <summary>
			/// Base Behavior class.
			/// </summary>
			/// <param name="options" type="Object">The configuration options for this behavior.</param>
}, {
			dispose: function () {
				/// <summary>
				/// Override this method in a derived class and call to dispose the behavior.
				/// </summary>
}
		})
	});
	mix(NS.Behavior, Telerik.UI.Common.eventMixin);
	namespace(nsName, {
		Drag: derive(NS.Behavior, function (options) {
			/// <summary>
			/// Provides the ability to drag elements and drop them on predefined targets.
			/// </summary>
			/// <param name="options" type="Object">The configuration options for the drag behavior.</param>
}, {
			/// <field type="HTMLElement" domElement="true">Gets the DOM element, array of DOM elements or string selector that defines the draggable elements.</field>
			element: NULL,
			/// <field type="HTMLElement" domElement="true">Gets the DOM element, array of DOM elements or string selector that defines the handle through which dragging can start.</field>
			handle: NULL,
			/// <field type="String" canBeNull="true">Gets the axis along which dragging is allowed.</field>
			axis: NULL,
			/// <field type="HTMLElement" domElement="true">Gets the container that defines the draggable boundaries.</field>
			container: NULL,
			/// <field type="String">If defined, specifies a set of child items, where transformations will be applied to them instead of the parent draggable element.</field>
			transformSelector: "",
			/// <field type="Number">Gets the duration of the cancel transition. Set to 0 to disable the transition.</field>
			cancelTransition: 167,
			/// <field type="Number">Gets the timining function used in the cancel transition.</field>
			cancelTiming: TIMING,
			/// <field type="Array" elementType="Telerik.UI.Behaviors.DropTarget">An array of DropTarget instances specifying the allowes drop targets.</field>
			dropTargets: {get:function(){}, set:function(value){}},
			/// <field type="Number">Gets or sets the threshold delta after which drag starts.</field>
			threshold: 20,
			//read-only properties
			/// <field type="Boolean">Indicates whether the user is currently dragging the element.</field>
			dragging: {get:function(){}},
			/// <field type="HTMLElement" domElement="true">Gets the currently dragged DOM element.</field>
			dragged: {get:function(){}},
			/// <field type="Object">Gets the initial position of the dragged DOM element.</field>
			position: {get:function(){}},
			/// <field type="Object">Gets the position of the bounding container.</field>
			containerPosition: {get:function(){}},
			/// <field type="Object">Gets the offset of the pointer from the top left corner of the dragged element.</field>
			pointerOffset: {get:function(){}},
			/// <field type="Object">Gets the origin point from which dragging started.</field>
			origin: {get:function(){}},
			/// <field type="Object">Gets the coordinates of the last point to which the element was dragged.</field>
			coordinates: {get:function(){}},
			/// <field type="Function">A filter function that is provided the dragged element. A boolean return value must indicate whether the element can be dragged.</field>
			filter: function () {
},
			drag: function (e) {
},
			dispose: function () {
				/// <summary>
				/// Disposes the Drag behavior.
				/// </summary>
}
		})
	});
	mix(NS.Drag, utilities.createEventProperties(DRAGSTART, DRAG, DRAGEND, DRAGCANCEL, TRANSITIONEND));
	function collides(pos1, pos2) {
		var right1 = pos1.left + pos1.width,
			bottom1 = pos1.top + pos1.height,
			right2 = pos2.left + pos2.width,
			bottom2 = pos2.top + pos2.height;
		return !(bottom1 < pos2.top || pos1.top > bottom2 || right1 < pos2.left || pos1.left > right2);
	}
	namespace(nsName, {
		DropTarget: derive(NS.Behavior, function (element, options) {
			/// <summary>
			/// Represents a drop target in a drag behavior
			/// </summary>
			/// <param name="element" type="HTMLElement" domElement="true">The drop target element.</param>
			/// <param name="options" type="Object">The configuration options for this DropTarget.</param>
}, {
			/// <field type="HTMLElement" domElement="true">Gets the drop target element.</field>
			element: NULL,
			/// <field type="Boolean" defaultValue="true">			
			/// If set to false, uses the current pointer position to determine whether the drop target is hovered.
			/// By defaul, collision detection is used between the drop target and the dragged element to identify whether the 
			/// drop target is hovered.
			/// </field>
			detectBoundary: true,
			isOver: function (drag, e) {
				/// <summary>
				/// Gets a value indicating whether the currently dragged element is over this drop target.
				/// </summary>
				/// <param name="drag" type="Telerik.UI.Behaviors.Drag">The drag behavior instance.</param>
				/// <param name="e" type="DOMEvent">The DOM pointer event arguments.</param>
				/// <returns type="Boolean"></returns>
},
			pointerMove: function (drag, e) {
				/// <summary>
				/// Notifies this drop target of a pointer movement and fires any required events. Returns a boolean
				/// value indicating whether the pointer is currently over this drop target.
				/// </summary>
				/// <param name="drag" type="Telerik.UI.Behaviors.Drag">The drag behavior instance.</param>
				/// <param name="e" type="DOMEvent">The DOM pointer event arguments.</param>
				/// <returns type="Boolean"></returns>
},
			pointerUp: function (e, canceled) {
				/// <summary>
				/// Notifies this drop target of a pointer up action and fires any required events.
				/// </summary>
				/// <param name="e" type="DOMEvent">The DOM pointer event arguments.</param>
				/// <param name="canceled" type="Boolean">Indicates whether the pointer event was canceled.</param>
}
		})
	});
	mix(NS.DropTarget, utilities.createEventProperties(DRAGENTER, DRAGLEAVE, DROP));
	namespace(nsName, {
		Reorder: derive(NS.Behavior, function (options) {
}, {
			drag: NULL,
			container: NULL,
			handle: NULL,
			itemsSelector: "",
			transformSelector: "",
			threshold: 0.5,
			transitions: true,
			deferTimeout: 50,
			sensitivity: 3,
			transitionDuration: 167,
			transitionTiming: TIMING,
			dispose: function () {
				/// <summary>
				/// Disposes this reorder behavior.
				/// </summary>
}
		})
	});
	mix(NS.Reorder, utilities.createEventProperties(REORDER, DROP));
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI,
        util = Telerik.Utilities;
	/// <summary>
	/// An input control that allows selecting one of some predefined values from a drop-down or entering a custom value.
	/// </summary>
	/// <icon src="combobox_html_12.png" width="12" height="12" />
	/// <icon src="combobox_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadComboBox"></span>]]></htmlSnippet>
	/// <event name="open">Fires when the drop-down list of RadAutoComplete is shown.</event>
	/// <event name="close">Fires when the drop-down list of RadAutoComplete is closed.</event>
	/// <event name="select">Fires when an item is selected from the drop-down list.</event>
	/// <event name="change">Fires when the value of the RadAutoComplete changes.</event>
	/// <event name="databinding">Fires when the control is about to databind.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <part name="comboBox" class="k-combobox">The RadComboBox widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadComboBox = derive(ui.CascadingListBase, function (element, options) {
		/// <summary>
		/// Creates a new RadComboBox control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Number" integer="true">
		/// Gets or sets the zero-based index of the selected item.
		/// </field>
		index: {get:function(){}, set:function(value){}},
		/// <field type="String" defaultValue="none">
		/// Gets or sets the type of filtration to use when filtering the data items. Possible values include "startswith", "endswith", "contains", "eq"(equals), "neq"(does not equal). Default value is "none".
		/// </field>
		filter: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets or sets the minimum amount of characters that should be typed before RadComboBox queries the dataSource.
		/// </field>
		minLength: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the string that appears in the textbox when it has no value.
		/// </field>
		placeholder: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether RadComboBox should automatically auto-type the rest of text.
		/// </field>
		autoSuggest: {get:function(){}, set:function(value){}},
		open: function () {
			/// <summary>
			/// Opens the drop-down list.
			/// </summary>
},
		toggle: function (toggle) {
			/// <summary>
			/// Toggles the drop-down list between its open and closed state.
			/// </summary>
			/// <param name="toggle" type="Boolean">Optional. Specifies whether to open or close the drop-down list.</param>
},
		suggest: function (value) {
			/// <summary>
			/// Forces a suggestion onto the text of the combobox.
			/// </summary>
			/// <param name="value" type="String">Characters to force a suggestion.</param>
},
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether RadComboBox should automatically highlight the first shown item.
		/// </field>
		highlightFirst: {get:function(){}, set:function(value){}},
	});
	namespace("Telerik.UI", {
		RadComboBox: RadComboBox
	});
})(this, jQuery);(function (global, undefined) {
	"use strict";
	var kendo = global.kendo,
		deepExtend = kendo.deepExtend,
		registerTheme = kendo.dataviz.ui.registerTheme;
	var BLACK = "#000",
		GREY = "#808080",
		NONE = "none",
		OUTSIDE = "outside",
		OUTSIDEEND = "outsideEnd",
		SEGOE = "Segoe UI",
		SEMIBOLD = " Semibold",
		SEGOE11 = "11px " + SEGOE,
		SEGOE11SEMIBOLD = SEGOE11 + SEMIBOLD,
		SEGOE12 = "12px " + SEGOE,
		SEGOE12SEMIBOLD = SEGOE12 + SEMIBOLD,
		SEGOE14 = "14px " + SEGOE,
		SEGOE15 = "15px " + SEGOE,
		SEGOE30 = "30px " + SEGOE,
		//Chart colors
		BLACKCHARTTITLE = "#292929",
		BLACKAXISTITLE = BLACKCHARTTITLE,
		BLACKAXISLABEL = "#4B4B4B",
		BLACKLEGENDLABELS = BLACKAXISLABEL,
		BLACKRGBANOFILTER = "rgba(0, 0, 0, ",
		BLACK14PERCENT = BLACKRGBANOFILTER + "0.14)",
		BLACK35PERCENT = BLACKRGBANOFILTER + "0.35)",
		WHITERGBANOFILTER = "rgba(255, 255, 255, ",
		WHITE12PERCENT = WHITERGBANOFILTER + "0.12)",
		WHITE35PERCENT = WHITERGBANOFILTER + "0.35)",
		WHITE40PERCENT = WHITERGBANOFILTER + "0.4)",
		WHITE60PERCENT = WHITERGBANOFILTER + "0.6)",
		WHITE80PERCENT = WHITERGBANOFILTER + "0.8)",
		//Gauge colors
		//BLACKRGBANOFILTER = "rgba(0, 0, 0, ",
		BLACK60PERCENTFILTER = BLACKRGBANOFILTER + "0.6)",
		WHITE = "#fff",
		WHITE60PERCENTFILTER = WHITERGBANOFILTER + "0.6)";
	var chartBaseTheme = {
		title: {
			font: SEGOE30
		},
		axisDefaults: {
			title: {
				font: SEGOE11SEMIBOLD
			},
			labels: {
				font: SEGOE11
			},
			majorGridLines: {
				dashType: "dash"
			},
			crosshair: {
				color: GREY,
				tooltip: {
					font: SEGOE11,
					color: BLACK,
					background: WHITE,
					border: {
						color: GREY,
						width: 2
					}
				}
			}
		},
		categoryAxis: {
			justified: true,
			majorGridLines: {
				visible: false
			}
		},
		tooltip: {
			font: SEGOE14,
			color: BLACK,
			background: WHITE,
			border: {
				color: GREY,
				width: 2
			}
		},
		legend: {
			labels: {
				font: SEGOE11
			},
			inactiveItems: {
				labels: {
					color: "#919191"
				},
				markers: {
					color: "#919191"
				}
			}
		},
		seriesDefaults: {
			visible:true,
			overlay: {
				gradient: NONE
			},
			highlight: {
				visible: true
			},
			labels: {
				position: OUTSIDEEND,
				font: SEGOE12SEMIBOLD,
				background: "",
				color: ""
			},
			area: {
				opacity: 0.4,
				line: {
					width: 1,
					opacity: 1
				}
			},
			line: {
				width: 2
			},
			pie: {
				overlay: {
					gradient: "roundedBevel"
				}
			},
			candlestick: {
				//TODO: remove #ccc and use the current series color (by design) when kendo fix bug and allow this
				downColor: "#ccc",
				line: {
					color: "#ccc"
				}
			},
			ohlc: {
				highlight: {
					line: {
						width: 2
					}
				}
			},
			bullet: {
				gap: 1.5,
				spacing: 0.4,
				target: {
					color: "#ff0000"
				}
			},
			verticalBullet: {
				gap: 1.5,
				spacing: 0.4,
				target: {
					color: "#ff0000"
				}
			}
		},
		seriesColors: [
			"#1E98E4", "#FFC500", "#FF2A00", "#CACACA", "#434343",
			"#00FF9C", "#6D31FF", "#00B2A1", "#B9FF85", "#FF8000"
		]
	};
	var chartThemes = {
		dark: {
			title: {
				color: WHITE80PERCENT
			},
			legend: {
				labels: {
					color: WHITE40PERCENT
				}
			},
			axisDefaults: {
				title: {
					color: WHITE60PERCENT
				},
				labels: {
					color: WHITE40PERCENT
				},
				line: {
					color: WHITE35PERCENT
				},
				majorGridLines: {
					color: WHITE12PERCENT
				}
			},
			chartArea: {
				background: NONE
			},
			seriesDefaults: {
				labels: {
					color: "#CACACA"
				}
			}
		},
		light: {
			title: {
				color: BLACKCHARTTITLE
			},
			legend: {
				labels: {
					color: BLACKLEGENDLABELS
				}
			},
			axisDefaults: {
				title: {
					color: BLACKAXISTITLE
				},
				labels: {
					color: BLACKAXISLABEL
				},
				line: {
					color: BLACK35PERCENT
				},
				majorGridLines: {
					color: BLACK14PERCENT
				}
			},
			seriesDefaults: {
				labels: {
					color: "#545454"
				}
			}
		}
	};
	var gaugeBaseTheme = {
		scale: {
			labels: {
				font: SEGOE15,
				position: OUTSIDE
			}
		}
	};
	var gaugeThemes = {
		light: {
			scale: {
				labels: {
					color: BLACK60PERCENTFILTER
				},
				majorTicks: {
					color: BLACK60PERCENTFILTER
				},
				minorTicks: {
					color: BLACK60PERCENTFILTER
				},
				rangePlaceholderColor: BLACK60PERCENTFILTER
			}
		},
		dark: {
			pointer: {
				color: WHITE
			},
			scale: {
				labels: {
					color: WHITE60PERCENTFILTER
				},
				majorTicks: {
					color: WHITE60PERCENTFILTER
				},
				minorTicks: {
					color: WHITE60PERCENTFILTER
				},
				rangePlaceholderColor: WHITE60PERCENTFILTER
			}
		}
	};
	registerTheme("dark", {
		chart: deepExtend({}, chartBaseTheme, chartThemes.dark),
		gauge: deepExtend({}, gaugeBaseTheme, gaugeThemes.dark)
	});
	registerTheme("light", {
		chart: deepExtend({}, chartBaseTheme, chartThemes.light),
		gauge: deepExtend({}, gaugeBaseTheme, gaugeThemes.light)
	});
})(this);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
    "use strict";
    var win = WinJS,
        derive = win.Class.derive,
        namespace = win.Namespace.define,
        ui = Telerik.UI;
        /// <summary>
        /// Allows selection of a single value from a list in a dropdown.
        /// </summary>
        /// <icon src="dropdownlist_html_12.png" width="12" height="12" />
        /// <icon src="dropdownlist_html_16.png" width="16" height="16" />
        /// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadDropDownList"></span>]]></htmlSnippet>
        /// <event name="open">Fires when the drop-down list of RadAutoComplete is shown.</event>
        /// <event name="close">Fires when the drop-down list of RadAutoComplete is closed.</event>
        /// <event name="select">Fires when an item is selected from the drop-down list.</event>
        /// <event name="change">Fires when the value of the RadAutoComplete changes.</event>
        /// <event name="databinding">Fires when the control is about to databind.</event>
        /// <event name="databound">Fires immediately after the control is databound.</event>
        /// <part name="dropDownList" class="k-dropdown">The RadDropDownList widget.</part>
        /// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
        /// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
    var RadDropDownList = derive(ui.CascadingListBase, function (element, options) {
        /// <summary>
        /// Creates a new RadDropDownList control.
        /// </summary>
        /// <param name="element" domElement="true">The HTML element this control is associated with.</param>
    	/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
        /// <field type="Number" integer="true">
        /// Gets or sets the zero-based index of the selected item.
        /// </field>
        index: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the text of the default empty item.
        /// </field>
        optionLabel: {get:function(){}, set:function(value){}},
        open: function () {
        	/// <summary>
        	/// Opens the drop-down list.
            /// </summary>
},        
        search: function (word) {
        	/// <summary>
        	/// Selects the item that starts with the specified substring.
        	/// </summary>
            /// <param name="word" type="String">The value to search by.</param>
},
        toggle: function (toggle) {
        	/// <summary>
        	/// Toggles the drop-down list between its open and closed state.
        	/// </summary>
            /// <param name="toggle" type="Boolean">Optional. Specifies whether to open or close the drop-down list.</param>
}
    });
    namespace("Telerik.UI", {
        RadDropDownList: RadDropDownList
    });
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	var win = WinJS,
		derive = win.Class.derive,
		utilities = win.Utilities,
		namespace = win.Namespace.define,
		ui = Telerik.UI,
		util = Telerik.Utilities,
		nsName = "Telerik.UI.Gauge",
		ns = namespace(nsName),
		common = ui.Common,
		NUMBER = "number",
		FUNCTION = "function",
		config = ui._ControlConfiguration,
		defineProperty = config.defineProperty,
		getMapping = config.getMapping,
		priv = util.setPrivate;
	namespace(nsName, {
		_LabelConfiguration: derive(ui._ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the gauge labels.
			/// </summary>
}, {
			/// <field type="String">
			/// Gets or sets the background of the gauge labels. Any valid CSS color string is accepted.
			/// </field>
			background: defineProperty("background", ""),
			/// <field type="Telerik.UI.Common._BorderConfiguration">
			/// Gets the border settings of the gauge labels.
			/// </field>
			border: {get:function(){}},
			/// <field type="String">
			/// Gets or sets the text color of the gauge labels. Any valid CSS color string is accepted.
			/// </field>
			color: defineProperty("color", ""),
			/// <field type="String">
			/// Gets or sets the font style of the gauge labels.
			/// </field>
			font: defineProperty("font", ""),
			/// <field type="String">
			/// Gets or sets the format of the gauge labels.
			/// </field>
			format: defineProperty("format", ""),
			/// <field type="Telerik.UI.Common._BoxConfiguration">
			/// Retrieves the margin settings of the gauge labels.
			/// </field>
			margin: {get:function(){}},
			/// <field type="Telerik.UI.Common._BoxConfiguration">
			/// Retrieves the padding settings of the gauge labels.
			/// </field>
			padding: {get:function(){}},
			/// <field type="String" defaultValue="outside">
			/// Gets or sets the labels position. Valid values are "inside" and "outside". Default value is "outside".
			/// </field>
			/// <options>
			/// <option value="inside">inside</option>
			/// <option value="outside">outside</option>
			/// </options>
			position: defineProperty("position", "outside"),
			/// <field type="String">
			/// Gets or sets the template of the gauge labels.
			/// </field>
			template: defineProperty("template", ""),
			/// <field type="Boolean" defaultValue="true">
			/// Gets or sets the visibility of the gauge labels. Default value is true.
			/// </field>
			visible: defineProperty("visible", true)
		}),
		_TickConfiguration: derive(ui._ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the gauge ticks.
			/// </summary>
}, {
			/// <field type="String">
			/// Gets or sets the color of the ticks. Any valid CSS color string is accepted.
			/// </field>
			color: defineProperty("color", ""),
			/// <field type="Number">
			/// Gets or sets the tick length in pixels.
			/// </field>
			size: defineProperty("size", 0),
			/// <field type="Boolean" defaultValue="true">
			/// Gets or sets the visibility of the ticks. Default is true.
			/// </field>
			visible: defineProperty("visible", true),
			/// <field type="Number" defaultValue="0.5">
			/// Gets or sets the width of the ticks in pixels. Default is 0.5
			/// </field>
			width: defineProperty("width", 0.5)
		}),
		_RadialPointerConfiguration: derive(ui._ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the radial gauge pointer.
			/// </summary>
}, {
			/// <field type="Number">
			/// Gets or sets the size of the value in percents (from 0 to 1).
			/// </field>
			capSize: defineProperty("capSize", 0.5),
			/// <field type="String">
			/// Gets or sets the color of the pointer cap. Any valid CSS color string is accepted.
			/// </field>
			capColor: defineProperty("capColor", ""),
			/// <field type="String">
			/// Gets or sets the color of the pointer. Any valid CSS color string is accepted.
			/// </field>
			color: defineProperty("color", "")
		}),
		_LinearPointerTrackConfiguration: derive(ui._ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the linear pointer track.
			/// </summary>
}, {
			/// <field type="Telerik.UI.Common._BorderConfiguration">
			/// Gets the border settings for the gauge pointer track.
			/// </field>
			border: {get:function(){}},
			/// <field type="String">
			/// Gets or sets the color of the pointer track. Any valid CSS color string is accepted.
			/// </field>
			color: defineProperty("color", ""),
			/// <field type="Number" defaultValue="1">
			/// Gets or sets the opacity of the pointer track.
			/// </field>
			opacity: defineProperty("opacity", 1),
			/// <field type="Number">
			/// Gets or sets the size of the pointer track.
			/// </field>
			size: defineProperty("size", 0),
			/// <field type="Boolean">
			/// Gets or sets the visibility of the pointer track.
			/// </field>
			visible: defineProperty("visible", false)
		}),
		_LinearPointerConfiguration: derive(ui._ControlConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the linear gauge pointer.
			/// </summary>
}, {
			/// <field type="Telerik.UI.Common._BorderConfiguration">
			/// Gets the border settings for the gauge pointer.
			/// </field>
			border: {get:function(){}},
			/// <field type="String">
			/// Gets or sets the color of pointer. Any valid CSS color string is accepted.
			/// </field>
			color: defineProperty("color", ""),
			/// <field type="Telerik.UI.Common._BoxConfiguration">
			/// Gets the margin settings of the pointer.
			/// </field>
			margin: {get:function(){}},
			/// <field type="Number" defaultValue="1">
			/// Gets or sets the opacity of the pointer. Default value is 1.
			/// </field>
			opacity: defineProperty("opacity", 1),
			/// <field type="String" defaultValue="barIndicator">
			/// Gets or sets the shape of the pointer. Possible values are "barIndicator" and "arrow". Default is "barIndicator."
			/// </field>
			/// <options>
			/// <option value="barIndicator">barIndicator</option>
			/// <option value="arrow">arrow</option>
			/// </options>
			shape: defineProperty("shape", "barIndicator"),
			/// <field type="Number">
			/// Gets or sets the size of the pointer.
			/// </field>
			size: defineProperty("size", 0),
			/// <field type="Telerik.UI.Gauge._LinearPointerTrackConfiguration">
			/// Retrieves the settings for the pointer track.
			/// </field>
			track: {get:function(){}}
		}),
		_LineConfiguration: derive(ui.Common._BorderConfiguration, function (owner, parentMapping, defaults) {
			/// <summary>
			/// For internal usage only. Describes the properties of the linear gauge scale line.
			/// </summary>
}, {
			/// <field type="Boolean" defaultValue="true">
			/// Gets or sets the visibility of the gauge scale line. Default value is true.
			/// </field>
			visible: defineProperty("visible", true)
		})
	});
	/// <excludetoc />
	var RadGauge = derive(ui.WidgetWrapper, function (element, options) {
		/// <summary>
		/// A base class for the RadLinearGauge and RadRadialGauge controls.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="String" defaultValue="dark">
		/// Gets or sets the name of the visual theme applied to the gauge.
		/// </field>
		theme: defineProperty("theme", "dark"),
		/// <field type="String">
		/// Gets or sets the background of the gauge area. Any valid CSS color string is accepted.
		/// </field>
		background: defineProperty("background", "none"),
		/// <field type="Telerik.UI.Common._BorderConfiguration">
		/// Gets the border settings of the gauge area.
		/// </field>
		border: {get:function(){}},
		/// <field type="Number">
		/// Gets the width of the gauge area.
		/// </field>
		width: defineProperty("width", function () {
			var widget = this._widget,
				width = widget.options.gaugeArea.width;
			if (typeof width !== NUMBER) {
				width = widget.wrapper.find("svg").width();
			}
			return width;
		}),
		/// <field type="Number" defaultValue="200">
		/// Gets the height of the gauge area.
		/// </field>
		height: defineProperty("height", function () {
			var widget = this._widget,
				height = widget.options.gaugeArea.height;
			if (typeof height !== NUMBER) {
				height = widget.wrapper.find("svg").height();
			}
			return height;
		}),
		/// <field type="Telerik.UI.Common._BoxConfiguration" value="{left: 5, right: 5, top: 5, bottom: 5}">
		/// Gets the margin of the gauge area.
		/// </field>
		margin: {get:function(){}},
		/// <field type="Boolean" defaultValue="true">
		/// Enables or disables transitions. True by default.
		/// </field>
		transitions: defineProperty("transitions", true),
		/// <field type="Telerik.UI.Gauge._LabelConfiguration">
		/// Retrieves the label settings for this gauge.
		/// </field>
		labels: {get:function(){}},
		/// <field type="Number">
		/// Gets or sets the interval between minor divisions
		/// </field>
		minorUnit: defineProperty("minorUnit", function () {
			var that = this,
				minorUnit = parseFloat(that._widget.options.scale.minorUnit);
			return isNaN(minorUnit) ? that._getDefaultScale().options.minorUnit : minorUnit;
		}),
		/// <field type="Number">
		/// Gets or sets the interval between major divisions
		/// </field>
		majorUnit: defineProperty("majorUnit", function () {
			var that = this,
				majorUnit = parseFloat(that._widget.options.scale.majorUnit);
			return isNaN(majorUnit) ? that._getDefaultScale().options.majorUnit : majorUnit;
		}),
		/// <field type="Number">
		/// Gets or sets the minimum value of the scale.
		/// </field>
		min: defineProperty("min", 0),
		/// <field type="Number">
		/// Gets or sets the maximum value of the scale.
		/// </field>
		max: defineProperty("max", function () {
			var that = this,
				max = parseFloat(that._widget.options.scale.max),
				defaultMax = that instanceof ui.RadLinearGauge ? 50 : 100;
			return isNaN(max) ? defaultMax : max;
		}),
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets a value indicating whether the axis direction is reversed.
		/// Reversed axis values increase from right to left and from top to bottom.
		/// </field>
		reverse: defineProperty("reverse", false),
		/// <field type="Telerik.UI.Gauge._TickConfiguration">
		/// Retrieves the major tick settings.
		/// </field>
		majorTicks: {get:function(){}},
		/// <field type="Telerik.UI.Gauge._TickConfiguration">
		/// Retrieves the minor tick settings.
		/// </field>
		minorTicks: {get:function(){}},
		/// <field type="Array" elementType="{ from:0, to: 100, color: 'navy', opacity: 1 }" defaultValue="[]">
		/// Gets or sets the array of ranges that will appear on the scale.
		/// </field>
		ranges: defineProperty("ranges", []),
		/// <field type="Number">
		/// The width of the ranges that will appear on the scale. If the property is not set, it will be calculated to 10% of the scale radius.
		/// </field>
		rangeSize: defineProperty("rangeSize", null),
		/// <field type="String" devaultValue="rgba(255, 255, 255, 0.6)">
		/// Gets or sets the default color for the ranges.
		/// </field>
		rangePlaceholderColor: defineProperty("rangePlaceholderColor", "rgba(255, 255, 255, 0.6)"),
		/// <field type="String" hidden="true">
		/// Gets the SVG representation of the current gauge.
		/// </field>
		svg: {get:function(){}},
		/// <field type="Number">
		/// Gets or sets the current gauge value.
		/// </field>
		value: {get:function(){}, set:function(value){}},
		redraw: function () {
			/// <summary>
			/// Redraws the gauge.
			/// </summary>
}
	});
	/// <summary>
	/// A linear gauge control that can visualize a value on a linear scale.
	/// </summary>
	/// <icon src="gauge_html_12.png" width="12" height="12" />
	/// <icon src="gauge_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadLinearGauge"></div>]]></htmlSnippet>
	/// <part name="linearGauge" class="k-gauge">The RadLinearGauge widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadLinearGauge = derive(RadGauge, function (element, options) {
		/// <summary>
		/// Creates a new RadLinearGauge control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets a value indicating whether the scale labels and ticks are mirrored. Mirroring the
		/// scale will render the labels and ticks on the opposite side.
		/// </field>
		mirror: defineProperty("mirror", false),
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the position of the gauge.
		/// </field>
		vertical: defineProperty("vertical", true),
		/// <field type="Telerik.UI.Gauge._LineConfiguration">
		/// Provides access to the line options of the linear gauge.
		/// </field>
		line: {get:function(){}},
		/// <field type="Telerik.UI.Gauge._LinearPointerConfiguration">
		/// Retrieves the gauge pointer settings.
		/// </field>
		pointer: {get:function(){}}
	});
	/// <summary>
	/// A radial gauge control that can visualize a value on a radial scale.
	/// </summary>
	/// <icon src="gauge_html_12.png" width="12" height="12" />
	/// <icon src="gauge_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadRadialGauge"></div>]]></htmlSnippet>
	/// <part name="radialGauge" class="k-gauge">The RadRadialGauge widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadRadialGauge = derive(RadGauge, function (element, options) {
		/// <summary>
		/// Creates a new RadRadialGauge control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Number" defaultValue="4.75">
		/// The distance of ranges from the edge of the scale. If this property is not set, it will be calculated to 5% of the scale radius.
		/// </field>
		rangeDistance: defineProperty("rangeDistance", function () {
			return this._widget._model._plotArea.scale.options.rangeDistance;
		}),
		/// <field type="Number" defaultValue="-30">
		/// Gets or sets the start angle of the gauge scale. The scale is rendered clockwise,
		/// where a start angle of 0 is equal to 180 degrees in the polar coordinate system.
		/// </field>
		startAngle: defineProperty("startAngle", function () {
			return this._widget._model._plotArea.scale.options.startAngle;
		}),
		/// <field type="Number" defaultValue="210">
		/// Gets or sets the end angle of the gauge scale. The scale is rendered clockwise,
		/// where a start angle of 0 is equal to 180 degrees in the polar coordinate system.
		/// </field>
		endAngle: defineProperty("endAngle", function () {
			return this._widget._model._plotArea.scale.options.endAngle;
		}),
		/// <field type="Telerik.UI.Gauge._RadialPointerConfiguration">
		/// Retrieves the gauge pointer settings.
		/// </field>
		pointer: {get:function(){}}
	});
	namespace("Telerik.UI", {
		RadRadialGauge: RadRadialGauge,
		RadLinearGauge: RadLinearGauge
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var derive = WinJS.Class.derive,
		namespace = WinJS.Namespace.define,
		ui = Telerik.UI;
	namespace("Telerik.UI.HubTile", {
		/// <enum />
		MosaicFlipMode: {
			individual: "individual",
			row: "row"
		}
	});
	/// <event name="tileinvoked" bubbles="true">Raised when the user taps or clicks on the hub tile.</event>
	var _HubTileBase = derive(ui.Control, function (element, options) {
}, {
		/// <field type="Number" integer="true" defaultValue="3">
		/// Gets or sets the UpdateInterval in seconds. This interval determines how often the tile will
		/// update its visual states when it is not frozen.
		/// </field>
		updateInterval: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true" defaultValue="0">
		/// Gets or sets the update deviation in seconds. The number will be used to make each update happen at random intervals
		/// from (updateInterval-updateDeviation) to (updateInterval+updateDeviation). For example, with updateInterval=5 and updateDeviation=2,
		/// the update can happen at any time between 3 and 7 seconds.
		/// </field>
		updateDeviation: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="false">
		/// Gets or sets the IsFrozen property. Freezing a hub tile means that it will cease to
		/// periodically update itself. For example when it is offscreen.
		/// </field>
		isFrozen: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the Title.
		/// </field>
		title: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets a value determining what the backside of the tile will render.
		/// The value can be either a string with HTML or a DOM element. If the value is an element, its inner HTML will be used as the template.
		/// </field>
		backContentTemplate: {get:function(){}, set:function(value){}},
		flip: function () {
			/// <summary>
			/// Flips the tile between its front and back sides. This method is called automatically if the tile update interval is set and the tile is not frozen.
			/// Note that the tile will not flip if there is another animation in progress (e.g. slide) or if the back tile has no content.
			/// </summary>
}
		});
	WinJS.Class.mix(_HubTileBase, WinJS.Utilities.createEventProperties("tileinvoked"));
	/// <summary>
	/// RadHubTile is the most commonly used tile. It consists of a title, an icon, a notification count and an optional message.
	/// </summary>
	/// <icon src="hubtile_html_12.png" width="12" height="12" />
	/// <icon src="hubtile_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadHubTile"></div>]]></htmlSnippet>
	/// <part name="hubtile" class="t-hubControl">The RadHubTile widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadHubTile = derive(_HubTileBase, function (element, options) {
		/// <summary>
		/// Creates a new RadHubTile control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Number" integer="true">
		/// Gets or sets the notification count of the tile.
		/// </field>
		notification: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the source of the tile image.
		/// </field>
		imageSource: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the message of the tile.
		/// </field>
		message: {get:function(){}, set:function(value){}}
	});
	/// <summary>
	/// RadCustomHubTile defines a hub tile with custom front and back contents and a swivel transition between them.
	/// </summary>
	/// <icon src="hubtile_html_12.png" width="12" height="12" />
	/// <icon src="hubtile_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadCustomHubTile"></div>]]></htmlSnippet>
	/// <part name="hubtile" class="t-hubCustom">The RadCustomHubTile widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadCustomHubTile = derive(_HubTileBase, function (element, options) {
		/// <summary>
		/// Creates a new RadCustomHubTile control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="String">
		/// Gets or sets a value determining what the backside of the tile will render.
		/// The value can be either a string with HTML or a DOM element. If the value is an element, its inner HTML will be used as the template.
		/// </field>
		frontContentTemplate: {get:function(){}, set:function(value){}}
	});
	/// <summary>
	/// RadPictureRotatorHubTile defines a hub tile that shows a set of pictures.
	/// </summary>
	/// <icon src="hubtile_html_12.png" width="12" height="12" />
	/// <icon src="hubtile_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadPictureRotatorHubTile"></div>]]></htmlSnippet>
	/// <part name="hubtile" class="t-hubPictureRotator">The RadPictureRotatorHubTile widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadPictureRotatorHubTile = derive(_HubTileBase, function (element, options) {
		/// <summary>
		/// Creates a new RadPictureRotatorHubTile control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Array">
		/// Gets or sets the images displayed by the tile.
		/// </field>
		picturesSource: {get:function(){}, set:function(value){}},
	});
	/// <summary>
	/// RadSlideHubTile defines a hub tile that can show content and a picture and has a slide animation between the two.
	/// </summary>
	/// <icon src="hubtile_html_12.png" width="12" height="12" />
	/// <icon src="hubtile_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadSlideHubTile"></div>]]></htmlSnippet>
	/// <part name="hubtile" class="t-hubSlide">The RadSlideHubTile widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadSlideHubTile = derive(_HubTileBase, function (element, options) {
		/// <summary>
		/// Creates a new RadSlideHubTile control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Object">
		/// Gets or sets a value determining what the upper part of the slide tile will render.
		/// The value can be either a HTML string or a DOM element. If the value is an element, its inner HTML will be used as the template.
		/// You can also just use the URI of an image (string that starts with 'http://', 'https://', 'ms-appx://', '/', or 'data:image/png;base64,' for relative ones) to display the image
		/// </field>
		topContentTemplate: {get:function(){}, set:function(value){}},
		/// <field type="Object">
		/// Gets or sets a value determining what the lower part of the slide tile will render.
		/// The value can be either a string with HTML or a DOM element. If the value is an element, its inner HTML will be used as the template.
		/// You can also just use the URI of an image (string that starts with 'http://', 'https://', 'ms-appx://', '/', or 'data:image/png;base64,' for relative ones) to display the image
		/// </field>
		bottomContentTemplate: {get:function(){}, set:function(value){}},
	});
	/// <summary>
	/// RadMosaicHubTile is a grid of nine small tiles that individually flip themselves to display a random image. 
	/// Every now and then, an image is selected and is displayed magnified by four tiles in one of the corners the mosaic tile.
	/// </summary>
	/// <icon src="hubtile_html_12.png" width="12" height="12" />
	/// <icon src="hubtile_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadMosaicHubTile"></div>]]></htmlSnippet>
	/// <part name="hubtile" class="t-hubMosaic">The RadMosaicHubTile widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadMosaicHubTile = derive(RadPictureRotatorHubTile, function (element, options) {
		/// <summary>
		/// Creates a new RadMosaicHubTile control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Telerik.UI.HubTile.MosaicFlipMode" defaultValue="individual">
		/// Determines how the cells of the mosaic tile are flipped.
		/// </field>
		flipMode: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets a custom CSS class that will be applied to each mosaic tile.
		/// </field>
		tileCssClass: {get:function(){}, set:function(value){}}
	});
	namespace("Telerik.UI", {
		_HubTileBase: _HubTileBase,
		RadHubTile: RadHubTile,
		RadCustomHubTile: RadCustomHubTile,
		RadPictureRotatorHubTile: RadPictureRotatorHubTile,
		RadSlideHubTile: RadSlideHubTile,
		RadMosaicHubTile: RadMosaicHubTile
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var NOTIFICATION_CLASS = "t-notification",
		FADING_CLASS = "t-fading",
		PRESSED_CLASS = "t-pressed",
		JNS = ".RadNotification",
		CONTENT_TEMPLATE = "<a href='#' draggable='false'></a><img /><h3></h3><p></p>";
	/// <excludetoc />
	/// <summary>
	/// For internal use only.
	/// </summary>
	var RadNotification = WinJS.Class.derive(Telerik.UI.Control, function (element, options) {
		/// <summary>
		/// A charting control that can visualize different chart types.
		/// </summary>
		var that = this;
		if (!element) {
			element = document.createElement("div");
			document.body.appendChild(element);
			that._autoElement = true;
		}
		WinJS.UI.setOptions(that, options);
		Telerik.UI.Control.call(that, element, options);		
		MSApp.execUnsafeLocalFunction(function () {
			$(element).empty()
				.addClass(NOTIFICATION_CLASS)
				.append(CONTENT_TEMPLATE)
				.on("click" + JNS, that._click.bind(that))
				.on("mouseenter" + JNS, that._timeout.bind(that, false))
				.on("mouseleave" + JNS, that._timeout.bind(that, true))
				.on("MSPointerDown" + JNS, that._pressed.bind(that))					
				.find("img").attr("src", that.iconUrl)[that.iconUrl ? "show" : "hide"]().end()
				.find("h3").text(that.title).end()
				.find("p").html(that.text);
		});
		if (that.visible) {
			//show initially if the option is specified
			that.show();
		}
	}, {
		visible: false,
		title: "",
		text: "",
		iconUrl: "",
		url: "",
		autoDispose: false,
		showDuration: 5000,
		fadeDuration: 3000,
		show: function () {
			var that = this;
			if (that._disposed) return;
			RadNotification.register(that);
			that.element.style.display = "";
			that.element.style.right = "0";
			that.visible = true;
			that._timeout(true);
		}, 
		hide: function (withFade) {
			var that = this,
				right = "-" + WinJS.Utilities.getTotalWidth(that.element) + "px";
			if (that._disposed) return;
			that._timeout(false);
			that.visible = false;			
			if (withFade) {
				that.element.classList.add(FADING_CLASS);
				that._fadeTimeout = setTimeout(function () {
					RadNotification.unregister(that);
					that.element.style.display = "none";
					that.element.style.right = right;
					that.element.classList.remove(FADING_CLASS);
					if (that.autoDispose) that.dispose();
				}, that.fadeDuration);
			}
			else {
				that.element.style.right = right;
				setTimeout(function () {
					RadNotification.unregister(that);
					if (that.autoDispose) that.dispose();
				}, 300);
			}
		},
		_click: function (e) {
			var that = this,
				prevented;
			if (that._canceled) return;
			if (e.target.tagName === "A") {
				//close button clicked
				that.hide();
			}
			else {
				prevented = that.dispatchEvent("click", { domEvent: e });
				if (!prevented && that.url) {
					Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(that.url));					
				}
				if (!prevented) {
					that.hide();
				}
			}
		},
		_timeout: function (on) {
			var that = this;
			//clear all timeouts in all cases
			clearTimeout(that._hideTimeout);
			clearTimeout(that._fadeTimeout);
			that.element.classList.remove(FADING_CLASS);
			if (on) {				
				that._hideTimeout = setTimeout(function () {
					that.hide(true);
				}, that.showDuration);
			}
		},
		_pressed: function (e) {
			var that = this,
				root = $(document.documentElement),
				evt = e.originalEvent,
				isPointer = evt.pointerType === evt.MSPOINTER_TYPE_TOUCH;
			if (e.target.tagName === "A") return;
			that.element.classList.add(PRESSED_CLASS);
			root.one("MSPointerUp", that._released.bind(that));
			that._canceled = false;
			if (isPointer) {
				root.on("MSPointerMove" + JNS, that._moved.bind(that))
				that._start = {
					x: evt.pageX,
					y: evt.pageY
				}
				that._prevX = evt.pageX;
			}
		},
		_moved: function (e) {
			var that = this,
				element = that.element,
				evt = e.originalEvent,
				start = that._start || { x: evt.pageX, y: evt.pageY },				
				threshold = 20,
				deltaX = evt.pageX - start.x,				
				toCancel = Math.abs(deltaX) >= threshold || Math.abs(start.y - evt.pageY) >= threshold;
			that._timeout(false);			
			if (toCancel) {
				that._canceled = true;
				element.classList.remove(PRESSED_CLASS);
			}
			if (that._canceled) {
				element.style.transition = "none";
				element.style.right = -Math.max(0, deltaX) + "px";
			}
			that._velo = evt.pageX - that._prevX;
			that._prevX = evt.pageX;
		},
		_released: function (e) {
			var that = this,
				element = that.element,
				delta = Math.abs(parseInt(element.style.right));
			element.classList.remove(PRESSED_CLASS);
			element.style.transition = "";
			if (delta >= element.offsetWidth / 2 || that._velo > 10) {
				that._canceled = true;
				that.hide();
			}
			else {				
				element.style.right = "0";
				that._timeout(true);
			}
			delete that._start;
			delete that._prevX;
			delete that._velo;
			$(document.documentElement).off("MSPointerMove" + JNS);			
		},
		dispose: function () {
			//dispose the control and remove its element if it was created automatically
			var that = this,
				elem = $(that.element).off(JNS);
			that._disposed = true;
			if (that._autoElement) {
				elem.remove();
			}
			else {
				elem.empty().removeClass(NOTIFICATION_CLASS).css({
					top: "",
					right: "",
					display: ""
				});
			}
		}
	}, {
		_instances: [],
		register: function (instance) {
			var arr = RadNotification._instances,
				slot = arr.length;
			if (arr.indexOf(instance) > -1) return;
			for (var i = 0; i < arr.length; i++) {
				if (!arr[i]) {
					slot = i;
					break;
				}
			}
			arr[slot] = instance;
			if (arr[slot - 1]) {
				var prev = arr[slot - 1],
					top = parseFloat(prev.element.currentStyle.top);
				if (isNaN(top)) top = 0;
				//position the control under currently open notifications				
				instance.element.style.top = top + WinJS.Utilities.getTotalHeight(prev.element) + 10 + "px";
			}
		},
		unregister: function (instance) {
			var arr = RadNotification._instances,
				index = arr.indexOf(instance);
			if (index > -1) {
				arr[index] = null;
				if (index === arr.length - 1) {
					arr.pop();
				}
				instance.element.style.top = "";
			}
		},
	});
	WinJS.Class.mix(RadNotification, WinJS.Utilities.createEventProperties("click"));
	WinJS.Namespace.define("Telerik.UI", {
		RadNotification: RadNotification
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
/// <reference path="/kendo/js/kendo.winjs.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		derive = win.Class.derive,
		mix = win.Class.mix,
		namespace = win.Namespace.define,
		utilities = win.Utilities,
		util = Telerik.Utilities,
		ui = Telerik.UI,
		cul = Telerik.Culture,
		BOOLEAN = "boolean",
		NUMBER = "number",
		NULL = null,
		RADIX = 10,
		CONTAINERCSSCLASS = "t-numericbox",
		DISABLEPANZOOMCSSCLASS = "t-disablePanZoom",
		INTERACTIVECSSCLASS = "win-interactive",
		UPARROWSELECTOR = ".k-icon.k-i-arrow-n",
		DOWNARROWSELECTOR = ".k-icon.k-i-arrow-s";
	/// <summary>
	/// A textbox control for numeric input.
	/// </summary>
	/// <icon src="numericbox_html_12.png" width="12" height="12" />
	/// <icon src="numericbox_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadNumericBox"></span>]]></htmlSnippet>
	/// <event name="change">Fires when the value of RadNumericBox changes.</event>
	/// <event name="spin">Fires when any of the increment/decrement buttons is clicked.</event>
	/// <part name="numericBox" class="k-numerictextbox">The RadNumericBox widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadNumericBox = derive(ui.WidgetWrapper, function (element, options) {
		/// <summary>
		/// Creates a new RadNumericBox control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Number" integer="true">
		/// Gets or sets how long you have to drag (in px) before spin happens. Default is 1.
		/// </field>
		sensitivity: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets mousewheel option.
		/// </field>
		wheel: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets swipe option.
		/// </field>
		swipe: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets the enabled state of the control.
		/// </field>
		enabled: {get:function(){}, set:function(value){}},
		/// <field type="Number" mayBeNull="true">
		/// Gets or sets the current numeric value.
		/// </field>
		value: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets or sets the number precision. If not set precision defined by current culture is returned.
		/// </field>
		decimals: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the format of the number. Any valid number format is allowed.
		/// </field>
		format: {get:function(){}, set:function(value){}},
		/// <field type="Number" mayBeNull="true">
		/// Gets or sets the smallest value the user can enter.
		/// </field>
		min: {get:function(){}, set:function(value){}},
		/// <field type="Number" mayBeNull="true">
		/// Gets or sets the largest value the user can enter.
		/// </field>
		max: {get:function(){}, set:function(value){}},
		/// <field type="Number">
		/// Gets or sets the increment/decrement step.
		/// </field>
		step: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the text displayed when the input is empty.
		/// </field>
		placeholder: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the text of tooltip on the increment button.
		/// </field>
		incrementTooltip: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the text of tooltip on the decrement button.
		/// </field>
		decrementTooltip: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets current culture of the control.
		/// The format is BCP-47 language tag with language and region for example: en-US, fr-FR
		/// </field>
		culture: {get:function(){}, set:function(value){}}
	});
	mix(RadNumericBox, utilities.createEventProperties("change", "spin"));
	namespace("Telerik.UI", {
		RadNumericBox: RadNumericBox
	});
	// HACK: Override arrows code to workaround a bug in Blend. After Blend guys fix it, remove this code
	var ns = ".kendoNumericTextBox",
		MOUSELEAVE = "mouseleave" + ns,
		MOUSEUP = "touchcancel" + ns + " " + "touchend" + ns + " mouseup" + ns + " " + MOUSELEAVE,
		SELECTED = "k-state-selected";
	function buttonHtml(className, text) {
		return '<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-' + className + '" title="' + text + '">' + text + '</span></span>';
	}
	kendo.ui.NumericTextBox.prototype._arrows = function () {
		var that = this, arrows, options = that.options, spinners = options.spinners, element = that.element;
		arrows = element.siblings(".k-icon");
		if (!arrows[0]) {
			//WinJS: modify so jquery does not use a documentfragment. Fixes a bug in Blend.
			arrows = $(buttonHtml("n", options.upArrowText)).insertAfter(element);
			$(buttonHtml("s", options.downArrowText)).insertAfter(arrows);
			arrows = element.siblings(".k-link");
			arrows.wrapAll('<span class="k-select"/>');
		}
		//WinJS: use userevents object instead of the elements directly (fixes problem where spin continues after mouseup)
		//arrows.on(MOUSEUP, function () {
		//	clearTimeout(that._spinning);
		//	arrows.removeClass(SELECTED);
		//});
		if (!spinners) {
			arrows.parent().toggle(spinners);
			that._inputWrapper.addClass("k-expand-padding");
		}
		that._upArrow = arrows.eq(0);
		that._upArrowEventHandler = new kendo.UserEvents(that._upArrow);
		that._downArrow = arrows.eq(1);
		that._downArrowEventHandler = new kendo.UserEvents(that._downArrow);
		//WinJS: use userevents object instead of the elements directly (fixes problem where spin continues after mouseup)
		var endHandler = function endCancelTapHandler() {
			clearTimeout(that._spinning);
			arrows.removeClass(SELECTED);
		}
		that._upArrowEventHandler.bind(["tap", "end", "cancel"], endHandler);
		that._downArrowEventHandler.bind(["tap", "end", "cancel"], endHandler);
	};
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var ui = Telerik.UI,
        define = WinJS.Class.define,
        derive = WinJS.Class.derive,
        mix = WinJS.Class.mix,
        namespace = WinJS.Namespace.define,
        nsName = "Telerik.UI.Pagination",
        createEventProperties = WinJS.Utilities.createEventProperties,
        util = Telerik.Utilities,
        priv = util.setPrivate,
        addClass = WinJS.Utilities.addClass,
        removeClass = WinJS.Utilities.removeClass,
        setOptions = WinJS.UI.setOptions,
        unsafe = MSApp.execUnsafeLocalFunction,
        loc = Telerik.Localization._strings,
		DataSource = Telerik.Data.DataSource,
        css = {
        	container: "t-pagination",
        	button: "t-button",
        	prev: "t-prev",
        	next: "t-next",
        	thumbnails: "t-thumbnails",
        	defaultTemplate: "t-default",
        	customTemplate: "t-custom",
        	label: "t-label",
        	item: "t-item",
        	selected: "t-selected",
        	afterSelected: "t-after-selected",
        	disabled: "t-disabled"
        },
        NULL = null,
        RADIX = 10,
        STRING = "string",
        FUNCTION = "function",
        ARRAY = "array",
        CHANGE = "change",
        SELECTIONCHANGED = "selectionchanged",
        CLICK = "click";
	/// <summary>
	/// Displays a simple list of items. For internal use only.
	/// </summary>
	/// <event name="selectionchanged">Fires when the value of the control changes.</event>
	/// <excludetoc />
	var _ListView = derive(ui.Control, function (element, options) {
		/// <summary>
		/// Displays a simple list of items. For internal use only.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
		/// <field type="Telerik.Data.DataSource">
		/// Gets or sets the data source of the control.
		/// </field>
		dataSource: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets or sets the selected index.
		/// </field>
		selectedIndex: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Pagination._ListViewItem">
		/// Gets or sets the selected item.
		/// </field>
		selectedItem: {get:function(){}, set:function(value){}},
		/// <field type="Array" elementType="Telerik.UI.Pagination._ListViewItem">
		/// Gets the array of items in the list view.
		/// </field>
		items: {get:function(){}},
		/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
		/// Gets or sets the template for list items.
		/// </field>
		itemTemplate: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets the enabled state of the control.
		/// </field>
		enabled: {get:function(){}, set:function(value){}},
		/// <field type="Boolean">
		/// Gets or sets whether scroll transitions are enabled.
		/// </field>
		transitions: true,
		refresh: function () {
			/// <summary>
			/// Reloads the data and refreshes the items in the list view.
			/// </summary>
},
		});
	mix(_ListView, createEventProperties(SELECTIONCHANGED));
	/// <excludetoc />
	var _ListViewItem = derive(ui.Control, function (element, options) {
		/// <summary>
		/// Represents an item in a list view. For internal use only.
		/// </summary>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
		/// <field type="Telerik.UI.Pagination._ListView">
		/// Gets the owner ListView instance.
		/// </field>
		owner: NULL,
		/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
		/// Gets or sets the template used to render the HTML for this item.
		/// </field>
		template: NULL,
		/// <field type="Object">
		/// Gets or sets the data item that is passed to the template for rendering the HTML for this item.
		/// </field>
		dataItem: NULL,
		/// <field type="Number" integer="true">
		/// Gets or sets the index of this item in the collection of items in the owner ListView.
		/// </field>
		index: -1,
		/// <field type="Boolean">
		/// Gets or sets whether this item is selected.
		/// </field>
		selected: false,
		render: function () {
			/// <summary>
			/// Renders the HTML for this item based on the specified template and data item.
			/// </summary>
},
		dispose: function () {
			/// <summary>
			/// Removes the rendered HTML and clears any item data.
			/// </summary>
}
	});
	mix(_ListViewItem, createEventProperties(CLICK));
	var PageProvider = define(function () {
		/// <summary>
		/// Base page provider class.
		/// </summary>
}, {
		/// <field type="Number" integer="true">
		/// Gets or sets the index of the currently selected item.
		/// </field>
		currentIndex: -1,
		/// <field type="Number" integer="true">
		/// Gets the number of pages.
		/// </field>
		pageCount: 0,
		/// <field type="Object">
		/// Gets the data source for the thumbnails.
		/// </field>
		dataSource: NULL,
		previous: function () {
			/// <summary>
			/// Navigates to the previous item.
			/// </summary>
},
		next: function () {
			/// <summary>
			/// Navigates to the next item.
			/// </summary>
},
		dispose: function () {
			/// <summary>
			/// Disposes the provider.
			/// </summary>
}
	});
	mix(PageProvider, Telerik.UI.Common.eventMixin, createEventProperties("change"));
	var FlipViewPageProvider = derive(PageProvider, function (flipView) {
		/// <summary>
		/// Represents a page provider that can be attached to a WinJS.UI.FlipView control.
		/// </summary>
		/// <param name="flipView" type="WinJS.UI.FlipView">The FlipView control instance to attach to.</param>
}, {
		/// <field type="WinJS.UI.FlipView">
		/// Gets the FlipView instance attached to this provider.
		/// </field>
		flipView: NULL,
		/// <field type="Number" integer="true">
		/// Gets or sets the index of the currently selected item.
		/// </field>
		currentIndex: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets the number of pages available in the FlipView.
		/// </field>
		pageCount: {get:function(){}},
		/// <field type="Object">
		/// Gets the data source for the thumbnails.
		/// </field>
		dataSource: {get:function(){}},
		previous: function () {
			/// <summary>
			/// Navigates to the previous item in the FlipView.
			/// </summary>
},
		next: function () {
			/// <summary>
			/// Navigates to the next item in the FlipView.
			/// </summary>
},
		dispose: function () {
			/// <summary>
			/// Detaches registered event handlers from the target FlipView and disposes this provider object.
			/// </summary>
},
		});
	var _PageIndexLabel = derive(ui.Control, function (element, options) {
		/// <summary>
		/// Label control inside Telerik.UI.RadPagination. For internal use only.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object">The initialization options for this control.</param>
}, {
		/// <field type="Number" integer="true" hidden="true">
		/// Gets or sets the current index.
		/// </field>
		currentIndex: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the numeric format of the current index value.
		/// </field>
		currentIndexFormat: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true" hidden="true">
		/// Gets or sets the total item count.
		/// </field>
		itemCount: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the numeric format of the item count value.
		/// </field>
		itemCountFormat: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the separator string between the current item and the item count.
		/// </field>
		separator: {get:function(){}, set:function(value){}},
		/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
		/// Gets or sets the template used to render the label. The template provides the "page", "count" and "separator" parameters.
		/// </field>
		template: {get:function(){}, set:function(value){}},
		});
	/// <summary>
	/// A navigation control that tracks the current position within a pageable container like WinJS.UI.FlipView.
	/// </summary>
	/// <icon src="pagination_html_12.png" width="12" height="12" />
	/// <icon src="pagination_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadPagination"></div>]]></htmlSnippet>
	/// <part name="prevButton" class="t-prev">The previous button.</part>
	/// <part name="nextButton" class="t-next">The next button.</part>
	/// <part name="thumbnails" class="t-thumbnails">The thumbnails list.</part>
	/// <part name="label" class="t-label">The label.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadPagination = derive(ui.Control, function (element, options) {
		/// <summary>
		/// A navigation control that tracks the current position within a pageable container like WinJS.UI.FlipView.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Object" potentialValueSelector="[data-win-control]">
		/// Gets or sets the page provider control that RadPagination will navigate.
		/// </field>
		pageProvider: {get:function(){}, set:function(value){}},
		/// <field type="Telerik.UI.Pagination._ListView" hidden="true">
		/// Gets the thumbnails list for this control.
		/// </field>
		thumbnails: {get:function(){}},
		/// <field type="Telerik.UI.Pagination._PageIndexLabel">
		/// Gets the thumbnails list for this control.
		/// </field>
		label: {get:function(){}},
		/// <field type="Object" potentialValueSelector="[data-win-control='WinJS.Binding.Template']">
		/// Gets or sets the template used for rendering thumbnail items. Accepts any of: WinJS.BindingTemplate instance
		/// or an HTML element hosting a template; a function returning an HTML string or a DOM element; an HTML string
		/// with binding expressions defining the template.
		/// </field>
		itemTemplate: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Indicates whether the control displays previous and next buttons for navigation.
		/// </field>
		showButtons: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Indicates whether the control displays thumbnails for navigation.
		/// </field>
		showThumbnails: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Indicates whether the control displays a label.
		/// </field>
		showLabel: {get:function(){}, set:function(value){}},
		/// <field type="Boolean" defaultValue="true">
		/// Gets or sets the enabled state of the control.
		/// </field>
		enabled: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets or sets the index of the currently selected item.
		/// </field>
		currentIndex: {get:function(){}, set:function(value){}},
		previous: function () {
			/// <summary>
			/// Navigates to the previous item.
			/// </summary>
},
		next: function () {
			/// <summary>
			/// Navigates to the next item
			/// </summary>
},
		}, {
		_pageableTypes: [],
		_pageProviders: [],
		defaultItemTemplate: "<div class=" + css.item + "></div>",
		defaultLabelTemplate: "<span>#=page#</span><span>#=separator#</span><span>#=count#</span>",
		registerPageProvider: function (controlConstructor, providerConstructor) {
			/// <summary>
			/// Registers a custom page provider class for particular pageable control.
			/// </summary>
			/// <param name="controlConstructor" type="Function">The pageable control constructor for which a page provider is registered.</param>
			/// <param name="providerConstructor" type="Function">The custom page provider constructor that needs to derive from Telerik.UI.Pagination.PageProvider.</param>
			var that = this,
                types = that._pageableTypes,
                providers = that._pageProviders;
			if (typeof controlConstructor !== FUNCTION) {
				throw new Telerik.Error("Telerik.UI.RadPagination.PageableControlIsInvalid", loc.pageableControlIsInvalid);
			}
			if (!(typeof providerConstructor === FUNCTION && providerConstructor.prototype instanceof PageProvider)) {
				throw new Telerik.Error("Telerik.UI.RadPagination.PageProviderIsInvalid", loc.pageProviderIsInvalid);
			}
			var index = types.indexOf(controlConstructor);
			if (index < 0) {
				index = types.length;
				types[index] = controlConstructor;
			}
			providers[index] = providerConstructor;
		},
		getPageProvider: function (controlConstructor) {
			/// <summary>
			/// Retrieves the page provider registered for the specified control constructor.
			/// </summary>
			/// <param name="controlConstructor" type="Function">The pageable control constructor for which a page provider is registered.</param>
			/// <returns type="Telerik.UI.Pagination.PageProvider"></returns>
			var that = this,
                types = that._pageableTypes,
                providers = that._pageProviders;
			if (typeof controlConstructor !== FUNCTION) {
				throw new Telerik.Error("Telerik.UI.RadPagination.PageableControlIsInvalid", loc.pageableControlIsInvalid);
			}
			return providers[types.indexOf(controlConstructor)];
		}
	});
	// Register supported providers.
	RadPagination.registerPageProvider(WinJS.UI.FlipView, FlipViewPageProvider);
	namespace("Telerik.UI", {
		RadPagination: RadPagination
	});
	namespace(nsName, {
		_ListView: _ListView,
		_ListViewItem: _ListViewItem,
		_PageIndexLabel: _PageIndexLabel,
		PageProvider: PageProvider,
		FlipViewPageProvider: FlipViewPageProvider
	});
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
    "use strict";
    var win = WinJS,
        derive = win.Class.derive,
        mix = win.Class.mix,
        namespace = win.Namespace.define,
        utilities = win.Utilities,
        telerik = Telerik,
        ui = telerik.UI,
        util = telerik.Utilities,
        config = ui._ControlConfiguration,
        defineProperty = config.defineProperty,
        getMapping = config.getMapping,
		templateValidator = util._validators.stringOrUnifiedTemplate,
        NULL = null,
        FUNCTION = "function",
        DRAGHANDLESELECTOR = ".k-slider-track .k-draghandle",
        INCREASEARROWSELECTOR = ".k-icon.k-i-arrow-e",
        DECREASEARROWSELECTOR = ".k-icon.k-i-arrow-w",
        CONTAINERCSSCLASS = "t-slider",
        INTERACTIVECSSCLASS = "win-interactive";
    namespace("Telerik.UI.Slider", {
        _TooltipConfiguration: derive(config, function (owner, parentMapping, defaults, onchange) {
        	/// <summary>
            /// For internal usage only. Describes the properties of the slider tooltip.
        	/// </summary>
}, {
            /// <field type="Boolean" defaultValue="true">
            /// Gets or sets the enabled state of the slider tooltip.
            /// </field>
            enabled: defineProperty("enabled", true),
            /// <field type="String" defaultValue="{0}">
            /// Gets or sets the format of the slider tooltip. If a tooltip template is set,
            /// the value of this property will be ignored and the template will be used instead.
            /// </field>
            format: defineProperty("format", "{0}"),
            /// <field type="String">
            /// Gets or sets the template string that will be used for the content of the slider tooltip.
            /// A non-empty value for this property overrides the tooltip format when the tooltip is shown.
            /// </field>
            template: defineProperty("template", "")
        })
    });
        /// <excludetoc />
    var SliderBase = derive(ui.WidgetWrapper, function (element, options) {
        /// <summary>
        /// A base class for the RadRangeSlider and RadSlider controls.
        /// </summary>
        /// <param name="element" domElement="true">The HTML element this control is associated with.</param>
        /// <param name="options" type="Object">The initialization options for this control.</param>
}, {
    	//when dragging, the slider tooltip gets behind the ticks tooltips. this code temporarily
		//removes any tick tooltips while dragging and restores them on pointer up.
        /// <field type="Boolean">
        /// Gets or sets the enabled state of the control.
        /// </field>
        enabled: {get:function(){}, set:function(value){}},
        /// <field type="Number" integer="true">
        /// Gets or sets the delta with which the value changes when the user presses
        /// PageUp or PageDown (the drag handle must be focused).
        /// </field>
        largeStep: {get:function(){}, set:function(value){}},
        /// <field type="Number" integer="true">
        /// Gets or sets the small step value of the slider. The slider value will change when
        /// the end user (1) clicks on the increase/decrease buttons, (2) presses the arrow keys
        /// (the drag handle must be focused), or (3) drags the drag handle.
        /// </field>
        smallStep: {get:function(){}, set:function(value){}},
        /// <field type="Number">
        /// Gets or sets the minimum value of the slider.
        /// </field>
        min: {get:function(){}, set:function(value){}},
        /// <field type="Number">
        /// Gets or sets the maximum value of the slider.
        /// </field>
        max: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the orientation of the slider. Allowed values are "horizontal" or "vertical".
        /// Default value is "horizontal".
        /// </field>
        /// <options>
        /// <option value="horizontal">horizontal</option>
        /// <option value="vertical">vertical</option>
        /// </options>
        orientation: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the location of the tick marks in the slider. The available options are
        /// "minorOutside", "minorMajorOutside", "inside" and "none". Default value is "minorMajorOutside".
        /// </field>
        /// <options>
        /// <option value="minorMajorOutside">minorMajorOutside</option>
        /// <option value="minorOutside">minorOutside</option>
        /// <option value="inside">inside</option>
        /// <option value="none">none</option>
        /// </options> 
        tickPlacement: {get:function(){}, set:function(value){}},
        /// <field type="Telerik.UI.Slider._TooltipConfiguration">
        /// Gets the configuration settings for the slider tooltip.
        /// </field>
        tooltip: {get:function(){}}
    });
    mix(SliderBase, utilities.createEventProperties("change", "slide"));
        /// <summary>
        /// A slider control for selecting values.
        /// </summary>
        /// <icon src="slider_html_12.png" width="12" height="12" />
        /// <icon src="slider_html_16.png" width="16" height="16" />
        /// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadSlider"></div>]]></htmlSnippet>
        /// <event name="change">Fires when the value of the slider is changed.</event>
        /// <event name="slide">Fires when the slide handle has moved.</event>
        /// <part name="slider" class="k-slider">The RadSlider widget.</part>
        /// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
        /// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
    var RadSlider = derive(SliderBase, function (element, options) {
        /// <summary>
        /// Creates a new RadSlider control.
        /// </summary>
        /// <param name="element" domElement="true">The HTML element this control is associated with.</param>
    	/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
        /// <field type="Number">
        /// Gets or sets the value of the slider.
        /// </field>
        value: {get:function(){}, set:function(value){}},
        /// <field type="Boolean">
        /// Gets or sets whether the increase and decrease buttons should be shown.
        /// </field>
        showButtons: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the tooltip of the increase button.
        /// </field>
        increaseButtonTooltip: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the tooltip of the decrease button.
        /// </field>
        decreaseButtonTooltip: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the tooltip of the drag handle.
        /// </field>
        dragHandleTooltip: {get:function(){}, set:function(value){}}
    });
        /// <summary>
        /// A slider control for selecting a range of values.
        /// </summary>
        /// <icon src="slider_html_12.png" width="12" height="12" />
        /// <icon src="slider_html_16.png" width="16" height="16" />
        /// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadRangeSlider"></div>]]></htmlSnippet>
        /// <event name="change">Fires when the value of the slider is changed.</event>
        /// <event name="slide">Fires when a slide handle has moved.</event>
        /// <part name="rangeSlider" class="k-slider">The RadRangeSlider widget.</part>
        /// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
        /// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
        /// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
    var RadRangeSlider = derive(SliderBase, function (element, options) {
        /// <summary>
        /// Creates a new RadRangeSlider control.
        /// </summary>
        /// <param name="element" domElement="true">The HTML element this control is associated with.</param>
    	/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
        /// <field type="String">
        /// Gets or sets the tooltip of the left drag handle.
        /// </field>
        leftDragHandleTooltip: {get:function(){}, set:function(value){}},
        /// <field type="String">
        /// Gets or sets the tooltip of the right drag handle.
        /// </field>
        rightDragHandleTooltip: {get:function(){}, set:function(value){}},
        /// <field type="Array" elementType="Number">
        /// Gets or sets the start and end selection values of the range slider as an array of 2 elements.
        /// </field>
        values: {get:function(){}, set:function(value){}},
        /// <field type="Number">
        /// Gets or sets the starting value of the current range selection.
        /// </field>
        selectionStart: {get:function(){}, set:function(value){}},
        /// <field type="Number">
        /// Gets or sets the end value of the current range selection.
        /// </field>
        selectionEnd: {get:function(){}, set:function(value){}}
    });
    kendo.ui.RangeSlider.prototype._setZIndex = function (type) {
        this.wrapper.find(".k-draghandle").each(function (index) {
            $(this).css("z-index", type == "firstHandle" ? 2 - index : 1 + index);
        });
    }
    namespace("Telerik.UI", {
        RadSlider: RadSlider,
        RadRangeSlider: RadRangeSlider
    });
})(this, jQuery);/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
/// <reference path="/js/listbase.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		derive = win.Class.derive,
		namespace = win.Namespace.define,
		ui = Telerik.UI,
		util = Telerik.Utilities,
		NOOP = function () { };
	function defineTemplateProperty(name) {
		return {
			get: function () {
				var tmpl = this._widget.options[name];
				return tmpl && tmpl._originalTemplate ? tmpl._originalTemplate : tmpl;
			},
			set: function (value) {
				var that = this,
                    widget = that._widget,
                    current = widget.options[name],
                    wrapped = util.getTemplate(value, true);
				if (current && current._originalTemplate) {
					current = current._originalTemplate;
				}
				if (wrapped !== undefined && value !== current) {
					widget.options[name] = wrapped;
					widget._template();
					//enfore rebinding of the widget to the data
					that.dataSource = that.dataSource;
				}
			}
		}
	}
	/// <summary>
	/// A multiple token input providing text suggestions.
	/// </summary>
	/// <icon src="tokeninput_html_12.png" width="12" height="12" />
	/// <icon src="tokeninput_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<span data-win-control="Telerik.UI.RadTokenInput"></span>]]></htmlSnippet>
	/// <event name="open">Fires when the drop-down list of RadAutoComplete is shown.</event>
	/// <event name="close">Fires when the drop-down list of RadAutoComplete is closed.</event>
	/// <event name="select">Fires when an item is selected from the drop-down list.</event>
	/// <event name="change">Fires when the value of the RadAutoComplete changes.</event>
	/// <event name="databinding">Fires when the control is about to databind.</event>
	/// <event name="databound">Fires immediately after the control is databound.</event>
	/// <part name="tokenInput" class="k-multiselect">The RadTokenInput widget.</part>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/common.css" shared="true" />
	/// <resource type="css" src="///Telerik.UI/css/dark.css" shared="true" />
	var RadTokenInput = derive(ui.ListBase, function (element, options) {
		/// <summary>
		/// Creates a new RadTokenInput control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Array">
		/// Gets or sets the value of the control. Accepts both an array and a single value.
		/// </field>
		value: {get:function(){}, set:function(value){}},
		/// <excludetoc />
		text: {get:function(){}, set:function(value){}},		
		/// <excludetoc />
		template: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the template to be used for rendering the items in the list.
		/// </field>
		itemTemplate: defineTemplateProperty("itemTemplate"),
		/// <field type="String">
		/// Gets or sets the template to be used for rendering the selected tags.
		/// </field>
		tagTemplate: defineTemplateProperty("tagTemplate"),
		/// <field type="Boolean">
		/// Gets or sets a value indicating whether RadComboBox should automatically highlight the first shown item.
		/// </field>
		highlightFirst: {get:function(){}, set:function(value){}},
		/// <field type="String" defaultValue="none">
		/// Gets or sets the type of filtration to use when filtering the data items. Possible values include "startswith", "endswith", "contains", "eq"(equals), "neq"(does not equal). Default value is "none".
		/// </field>
		filter: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true">
		/// Gets or sets the minimum amount of characters that should be typed before RadComboBox queries the dataSource.
		/// </field>
		minLength: {get:function(){}, set:function(value){}},
		/// <field type="String">
		/// Gets or sets the string that appears in the textbox when it has no value.
		/// </field>
		placeholder: {get:function(){}, set:function(value){}},
		/// <field type="Number" integer="true" defaultValue="null">
		/// Gets or sets the maximum number of selected items in the control.
		/// </field>
		maxSelectedItems: {get:function(){}, set:function(value){}},
		open: function () {
			/// <summary>
			/// Opens the drop-down list.
			/// </summary>
},
		toggle: function (toggle) {
			/// <summary>
			/// Toggles the drop-down list between its open and closed state.
			/// </summary>
			/// <param name="toggle" type="Boolean">Optional. Specifies whether to open or close the drop-down list.</param>
},
		select: function (li) {
			/// <summary>
			/// Selects an item from the control's drop-down list.
			/// </summary>
			/// <param name="li" type="HTMLElement" domElement="true">The list item element to select.</param>
},
		dataItems: function () {
			/// <summary>
			/// Returns an array of data records corresponding to the selected items in the control.
			/// </summary>
			/// <returns type="Array"></returns>
}
	});
	namespace("Telerik.UI", {
		RadTokenInput: RadTokenInput
	});
})(this, jQuery);//if you change the name of this function, remember to update buildscripts as well
function showTrialMessage() {
    var sessionState = WinJS.Application.sessionState,
		magic = sessionState.telerikControlsInternal,
		title = "RadControls for Windows 8 Trial",
		url = "http://www.telerik.com/purchase/individual-windows-8.aspx?utm_source=trial&utm_medium=web&utm_campaign=Windows8",
		text = "To get access to the latest updates across <br /> the Windows 8 suite and Telerik's dedicated <br /> support please purchase a commercial license now.",
		imgSrc = 'data:image/png;base64,' +
            'iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2' +
            'FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA7FJREFUeNrEVklPFEEUrmqaQXFJ' +
            'cImIaIJIIuISwQ1RXNFEIyaaGOPJf+DvMVy8eTPRRA9IFIXgQlSQg+KOSgwwCo' +
            'oMMNMz7fe6v4IeZZhGMuElX151dVW9pd5SeiyeVIa0+pf0DB9gFliKs4uAQszF' +
            'wCcjtuWqEGSHFpo+Z4SqAtuaAJtQcyR7DmvXAMVAHvAVGALcSSe1CrxI+/P51E' +
            '2sTmnh2vsezM+zZL1KJFOyTtshrS3CxGXwjeJO4KocRkGXsLZqRlWnD3kFgU0Q' +
            'PiazMm2FsFTW7ROhPKcdeMd/e4DKEGdsBmo5lqBKhXF1KUQf4rgfuE+rlwNHGG' +
            'hyxzeUH2CefjBL3L0MOAbIddTD6h5YPeAkU7adxc3iyjrP1Uo5QCvvVugwsI7j' +
            'VkTzg5m0hjAx7jxjpA5Cb9p5ViKbq8uNi6DMa7DOKS/4bpb936lQJpI9Hzk+AJ' +
            'SpLHe82HOT9vJUXPgIGOe/o+I+eqYZ1g5nOgSulX8PGeVLwA/C6kIr4FIrvUao' +
            'amArP16CdXPtTmAH17wBnoeIE1nzguMaYJsRnAgWBVajSiojd/uBa0yELuW4B/' +
            'idTSqsnqCSxshyi5qfBC5oPwhKGaWdNF8SvoquF3oGROmZWkb3rIQAkwKznZ+S' +
            'Ed0Wq4zweuA4cI4L3gId2ldMBO8KzHdxX4kIjzteNcok1FzbFk51AL3G1S3AFy' +
            'qwCdgNcTEGRYyldS+wUgRqP5f7ubeBeZqJ1tIzokBUghTp5Fi8zwRmr9PFBcAJ' +
            'IAL0AfdoXYWnkK9clJrLvUukNsDqCKyzAtDM4RqcvZ4x1A6hfaZJmL74GWijBd' +
            'IMGrDhNvhTuqqEeSiufk9vVNNDtVj7g4Fm6o/DwlPP70+BOuAJdgIdpcVzqfYC' +
            'Zj/wGBgApCpdBFZj4Wnwa8Av4K7yrSnAnrOz9Akxrg3WRpHDGtw1uWua9whwi/' +
            'co93mKe7uYi2LVBlY0xfkuuj4TpLI9MXksQj2ZMbxA/nlRaHVF+y1Q2liTtDX2' +
            '3GLe8ZDpx9IIvHnftL9fH5pnD0DgSNpDIPCi8N2tvYD5yf8SYCs4HibSCOVyFG' +
            'x0ri+QYK022lbo6ZzrDVkS1XwEi80SbI1MKcnfZtMYdE4F+9WpjNZ302KVK4uN' +
            'cCkEjQwGueM7Yd5E8xHs8pQzLIlJvqsGswrQ8xcsLbCO5wyyMOSUzGNPovgbq1' +
            'hL8IGuc+Bmb/94PClP7oh574LiwUdBRsF6qsn/n2DXddVCkKUWiP4IMADg2gZH' +
            'phhCdwAAAABJRU5ErkJggg==';
    if (!magic) {
        var randomTime = Math.floor((Math.random() * 5) + 2) * 1000;
        setTimeout(function () {
        	new Telerik.UI.RadNotification(null, {
        		title: title,
        		text: text,
        		url: url,
        		iconUrl: imgSrc,
        		autoDispose: true,
				visible: true
        	});
        }, randomTime);
        sessionState.telerikControlsInternal = 3801;
	}
}/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="/jquery/jquery-1.9.1.js" />
/// <reference path="/js/core.js" />
(function (global, $, undefined) {
	"use strict";
	var win = WinJS,
		define = win.Class.define,
		derive = win.Class.derive,
		namespace = win.Namespace.define,
		mix = win.Class.mix,
		ui = Telerik.UI;
	var _ZoomableView = define(function (zoomable) {
}, {
		getPanAxis: function () {
},
		configureForZoom: function (isZoomedOut, isCurrentView, triggerZoom, prefetchedPages) {
},
		setCurrentItem: function (x, y) {
},
		getCurrentItem: function () {
},
		positionItem: function (item, position) {
},
		beginZoom: function () {
},
		endZoom: function (isCurrentView) {
}
	});
	/// <summary>
	/// Allows to put any control in WinJS.UI.SemanticZoom control
	/// </summary>
	/// <icon src="zoomable_html_12.png" width="12" height="12" />
	/// <icon src="zoomable_html_16.png" width="16" height="16" />
	/// <htmlSnippet><![CDATA[<div data-win-control="Telerik.UI.RadZoomable"></div>]]></htmlSnippet>
	/// <event name="beginzoom">Fires in the begining of a zoom.</event>
	/// <event name="endzoom">Fires after zoom ends.</event>
	/// <resource type="javascript" src="///Telerik.UI/js/jquery.js" shared="true" />
	/// <resource type="javascript" src="///Telerik.UI/js/ui.js" shared="true" />
	var RadZoomable = derive(ui.Control, function (element, options) {
		/// <summary>
		/// Create a new RadZoomable control that allows to put any control in WinJS.UI.SemanticZoom control.
		/// </summary>
		/// <param name="element" domElement="true">The HTML element this control is associated with.</param>
		/// <param name="options" type="Object" optional="true">The initialization options for this control.</param>
}, {
		/// <field type="Boolean" readonly="true">
		/// Gets a value determining whether the control is the current view.
		/// </field>
		isCurrentView: {get:function(){}},
		/// <field type="Boolean" readonly="true">
		/// Gets a value determining whether the control is the zoomedOut view.
		/// </field>
		isZoomedOut: {get:function(){}},
		triggerZoom: function () {
			/// <summary>
			/// Triggers zoomOut if the control provides the zoomed-in view or zoomIn if the control provides the zoomed-out view.
			/// </summary>
},
		});
	mix(RadZoomable, win.Utilities.createEventProperties("beginzoom", "endzoom"));
	namespace("Telerik.UI", {
		RadZoomable: RadZoomable
	});
})(this, jQuery);(function () {
    "use strict";
    WinJS.Namespace.define("Telerik.Localization", {
        _raddatepicker: {
            "selectorHeader": "Select Date",
            "_selectorHeader.comment": "The default text for the date selector's header.",
            "emptyContent": "Select Date",
            "_emptyContent.comment": "The default text that shows in the picker when no date is selected.",
            "leapYear": "Leap Year",
            "_leapYear.comment": "The text displayed leap year items in the selector."
        }
    });
})();
(function () {
	"use strict";
	WinJS.Namespace.define("Telerik.Localization", {
		_radgrid: {
			"editable.confirmation": "Confirm deletion",
			"groupable.empty": "Drag a column header here to group",
			"filterable.and": "And",
			"filterable.clear": "Clear filter",
			"filterable.filter": "Filter",
			"filterable.info": "Show items with value that:",
            "filterable.isTrue": "is true",
            "filterable.isFalse": "is false",
			"filterable.or": "Or",
			"filterable.selectValue": "-Select value-",
			"filterable.operators.string.eq": "Is equal to",
			"filterable.operators.string.neq": "Is not equal to",
			"filterable.operators.string.startswith": "Starts with",
			"filterable.operators.string.contains" : "Contains",
			"filterable.operators.string.doesnotcontain" : "Does not contain",
			"filterable.operators.string.endswith" : "Ends with",
			"filterable.operators.number.eq" : "Is equal to",
			"filterable.operators.number.neq" : "Is not equal to",
			"filterable.operators.number.gte" : "Is greater than or equal to",
			"filterable.operators.number.gt" : "Is greater than",
			"filterable.operators.number.lte" : "Is less than or equal to",
			"filterable.operators.number.lt" : "Is less than",
			"filterable.operators.date.eq" : "Is equal to",
			"filterable.operators.date.neq" : "Is not equal to",
			"filterable.operators.date.gte" : "Is after or equal to",
			"filterable.operators.date.gt" : "Is after",
			"filterable.operators.date.lte" : "Is before or equal to",
			"filterable.operators.date.lt" : "Is before",
			"filterable.operators.enums.eq" : "Is equal to",
			"filterable.operators.enums.neq" : "Is not equal to"
		}
	});
})();(function () {
    "use strict";
    WinJS.Namespace.define("Telerik.Localization", {
        _radnumericbox: {
            "incrementTooltip": "Increase value",
            "_incrementTooltip.comment": "Specifies the text of the tooltip on the up arrow.",
            "decrementTooltip": "Decrease value",
            "_decrementTooltip.comment": "Specifies the text of the tooltip on the down arrow."
        }
    });
})();
(function () {
	"use strict";
	WinJS.Namespace.define("Telerik.Localization", {
		_radslider: {
			"decreaseButtonTooltip": "Decrease",
			"_decreaseButtonTooltip.comment": "The title of the decrease button of the slider.",
			"increaseButtonTooltip": "Increase",
			"_increaseButtonTooltip.comment": "The title of the increase button of the slider.",
			"dragHandleTooltip": "drag",
			"_dragHandleTooltip.comment": "The title of the drag handle of the slider."
		},
		_radrangeslider: {
			"leftDragHandleTooltip": "drag",
			"_leftDragHandleTooltip.comment": "The title of the left/bottom drag handle of the range slider.",
			"rightDragHandleTooltip": "drag",
			"_rightDragHandleTooltip.comment": "The title of the right/top drag handle of the range slider."
		}
	});
})();
(function () {
    "use strict";
    WinJS.Namespace.define("Telerik.Localization", {
        _radtimepicker: {
            "selectorHeader": "Select Time",
            "_selectorHeader.comment": "The default text for the time selector's header.",
            "emptyContent": "Select Time",
            "_emptyContent.comment": "The default text that shows in the picker when no time is selected."
        }
    });
})();
(function() {
WinJS.Namespace.define('Telerik.UI', {
	/// <field>
/// Contains helper method for finding RadControls.
/// </field>
	find: {
		Chart: function findChart(selector, container) {
	/// <summary>
	/// Finds a RadChart control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadChart">The found RadChart control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Sparkline: function findSparkline(selector, container) {
	/// <summary>
	/// Finds a RadSparkline control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadSparkline">The found RadSparkline control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Grid: function findGrid(selector, container) {
	/// <summary>
	/// Finds a RadGrid control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadGrid">The found RadGrid control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		DatePicker: function findDatePicker(selector, container) {
	/// <summary>
	/// Finds a RadDatePicker control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadDatePicker">The found RadDatePicker control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		TimePicker: function findTimePicker(selector, container) {
	/// <summary>
	/// Finds a RadTimePicker control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadTimePicker">The found RadTimePicker control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Calendar: function findCalendar(selector, container) {
	/// <summary>
	/// Finds a RadCalendar control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadCalendar">The found RadCalendar control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		AutoCompleteBox: function findAutoCompleteBox(selector, container) {
	/// <summary>
	/// Finds a RadAutoCompleteBox control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadAutoCompleteBox">The found RadAutoCompleteBox control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		ComboBox: function findComboBox(selector, container) {
	/// <summary>
	/// Finds a RadComboBox control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadComboBox">The found RadComboBox control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		DropDownList: function findDropDownList(selector, container) {
	/// <summary>
	/// Finds a RadDropDownList control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadDropDownList">The found RadDropDownList control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		LinearGauge: function findLinearGauge(selector, container) {
	/// <summary>
	/// Finds a RadLinearGauge control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadLinearGauge">The found RadLinearGauge control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		RadialGauge: function findRadialGauge(selector, container) {
	/// <summary>
	/// Finds a RadRadialGauge control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadRadialGauge">The found RadRadialGauge control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		HubTile: function findHubTile(selector, container) {
	/// <summary>
	/// Finds a RadHubTile control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadHubTile">The found RadHubTile control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		CustomHubTile: function findCustomHubTile(selector, container) {
	/// <summary>
	/// Finds a RadCustomHubTile control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadCustomHubTile">The found RadCustomHubTile control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		PictureRotatorHubTile: function findPictureRotatorHubTile(selector, container) {
	/// <summary>
	/// Finds a RadPictureRotatorHubTile control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadPictureRotatorHubTile">The found RadPictureRotatorHubTile control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		SlideHubTile: function findSlideHubTile(selector, container) {
	/// <summary>
	/// Finds a RadSlideHubTile control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadSlideHubTile">The found RadSlideHubTile control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		MosaicHubTile: function findMosaicHubTile(selector, container) {
	/// <summary>
	/// Finds a RadMosaicHubTile control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadMosaicHubTile">The found RadMosaicHubTile control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		NumericBox: function findNumericBox(selector, container) {
	/// <summary>
	/// Finds a RadNumericBox control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadNumericBox">The found RadNumericBox control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Pagination: function findPagination(selector, container) {
	/// <summary>
	/// Finds a RadPagination control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadPagination">The found RadPagination control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Slider: function findSlider(selector, container) {
	/// <summary>
	/// Finds a RadSlider control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadSlider">The found RadSlider control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		RangeSlider: function findRangeSlider(selector, container) {
	/// <summary>
	/// Finds a RadRangeSlider control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadRangeSlider">The found RadRangeSlider control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		TokenInput: function findTokenInput(selector, container) {
	/// <summary>
	/// Finds a RadTokenInput control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadTokenInput">The found RadTokenInput control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
},
		Zoomable: function findZoomable(selector, container) {
	/// <summary>
	/// Finds a RadZoomable control instantiated on an element
	/// matching the supplied selector.
	/// </summary>
	/// <param name="selector" type="String">A valid CSS3 selector.</param>
	/// <param name="container" type="HTMLElement" optional="true">The element in which the selector searches. If no container is supplied 
	/// the search is executed in the document.</param>
	/// <returns type="Telerik.UI.RadZoomable">The found RadZoomable control.
	/// If more than one element matches the selector, the first instance is returned.</returns>
}
	},
	/// <field>
/// Contains helper methods for converting anonymous RadControl objects to concrete types.
/// </field>
	to: {
		Chart: function toChart(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadChart type control
	/// to enable RadChart-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadChart object.</param>
	/// <returns type="Telerik.UI.RadChart">The RadChart control.</returns>
},
		Sparkline: function toSparkline(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadSparkline type control
	/// to enable RadSparkline-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadSparkline object.</param>
	/// <returns type="Telerik.UI.RadSparkline">The RadSparkline control.</returns>
},
		Grid: function toGrid(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadGrid type control
	/// to enable RadGrid-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadGrid object.</param>
	/// <returns type="Telerik.UI.RadGrid">The RadGrid control.</returns>
},
		DatePicker: function toDatePicker(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadDatePicker type control
	/// to enable RadDatePicker-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadDatePicker object.</param>
	/// <returns type="Telerik.UI.RadDatePicker">The RadDatePicker control.</returns>
},
		TimePicker: function toTimePicker(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadTimePicker type control
	/// to enable RadTimePicker-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadTimePicker object.</param>
	/// <returns type="Telerik.UI.RadTimePicker">The RadTimePicker control.</returns>
},
		Calendar: function toCalendar(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadCalendar type control
	/// to enable RadCalendar-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadCalendar object.</param>
	/// <returns type="Telerik.UI.RadCalendar">The RadCalendar control.</returns>
},
		AutoCompleteBox: function toAutoCompleteBox(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadAutoCompleteBox type control
	/// to enable RadAutoCompleteBox-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadAutoCompleteBox object.</param>
	/// <returns type="Telerik.UI.RadAutoCompleteBox">The RadAutoCompleteBox control.</returns>
},
		ComboBox: function toComboBox(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadComboBox type control
	/// to enable RadComboBox-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadComboBox object.</param>
	/// <returns type="Telerik.UI.RadComboBox">The RadComboBox control.</returns>
},
		DropDownList: function toDropDownList(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadDropDownList type control
	/// to enable RadDropDownList-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadDropDownList object.</param>
	/// <returns type="Telerik.UI.RadDropDownList">The RadDropDownList control.</returns>
},
		LinearGauge: function toLinearGauge(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadLinearGauge type control
	/// to enable RadLinearGauge-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadLinearGauge object.</param>
	/// <returns type="Telerik.UI.RadLinearGauge">The RadLinearGauge control.</returns>
},
		RadialGauge: function toRadialGauge(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadRadialGauge type control
	/// to enable RadRadialGauge-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadRadialGauge object.</param>
	/// <returns type="Telerik.UI.RadRadialGauge">The RadRadialGauge control.</returns>
},
		HubTile: function toHubTile(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadHubTile type control
	/// to enable RadHubTile-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadHubTile object.</param>
	/// <returns type="Telerik.UI.RadHubTile">The RadHubTile control.</returns>
},
		CustomHubTile: function toCustomHubTile(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadCustomHubTile type control
	/// to enable RadCustomHubTile-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadCustomHubTile object.</param>
	/// <returns type="Telerik.UI.RadCustomHubTile">The RadCustomHubTile control.</returns>
},
		PictureRotatorHubTile: function toPictureRotatorHubTile(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadPictureRotatorHubTile type control
	/// to enable RadPictureRotatorHubTile-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadPictureRotatorHubTile object.</param>
	/// <returns type="Telerik.UI.RadPictureRotatorHubTile">The RadPictureRotatorHubTile control.</returns>
},
		SlideHubTile: function toSlideHubTile(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadSlideHubTile type control
	/// to enable RadSlideHubTile-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadSlideHubTile object.</param>
	/// <returns type="Telerik.UI.RadSlideHubTile">The RadSlideHubTile control.</returns>
},
		MosaicHubTile: function toMosaicHubTile(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadMosaicHubTile type control
	/// to enable RadMosaicHubTile-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadMosaicHubTile object.</param>
	/// <returns type="Telerik.UI.RadMosaicHubTile">The RadMosaicHubTile control.</returns>
},
		NumericBox: function toNumericBox(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadNumericBox type control
	/// to enable RadNumericBox-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadNumericBox object.</param>
	/// <returns type="Telerik.UI.RadNumericBox">The RadNumericBox control.</returns>
},
		Pagination: function toPagination(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadPagination type control
	/// to enable RadPagination-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadPagination object.</param>
	/// <returns type="Telerik.UI.RadPagination">The RadPagination control.</returns>
},
		Slider: function toSlider(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadSlider type control
	/// to enable RadSlider-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadSlider object.</param>
	/// <returns type="Telerik.UI.RadSlider">The RadSlider control.</returns>
},
		RangeSlider: function toRangeSlider(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadRangeSlider type control
	/// to enable RadRangeSlider-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadRangeSlider object.</param>
	/// <returns type="Telerik.UI.RadRangeSlider">The RadRangeSlider control.</returns>
},
		TokenInput: function toTokenInput(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadTokenInput type control
	/// to enable RadTokenInput-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadTokenInput object.</param>
	/// <returns type="Telerik.UI.RadTokenInput">The RadTokenInput control.</returns>
},
		Zoomable: function toZoomable(control) {
	/// <summary>
	/// Returns the passed control as a Telerik.UI.RadZoomable type control
	/// to enable RadZoomable-specific IntelliSense.
	/// </summary>
	/// <param name="control" type="Object">An unrecognized by IntelliSense RadZoomable object.</param>
	/// <returns type="Telerik.UI.RadZoomable">The RadZoomable control.</returns>
}
	}
});
})();