(function($){$(document).ready(function(){$("a.endless_more").live("click",function(){var container=$(this).closest(".endless_container");var loading=container.find(".endless_loading");$(this).hide();loading.show();var data="querystring_key="+$(this).attr("rel").split(" ")[0];$.get($(this).attr("href"),data,function(data){container.before(data);container.remove();});return false;});$("a.endless_page_link").live("click",function(){var data="querystring_key="+$(this).attr("rel").split(" ")[0];$(this).closest(".endless_page_template").load($(this).attr("href"),data);return false;});});})(jQuery);(function($,wp,wps,window,undefined){'$:nomunge';var $w=$(window),eventName='waypoint.reached',triggerWaypoint=function(way,dir){way.element.trigger(eventName,dir);if(way.options.triggerOnce){way.element[wp]('destroy');}},waypointIndex=function(el,context){var i=context.waypoints.length-1;while(i>=0&&context.waypoints[i].element[0]!==el[0]){i-=1;}
return i;},contexts=[],Context=function(context){$.extend(this,{element:$(context),oldScroll:0,'waypoints':[],didScroll:false,didResize:false,doScroll:$.proxy(function(){var newScroll=this.element.scrollTop(),isDown=newScroll>this.oldScroll,that=this,pointsHit=$.grep(this.waypoints,function(el,i){return isDown?(el.offset>that.oldScroll&&el.offset<=newScroll):(el.offset<=that.oldScroll&&el.offset>newScroll);}),len=pointsHit.length;if(!this.oldScroll||!newScroll){$[wps]('refresh');}
this.oldScroll=newScroll;if(!len)return;if(!isDown)pointsHit.reverse();$.each(pointsHit,function(i,point){if(point.options.continuous||i===len-1){triggerWaypoint(point,[isDown?'down':'up']);}});},this)});$(context).scroll($.proxy(function(){if(!this.didScroll){this.didScroll=true;window.setTimeout($.proxy(function(){this.doScroll();this.didScroll=false;},this),$[wps].settings.scrollThrottle);}},this)).resize($.proxy(function(){if(!this.didResize){this.didResize=true;window.setTimeout($.proxy(function(){$[wps]('refresh');this.didResize=false;},this),$[wps].settings.resizeThrottle);}},this));$w.load($.proxy(function(){this.doScroll();},this));},getContextByElement=function(element){var found=null;$.each(contexts,function(i,c){if(c.element[0]===element){found=c;return false;}});return found;},methods={init:function(f,options){this.each(function(){var cElement=$.fn[wp].defaults.context,context,$this=$(this);if(options&&options.context){cElement=options.context;}
if(!$.isWindow(cElement)){cElement=$this.closest(cElement)[0];}
context=getContextByElement(cElement);if(!context){context=new Context(cElement);contexts.push(context);}
var ndx=waypointIndex($this,context),base=ndx<0?$.fn[wp].defaults:context.waypoints[ndx].options,opts=$.extend({},base,options);opts.offset=opts.offset==="bottom-in-view"?function(){var cHeight=$.isWindow(cElement)?$[wps]('viewportHeight'):$(cElement).height();return cHeight-$(this).outerHeight();}:opts.offset;if(ndx<0){context.waypoints.push({'element':$this,'offset':null,'options':opts});}
else{context.waypoints[ndx].options=opts;}
if(f){$this.bind(eventName,f);}
if(options&&options.handler){$this.bind(eventName,options.handler);}});$[wps]('refresh');return this;},remove:function(){return this.each(function(i,el){var $el=$(el);$.each(contexts,function(i,c){var ndx=waypointIndex($el,c);if(ndx>=0){c.waypoints.splice(ndx,1);}});});},destroy:function(){return this.unbind(eventName)[wp]('remove');}},jQMethods={refresh:function(){$.each(contexts,function(i,c){var isWin=$.isWindow(c.element[0]),contextOffset=isWin?0:c.element.offset().top,contextHeight=isWin?$[wps]('viewportHeight'):c.element.height(),contextScroll=isWin?0:c.element.scrollTop();$.each(c.waypoints,function(j,o){if(!o)return;var adjustment=o.options.offset,oldOffset=o.offset;if(typeof o.options.offset==="function"){adjustment=o.options.offset.apply(o.element);}
else if(typeof o.options.offset==="string"){var amount=parseFloat(o.options.offset);adjustment=o.options.offset.indexOf("%")?Math.ceil(contextHeight*(amount/100)):amount;}
o.offset=o.element.offset().top-contextOffset
+contextScroll-adjustment;if(o.options.onlyOnScroll)return;if(oldOffset!==null&&c.oldScroll>oldOffset&&c.oldScroll<=o.offset){triggerWaypoint(o,['up']);}
else if(oldOffset!==null&&c.oldScroll<oldOffset&&c.oldScroll>=o.offset){triggerWaypoint(o,['down']);}
else if(!oldOffset&&contextScroll>o.offset){triggerWaypoint(o,['down']);}});c.waypoints.sort(function(a,b){return a.offset-b.offset;});});},viewportHeight:function(){return(window.innerHeight?window.innerHeight:$w.height());},aggregate:function(){var points=$();$.each(contexts,function(i,c){$.each(c.waypoints,function(i,e){points=points.add(e.element);});});return points;}};$.fn[wp]=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}
else if(typeof method==="function"||!method){return methods.init.apply(this,arguments);}
else if(typeof method==="object"){return methods.init.apply(this,[null,method]);}
else{$.error('Method '+method+' does not exist on jQuery '+wp);}};$.fn[wp].defaults={continuous:true,offset:0,triggerOnce:false,context:window};$[wps]=function(method){if(jQMethods[method]){return jQMethods[method].apply(this);}
else{return jQMethods['aggregate']();}};$[wps].settings={resizeThrottle:200,scrollThrottle:100};$w.load(function(){$[wps]('refresh');});})(jQuery,'waypoint','waypoints',this);(function($){'$:nomunge';var cache={},doTimeout='doTimeout',aps=Array.prototype.slice;$[doTimeout]=function(){return p_doTimeout.apply(window,[0].concat(aps.call(arguments)));};$.fn[doTimeout]=function(){var args=aps.call(arguments),result=p_doTimeout.apply(this,[doTimeout+args[0]].concat(args));return typeof args[0]==='number'||typeof args[1]==='number'?this:result;};function p_doTimeout(jquery_data_key){var that=this,elem,data={},method_base=jquery_data_key?$.fn:$,args=arguments,slice_args=4,id=args[1],delay=args[2],callback=args[3];if(typeof id!=='string'){slice_args--;id=jquery_data_key=0;delay=args[1];callback=args[2];}
if(jquery_data_key){elem=that.eq(0);elem.data(jquery_data_key,data=elem.data(jquery_data_key)||{});}else if(id){data=cache[id]||(cache[id]={});}
data.id&&clearTimeout(data.id);delete data.id;function cleanup(){if(jquery_data_key){elem.removeData(jquery_data_key);}else if(id){delete cache[id];}};function actually_setTimeout(){data.id=setTimeout(function(){data.fn();},delay);};if(callback){data.fn=function(no_polling_loop){if(typeof callback==='string'){callback=method_base[callback];}
callback.apply(that,aps.call(args,slice_args))===true&&!no_polling_loop?actually_setTimeout():cleanup();};actually_setTimeout();}else if(data.fn){delay===undefined?cleanup():data.fn(delay===false);return true;}else{cleanup();}};})(jQuery);$(document).ready(function(){$('form.content-type-form input').live('change',function(e){$(this).closest('form').submit();});});try{Typekit.load();}catch(e){}
twttr.anywhere(function(twitter){twitter.hovercards();});
