<!doctype html>
<!--[if IE 6]><html id="ie6" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if IE 7]><html id="ie7" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if IE 8]><html id="ie8" dir="ltr" lang="zh-TW"><![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<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, minimum-scale=1.0, user-scalable=0">
<title><?# webTitle ?></title>	
<meta name="author" content="<?# webTitle ?>" />
<meta name="copyright" content="<?# webName ?>版權所有" />
<meta name="description" content="<?# webDescription ?>" />
<meta name="distribution" content="Taiwan" /> 
<meta name="keywords" content="<?# webKeyword ?>" />
<meta name="format-detection" content="telephone=no" />
<meta property="og:url" content="<?# RelLink ?><?# REQUESTURI ?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?# ogTitle ?>" />
<meta property="og:description" content="<?# ogDescription ?>" />
<meta property="og:image" content="<?# ogImage ?>" />
<link href="/css/<?# webTemplates ?>/main.css" rel="stylesheet">
<link href="/css/<?# webTemplates ?>/index.css" rel="stylesheet">
<link href="/jquery/aos/aos.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.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 ?>
	<div id="page-scroll"></div>
    <div id="page-wrap">
		<?# banner ?>
		<div id="aboutBox" class="row">
			<div class="left info">
				<div class="box">
					<h2 class="title"><?# indexAboutTitle1 ?></h2>
					<p class="stitle"><?# indexAboutTitle2 ?></p>
					<?# GoogleSearch ?>
				</div>
			</div>
			<div class="right picture">
				<div class="btn">
					<a id="prevBtn" href="javascript:void(0);" title="PREV"><span></span></a>
					<a id="nextBtn" href="javascript:void(0);" title="NEXT"><span></span></a>
				</div>
				<div class="pictureBox">
					<div class="list" style="background-image:url(<?# aboutImage ?>);">
						<div>
							<article class="text-clamp"><?# aboutIntroduction ?></article>
							<a class="more" href="<?# aboutLink ?>" title="<?# indexAboutLinkT ?>"<?# indexAboutLinkStyle ?>><?# indexAboutLinkT ?></a>
						</div>
					</div>
					<php:repeater id="listPT">
					<template>
					<div class="list" style="background-image:url(<?# Image ?>);">
						<div>
							<article class="text-clamp"><?# Title ?></article>
							<a class="more" href="<?# Link ?>" title="<?# Title ?>" target="_blank">LEARN MORE</a>
						</div>
					</div>
					</template>
					</php:repeater>
				</div>
			</div>
			<div class="triangle-1"></div>
			<div class="triangle-2"></div>
		</div>
		<div id="customBox" class="row">
			<div class="workframe">
				<div class="box cBox">
					<php:repeater id="listC">
					<template>
					<div class="list">
						<h3><?# CustomTitle ?></h3>
						<article class="text-clamp"><?# CustomContent ?></article>
					</div>
					</template>
					</php:repeater>
				</div>
				<div class="box"><?# googlemapBody ?></div>
			</div>
			<div class="bottomBox">
				<div class="triangle-1"></div>
				<div class="triangle-2"></div>
				<div class="triangle-3"></div>
				<div class="triangle-4"></div>
				<div class="triangle-5"></div>
				<div class="triangle-6"></div>
				<div class="img"><img src="/images/32/img-custombottom.png" /></div>
			</div>
		</div>
	</div>
	<div id="contBox"><a href="#contactBox" title="Contact Us"><font class="circle"><span></span><span></span></font><font>Contact Us</font></a></div>
	<?# indexProduct ?>
	<div id="fixBox"></div>
	<div class="wrap">
		<?# indexNews ?>
		<?# indexBook ?>
		<div class="footerBox">
			<div id="contactBox">
				<div class="workframe">
					<h2 class="title" data-aos="fade-down">聯絡我們</h2>
					<form id="form1" data-aos="fade-up">
						<div><label>標題<b>*</b></label><input type="text" id="cTitle" name="cTitle"></div>
						<div><label>姓名<b>*</b></label><input type="text" id="cName" name="cName"></div>
						<div><label>電話<b>*</b></label><input type="text" id="cPhone" name="cPhone"></div>
						<div><label>信箱<b>*</b></label><input type="text" id="cEmail" name="cEmail"></div>
						<div>
							<label>驗證碼<b>*</b></label>
							<input name="Checknum" type="text" class="word_12_black" id="Checknum" onKeyUp="this.value=this.value.toUpperCase();" maxlength="4" />
							<img src="/vdimgck.php" id="rand-img" alt="看不清楚？ 點圖更換新圖片" align="absmiddle" style="cursor:pointer; border:none; width:auto;" onClick="this.src=this.src+'?'">
						</div>
						<div class="send"><a id="cSend" href="javascript:void(0);">送出</a></div>
					</form>
				</div>
			</div>
			 <?# footer ?>
		</div>
	</div>
</div>
</div>
</body>
</html>
<script src="/jquery/aos/aos.js"></script>
<script>
    var w = $(window).width();
    var h = $(window).height();
    var hs = ($(window).height() / 2);
    var h4s = ($(window).height() / 4);
	$(function(){
		$('#aboutBox .picture .pictureBox').slick({
			autoplay: true,
			dots: false,
			prevArrow: $("#prevBtn"),
			nextArrow: $("#nextBtn"),
			infinite: true,
			speed: 300,
			slidesToShow: 1,
			adaptiveHeight: true
		});
		$('#customBox .cBox').slick({
			autoplay: true,
			dots: false,
			arrows: false,
			infinite: true,
			speed: 500,
			fade: true,
			cssEase: 'linear'
		});
		$('#contBox a[href*="#"]:not([href="#"])').click(function() {
			if(w > 1024) $('#page-wrap').css('opacity', '0');
			if(location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname){
				var target = $(this.hash);
				target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
				if(target.length){
					$('html, body').animate({
						scrollTop: target.offset().top
					}, 1000);
					return false;
				}
			}
		});
		$('#cSend').click(function(){
			var ero = 0;
			if($('#cTitle').val() == ''){
				ero = 1;
				alert('請選擇標題!');
				$('#cTitle').focus();
				return false;
			}
			if($('#cName').val() == ''){
				ero = 1;
				alert('請輸入姓名!');
				$('#cName').focus();
				return false;
			}
			if($('#cPhone').val() == ''){
				ero = 1;
				alert('請輸入電話!');
				$('#cPhone').focus();
				return false;
			}
			if($('#cEmail').val() == ''){
				ero = 1;
				alert('請輸入信箱!');
				$('#cEmail').focus();
				return false;
			}
			var reEmail = /^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)+$/;
			if(!reEmail.test($('#cEmail').val())){
				alert('信箱不合法!');
				$('#cEmail').focus();
				ero = 1;
			}
			if($('#Checknum').val() == ''){
				ero = 1;
				alert('請輸入驗證碼!');
				$('#Checknum').focus();
				return false;
			}
			if(ero == 0){
				$.ajax({
					url: '/ajax/contact.php',
					async: false,
					type: 'POST',
					data: {'do':'cont', 'name':$('#cName').val(), 'phone':$('#cPhone').val(), 'email': $('#cEmail').val(), 'title':$('#cTitle').val(), 'checknum':$('#Checknum').val()},
					dataType: 'json',
					success: function(JData){
						alert(JData["Message"]);
						if(JData["Status"] == "0"){
							location.href = location.href;
						}
					},
					error:function(){
						alert('系統異常!請重新整理頁面再試一次!');
						location.href = location.href;
					}
				});
			}
		});
	});
	$(document).ready(function(){
		if(w > 1024) $('#page-scroll').height($('#page-wrap').width()+'px');
		$(window).scroll(function(){
			var scrollH = $(this).scrollTop();   //頁面滾動的高度 
			if(w > 1024) {
				if($('#page-wrap').css('opacity') == 0){
					$('#page-wrap').css('left',-1 * scrollH).css('opacity', '1');
				}else{
					$('#page-wrap').css('left',-1 * scrollH);
				}
				$('#visul .triangle-1').css('transform', 'translate('+(-0.005 * scrollH)+'px, 0px)');
				$('#visul .triangle-2').css('transform', 'translate('+(0.005 * scrollH)+'px, 0px)');
				$('#aboutBox .info .box').css('transform', 'translate('+(-0.09 * scrollH)+'px, 0px)');
				$('#aboutBox [class^="triangle-"]').css('transform', 'translate('+(-0.1 * scrollH)+'px, 0px)');
				$('#customBox .cBox').css('transform', 'translate('+(-0.008 * scrollH)+'px, 0px)');
				$('#customBox .bottomBox >div').css('transform', 'translate('+(-0.08 * scrollH)+'px, 0px)');
				$('#customBox .bottomBox .triangle-2').css('transform', 'translate('+(-0.09 * scrollH)+'px, 0px)');
				$('#customBox .bottomBox .triangle-3').css('transform', 'translate('+(-0.09 * scrollH)+'px, 0px)');
				$('#customBox .bottomBox .triangle-6').css('transform', 'translate('+(-0.07 * scrollH)+'px, 0px)');
				$('#customBox .bottomBox .img').css('transform', 'translate('+(-0.1 * scrollH)+'px, 0px)');
			
				if(h4s+scrollH > $('#fixBox').offset().top){
					$('header').addClass('headerTop');
					$('#contBox').css('height', '0').css('opacity', '0');
				}else{
					$('header').removeClass('headerTop');
					$('#contBox').css('height', 'auto').css('opacity', '1');
				}
			}else{
				if(scrollH > 100){
					$('header').addClass('headerTop');
				}else{
					$('header').removeClass('headerTop');
				}
				if(h4s+scrollH > $('#contactBox').offset().top){
					$('#contBox').css('height', '0').css('opacity', '0');
				}else{
					$('#contBox').css('height', 'auto').css('opacity', '1');
				}
			}
		});
	});
	
	AOS.init();
	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>