jQuery(document).ready(function(){

	//顶部幻灯片
	if(jQuery("#slider").length > 0){
		setTimeout(function(){
			jQuery('#slider').architectorSlider({
				sliderWidth:978,
				sliderHeight:139,
				pauseTime:5000,
				animationSpeed:500,
				effect:'',
				easing:'',
				descriptionOpacity:1,
				numberNav:false,
				numberNavThumb:false,
				numberNavHide:false,
				thumbnailWidth:316,
				thumbnailHeight:70,
				timeLine:true,
				customblocksize:{
					cubeinlinearhor:{height: 80, width: 96},
					cubeinlinearver:{height: 80, width: 96},
					cubeindiagonal:{height: 80, width: 96},
					cubeinrandom:{height: 80, width: 96},
					stripemovehor:{width: 48},
					stripemovever:{height: 20},
					stripefadehor:{width: 48},
					stripefadever:{height: 20},
					stripechangehor:{width: 48},
					stripechangever:{height: 20},
					stripehalfhor:{width: 48},
					stripehalfver:{height: 20},
					stripehalfotherhor:{width: 48},
					stripehalfotherver:{height: 20}
				}
			});
		}, 0);
	}

	//Flash效果增强
	if(jQuery("#fx").length > 0){
		$('#fx').flash({
			src: 'assets/templates/images/fx.swf',
			width: 978,
			height: 400,
			wmode: 'transparent',
			scale: 'showall'
		});
	}

	//滚动图片
	if(jQuery("#rolling-div").length > 0){
		var rollingDiv = jQuery("#rolling-div");	
		rollingDiv.rolling("left", 139, 160, 7);
		var rollingContent = jQuery("#rolling-content > li");
		rollingContent.each(function(i){
			rollingDiv.addRollingItem('<div style="width:142px;height:160px;overflow:hidden;float:left;">'+this.innerHTML+'</div>');
		});
		rollingDiv.bind("mouseover", function() {
			 jQuery("#rolling-div").stopRolling();
		});
		rollingDiv.bind("mouseout", function() {
			 jQuery("#rolling-div").resumeRolling();
		});
		rollingDiv.startRolling(40, 0, 100);
	}

	if($("#popup").length > 0){
		if($("#popup").html()!=''){
			new Boxy($("#popup").html(),
				{
					title: $("#popup").attr('title'),
					closeText: "关闭"
				}
			);
		}
	}

});

