/*! intel-appframework - v2.1.0 - 2014-03-04 */

/*
 Intel 2013
 @author Ian Maffett
 @description A plugin to allow jQuery developers to use App Framework UI
*/
(function(c,f){function p(a,b){if(a)if(a.nodeType)b[b.length++]=a;else for(var d=0,e=a.length;d<e;d++)b[b.length++]=a[d]}function m(a,b){a.os={};a.os.webkit=b.match(/WebKit\/([\d.]+)/)?!0:!1;a.os.android=b.match(/(Android)\s+([\d.]+)/)||b.match(/Silk-Accelerated/)?!0:!1;a.os.androidICS=a.os.android&&b.match(/(Android)\s4/)?!0:!1;a.os.ipad=b.match(/(iPad).*OS\s([\d_]+)/)?!0:!1;a.os.iphone=!a.os.ipad&&b.match(/(iPhone\sOS)\s([\d_]+)/)?!0:!1;a.os.ios7=(a.os.ipad||a.os.iphone)&&b.match(/7_/)?!0:!1;a.os.webos=
b.match(/(webOS|hpwOS)[\s\/]([\d.]+)/)?!0:!1;a.os.touchpad=a.os.webos&&b.match(/TouchPad/)?!0:!1;a.os.ios=a.os.ipad||a.os.iphone;a.os.playbook=b.match(/PlayBook/)?!0:!1;a.os.blackberry10=b.match(/BB10/)?!0:!1;a.os.blackberry=a.os.playbook||a.os.blackberry10||b.match(/BlackBerry/)?!0:!1;a.os.chrome=b.match(/Chrome/)?!0:!1;a.os.opera=b.match(/Opera/)?!0:!1;a.os.fennec=b.match(/fennec/i)?!0:b.match(/Firefox/)?!0:!1;a.os.ie=b.match(/MSIE 10.0/i)||b.match(/Trident\/7/i)?!0:!1;a.os.ieTouch=a.os.ie&&b.toLowerCase().match(/touch/i)?
!0:!1;a.os.tizen=b.match(/Tizen/i)?!0:!1;a.os.supportsTouch=f.DocumentTouch&&h instanceof f.DocumentTouch||"ontouchstart"in f;a.os.kindle=b.match(/Silk-Accelerated/)?!0:!1;a.feat={};var d=h.documentElement.getElementsByTagName("head")[0];a.feat.nativeTouchScroll="undefined"!==typeof d.style["-webkit-overflow-scrolling"]&&(a.os.ios||a.os.blackberry10);a.feat.cssPrefix=a.os.webkit?"Webkit":a.os.fennec?"Moz":a.os.ie?"ms":a.os.opera?"O":"";a.feat.cssTransformStart=!a.os.opera?"3d(":"(";a.feat.cssTransformEnd=
!a.os.opera?",0)":")";a.os.android&&!a.os.webkit&&(a.os.android=!1)}var h=f.document,l={},k="object"===typeof MSApp,q=1;c.extend(c.fn,{vendorCss:function(a,b,d){return this.css(c.feat.cssPrefix+a,b,d)},cssTranslate:function(a){return this.vendorCss("Transform","translate"+c.feat.cssTransformStart+a+c.feat.cssTransformEnd)},computedStyle:function(a){if(!(0===this.length||void 0==a))return f.getComputedStyle(this[0],"")[a]},replaceClass:function(a,b){if(void 0==a||void 0==b)return this;var d=function(a){c=
c.replace(a in l?l[a]:l[a]=RegExp("(^|\\s)"+a+"(\\s|$)")," ")},e=0;for(;e<this.length;e++)if(void 0==a)this[e].className=b;else{var c=this[e].className;a.split(/\s+/g).concat(b.split(/\s+/g)).forEach(d);c=c.trim();this[e].className=0<c.length?(c+" "+b).trim():b}return this}});m(c,navigator.userAgent);c.__detectUA=m;c.uuid=function(){var a=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()};c.getCssMatrix=function(a){c.is$(a)&&
(a=a.get(0));var b=f.WebKitCSSMatrix||f.MSCSSMatrix;if(void 0===a)return b?new b:{a:0,b:0,c:0,d:0,e:0,f:0};a=f.getComputedStyle(a);a=a.webkitTransform||a.transform||a[c.feat.cssPrefix+"Transform"];return b?new b(a):a?(b=a.replace(/[^0-9\-.,]/g,"").split(","),{a:+b[0],b:+b[1],c:+b[2],d:+b[3],e:+b[4],f:+b[5]}):{a:0,b:0,c:0,d:0,e:0,f:0}};c.create=function(a,b){var d,e=new c;if(b||"<"!==a[0]){b.html&&(b.innerHTML=b.html,delete b.html);d=h.createElement(a);for(var g in b)d[g]=b[g];e[e.length++]=d}else d=
h.createElement("div"),k?MSApp.execUnsafeLocalFunction(function(){d.innerHTML=a.trim()}):d.innerHTML=a,p(d.childNodes,e);return e};c.query=function(a,b){try{return c(a,b)}catch(d){return c()}};c.bind=function(a,b,d){a.__events||(a.__events={});c.isArray(b)||(b=[b]);for(var e=0;e<b.length;e++)a.__events[b[e]]||(a.__events[b[e]]=[]),a.__events[b[e]].push(d)};c.trigger=function(a,b,d){var e=!0;if(!a.__events)return e;c.isArray(b)||(b=[b]);c.isArray(d)||(d=[]);for(var g=0;g<b.length;g++)if(a.__events[b[g]])for(var f=
a.__events[b[g]],h=0;h<f.length;h++)c.isFunction(f[h])&&!1===f[h].apply(a,d)&&(e=!1);return e};c.unbind=function(a,b,d){if(a.__events){c.isArray(b)||(b=[b]);for(var e=0;e<b.length;e++)if(a.__events[b[e]])for(var g=a.__events[b[e]],f=0;f<g.length;f++)if(void 0==d&&delete g[f],g[f]===d){g.splice(f,1);break}}};c.cleanUpContent=function(){};c.isObject=function(a){return"object"===typeof a};c.asap=function(a,b,d){if(!c.isFunction(a))throw"$.asap - argument is not a valid function";setTimeout(function(){a.apply(b,
d)})};var n={};c.parseJS=function(a){if(a){if("string"===typeof a){var b=h.createElement("div");k?MSApp.execUnsafeLocalFunction(function(){b.innerHTML=a}):b.innerHTML=a;a=b}var d=a.getElementsByTagName("script");a=null;for(var c=0;c<d.length;c++)if(0<d[c].src.length&&!n[d[c].src]&&!k){var g=h.createElement("script");g.type=d[c].type;g.src=d[c].src;h.getElementsByTagName("head")[0].appendChild(g);n[d[c].src]=1;g=null}else f.eval(d[c].innerHTML)}};c.is$=function(a){return a instanceof c};c.jsonP=function(a){if(k)return a.type=
"get",a.dataType=null,c.get(a);var b="jsonp_callback"+ ++q,d="",e,g=h.createElement("script");f[b]=function(e){clearTimeout(d);c(g).remove();delete f[b];a.success.call(void 0,e)};-1!==a.url.indexOf("callback=?")?g.src=a.url.replace(/=\?/,"="+b):(e=a.jsonp?a.jsonp:"callback",-1===a.url.indexOf("?")?a.url+="?"+e+"="+b:a.url+="&"+e+"="+b,g.src=a.url);a.error&&(g.onerror=function(){clearTimeout(d);a.error.call(void 0,"","error")});c("head").append(g);0<a.timeout&&(d=setTimeout(function(){a.error.call(void 0,
"","timeout")},a.timeout));return{}};var r=c.event.add;c.event.add=function(){var a=arguments[2],b=this;arguments[2]=function(){var c=arguments;c[0].originalEvent&&c[0].originalEvent.touches&&(c[0].touches=c[0].originalEvent.touches,c[0].changedTouches=c[0].originalEvent.changedTouches,c[0].targetTouches=c[0].originalEvent.targetTouches);a.apply(b,c)};r.apply(c,arguments)};f.$afm=c;f.numOnly||(f.numOnly=function(a){if(void 0===a||""===a)return 0;if(isNaN(parseFloat(a)))if(a.replace)a=a.replace(/[^0-9.-]/g,
"");else return 0;return parseFloat(a)})})(jQuery,window);window.af=window.jq=jQuery;
