jQuery(document).ready(function() {

var fullContentHeight=jQuery(".content").height();

var contentHeight=  jQuery(".content").height()-jQuery(".content").find("header").height();
if(jQuery('#mycarousel').height()<contentHeight){

}
else{

	  	jQuery('#mycarousel').jcarousel({
	        vertical: true,
	        scroll: 1			
	    });	
		
	   var liHeight=0;
	   var showCount=0;
	 //  alert(jQuery("#mycarousel").find("li").length);
	   jQuery("#mycarousel").find("li").each(function(){

		if(liHeight+jQuery(this).height()+13+40+40>contentHeight)
		return;				
		 liHeight=liHeight+jQuery(this).height()+13; //
		 showCount++;
		 });
	
		 
		
		jQuery('.jcarousel-container').height(liHeight);
		jQuery('.jcarousel-clip').height(liHeight);
	 
} 

//alert(jQuery("#mycarousel")).height();

   jQuery(".usedTime").hover(
	   function() { 
		//jQuery(this).parents(".time90").css('background-color', '#F26624');
		jQuery(this).parents("li").css('background-color', '#F26624');
		jQuery(this).css('color', '#FFFFFF');
		jQuery(this).css('text-decoration', 'none');
		jQuery(this).parents('time').css('border-bottom', '1px dashed #FFFFFF');
	}, function() {
		jQuery(this).css('color', '#F26624');
		jQuery(this).parents('time').css('border-bottom', '1px dashed #F26624');
		//jQuery(this).parents(".time90").css('background-color', '#FFFFFF');
		jQuery(this).parents("li").css('background-color', '#FFFFFF');
    });

	jQuery(".cityItem").hover(function() {
		jQuery(this).find('span').css('border-bottom', '1px dashed #ffffff');
		jQuery(this).find('span').css('color', '#ffffff');
	},
	function() {
		jQuery(this).find('span').css('border-bottom', '1px dashed #F04D00');
		jQuery(this).find('span').css('color', '#F04D00');
	;});
	
});
