diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 876e3c4..c210a8b 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -66,6 +66,8 @@ $routes->group('', ['namespace' => 'App\Controllers\Article'], static function ( $routes->get('getResultList', 'Receipt::getResultList'); $routes->get('excel', 'Receipt::excel'); + $routes->post('saveTel', 'Receipt::saveTel'); // 연락가능전화 저장 + }); /** @@ -623,6 +625,12 @@ $routes->group('manage', ['namespace' => 'App\Controllers\Manage'], function ($r $routes->get('loginlog/excel', 'LoginLog::excel'); }); +/** + * 금리비교 + */ +$routes->group('interest_rates', ['namespace' => 'App\Controllers\Interest'], function ($routes) { + $routes->get('interest/lists', 'Rates::lists'); +}); /** * 로그인 API diff --git a/app/Controllers/Article/Receipt.php b/app/Controllers/Article/Receipt.php index a7f6746..5b685ad 100644 --- a/app/Controllers/Article/Receipt.php +++ b/app/Controllers/Article/Receipt.php @@ -173,4 +173,28 @@ class Receipt extends BaseController return view("pages/article/receipt/detail", $this->data); } + + + // 연락처 저장 + public function saveTel() + { + try { + + $tel = $this->request->getPost('agent_tel'); + + $this->model->saveTel($tel); + + + return $this->response->setJSON([ + 'code' => '0', + 'msg' => 'success' + ]); + + } catch (\Exception $e) { + return $this->response->setJSON([ + 'code' => '9', + 'msg' => $e->getMessage(), + ]); + } + } } \ No newline at end of file diff --git a/app/Controllers/Interest/Rates.php b/app/Controllers/Interest/Rates.php new file mode 100644 index 0000000..9aa56a2 --- /dev/null +++ b/app/Controllers/Interest/Rates.php @@ -0,0 +1,40 @@ +model = new RatesModel(); + $this->codeModel = new CodeModel(); + } + + public function lists(): string + { + + $codes = $this->codeModel->getCodeLists(['BANK', 'INSURANCE', 'LOAN_PLACE']); // 코드조회 + + $placeArr = []; + foreach ($codes as $c) { + if ($c['category'] == "LOAN_PLACE") { + array_push($placeArr, $c); + } + + } + + $data = $this->model->getLists(); + + + $this->data['place'] = $placeArr; + $this->data['data'] = $data; + + return view("pages/interest/list", $this->data); + } + +} \ No newline at end of file diff --git a/app/Models/article/ReceiptModel.php b/app/Models/article/ReceiptModel.php index b67bbc2..9393699 100644 --- a/app/Models/article/ReceiptModel.php +++ b/app/Models/article/ReceiptModel.php @@ -1253,4 +1253,54 @@ class ReceiptModel extends Model return $query2->getResultArray(); } + + // 연락처 저장 + public function saveTel($rcpt_sq, $tel) + { + $this->db->transStart(); + $usr_id = session('usr_id'); + + $sql = "SELECT rcpt_stat, agent_tel FROM receipt WHERE rcpt_sq = ?"; + $data = [$rcpt_sq]; + $query = $this->db->query($sql, $data); + $row = $query->getRowArray(); + + $sql = "UPDATE receipt" . + " SET agent_tel = ?" . + " WHERE rcpt_sq = ?"; + $data = [$tel, $rcpt_sq]; + + + if ($query = $this->db->query($sql, $data) === false) { + return [ + 'success' => false, + 'msg' => '저장실패', + ]; + } + + $this->saveChangedHistory($rcpt_sq, $row['rcpt_stat'], 'C20', $usr_id, $row['agent_tel']); + + $this->db->transComplete(); + + return [ + 'success' => true, + ]; + } + + + public function saveChangedHistory($rcpt_sq, $rcpt_stat, $changed_type, $usr_id, $remark) + { + $sql = "INSERT INTO changed_history" . + " (rcpt_sq, rcpt_stat, changed_type, changed_id, changed_tm, remark)" . + " VALUES" . + " (?, ?, ?, ?, now(), ?)"; + $data = [ + $rcpt_sq, + $rcpt_stat, + $changed_type, + $usr_id, + $remark + ]; + $res = $this->db->query($sql, $data); + } } \ No newline at end of file diff --git a/app/Models/interest/RatesModel.php b/app/Models/interest/RatesModel.php new file mode 100644 index 0000000..81ac54f --- /dev/null +++ b/app/Models/interest/RatesModel.php @@ -0,0 +1,44 @@ +db->table("tb_lender AS a"); + + $builder->select("a.seq + , IFNULL(CASE + WHEN a.bank_type = 'B' THEN (SELECT cd_nm FROM codes WHERE cd = a.bank AND category = 'BANK') + WHEN a.bank_type = 'I' THEN (SELECT cd_nm FROM codes WHERE cd = a.bank AND category = 'INSURANCE') END, a.bank_nm) AS bank + , a.bank_type + , a.product + , a.tel + , a.min_rate + , a.avg_rate + , a.max_rate + , a.chg_yn + , a.split_yn + , b.extra_fee + , b.late_rate + , b.join_method + , b.prepay_fee + , b.loan_limit + , IFNULL(DATE_FORMAT(b.prov_date, '%Y-%m-%d'), '') AS prov_date"); + + $builder->join("tbl_lender_dtl AS b", "b.seq = a.seq", "LEFT"); + + + $builder->where("a.use_yn", "Y"); + + + // $builder->orderBy('a.seq', 'DESC'); + + return $builder->get()->getResultArray(); + } + +} \ No newline at end of file diff --git a/app/Views/pages/article/receipt/detail.php b/app/Views/pages/article/receipt/detail.php index dd95c01..75defd5 100644 --- a/app/Views/pages/article/receipt/detail.php +++ b/app/Views/pages/article/receipt/detail.php @@ -98,7 +98,7 @@ $usr_level = session('usr_level');
- +
@@ -109,666 +109,661 @@ $usr_level = session('usr_level'); -
-
-
매물 정보
+
+ +
+
+
매물 정보
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 지하층 / 지상층"); - } else if (in_array($data['rcpt_product'], $chk_product_nm)) { - echo (""); - } else { - echo (""); - } - ?> - - - - - - - - - -
등록일 - - 예약(촬영)요청일 - - - -
현장확인(촬영)일자 - - 가주소 여부 - 가주소 - -
매물구분거래구분 - -
지역구분 - - 리 주소 - -
-
상세주소 - - - -
- - - - - -
- - - -
기타주소 - -
단지명가격 - - - -
-
- - 만원 -
- - -
-
- - 만원 (월) -
-
- - - -
- 분양가 - - 만원 - - / - - 프리미엄 - - 만원 -
- - - -
- - -
-
-
평형지하층 / 지상층층 / 총층 - - -
지도좌표 -
- - -
-
- 경도 - -
- -
- 위도 - -
-
- - -
- - - -
- -
-
- - - -
- -
-
- - -
-
-
거주여부
- - - - - - - - - - -
거주여부 - - -
DB활용동의여부
-
-
- -
-
- -
-
-
- - -
-
-
평면도요청
- - - - - - - - - - -
-
평면도요청
-
- - 평면도 등록 여부 - 0) { - echo "Y"; - } else { - echo "N"; - } - ?> - - -
-
-
- - -
-
-
예약확정
- - - - - - - - - - - - - - - - - - - -
방문희망일시 - - - -
방문날짜 - - - - 담당자 - - - -
-
- -
- - -
-
-
동영상촬영여부
- - - - - - - - -
- 동영상촬영여부 - - - - -
-
-
- - -
-
-
중개인 요청사항
- - - - - - - - -
- 중개인 요청사항 - - - - -
-
-
- - -
-
-
- 담당자 예약현황 () -
- - - - - - - - - - - - - - - - - -
- - 시 -
-
-
- - -
-
-
취소
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 지하층 / 지상층"); + } else if (in_array($data['rcpt_product'], $chk_product_nm)) { + echo (""); + } else { + echo (""); + } + ?> + + + + + + + + + + + + + + + + + + + + + +
-
취소
-
-
등록일 + + 예약(촬영)요청일 + + + +
현장확인(촬영)일자 + + 가주소 여부 + 가주소 + +
매물구분거래구분 + +
지역구분 + + 리 주소 + +
+
상세주소 + + + +
+ + + + + +
+ + + +
기타주소 + +
단지명가격 + + + +
+
+ + 만원 +
+ + +
+
+ + 만원 (월) +
+
+ + + +
+ 분양가 + + 만원 + + / + + 프리미엄 + + 만원 +
+ + +
+ + +
+
+
평형지하층 / 지상층층 / 총층 + + +
면적확인파일1
면적확인파일2
지도좌표 +
+ + +
+
+ 경도 + +
+ +
+ 위도 + +
+
+ + +
+ + + +
+ +
+
+ + + +
+ +
+
+ + +
+
+
거주여부
+ + + + + + + + + + +
거주여부 + + +
DB활용동의여부
+
+
+ +
+
+ +
+
+
+ + +
+
+
평면도요청
+ + + + + + + + + + +
+
평면도요청
+
+ + 평면도 등록 여부 + 0) { + echo "Y"; + } else { + echo "N"; + } + ?> + + +
+
+
+ + +
+
+
예약확정
+ + + + + + + + + + + + + + + + + + + +
방문희망일시 + + + +
방문날짜 + + + + 담당자 + + + +
+
+ +
+ + +
+
+
동영상촬영여부
+ + + + + + + + +
+ 동영상촬영여부 + + + + +
+
+
+ + +
+
+
중개인 요청사항
+ + + + + + + + +
+ 중개인 요청사항 + + + + +
+
+
+ + +
+
+
+ 담당자 예약현황 () +
+ + + + + + - - + + + + + + + + + + +
+ + 시 +
+
+
+ + +
+
+
취소
+ + + + + + + + + + +
+
취소
+
+ + + 취소사유 + + + +
+
+
+ + +
+
+
매물 상태 정보 + + + +
+ + " . $data['rsrv_delay_dt_tm']; //예약지연 + $stat2 = $data['rsrv_cplt_dt_dt'] . "
" . $data['rsrv_cplt_dt_tm']; //에약확인 + if ($data['req_rec_yn'] == "Y") { //촬영 + $stat3 = $data['photo_save_dt_dt'] . "
" . $data['photo_save_dt_tm'] . "
녹취필요"; + } else { + $stat3 = $data['photo_save_dt_dt'] . "
" . $data['photo_save_dt_tm']; + } + $stat4 = $data['check_delay_dt_dt'] . "
" . $data['check_delay_dt_tm']; //검수지연 + $stat5 = $data['check_fail_dt_dt'] . "
" . $data['check_fail_dt_tm']; //검수실패 + $stat6 = $data['check_dt_dt'] . "
" . $data['check_dt_tm']; //검수 + $stat7 = $data['check_cplt_dt_dt'] . "
" . $data['check_cplt_dt_tm']; //검수완료 + $stat8 = $data['cancel_dt_dt'] . "
" . $data['cancel_dt_tm']; //취소 + + $currStat = substr($data['rcpt_stat'], 0, 2); + $currStat2 = substr($data['rcpt_stat'], 2, 2); + + if ($currStat == 15) { //예약지연 + $stat1 = "" . $stat1 . ""; + } else if ($currStat == 20) { //예약확인 + $stat2 = "" . $stat2 . ""; + } else if ($currStat == 40) { //촬영 + $stat3 = "" . $stat3 . ""; + } else if ($currStat == 50) { //검수 + $stat6 = "" . $stat6 . ""; + } else if ($currStat == 60) { //검수완료 + $stat7 = "" . $stat7 . ""; + } else if ($currStat == 70) { //검수지연 + $stat4 = "" . $stat4 . "
" . $data['rcpt_stat_nm'] . "
"; + } + if ($currStat == 90 && $currStat2 != 50) { //취소 + $stat8 = "" . $stat8 . "
" . $data['result_cd2_nm'] . "
"; + } else if ($currStat == 90 && $currStat2 == 50) { //검수실패 + $stat5 = "" . $stat5 . "
" . $data['rcpt_stat_nm'] . "
"; + } + ?> + + + + + + + + + + + + + - - - + + + + + - -
현장확인
진행상황
예약지연예약확인촬영검수지연검수실패검수검수완료취소
+ 취소사유 - + + - + + + + + + + + + + + +
-
-
- - -
-
-
매물 상태 정보 - - - -
- - " . $data['rsrv_delay_dt_tm']; //예약지연 - $stat2 = $data['rsrv_cplt_dt_dt'] . "
" . $data['rsrv_cplt_dt_tm']; //에약확인 - if ($data['req_rec_yn'] == "Y") { //촬영 - $stat3 = $data['photo_save_dt_dt'] . "
" . $data['photo_save_dt_tm'] . "
녹취필요"; - } else { - $stat3 = $data['photo_save_dt_dt'] . "
" . $data['photo_save_dt_tm']; - } - $stat4 = $data['check_delay_dt_dt'] . "
" . $data['check_delay_dt_tm']; //검수지연 - $stat5 = $data['check_fail_dt_dt'] . "
" . $data['check_fail_dt_tm']; //검수실패 - $stat6 = $data['check_dt_dt'] . "
" . $data['check_dt_tm']; //검수 - $stat7 = $data['check_cplt_dt_dt'] . "
" . $data['check_cplt_dt_tm']; //검수완료 - $stat8 = $data['cancel_dt_dt'] . "
" . $data['cancel_dt_tm']; //취소 - - $currStat = substr($data['rcpt_stat'], 0, 2); - $currStat2 = substr($data['rcpt_stat'], 2, 2); - - if ($currStat == 15) { //예약지연 - $stat1 = "" . $stat1 . ""; - } else if ($currStat == 20) { //예약확인 - $stat2 = "" . $stat2 . ""; - } else if ($currStat == 40) { //촬영 - $stat3 = "" . $stat3 . ""; - } else if ($currStat == 50) { //검수 - $stat6 = "" . $stat6 . ""; - } else if ($currStat == 60) { //검수완료 - $stat7 = "" . $stat7 . ""; - } else if ($currStat == 70) { //검수지연 - $stat4 = "" . $stat4 . "
" . $data['rcpt_stat_nm'] . "
"; - } - if ($currStat == 90 && $currStat2 != 50) { //취소 - $stat8 = "" . $stat8 . "
" . $data['result_cd2_nm'] . "
"; - } else if ($currStat == 90 && $currStat2 == 50) { //검수실패 - $stat5 = "" . $stat5 . "
" . $data['rcpt_stat_nm'] . "
"; - } - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + @@ -814,20 +809,19 @@ $usr_level = session('usr_level'); - + @@ -838,7 +832,7 @@ $usr_level = session('usr_level'); @@ -846,9 +840,9 @@ $usr_level = session('usr_level'); - - + + @@ -856,19 +850,20 @@ $usr_level = session('usr_level'); + - - + @@ -876,10 +871,10 @@ $usr_level = session('usr_level'); @@ -888,28 +883,28 @@ $usr_level = session('usr_level'); - - - - - - - - - - + + + + + + + + + + @@ -925,330 +920,353 @@ $usr_level = session('usr_level'); - - - -
현장확인
진행상황
예약지연예약확인촬영검수지연검수실패검수검수완료취소
- - - - - - - - - - - - - - - -
상태변경 - - - - - - - - - - -
상태변경 - + @@ -786,15 +781,15 @@ $usr_level = session('usr_level'); - + - + @@ -806,7 +801,7 @@ $usr_level = session('usr_level'); - + - + - + - + - + - + - + - + - + - - - - - - - - - - - + + + + + + + + + + + - +
+ + + + + + + + + + + + + + + + + + + + + + + + +
-
- -
-
-
SMS 보내기
- - - - + +
+
+
SMS 보내기
+
- 상황별
SMS선택 -
- + } + + $smsTot = sizeof($smsList); + $rowspan = ceil($smsTot / 6); + ?> + + "; - } - $smsCnt++; - endforeach; ?> - -
- - - -
+ 상황별
SMS선택 +
-
-
- - -
-
-
매물 위치
- - - - - - - - -
-
-
-
-
- - -
-
-
확인 정보 및 사진 정보
-
- - -
-
-
-
홍보확인서
- - - -
- -
- 홍보확인서 -
-
-
- - -
-
-
-
촬영동의서
- -
- -
- 촬영동의서 -
-
-
- - -
-
-
-
현장확인내역서
- -
- -
- 현장확인내역서 -
-
-
-
- -
- - -
-
-
분양권 (최대 5장)
- -
- -
- -
- 분양권1 -
-
-
- -
- - -
-
-
매물사진 (최대 15장)
- -
- - - - -
-
- -
- - -
- -
- 매물사진 -
-
- -
-
- -
- - -
-
-
-
-
동영상
- -
-
- 동영상 -
-
-
- -
-
-
-
평면도
- -
-
- 평면도 -
-
-
- -
-
-
-
체크리스트
- -
-
- 체크리스트 -
-
-
-
- - -
-
검수사항
-
- - -
- -
- - -
- -
- - -
-
-
360이미지 / 촬영위치
- -
- -
- -
-
- 360이미지 -
- -
- -
-
- 360이미지 -
- -
- -
-
- 360이미지 -
- -
- - -
-
-
-
- - - -
-
-
중개인 요청사항
- - - - - - - - - - - - - + $smsCnt = 1; + foreach ($smsList as $sms1): + if (!in_array($sms1['cd'], ["S10", "S3", "S7", "S15"])) { + continue; + } + ?> + + "; + } + $smsCnt++; + endforeach; ?> +
거주자 전화번호거주인 이름 + + + +
+
+
+ + +
+
+
매물 위치
+ + + + + - - + +
음성파일 -
+
+
+
+
+
- - + +
+
+
확인 정보 및 사진 정보
+
- -
- - -
+ +
+
+
+
홍보확인서
+ +
- - - - 거주인 요청사항 - - - - - - + +
+ 홍보확인서 +
+
+
+ + +
+
+
+
촬영동의서
+ +
+ +
+ 촬영동의서 +
+
+
+ + +
+
+
+
현장확인내역서
+ +
+ +
+ 현장확인내역서 +
+
+
+
+ +
+ + +
+
+
분양권 (최대 5장)
+ +
+ +
+ +
+ 분양권1 +
+
+
+ +
+ + +
+
+
매물사진 (최대 15장)
+ +
+ + + + +
+
+ +
+ + +
+ +
+ 매물사진 +
+
+ +
+
+ +
+ + +
+
+
+
+
동영상
+ +
+
+ 동영상 +
+
+
+ +
+
+
+
평면도
+ +
+
+ 평면도 +
+
+
+ +
+
+
+
체크리스트
+ +
+
+ 체크리스트 +
+
+
+
+ + +
+
검수사항
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
360이미지 / 촬영위치
+ +
+ +
+ +
+
+ 360이미지 +
+ +
+ +
+
+ 360이미지 +
+ +
+ +
+
+ 360이미지 +
+ +
+ + +
+
+
-
+ + + +
+
+
중개인 요청사항
+ + + + + + + + + + + + + + + + + + + + + + + +
거주자 전화번호거주인 이름
음성파일 +
+ + + + + +
+ + +
+ +
+
거주인 요청사항 + +
+
+
+
@@ -1302,6 +1320,8 @@ $usr_level = session('usr_level'); $(function () { + trade_type_onchange(); + map = new naver.maps.Map('mapArea', { center: new naver.maps.LatLng(lat, lng), useStyleMap: true, @@ -1323,8 +1343,128 @@ $usr_level = session('usr_level'); map: map }); + + + }); + function trade_type_onchange() { + var trade_type = $('#trade_type').val(); + if (trade_type == 'B2' || trade_type == 'B3') { + // 월세... + $('#div_trade_type_price_monthly').show(); + } else { + $('#div_trade_type_price_monthly').hide(); + } + } + + // 가격수정 btn + function editPriceInfo() { + var rcpt_product = $('#rcpt_product').val(); + var trade_type = $('#trade_type').val(); + + $("#trade_type").prop("disabled", false); + + $("#rcpt_product_info2").prop("disabled", false); + $("#rcpt_product_info3").prop("disabled", false); + + if (trade_type == "A1") { + if (rcpt_product == 'A01' || rcpt_product == 'A02' || rcpt_product == 'A03' || rcpt_product == 'B01' || rcpt_product == 'B02' || rcpt_product == 'B03') { + $("#rcpt_product_info4").prop("disabled", false); + $("#rcpt_product_info5").prop("disabled", false); + } + } + } + + // 가격수정 저장 + function modifyPriceInfo() { + swal.fire({ + text: "저장 하시겠습니까?", + type: "warning", + showCancelButton: true, + confirmButtonText: "예", + cancelButtonText: "아니오", + closeOnConfirm: false, + closeOnCancel: true, + confirmButtonColor: "#3085d6", + cancelButtonColor: "#d33", + }).then((result) => { + if (result.isConfirmed) { + var params = { + 'rcpt_sq': '', + 'agent_tel': $("#agent_tel").val(), + }; + + callAjax("/article/apt/modifyPriceInfo", params, fn_result); + } + }); + } + + // 연락가능전화 저장 + function fn_save_tel() { + swal.fire({ + text: "저장 하시겠습니까?", + type: "warning", + showCancelButton: true, + confirmButtonText: "예", + cancelButtonText: "아니오", + closeOnConfirm: false, + closeOnCancel: true, + confirmButtonColor: "#3085d6", + cancelButtonColor: "#d33", + }).then((result) => { + if (result.isConfirmed) { + var params = { + 'rcpt_sq': '', + 'agent_tel': $("#agent_tel").val(), + }; + + callAjax("/article/apt/saveAptMemo", params, fn_result); + } + }); + } + + function callAjax(target, params, callback) { + $.ajax({ + url: target, + method: "POST", + dataType: "json", + data: params, + beforeSend: function () { + blockUI.blockPage({ + message: tpl + }) + }, + complete: function () { + blockUI.unblockPage() + }, + success: function (result) { + callback(result); + } + }); + } + + + function fn_result(result) { + if (result.code == '0') { + Swal.fire({ + title: "정상 처리되었습니다.", + icon: "success", + draggable: true + }) + + + setTimeout(() => { + location.reload(); + }, 1000); + } else { + Swal.fire({ + title: result.msg, + icon: "error", + draggable: true + }) + } + } diff --git a/app/Views/pages/article/receipt/lists.php b/app/Views/pages/article/receipt/lists.php index 7cbeb8c..6014ed9 100644 --- a/app/Views/pages/article/receipt/lists.php +++ b/app/Views/pages/article/receipt/lists.php @@ -640,7 +640,7 @@ $usr_nm = session('usr_nm'); { data: null, render: fn_prd_render }, { data: 'rcpt_product_info1' }, - { data: 'dept_nm' }, + { data: 'dept_nm' }, { data: 'usr_nm' }, { data: 'parcel_out_yn' }, @@ -669,7 +669,7 @@ $usr_nm = session('usr_nm'); if (!rowData) return; const rcpt_atclno = rowData.rcpt_atclno; - location.href = "/" + rcpt_atclno; + location.href = "/" + rcpt_atclno; }); diff --git a/app/Views/pages/interest/list.php b/app/Views/pages/interest/list.php new file mode 100644 index 0000000..30c6787 --- /dev/null +++ b/app/Views/pages/interest/list.php @@ -0,0 +1,998 @@ +extend('layouts/main') ?> + +section('content') ?> + + $x !== '')); + } + + $s = trim((string) $v); + if ($s === '') + return []; + + // JSON 배열 문자열이면 decode + if ($s[0] === '[') { + $decoded = json_decode($s, true); + if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { + return array_values(array_filter(array_map('trim', $decoded), fn($x) => $x !== '')); + } + } + + // 개행 기반 분리 + $lines = preg_split("/\r\n|\r|\n/", $s); + return array_values(array_filter(array_map('trim', $lines), fn($x) => $x !== '')); +} + +/** + * 상세 섹션 렌더 + */ +function render_detail_section(string $title, $value): string +{ + $lines = normalize_lines($value); + if (empty($lines)) + return ''; + + $html = '
'; + $html .= '
' . esc($title) . '
'; + $html .= '
'; + + return $html; +} + +/** + * 원리금균등상환 + * @param float $principal + * @param float $annualRate + * @param int $years + * @return float|int + */ +function calcEqualPaymentMonthly(float $principal, float $annualRate, int $years): float +{ + $n = $years * 12; + $r = ($annualRate / 100.0) / 12.0; + + if ($n <= 0) + return 0.0; + if (abs($r) < 1e-12) + return $principal / $n; + + $pow = pow(1.0 + $r, $n); + return ($principal * $r * $pow) / ($pow - 1.0); +} + +/** + * 원금균등상환 + * @param float $principal + * @param float $annualRate + * @param int $years + * @return float|int + */ +function calcEqualPrincipalAvgMonthly(float $principal, float $annualRate, int $years): float +{ + $n = $years * 12; + $r = ($annualRate / 100.0) / 12.0; + + if ($n <= 0) + return 0.0; + + // 이자합(원금균등): P*r*(n+1)/2 (매달 원금이 선형 감소) + $totalInterest = $principal * $r * ($n + 1) / 2.0; + + $totalPayment = $principal + $totalInterest; + return $totalPayment / $n; +} + +function won(float $v): string +{ + return number_format((int) round($v)); +} +?> + + + +
+
+
+ +
+
+
+
+ + +
+ + +
+ +
1 / 1
+ +
+
+
+
+
+
+ +
+ + + + + + +endSection() ?> \ No newline at end of file diff --git a/public/plugin/css/loan_rate.css b/public/plugin/css/loan_rate.css new file mode 100644 index 0000000..5742cdc --- /dev/null +++ b/public/plugin/css/loan_rate.css @@ -0,0 +1,292 @@ +@charset "utf-8"; + +/* reset */ +/* body {font-size:1rem;color:#333;line-height:1.5;letter-spacing:0.5px;padding:0;margin:0;overflow-x:hidden;-webkit-text-size-adjust:none; +font-family: -apple-system,BlinkMacSystemFont,'Malgun Gothic','맑은 고딕',helvetica,'Apple SD Gothic Neo',helvetica,'나눔바른고딕 옛한글','NanumBarunGothic YetHangul',sans-serif;} +*/ +ul, li,dl,dt,dd {list-style:none;margin:0;padding:0;} +a {color:#333;text-decoration:none;} +p,h1,h2,h3,h4,h5,h6 {margin:0;} +table {width:100%;border-collapse:collapse;border-spacing:0;font-size:inherit;} +table th {font-weight:normal;} +caption {height:0;width:0;overflow:hidden;font-size:0;line-height:0;text-indent:-99999em;} +u {font-style:oblique;text-decoration:none;} +html body * {box-sizing:border-box;} + +/* tab */ +.tab_type01 {height:50px;border-bottom:1px solid #ddd;} +.tab_type01 ul:after {content:'';display:block;clear:both;} +.tab_type01 ul {border-left:1px solid #ddd;} +.tab_type01 ul li {float:left;} +.tab_type01 ul li a {display:block;height:49px;padding:0 5px;text-align:center;font-size:13px;color:#666;line-height:49px;border:1px solid #ddd; +border-left:none;border-bottom:none;background-color:#f1f1f1;} +.tab_type01 ul li a.active {position:relative;height:50px;line-height:48px;color:#333;background-color:#fff;} +.tab_type01 ul li a.active:before {content:'';position:absolute;top:-1px;left:-1px;right:-1px;height:2px;background-color:#222;} +.tab_type01.col_2 ul li {width:25%;} +.tab_view_box {display:none;margin-top:35px;} +.tab_view_box.block {display:block;} + +.loan_rate {padding:20px;} +.inner {position:relative;} + +.owl_page {text-align:center;padding:0 0 20px 0;} +.owl_page > span {display:inline-block;text-align:center;padding:0 10px;} +.owl_page .owl_prev_btn, +.owl_page .owl_next_btn {cursor:pointer;} +.owl_page .owl_counter b {color:#00f;} + +/* 담보대출정보 */ +.loan_rate .product_list .item { + border-top: 1px solid #ddd; + padding: 14px 18px 18px 18px; +} +.loan_rate .product_list .product_title { + font-size: 15px; + margin-bottom: 1px; + font-weight: 600; + line-height: 26px; +} +.loan_rate .product_list .product_title .bank_name { + color: #00f; +} +.loan_rate .product_list .product_title .label_icon { + display: inline-block; + color:#555; + margin: 4px 0 0 5px; + border-radius: 15px; + -webkit-border-radius: 15px; + font-size: 11px; + line-height: 13px; + border: 1px solid #555; + padding: 2px 6px; + vertical-align: top; + font-weight: bold; +} +.loan_rate .product_list .product_title .label_icon + .label_icon { + margin-left: 0; +} +.loan_rate .product_list .rate_detail { + overflow: hidden; + padding: 0 0 2px; + font-size: 13px; + line-height: 22px; + letter-spacing: -0.5px; +} +.loan_rate .product_list .rate_detail dt { + float: left; + margin: 3px 12px 0 0; + clear: both; +} +.loan_rate .product_list .rate_detail dd { + overflow: hidden; + margin-top: 3px; +} +.loan_rate .product_list .rate_detail dd.line_align { + float: left; + position: relative; + margin-right: 10px; + padding-right: 10px; +} +.loan_rate .product_list .rate_detail dd.line_align + dt { + clear: inherit; +} +.loan_rate .product_list .rate_detail dd strong.rate_text { + color: #f7901e; +} +.loan_rate .product_list .rate_detail dd.line_align:after { + content: ''; + display: block; + position: absolute; + top: 5px; + right: 0; + width: 1px; + height: 13px; + background-color: #eee; +} + +.loan_rate .info_detail .list_detail { + display: block; + width: 100%; + padding: 10px 0 0; + text-align: center; + overflow: hidden; +} +.loan_rate .info_detail .list_detail li { + display: block; + text-align: center; + width: 50%; + float: left; +} +.loan_rate .info_detail .list_detail li ~ li .option_btn {border-left:none;} +.loan_rate .info_detail .list_detail li._foldingWrapper.active .layer_box {display:block;} +.loan_rate .info_detail .list_detail li._foldingWrapper.active .option_btn {background-color:#fff;border-bottom:0;} + +.loan_rate .info_detail .list_detail .option_btn { + display: block; + font-size:12px; + padding: 8px 0 0 0; + height: 36px; + vertical-align: middle; + color: #333; + background-color: #f2f2f2; + border: 1px solid #ddd; + border-right: 1px solid #ddd; + box-sizing: border-box; + -webkit-box-sizing: border-box; +} +.loan_rate .info_detail .list_detail .option_btn::after { + content: ''; + display: inline-block; + width: 8px; + height: 5px; + background: url(../images/ico_arrow_down_gray.png) no-repeat; + margin: 5px 0 0 5px; + vertical-align: top; + background-size:8px auto; +} +.loan_rate .info_detail .list_detail ._foldingWrapper.active .option_btn::after { + transform: rotate(180deg); +} + +.loan_rate .info_detail .list_detail .layer_box { + display: none; + padding: 15px 0 0 15px; + border: 1px solid #e4e5e7; + border-width: 0px 1px 1px; + width: 200%; + box-sizing: border-box; + -webkit-box-sizing: border-box; +} +.loan_rate .info_detail .list_detail li + li .layer_box { + margin-left: -100%; + padding:15px 10px 0 15px; +} +.loan_rate .info_detail .list_detail .info_box { + margin: -1px 0 0; + padding-bottom: 3px; +} +.loan_rate .info_detail .list_detail .detial_info { + overflow: hidden; + padding-right: 15px; + font-size: 13px; + line-height: 23px; + text-align: left; +} +.loan_rate .info_detail .list_detail .detial_info dt { + float: left; + color: #222; + margin: 6px 10px 0 0; + font-weight:600; +} +.loan_rate .info_detail .list_detail .detial_info dt.none_float { + float: none; + margin-top: 10px; +} +.loan_rate .info_detail .list_detail .detial_info dd { + overflow: hidden; + margin: 0 0 0 0; +} +.loan_rate .info_detail .list_detail .detial_info dt + dd { + margin-top: 6px; +} +.loan_rate .info_detail .list_detail .detial_info .none_float + dd { + margin-top: 1px; +} +.loan_rate .info_detail .list_detail .layer_box .notice_text { + text-align: left; + margin: 7px 0 0 0; + font-size: 13px; + color:#222; + line-height: 21px; + font-weight:600; +} +.loan_rate .info_detail .list_detail .layer_box .bottom_area { + margin: 10px 15px 0 0; + border-top: 1px solid #eee; +} +.loan_rate .info_detail .list_detail .layer_box .bottom_area .btn_close { + display: block; + font-size:12px; + height: 36px; + padding: 8px 0 0; + box-sizing: border-box; + -webkit-box-sizing: border-box; + text-align: center; + font-weight:600; +} + + +.loan_rate .info_detail .list_detail .table_box table { + width: 100%; + table-layout: fixed; +} + +.loan_rate .info_detail .list_detail .table_box thead tr th { + color: #222; + font-size: 13px; + text-align: center; + background-color: #f2f2f2; + border: 1px solid #ddd; + padding: 10px 5px; + font-weight: normal; +} + + +.loan_rate .info_detail .list_detail .table_box tbody tr td { + font-size: 13px; + min-height: 42px; + color: #222; + vertical-align: middle; + border: 1px solid #ddd; + padding: 10px 7px; + line-height: 18px; +} + +.loan_rate .info_detail .list_detail .table_box tbody tr td > span { + display: inline-block; +} + +.loan_rate .info_detail .list_detail .layer_box .desp_info { + padding: 0 15px 10px 0; + font-size: 13px; + line-height: 23px; + color: #222; + text-align: left; +} + +.loan_rate .info_detail .list_detail .table_box tbody tr td .text_red { + font-weight: 600; + display: block; + color: #f7901e; +} + +.loan_rate .info_detail .list_detail .layer_box .sub_info dl { + overflow: hidden; + font-size: 13px; + line-height: 23px; + color: #222; + text-align: left; +} + +.loan_rate .info_detail .list_detail .layer_box .notice_text + dl { + margin: 7px 0 0 0; +} + +.loan_rate .info_detail .list_detail .layer_box .sub_info dl dt { + float: left; + margin: 3px 10px 0 0; + font-size:13px; + font-weight:600; +} + +.loan_rate .info_detail .list_detail .layer_box .sub_info dl dd { + overflow: hidden; + margin-top: 3px; + font-weight:400; +} + +.loan_rate .info_detail .list_detail .layer_box .sub_info a, +.info_detail .list_detail .detial_info dd a { + color:#00f; +} + diff --git a/public/plugin/css/owl.carousel.min.css b/public/plugin/css/owl.carousel.min.css new file mode 100644 index 0000000..a71df11 --- /dev/null +++ b/public/plugin/css/owl.carousel.min.css @@ -0,0 +1,6 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} \ No newline at end of file diff --git a/public/plugin/css/owl.theme.default.min.css b/public/plugin/css/owl.theme.default.min.css new file mode 100644 index 0000000..487088d --- /dev/null +++ b/public/plugin/css/owl.theme.default.min.css @@ -0,0 +1,6 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +.owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} \ No newline at end of file diff --git a/public/plugin/js/loan_rate.js b/public/plugin/js/loan_rate.js new file mode 100644 index 0000000..7b8855f --- /dev/null +++ b/public/plugin/js/loan_rate.js @@ -0,0 +1,105 @@ + +$(document).ready(function(){ + // tab + $('.tab_type01 a').click(function (e) { + var contentid = $(this).attr('title'); + e.preventDefault(); + + $('.tab_type01 .active').removeClass('active'); + $(this).addClass('active'); + $('.tab_view_box').removeClass('block'); + $('#' + contentid).addClass('block'); + + $('.owl-carousel.loan_rate_sgroup').trigger('to.owl.carousel', 0); + $('.loan_rate ._foldingWrapper').removeClass('active'); + }); + + // content slide. + var loanTotalOwl = $('.owl-carousel.type_total'); + var loanBankOwl = $('.owl-carousel.type_bank'); + var loanSavingsbankOwl = $('.owl-carousel.type_savingsbank'); + var loanInsuranceOwl = $('.owl-carousel.type_insurance'); + + loanTotalOwl.owlCarousel({ + items:1, + loop: false, + nav: false, + dots: false, + mouseDrag: false, + touchDrag: false, + onInitialized : counter, + onTranslated : counter + }); + + loanBankOwl.owlCarousel({ + items:1, + loop: false, + nav: false, + dots: false, + mouseDrag: false, + touchDrag: false, + onInitialized : counter, + onTranslated : counter + }); + + loanSavingsbankOwl.owlCarousel({ + items:1, + loop: false, + nav: false, + dots: false, + mouseDrag: false, + touchDrag: false, + onInitialized : counter, + onTranslated : counter + }); + + loanInsuranceOwl.owlCarousel({ + items:1, + loop: false, + nav: false, + dots: false, + mouseDrag: false, + touchDrag: false, + onInitialized : counter, + onTranslated : counter + }); + + $('.loan_rate .owl_prev_btn').click(function() { + $(this).closest('.tab_view_box').find('.owl-carousel.loan_rate_sgroup').trigger('prev.owl.carousel'); + }); + + $('.loan_rate .owl_next_btn').click(function() { + $(this).closest('.tab_view_box').find('.owl-carousel.loan_rate_sgroup').trigger('next.owl.carousel'); + }) + + function counter(event) { + var element = event.target; + var items = event.item.count; + var item = event.item.index + 1; + + if(item > items) { + item = item - items + } + + $(element).closest('.tab_view_box').find('.owl_counter').html("" + item + " / " + items); + } + + // 상세보기 & 월평균상환액 tab. + $('.loan_rate ul.list_detail .option_btn').click(function () { + var isActive = $(this).parent('li._foldingWrapper').hasClass('active'); + + $(this).closest('ul.list_detail').find('li._foldingWrapper').removeClass('active'); + + if(!isActive) { + $(this).parent('li._foldingWrapper').addClass('active'); + } else { + $(this).parent('li._foldingWrapper').removeClass('active'); + + } + }); + + $('.loan_rate .info_detail .bottom_area .btn_close').click(function () { + $(this).closest('ul.list_detail').find('li._foldingWrapper').removeClass('active'); + }); + +}); \ No newline at end of file diff --git a/public/plugin/js/owl.carousel.min.js b/public/plugin/js/owl.carousel.min.js new file mode 100644 index 0000000..fbbffc5 --- /dev/null +++ b/public/plugin/js/owl.carousel.min.js @@ -0,0 +1,7 @@ +/** + * Owl Carousel v2.3.4 + * Copyright 2013-2018 David Deutsch + * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE + */ +!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("
",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&bi-g-f&&b",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='
',d=k.lazyLoad?a("
",{class:"owl-video-tn "+j,srcType:c}):a("
",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("
",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a(''),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('
').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1, +animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['',''],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('