
			$(document).ready(
				function(){
					$('.jd_news_scroll ul li').each(function(index){
						var height = $(this).css("height");
						$(this).css("height","135");
						
					})
					$('.jd_news_scroll').each(function(index){
						
						$(this).css("height","135");
						
					})
							
				
			});
			
			//item gallery
			
			$(function() {
			    $(".anyClass").jCarouselLite({
			        btnNext: ".next",
			        btnPrev: ".prev"
			    });
			});
			
			// send to friend
			
			$(document).ready(function(){
				$('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','#909');
						stop = false;
					}else{
						$(this).css('border-color','#666');			
					}
					if($(this).is('.email')){
						if(this.value != '' && !/.+@.+\.[a-zA-Z]{2,4}$/
													.test(this.value)){
							$(this).css('border-color','#909');			
							stop = false;								
						}else if(this.value != ''){
							$(this).css('border-color','#666');
						}
					}	
				
				})
				
				if(!stop){
					return false;	
				}	
				
				//console.log(inputs.join('&'));
					
				$('#dist').html('<span>loading</span>') ;
		
				jQuery.ajax({
					type:'post',
					data:{uemail2:$('#uemail2').val(),subject:$('#subject').val(),msg2:$('#msg2').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;	
			})
		})
		
		// shoping cart validation
		
		$(document).ready(function() {
			$("#send_msg_sc").validate();
		});
		
		// contactus validation
		
		$(document).ready(function() {
			$("#send_msg_ck").validate();
		});
		
		// send acaa validation
		
		$(document).ready(function() {
			$("#send_acaa").validate();
		});

		// slide form
		
		$(document).ready(function(){
			
			$(".btn-slide").click(function(){
					var targetX = $("#panelwrapper").css("left") == "0px"? '-400px':'0px';
				
					$("#panelwrapper").animate({"left": targetX, "opacity": 0.8}, {	duration: "slow" });
					return false;
			});
			
		});

