 $(document).ready(
				function(){
					$('#news').innerfade({
						animationtype: 'fade',
						speed: 1450,
						timeout: 8000,
						type: 'sequence',
						containerheight: '1em'
					});

			});

		$(document).ready(
                   // $('.c_right').css("float","none");
                   // $('.c_right').css("float","right");
                  
				function(){
					$('.jd_news_scroll ul li').each(function(index){
						var height = $(this).css("height");
						$(this).css("height","135");
						//alert($(this).css("height"));
					})
					$('.jd_news_scroll').each(function(index){

						$(this).css("height","135");
						//alert($(this).css("height"));
					})


			});

			$(document).ready(function() {
	$("#send_msg").validate();
	$("#send_msg_").validate();
});
  	
	$(document).ready(function() {
		$(".topMenuAction").click( function() {
			if ($("#openCloseIdentifier").is(":hidden")) {
				$("#slider").animate({
					marginTop: "-445px"
					}, 500 );
				$("#topMenuImage").html('<img src="open.gif" alt="open" />');
				$("#openCloseIdentifier").show();
			} else {
				$("#slider").animate({
					marginTop: "0px"
					}, 500 );
				$("#topMenuImage").html('<img src="open.gif" alt="close" />');
				$("#openCloseIdentifier").hide();
			}
		});
	});
$(function() {
    $(".anyClass").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"
    });
});
$(document).ready(function(){
         $(".c_right").css("float","none");
         $(".c_right").css("float","right");
         
	$('div.tipContent:visible').hide();
	$('h1').click(function(){
	  var target = $(this).next('div.tipContent')
	  $('div.tipContent:visible').not(target).slideUp();
	  target.slideToggle();
	});
});

$(function(){

	$('#friend_form').submit(function(){
		var inputs = [];
		$(':input',this).each(function(){
			inputs.push(this.name+ '=' + escape(this.value));

		})

		var stop = true;

		$(':input',this).filter('.required').each(function(){

			if(this.value == ''){
				$(this).css('border-color','#900');
				stop = false;
			}else{
				$(this).css('border-color','#777');
			}
			if($(this).is('.email')){
				if(this.value != '' && !/.+@.+\.[a-zA-Z]{2,4}$/
											.test(this.value)){
					$(this).css('border-color','#900');
					stop = false;
				}else if(this.value != ''){
					$(this).css('border-color','#777');
				}
			}

		})

		if(!stop){
			return false;
		}

		$('#dist').html('<span>loading</span>') ;

		jQuery.ajax({
			type:'post',
			data:{uemail2:$('#uemail2').val(),femail2:$('#femail2').val(),subject:$('#subject').val(),msg2:$('#msg2').val(),hid_url:$('#hid_url').val()},
			dataType:'html',
			url:this.action,
			timeout:2000,
			error:function(){
				$('#dist').empty() ;
				$('<span>failed to submit</span>').appendTo('#dist');
			},
			success:function(r){
				$('#dist').empty() ;
				$('<span>'+r+'</span>').appendTo('#dist');
			}
		})


		return false;
	})
})
