/*
 * Modernizr v1.7pre
 * http://www.modernizr.com
 *
 * Developed by: 
 * - Faruk Ates  http://farukat.es/
 * - Paul Irish  http://paulirish.com/
 *
 * Copyright (c) 2009-2010
 * Dual-licensed under the BSD or MIT licenses.
 * http://www.modernizr.com/license/
 */
window.Modernizr=(function(g,h,j){var k='1.7pre',ret={},enableHTML5=true,docElement=h.documentElement,docHead=h.head||h.getElementsByTagName('head')[0],mod='modernizr',modElem=h.createElement(mod),m_style=modElem.style,inputElem=h.createElement('input'),smile=':)',tostring=Object.prototype.toString,prefixes=' -webkit- -moz- -o- -ms- -khtml- '.split(' '),domPrefixes='Webkit Moz O ms Khtml'.split(' '),ns={'svg':'http://www.w3.org/2000/svg'},tests={},inputs={},attrs={},classes=[],featurename,testMediaQuery=function(a){var b=h.createElement('style'),div=h.createElement('div'),ret;b.textContent=a+'{#modernizr{height:3px}}';docHead.appendChild(b);div.id='modernizr';docElement.appendChild(div);ret=div.offsetHeight===3;b.parentNode.removeChild(b);div.parentNode.removeChild(div);return!!ret},isEventSupported=(function(){var d={'select':'input','change':'input','submit':'form','reset':'form','error':'img','load':'img','abort':'img'};function isEventSupported(a,b){b=b||h.createElement(d[a]||'div');a='on'+a;var c=(a in b);if(!c){if(!b.setAttribute){b=h.createElement('div')}if(b.setAttribute&&b.removeAttribute){b.setAttribute(a,'');c=is(b[a],'function');if(!is(b[a],j)){b[a]=j}b.removeAttribute(a)}}b=null;return c}return isEventSupported})();var l=({}).hasOwnProperty,hasOwnProperty;if(!is(l,j)&&!is(l.call,j)){hasOwnProperty=function(a,b){return l.call(a,b)}}else{hasOwnProperty=function(a,b){return((b in a)&&is(a.constructor.prototype[b],j))}}function set_css(a){m_style.cssText=a}function set_css_all(a,b){return set_css(prefixes.join(a+';')+(b||''))}function is(a,b){return typeof a===b}function contains(a,b){return(''+a).indexOf(b)!==-1}function test_props(a,b){for(var i in a){if(m_style[a[i]]!==j&&(!b||b(a[i],modElem))){return true}}}function test_props_all(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),props=(a+' '+domPrefixes.join(c+' ')+c).split(' ');return!!test_props(props,b)}tests['flexbox']=function(){function set_prefixed_value_css(a,b,c,d){b+=':';a.style.cssText=(b+prefixes.join(c+';'+b)).slice(0,-b.length)+(d||'')}function set_prefixed_property_css(a,b,c,d){a.style.cssText=prefixes.join(b+':'+c+';')+(d||'')}var c=h.createElement('div'),elem=h.createElement('div');set_prefixed_value_css(c,'display','box','width:42px;padding:0;');set_prefixed_property_css(elem,'box-flex','1','width:10px;');c.appendChild(elem);docElement.appendChild(c);var e=elem.offsetWidth===42;c.removeChild(elem);docElement.removeChild(c);return e};tests['canvas']=function(){var a=h.createElement('canvas');return!!(a.getContext&&a.getContext('2d'))};tests['canvastext']=function(){return!!(ret['canvas']&&is(h.createElement('canvas').getContext('2d').fillText,'function'))};tests['webgl']=function(){return!!g.WebGLRenderingContext};tests['touch']=function(){return('ontouchstart'in g)||testMediaQuery('@media ('+prefixes.join('touch-enabled),(')+'modernizr)')};tests['geolocation']=function(){return!!navigator.geolocation};tests['postmessage']=function(){return!!g.postMessage};tests['websqldatabase']=function(){var a=!!g.openDatabase;return a};tests['indexedDB']=function(){for(var i=-1,len=domPrefixes.length;++i<len;){var a=domPrefixes[i].toLowerCase();if(g[a+'_indexedDB']||g[a+'IndexedDB']){return true}}return false};tests['hashchange']=function(){return isEventSupported('hashchange',g)&&(h.documentMode===j||h.documentMode>7)};tests['history']=function(){return!!(g.history&&history.pushState)};tests['draganddrop']=function(){return isEventSupported('dragstart')&&isEventSupported('drop')};tests['websockets']=function(){return('WebSocket'in g)};tests['rgba']=function(){set_css('background-color:rgba(150,255,150,.5)');return contains(m_style.backgroundColor,'rgba')};tests['hsla']=function(){set_css('background-color:hsla(120,40%,100%,.5)');return contains(m_style.backgroundColor,'rgba')||contains(m_style.backgroundColor,'hsla')};tests['multiplebgs']=function(){set_css('background:url(//:),url(//:),red url(//:)');return new RegExp("(url\\s*\\(.*?){3}").test(m_style.background)};tests['backgroundsize']=function(){return test_props_all('backgroundSize')};tests['borderimage']=function(){return test_props_all('borderImage')};tests['borderradius']=function(){return test_props_all('borderRadius','',function(a){return contains(a,'orderRadius')})};tests['boxshadow']=function(){return test_props_all('boxShadow')};tests['textshadow']=function(){return h.createElement('div').style.textShadow===''};tests['opacity']=function(){set_css_all('opacity:.55');return/^0.55$/.test(m_style.opacity)};tests['cssanimations']=function(){return test_props_all('animationName')};tests['csscolumns']=function(){return test_props_all('columnCount')};tests['cssgradients']=function(){var a='background-image:',str2='gradient(linear,left top,right bottom,from(#9f9),to(white));',str3='linear-gradient(left top,#9f9, white);';set_css((a+prefixes.join(str2+a)+prefixes.join(str3+a)).slice(0,-a.length));return contains(m_style.backgroundImage,'gradient')};tests['cssreflections']=function(){return test_props_all('boxReflect')};tests['csstransforms']=function(){return!!test_props(['transformProperty','WebkitTransform','MozTransform','OTransform','msTransform'])};tests['csstransforms3d']=function(){var a=!!test_props(['perspectiveProperty','WebkitPerspective','MozPerspective','OPerspective','msPerspective']);if(a&&'webkitPerspective'in docElement.style){a=testMediaQuery('@media ('+prefixes.join('transform-3d),(')+'modernizr)')}return a};tests['csstransitions']=function(){return test_props_all('transitionProperty')};tests['fontface']=function(){var c,bool,head=docHead||docElement,style=h.createElement("style"),impl=h.implementation||{hasFeature:function(){return false}};style.type='text/css';head.insertBefore(style,head.firstChild);c=style.sheet||style.styleSheet;var d=impl.hasFeature('CSS2','')?function(a){if(!(c&&a))return false;var b=false;try{c.insertRule(a,0);b=(/src/i).test(c.cssRules[0].cssText);c.deleteRule(c.cssRules.length-1)}catch(e){}return b}:function(a){if(!(c&&a))return false;c.cssText=a;return c.cssText.length!==0&&(/src/i).test(c.cssText)&&c.cssText.replace(/\r+|\n+/g,'').indexOf(a.split(' ')[0])===0};bool=d('@font-face { font-family: "font"; src: url(data:,); }');head.removeChild(style);return bool};tests['video']=function(){var a=h.createElement('video'),bool=!!a.canPlayType;if(bool){bool=new Boolean(bool);bool.ogg=a.canPlayType('video/ogg; codecs="theora"');var b='video/mp4; codecs="avc1.42E01E';bool.h264=a.canPlayType(b+'"')||a.canPlayType(b+', mp4a.40.2"');bool.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return bool};tests['audio']=function(){var a=h.createElement('audio'),bool=!!a.canPlayType;if(bool){bool=new Boolean(bool);bool.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');bool.mp3=a.canPlayType('audio/mpeg;');bool.wav=a.canPlayType('audio/wav; codecs="1"');bool.m4a=a.canPlayType('audio/x-m4a;')||a.canPlayType('audio/aac;')}return bool};tests['localstorage']=function(){try{return!!localStorage.getItem}catch(e){return false}};tests['sessionstorage']=function(){try{return!!sessionStorage.getItem}catch(e){return false}};tests['webWorkers']=function(){return!!g.Worker};tests['applicationcache']=function(){return!!g.applicationCache};tests['svg']=function(){return!!h.createElementNS&&!!h.createElementNS(ns.svg,"svg").createSVGRect};tests['inlinesvg']=function(){var a=h.createElement('div');a.innerHTML='<svg/>';return(a.firstChild&&a.firstChild.namespaceURI)==ns.svg};tests['smil']=function(){return!!h.createElementNS&&/SVG/.test(tostring.call(h.createElementNS(ns.svg,'animate')))};tests['svgclippaths']=function(){return!!h.createElementNS&&/SVG/.test(tostring.call(h.createElementNS(ns.svg,'clipPath')))};function webforms(){ret['input']=(function(a){for(var i=0,len=a.length;i<len;i++){attrs[a[i]]=!!(a[i]in inputElem)}return attrs})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));ret['inputtypes']=(function(a){for(var i=0,bool,inputElemType,defaultView,len=a.length;i<len;i++){inputElem.setAttribute('type',inputElemType=a[i]);bool=inputElem.type!=='text';if(bool){inputElem.value=smile;inputElem.style.cssText='position:absolute;visibility:hidden;';if(/^range$/.test(inputElemType)&&inputElem.style.WebkitAppearance!==j){docElement.appendChild(inputElem);defaultView=h.defaultView;bool=defaultView.getComputedStyle&&defaultView.getComputedStyle(inputElem,null).WebkitAppearance!=='textfield'&&(inputElem.offsetHeight!==0);docElement.removeChild(inputElem)}else if(/^(search|tel)$/.test(inputElemType)){}else if(/^(url|email)$/.test(inputElemType)){bool=inputElem.checkValidity&&inputElem.checkValidity()===false}else if(/^color$/.test(inputElemType)){docElement.appendChild(inputElem);docElement.offsetWidth;bool=inputElem.value!=smile;docElement.removeChild(inputElem)}else{bool=inputElem.value!=smile}}inputs[a[i]]=!!bool}return inputs})('search tel url email datetime date month week time datetime-local number range color'.split(' '))}for(var m in tests){if(hasOwnProperty(tests,m)){featurename=m.toLowerCase();ret[featurename]=tests[m]();classes.push((ret[featurename]?'':'no-')+featurename)}}if(!ret.input)webforms();ret.crosswindowmessaging=ret.postmessage;ret.historymanagement=ret.history;ret.addTest=function(a,b){a=a.toLowerCase();if(ret[a]){return}b=!!(b());docElement.className+=' '+(b?'':'no-')+a;ret[a]=b;return ret};set_css('');modElem=inputElem=null;if(enableHTML5&&g.attachEvent&&(function(){var a=h.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()){(function(d,e){var f='abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video',elemsArr=f.split('|'),elemsArrLen=elemsArr.length,elemRegExp=new RegExp('(^|\\s)('+f+')','gi'),tagRegExp=new RegExp('<(\/*)('+f+')','gi'),ruleRegExp=new RegExp('(^|[^\\n]*?\\s)('+f+')([^\\n]*)({[\\n\\w\\W]*?})','gi'),docFrag=e.createDocumentFragment(),html=e.documentElement,head=html.firstChild,bodyElem=e.createElement('body'),styleElem=e.createElement('style'),body;function shim(b){var a=-1;while(++a<elemsArrLen)b.createElement(elemsArr[a])}function getCSS(b,c){var a=-1,len=b.length,styleSheet,cssTextArr=[];while(++a<len){styleSheet=b[a];if((c=styleSheet.media||c)!='screen')cssTextArr.push(getCSS(styleSheet.imports,c),styleSheet.cssText)}return cssTextArr.join('')}shim(e);shim(docFrag);head.insertBefore(styleElem,head.firstChild);styleElem.media='print';d.attachEvent('onbeforeprint',function(){var a=-1,cssText=getCSS(e.styleSheets,'all'),cssTextArr=[],rule;body=body||e.body;while((rule=ruleRegExp.exec(cssText))!=null)cssTextArr.push((rule[1]+rule[2]+rule[3]).replace(elemRegExp,'$1.iepp_$2')+rule[4]);styleElem.styleSheet.cssText=cssTextArr.join('\n');while(++a<elemsArrLen){var c=e.getElementsByTagName(elemsArr[a]),nodeListLen=c.length,b=-1;while(++b<nodeListLen)if(c[b].className.indexOf('iepp_')<0)c[b].className+=' iepp_'+elemsArr[a]}docFrag.appendChild(body);html.appendChild(bodyElem);bodyElem.className=body.className;bodyElem.innerHTML=body.innerHTML.replace(tagRegExp,'<$1font')});d.attachEvent('onafterprint',function(){bodyElem.innerHTML='';html.removeChild(bodyElem);html.appendChild(body);styleElem.styleSheet.cssText=''})})(g,h)}ret._enableHTML5=enableHTML5;ret._version=k;docElement.className=docElement.className.replace(/\bno-js\b/,'')+' js '+classes.join(' ');return ret})(this,this.document);
