Cufon.replace('h3', { 
	fontFamily: 'Archer', 
	hover: true,
	fontWeight : 350
});

Cufon.replace('.read_more', { 
	fontFamily: 'Archer', 
	hover: true,
	fontWeight : 350
});

Cufon.replace('.summary', { 
	fontFamily: 'Archer', 
	hover: true,
	fontWeight : 400
});

Cufon.replace('ul#nav li', { 
	fontFamily: 'ITC Avant Garde Gothic', 
	hover: true
});

Cufon.replace('p.archer', { 
	fontFamily: 'Archer',
	hover: true,
	fontWeight : 350
});

$(function() {
	$('#login_container').hide();
		
	 $("a[href^=http]").each(
    	function(){
        	if(this.href.indexOf(location.hostname) == -1) {
        		$(this).attr('target', '_blank');
      		}
    	}
  	)

	$('a.groupThumbsLinkSmall').hover(function(){
    	$(this).nextAll('.related_marker').show();	
    	var catName = $(this).parent().next('.author_name').html();
    	$('#hover_category_title').html("<b>Read about: </b>"+catName);
    }, function(){
    	$(this).nextAll('.related_marker').hide();
		$('#hover_category_title').html("");
    });
	
    $("h2")
        .wrapInner("<span>")

    $("h2 br")
        .before("<span class='spacer'>")
        .after("<span class='spacer'>");
       
        
    $('.hover_marker').hide();
    $('.contributor_thumb_marker').hide();
    $('.related_marker').hide();

	$('.related_entry_container a, .frontpage_thumbnail a').hover(function(){
    	$(this).next().show();
    	var id = $(this).nextAll('.hover_entry_number').text();
    	
    	$.post("http://www.redeemercentral.com/scripts/related_hover.php", {entryid: id}, function(data){
  			$('#hover_entry_title').html("<b>"+data+"</b>");
		});
    }, function(){
    	$(this).next().hide();
    	$('#hover_entry_title').text("");
    	id = 0;
    });

        
    $('.spotlight_single_entry p:first').next().css("font-weight", "bold");
          
    
    	//SINGLE ENTRY IMAGE SCOLLER
	var $panels2 = $('#scroll_cont .scroller_cont > div');
	var $container2 = $('#scroll_cont .scroller_cont');
	var horizontal2 = true;
	
	if (horizontal2) {
		$panels2.css({
	    	'float' : 'left',
	    	'position' : 'relative' // IE fix to ensure overflow is hidden
	  	});
	  	if($panels2[0]){
		  	$container2.css('width', ($panels2[0].offsetWidth * $panels2.length) + 50);
	  	}
	}
	
	var $scroll2 = $('#scroll_cont .scroller').css('overflow', 'hidden');
	  
	function selectNavTwo() {
		$(this).parents('ul:first').find('a').removeClass('selected').end().end().addClass('selected');
	}
	
	$('#scroll_cont .image_nav').find('a').click(selectNavTwo);
	
	function triggerTwo(data) {
		var el = $('#scroll_cont .image_nav').find('a[href$="' + data.id + '"]').get(0);
		selectNavTwo.call(el);
	}
	
	if (window.location.hash) {
		triggerTwo({ id : window.location.hash.substr(1) });
	} else {
		$('ul.image_nav a:first').click();
	}
	
	var offset2 = parseInt((horizontal2 ? 
		$container2.css('paddingTop') : 
		$container2.css('paddingLeft')) 
		|| 0) * -1;
	
	var scrollerOptions = {
		target: $scroll2,
		items: $panels2,
		navigation: '.image_nav a',
		axis: 'xy',
		onAfter: triggerTwo,
		offset: offset2,
		duration: 600,
		easing: 'swing',
		cycle: false
	};
	
	$('#scroll_cont').serialScroll(scrollerOptions);
	$.localScroll(scrollerOptions);
	scrollerOptions.duration = 1;
	$.localScroll.hash(scrollerOptions);
});