Cufon.replace('h2.section-title, p.phone-contact, h2#slogan, .slider h2, .slider h3, .slider p.desc, .menu h4');
Cufon.replace('h2.section-title', { textShadow: "1px 1px 1px #ddd" } );

function slider_initCallback(carousel) {
  $('.thumb_links li a').bind('click', function() {
    var index_num = $(this).attr('id').toString().replace('thumb_','');
    carousel.scroll(jQuery.jcarousel.intval(index_num));
    return false;
  });
  $('#logos li a').bind('click', function(){
    var index_num = $(this).attr('id').replace('logo_', '');
    carousel.scroll(jQuery.jcarousel.intval(index_num));
    return false;
  });
};

$(function(){
	$(".thumbs ul li a").hover(function() {
		this.title = "";
		$(".thumbs").append("<p class='screenshot'><span class='pointer notext'>&nbsp;</span><img src='"+ this.rel +"' /></p>");
		var screen_width = $('.thumbs .screenshot').outerWidth();
		var screen_height = -1* $('.thumbs .screenshot').outerHeight() - 4;
		var this_left = $(this).position().left + parseInt($(this).outerWidth() / 2) - parseInt(screen_width / 2);
		$("p.screenshot").css("left", this_left + "px").css('top', screen_height).fadeIn("fast");
	}, function() {
		$("p.screenshot").remove();
  });
    
	$('.slider ul').jcarousel({
    initCallback: slider_initCallback,
		animation: "slow",
		auto: 5,
    scroll: 1,
		visible: 1,
		wrap: "both"
	});	
	
	$('.logos ul').jcarousel({
                animation: "slow",
                auto: 5,
		scroll: 1,
		wrap: "circular"
	});
	
	$('.thumbs ul li').hover(
		function() { $(this).addClass('hover') },
		function() { $(this).removeClass('hover')}
	);

  /*
	$('.menu ul li h4 a').click(function(){
		var expander = $(this).parent().parent().find('.wrapper');
		
		if (expander.is(':visible') ) {
			expander.slideUp();
		}
		else { expander.slideDown(); }
		return false; 
	});
  */
        
	$('.our-clients .column-right ul li:nth-child(2)').css('margin','0 35px');
})
