(function($){$.fn.pjax=function(container,options){if(options)
options.container=container
else
options=$.isPlainObject(container)?container:{container:container}
if(options.container&&typeof options.container!=='string'){throw"pjax container must be a string selector!"
return false}
return this.live('click',function(event){if(event.which>1||event.metaKey)
return true
var defaults={url:this.href,container:$(this).attr('data-pjax'),clickedElement:$(this),fragment:null}
$.pjax($.extend({},defaults,options))
event.preventDefault()})}
$.pjax=function(options){var $container=$(options.container),success=options.success||$.noop
delete options.success
if(typeof options.container!=='string')
throw"pjax container must be a string selector!"
var defaults={timeout:650,push:true,replace:false,data:{_pjax:true},type:'GET',dataType:'html',beforeSend:function(xhr){$container.trigger('start.pjax')
xhr.setRequestHeader('X-PJAX','true')},error:function(){window.location=options.url},complete:function(){$container.trigger('end.pjax')},success:function(data){if(options.fragment){var $fragment=$(data).find(options.fragment)
if($fragment.length)
data=$fragment.children()
else
return window.location=options.url}else{if(!$.trim(data)||/<html/i.test(data))
return window.location=options.url}
$container.html(data)
var oldTitle=document.title,title=$.trim($container.find('title').remove().text())
if(title)document.title=title
var state={pjax:options.container,fragment:options.fragment,timeout:options.timeout}
var query=$.param(options.data)
if(query!="_pjax=true")
state.url=options.url+(/\?/.test(options.url)?"&":"?")+query
if(options.replace){window.history.replaceState(state,document.title,options.url)}else if(options.push){if(!$.pjax.active){window.history.replaceState($.extend({},state,{url:null}),oldTitle)
$.pjax.active=true}
window.history.pushState(state,document.title,options.url)}
if((options.replace||options.push)&&window._gaq)
_gaq.push(['_trackPageview'])
var hash=window.location.hash.toString()
if(hash!==''){window.location.href=hash}
success.apply(this,arguments)}}
options=$.extend(true,{},defaults,options)
if($.isFunction(options.url)){options.url=options.url()}
var xhr=$.pjax.xhr
if(xhr&&xhr.readyState<4){xhr.onreadystatechange=$.noop
xhr.abort()}
$.pjax.xhr=$.ajax(options)
$(document).trigger('pjax',$.pjax.xhr,options)
return $.pjax.xhr}
var popped=('state'in window.history),initialURL=location.href
$(window).bind('popstate',function(event){var initialPop=!popped&&location.href==initialURL
popped=true
if(initialPop)return
var state=event.state
if(state&&state.pjax){var container=state.pjax
if($(container+'').length)
$.pjax({url:state.url||location.href,fragment:state.fragment,container:container,push:false,timeout:state.timeout})
else
window.location=location.href}})
if($.inArray('state',$.event.props)<0)
$.event.props.push('state')
$.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/(iPod|iPhone|iPad|WebApps\/.+CFNetwork)/)
if(!$.support.pjax){$.pjax=function(options){window.location=$.isFunction(options.url)?options.url():options.url}
$.fn.pjax=function(){return this}}})(jQuery);;jQuery(document).ready(function($){$("table.tribe-events-calendar tbody tr").each(function(index){$(this).find("td:gt(3)").addClass("tribe-events-right");});$("table.tribe-events-calendar:not(.tribe-events-calendar-widget) .tribe-events-event:not(.daynum)").live('mouseenter',function(){if($.browser.msie&&$.browser.version==6){var bottomPad=$(this).parents("td").outerHeight()+5;}
else{var bottomPad=$(this).find('a').outerHeight()+18;}
$(this).find(".tribe-events-tooltip").css('bottom',bottomPad).show();}).live('mouseleave',function(){if($.browser.msie&&$.browser.version<=9){$(this).find(".tribe-events-tooltip").hide()}else{$(this).find(".tribe-events-tooltip").fadeOut(200);}});$("table.tribe-events-calendar-widget .tribe-events-event:has(a)").live('mouseenter',function(){if($.browser.msie&&$.browser.version==6){var bottomPad=$(this).outerHeight();}
else{var bottomPad=$(this).outerHeight()+3;}
$(this).find(".tribe-events-tooltip").css('bottom',bottomPad).fadeIn(300);}).live('mouseleave',function(){if($.browser.msie&&$.browser.version<=9){$(this).find(".tribe-events-tooltip").hide()}else{$(this).find(".tribe-events-tooltip").fadeOut(200);}});$(".tribe-events-events-dropdown").live('change',function(){baseUrl=$(this).parent().attr("action");url=baseUrl+$('#tribe-events-events-year').val()+'-'+$('#tribe-events-events-month').val();$('.ajax-loading').show();$.pjax({url:url,container:'#tribe-events-content',fragment:'#tribe-events-content',timeout:1000});});$('.tribe-events-prev-month a, .tribe-events-next-month a').pjax('#tribe-events-content',{timeout:10000,fragment:'#tribe-events-content'}).live('click',function(){$('.ajax-loading').show();});});;;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)
this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);;(function(){$.fn.infiniteCarousel=function(){function repeat(str,n){return new Array(n+1).join(str);}
return this.each(function(){var $wrapper=$('> div',this).css('overflow','hidden'),$slider=$wrapper.find('> ul').width(9999),$items=$slider.find('> li'),$single=$items.filter(':first')
singleWidth=191,visible=Math.ceil($wrapper.innerWidth()/singleWidth),currentPage=1,pages=Math.ceil($items.length/visible);if($items.length%visible!=0){$slider.append(repeat('<li class="empty" />',visible-($items.length%visible)));$items=$slider.find('> li');}
$items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));$items.filter(':last').after($items.slice(0,visible).clone().addClass('cloned'));$items=$slider.find('> li');$wrapper.scrollLeft(singleWidth*visible);function gotoPage(page){var dir=page<currentPage?-1:1,n=Math.abs(currentPage-page),left=singleWidth*dir*visible*n;$wrapper.filter(':not(:animated)').animate({scrollLeft:'+='+left},500,function(){if(page>pages){$wrapper.scrollLeft(singleWidth*visible);page=1;}else if(page==0){page=pages;$wrapper.scrollLeft(singleWidth*visible*pages);}
currentPage=page;});}
$wrapper.after('<a href="#" class="arrow back">&lt;</a><a href="#" class="arrow forward">&gt;</a>');$('a.back',this).click(function(){gotoPage(currentPage-1);return false;});$('a.forward',this).click(function(){gotoPage(currentPage+1);return false;});$(this).bind('goto',function(event,page){gotoPage(page);});$(this).bind('next',function(){gotoPage(currentPage+1);});});};})(jQuery);$(document).ready(function(){$(".hover").css({opacity:0});$(".hover").hover(function(){$(this).stop().animate({opacity:1},300);},function(){$(this).stop().animate({opacity:0},500);});});$(document).ready(function(){$('.hover',this).click(function(){window.location=$(this).find('.url').text();});});;(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(!fx.colorInit){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);fx.colorInit=true;}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))
return colors['transparent'];return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};})(jQuery);;$(document).ready(function(){$('#secondary-nav ul').superfish({delay:100,animation:{opacity:'show',height:'show'},speed:'fast',autoArrows:false,dropShadows:false});});$(document).ready(function(){$('#primary-nav ul').superfish({delay:200,animation:{opacity:'show',height:'show'},speed:'fast',autoArrows:false,dropShadows:false});});$(document).ready(function(){$("#sidebar .ads-125 img, #sidebar .flickr_badge_image img, .ads-120x240 img").css({backgroundColor:"#f4f4f4"});$("#sidebar .ads-125 img, #sidebar .flickr_badge_image img, .ads-120x240 img").hover(function(){$(this).stop().animate({backgroundColor:"#333333"},300);},function(){$(this).stop().animate({backgroundColor:"#f4f4f4"},500);});});$(document).ready(function(){$("#footer .flickr_badge_image img, #footer .ads-125 img").css({backgroundColor:"#202020"});$("#footer .flickr_badge_image img, #footer .ads-125 img").hover(function(){$(this).stop().animate({backgroundColor:"#141414"},300);},function(){$(this).stop().animate({backgroundColor:"#202020"},500);});});$(document).ready(function(){$(".tz_tab_widget .tab-thumb img, .tab-comments .avatar, .post .post-thumb img, #related-posts .post-thumb img").css({backgroundColor:"#ffffff"});$(".tz_tab_widget .tab-thumb img, .tab-comments .avatar, .post .post-thumb img, #related-posts .post-thumb img").hover(function(){$(this).stop().animate({backgroundColor:"#333333"},300);},function(){$(this).stop().animate({backgroundColor:"#ffffff"},500);});});$(document).ready(function(){$(".tz_tab_widget .tab-tags a").css({backgroundColor:"#ffffff",color:"#999999"});$(".tz_tab_widget .tab-tags a").hover(function(){$(this).stop().animate({backgroundColor:"#3399cc",color:"#ffffff"},300);},function(){$(this).stop().animate({backgroundColor:"#ffffff",color:"#999999"},500);});});$(document).ready(function(){$("#sharing li").css({opacity:0.5});$("#sharing li").hover(function(){$(this).stop().animate({opacity:1},100);},function(){$(this).stop().animate({opacity:0.5},500);});});
