/**
	Head JS: The only script in your <HEAD>

	copyright: "tipiirai" / Tero Piirainen
	license: MIT
*/
(function(a){var b=a.documentElement,c={screens:[320,480,640,768,1024,1280,1440,1680,1920],section:"-section",page:"-page",head:"head"};if(typeof window.head_conf=="object")for(var d in head_conf)c[d]=head_conf[d];window.head_conf=c;function e(a){b.className+=" "+a}function f(a){var c=new RegExp("\\b"+a+"\\b");b.className=b.className.replace(c,"")}function g(a,b){for(var c=0;c<a.length;c++)b.call(a,a[c],c)}var h=window[c.head]=function(){h.ready.apply(null,arguments)};h.feature=function(a,b){f("no-"+a),f(a),e((b?"":"no-")+a),h[a]=b;return h},h.cookie=function(a,b,c){if(b===undefined){var d=document.cookie;if(d){var e=d.indexOf(a+"=");if(e>-1){var f=d.indexOf(";",e);return d.substring(e+a.length+1,f>-1?f:d.length)}}}else document.cookie=a+"="+escape(b)+(c?";expires="+(new Date((new Date).getTime()+1e8)).toUTCString():"");return h};var i=navigator.userAgent.toLowerCase();i=/(webkit)[ \/]([\w.]+)/.exec(i)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(i)||/(msie) ([\w.]+)/.exec(i)||!/compatible/.test(i)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(i)||[],i[1]=="msie"&&i[1]=="ie",e(i[1]),e(i[1]+i[2].replace(".","").substring(0,2)),head.browser={version:parseFloat(i[2])},head.browser[i[1]]=!0;if(head.browser.ie)for(var j=3;j<11;j++)i[2]<=j&&e("lt-ie"+j);g("article|aside|footer|header|nav|section".split("|"),function(b){a.createElement(b)});var k=location.host,l=location.href.substring(location.href.indexOf(k)+k.length+1),m=l.split("/"),n=m.slice(0,m.length-1).join("-")||"root";pageId=m.slice(-1)[0]||"index",index=pageId.indexOf("."),index>=0&&(pageId=pageId.substring(0,index)),head.section=n,head.pageId=pageId,e(n+c.section),b.id=pageId+c.page;function o(){var a=document.width||window.outerWidth||document.documentElement.clientWidth;b.className=b.className.replace(/ (w|lt)-\d+/g,""),e("w-"+Math.round(a/100)*100),g(c.screens,function(b){a<=b&&e("lt-"+b)})}o(),window.onresize=o,head.feature("script",!0)})(document),function(a){var b=a.createElement("i"),c=b.style,d=" -o- -moz- -ms- -webkit- -khtml- ".split(" ");function e(a){c.cssText=d.join(a+";");var b=c.cssText?c.cssText.length:0;return b>0&&b<150}var f={gradient:function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(#fff));",e="linear-gradient(left top,#eee,#fff);";c.cssText=(a+d.join(b+a)+d.join(e+a)).slice(0,-a.length);return c.backgroundImage},rgba:function(){c.cssText="background-color:rgba(0,0,0,0.5)";return c.backgroundColor},boxshadow:function(){return e("box-shadow: 0 0 0 red")},textshadow:function(){return c.textShadow===""},multiplebgs:function(){c.cssText="background:url(//:),url(//:),red url(//:)";return(new RegExp("(url\\s*\\(.*?){3}")).test(c.background)},borderimage:function(){return e("border-image: url(m.png) 1 1 stretch")},borderradius:function(){return e("border-radius:0")},opacity:function(){return e("opacity:.1")},reflections:function(){return e("box-reflect:right 0")},transforms:function(){return e("transform:rotate(1deg)")},transitions:function(){return e("transition:all .5s linear")}},g=window[head_conf.head];for(var h in f)g.feature(h,f[h].call())}(document),function(a){var b=!1,c=[],d=[],e={},f={},g=window.head_conf?head_conf.head:"head",h=window[g]=window[g]||{};h.js=function(){var a=arguments,d=[].slice.call(a,1),e=d[0];if(!b)return c.push(function(){h.js.apply(null,a)});e?(k(e)||l.apply(null,d),n(i(a[0]),k(e)?e:function(){h.js.apply(null,d)})):n(i(a[0]));return h.js},h.ready=function(a,b){if(k(a))return d.push(a);var c=e[a];c?c.push[b]:c=e[a]=[b];return h.js};function i(a){var b=f[a.url||a];if(b)return b;if(typeof a=="object")for(key in a)b={name:key,url:a[key]};else b={name:a.substring(a.indexOf("/",10)+1,a.indexOf("?")),url:a};f[b.url]=b;return b}function j(a,b){if(a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function k(a){return typeof a=="function"}function l(){j(arguments,function(a){k(a)||m(i(a))})}function m(b,c){if(!b.state){b.state="preloading",b.onpreload=[];function d(){b.state="preloaded",j(b.onpreload,function(a){a.call()})}if(head.browser.mozilla){var e=a.createElement("object");e.data=b.url,e.width=0,e.height=0,e.onload=function(){d(),setTimeout(function(){a.body.removeChild(e)},1)},a.body.appendChild(e)}else o({src:b.url,type:"cache"},d)}}function n(a,b){if(a.state=="loaded")return b();if(a.state=="preloading")return a.onpreload.push(function(){n(a,b)});a.state="loading",o(a.url,function(){a.state="loaded",b&&b.call(),j(e[a.name],function(a){a.call()});var c=!0;for(var g in f)f[g].state!="loaded"&&(c=!1);c&&j(d,function(a){a.done||a.call(),a.done=!0})})}function o(b,c){var d=a.getElementsByTagName("head")[0],e=a.createElement("script");e.type="text/"+(b.type||"javascript"),e.src=b.src||b,e.onreadystatechange=e.onload=function(){c.done||(c.call(),c.done=!0),h.browser.ie||d.removeChild(e)},d.appendChild(e)}setTimeout(function(){b=!0,j(c,function(a){a.call()})},50)}(document)

