<!doctype html>
<!--[if IE 8 ]><html dir="ltr" lang="zh-TW" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="ltr" lang="zh-TW" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="ltr" lang="zh-TW">
<!--<![endif]-->
<head>
<!--[if lt IE 9]>
<script src="/js/html5.js"></script>
<![endif]-->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?# webTitle ?></title>
<meta name="keywords" content="<?# webKeyword ?>" />
<meta name="description" content="<?# webDescription ?>" />
<meta property="og:title" content="<?# webTitle ?>"/>
<meta property="og:type" content="<?# webDescription ?>"/>
<meta property="og:url" content="<?# HTTPHOST ?><?# REQUESTURI ?>"/>
<meta property="og:image" content="<?# HTTPHOST ?><?# logoImage ?>"/>
<link rel="index" title="<?# webTitle ?>" href="<?# RelLink ?>/index.html" />
<link rel="sitemap" type="htm" title="<?# webTitle ?>" href="<?# RelLink ?>/sitemap.xml" />
<link rel="alternate" type="application/rss+xml" href="<?# RelLink ?>/rss.xml" title="<?# webKeyword ?>" />
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/normalize.css">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/main.css">
<link rel="stylesheet" href="/css/<?# webTemplates ?>/index.css">
<script src="/jquery/jquery-1.10.js"></script>
<script src="/jquery/Masonry/masonry.pkgd.min.js"></script>
<?# headHTML ?>
</head>
<body<?# JumpBody ?>>
<?# bodyTopHTML ?>
<div class="webBox" style="margin: 0; padding: 0; border: 0; width: 100%;<?# JumpStyle ?>">
<?# JumpHTML ?>
<?# JumpScript ?>
<?# webH1 ?>
<div class="wrapper">
    <?# header ?>
    <?# banner ?>
    <div id="scrollDown" class="srcollBtn"><p><span>SCROLL DOWN</span></p></div>
	<div id="video">
		<div class="videowrap">
			<div class="video-info">
				<div class="title">
					<span><?# videoEnTitle ?></span>
					<h3><?# videoCnTitle ?></h3>
				</div>
				<div class="desc"><?# videoDesc ?></div>
				<p class="videobtn"><a href="<?# videoButtonLink ?>" title="查看更多">查看更多</a></p>
			</div>
			<div class="videobox">
				<div class="video-bg">
					<img src="/images/25/video-blank.png">
					<video preload="" muted autoplay playsinline controls loop poster="<?# videoImg ?>">
					    <source src="<?# videoLink ?>" type="video/mp4" ></source>
					    您的瀏覽器不支援此 HTML5 影片標籤
					    Your browser doesn't support the video tag.
					</video>
				</div>
			</div>
		</div>
	</div>
	<div id="ssbanner" class="wow">
    	<div class="workframe">
    		<div class="sectionTitle"><h2 class="inviewzoomIn" data-scroll=""><?# ssbanerTitle ?><span><?# ssbanerSubtitle ?></span></h2></div>
	        <div class="bxslider">
	            <php:repeater id="listPT">
	            <template>
	            <div class="ssbanner-item"  style="background-image:url(<?# Image ?>);"><a href="<?# Link ?>" title="<?# Title ?>" target="_blank"><img src="/images/25/ssbanner-blank.png" alt="<?# Title ?>" /><p><?# Title ?><span>MORE</span></p></a></div>
	            </template>
	            </php:repeater>
	        </div>
    	</div>
    </div>
    <?# indexNews ?>
    <?# indexArticle ?>
    <?# indexBook ?>
	<div style="clear: both;"></div>
	<?# indexProduct ?>
   	<div class="otherBox <?# customClass ?>">
		<div class="workframe otherslide">
			<div class="item c1"><article class="wow"><div class="othertitle"><h3><?# customTitle1 ?></h3></div><font><?# customContent1 ?></font></article></div>
			<div class="item c2"><article class="wow"><div class="othertitle"><h3><?# customTitle2 ?></h3></div><font><?# customContent2 ?></font></article></div>
			<div class="item c3"><article class="wow"><div class="othertitle"><h3><?# customTitle3 ?></h3></div><font><?# customContent3 ?></font></article></div>
		</div>
	</div>
   	<?# googlemapBody ?>
    <?# footer ?>
