//Coded By Tolga Can

$(document).ready(function(){
    
    $(".tabs li").click(function () {
	  $(".active").removeClass("active");
			$(this).addClass('active');
			$(".tabs_cont").hide();  
			var child = $(this).children("a").attr("title");
			$("#"+child).slideDown();
    });




	if (!$.browser.safari) {

			$(".ext_gal").click(function(){
			  $("#gallery2,#gallery2_cont").animate({ 
				height: "360px"
				}, 700 );
				$(".min_gal,.prev,.next").show();  
				$("#gallery2_cont ul").show();
				$(".ext_gal").hide();  

			});


			$(".min_gal").click(function(){
			  $("#gallery2,#gallery2_cont").animate({ 
				height: "15px"
				}, 700 );

				$(".min_gal,.prev,.next").hide();  
				$("#gallery2_cont ul").hide();
				$(".ext_gal").show();  

			});

	}else{

		$(function() {
				$(".min_gal,.ext_gal").hide();  
		});
	
	}


	$(".close_gal").click(function () {
	  $("#gallery2,#gallery2_cont").animate({ 
		height: "0px"
		}, 200 );
	  $("#gallery").slideUp();
	});









	$(function() {
		$("#portf_cont").jCarouselLite({
			visible: 1,
			auto: 3500,
			speed: 500,
			btnNext: ".next",
			btnPrev: ".prev"
		});
	});




	$(function() {
		$("#gallery2_cont").jCarouselLite({
			visible: 1,
			auto: 3500,
			speed: 500,
			btnNext: ".next",
			btnPrev: ".prev"
		});
	});


			
			
	$(".gallery_image").hover(
		
		function(){
			$(this).animate({ 
			opacity: ".50"
			}, 250 );
		},
		function(){
			$(this).animate({ 
			opacity: "100"
			}, 200 );
		}

	);


});