/* my stuff */
var CALLAGHAN=CALLAGHAN||{};CALLAGHAN={init:function(){this.clouds.init();this.email.init();if(!$.browser.msie||($.browser.msie&&$.browser.version>6)){this.share.init()}if($.browser.msie&&$.browser.version<9){this.mediaQuerySupport.init()}},clouds:{el:"#clouds",width:1160,speed:95,init:function(){if(!$.browser.webkit){var a=$(this.el);background=0,_this=this;setInterval(function(){background-=2;if(background==_this.width){background=0}a.css("background-position",background)},this.speed)}}},share:{el:"aside#share",delay:3000,speed:"slow",init:function(){var a=this;setTimeout(function(){$(a.el).fadeIn(a.speed)},this.delay)}},email:{init:function(){var d=$("span#email"),a=/ at /,b=/ dot /g,c=$(d).text().replace(a,"@").replace(b,".");$(d).after('<a href="mailto:'+c+'">'+c+"</a>").remove().show()}},mediaQuerySupport:{lastSize:null,init:function(){var a=this;this.lastSize=this.getViewportWidth();this.doDetect();$(window).resize(function(b){a.doDetect()})},doDetect:function(){var b=this.getViewportWidth(),a=b<=this.lastSize?"down":"up",c=["xx-large","x-large","large","medium","small","x-small","xx-small"];if(b>960){if(a==="up"){$("html").removeClass()}}else{if(b<=960&&b>800){if(a==="up"){$("html").removeClass()}$("html").addClass(c[1])}else{if(b<=800&&b>760){if(a==="up"){$("html").removeClass(c[3])}$("html").addClass(c[2])}else{if(b<=760&&b>600){if(a==="up"){$("html").removeClass(c[4])}$("html").addClass(c[3])}else{if(b<=680&&b>600){if(a==="up"){$("html").removeClass(c[5])}$("html").addClass(c[4])}else{if(b<=600&&b>510){if(a==="up"){$("html").removeClass(c[6])}$("html").addClass(c[5])}else{if(b<=510){$("html").addClass(c[6])}}}}}}}this.lastSize=b},getViewportWidth:function(){var a;if(typeof window.innerWidth!="undefined"){a=window.innerWidth}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=document.documentElement.clientWidth}else{a=document.getElementsByTagName("body")[0].clientWidth}}return a}}};$(window).load(function(){CALLAGHAN.init()});

/**
SidJS - JavaScript And CSS Lazy Loader 0.1
Copyright © Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
All rights reserved.
*/
(function(){var win=window,doc=document,proto='prototype',head=doc.getElementsByTagName('head')[0],body=doc.getElementsByTagName('body')[0],sniff=/*@cc_on!@*/1+/(?:Gecko|AppleWebKit)\/(\S*)/.test(navigator.userAgent);var createNode=function(tag,attrs){var attr,node=doc.createElement(tag);for(attr in attrs){if(attrs.hasOwnProperty(attr)){node.setAttribute(attr,attrs[attr])}}return node};var load=function(type,urls,callback,scope){if(this==win){return new load(type,urls,callback,scope)}urls=(typeof urls=='string'?[urls]:urls);scope=(scope?(scope=='body'?body:head):(type=='js'?body:head));this.callback=callback||function(){};this.queue=[];var node,i=len=0,that=this;for(i=0,len=urls.length;i<len;i++){this.queue[i]=1;if(type=='css'){node=createNode('link',{type:'text/css',rel:'stylesheet',href:urls[i]})}else{node=createNode('script',{type:'text/javascript',src:urls[i]})}scope.appendChild(node);if(sniff){if(type=='css'&&sniff==2){var intervalID=setInterval(function(){try{node.sheet.cssRules;clearInterval(intervalID);that.__callback()}catch(ex){}},100)}else{node.onload=function(){that.__callback()}}}else{node.onreadystatechange=function(){if(/^loaded|complete$/.test(this.readyState)){this.onreadystatechange=null;that.__callback()}}}}return this};load[proto].__callback=function(){if(this.queue.pop()&&(this.queue==0)){this.callback()}};window.Sid={css:function(urls,callback,scope){return load('css',urls,callback,scope)},js:function(urls,callback,scope){return load('js',urls,callback,scope)},load:function(type,urls,callback,scope){return load(type,urls,callback,scope)}}})();

/*
 * jQuery resize event - v1.1 - 3/14/2010
 * http://benalman.com/projects/jquery-resize-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);


