/**
 	Head JS		The only script in your <HEAD>
	Copyright	Tero Piirainen (tipiirai)
	License 		MIT / http://bit.ly/mit-license
	
	http://headjs.com
*/(function(a){var b=a.documentElement,c=navigator.userAgent.toLowerCase().indexOf("msie")!=-1,d=false,e=[],f={},g={};var h=window.head_conf&&head_conf.head||"head",i=window[h]=window[h]||function(){i.ready.apply(null,arguments)};i.js=function(){var a=arguments,b=[].slice.call(a,1),c=b[0];if(!d){e.push(function(){i.js.apply(null,a)});return i}c?(l(c)||k(b,function(a){l(a)||n(j(a))}),o(j(a[0]),l(c)?c:function(){i.js.apply(null,b)})):o(j(a[0]));return i},i.ready=function(a,b){var c=g[a];if(c&&c.state=="loaded"){b.call();return i}l(a)&&(b=a,a="ALL");var d=f[a];d?d.push(b):d=f[a]=[b];return i};function j(a){var b=g[a.name||a];if(b)return b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else{var d=a.split("/"),e=d[d.length-1],f=e.indexOf("?");b={name:f!=-1?e.substring(0,f):e,url:a}}g[b.name]=b;return b}function k(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 l(a){return Object.prototype.toString.call(a)=="[object Function]"}function m(a){a.state="preloaded",k(a.onpreload,function(a){a.call()})}function n(c,d){if(!c.state){c.state="preloading",c.onpreload=[];if(/Firefox/.test(navigator.userAgent)){var e=a.createElement("object");e.data=c.url,e.width=0,e.height=0,e.onload=function(){m(c),setTimeout(function(){b.removeChild(e)},1)},b.appendChild(e)}else p({src:c.url,type:"cache"},function(){m(c)})}}function o(a,b){if(a.state=="loaded")return b();if(a.state=="preloading")return a.onpreload.push(function(){o(a,b)});a.state="loading",p(a.url,function(){a.state="loaded",b&&b.call(),k(f[a.name],function(a){a.call()});var c=true;for(var d in g)g[d].state!="loaded"&&(c=false);c&&k(f.ALL,function(a){a.done||a.call(),a.done=true})})}function p(d,e){var f=a.createElement("script");f.type="text/"+(d.type||"javascript"),f.src=d.src||d,f.onreadystatechange=f.onload=function(){var a=f.readyState;!e.done&&(!a||/loaded|complete/.test(a))&&(e.call(),e.done=true),c||b.removeChild(f)},b.appendChild(f)}setTimeout(function(){d=true,k(e,function(a){a.call()})},200)})(document)
