$(function() {
    $("#homeCarousel").jCarouselLite({
									 visible: 1,
									 auto: 6000,
									 speed: 1000
									 });
});


$(document).ready(function() {
	/*$("#homeCarousel").jcarousel({
								 visible: 1,
								 buttonNextHTML: null,
								 buttonPrevHTML: null,
								 auto:2,
								 animation:2500,
								 easing:'linear',
								 scroll:1,
								 wrap: 'circular'
								 });*/

	var h1 = 150 + $("body#homepage #headerIntro").height() - 35;
	$("body#homepage #headerMenu").css('top',h1+'px');
	var h2 = 150 + $("body#homepage #headerIntro").height() - 35 + 61 - 235; //d.i. h carousel
	$("body#homepage #wrap #main #content").css('margin-top',h2+'px');
	
	// put all your jQuery goodness in here.
	$("#newsbox h1").click(function(){
		$("#newsbox .all").slideToggle();
		$(this).toggleClass("open");
	});
	
	$(".portfolio li a span").hide();
	$(".portfolio li a").hover(function(){
		$(this).children("span").show();
		$(this).children("img").hide();
	},function(){
		$(this).children("span").hide();
		$(this).children("img").show();
	});
});

/* slideitem */
$(document).ready(function() {
	// put all your jQuery goodness in here.
	$(".closedslideitem h4").addClass("close");
	$(".closedslideitem .box").addClass("hide");
	
	$(".slideitem h4").click(function(){
		$(this).toggleClass("close");
		$(this).parent().children(".box").slideToggle();
	});
});


/* blockquote */
$(document).ready(function() {
	// put all your jQuery goodness in here.
	$("blockquote.atword .content").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>");
	$(".story").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>").wrapInner("<div></div>");
});

/* teammember */
$(document).ready(function() {
	// put all your jQuery goodness in here.
	$(".teammember .txt").hide();
	$(".teammember .viewdetails").addClass("close");
	
	$(".teammember .viewdetails").click(function(){
		$(this).toggleClass("close");
		$(this).parent().children(".txt").slideToggle();
	});
});

/* person */
$(document).ready(function() {
	// put all your jQuery goodness in here.
	$(".person .txt").hide();
	$(".person .viewdetails").addClass("close");
	
	$(".person .viewdetails").click(function(){
		$(this).toggleClass("close");
		$(this).parent().children(".txt").slideToggle();
	});
});

/* news filter */
function changeFilter(dit){
	// alert(dit);
	/*
	$(".filter #buyoutgrowthcapital").hide();
	$(".filter #venturecapital").hide();
	*/
	
	$(".filter .hidden").hide();
	
	if(dit != "default"){
		// alert("#" + dit);
		$(".filter #" + dit).show();
	}
}
$(document).ready(function(){
	changeFilter("default")
});

/* table rows */
$(document).ready(function(){
	$("#content table tr:odd").addClass("odd");
});

/* goSetHeight */
function goSetHeight(dit){	

	var maximaHeight = 0;
	
	$(dit).each(function(){
							   
		nuHeight = $(this).height();
		if(nuHeight > maximaHeight){
			
			maximaHeight = $(this).height();
		}
		
	});

	$(dit).each(function(){
		$(this).height(maximaHeight);
	});
	
};


