/**
 * Sexy.js v0.8
 * http://sexyjs.com/
 *
 * Copyright 2010, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://sexyjs.com/license
 */
(function(k,l,o){var p=location.protocol+"//"+location.hostname+(location.port!==""?":"+location.port:""),g="__",m=["html","json","jsonp","script","style","text","xml"],e=/^(\w+:)?\/\/([^\/?#]+)/,f,b;function c(i){if(!(this instanceof c)){return new c(i);}this.cfgs=[];this.setup(i);}c.prototype={setup:function(i){this.cfg=i||{};return this;},sajax:function(x){var v=this.cfgs,w=v.length,s=v[w-1],z=x.dataType,r=x.url.indexOf("http")===0&&x.url.indexOf(p)===-1,u=z==="script",B=z==="style",i=w>0?r&&(u||B)?true:x.defer:false,A=x.success||(u||B?q:h),y=x.error||o.noop,n=x.complete||o.noop;v.push(o.extend(true,x,this.cfg,x,{sendAfterSend:[],dataType:(!r&&u||B)?"text":z,success:function(D,C){if(!s||g in s){if(u&&!r){o.globalEval(D);}else{if(B&&!r){D=o.styleEval(D);}}x.status=r?"success":C;x[g]=A.call(x,D,s&&s[g],v[w+1],x.status);if(x.nextSuccess){x.nextSuccess();}else{if(x.sendAfterSuccess){x.sendAfterSuccess();}}}else{s.nextSuccess=o.proxy(function(){x.success(D,C);},x);}},error:function(E,C,D){y.call(x,E,C,D);},complete:function(D,C){n.call(x,D,C);}}));function t(){var C,D;if(B&&r){o.getCSS(x.url,x.success);}else{o.ajax(x);}if(x.sendAfterSend.length>0){for(C=0,D=x.sendAfterSend.length;C<D;++C){x.sendAfterSend[C]();}}}if(i){s.sendAfterSuccess=t;this.lastDefer=x;}else{if(this.lastDefer){this.lastDefer.sendAfterSend.push(t);}else{t();}}return this;},bundle:function(){var r=arguments,t=o.isFunction(r[r.length-1])?Array.prototype.pop.call(r):q,s,u;for(s=0,u=r.length-1;s<u;++s){this.text(r[s],j);}return this.text(r[s],function(w,v,n,i){var x=j(w,v);o.globalEval(x);return t(x,v,n,i);});}};function h(i){return i;}function q(n,i){return i;}function j(n,i){return(i||"")+n;}function d(i){c.prototype[i]=function(r,t,s){if(typeof t!=="boolean"){s=t;t=false;}var n=o.isPlainObject(r)?r:{url:r,defer:t,success:s};n.dataType=i;return this.sajax(n);};}for(f=0,b=m.length;f<b;++f){d(m[f]);}c.prototype.js=c.prototype.script;c.prototype.css=c.prototype.style;function a(i){c[i]=function(){return c.prototype[i].apply(new c(),arguments);};}for(f in c.prototype){a(f);}k.Sexy=c;})(this,this.document,(function(f,b,g){g.styleEval=function(l){var k=/\S/;if(l&&k.test(l)){var i=b.getElementsByTagName("head")[0]||b.documentElement,j=b.createElement("style");j.type="text/css";if(j.styleSheet){j.styleSheet.cssText=l;}else{j.textContent=l;}i.insertBefore(j,i.lastChild);return j;}};var d=b.getElementsByTagName("head")[0],a=/loaded|complete/,e={},c=0,h;g.getCSS=function(j,i,l){if(g.isFunction(i)){l=i;i={};}var k=b.createElement("link");k.rel="stylesheet";k.type="text/css";k.media=i.media||"screen";k.href=j;if(i.charset){k.charset=i.charset;}if(i.title){l=(function(m){return function(){k.title=i.title;m(k,"success");};})(l);}if(k.readyState){k.onreadystatechange=function(){if(a.test(k.readyState)){k.onreadystatechange=null;l(k,"success");}};}else{if(k.onload===null&&k.all){k.onload=function(){k.onload=null;l(k,"success");};}else{e[k.href]=function(){l(k,"success");};if(!c++){h=f.setInterval(function(){var r,o,q=b.styleSheets,m,n=q.length;while(n--){o=q[n];if((m=o.href)&&(r=e[m])){try{r.r=o.cssRules;throw"SECURITY";}catch(p){if(/SECURITY/.test(p)){r(k,"success");delete e[m];if(!--c){h=f.clearInterval(h);}}}}}},13);}}}d.appendChild(k);};return g;})(this,this.document,this.jQuery));