</div>
</div>
</body>
</html>
<link rel="stylesheet" href="js/swiper/swiper.css">
<link rel="stylesheet" href="js/swiper/animate.min.css">
<script src="/js/swiper/swiper.min.js"></script>
<script src="/js/swiper/swiper.animate1.0.3.min.js"></script>
<script type="text/javascript">
	$(function(){
	    $(window).scroll(function (){
	    	// 可使用 data- 資料屬性 or 自創一個class 給jqery找
	        $('[data-scroll]').each(function(){
	            var elemPos = $(this).offset().top;
	            var scroll = $(window).scrollTop();
	            var windowHeight = $(window).height();
	            if (scroll > elemPos - windowHeight + 200){
	                $(this).addClass('TitlezoomIn');
	            }
	        });
	    });
	    var scrollDown = $("#scrollDown p");
	    var headerhight = $("header").height();
	    var videopos = $("video").offset().top;
	    scrollDown.click(function(){
	    	$('html, body').animate({scrollTop:videopos - headerhight},400);
	    });
		$('#g-map iframe').css('height',$('.bookList').eq(0).height()+'px');
		$("[data-fancybox]").fancybox({
			youtube : { controls : 0,showinfo : 0 },
			vimeo : { color : 'f00' }
		});
		$('.bxslider').slick({
			slidesToShow: 3,
			slidesToScroll: 1,
			autoplay: true,
			arrows: false,
			responsive: [{
				breakpoint: 1024,
				settings: { slidesToShow: 2,slidesToScroll: 1, }
			},{
				breakpoint: 640,
				settings: { slidesToShow: 1,slidesToScroll: 1, }
			}]
		});
		$('.otherslide').slick({
			slidesToShow: 3,
			slidesToScroll: 1,
			autoplay: true,
			arrows: false,
            responsive: [{
                breakpoint: 1024,
				settings: { slidesToShow: 2,slidesToScroll: 1, }
			},{
				breakpoint: 640,
				settings: { slidesToShow: 1,slidesToScroll: 1, }
			}]
		});
		var swiper = new Swiper('.swiper-container', {
			slidesPerView: 1,
			loop:true,
			effect : 'fade',
			fadeEffect: {
				crossFade: false,
				allowTouchMove : false
			},
			autoplay: {
				delay: 5000,
				disableOnInteraction: false,
			},
			on:{
			init: function(){
				swiperAnimateCache(this); //隐藏动画元素
				swiperAnimate(this); //初始化完成开始动画
			},
			slideChange: function(){
				swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
			}
			},autoPlay:true
		});
	      
		$('.grid').masonry({
			itemSelector: '.grid-item',
			columnWidth: '.grid-sizer',
			percentPosition: true,
			transitionDuration: '0.8s',
		});
		
		var w = $(window).width();
		if( w > 480){
			wow = new WOW({
				animateClass: 'animated',
				offset:       200,
				callback:     function(box) {
					console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
				}
			});
			wow.init();
		}else{
			if(w < 1025){
				$('#g-map iframe').css('height', 'auto');
			}
		}
	});
	
	document.body.oncopy = event => {
		event.preventDefault();
		let textFont,
		copyFont = window.getSelection(0).toString();
		if(copyFont.length > 10){
			textFont = copyFont + '\n\n' + '原文網址: <?# webTitle ?> <?# RelLink ?><?# REQUESTURI ?>\n' + '著作權歸作者所有。商業轉載請聯絡作者獲得授權，非商業轉載請註明出處。';
		}else{
			textFont = copyFont;
		}
		if(event.clipboardData){
			return event.clipboardData.setData('text', textFont);
		}else{// 相容IE
			return window.clipboardData.setData('text', textFont);
		}
	};
</script>