$(function(){Actcs.init()});var Actcs={init:function(){$('#feature').each(function(){Actcs.homefeature()});Actcs.navbar()},navbar:function(){var right=$('#rightcolumn').height();var nav=$('#nav').height();var left=$('div.leftcontent').height();var minheight=right-nav;if(left<minheight){$('div.leftcontent').css('height',minheight+'px')}},homefeature:function(){$('#feature div.thumbs img.thumb').click(function(){clearTimeout(Actcs.homefeature_timer);Actcs.homefeature_trigger($(this))}).css({cursor:'pointer'});$('#feature div.thumbs img.thumb:first').trigger('click')},homefeature_timer:false,homefeature_trigger:function(e){var $thumb=$(e).parents('li:first');var $img=$('.item',$thumb);var $box=$('#actcs_home_feature_content');var $title=$img.attr('title');var $link=$img.attr('href');var $target=$img.attr('target');var overlay='';if($link!='#'){overlay='<div class="overlay"><a href="'+$link+'" target="'+$target+'"><img src="resources/images/site/actcs/find_out_more_button.png" border="0" alt="Find out more" class="findout" /></a><p>'+$title+'</p></div>';$newlink=$('<a></a>').attr({target:$target,href:$link,title:$title})}else{overlay='<div class="overlay"><p>'+$title+'</p></div>';$newlink=$('<span></span>').attr({title:$title})}var $newimg=$('<img/>').attr('src',$('img:first',$img).attr('src'));$newlink.css({position:'absolute',zIndex:30}).html($img.html()).addClass('bigimg');$('.bigimg:first',$box).css({position:'absolute',zIndex:40});$box.append($newlink);$('#feature div.thumbs .on').removeClass('on');$thumb.addClass('on');clearTimeout(Actcs.homefeature_timer);$('img',$box).bind('load',function(){$('.bigimg:first',$box).not($newlink).fadeOut(function(){$(this).remove()});$('.overlay',$box).remove();$box.append(overlay);Actcs.homefeature_timer=setTimeout(function(){Actcs.homefeature_auto()},5000)})},homefeature_auto:function(){clearTimeout(Actcs.homefeature_timer);var $current=$('#feature div.thumbs li.on');var $next=$current.next('li');if(!$next.length){$next=$('#feature div.thumbs li:first')}Actcs.homefeature_trigger($('img.thumb',$next))}};


