$(document).ready(function(){

	$("#slides").cycle({ 
		timeout: 4000,
		speed: 1000

	}); 
	$("#portfolio-slider").after('<div class="dots">').cycle({
		timeout: 6000,
		speed: 1000,
		pager: '.dots'
	});
		
	$("#testimonial").before('<div class="dots">').cycle({ 
		timeout: 15000,
		speed: 1000,
		pager: '.dots'
	}); 	


	$('#tabs div').hide();
	$('#tabs div:first').show();
	$('#tabs ul li:first').addClass('active');
	$('#tabs ul li a').hover(function(){ 
		$('#tabs ul li').removeClass('active');
		$(this).parent().addClass('active'); 
		var currentTab = $(this).attr('href'); 
		$('#tabs div').hide();
		$(currentTab).show();
		return false;
	}); 


/*
	$("#header-image").hover(function() {
	
		$(".portfolio-link").css("visibility","visible");
	
	}, function() {
		$(".portfolio-link").css("visibility","hidden");
	
	
	});
*/
	
	$('ul.hover_block li').hover(function(){
		$(this).find('img').fadeOut("fast");
	}, function(){
		$(this).find('img').fadeIn("fast");
	});
	$('ul.hover_block2 li').hover(function(){
		$(this).find('img').fadeOut("fast");
	}, function(){
		$(this).find('img').fadeIn("fast");
	});

	$(".portfolio-item").click(function() {
		window.location = $("a",this).attr("href");	
	});
	
	
/*
	$(".menu a").hover(function() {
		if (!$(this).parent().hasClass("current_page_item") || $(this).parent().hasClass("current_page_parent")) 
			$(this).animate({color:"#ff9999"},300);
		
	}, function() {
	
		$(this).animate({color:"#ffffff"},10);
	});
*/
	$(".portfolio-item").hover(function() {
		$(this).animate({borderTopColor: "#ff9999", borderRightColor: "#ff9999", borderBottomColor: "#ff9999", borderLeftColor: "#ff9999"}, 500);
	}, function() {
		$(this).animate({borderTopColor: "#ededed", borderRightColor: "#ededed", borderBottomColor: "#ededed", borderLeftColor: "#ededed"}, 200);
	});
	
});


