function mycarousel_initCallback(carousel) {
  jQuery('#features-nav .features-nav-item').bind('click', function() {
    carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
    return false;
  });
};

jQuery(document).ready(function() {
  jQuery("#features").jcarousel({
    scroll: 1,
    initCallback: mycarousel_initCallback,
    buttonNextHTML: null,
    buttonPrevHTML: null
  });
});	

jQuery(document).ready(function() {
	$("#features-nav .features-nav-item").click(function(){
	    $("#features-nav .features-nav-item").removeClass("current").addClass("");
	    $(this).addClass("current");
	});
});

jQuery(document).ready(function() {
  jQuery("#screenshots").jcarousel({
    scroll: 1,
	itemFallbackDimension: 805,
  });
});

jQuery(document).ready(function() {
	var el = $('#portfolio-services');
		if(el.html()) { el.html(el.html().replace(/, /ig, "</li><li>")); }
});

$(document).ready(function(){ 

 $('.aktt_tweets').scrollbar({
		 arrows: false
	 }); 

	$('#nav').find('a[href*="custom-computers"]').addClass('custom-computers'); 
	$('#nav').find('a[href*="help-at-home"]').addClass('help-at-home'); 
	$('#nav').find('a[href*="web-design"]').addClass('webdesign'); 
	
	$("#nav ul.menu ul").css({ display: 'none' });
	$("#nav ul.menu li").hover(function() {
		$(this).children('ul.sub-menu')
			.stop(true, true).delay(50).animate({ "height": "show", "opacity": "1" }, 200 );
	}, function(){
		$(this).children('ul.sub-menu')
			.stop(true, true).delay(50).animate({ "height": "hide", "opacity": "0" }, 200 );
	});
	
	$(".portfolio_info").css({ display: 'none' });
	$(".portfolio ").hover(function() {
		$(this).children('.portfolio_info')
			.stop(true, true).delay(50).animate({ "height": "show", "opacity": "1" }, 200 );
	}, function(){
		$(this).children('.portfolio_info')
			.stop(true, true).delay(50).animate({ "height": "hide", "opacity": "0" }, 200 );
	});

});


