// core.js update:2011.10.08
jQuery(document).ready(function($){
				
		
		
				//多语种控制 begin
				/*$('#language a').eq(1).bind('click',function(){
															 	PopUp('<p style="text-align:center;margin-top:20%;line-height:1.8em;">我們的繁體版本正在更新上線中，敬請您的期待。<br />如有疑問請發電郵聯繫：<a href="mailto:service@xuanhepro.com">service@xuanhepro.com</a><br /><br />宣和視覺設計機構</p>');
																return false;
															 })//eq0 click end*/
															 
				$('#language a').eq(100).bind('click',function(){
															 	PopUp('<p style="text-align:center;margin-top:20%;line-height:1.8em;">Our website will be revised till 20th Nov.<br />We apologize exceedingly to you for any inconvenience.<br />During this term if you have some comments and suggestion, <br />welcome to contact : <a href="mailto:service@xuanhepro.com">service@xuanhepro.com</a><br /><br />Xuanhe Vision</p>');
																return false;
															 })//eq0 click end											 
															 	
				//多语种控制 end
				function PopUp(string){
							if($('#J-popup-bg').length<=0)
																{
																	$('body').prepend('<div id="J-popup-bg"><div id="J-popup"></div></div>');
																}
																
													  			$('#J-popup-bg').fadeIn('slow');
																$('#J-popup').empty().css({width:'500px',height:'400px'}).append(string);
																$('#J-popup').css({marginLeft:'-'+$('#J-popup').width()/2+'px',marginTop:'-'+$('#J-popup').height()/2+'px'});
																$(window).bind('resize',function(){
																		$('#J-popup').css({marginLeft:'-'+$('#J-popup').width()/2+'px',marginTop:'-'+$('#J-popup').height()/2+'px'});
																	 })//window.resize
																$('#J-popup').click(function(){return false;})
																$('#J-popup-bg').click(function(){$(this).fadeOut('slow');});
													   
					}//popup end
				
				//艺术家顾问 载入艺术家顾问简介 begin
				
				
				if($('#consultant-sliders .J-sliders-wrapper li').length>1)
				{
					$('#consultant-sliders').slider({
																		  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																		  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																		  paginationWrapper:'.J-pagination-wrapper',//the pagination wrapper 分页按扭父容器
		 																  pagination:'.J-pagination-wrapper li', //the pagination button 分页按扭
																		  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																		  time:1000,//滑动时间
																		  width:600,//幻灯宽度
																		  height:365,//幻灯高度
																		  autoplay:true
																		});
				}
				
				
				if($('#consultant-menu-wrapper .J-sliders-wrapper li').length>3)
				{
					$('#consultant-menu-wrapper').hover(function(){$('#consultant-menu-pn').fadeIn();},function(){$('#consultant-menu-pn').fadeOut();})
					$('#consultant-menu-wrapper').slider({
																		  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																		  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																		  prev:'#consultant-menu-pn .prev',
																		  next:'#consultant-menu-pn .next',
																		  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																		  time:1000,//滑动时间
																		  width:110,//幻灯宽度
																		  height:350,//幻灯高度
																		  step:3
																		});
				}
				
				var pid;
				$('#consultant-menu-wrapper li a').click(function(){
															   		$('#consultant-sliders:visible').hide();
																	if($(this).attr('href')!=-1)
																	{
																		$('#consultant-resume-wrapper').fadeIn('fast').empty().load($(this).attr('href')+' #consultant-resume',
																																		 function(){
																																				if($("#consultant-resume-txt").height()>410)
																																				{
																																					$("#consultant-resume-txt").css({height:'30em'});
																																					$('#consultant-resume-readmore').show().click(function(){
																																									
																																									
																																									
																																									if($('#J-popup-bg').length<=0)
																																									{
																																										$('#consultant-resume-wrapper').append('<div id="J-popup-bg"><div id="J-popup"></div></div>');
																																									}
																																									$('#J-popup-bg').fadeIn('slow');
																																									$('#J-popup').empty().append($('#consultant-resume-txt').html());
																																									$('#J-popup').css({width:'50%',height:'80%'});
																																									$('#J-popup').css({marginLeft:'-'+$('#J-popup').width()/2+'px',marginTop:'-'+$('#J-popup').height()/2+'px'});
																																									$(window).bind('resize',function(){
																																											$('#J-popup').css({marginLeft:'-'+$('#J-popup').width()/2+'px',marginTop:'-'+$('#J-popup').height()/2+'px'});
																																										 })//window.resize
																																									$('#J-popup').click(function(){return false;})
																																									$('#J-popup-bg').click(function(){$(this).fadeOut('slow');});
																																									
																																					});//#consultant-resume-readmore click
																																					

																																				};
																																			 }//
																																		);
																	}
																	else
																	{
																		$('#consultant-resume-wrapper').fadeIn('fast').empty().html('<h5 style="text-align:center;margin-top:30%;">暂无相关简介</h5>');
																	}
																	return false;
															   })
				//艺术家顾问 载入艺术家顾问简介 end
				
				//战略合作 begin
				$('#cooperation-source-icon-sliders li a').hover(function(){
																		  	$(this).find('img').stop().animate({marginTop:'-77px'});
																		  },
																		  function(){
																			  $(this).find('img').stop().animate({marginTop:0});
																			  }
																		  )
				//战略合作 end
				//案例 begin
				if($('#case-thumb li').length>3)
				{
					$('#case-thumb-slider').hover(function(){$('#case-thumb-pagination').fadeIn();},function(){$('#case-thumb-pagination').fadeOut();})
					$('#case-thumb-slider').slider({
																		  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																		  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																		  direction:'vertical',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																		  prev:'.up',//pre-slider button 上一张幻灯按扭 可选
		  																  next:'.down',//next-slider button 下一张按扭 可选
																		  time:1000,//滑动时间
																		  width:968,//幻灯宽度
																		  height:150,//幻灯高度
																		  step:3
																		});
				}
				
				$('.case-thumb-list').hover(function(){
																		  	$(this).find('img').stop().animate({marginTop:'0px'});
																			$(this).find('.btn-zoom').stop().css({display:'block'}).animate({opacity:'1'});
																			$(this).find('span').stop().css({display:'block'}).animate({opacity:'1'});
																		  },
																		  function(){
																			  $(this).find('img').stop().animate({marginTop:'-150px'});
																			  $(this).find('.btn-zoom').stop().animate({opacity:'0'},function(){$(this).css({display:'none'})});
																			  $(this).find('span').stop().animate({opacity:'0'},function(){$(this).css({display:'none'})});

																			  }
										 								  )//
				
				if($('#case-macbook-sliders li').length>1)
				{
					$('#case-macbook .hidden').css({display:'block'});
					$('#case-macbook').slider({
																			  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																			  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																			  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																			  prev:'.case-prev',//pre-slider button 上一张幻灯按扭 可选
																			  next:'.case-next',//next-slider button 下一张按扭 可选
																			  time:1000,//滑动时间
																			  width:545,//幻灯宽度
																			  height:345,//幻灯高度
																			  autoplay:true
																			});
				}
				//macbook 幻灯 end
				
				if($('#case-imac-sliders li').length>1)
				{
					$('#case-imac .hidden').css({display:'block'});
					$('#case-imac').slider({
																			  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																			  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																			  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																			  prev:'.case-prev',//pre-slider button 上一张幻灯按扭 可选
																			  next:'.case-next',//next-slider button 下一张按扭 可选
																			  time:1000,//滑动时间
																			  width:598,//幻灯宽度
																			  height:338,//幻灯高度
																			  autoplay:true
																			});
				}//ipad 幻灯 end
				
				if($('#case-ipad-sliders li').length>1)
				{
					$('#case-ipad .hidden').css({display:'block'});
					$('#case-ipad').slider({
																			  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																			  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																			  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																			  prev:'.case-prev',//pre-slider button 上一张幻灯按扭 可选
																			  next:'.case-next',//next-slider button 下一张按扭 可选
																			  time:1000,//滑动时间
																			  width:441,//幻灯宽度
																			  height:352,//幻灯高度
																			  autoplay:true
																			});
				}//ipad 幻灯 end
				
				if($('#case-normal-sliders li').length>1)
				{
					$('#case-normal .hidden').css({display:'block'});
					$('#case-normal').slider({
																			  slidersWrapper:'.J-sliders-wrapper',//幻灯父容器 必填项
																			  slider:'.J-sliders-wrapper li',//the sliders 幻灯
																			  direction:'horizontal',//direction of the slider 幻灯方向，可选为:horizontal 或者 vertical
																			  prev:'.case-prev',//pre-slider button 上一张幻灯按扭 可选
																			  next:'.case-next',//next-slider button 下一张按扭 可选
																			  time:1000,//滑动时间
																			  width:694,//幻灯宽度
																			  height:543,//幻灯高度
																			  autoplay:true
																			});
				}//normal 幻灯 end
				
				//案例 end
				
});

