$(document).ready(function() {

	$('#premade_preview').jcarousel({
        auto: 3,
        wrap: 'both',
		scroll: 1,
		animation: 'slow',
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null

    });
	
	$("#premade_preview span").css("display", "none");
	
	$('#premade_preview').hover(function(){
		$("#premade_preview span").fadeIn();
	},
	function(){
		$("#premade_preview span").fadeOut();
	});
	
	$("#services li").click(function() {  
		window.location = $(this).find("h3:first a:first").attr("href");  
	});
	
	$(".questions_list li div").hide();
	
	$(".questions_list li strong").click(function(){
		$(this).parent().find("div").slideToggle('fast');
	});
	
	$(".why").click(function(){
		$(".why_text").slideToggle();
		return false;
	});
	
	
	$('ul#filter a').click(function() {
		$(this).css('outline','none');
		$('ul#filter .current').parent().find("span").hide();
		$('ul#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		$(this).parent().find("span").show();
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filterVal == 'all') {
			$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			
			$('ul#portfolio li').each(function() {
				if(!$(this).hasClass(filterVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
	});

});