first commit
@@ -0,0 +1,142 @@
|
||||
"use strict";
|
||||
/*
|
||||
*Your Ajax Server Here if it was not defined in html site-config element,
|
||||
* use internal url (such as './ajaxserver/server.php') or
|
||||
* external URL such as: url: 'http://www.example.com/avenir/ajaxserver/server.php'
|
||||
* depending to your requirements
|
||||
*/
|
||||
var email_server_url = './ajaxserver/serverfile.php';
|
||||
var message_server_url = './ajaxserver/serverfile.php';
|
||||
//Check if action attribute (which indicates server) of form tag is set, then choose it (low
|
||||
if($('.send_email_form').attr('action') && ($('.send_email_form').attr('action')) != ''){
|
||||
email_server_url = $('.send_email_form').attr('action');
|
||||
}
|
||||
|
||||
if($('.send_message_form').attr('action') && ($('.send_message_form').attr('action') != '')){
|
||||
message_server_url = $('.send_message_form').attr('action');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
var $ajax = {
|
||||
sendEmail: function (p) {
|
||||
var form_fill = $(p);
|
||||
|
||||
// Get the form data.
|
||||
var form_inputs = form_fill.find(':input');
|
||||
var form_data = {};
|
||||
form_inputs.each(function () {
|
||||
form_data[this.name] = $(this).val();
|
||||
});
|
||||
console.log(form_data);
|
||||
// var form_data = $(form_fill).serialize();
|
||||
// form_data['email'] = $('#email-sub').val();
|
||||
$.ajax(
|
||||
{
|
||||
/*
|
||||
*Your Ajax Server Here,
|
||||
* use internal url (such as './ajaxserver/server.php') or
|
||||
* external URL such as: url: 'http://www.example.com/avenir/ajaxserver/server.php'
|
||||
* depending to your requirements
|
||||
*/
|
||||
url: email_server_url,
|
||||
// url: $('.send_email_form').attr('action'),
|
||||
type: 'get',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
|
||||
/* CALLBACK FOR SENDING EMAIL GOEAS HERE */
|
||||
success: function (data) {
|
||||
//Ajax connexion was a success, now handle response
|
||||
if (data && !data.error) {
|
||||
// Hide for if no error
|
||||
$('.invite').addClass('invisible');
|
||||
$('.send_email_form .email_f').addClass('invisible');
|
||||
$('.send_email_form .email_b').addClass('invisible');
|
||||
$('.send_email_form .fields').addClass('invisible');
|
||||
$('.send_email_form .email-ok').removeClass('invisible');
|
||||
}
|
||||
// Else the login credentials were invalid.
|
||||
else {
|
||||
//Ajax connexion reject an error a success, now handle response
|
||||
console.log('Could not process AJAX request to server');
|
||||
}
|
||||
},
|
||||
/* show error message */
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
//ajax error
|
||||
console.log('ajax error');
|
||||
|
||||
}
|
||||
/* END EMAIL SENDING CALLBACK */
|
||||
});
|
||||
},
|
||||
|
||||
sendMessage:function (p) {
|
||||
var form_fill = $(p);
|
||||
|
||||
// Get the form data.
|
||||
var form_inputs = form_fill.find(':input');
|
||||
var form_data = {};
|
||||
form_inputs.each(function () {
|
||||
form_data[this.name] = $(this).val();
|
||||
});
|
||||
console.log(form_data);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
/*
|
||||
*Your Ajax Server Here,
|
||||
* use internal url (such as './ajaxserver/server.php') or
|
||||
* external URL such as: url: 'http://www.example.com/avenir/ajaxserver/server.php'
|
||||
* depending to your requirements
|
||||
*/
|
||||
url: message_server_url,
|
||||
// url: $('.send_message_form').attr('action'),
|
||||
type: 'get',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
|
||||
/* CALLBACK FOR SENDING EMAIL GOEAS HERE */
|
||||
success: function (data) {
|
||||
|
||||
// If the returned login value successful.
|
||||
if (data && !data.error) {
|
||||
|
||||
// notify user that message has been sent
|
||||
$('.send_message_form input').val("");
|
||||
$('.send_message_form textarea').val("");
|
||||
$('.message-ok').removeClass('invisible');
|
||||
}
|
||||
// Else the login credentials were invalid.
|
||||
else {
|
||||
/* show validation error */
|
||||
$('.message').html(data.error);
|
||||
}
|
||||
},
|
||||
/* show error message */
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
$('.message').html('Error when sending email.');
|
||||
}
|
||||
/* END EMAIL SENDING CALLBACK */
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/* delegate submit event via ajax */
|
||||
$('.send_email_form').submit(function (event) {
|
||||
event.preventDefault();
|
||||
console.log('request sent to server');
|
||||
$ajax.sendEmail(this);
|
||||
});
|
||||
|
||||
$('.send_message_form').submit(function (event) {
|
||||
event.preventDefault();
|
||||
console.log('message should be sent');
|
||||
$ajax.sendMessage(this);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
By Osvaldas Valutis, www.osvaldas.info
|
||||
Available for use under the MIT License
|
||||
*/
|
||||
|
||||
;(function(e,t,n,r){"use strict";var i=function(){var e=n.body||n.documentElement,e=e.style;if(e.WebkitTransition=="")return"-webkit-";if(e.MozTransition=="")return"-moz-";if(e.OTransition=="")return"-o-";if(e.transition=="")return"";return false},s=i()===false?false:true,o=function(e,t,n){var r={},s=i();r[s+"transform"]="translateX("+t+")";r[s+"transition"]=s+"transform "+n+"s linear";e.css(r)},u="ontouchstart"in t,a=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,f=function(e){if(u)return true;if(!a||typeof e==="undefined"||typeof e.pointerType==="undefined")return false;if(typeof e.MSPOINTER_TYPE_MOUSE!=="undefined"){if(e.MSPOINTER_TYPE_MOUSE!=e.pointerType)return true}else if(e.pointerType!="mouse")return true;return false};e.fn.imageLightbox=function(r){var r=e.extend({selector:'id="imagelightbox"',allowedTypes:"png|jpg|jpeg|gif",animationSpeed:250,preloadNext:true,enableKeyboard:true,quitOnEnd:false,quitOnImgClick:false,quitOnDocClick:true,onStart:false,onEnd:false,onLoadStart:false,onLoadEnd:false},r),i=e([]),l=e(),c=e(),h=0,p=0,d=0,v=false,m=function(t){return e(t).prop("tagName").toLowerCase()=="a"&&(new RegExp(".("+r.allowedTypes+")$","i")).test(e(t).attr("href"))},g=function(){if(!c.length)return true;var n=e(t).width()*.8,r=e(t).height()*.9,i=new Image;i.src=c.attr("src");i.onload=function(){h=i.width;p=i.height;if(h>n||p>r){var s=h/p>n/r?h/n:p/r;h/=s;p/=s}c.css({width:h+"px",height:p+"px",top:(e(t).height()-p)/2+"px",left:(e(t).width()-h)/2+"px"})}},y=function(t){if(v)return false;t=typeof t==="undefined"?false:t=="left"?1:-1;if(c.length){if(t!==false&&(i.length<2||r.quitOnEnd===true&&(t===-1&&i.index(l)==0||t===1&&i.index(l)==i.length-1))){w();return false}var n={opacity:0};if(s)o(c,100*t-d+"px",r.animationSpeed/1e3);else n.left=parseInt(c.css("left"))+100*t+"px";c.animate(n,r.animationSpeed,function(){b()});d=0}v=true;if(r.onLoadStart!==false)r.onLoadStart();setTimeout(function(){c=e("<img "+r.selector+" />").attr("src",l.attr("href")).load(function(){c.appendTo("body");g();var n={opacity:1};c.css("opacity",0);if(s){o(c,-100*t+"px",0);setTimeout(function(){o(c,0+"px",r.animationSpeed/1e3)},50)}else{var u=parseInt(c.css("left"));n.left=u+"px";c.css("left",u-100*t+"px")}c.animate(n,r.animationSpeed,function(){v=false;if(r.onLoadEnd!==false)r.onLoadEnd()});if(r.preloadNext){var a=i.eq(i.index(l)+1);if(!a.length)a=i.eq(0);e("<img />").attr("src",a.attr("href")).load()}}).error(function(){if(r.onLoadEnd!==false)r.onLoadEnd()});var n=0,u=0,p=0;c.on(a?"pointerup MSPointerUp":"click",function(e){e.preventDefault();if(r.quitOnImgClick){w();return false}if(f(e.originalEvent))return true;var t=(e.pageX||e.originalEvent.pageX)-e.target.offsetLeft;l=i.eq(i.index(l)-(h/2>t?1:-1));if(!l.length)l=i.eq(h/2>t?i.length:0);y(h/2>t?"left":"right")}).on("touchstart pointerdown MSPointerDown",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(s)p=parseInt(c.css("left"));n=e.originalEvent.pageX||e.originalEvent.touches[0].pageX}).on("touchmove pointermove MSPointerMove",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;e.preventDefault();u=e.originalEvent.pageX||e.originalEvent.touches[0].pageX;d=n-u;if(s)o(c,-d+"px",0);else c.css("left",p-d+"px")}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(Math.abs(d)>50){l=i.eq(i.index(l)-(d<0?1:-1));if(!l.length)l=i.eq(d<0?i.length:0);y(d>0?"right":"left")}else{if(s)o(c,0+"px",r.animationSpeed/1e3);else c.animate({left:p+"px"},r.animationSpeed/2)}})},r.animationSpeed+100)},b=function(){if(!c.length)return false;c.remove();c=e()},w=function(){if(!c.length)return false;c.animate({opacity:0},r.animationSpeed,function(){b();v=false;if(r.onEnd!==false)r.onEnd()})};e(t).on("resize",g);if(r.quitOnDocClick){e(n).on(u?"touchend":"click",function(t){if(c.length&&!e(t.target).is(c))w()})}if(r.enableKeyboard){e(n).on("keyup",function(e){if(!c.length)return true;e.preventDefault();if(e.keyCode==27)w();if(e.keyCode==37||e.keyCode==39){l=i.eq(i.index(l)-(e.keyCode==37?1:-1));if(!l.length)l=i.eq(e.keyCode==37?i.length:0);y(e.keyCode==37?"left":"right")}})}e(n).on("click",this.selector,function(t){if(!m(this))return true;t.preventDefault();if(v)return false;v=false;if(r.onStart!==false)r.onStart();l=e(this);y()});this.each(function(){if(!m(this))return true;i=i.add(e(this))});this.switchImageLightbox=function(e){var t=i.eq(e);if(t.length){var n=i.index(l);l=t;y(e<n?"left":"right")}return this};this.quitImageLightbox=function(){w();return this};return this}})(jQuery,window,document);
|
||||
@@ -0,0 +1,59 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page Not Found</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
|
||||
* {
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
color: #888;
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
left: 50%;
|
||||
margin: -43px 0 0 -150px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 270px) {
|
||||
|
||||
body {
|
||||
margin: 10px auto;
|
||||
position: static;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
</body>
|
||||
</html>
|
||||
<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
||||
@@ -0,0 +1,160 @@
|
||||
"use strict";
|
||||
/**
|
||||
* downCount: Simple Countdown clock with offset
|
||||
* Author: Sonny T. <hi@sonnyt.com>, sonnyt.com
|
||||
*/
|
||||
$(".alt-clock .clock-place").append("<div class='clock-container' > <header class='c-logo-top'> <img class='logo' src='./img/logo_only.png' alt='Logo image'> </header> <div class='c-metric c-layout'> <div class='c-dot-small'> <div class='rot30 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot60 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot120 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot150 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot210 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot240 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot300 c-rect-s c-rect'> <div class='c-mes'></div> </div> <div class='rot330 c-rect-s c-rect'> <div class='c-mes'></div> </div> </div> <div class='c-minsec-number'> <div class='c-top c-num'>00</div> <div class='c-right c-num'>15</div> <div class='c-bottom c-num'>30</div> <div class='c-left c-num'>45</div> </div> </div> <div class='c-minute-bg c-layout'> <div class='c-circle'></div> </div> <div class='c-minute c-layout '> <div class='c-circle'></div> <div class='c-dot'></div> </div> <div class='c-second-bg c-layout'> <div class='c-circle'></div> </div> <div class='c-second c-layout '> <div class='c-circle'></div> <div class='c-dot'></div> </div> <div class='c-layout c-separator'> <div class='c-fill'> </div> </div> <div class='c-hour c-layout'> <span class='number hours'>00</span> <span class='metric'>h</span> </div> <div class='c-day c-layout'> <span class='number days'>000</span> <span class='metric'>days</span> </div> </div>");
|
||||
|
||||
if($(".alt-clock .clock-place").attr('data-logosrc')
|
||||
&& $(".alt-clock .clock-place").attr('data-logosrc') != ""){
|
||||
var imgUrlSrc = $(".alt-clock .clock-place").attr('data-logosrc');
|
||||
$(".alt-clock .clock-place .logo").attr("src",imgUrlSrc) ;
|
||||
// $(".alt-clock .clock-place .logo").attr("src") = $(".alt-clock .clock-place").attr('data-logosrc');
|
||||
}
|
||||
|
||||
(function ($) {
|
||||
|
||||
$.fn.downCount = function (options, callback) {
|
||||
var settings = $.extend({
|
||||
date: null,
|
||||
offset: null
|
||||
}, options);
|
||||
|
||||
// Throw error if date is not set
|
||||
if (!settings.date) {
|
||||
$.error('Date is not defined.');
|
||||
}
|
||||
|
||||
// Throw error if date is set incorectly
|
||||
if (!Date.parse(settings.date)) {
|
||||
$.error('Incorrect date format, it should look like this, 12/24/2012 12:00:00.');
|
||||
}
|
||||
|
||||
// Save container
|
||||
var container = this;
|
||||
|
||||
/**
|
||||
* Change client's local date to match offset timezone
|
||||
* @return {Object} Fixed Date object.
|
||||
*/
|
||||
|
||||
var secCount = -1;
|
||||
var minCount = -1;
|
||||
|
||||
var timeZone = +0;
|
||||
if($('.site-config').attr('data-date-timezone') && ($('.site-config').attr('data-date-timezone') != '')){
|
||||
timeZone = $('.site-config').attr('data-date-timezone');
|
||||
}
|
||||
|
||||
var currentDate = function () {
|
||||
// get client's current date
|
||||
var date = new Date();
|
||||
|
||||
// turn date to utc
|
||||
// var utc = date.getTime() + (date.getTimezoneOffset() * 60000) - (360000*100);
|
||||
var utc = date.getTime() + (date.getTimezoneOffset() * 60000) - (360000*100) +(360000*10)*timeZone;
|
||||
|
||||
// var utc = date.getTime() + (date.getTimezoneOffset() * 60000);
|
||||
|
||||
// set new Date object
|
||||
var new_date = new Date(utc + (3600000*settings.offset))
|
||||
|
||||
return new_date;
|
||||
};
|
||||
|
||||
/**
|
||||
* Main downCount function that calculates everything
|
||||
*/
|
||||
function countdown () {
|
||||
var target_date = new Date(settings.date), // set target date
|
||||
current_date = currentDate(); // get fixed current date
|
||||
|
||||
// difference of dates
|
||||
var difference = target_date - current_date;
|
||||
|
||||
// if difference is negative than it's pass the target date
|
||||
if (difference < 0) {
|
||||
// stop timer
|
||||
clearInterval(interval);
|
||||
|
||||
if (callback && typeof callback === 'function') callback();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// basic math variables
|
||||
// var _second = 1000,
|
||||
var _second = 1000,
|
||||
_minute = _second * 60,
|
||||
_hour = _minute * 60,
|
||||
_day = _hour * 24;
|
||||
var _centi = _second / 100;
|
||||
|
||||
// calculate dates
|
||||
var days = Math.floor(difference / _day),
|
||||
hours = Math.floor((difference % _day) / _hour),
|
||||
minutes = Math.floor((difference % _hour) / _minute),
|
||||
seconds = Math.floor((difference % _minute) / _second),
|
||||
centis = Math.floor((difference % _minute) / _centi );
|
||||
|
||||
// fix dates so that it will show two digets
|
||||
days = (String(days).length >= 2) ? days : '0' + days;
|
||||
hours = (String(hours).length >= 2) ? hours : '0' + hours;
|
||||
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes;
|
||||
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds;
|
||||
|
||||
// based on the date change the refrence wording
|
||||
var ref_days = (days === 1) ? 'day' : 'days',
|
||||
ref_hours = (hours === 1) ? 'hour' : 'hours',
|
||||
ref_minutes = (minutes === 1) ? 'minute' : 'minutes',
|
||||
ref_seconds = (seconds === 1) ? 'second' : 'seconds';
|
||||
if(centis == 0){
|
||||
centis = 6000;
|
||||
}
|
||||
if(seconds == 0){
|
||||
seconds = 60;
|
||||
}
|
||||
if(seconds%60 == 0){
|
||||
secCount--;
|
||||
}
|
||||
|
||||
if(minutes == 0){
|
||||
minutes = 60;
|
||||
}
|
||||
if((minutes%60 == 0) && (seconds == 59)){
|
||||
minCount--;
|
||||
}
|
||||
|
||||
// set to DOM class or css according to position
|
||||
container.find('.days').text(days);
|
||||
container.find('.hours').text(hours);
|
||||
container.find('.minutes').text(minutes);
|
||||
container.find('.seconds').text(seconds);
|
||||
|
||||
container.find('.days_ref').text(ref_days);
|
||||
container.find('.hours_ref').text(ref_hours);
|
||||
container.find('.minutes_ref').text(ref_minutes);
|
||||
container.find('.seconds_ref').text(ref_seconds);
|
||||
|
||||
var minRot = (360*minCount) + minutes*6 + 'deg';
|
||||
var secRot = (360*secCount) + seconds*6 + 'deg';
|
||||
container.find('.c-minute').css({'transform':'rotate('+minRot+')','-webkit-transform':'rotate('+minRot+')','-ms-transform':'rotate('+minRot+')','-moz-transform':'rotate('+minRot+')'});
|
||||
container.find('.c-second').css({'transform':'rotate('+secRot+')','-webkit-transform':'rotate('+secRot+')','-ms-transform':'rotate('+secRot+')','-moz-transform':'rotate('+secRot+')'});
|
||||
|
||||
// set knob value
|
||||
|
||||
$(".second .knob").val(centis).trigger("change");
|
||||
};
|
||||
|
||||
// start
|
||||
// var interval = setInterval(countdown, 1000);
|
||||
// var interval = setInterval(countdown, 1000*0.1);
|
||||
if($(".clock-container").length || $(".alt-clock").length ){
|
||||
var interval = setInterval(countdown, 250*1);
|
||||
}
|
||||
else{
|
||||
var interval = setInterval(countdown, 250*1);
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,691 @@
|
||||
/* --------------------------------------------------------------------
|
||||
MaxImage 2.0 (Fullscreen Slideshow for use with jQuery Cycle Plugin)
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Examples and documentation at: http://www.aaronvanderzwan.com/maximage/2.0/
|
||||
Copyright (c) 2007-2012 Aaron Vanderzwan
|
||||
Dual licensed under the MIT and GPL licenses.
|
||||
|
||||
NOTES:
|
||||
This plugin is intended to simplify the creation of fullscreen
|
||||
background slideshows. It is intended to be used alongside the
|
||||
jQuery Cycle plugin:
|
||||
http://jquery.malsup.com/cycle/
|
||||
|
||||
If you simply need a fullscreen background image, please
|
||||
refer to the following document for ways to do this that
|
||||
are much more simple:
|
||||
http://css-tricks.com/perfect-full-page-background-image/
|
||||
|
||||
If you have any questions please contact Aaron Vanderzwan
|
||||
at http://www.aaronvanderzwan.com/blog/
|
||||
Documentation at:
|
||||
http://blog.aaronvanderzwan.com/2012/07/maximage-2-0/
|
||||
|
||||
HISTORY:
|
||||
MaxImage 2.0 is a project first built as jQuery MaxImage Plugin
|
||||
(http://www.aaronvanderzwan.com/maximage/). Once CSS3 came along,
|
||||
the background-size:cover solved the problem MaxImage
|
||||
was intended to solve. However, fully customizable
|
||||
fullscreen slideshows is still fairly complex and I have not
|
||||
found any helpers for integrating with the jQuery Cycle Plugin.
|
||||
MaxCycle is intended to solve this problem.
|
||||
|
||||
TABLE OF CONTENTS:
|
||||
@Modern
|
||||
@setup
|
||||
@resize
|
||||
@preload
|
||||
@Old
|
||||
@setup
|
||||
@preload
|
||||
@onceloaded
|
||||
@maximage
|
||||
@windowresize
|
||||
@doneresizing
|
||||
@Cycle
|
||||
@setup
|
||||
@Adjust
|
||||
@center
|
||||
@fill
|
||||
@maxcover
|
||||
@maxcontain
|
||||
@Utils
|
||||
@browser_tests
|
||||
@construct_slide_object
|
||||
@sizes
|
||||
@modern_browser
|
||||
@debug
|
||||
|
||||
*/
|
||||
/*!
|
||||
* Maximage Version: 2.0.8 (16-Jan-2012) - http://www.aaronvanderzwan.com/maximage/2.0/
|
||||
*/
|
||||
|
||||
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$.fn.maximage = function (settings, helperSettings) {
|
||||
|
||||
var config;
|
||||
|
||||
if (typeof settings == 'object' || settings === undefined) config = $.extend( $.fn.maximage.defaults, settings || {} );
|
||||
if (typeof settings == 'string') config = $.fn.maximage.defaults;
|
||||
|
||||
/*jslint browser: true*/
|
||||
$.Body = $('body');
|
||||
$.Window = $(window);
|
||||
$.Scroll = $('html, body');
|
||||
$.Events = {
|
||||
RESIZE: 'resize'
|
||||
};
|
||||
|
||||
this.each(function() {
|
||||
var $self = $(this),
|
||||
preload_count = 0,
|
||||
imageCache = [];
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Modern
|
||||
|
||||
/*
|
||||
MODERN BROWSER NOTES:
|
||||
Modern browsers have CSS3 background-size option so we setup the DOM to be the following structure for cycle plugin:
|
||||
div = cycle
|
||||
div = slide with background-size:cover
|
||||
div = slide with background-size:cover
|
||||
etc.
|
||||
*/
|
||||
|
||||
var Modern = {
|
||||
setup: function(){
|
||||
if($.Slides.length > 0){
|
||||
// Setup images
|
||||
for(var i in $.Slides) {
|
||||
// Set our image
|
||||
var $img = $.Slides[i];
|
||||
|
||||
// Create a div with a background image so we can use CSS3's position cover (for modern browsers)
|
||||
$self.append('<div class="mc-image ' + $img.theclass + '" title="' + $img.alt + '" style="background-image:url(\'' + $img.url + '\');' + $img.style + '" data-href="'+ $img.datahref +'">'+ $img.content +'</div>');
|
||||
}
|
||||
|
||||
// Begin our preload process (increments itself after load)
|
||||
Modern.preload(0);
|
||||
|
||||
// If using Cycle, this resets the height and width of each div to always fill the window; otherwise can be done with CSS
|
||||
Modern.resize();
|
||||
}
|
||||
},
|
||||
preload: function(n){
|
||||
// Preload all of the images but never show them, just use their completion so we know that they are done
|
||||
// and so that the browser can cache them / fade them in smoothly
|
||||
|
||||
// Create new image object
|
||||
var $img = $('<img/>');
|
||||
$img.load(function() {
|
||||
// Once the first image has completed loading, start the slideshow, etc.
|
||||
if(preload_count==0) {
|
||||
// Only start cycle after first image has loaded
|
||||
Cycle.setup();
|
||||
|
||||
// Run user defined onFirstImageLoaded() function
|
||||
config.onFirstImageLoaded();
|
||||
}
|
||||
|
||||
// preload_count starts with 0, $.Slides.length starts with 1
|
||||
if(preload_count==($.Slides.length-1)) {
|
||||
// If we have just loaded the final image, run the user defined function onImagesLoaded()
|
||||
config.onImagesLoaded( $self );
|
||||
}else{
|
||||
// Increment the counter
|
||||
preload_count++;
|
||||
|
||||
// Load the next image
|
||||
Modern.preload(preload_count);
|
||||
}
|
||||
});
|
||||
|
||||
// Set the src... this triggers begin of load
|
||||
$img[0].src = $.Slides[n].url;
|
||||
|
||||
// Push to external array to avoid cleanup by aggressive garbage collectors
|
||||
imageCache.push($img[0]);
|
||||
},
|
||||
resize: function(){
|
||||
// Cycle sets the height of each slide so when we resize our browser window this becomes a problem.
|
||||
// - the cycle option 'slideResize' has to be set to false otherwise it will trump our resize
|
||||
$.Window
|
||||
.bind($.Events.RESIZE,
|
||||
function(){
|
||||
// Remove scrollbars so we can take propper measurements
|
||||
$.Scroll.addClass('mc-hide-scrolls');
|
||||
|
||||
// Set vars so we don't have to constantly check it
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Set container and slides height and width to match the window size
|
||||
$self
|
||||
.height($.Window.data('h')).width($.Window.data('w'))
|
||||
.children()
|
||||
.height($.Window.data('h')).width($.Window.data('w'));
|
||||
|
||||
// This is special noise for cycle (cycle has separate height and width for each slide)
|
||||
$self.children().each(function(){
|
||||
this.cycleH = $.Window.data('h');
|
||||
this.cycleW = $.Window.data('w');
|
||||
});
|
||||
|
||||
// Put the scrollbars back to how they were
|
||||
$($.Scroll).removeClass('mc-hide-scrolls');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Old
|
||||
|
||||
/*
|
||||
OLD BROWSER NOTES:
|
||||
We setup the dom to be the following structure for cycle plugin on old browsers:
|
||||
div = cycle
|
||||
div = slide
|
||||
img = full screen size image
|
||||
div = slide
|
||||
img = full screen size image
|
||||
etc.
|
||||
*/
|
||||
|
||||
var Old = {
|
||||
setup: function(){
|
||||
var c, t, $div;
|
||||
|
||||
// Clear container
|
||||
if($.BrowserTests.msie && !config.overrideMSIEStop){
|
||||
// Stop IE from continually trying to preload images that we already removed
|
||||
document.execCommand("Stop", false);
|
||||
}
|
||||
$self.html('');
|
||||
|
||||
$.Body.addClass('mc-old-browser');
|
||||
|
||||
if($.Slides.length > 0){
|
||||
// Remove scrollbars so we can take propper measurements
|
||||
$.Scroll.addClass('mc-hide-scrolls');
|
||||
|
||||
// Cache our new dimensions
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Add our loading div to the DOM
|
||||
$('body').append($("<div></div>").attr("class", "mc-loader").css({'position':'absolute','left':'-9999px'}));
|
||||
|
||||
// Loop through slides
|
||||
for(var j in $.Slides) {
|
||||
// Determine content (if container or image)
|
||||
if($.Slides[j].content.length == 0){
|
||||
c = '<img src="' + $.Slides[j].url + '" />';
|
||||
}else{
|
||||
c = $.Slides[j].content;
|
||||
}
|
||||
|
||||
// Create Div
|
||||
$div = $("<div>" + c + "</div>").attr("class", "mc-image mc-image-n" + j + " " + $.Slides[j].theclass);
|
||||
|
||||
// Add new container div to the DOM
|
||||
$self.append( $div );
|
||||
|
||||
// Account for slides without images
|
||||
if($('.mc-image-n' + j).children('img').length == 0){
|
||||
}else{
|
||||
// Add first image to loader to get that started
|
||||
$('div.mc-loader').append( $('.mc-image-n' + j).children('img').first().clone().addClass('not-loaded') );
|
||||
}
|
||||
}
|
||||
|
||||
// Begin preloading
|
||||
Old.preload();
|
||||
|
||||
// Setup the resize function to listen for window changes
|
||||
Old.windowResize();
|
||||
}
|
||||
},
|
||||
preload: function(){
|
||||
// Intervals to tell if an images have loaded
|
||||
var t = setInterval(function() {
|
||||
$('.mc-loader').children('img').each(function(i){
|
||||
// Check if image is loaded
|
||||
var $img = $(this);
|
||||
|
||||
// Loop through not-loaded images
|
||||
if($img.hasClass('not-loaded')){
|
||||
if( $img.height() > 0 ){
|
||||
// Remove Dom notice
|
||||
$(this).removeClass('not-loaded');
|
||||
|
||||
// Set the dimensions
|
||||
var $img1 = $('div.mc-image-n' + i).children('img').first();
|
||||
|
||||
$img1
|
||||
.data('h', $img.height())
|
||||
.data('w', $img.width())
|
||||
.data('ar', ($img.width() / $img.height()));
|
||||
|
||||
// Go on
|
||||
Old.onceLoaded(i)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if( $('.not-loaded').length == 0){
|
||||
// Remove our loader element because all of our images are now loaded
|
||||
$('.mc-loader').remove();
|
||||
|
||||
// Clear interval when all images are loaded
|
||||
clearInterval(t);
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
onceLoaded: function(m){
|
||||
// Do maximage magic
|
||||
Old.maximage(m);
|
||||
|
||||
// Once the first image has completed loading, start the slideshow, etc.
|
||||
if(m == 0) {
|
||||
// If we changed the visibility before, make sure it is back on
|
||||
$self.css({'visibility':'visible'});
|
||||
|
||||
// Run user defined onFirstImageLoaded() function
|
||||
config.onFirstImageLoaded();
|
||||
|
||||
// After everything is done loading, clean up
|
||||
}else if(m == $.Slides.length - 1){
|
||||
// Only start cycle after the first image has loaded
|
||||
Cycle.setup();
|
||||
|
||||
// Put the scrollbars back to how they were
|
||||
$($.Scroll).removeClass('mc-hide-scrolls');
|
||||
|
||||
// If we have just loaded the final image, run the user defined function onImagesLoaded()
|
||||
config.onImagesLoaded( $self );
|
||||
|
||||
if(config.debug) {
|
||||
debug(' - Final Maximage - ');debug($self);
|
||||
}
|
||||
}
|
||||
},
|
||||
maximage: function(p){
|
||||
// Cycle sets the height of each slide so when we resize our browser window this becomes a problem.
|
||||
// - the cycle option 'slideResize' has to be set to false otherwise it will trump our resize
|
||||
$('div.mc-image-n' + p)
|
||||
.height($.Window.data('h'))
|
||||
.width($.Window.data('w'))
|
||||
.children('img')
|
||||
.first()
|
||||
.each(function(){
|
||||
Adjust.maxcover($(this));
|
||||
});
|
||||
},
|
||||
windowResize: function(){
|
||||
$.Window
|
||||
.bind($.Events.RESIZE,
|
||||
function(){
|
||||
clearTimeout(this.id);
|
||||
this.id = setTimeout(Old.doneResizing, 200);
|
||||
});
|
||||
},
|
||||
doneResizing: function(){
|
||||
// The final resize (on finish)
|
||||
// Remove scrollbars so we can take propper measurements
|
||||
$($.Scroll).addClass('mc-hide-scrolls');
|
||||
|
||||
// Cache our window's new dimensions
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Set the container's height and width
|
||||
$self.height($.Window.data('h')).width($.Window.data('w'))
|
||||
|
||||
// Set slide's height and width to match the window size
|
||||
$self.find('.mc-image').each(function(n){
|
||||
Old.maximage(n);
|
||||
});
|
||||
|
||||
// Update cycle's ideas of what our slide's height and width should be
|
||||
var curr_opts = $self.data('cycle.opts');
|
||||
if(curr_opts != undefined){
|
||||
curr_opts.height = $.Window.data('h');
|
||||
curr_opts.width = $.Window.data('w');
|
||||
jQuery.each(curr_opts.elements, function(index, item) {
|
||||
item.cycleW = $.Window.data('w');
|
||||
item.cycleH = $.Window.data('h');
|
||||
});
|
||||
}
|
||||
|
||||
// Put the scrollbars back to how they were
|
||||
$($.Scroll).removeClass('mc-hide-scrolls');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Cycle
|
||||
|
||||
var Cycle = {
|
||||
setup: function(){
|
||||
var h,w;
|
||||
|
||||
$self.addClass('mc-cycle');
|
||||
|
||||
// Container sizes (if not set)
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Prefer CSS Transitions
|
||||
jQuery.easing.easeForCSSTransition = function(x, t, b, c, d, s) {
|
||||
return b+c;
|
||||
};
|
||||
|
||||
var cycleOptions = $.extend({
|
||||
fit:1,
|
||||
containerResize:0,
|
||||
height:$.Window.data('h'),
|
||||
width:$.Window.data('w'),
|
||||
slideResize: false,
|
||||
easing: ($.BrowserTests.cssTransitions && config.cssTransitions ? 'easeForCSSTransition' : 'swing')
|
||||
}, config.cycleOptions);
|
||||
|
||||
$self.cycle( cycleOptions );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Adjust = Math to center and fill all elements
|
||||
|
||||
var Adjust = {
|
||||
center: function($item){
|
||||
// Note: if alignment is 'left' or 'right' it can be controlled with CSS once verticalCenter
|
||||
// and horizontal center are set to false in the plugin options
|
||||
if(config.verticalCenter){
|
||||
$item.css({marginTop:(($item.height() - $.Window.data('h'))/2) * -1})
|
||||
}
|
||||
if(config.horizontalCenter){
|
||||
$item.css({marginLeft:(($item.width() - $.Window.data('w'))/2) * -1});
|
||||
}
|
||||
},
|
||||
fill: function($item){
|
||||
var $storageEl = $item.is('object') ? $item.parent().first() : $item;
|
||||
|
||||
if(typeof config.backgroundSize == 'function'){
|
||||
// If someone wants to write their own fill() function, they can: example customBackgroundSize.html
|
||||
config.backgroundSize( $item );
|
||||
}else if(config.backgroundSize == 'cover'){
|
||||
if($.Window.data('w') / $.Window.data('h') < $storageEl.data('ar')){
|
||||
$item
|
||||
.height($.Window.data('h'))
|
||||
.width(($.Window.data('h') * $storageEl.data('ar')).toFixed(0));
|
||||
}else{
|
||||
$item
|
||||
.height(($.Window.data('w') / $storageEl.data('ar')).toFixed(0))
|
||||
.width($.Window.data('w'));
|
||||
}
|
||||
}else if(config.backgroundSize == 'contain'){
|
||||
if($.Window.data('w') / $.Window.data('h') < $storageEl.data('ar')){
|
||||
$item
|
||||
.height(($.Window.data('w') / $storageEl.data('ar')).toFixed(0))
|
||||
.width($.Window.data('w'));
|
||||
}else{
|
||||
$item
|
||||
.height($.Window.data('h'))
|
||||
.width(($.Window.data('h') * $storageEl.data('ar')).toFixed(0));
|
||||
}
|
||||
}else{
|
||||
debug('The backgroundSize option was not recognized for older browsers.');
|
||||
}
|
||||
},
|
||||
maxcover: function($item){
|
||||
Adjust.fill($item);
|
||||
Adjust.center($item);
|
||||
},
|
||||
maxcontain: function($item){
|
||||
Adjust.fill($item);
|
||||
Adjust.center($item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Utils = General utilities for the plugin
|
||||
|
||||
var Utils = {
|
||||
browser_tests: function(){
|
||||
var $div = $('<div />')[0],
|
||||
vendor = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'],
|
||||
p = 'transition',
|
||||
obj = {
|
||||
cssTransitions: false,
|
||||
cssBackgroundSize: ( "backgroundSize" in $div.style && config.cssBackgroundSize ), // Can override cssBackgroundSize in options
|
||||
html5Video: false,
|
||||
msie: false
|
||||
};
|
||||
|
||||
// Test for CSS Transitions
|
||||
if(config.cssTransitions){
|
||||
if(typeof $div.style[p] == 'string') { obj.cssTransitions = true }
|
||||
|
||||
// Tests for vendor specific prop
|
||||
p = p.charAt(0).toUpperCase() + p.substr(1);
|
||||
for(var i=0; i<vendor.length; i++) {
|
||||
if(vendor[i] + p in $div.style) { obj.cssTransitions = true; }
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we can play html5 videos
|
||||
if( !!document.createElement('video').canPlayType ) {
|
||||
obj.html5Video = true;
|
||||
}
|
||||
|
||||
// Check for MSIE since we lost $.browser in jQuery
|
||||
obj.msie = (Utils.msie() !== undefined);
|
||||
|
||||
|
||||
if(config.debug) {
|
||||
debug(' - Browser Test - ');debug(obj);
|
||||
}
|
||||
|
||||
return obj;
|
||||
},
|
||||
construct_slide_object: function(){
|
||||
var obj = new Object(),
|
||||
arr = new Array(),
|
||||
temp = '';
|
||||
|
||||
$self.children().each(function(i){
|
||||
var $img = $(this).is('img') ? $(this).clone() : $(this).find('img').first().clone();
|
||||
|
||||
// reset obj
|
||||
obj = {};
|
||||
|
||||
// set attributes to obj
|
||||
obj.url = $img.attr('src');
|
||||
obj.title = $img.attr('title') != undefined ? $img.attr('title') : '';
|
||||
obj.alt = $img.attr('alt') != undefined ? $img.attr('alt') : '';
|
||||
obj.theclass = $img.attr('class') != undefined ? $img.attr('class') : '';
|
||||
obj.styles = $img.attr('style') != undefined ? $img.attr('style') : '';
|
||||
obj.orig = $img.clone();
|
||||
obj.datahref = $img.attr('data-href') != undefined ? $img.attr('data-href') : '';
|
||||
obj.content = "";
|
||||
|
||||
// Setup content for within container
|
||||
if($(this).find('img').length > 0){
|
||||
if($.BrowserTests.cssBackgroundSize){
|
||||
$(this).find('img').first().remove();
|
||||
}
|
||||
obj.content = $(this).html();
|
||||
}
|
||||
|
||||
// Stop loading image so we can load them sequentiallyelse{
|
||||
$img[0].src = "";
|
||||
|
||||
// Remove original object (only on nonIE. IE hangs if you remove an image during load)
|
||||
if($.BrowserTests.cssBackgroundSize){
|
||||
$(this).remove();
|
||||
}
|
||||
|
||||
// attach obj to arr
|
||||
arr.push(obj);
|
||||
});
|
||||
|
||||
|
||||
if(config.debug) {
|
||||
debug(' - Slide Object - ');debug(arr);
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
msie: function(){
|
||||
var undef,
|
||||
v = 3,
|
||||
div = document.createElement('div'),
|
||||
all = div.getElementsByTagName('i');
|
||||
|
||||
while (
|
||||
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
|
||||
all[0]
|
||||
);
|
||||
|
||||
return v > 4 ? v : undef;
|
||||
},
|
||||
sizes: function(){
|
||||
var sizes = {h:0,w:0};
|
||||
|
||||
if(config.fillElement == "window"){
|
||||
sizes.h = $.Window.height();
|
||||
sizes.w = $.Window.width();
|
||||
}else{
|
||||
var $fillElement = $self.parents(config.fillElement).first();
|
||||
|
||||
// Height
|
||||
if($fillElement.height() == 0 || $fillElement.data('windowHeight') == true){
|
||||
$fillElement.data('windowHeight',true);
|
||||
sizes.h = $.Window.height();
|
||||
}else{
|
||||
sizes.h = $fillElement.height();
|
||||
}
|
||||
|
||||
// Width
|
||||
if($fillElement.width() == 0 || $fillElement.data('windowWidth') == true){
|
||||
$fillElement.data('windowWidth',true);
|
||||
sizes.w = $.Window.width();
|
||||
}else{
|
||||
sizes.w = $fillElement.width();
|
||||
}
|
||||
}
|
||||
|
||||
return sizes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
// @Instantiation
|
||||
|
||||
// Helper Function
|
||||
// Run tests to see what our browser can handle
|
||||
$.BrowserTests = Utils.browser_tests();
|
||||
|
||||
if(typeof settings == 'string'){
|
||||
// TODO: Resize object fallback for old browsers, If we are trying to size an HTML5 video and our browser doesn't support it
|
||||
if($.BrowserTests.html5Video || !$self.is('video')) {
|
||||
var to,
|
||||
$storageEl = $self.is('object') ? $self.parent().first() : $self; // Can't assign .data() to '<object>'
|
||||
|
||||
if( !$.Body.hasClass('mc-old-browser') )
|
||||
$.Body.addClass('mc-old-browser');
|
||||
|
||||
// Cache our window's new dimensions
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Please include height and width attributes on your html elements
|
||||
$storageEl
|
||||
.data('h', $self.height())
|
||||
.data('w', $self.width())
|
||||
.data('ar', $self.width() / $self.height());
|
||||
|
||||
// We want to resize these elements with the window
|
||||
$.Window
|
||||
.bind($.Events.RESIZE,
|
||||
function(){
|
||||
// Cache our window's new dimensions
|
||||
$.Window
|
||||
.data('h', Utils.sizes().h)
|
||||
.data('w', Utils.sizes().w);
|
||||
|
||||
// Limit resize runs
|
||||
to = $self.data('resizer');
|
||||
clearTimeout(to);
|
||||
to = setTimeout( Adjust[settings]($self), 200 );
|
||||
$self.data('resizer', to);
|
||||
});
|
||||
|
||||
// Initial run
|
||||
Adjust[settings]($self);
|
||||
}
|
||||
}else{
|
||||
// Construct array of image objects for us to use
|
||||
$.Slides = Utils.construct_slide_object();
|
||||
|
||||
// If we are allowing background-size:cover run Modern
|
||||
if($.BrowserTests.cssBackgroundSize){
|
||||
if(config.debug) debug(' - Using Modern - ');
|
||||
Modern.setup();
|
||||
}else{
|
||||
if(config.debug) debug(' - Using Old - ');
|
||||
Old.setup();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// private function for debugging
|
||||
function debug($obj) {
|
||||
if (window.console && window.console.log) {
|
||||
window.console.log($obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default options
|
||||
$.fn.maximage.defaults = {
|
||||
debug: false,
|
||||
cssBackgroundSize: true, // Force run the functionality used for newer browsers
|
||||
cssTransitions: true, // Force run the functionality used for old browsers
|
||||
verticalCenter: true, // Only necessary for old browsers
|
||||
horizontalCenter: true, // Only necessary for old browsers
|
||||
scaleInterval: 20, // Only necessary for old browsers
|
||||
backgroundSize: 'cover', // Only necessary for old browsers (this can be function)
|
||||
fillElement: 'window', // Either 'window' or a CSS selector for a parent element
|
||||
overrideMSIEStop: false, // This gives the option to not 'stop' load for MSIE (stops coded background images from loading so we can preload)...
|
||||
// If setting this option to true, please beware of IE7/8 "Stack Overflow" error but if there are more than 13 slides
|
||||
// The description of the bug: http://blog.aaronvanderzwan.com/forums/topic/stack-overflow-in-ie-7-8/#post-33038
|
||||
onFirstImageLoaded: function(){},
|
||||
onImagesLoaded: function(){}
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,213 @@
|
||||
"use strict";
|
||||
/* 0. Initialization */
|
||||
// Get height on Window resized
|
||||
$(window).on('resize',function(){
|
||||
var slideHeight = $('.slick-track').innerHeight();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
// Smooth scroll <a> links
|
||||
var $root = $('html, body');
|
||||
$('a.s-scroll').on('click',function() {
|
||||
var href = $.attr(this, 'href');
|
||||
$root.animate({
|
||||
scrollTop: $(href).offset().top
|
||||
}, 500, function () {
|
||||
window.location.hash = href;
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// Page Loader : hide loader when all are loaded
|
||||
$(window).load(function(){
|
||||
$('#page-loader').addClass('hidden');
|
||||
});
|
||||
|
||||
|
||||
/* 1. Clock attribute */
|
||||
|
||||
var dateReadableText = 'Upcoming date';
|
||||
if($('.site-config').attr('data-date-readable') && ($('.site-config').attr('data-date-readable') != '')){
|
||||
$('.timeout-day').text('');
|
||||
dateReadableText = $('.site-config').attr('data-date-readable');
|
||||
$('.timeout-day').text(dateReadableText);
|
||||
}
|
||||
$('.clock-countdown').downCount({
|
||||
date: $('.site-config').attr('data-date'),
|
||||
offset: +10
|
||||
}, function () {
|
||||
//callback here if finished
|
||||
//alert('YES, done!');
|
||||
var zerodayText = 'An upcoming date';
|
||||
if($('.site-config').attr('data-zeroday-text') && ($('.site-config').attr('data-zeroday-text') != '')){
|
||||
$('.timeout-day').text('');
|
||||
zerodayText = $('.site-config').attr('data-zeroday-text');
|
||||
}
|
||||
$('.timeout-day').text(zerodayText);
|
||||
});
|
||||
|
||||
|
||||
/* 2. Background for page / section */
|
||||
|
||||
var background = '#ccc';
|
||||
var backgroundMask = 'rgba(255,255,255,0.92)';
|
||||
var backgroundVideoUrl = 'none';
|
||||
|
||||
/* Background image as data attribut */
|
||||
var list = $('.bg-img');
|
||||
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var src = list[i].getAttribute('data-image-src');
|
||||
list[i].style.backgroundImage = "url('" + src + "')";
|
||||
list[i].style.backgroundRepeat = "no-repeat";
|
||||
list[i].style.backgroundPosition = "center";
|
||||
list[i].style.backgroundSize = "cover";
|
||||
}
|
||||
|
||||
/* Background color as data attribut */
|
||||
var list = $('.bg-color');
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var src = list[i].getAttribute('data-bgcolor');
|
||||
list[i].style.backgroundColor = src;
|
||||
}
|
||||
|
||||
/* Background slide show Background variables */
|
||||
var imageList = $('.slide-show .img');
|
||||
var imageSlides = [];
|
||||
for (var i = 0; i < imageList.length; i++) {
|
||||
var src = imageList[i].getAttribute('data-src');
|
||||
imageSlides.push({src: src});
|
||||
}
|
||||
|
||||
|
||||
/* Slide Background variables */
|
||||
var isSlide = false;
|
||||
var slideElem = $('.slide');
|
||||
var arrowElem = $('.p-footer .arrow-d');
|
||||
var pageElem = $('.page');
|
||||
|
||||
/* 3. Init all plugin on load */
|
||||
$(document).ready(function() {
|
||||
/* Init console to avoid error */
|
||||
var method;
|
||||
var noop = function () {};
|
||||
var methods = [
|
||||
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
|
||||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
||||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
||||
'timeStamp', 'trace', 'warn'
|
||||
];
|
||||
var length = methods.length;
|
||||
var console = (window.console = window.console || {});
|
||||
|
||||
while (length--) {
|
||||
method = methods[length];
|
||||
|
||||
// Only stub undefined methods.
|
||||
if (!console[method]) {
|
||||
console[method] = noop;
|
||||
}
|
||||
}
|
||||
|
||||
/* Init Slidesow background */
|
||||
$('.slide-show').vegas({
|
||||
delay: 5000,
|
||||
shuffle: true,
|
||||
slides: imageSlides,
|
||||
//transition: [ 'zoomOut', 'burn' ],
|
||||
animation: [ 'kenburnsUp', 'kenburnsDown', 'kenburnsLeft', 'kenburnsRight' ]
|
||||
});
|
||||
|
||||
/* Init video background */
|
||||
$('.video-container video, .video-container object').maximage('maxcover');
|
||||
|
||||
/* Init youtube video background */
|
||||
if(backgroundVideoUrl != 'none'){
|
||||
|
||||
//disable video background for smallscreen
|
||||
if($(window).width() > 640){
|
||||
$.okvideo({ source: backgroundVideoUrl,
|
||||
adproof: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Init fullpage.js */
|
||||
$('#mainpage').fullpage({
|
||||
menu: '#qmenu',
|
||||
anchors: ['home', 'register', 'about-us', 'contact'],
|
||||
// verticalCentered: false,
|
||||
// resize : false,
|
||||
// responsive: 900,
|
||||
scrollOverflow: true,
|
||||
css3: false,
|
||||
navigation: true,
|
||||
onLeave: function(index, nextIndex, direction){
|
||||
arrowElem.addClass('gone');
|
||||
pageElem.addClass('transition');
|
||||
// $('.active').removeClass('transition');
|
||||
slideElem.removeClass('transition');
|
||||
isSlide = false;
|
||||
},
|
||||
afterLoad: function(anchorLink, index){
|
||||
arrowElem.removeClass('gone');
|
||||
pageElem.removeClass('transition');
|
||||
if(isSlide){
|
||||
slideElem.removeClass('transition');
|
||||
}
|
||||
},
|
||||
|
||||
afterRender: function(){}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Email validation text, uncomment below to use them
|
||||
/*
|
||||
// Email registration
|
||||
var email_reg_elem = document.getElementById("reg-email");
|
||||
email_reg_elem.oninvalid = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
if (!e.target.validity.valid) {
|
||||
e.target.setCustomValidity("This email field cannot be left blank");
|
||||
}
|
||||
};
|
||||
email_reg_elem.oninput = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
};
|
||||
// email message
|
||||
var email_message_elem = document.getElementById("mes-email");
|
||||
email_message_elem.oninvalid = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
if (!e.target.validity.valid) {
|
||||
e.target.setCustomValidity("This email field cannot be left blank");
|
||||
}
|
||||
};
|
||||
// name message
|
||||
email_message_elem.oninput = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
};
|
||||
var name_message_elem = document.getElementById("mes-name");
|
||||
name_message_elem.oninvalid = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
if (!e.target.validity.valid) {
|
||||
e.target.setCustomValidity("This name field cannot be left blank");
|
||||
}
|
||||
};
|
||||
// text message
|
||||
name_message_elem.oninput = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
};
|
||||
var text_message_elem = document.getElementById("mes-text");
|
||||
text_message_elem.oninvalid = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
if (!e.target.validity.valid) {
|
||||
e.target.setCustomValidity("This text field cannot be left blank");
|
||||
}
|
||||
};
|
||||
text_message_elem.oninput = function(e) {
|
||||
e.target.setCustomValidity("");
|
||||
};
|
||||
*/
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Maplace.js 0.1.32
|
||||
*
|
||||
* Copyright (c) 2013 Daniele Moraschi
|
||||
* Licensed under the MIT license
|
||||
* For all details and documentation:
|
||||
* http://maplacejs.com
|
||||
*/
|
||||
;(function(g,s,f,n){var q,m,p;q={activateCurrent:function(e){this.html_element.find("select").val(e)},getHtml:function(){var e=this,a="",b;if(1<this.ln){a+='<select class="dropdown controls '+this.o.controls_cssclass+'">';this.ShowOnMenu(this.view_all_key)&&(a+='<option value="'+this.view_all_key+'">'+this.o.view_all_text+"</option>");for(b=0;b<this.ln;b+=1)this.ShowOnMenu(b)&&(a+='<option value="'+(b+1)+'">'+(this.o.locations[b].title||"#"+(b+1))+"</option>");a=g(a+"</select>").bind("change",function(){e.ViewOnMap(this.value)})}(b=
|
||||
this.o.controls_title)&&(b=g('<div class="controls_title"></div>').css(this.o.controls_applycss?{fontWeight:"bold",fontSize:this.o.controls_on_map?"12px":"inherit",padding:"3px 10px 5px 0"}:{}).append(this.o.controls_title));return this.html_element=g('<div class="wrap_controls"></div>').append(b).append(a)}};m={html_a:function(e,a,b){var c=this;a=a||e+1;b=b||this.o.locations[e].title;e=g('<a data-load="'+a+'" id="ullist_a_'+a+'" href="#'+a+'" title="'+b+'"><span>'+(b||"#"+(e+1))+"</span></a>");e.css(this.o.controls_applycss?
|
||||
{color:"#666",display:"block",padding:"5px",fontSize:this.o.controls_on_map?"12px":"inherit",textDecoration:"none"}:{});e.on("click",function(a){a.preventDefault();a=g(this).attr("data-load");c.ViewOnMap(a)});return e},activateCurrent:function(e){this.html_element.find("li").removeClass("active");this.html_element.find("#ullist_a_"+e).parent().addClass("active")},getHtml:function(){var e=g("<ul class='ullist controls "+this.o.controls_cssclass+"'></ul>").css(this.o.controls_applycss?{margin:0,padding:0,
|
||||
listStyleType:"none"}:{}),a;this.ShowOnMenu(this.view_all_key)&&e.append(g("<li></li>").append(m.html_a.call(this,!1,this.view_all_key,this.o.view_all_text)));for(a=0;a<this.ln;a++)this.ShowOnMenu(a)&&e.append(g("<li></li>").append(m.html_a.call(this,a)));(a=this.o.controls_title)&&(a=g('<div class="controls_title"></div>').css(this.o.controls_applycss?{fontWeight:"bold",padding:"3px 10px 5px 0",fontSize:this.o.controls_on_map?"12px":"inherit"}:{}).append(this.o.controls_title));return this.html_element=
|
||||
g('<div class="wrap_controls"></div>').append(a).append(e)}};p=function(){function e(a){this.VERSION="0.1.32";this.loaded=!1;this.markers=[];this.circles=[];this.oMap=!1;this.view_all_key="all";this.infowindow=null;this.ln=0;this.oMap=!1;this.directionsDisplay=this.directionsService=this.Fusion=this.Polygon=this.Polyline=this.current_index=this.current_control=this.controls_wrapper=this.canvas_map=this.map_div=this.oBounds=null;this.o={debug:!1,map_div:"#gmap",controls_div:"#controls",generate_controls:!0,
|
||||
controls_type:"dropdown",controls_cssclass:"",controls_title:"",controls_on_map:!0,controls_applycss:!0,controls_position:f.maps.ControlPosition.RIGHT_TOP,type:"marker",view_all:!0,view_all_text:"View All",pan_on_click:!0,start:0,locations:[],shared:{},map_options:{mapTypeId:f.maps.MapTypeId.ROADMAP},stroke_options:{strokeColor:"#0000FF",strokeOpacity:.8,strokeWeight:2,fillColor:"#0000FF",fillOpacity:.4},directions_options:{travelMode:f.maps.TravelMode.DRIVING,unitSystem:f.maps.UnitSystem.METRIC,
|
||||
optimizeWaypoints:!1,provideRouteAlternatives:!1,avoidHighways:!1,avoidTolls:!1},circle_options:{radius:100,visible:!0},styles:{},fusion_options:{},directions_panel:null,draggable:!1,editable:!1,show_infowindows:!0,show_markers:!0,infowindow_type:"bubble",listeners:{},beforeViewAll:function(){},afterViewAll:function(){},beforeShow:function(a,c,d){},afterShow:function(a,c,d){},afterCreateMarker:function(a,c,d){},beforeCloseInfowindow:function(a,c){},afterCloseInfowindow:function(a,c){},beforeOpenInfowindow:function(a,
|
||||
c,d){},afterOpenInfowindow:function(a,c,d){},afterRoute:function(a,c,d){},onPolylineClick:function(a){},onPolygonClick:function(a){},circleRadiusChanged:function(a,c,d){},circleCenterChanged:function(a,c,d){},drag:function(a,c,d){},dragEnd:function(a,c,d){},dragStart:function(a,c,d){}};this.AddControl("dropdown",q);this.AddControl("list",m);a&&"directions"===a.type&&(!a.show_markers&&(a.show_markers=!1),!a.show_infowindows&&(a.show_infowindows=!1));g.extend(!0,this.o,a)}e.prototype.controls={};e.prototype.create_objMap=
|
||||
function(){var a=0,b;for(b in this.o.styles)this.o.styles.hasOwnProperty(b)&&(0===a&&(this.o.map_options.mapTypeControlOptions={mapTypeIds:[f.maps.MapTypeId.ROADMAP]}),a++,this.o.map_options.mapTypeControlOptions.mapTypeIds.push("map_style_"+a));if(this.loaded)this.oMap.setOptions(this.o.map_options);else try{this.map_div.css({position:"relative",overflow:"hidden"}),this.canvas_map=g("<div>").addClass("canvas_map").css({width:"100%",height:"100%"}).appendTo(this.map_div),this.oMap=new f.maps.Map(this.canvas_map.get(0),
|
||||
this.o.map_options)}catch(c){this.debug("create_objMap::"+this.map_div.selector,c.toString())}a=0;for(b in this.o.styles)this.o.styles.hasOwnProperty(b)&&(a++,this.oMap.mapTypes.set("map_style_"+a,new f.maps.StyledMapType(this.o.styles[b],{name:b})),this.oMap.setMapTypeId("map_style_"+a))};e.prototype.add_markers_to_objMap=function(){var a,b;a=this.o.type||"marker";switch(a){case "marker":for(a=0;a<this.ln;a++)b=this.create_objPoint(a),this.create.marker.call(this,a,b);break;default:this.create[a].apply(this)}};
|
||||
e.prototype.create_objPoint=function(a){a=g.extend({},this.o.locations[a]);var b=a.visible===n?n:a.visible;!a.type&&(a.type=this.o.type);a.map=this.oMap;a.position=new f.maps.LatLng(a.lat,a.lon);a.zIndex=1E4;a.visible=b===n?this.o.show_markers:b;a.image&&(a.icon=new f.maps.MarkerImage(a.image,new f.maps.Size(a.image_w||32,a.image_h||32),new f.maps.Point(0,0),new f.maps.Point(image_w/2,image_h/2)));return a};e.prototype.create_objCircle=function(a){var b,c,d;d=g.extend({},a);b=g.extend({},this.o.stroke_options);
|
||||
c=g.extend({},this.o.circle_options);g.extend(b,a.stroke_options||{});g.extend(d,b);g.extend(c,a.circle_options||{});g.extend(d,c);d.center=a.position;d.draggable=!1;d.zIndex=9E3;return d};e.prototype.add_markerEv=function(a,b,c){var d=this;f.maps.event.addListener(c,"click",function(e){d.o.beforeShow(a,b,c);d.o.show_infowindows&&!1!==b.show_infowindow&&d.open_infowindow(a,c,e);d.o.pan_on_click&&!1!==b.pan_on_click&&(d.oMap.panTo(b.position),b.zoom&&d.oMap.setZoom(b.zoom));d.current_control&&d.o.generate_controls&&
|
||||
d.current_control.activateCurrent&&d.current_control.activateCurrent.call(d,a+1);d.current_index=a;d.o.afterShow(a,b,c)});b.draggable&&this.add_dragEv(a,b,c)};e.prototype.add_circleEv=function(a,b,c){var d=this;f.maps.event.addListener(c,"click",function(){d.ViewOnMap(a+1)});f.maps.event.addListener(c,"center_changed",function(){d.o.circleCenterChanged(a,b,c)});f.maps.event.addListener(c,"radius_changed",function(){d.o.circleRadiusChanged(a,b,c)});b.draggable&&this.add_dragEv(a,b,c)};e.prototype.add_dragEv=
|
||||
function(a,b,c){var d=this;f.maps.event.addListener(c,"drag",function(e){var g;if(c.getPosition)e=c.getPosition();else if(c.getCenter)e=c.getCenter();else return;d.circles[a]&&d.circles[a].setCenter(e);d.Polyline?g="Polyline":d.Polygon&&(g="Polygon");if(g){for(var k=d[g].getPath().getArray(),h=[],l=0;l<k.length;++l)h[l]=a===l?new f.maps.LatLng(e.lat(),e.lng()):new f.maps.LatLng(k[l].lat(),k[l].lng());d[g].setPath(new f.maps.MVCArray(h));d.add_polyEv(g)}d.o.drag(a,b,c)});f.maps.event.addListener(c,
|
||||
"dragend",function(){d.o.dragEnd(a,b,c)});f.maps.event.addListener(c,"dragstart",function(){d.o.dragStart(a,b,c)});f.maps.event.addListener(c,"center_changed",function(){d.markers[a]&&c.getCenter&&d.markers[a].setPosition(c.getCenter());d.o.drag(a,b,c)})};e.prototype.add_polyEv=function(a){var b=this;f.maps.event.addListener(this[a].getPath(),"set_at",function(c,d){var e=b[a].getPath().getAt(c),e=new f.maps.LatLng(e.lat(),e.lng());b.markers[c]&&b.markers[c].setPosition(e);b.circles[c]&&b.circles[c].setCenter(e);
|
||||
b.o["on"+a+"Changed"](c,d,b[a].getPath().getArray())})};e.prototype.create={marker:function(a,b,c){var d;"circle"!=b.type||c||(d=this.create_objCircle(b),b.visible||(d.draggable=b.draggable),c=new f.maps.Circle(d),this.add_circleEv(a,d,c),this.circles[a]=c);b.type="marker";c=new f.maps.Marker(b);this.add_markerEv(a,b,c);this.oBounds.extend(b.position);this.markers[a]=c;this.o.afterCreateMarker(a,b,c);return c},circle:function(){var a,b,c,d;for(a=0;a<this.ln;a++)b=this.create_objPoint(a),"circle"==
|
||||
b.type&&(c=this.create_objCircle(b),b.visible||(c.draggable=b.draggable),d=new f.maps.Circle(c),this.add_circleEv(a,c,d),this.circles[a]=d),b.type="marker",this.create.marker.call(this,a,b,d)},polyline:function(){var a,b,c=g.extend({},this.o.stroke_options);c.path=[];c.draggable=this.o.draggable;c.editable=this.o.editable;c.map=this.oMap;c.zIndex=11E3;for(a=0;a<this.ln;a++)b=this.create_objPoint(a),this.create.marker.call(this,a,b),c.path.push(b.position);this.Polyline?this.Polyline.setOptions(c):
|
||||
this.Polyline=new f.maps.Polyline(c);this.add_polyEv("Polyline")},polygon:function(){var a=this,b,c,d=g.extend({},this.o.stroke_options);d.path=[];d.draggable=this.o.draggable;d.editable=this.o.editable;d.map=this.oMap;d.zIndex=11E3;for(b=0;b<this.ln;b++)c=this.create_objPoint(b),this.create.marker.call(this,b,c),d.path.push(c.position);this.Polygon?this.Polygon.setOptions(d):this.Polygon=new f.maps.Polygon(d);f.maps.event.addListener(this.Polygon,"click",function(b){a.o.onPolygonClick(b)});this.add_polyEv("Polygon")},
|
||||
fusion:function(){this.o.fusion_options.styles=[this.o.stroke_options];this.o.fusion_options.map=this.oMap;this.Fusion?this.Fusion.setOptions(this.o.fusion_options):this.Fusion=new f.maps.FusionTablesLayer(this.o.fusion_options)},directions:function(){var a=this,b,c,d,e,r,k=[],h=0;for(b=0;b<this.ln;b++)c=this.create_objPoint(b),0===b?e=c.position:b===this.ln-1?r=c.position:(d=!0===this.o.locations[b].stopover?!0:!1,k.push({location:c.position,stopover:d})),this.create.marker.call(this,b,c);this.o.directions_options.origin=
|
||||
e;this.o.directions_options.destination=r;this.o.directions_options.waypoints=k;this.directionsService||(this.directionsService=new f.maps.DirectionsService);this.directionsDisplay?this.directionsDisplay.setOptions({draggable:this.o.draggable}):this.directionsDisplay=new f.maps.DirectionsRenderer({draggable:this.o.draggable});this.directionsDisplay.setMap(this.oMap);this.o.directions_panel&&(this.o.directions_panel=g(this.o.directions_panel),this.directionsDisplay.setPanel(this.o.directions_panel.get(0)));
|
||||
this.o.draggable&&f.maps.event.addListener(this.directionsDisplay,"directions_changed",function(){h=a.compute_distance(a.directionsDisplay.directions);a.o.afterRoute(h)});this.directionsService.route(this.o.directions_options,function(b,c){c===f.maps.DirectionsStatus.OK&&(h=a.compute_distance(b),a.directionsDisplay.setDirections(b));a.o.afterRoute(h,c,b)})}};e.prototype.compute_distance=function(a){var b=0,c=a.routes[0],d=c.legs.length;for(a=0;a<d;a++)b+=c.legs[a].distance.value;return b};e.prototype.type_to_open=
|
||||
{bubble:function(a){this.infowindow=new f.maps.InfoWindow({content:a.html||""})}};e.prototype.open_infowindow=function(a,b,c){this.CloseInfoWindow();c=this.o.locations[a];var d=this.o.infowindow_type;c.html&&this.type_to_open[d]&&(this.o.beforeOpenInfowindow(a,c,b),this.type_to_open[d].call(this,c),this.infowindow.open(this.oMap,b),this.o.afterOpenInfowindow(a,c,b))};e.prototype.get_html_controls=function(){return this.controls[this.o.controls_type]&&this.controls[this.o.controls_type].getHtml?(this.current_control=
|
||||
this.controls[this.o.controls_type],this.current_control.getHtml.apply(this)):""};e.prototype.generate_controls=function(){if(this.o.controls_on_map){var a=g('<div class="on_gmap '+this.o.controls_type+' gmap_controls"></div>').css(this.o.controls_applycss?{margin:"5px"}:{}),b=g(this.get_html_controls()).css(this.o.controls_applycss?{background:"#fff",padding:"5px",border:"1px solid rgb(113,123,135)",boxShadow:"rgba(0, 0, 0, 0.4) 0px 2px 4px",maxHeight:this.map_div.find(".canvas_map").outerHeight()-
|
||||
80,minWidth:100,overflowY:"auto",overflowX:"hidden"}:{});a.append(b);this.oMap.controls[this.o.controls_position].push(a.get(0))}else this.controls_wrapper.empty(),this.controls_wrapper.append(this.get_html_controls())};e.prototype.init_map=function(){var a=this;this.Polyline&&this.Polyline.setMap(null);this.Polygon&&this.Polygon.setMap(null);this.Fusion&&this.Fusion.setMap(null);this.directionsDisplay&&this.directionsDisplay.setMap(null);for(var b=this.markers.length-1;0<=b;b-=1)try{this.markers[b]&&
|
||||
this.markers[b].setMap(null)}catch(c){a.debug("init_map::markers::setMap",c.stack)}this.markers.length=0;this.markers=[];for(b=this.circles.length-1;0<=b;b-=1)try{this.circles[b]&&this.circles[b].setMap(null)}catch(d){a.debug("init_map::circles::setMap",d.stack)}this.circles.length=0;this.circles=[];this.o.controls_on_map&&this.oMap.controls&&this.oMap.controls[this.o.controls_position].forEach(function(b,c){try{a.oMap.controls[this.o.controls_position].removeAt(c)}catch(d){a.debug("init_map::removeAt",
|
||||
d.stack)}});this.oBounds=new f.maps.LatLngBounds};e.prototype.perform_load=function(){1===this.ln?(this.o.map_options.set_center?this.oMap.setCenter(new f.maps.LatLng(this.o.map_options.set_center[0],this.o.map_options.set_center[1])):(this.oMap.fitBounds(this.oBounds),this.ViewOnMap(1)),this.o.map_options.zoom&&this.oMap.setZoom(this.o.map_options.zoom)):0===this.ln?(this.o.map_options.set_center?this.oMap.setCenter(new f.maps.LatLng(this.o.map_options.set_center[0],this.o.map_options.set_center[1])):
|
||||
this.oMap.fitBounds(this.oBounds),this.oMap.setZoom(this.o.map_options.zoom||1)):(this.oMap.fitBounds(this.oBounds),"number"===typeof(this.o.start-0)&&0<this.o.start&&this.o.start<=this.ln?this.ViewOnMap(this.o.start):this.o.map_options.set_center?this.oMap.setCenter(new f.maps.LatLng(this.o.map_options.set_center[0],this.o.map_options.set_center[1])):this.ViewOnMap(this.view_all_key),this.o.map_options.zoom&&this.oMap.setZoom(this.o.map_options.zoom))};e.prototype.debug=function(a,b){this.o.debug&&
|
||||
console.log(a,b);return this};e.prototype.AddControl=function(a,b){if(!a||!b)return self.debug("AddControl",'Missing "name" and "func" callback.'),!1;this.controls[a]=b;return this};e.prototype.CloseInfoWindow=function(){this.infowindow&&(this.current_index||0===this.current_index)&&(this.o.beforeCloseInfowindow(this.current_index,this.o.locations[this.current_index]),this.infowindow.close(),this.infowindow=null,this.o.afterCloseInfowindow(this.current_index,this.o.locations[this.current_index]));
|
||||
return this};e.prototype.ShowOnMenu=function(a){if(a===this.view_all_key&&this.o.view_all&&1<this.ln)return!0;a=parseInt(a,10);return"number"===typeof(a-0)&&0<=a&&a<this.ln&&!1!==this.o.locations[a].on_menu?!0:!1};e.prototype.ViewOnMap=function(a){if(a===this.view_all_key)this.o.beforeViewAll(),this.current_index=a,0<this.o.locations.length&&this.o.generate_controls&&this.current_control&&this.current_control.activateCurrent&&this.current_control.activateCurrent.apply(this,[a]),this.oMap.fitBounds(this.oBounds),
|
||||
this.CloseInfoWindow(),this.o.afterViewAll();else if(a=parseInt(a,10),"number"===typeof(a-0)&&0<a&&a<=this.ln)try{f.maps.event.trigger(this.markers[a-1],"click")}catch(b){this.debug("ViewOnMap::trigger",b.stack)}return this};e.prototype.SetLocations=function(a,b){this.o.locations=a;b&&this.Load();return this};e.prototype.AddLocations=function(a,b){var c=this;g.isArray(a)&&g.each(a,function(a,b){c.o.locations.push(b)});g.isPlainObject(a)&&this.o.locations.push(a);b&&this.Load();return this};e.prototype.AddLocation=
|
||||
function(a,b,c){g.isPlainObject(a)&&this.o.locations.splice(b,0,a);c&&this.Load();return this};e.prototype.RemoveLocations=function(a,b){var c=this,d=0;g.isArray(a)?g.each(a,function(a,b){b-d<c.ln&&c.o.locations.splice(b-d,1);d++}):a<this.ln&&this.o.locations.splice(a,1);b&&this.Load();return this};e.prototype.Loaded=function(){return this.loaded};e.prototype._init=function(){this.ln=this.o.locations.length;for(var a=0;a<this.ln;a++){var b=g.extend({},this.o.shared);this.o.locations[a]=g.extend(b,
|
||||
this.o.locations[a]);this.o.locations[a].html&&(this.o.locations[a].html=this.o.locations[a].html.replace("%index",a+1),this.o.locations[a].html=this.o.locations[a].html.replace("%title",this.o.locations[a].title||""))}this.map_div=g(this.o.map_div);this.controls_wrapper=g(this.o.controls_div);return this};e.prototype.Load=function(a){g.extend(!0,this.o,a);a&&a.locations&&(this.o.locations=a.locations);this._init();!1===this.o.visualRefresh?f.maps.visualRefresh=!1:f.maps.visualRefresh=!0;this.init_map();
|
||||
this.create_objMap();this.add_markers_to_objMap();1<this.ln&&this.o.generate_controls||this.o.force_generate_controls?(this.o.generate_controls=!0,this.generate_controls()):this.o.generate_controls=!1;var b=this;if(this.loaded)this.perform_load();else{f.maps.event.addListenerOnce(this.oMap,"idle",function(){b.perform_load()});f.maps.event.addListener(this.oMap,"resize",function(){b.canvas_map.css({width:b.map_div.width(),height:b.map_div.height()})});for(var c in this.o.listeners){var d=this.oMap,
|
||||
e=this.o.listeners[c];this.o.listeners.hasOwnProperty(c)&&f.maps.event.addListener(this.oMap,c,function(a){e(d,a)})}}this.loaded=!0;return this};return e}();"function"==typeof define&&define.amd?define(function(){return p}):s.Maplace=p})(jQuery,this,google);
|
||||
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 209 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 137 B |
@@ -0,0 +1,586 @@
|
||||
.vegas-wrapper,
|
||||
.vegas-overlay,
|
||||
.vegas-timer,
|
||||
.vegas-slide,
|
||||
.vegas-slide-inner {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.vegas-overlay {
|
||||
opacity: .5;
|
||||
background: transparent url(overlays/02.png) center center repeat;
|
||||
}
|
||||
|
||||
.vegas-timer {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
height: 2px;
|
||||
}
|
||||
.vegas-timer-progress {
|
||||
width: 0%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
-webkit-transition: width ease-out;
|
||||
transition: width ease-out;
|
||||
}
|
||||
.vegas-timer-running .vegas-timer-progress {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.vegas-slide,
|
||||
.vegas-slide-inner {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent center center no-repeat;
|
||||
-webkit-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
body .vegas-container {
|
||||
overflow: hidden !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.vegas-video {
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
body.vegas-container {
|
||||
overflow: auto;
|
||||
position: static;
|
||||
z-index: -2;
|
||||
}
|
||||
body.vegas-container > .vegas-timer,
|
||||
body.vegas-container > .vegas-overlay,
|
||||
body.vegas-container > .vegas-slide {
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Target Safari IOS7+ in order to add 76px */
|
||||
_::full-page-media, _:future,
|
||||
:root body.vegas-container > .vegas-slide,
|
||||
:root body.vegas-container > .vegas-overlay {
|
||||
bottom: -76px;
|
||||
}
|
||||
|
||||
/*************************
|
||||
Transitions
|
||||
*************************/
|
||||
|
||||
/* fade */
|
||||
.vegas-transition-fade,
|
||||
.vegas-transition-fade2 {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.vegas-transition-fade-in,
|
||||
.vegas-transition-fade2-in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.vegas-transition-fade2-out {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* blur */
|
||||
.vegas-transition-blur,
|
||||
.vegas-transition-blur2 {
|
||||
opacity: 0;
|
||||
-webkit-filter: blur(32px);
|
||||
filter: blur(32px);
|
||||
}
|
||||
|
||||
.vegas-transition-blur-in,
|
||||
.vegas-transition-blur2-in {
|
||||
opacity: 1;
|
||||
-webkit-filter: blur(0px);
|
||||
filter: blur(0px);
|
||||
}
|
||||
|
||||
.vegas-transition-blur2-out {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* flash */
|
||||
.vegas-transition-flash,
|
||||
.vegas-transition-flash2 {
|
||||
opacity: 0;
|
||||
-webkit-filter: brightness(25);
|
||||
filter: brightness(25);
|
||||
}
|
||||
|
||||
.vegas-transition-flash-in,
|
||||
.vegas-transition-flash2-in {
|
||||
opacity: 1;
|
||||
-webkit-filter: brightness(1);
|
||||
filter: brightness(1);
|
||||
}
|
||||
|
||||
.vegas-transition-flash2-out {
|
||||
opacity: 0;
|
||||
-webkit-filter: brightness(25);
|
||||
filter: brightness(25);
|
||||
}
|
||||
|
||||
/* negative */
|
||||
.vegas-transition-negative,
|
||||
.vegas-transition-negative2 {
|
||||
opacity: 0;
|
||||
-webkit-filter: invert(100%);
|
||||
filter: invert(100%);
|
||||
}
|
||||
|
||||
.vegas-transition-negative-in,
|
||||
.vegas-transition-negative2-in {
|
||||
opacity: 1;
|
||||
-webkit-filter: invert(0);
|
||||
filter: invert(0);
|
||||
}
|
||||
|
||||
.vegas-transition-negative2-out {
|
||||
opacity: 0;
|
||||
-webkit-filter: invert(100%);
|
||||
filter: invert(100%);
|
||||
}
|
||||
|
||||
/* burn */
|
||||
.vegas-transition-burn,
|
||||
.vegas-transition-burn2 {
|
||||
opacity: 0;
|
||||
-webkit-filter: contrast(1000%) saturate(1000%);
|
||||
filter: contrast(1000%) saturate(1000%);
|
||||
}
|
||||
|
||||
.vegas-transition-burn-in,
|
||||
.vegas-transition-burn2-in {
|
||||
opacity: 1;
|
||||
-webkit-filter: contrast(100%) saturate(100%);
|
||||
filter: contrast(100%) saturate(100%);
|
||||
}
|
||||
|
||||
.vegas-transition-burn2-out {
|
||||
opacity: 0;
|
||||
-webkit-filter: contrast(1000%) saturate(1000%);
|
||||
filter: contrast(1000%) saturate(1000%);
|
||||
}
|
||||
|
||||
/* slideLeft */
|
||||
.vegas-transition-slideLeft,
|
||||
.vegas-transition-slideLeft2 {
|
||||
-webkit-transform: translateX(100%);
|
||||
-ms-transform: translateX(100%);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideLeft-in,
|
||||
.vegas-transition-slideLeft2-in {
|
||||
-webkit-transform: translateX(0%);
|
||||
-ms-transform: translateX(0%);
|
||||
transform: translateX(0%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideLeft2-out {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-ms-transform: translateX(-100%);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
/* slideRight */
|
||||
.vegas-transition-slideRight,
|
||||
.vegas-transition-slideRight2 {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-ms-transform: translateX(-100%);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideRight-in,
|
||||
.vegas-transition-slideRight2-in {
|
||||
-webkit-transform: translateX(0%);
|
||||
-ms-transform: translateX(0%);
|
||||
transform: translateX(0%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideRight2-out {
|
||||
-webkit-transform: translateX(100%);
|
||||
-ms-transform: translateX(100%);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
/* slideUp */
|
||||
.vegas-transition-slideUp,
|
||||
.vegas-transition-slideUp2 {
|
||||
-webkit-transform: translateY(100%);
|
||||
-ms-transform: translateY(100%);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideUp-in,
|
||||
.vegas-transition-slideUp2-in {
|
||||
-webkit-transform: translateY(0%);
|
||||
-ms-transform: translateY(0%);
|
||||
transform: translateY(0%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideUp2-out {
|
||||
-webkit-transform: translateY(-100%);
|
||||
-ms-transform: translateY(-100%);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
|
||||
/* slideDown */
|
||||
.vegas-transition-slideDown,
|
||||
.vegas-transition-slideDown2 {
|
||||
-webkit-transform: translateY(-100%);
|
||||
-ms-transform: translateY(-100%);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideDown-in,
|
||||
.vegas-transition-slideDown2-in {
|
||||
-webkit-transform: translateY(0%);
|
||||
-ms-transform: translateY(0%);
|
||||
transform: translateY(0%);
|
||||
}
|
||||
|
||||
.vegas-transition-slideDown2-out {
|
||||
-webkit-transform: translateY(100%);
|
||||
-ms-transform: translateY(100%);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
/* zoomIn */
|
||||
.vegas-transition-zoomIn,
|
||||
.vegas-transition-zoomIn2 {
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.vegas-transition-zoomIn-in,
|
||||
.vegas-transition-zoomIn2-in {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.vegas-transition-zoomIn2-out {
|
||||
-webkit-transform: scale(2);
|
||||
-ms-transform: scale(2);
|
||||
transform: scale(2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* zoomOut */
|
||||
.vegas-transition-zoomOut,
|
||||
.vegas-transition-zoomOut2 {
|
||||
-webkit-transform: scale(2);
|
||||
-ms-transform: scale(2);
|
||||
transform: scale(2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.vegas-transition-zoomOut-in,
|
||||
.vegas-transition-zoomOut2-in {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.vegas-transition-zoomOut2-out {
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* swirlLeft */
|
||||
.vegas-transition-swirlLeft,
|
||||
.vegas-transition-swirlLeft2 {
|
||||
-webkit-transform: scale(2) rotate(35deg);
|
||||
-ms-transform: scale(2) rotate(35deg);
|
||||
transform: scale(2) rotate(35deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.vegas-transition-swirlLeft-in,
|
||||
.vegas-transition-swirlLeft2-in {
|
||||
-webkit-transform: scale(1) rotate(0deg);
|
||||
-ms-transform: scale(1) rotate(0deg);
|
||||
transform: scale(1) rotate(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.vegas-transition-swirlLeft2-out {
|
||||
-webkit-transform: scale(2) rotate(-35deg);
|
||||
-ms-transform: scale(2) rotate(-35deg);
|
||||
transform: scale(2) rotate(-35deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* swirlRight */
|
||||
.vegas-transition-swirlRight,
|
||||
.vegas-transition-swirlRight2 {
|
||||
-webkit-transform: scale(2) rotate(-35deg);
|
||||
-ms-transform: scale(2) rotate(-35deg);
|
||||
transform: scale(2) rotate(-35deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.vegas-transition-swirlRight-in,
|
||||
.vegas-transition-swirlRight2-in {
|
||||
-webkit-transform: scale(1) rotate(0deg);
|
||||
-ms-transform: scale(1) rotate(0deg);
|
||||
transform: scale(1) rotate(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.vegas-transition-swirlRight2-out {
|
||||
-webkit-transform: scale(2) rotate(35deg);
|
||||
-ms-transform: scale(2) rotate(35deg);
|
||||
transform: scale(2) rotate(35deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/*************************
|
||||
Animations
|
||||
*************************/
|
||||
|
||||
.vegas-animation-kenburns {
|
||||
-webkit-animation: kenburns ease-out;
|
||||
animation: kenburns ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburns {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
@keyframes kenburns {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5);
|
||||
transform: scale(1.5);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsUp {
|
||||
-webkit-animation: kenburnsUp ease-out;
|
||||
animation: kenburnsUp ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsUp {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(0, 10%);
|
||||
transform: scale(1.5) translate(0, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsUp {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(0, 10%);
|
||||
transform: scale(1.5) translate(0, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsDown {
|
||||
-webkit-animation: kenburnsDown ease-out;
|
||||
animation: kenburnsDown ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsDown {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(0, -10%);
|
||||
transform: scale(1.5) translate(0, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsDown {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(0, -10%);
|
||||
transform: scale(1.5) translate(0, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsLeft {
|
||||
-webkit-animation: kenburnsLeft ease-out;
|
||||
animation: kenburnsLeft ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, 0);
|
||||
transform: scale(1.5) translate(10%, 0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, 0);
|
||||
transform: scale(1.5) translate(10%, 0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsRight {
|
||||
-webkit-animation: kenburnsRight ease-out;
|
||||
animation: kenburnsRight ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, 0);
|
||||
transform: scale(1.5) translate(-10%, 0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, 0);
|
||||
transform: scale(1.5) translate(-10%, 0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsUpLeft {
|
||||
-webkit-animation: kenburnsUpLeft ease-out;
|
||||
animation: kenburnsUpLeft ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsUpLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, 10%);
|
||||
transform: scale(1.5) translate(10%, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsUpLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, 10%);
|
||||
transform: scale(1.5) translate(10%, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsUpRight {
|
||||
-webkit-animation: kenburnsUpRight ease-out;
|
||||
animation: kenburnsUpRight ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsUpRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, 10%);
|
||||
transform: scale(1.5) translate(-10%, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsUpRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, 10%);
|
||||
transform: scale(1.5) translate(-10%, 10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsDownLeft {
|
||||
-webkit-animation: kenburnsDownLeft ease-out;
|
||||
animation: kenburnsDownLeft ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsDownLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, -10%);
|
||||
transform: scale(1.5) translate(10%, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsDownLeft {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(10%, -10%);
|
||||
transform: scale(1.5) translate(10%, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.vegas-animation-kenburnsDownRight {
|
||||
-webkit-animation: kenburnsDownRight ease-out;
|
||||
animation: kenburnsDownRight ease-out;
|
||||
}
|
||||
@-webkit-keyframes kenburnsDownRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, -10%);
|
||||
transform: scale(1.5) translate(-10%, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes kenburnsDownRight {
|
||||
0% {
|
||||
-webkit-transform: scale(1.5) translate(-10%, -10%);
|
||||
transform: scale(1.5) translate(-10%, -10%);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1) translate(0, 0);
|
||||
transform: scale(1) translate(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,650 @@
|
||||
|
||||
/* global jQuery, Zepto */
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
slide: 0,
|
||||
delay: 5000,
|
||||
preload: false,
|
||||
preloadImage: false,
|
||||
preloadVideo: false,
|
||||
timer: true,
|
||||
overlay: false,
|
||||
autoplay: true,
|
||||
shuffle: false,
|
||||
cover: true,
|
||||
color: null,
|
||||
align: 'center',
|
||||
valign: 'center',
|
||||
transition: 'fade',
|
||||
transitionDuration: 1000,
|
||||
transitionRegister: [],
|
||||
animation: null,
|
||||
animationDuration: 'auto',
|
||||
animationRegister: [],
|
||||
init: function () {},
|
||||
play: function () {},
|
||||
pause: function () {},
|
||||
walk: function () {},
|
||||
slides: [
|
||||
// {
|
||||
// src: null,
|
||||
// color: null,
|
||||
// delay: null,
|
||||
// align: null,
|
||||
// valign: null,
|
||||
// transition: null,
|
||||
// transitionDuration: null,
|
||||
// animation: null,
|
||||
// animationDuration: null,
|
||||
// cover: true,
|
||||
// video: {
|
||||
// src: [],
|
||||
// mute: true,
|
||||
// loop: true
|
||||
// }
|
||||
// ...
|
||||
]
|
||||
};
|
||||
|
||||
var videoCache = {};
|
||||
|
||||
var Vegas = function (elmt, options) {
|
||||
this.elmt = elmt;
|
||||
this.settings = $.extend({}, defaults, $.vegas.defaults, options);
|
||||
this.slide = this.settings.slide;
|
||||
this.total = this.settings.slides.length;
|
||||
this.noshow = this.total < 2;
|
||||
this.paused = !this.settings.autoplay || this.noshow;
|
||||
this.$elmt = $(elmt);
|
||||
this.$timer = null;
|
||||
this.$overlay = null;
|
||||
this.$slide = null;
|
||||
this.timeout = null;
|
||||
|
||||
this.transitions = [
|
||||
'fade', 'fade2',
|
||||
'blur', 'blur2',
|
||||
'flash', 'flash2',
|
||||
'negative', 'negative2',
|
||||
'burn', 'burn2',
|
||||
'slideLeft', 'slideLeft2',
|
||||
'slideRight', 'slideRight2',
|
||||
'slideUp', 'slideUp2',
|
||||
'slideDown', 'slideDown2',
|
||||
'zoomIn', 'zoomIn2',
|
||||
'zoomOut', 'zoomOut2',
|
||||
'swirlLeft', 'swirlLeft2',
|
||||
'swirlRight', 'swirlRight2'
|
||||
];
|
||||
|
||||
this.animations = [
|
||||
'kenburns',
|
||||
'kenburnsLeft', 'kenburnsRight',
|
||||
'kenburnsUp', 'kenburnsUpLeft', 'kenburnsUpRight',
|
||||
'kenburnsDown', 'kenburnsDownLeft', 'kenburnsDownRight'
|
||||
];
|
||||
|
||||
if (this.settings.transitionRegister instanceof Array === false) {
|
||||
this.settings.transitionRegister = [ this.settings.transitionRegister ];
|
||||
}
|
||||
|
||||
if (this.settings.animationRegister instanceof Array === false) {
|
||||
this.settings.animationRegister = [ this.settings.animationRegister ];
|
||||
}
|
||||
|
||||
this.transitions = this.transitions.concat(this.settings.transitionRegister);
|
||||
this.animations = this.animations.concat(this.settings.animationRegister);
|
||||
|
||||
this.support = {
|
||||
objectFit: 'objectFit' in document.body.style,
|
||||
transition: 'transition' in document.body.style || 'WebkitTransition' in document.body.style,
|
||||
video: $.vegas.isVideoCompatible()
|
||||
};
|
||||
|
||||
if (this.settings.shuffle === true) {
|
||||
this.shuffle();
|
||||
}
|
||||
|
||||
this._init();
|
||||
};
|
||||
|
||||
Vegas.prototype = {
|
||||
_init: function () {
|
||||
var $wrapper,
|
||||
$overlay,
|
||||
$timer,
|
||||
isBody = this.elmt.tagName === 'BODY',
|
||||
timer = this.settings.timer,
|
||||
overlay = this.settings.overlay,
|
||||
self = this;
|
||||
|
||||
// Preloading
|
||||
this._preload();
|
||||
|
||||
// Wrapper with content
|
||||
if (!isBody) {
|
||||
this.$elmt.css('height', this.$elmt.css('height'));
|
||||
|
||||
$wrapper = $('<div class="vegas-wrapper">')
|
||||
.css('overflow', this.$elmt.css('overflow'))
|
||||
.css('padding', this.$elmt.css('padding'));
|
||||
|
||||
// Some browsers don't compute padding shorthand
|
||||
if (!this.$elmt.css('padding')) {
|
||||
$wrapper
|
||||
.css('padding-top', this.$elmt.css('padding-top'))
|
||||
.css('padding-bottom', this.$elmt.css('padding-bottom'))
|
||||
.css('padding-left', this.$elmt.css('padding-left'))
|
||||
.css('padding-right', this.$elmt.css('padding-right'));
|
||||
}
|
||||
|
||||
this.$elmt.clone(true).children().appendTo($wrapper);
|
||||
this.elmt.innerHTML = '';
|
||||
}
|
||||
|
||||
// Timer
|
||||
if (timer && this.support.transition) {
|
||||
$timer = $('<div class="vegas-timer"><div class="vegas-timer-progress">');
|
||||
this.$timer = $timer;
|
||||
this.$elmt.prepend($timer);
|
||||
}
|
||||
|
||||
// Overlay
|
||||
if (overlay) {
|
||||
$overlay = $('<div class="vegas-overlay">');
|
||||
|
||||
if (typeof overlay === 'string') {
|
||||
$overlay.css('background-image', 'url(' + overlay + ')');
|
||||
}
|
||||
|
||||
this.$overlay = $overlay;
|
||||
this.$elmt.prepend($overlay);
|
||||
}
|
||||
|
||||
// Container
|
||||
this.$elmt.addClass('vegas-container');
|
||||
|
||||
if (!isBody) {
|
||||
this.$elmt.append($wrapper);
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
self.trigger('init');
|
||||
self._goto(self.slide);
|
||||
|
||||
if (self.settings.autoplay) {
|
||||
self.trigger('play');
|
||||
}
|
||||
}, 1);
|
||||
},
|
||||
|
||||
_preload: function () {
|
||||
var video, img, i;
|
||||
|
||||
for (i = 0; i < this.settings.slides.length; i++) {
|
||||
if (this.settings.preload || this.settings.preloadImages) {
|
||||
if (this.settings.slides[i].src) {
|
||||
img = new Image();
|
||||
img.src = this.settings.slides[i].src;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.settings.preload || this.settings.preloadVideos) {
|
||||
if (this.support.video && this.settings.slides[i].video) {
|
||||
video = this._video(this.settings.slides[i].video);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_random: function (array) {
|
||||
return array[Math.floor(Math.random() * (array.length - 1))];
|
||||
},
|
||||
|
||||
_slideShow: function () {
|
||||
var self = this;
|
||||
|
||||
if (this.total > 1 && !this.paused && !this.noshow) {
|
||||
this.timeout = setTimeout(function () {
|
||||
self.next();
|
||||
}, this._options('delay'));
|
||||
}
|
||||
},
|
||||
|
||||
_timer: function (state) {
|
||||
var self = this;
|
||||
|
||||
clearTimeout(this.timeout);
|
||||
|
||||
if (!this.$timer) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$timer
|
||||
.removeClass('vegas-timer-running')
|
||||
.find('div')
|
||||
.css('transition-duration', '0ms');
|
||||
|
||||
if (this.paused || this.noshow) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state) {
|
||||
setTimeout(function () {
|
||||
self.$timer
|
||||
.addClass('vegas-timer-running')
|
||||
.find('div')
|
||||
.css('transition-duration', self._options('delay') - 100 + 'ms');
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
|
||||
_video: function (srcs) {
|
||||
var video,
|
||||
source,
|
||||
cacheKey = srcs.toString();
|
||||
|
||||
if (videoCache[cacheKey]) {
|
||||
return videoCache[cacheKey];
|
||||
}
|
||||
|
||||
if (srcs instanceof Array === false) {
|
||||
srcs = [ srcs ];
|
||||
}
|
||||
|
||||
video = document.createElement('video');
|
||||
video.preload = true;
|
||||
|
||||
srcs.forEach(function (src) {
|
||||
source = document.createElement('source');
|
||||
source.src = src;
|
||||
video.appendChild(source);
|
||||
});
|
||||
|
||||
videoCache[cacheKey] = video;
|
||||
|
||||
return video;
|
||||
},
|
||||
|
||||
_fadeOutSound: function (video, duration) {
|
||||
var self = this,
|
||||
delay = duration / 10,
|
||||
volume = video.volume - 0.09;
|
||||
|
||||
if (volume > 0) {
|
||||
video.volume = volume;
|
||||
|
||||
setTimeout(function () {
|
||||
self._fadeOutSound(video, duration);
|
||||
}, delay);
|
||||
} else {
|
||||
video.pause();
|
||||
}
|
||||
},
|
||||
|
||||
_fadeInSound: function (video, duration) {
|
||||
var self = this,
|
||||
delay = duration / 10,
|
||||
volume = video.volume + 0.09;
|
||||
|
||||
if (volume < 1) {
|
||||
video.volume = volume;
|
||||
|
||||
setTimeout(function () {
|
||||
self._fadeInSound(video, duration);
|
||||
}, delay);
|
||||
}
|
||||
},
|
||||
|
||||
_options: function (key, i) {
|
||||
if (i === undefined) {
|
||||
i = this.slide;
|
||||
}
|
||||
|
||||
if (this.settings.slides[i][key] !== undefined) {
|
||||
return this.settings.slides[i][key];
|
||||
}
|
||||
|
||||
return this.settings[key];
|
||||
},
|
||||
|
||||
_goto: function (nb) {
|
||||
if (typeof this.settings.slides[nb] === 'undefined') {
|
||||
nb = 0;
|
||||
}
|
||||
|
||||
this.slide = nb;
|
||||
|
||||
var $slide,
|
||||
$inner,
|
||||
$video,
|
||||
$slides = this.$elmt.children('.vegas-slide'),
|
||||
src = this.settings.slides[nb].src,
|
||||
videoSettings = this.settings.slides[nb].video,
|
||||
delay = this._options('delay'),
|
||||
align = this._options('align'),
|
||||
valign = this._options('valign'),
|
||||
color = this._options('color') || this.$elmt.css('background-color'),
|
||||
cover = this._options('cover') ? 'cover' : 'contain',
|
||||
self = this,
|
||||
total = $slides.length,
|
||||
video,
|
||||
img;
|
||||
|
||||
var transition = this._options('transition'),
|
||||
transitionDuration = this._options('transitionDuration'),
|
||||
animation = this._options('animation' ),
|
||||
animationDuration = this._options('animationDuration');
|
||||
|
||||
if (transition === 'random' || transition instanceof Array) {
|
||||
if (transition instanceof Array) {
|
||||
transition = this._random(transition);
|
||||
} else {
|
||||
transition = this._random(this.transitions);
|
||||
}
|
||||
}
|
||||
|
||||
if (animation === 'random' || animation instanceof Array) {
|
||||
if (animation instanceof Array) {
|
||||
animation = this._random(animation);
|
||||
} else {
|
||||
animation = this._random(this.animations);
|
||||
}
|
||||
}
|
||||
|
||||
if (transitionDuration === 'auto' || transitionDuration > delay) {
|
||||
transitionDuration = delay;
|
||||
}
|
||||
|
||||
if (animationDuration === 'auto') {
|
||||
animationDuration = delay;
|
||||
}
|
||||
|
||||
$slide = $('<div class="vegas-slide"></div>');
|
||||
|
||||
if (this.support.transition && transition) {
|
||||
$slide.addClass('vegas-transition-' + transition);
|
||||
}
|
||||
|
||||
// Video
|
||||
|
||||
if (this.support.video && videoSettings) {
|
||||
if (videoSettings instanceof Array) {
|
||||
video = this._video(videoSettings);
|
||||
} else {
|
||||
video = this._video(videoSettings.src);
|
||||
}
|
||||
|
||||
video.loop = videoSettings.loop !== undefined ? videoSettings.loop : true;
|
||||
video.muted = videoSettings.mute !== undefined ? videoSettings.mute : true;
|
||||
|
||||
if (video.muted === false) {
|
||||
video.volume = 0;
|
||||
this._fadeInSound(video, transitionDuration);
|
||||
} else {
|
||||
video.pause();
|
||||
}
|
||||
|
||||
$video = $(video)
|
||||
.addClass('vegas-video')
|
||||
.css('background-color', color);
|
||||
|
||||
if (this.support.objectFit) {
|
||||
$video
|
||||
.css('object-position', align + ' ' + valign)
|
||||
.css('object-fit', cover)
|
||||
.css('width', '100%')
|
||||
.css('height', '100%');
|
||||
} else if (cover === 'contain') {
|
||||
$video
|
||||
.css('width', '100%')
|
||||
.css('height', '100%');
|
||||
}
|
||||
|
||||
$slide.append($video);
|
||||
|
||||
// Image
|
||||
|
||||
} else {
|
||||
img = new Image();
|
||||
|
||||
$inner = $('<div class="vegas-slide-inner"></div>')
|
||||
.css('background-image', 'url(' + src + ')')
|
||||
.css('background-color', color)
|
||||
.css('background-position', align + ' ' + valign)
|
||||
.css('background-size', cover);
|
||||
|
||||
if (this.support.transition && animation) {
|
||||
$inner
|
||||
.addClass('vegas-animation-' + animation)
|
||||
.css('animation-duration', animationDuration + 'ms');
|
||||
}
|
||||
|
||||
$slide.append($inner);
|
||||
}
|
||||
|
||||
if (!this.support.transition) {
|
||||
$slide.css('display', 'none');
|
||||
}
|
||||
|
||||
if (total) {
|
||||
$slides.eq(total - 1).after($slide);
|
||||
} else {
|
||||
this.$elmt.prepend($slide);
|
||||
}
|
||||
|
||||
self._timer(false);
|
||||
|
||||
function go () {
|
||||
self._timer(true);
|
||||
|
||||
setTimeout(function () {
|
||||
if (transition) {
|
||||
if (self.support.transition) {
|
||||
$slides
|
||||
.css('transition', 'all ' + transitionDuration + 'ms')
|
||||
.addClass('vegas-transition-' + transition + '-out');
|
||||
|
||||
$slides.each(function () {
|
||||
var video = $slides.find('video').get(0);
|
||||
|
||||
if (video) {
|
||||
video.volume = 1;
|
||||
self._fadeOutSound(video, transitionDuration);
|
||||
}
|
||||
});
|
||||
|
||||
$slide
|
||||
.css('transition', 'all ' + transitionDuration + 'ms')
|
||||
.addClass('vegas-transition-' + transition + '-in');
|
||||
} else {
|
||||
$slide.fadeIn(transitionDuration);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < $slides.length - 4; i++) {
|
||||
$slides.eq(i).remove();
|
||||
}
|
||||
|
||||
self.trigger('walk');
|
||||
self._slideShow();
|
||||
}, 100);
|
||||
}
|
||||
if (video) {
|
||||
if (video.readyState === 4) {
|
||||
video.currentTime = 0;
|
||||
}
|
||||
|
||||
video.play();
|
||||
go();
|
||||
} else {
|
||||
img.src = src;
|
||||
img.onload = go;
|
||||
}
|
||||
},
|
||||
|
||||
shuffle: function () {
|
||||
var temp,
|
||||
rand;
|
||||
|
||||
for (var i = this.total - 1; i > 0; i--) {
|
||||
rand = Math.floor(Math.random() * (i + 1));
|
||||
temp = this.settings.slides[i];
|
||||
|
||||
this.settings.slides[i] = this.settings.slides[rand];
|
||||
this.settings.slides[rand] = temp;
|
||||
}
|
||||
},
|
||||
|
||||
play: function () {
|
||||
if (this.paused) {
|
||||
this.paused = false;
|
||||
this.next();
|
||||
this.trigger('play');
|
||||
}
|
||||
},
|
||||
|
||||
pause: function () {
|
||||
this._timer(false);
|
||||
this.paused = true;
|
||||
this.trigger('pause');
|
||||
},
|
||||
|
||||
toggle: function () {
|
||||
if (this.paused) {
|
||||
this.play();
|
||||
} else {
|
||||
this.pause();
|
||||
}
|
||||
},
|
||||
|
||||
playing: function () {
|
||||
return !this.paused && !this.noshow;
|
||||
},
|
||||
|
||||
current: function (advanced) {
|
||||
if (advanced) {
|
||||
return {
|
||||
slide: this.slide,
|
||||
data: this.settings.slides[this.slide]
|
||||
};
|
||||
}
|
||||
return this.slide;
|
||||
},
|
||||
|
||||
jump: function (nb) {
|
||||
if (nb < 0 || nb > this.total - 1 || nb === this.slide) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.slide = nb;
|
||||
this._goto(this.slide);
|
||||
},
|
||||
|
||||
next: function () {
|
||||
this.slide++;
|
||||
|
||||
if (this.slide >= this.total) {
|
||||
this.slide = 0;
|
||||
}
|
||||
|
||||
this._goto(this.slide);
|
||||
},
|
||||
|
||||
previous: function () {
|
||||
this.slide--;
|
||||
|
||||
if (this.slide < 0) {
|
||||
this.slide = this.total - 1;
|
||||
}
|
||||
|
||||
this._goto(this.slide);
|
||||
},
|
||||
|
||||
trigger: function (fn) {
|
||||
var params = [];
|
||||
|
||||
if (fn === 'init') {
|
||||
params = [ this.settings ];
|
||||
} else {
|
||||
params = [
|
||||
this.slide,
|
||||
this.settings.slides[this.slide]
|
||||
];
|
||||
}
|
||||
|
||||
this.$elmt.trigger('vegas' + fn, params);
|
||||
|
||||
if (typeof this.settings[fn] === 'function') {
|
||||
this.settings[fn].apply(this.$elmt, params);
|
||||
}
|
||||
},
|
||||
|
||||
options: function (key, value) {
|
||||
var oldSlides = this.settings.slides.slice();
|
||||
|
||||
if (typeof key === 'object') {
|
||||
this.settings = $.extend({}, defaults, $.vegas.defaults, key);
|
||||
} else if (typeof key === 'string') {
|
||||
if (value === undefined) {
|
||||
return this.settings[key];
|
||||
}
|
||||
this.settings[key] = value;
|
||||
} else {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
// In case slides have changed
|
||||
if (this.settings.slides !== oldSlides) {
|
||||
this.total = this.settings.slides.length;
|
||||
this.noshow = this.total < 2;
|
||||
this._preload();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.vegas = function(options) {
|
||||
var args = arguments,
|
||||
error = false,
|
||||
returns;
|
||||
|
||||
if (options === undefined || typeof options === 'object') {
|
||||
return this.each(function () {
|
||||
if (!this._vegas) {
|
||||
this._vegas = new Vegas(this, options);
|
||||
}
|
||||
});
|
||||
} else if (typeof options === 'string') {
|
||||
this.each(function () {
|
||||
var instance = this._vegas;
|
||||
|
||||
if (!instance) {
|
||||
throw new Error('No Vegas applied to this element.');
|
||||
}
|
||||
|
||||
if (typeof instance[options] === 'function' && options[0] !== '_') {
|
||||
returns = instance[options].apply(instance, [].slice.call(args, 1));
|
||||
} else {
|
||||
error = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw new Error('No method "' + options + '" in Vegas.');
|
||||
}
|
||||
|
||||
return returns !== undefined ? returns : this;
|
||||
}
|
||||
};
|
||||
|
||||
$.vegas = {};
|
||||
$.vegas.defaults = defaults;
|
||||
|
||||
$.vegas.isVideoCompatible = function () {
|
||||
return !/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
|
||||
};
|
||||
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -0,0 +1,59 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page Not Found</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
|
||||
* {
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
color: #888;
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
left: 50%;
|
||||
margin: -43px 0 0 -150px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 270px) {
|
||||
|
||||
body {
|
||||
margin: 10px auto;
|
||||
position: static;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
</body>
|
||||
</html>
|
||||
<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
||||
@@ -0,0 +1,202 @@
|
||||
/**
|
||||
* fullPage 2.6.0
|
||||
* https://github.com/alvarotrigo/fullPage.js
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo
|
||||
*/
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow:hidden;
|
||||
|
||||
/*Avoid flicker on slides transitions for mobile phones #336 */
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
}
|
||||
#superContainer {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
/* Touch detection for Windows 8 */
|
||||
-ms-touch-action: none;
|
||||
|
||||
/* IE 11 on Windows Phone 8.1*/
|
||||
touch-action: none;
|
||||
}
|
||||
.fp-section {
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */
|
||||
-moz-box-sizing: border-box; /* <=28 */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.fp-slide {
|
||||
float: left;
|
||||
}
|
||||
.fp-slide, .fp-slidesContainer {
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.fp-slides {
|
||||
z-index:1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
-webkit-transition: all 0.3s ease-out; /* Safari<=6 Android<=4.3 */
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
.fp-section.fp-table, .fp-slide.fp-table {
|
||||
display: table;
|
||||
table-layout:fixed;
|
||||
width: 100%;
|
||||
}
|
||||
.fp-tableCell {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.fp-slidesContainer {
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
.fp-controlArrow {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
top: 50%;
|
||||
cursor: pointer;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
margin-top: -38px;
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
-ms-transform: translate3d(0,0,0);
|
||||
transform: translate3d(0,0,0);
|
||||
}
|
||||
.fp-controlArrow.fp-prev {
|
||||
left: 15px;
|
||||
width: 0;
|
||||
border-width: 38.5px 34px 38.5px 0;
|
||||
border-color: transparent #fff transparent transparent;
|
||||
}
|
||||
.fp-controlArrow.fp-next {
|
||||
right: 15px;
|
||||
border-width: 38.5px 0 38.5px 34px;
|
||||
border-color: transparent transparent transparent #fff;
|
||||
}
|
||||
.fp-scrollable {
|
||||
overflow: scroll;
|
||||
}
|
||||
.fp-notransition {
|
||||
-webkit-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
#fp-nav {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
margin-top: -32px;
|
||||
top: 50%;
|
||||
opacity: 1;
|
||||
-webkit-transform: translate3d(0,0,0);
|
||||
}
|
||||
#fp-nav.right {
|
||||
right: 17px;
|
||||
}
|
||||
#fp-nav.left {
|
||||
left: 17px;
|
||||
}
|
||||
.fp-slidesNav{
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
left: 50%;
|
||||
opacity: 1;
|
||||
}
|
||||
.fp-slidesNav.bottom {
|
||||
bottom: 17px;
|
||||
}
|
||||
.fp-slidesNav.top {
|
||||
top: 17px;
|
||||
}
|
||||
#fp-nav ul,
|
||||
.fp-slidesNav ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#fp-nav ul li,
|
||||
.fp-slidesNav ul li {
|
||||
display: block;
|
||||
width: 14px;
|
||||
height: 13px;
|
||||
margin: 7px;
|
||||
position:relative;
|
||||
}
|
||||
.fp-slidesNav ul li {
|
||||
display: inline-block;
|
||||
}
|
||||
#fp-nav ul li a,
|
||||
.fp-slidesNav ul li a {
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
#fp-nav ul li a.active span,
|
||||
.fp-slidesNav ul li a.active span,
|
||||
#fp-nav ul li:hover a.active span,
|
||||
.fp-slidesNav ul li:hover a.active span{
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
margin: -6px 0 0 -6px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
#fp-nav ul li a span,
|
||||
.fp-slidesNav ul li a span {
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
height: 4px;
|
||||
width: 4px;
|
||||
border: 0;
|
||||
background: #333;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -2px 0 0 -2px;
|
||||
-webkit-transition: all 0.1s ease-in-out;
|
||||
-moz-transition: all 0.1s ease-in-out;
|
||||
-o-transition: all 0.1s ease-in-out;
|
||||
transition: all 0.1s ease-in-out;
|
||||
}
|
||||
#fp-nav ul li:hover a span,
|
||||
.fp-slidesNav ul li:hover a span{
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin: -5px 0px 0px -5px;
|
||||
}
|
||||
#fp-nav ul li .fp-tooltip {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
white-space: nowrap;
|
||||
max-width: 220px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
}
|
||||
#fp-nav ul li:hover .fp-tooltip,
|
||||
#fp-nav.fp-show-active a.active + .fp-tooltip {
|
||||
-webkit-transition: opacity 0.2s ease-in;
|
||||
transition: opacity 0.2s ease-in;
|
||||
width: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
#fp-nav ul li .fp-tooltip.right {
|
||||
right: 20px;
|
||||
}
|
||||
#fp-nav ul li .fp-tooltip.left {
|
||||
left: 20px;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* fullPage 2.6.1
|
||||
* https://github.com/alvarotrigo/fullPage.js
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo
|
||||
*/
|
||||
(function(d,h,k,m,G){var l=d(h),n=d(k);d.fn.fullpage=function(c){function Da(a){a.find(".fp-slides").after('<div class="fp-controlArrow fp-prev"></div><div class="fp-controlArrow fp-next"></div>');"#fff"!=c.controlArrowColor&&(a.find(".fp-controlArrow.fp-next").css("border-color","transparent transparent transparent "+c.controlArrowColor),a.find(".fp-controlArrow.fp-prev").css("border-color","transparent "+c.controlArrowColor+" transparent transparent"));c.loopHorizontal||a.find(".fp-controlArrow.fp-prev").hide()}
|
||||
function Ea(){p.append('<div id="fp-nav"><ul></ul></div>');y=d("#fp-nav");y.addClass(function(){return c.showActiveTooltip?"fp-show-active "+c.navigationPosition:c.navigationPosition});for(var a=0;a<d(".fp-section").length;a++){var b="";c.anchors.length&&(b=c.anchors[a]);var b='<li><a href="#'+b+'"><span></span></a>',g=c.navigationTooltips[a];"undefined"!==typeof g&&""!==g&&(b+='<div class="fp-tooltip '+c.navigationPosition+'">'+g+"</div>");b+="</li>";y.find("ul").append(b)}}function ba(){d(".fp-section").each(function(){var a=
|
||||
d(this).find(".fp-slide");a.length?a.each(function(){H(d(this))}):H(d(this))});d.isFunction(c.afterRender)&&c.afterRender.call(this)}function ca(){var a;if(!c.autoScrolling||c.scrollBar){for(var b=l.scrollTop(),g=0,I=m.abs(b-k.querySelectorAll(".fp-section")[0].offsetTop),e=k.querySelectorAll(".fp-section"),f=0;f<e.length;++f){var h=m.abs(b-e[f].offsetTop);h<I&&(g=f,I=h)}a=d(e).eq(g)}if(!c.autoScrolling||c.scrollBar){if(!a.hasClass("active")){T=!0;b=d(".fp-section.active");g=b.index(".fp-section")+
|
||||
1;I=U(a);e=a.data("anchor");f=a.index(".fp-section")+1;h=a.find(".fp-slide.active");if(h.length)var n=h.data("anchor"),p=h.index();q&&(a.addClass("active").siblings().removeClass("active"),d.isFunction(c.onLeave)&&c.onLeave.call(b,g,f,I),d.isFunction(c.afterLoad)&&c.afterLoad.call(a,e,f),J(e,f-1),c.anchors.length&&(z=e,V(p,n,e,f)));clearTimeout(da);da=setTimeout(function(){T=!1},100)}c.fitToSection&&(clearTimeout(ea),ea=setTimeout(function(){q&&(d(".fp-section.active").is(a)&&(v=!0),r(a),v=!1)},1E3))}}
|
||||
function fa(a){return a.find(".fp-slides").length?a.find(".fp-slide.active").find(".fp-scrollable"):a.find(".fp-scrollable")}function K(a,b){if(u[a]){var c,d;"down"==a?(c="bottom",d=e.moveSectionDown):(c="top",d=e.moveSectionUp);if(0<b.length)if(c="top"===c?!b.scrollTop():"bottom"===c?b.scrollTop()+1+b.innerHeight()>=b[0].scrollHeight:void 0,c)d();else return!0;else d()}}function Fa(a){var b=a.originalEvent;if(!ga(a.target)&&W(b)){c.autoScrolling&&a.preventDefault();a=d(".fp-section.active");var g=
|
||||
fa(a);q&&!A&&(b=ha(b),D=b.y,L=b.x,a.find(".fp-slides").length&&m.abs(M-L)>m.abs(E-D)?m.abs(M-L)>l.width()/100*c.touchSensitivity&&(M>L?u.right&&e.moveSlideRight():u.left&&e.moveSlideLeft()):c.autoScrolling&&m.abs(E-D)>l.height()/100*c.touchSensitivity&&(E>D?K("down",g):D>E&&K("up",g)))}}function ga(a,b){b=b||0;var g=d(a).parent();return b<c.normalScrollElementTouchThreshold&&g.is(c.normalScrollElements)?!0:b==c.normalScrollElementTouchThreshold?!1:ga(g,++b)}function W(a){return"undefined"===typeof a.pointerType||
|
||||
"mouse"!=a.pointerType}function Ga(a){a=a.originalEvent;c.fitToSection&&w.stop();W(a)&&(a=ha(a),E=a.y,M=a.x)}function ia(a,b){for(var c=0,d=a.slice(m.max(a.length-b,1)),e=0;e<d.length;e++)c+=d[e];return m.ceil(c/b)}function B(a){var b=(new Date).getTime();if(c.autoScrolling){a=h.event||a;var g=a.wheelDelta||-a.deltaY||-a.detail,e=m.max(-1,m.min(1,g));149<C.length&&C.shift();C.push(m.abs(g));c.scrollBar&&(a.preventDefault?a.preventDefault():a.returnValue=!1);a=d(".fp-section.active");a=fa(a);g=b-ja;
|
||||
ja=b;200<g&&(C=[]);q&&(b=ia(C,10),g=ia(C,70),b>=g&&(0>e?K("down",a):K("up",a)));return!1}c.fitToSection&&w.stop()}function ka(a){var b=d(".fp-section.active").find(".fp-slides");if(b.length&&!A){var g=b.find(".fp-slide.active"),e=null,e="prev"===a?g.prev(".fp-slide"):g.next(".fp-slide");if(!e.length){if(!c.loopHorizontal)return;e="prev"===a?g.siblings(":last"):g.siblings(":first")}A=!0;F(b,e)}}function la(){d(".fp-slide.active").each(function(){X(d(this))})}function r(a,b,g){var e=a.position();if("undefined"!==
|
||||
typeof e&&(b={element:a,callback:b,isMovementUp:g,dest:e,dtop:e.top,yMovement:U(a),anchorLink:a.data("anchor"),sectionIndex:a.index(".fp-section"),activeSlide:a.find(".fp-slide.active"),activeSection:d(".fp-section.active"),leavingSection:d(".fp-section.active").index(".fp-section")+1,localIsResizing:v},!(b.activeSection.is(a)&&!v||c.scrollBar&&l.scrollTop()===b.dtop))){if(b.activeSlide.length)var f=b.activeSlide.data("anchor"),h=b.activeSlide.index();c.autoScrolling&&c.continuousVertical&&"undefined"!==
|
||||
typeof b.isMovementUp&&(!b.isMovementUp&&"up"==b.yMovement||b.isMovementUp&&"down"==b.yMovement)&&(b.isMovementUp?d(".fp-section.active").before(b.activeSection.nextAll(".fp-section")):d(".fp-section.active").after(b.activeSection.prevAll(".fp-section").get().reverse()),x(d(".fp-section.active").position().top),la(),b.wrapAroundElements=b.activeSection,b.dest=b.element.position(),b.dtop=b.dest.top,b.yMovement=U(b.element));a.addClass("active").siblings().removeClass("active");q=!1;V(h,f,b.anchorLink,
|
||||
b.sectionIndex);d.isFunction(c.onLeave)&&!b.localIsResizing&&c.onLeave.call(b.activeSection,b.leavingSection,b.sectionIndex+1,b.yMovement);Ha(b);z=b.anchorLink;J(b.anchorLink,b.sectionIndex)}}function Ha(a){if(c.css3&&c.autoScrolling&&!c.scrollBar)ma("translate3d(0px, -"+a.dtop+"px, 0px)",!0),setTimeout(function(){na(a)},c.scrollingSpeed);else{var b=Ia(a);d(b.element).animate(b.options,c.scrollingSpeed,c.easing).promise().done(function(){na(a)})}}function Ia(a){var b={};c.autoScrolling&&!c.scrollBar?
|
||||
(b.options={top:-a.dtop},b.element=".fullpage-wrapper"):(b.options={scrollTop:a.dtop},b.element="html, body");return b}function Ja(a){a.wrapAroundElements&&a.wrapAroundElements.length&&(a.isMovementUp?d(".fp-section:first").before(a.wrapAroundElements):d(".fp-section:last").after(a.wrapAroundElements),x(d(".fp-section.active").position().top),la())}function na(a){Ja(a);d.isFunction(c.afterLoad)&&!a.localIsResizing&&c.afterLoad.call(a.element,a.anchorLink,a.sectionIndex+1);q=!0;setTimeout(function(){d.isFunction(a.callback)&&
|
||||
a.callback.call(this)},600)}function oa(){if(!T){var a=h.location.hash.replace("#","").split("/"),b=a[0],a=a[1];if(b.length){var c="undefined"===typeof z,d="undefined"===typeof z&&"undefined"===typeof a&&!A;(b&&b!==z&&!c||d||!A&&Y!=a)&&Z(b,a)}}}function Ka(a){q&&(a.pageY<N?e.moveSectionUp():a.pageY>N&&e.moveSectionDown());N=a.pageY}function F(a,b){var g=b.position(),e=a.find(".fp-slidesContainer").parent(),f=b.index(),h=a.closest(".fp-section"),k=h.index(".fp-section"),l=h.data("anchor"),m=h.find(".fp-slidesNav"),
|
||||
n=pa(b),p=v;if(c.onSlideLeave){var t=h.find(".fp-slide.active"),q=t.index(),r;r=q==f?"none":q>f?"left":"right";p||"none"===r||d.isFunction(c.onSlideLeave)&&c.onSlideLeave.call(t,l,k+1,q,r)}b.addClass("active").siblings().removeClass("active");!c.loopHorizontal&&c.controlArrows&&(h.find(".fp-controlArrow.fp-prev").toggle(0!==f),h.find(".fp-controlArrow.fp-next").toggle(!b.is(":last-child")));h.hasClass("active")&&V(f,n,l,k);var u=function(){p||d.isFunction(c.afterSlideLoad)&&c.afterSlideLoad.call(b,
|
||||
l,k+1,n,f);A=!1};c.css3?(g="translate3d(-"+g.left+"px, 0px, 0px)",qa(a.find(".fp-slidesContainer"),0<c.scrollingSpeed).css(ra(g)),setTimeout(function(){u()},c.scrollingSpeed,c.easing)):e.animate({scrollLeft:g.left},c.scrollingSpeed,c.easing,function(){u()});m.find(".active").removeClass("active");m.find("li").eq(f).find("a").addClass("active")}function sa(){ta();if(O){var a=d(k.activeElement);a.is("textarea")||a.is("input")||a.is("select")||(a=l.height(),m.abs(a-aa)>20*m.max(aa,a)/100&&(e.reBuild(!0),
|
||||
aa=a))}else clearTimeout(ua),ua=setTimeout(function(){e.reBuild(!0)},500)}function ta(){if(c.responsive){var a=f.hasClass("fp-responsive");l.width()<c.responsive?a||(e.setAutoScrolling(!1,"internal"),e.setFitToSection(!1,"internal"),d("#fp-nav").hide(),f.addClass("fp-responsive")):a&&(e.setAutoScrolling(P.autoScrolling,"internal"),e.setFitToSection(P.autoScrolling,"internal"),d("#fp-nav").show(),f.removeClass("fp-responsive"))}}function qa(a){var b="all "+c.scrollingSpeed+"ms "+c.easingcss3;a.removeClass("fp-notransition");
|
||||
return a.css({"-webkit-transition":b,transition:b})}function La(a,b){if(825>a||900>b){var c=m.min(100*a/825,100*b/900).toFixed(2);p.css("font-size",c+"%")}else p.css("font-size","100%")}function J(a,b){c.menu&&(d(c.menu).find(".active").removeClass("active"),d(c.menu).find('[data-menuanchor="'+a+'"]').addClass("active"));c.navigation&&(d("#fp-nav").find(".active").removeClass("active"),a?d("#fp-nav").find('a[href="#'+a+'"]').addClass("active"):d("#fp-nav").find("li").eq(b).find("a").addClass("active"))}
|
||||
function U(a){var b=d(".fp-section.active").index(".fp-section");a=a.index(".fp-section");return b==a?"none":b>a?"up":"down"}function H(a){a.css("overflow","hidden");var b=a.closest(".fp-section"),d=a.find(".fp-scrollable"),e;d.length?e=d.get(0).scrollHeight:(e=a.get(0).scrollHeight,c.verticalCentered&&(e=a.find(".fp-tableCell").get(0).scrollHeight));b=t-parseInt(b.css("padding-bottom"))-parseInt(b.css("padding-top"));e>b?d.length?d.css("height",b+"px").parent().css("height",b+"px"):(c.verticalCentered?
|
||||
a.find(".fp-tableCell").wrapInner('<div class="fp-scrollable" />'):a.wrapInner('<div class="fp-scrollable" />'),a.find(".fp-scrollable").slimScroll({allowPageScroll:!0,height:b+"px",size:"10px",alwaysVisible:!0})):va(a);a.css("overflow","")}function va(a){a.find(".fp-scrollable").children().first().unwrap().unwrap();a.find(".slimScrollBar").remove();a.find(".slimScrollRail").remove()}function wa(a){a.addClass("fp-table").wrapInner('<div class="fp-tableCell" style="height:'+xa(a)+'px;" />')}function xa(a){var b=
|
||||
t;if(c.paddingTop||c.paddingBottom)b=a,b.hasClass("fp-section")||(b=a.closest(".fp-section")),a=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom")),b=t-a;return b}function ma(a,b){b?qa(f):f.addClass("fp-notransition");f.css(ra(a));setTimeout(function(){f.removeClass("fp-notransition")},10)}function Z(a,b){var c;"undefined"===typeof b&&(b=0);c=isNaN(a)?d('[data-anchor="'+a+'"]'):d(".fp-section").eq(a-1);a===z||c.hasClass("active")?ya(c,b):r(c,function(){ya(c,b)})}function ya(a,b){if("undefined"!=
|
||||
typeof b){var c=a.find(".fp-slides"),d=c.find('[data-anchor="'+b+'"]');d.length||(d=c.find(".fp-slide").eq(b));d.length&&F(c,d)}}function Ma(a,b){a.append('<div class="fp-slidesNav"><ul></ul></div>');var d=a.find(".fp-slidesNav");d.addClass(c.slidesNavPosition);for(var e=0;e<b;e++)d.find("ul").append('<li><a href="#"><span></span></a></li>');d.css("margin-left","-"+d.width()/2+"px");d.find("li").first().find("a").addClass("active")}function V(a,b,d,e){e="";c.anchors.length&&(a?("undefined"!==typeof d&&
|
||||
(e=d),"undefined"===typeof b&&(b=a),Y=b,za(e+"/"+b)):("undefined"!==typeof a&&(Y=b),za(d)));Aa()}function za(a){if(c.recordHistory)location.hash=a;else if(O||Q)history.replaceState(G,G,"#"+a);else{var b=h.location.href.split("#")[0];h.location.replace(b+"#"+a)}}function pa(a){var b=a.data("anchor");a=a.index(".fp-slide");"undefined"===typeof b&&(b=a);return b}function Aa(){var a=d(".fp-section.active"),b=a.find(".fp-slide.active"),e=a.data("anchor"),f=pa(b),a=a.index(".fp-section"),a=String(a);c.anchors.length&&
|
||||
(a=e);b.length&&(a=a+"-"+f);a=a.replace("/","-").replace("#","");p[0].className=p[0].className.replace(/\b\s?fp-viewing-[^\s]+\b/g,"");p.addClass("fp-viewing"+a)}function Na(){var a=k.createElement("p"),b,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};k.body.insertBefore(a,null);for(var d in c)a.style[d]!==G&&(a.style[d]="translate3d(1px,1px,1px)",b=h.getComputedStyle(a).getPropertyValue(c[d]));k.body.removeChild(a);
|
||||
return b!==G&&0<b.length&&"none"!==b}function Oa(){if(O||Q){var a=Ba();n.off("touchstart "+a.down).on("touchstart "+a.down,Ga);n.off("touchmove "+a.move).on("touchmove "+a.move,Fa)}}function Pa(){if(O||Q){var a=Ba();n.off("touchstart "+a.down);n.off("touchmove "+a.move)}}function Ba(){return h.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"}}function ha(a){var b=[];b.y="undefined"!==typeof a.pageY&&(a.pageY||a.pageX)?a.pageY:a.touches[0].pageY;b.x="undefined"!==
|
||||
typeof a.pageX&&(a.pageY||a.pageX)?a.pageX:a.touches[0].pageX;Q&&W(a)&&(b.y=a.touches[0].pageY,b.x=a.touches[0].pageX);return b}function X(a){e.setScrollingSpeed(0,"internal");F(a.closest(".fp-slides"),a);e.setScrollingSpeed(P.scrollingSpeed,"internal")}function x(a){c.scrollBar?f.scrollTop(a):c.css3?ma("translate3d(0px, -"+a+"px, 0px)",!1):f.css("top",-a)}function ra(a){return{"-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,transform:a}}function Qa(){x(0);d("#fp-nav, .fp-slidesNav, .fp-controlArrow").remove();
|
||||
d(".fp-section").css({height:"","background-color":"",padding:""});d(".fp-slide").css({width:""});f.css({height:"",position:"","-ms-touch-action":"","touch-action":""});d(".fp-section, .fp-slide").each(function(){va(d(this));d(this).removeClass("fp-table active")});f.addClass("fp-notransition");f.find(".fp-tableCell, .fp-slidesContainer, .fp-slides").each(function(){d(this).replaceWith(this.childNodes)});w.scrollTop(0)}function R(a,b,d){c[a]=b;"internal"!==d&&(P[a]=b)}function S(a,b){console&&console[a]&&
|
||||
console[a]("fullPage: "+b)}var w=d("html, body"),p=d("body"),e=d.fn.fullpage;c=d.extend({menu:!1,anchors:[],navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,normalScrollElements:null,scrollOverflow:!1,touchSensitivity:5,normalScrollElementTouchThreshold:5,
|
||||
keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,resize:!1,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,sectionSelector:".section",slideSelector:".slide",afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null},c);(function(){c.continuousVertical&&(c.loopTop||c.loopBottom)&&(c.continuousVertical=!1,S("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled"));
|
||||
c.continuousVertical&&c.scrollBar&&(c.continuousVertical=!1,S("warn","Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled"));d.each(c.anchors,function(a,b){(d("#"+b).length||d('[name="'+b+'"]').length)&&S("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).")})})();d.extend(d.easing,{easeInOutCubic:function(a,b,c,d,e){return 1>(b/=e/2)?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c}});d.extend(d.easing,{easeInQuart:function(a,
|
||||
b,c,d,e){return d*(b/=e)*b*b*b+c}});e.setAutoScrolling=function(a,b){R("autoScrolling",a,b);var g=d(".fp-section.active");c.autoScrolling&&!c.scrollBar?(w.css({overflow:"hidden",height:"100%"}),e.setRecordHistory(c.recordHistory,"internal"),f.css({"-ms-touch-action":"none","touch-action":"none"}),g.length&&x(g.position().top)):(w.css({overflow:"visible",height:"initial"}),e.setRecordHistory(!1,"internal"),f.css({"-ms-touch-action":"","touch-action":""}),x(0),g.length&&w.scrollTop(g.position().top))};
|
||||
e.setRecordHistory=function(a,b){R("recordHistory",a,b)};e.setScrollingSpeed=function(a,b){R("scrollingSpeed",a,b)};e.setFitToSection=function(a,b){R("fitToSection",a,b)};e.setMouseWheelScrolling=function(a){a?k.addEventListener?(k.addEventListener("mousewheel",B,!1),k.addEventListener("wheel",B,!1)):k.attachEvent("onmousewheel",B):k.addEventListener?(k.removeEventListener("mousewheel",B,!1),k.removeEventListener("wheel",B,!1)):k.detachEvent("onmousewheel",B)};e.setAllowScrolling=function(a,b){"undefined"!=
|
||||
typeof b?(b=b.replace(" ","").split(","),d.each(b,function(b,c){switch(c){case "up":u.up=a;break;case "down":u.down=a;break;case "left":u.left=a;break;case "right":u.right=a;break;case "all":e.setAllowScrolling(a)}})):a?(e.setMouseWheelScrolling(!0),Oa()):(e.setMouseWheelScrolling(!1),Pa())};e.setKeyboardScrolling=function(a){c.keyboardScrolling=a};e.moveSectionUp=function(){var a=d(".fp-section.active").prev(".fp-section");a.length||!c.loopTop&&!c.continuousVertical||(a=d(".fp-section").last());
|
||||
a.length&&r(a,null,!0)};e.moveSectionDown=function(){var a=d(".fp-section.active").next(".fp-section");a.length||!c.loopBottom&&!c.continuousVertical||(a=d(".fp-section").first());a.length&&r(a,null,!1)};e.moveTo=function(a,b){var c="",c=isNaN(a)?d('[data-anchor="'+a+'"]'):d(".fp-section").eq(a-1);"undefined"!==typeof b?Z(a,b):0<c.length&&r(c)};e.moveSlideRight=function(){ka("next")};e.moveSlideLeft=function(){ka("prev")};e.reBuild=function(a){if(!f.hasClass("fp-destroyed")){v=!0;var b=l.width();
|
||||
t=l.height();c.resize&&La(t,b);d(".fp-section").each(function(){var a=d(this).find(".fp-slides"),b=d(this).find(".fp-slide");c.verticalCentered&&d(this).find(".fp-tableCell").css("height",xa(d(this))+"px");d(this).css("height",t+"px");c.scrollOverflow&&(b.length?b.each(function(){H(d(this))}):H(d(this)));b.length&&F(a,a.find(".fp-slide.active"))});b=d(".fp-section.active");b.index(".fp-section")&&r(b);v=!1;d.isFunction(c.afterResize)&&a&&c.afterResize.call(f);d.isFunction(c.afterReBuild)&&!a&&c.afterReBuild.call(f)}};
|
||||
var A=!1,O=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),Q="ontouchstart"in h||0<navigator.msMaxTouchPoints||navigator.maxTouchPoints,f=d(this),t=l.height(),v=!1,z,Y,q=!0,C=[],y,u={up:!0,down:!0,left:!0,right:!0},P=d.extend(!0,{},c);e.setAllowScrolling(!0);f.removeClass("fp-destroyed");c.css3&&(c.css3=Na());d(this).length?(f.css({height:"100%",position:"relative"}),f.addClass("fullpage-wrapper")):S("error",
|
||||
"Error! Fullpage.js needs to be initialized with a selector. For example: $('#myContainer').fullpage();");d(c.sectionSelector).each(function(){d(this).addClass("fp-section")});d(c.slideSelector).each(function(){d(this).addClass("fp-slide")});c.navigation&&Ea();d(".fp-section").each(function(a){var b=d(this),e=d(this).find(".fp-slide"),f=e.length;a||0!==d(".fp-section.active").length||d(this).addClass("active");d(this).css("height",t+"px");(c.paddingTop||c.paddingBottom)&&d(this).css("padding",c.paddingTop+
|
||||
" 0 "+c.paddingBottom+" 0");"undefined"!==typeof c.sectionsColor[a]&&d(this).css("background-color",c.sectionsColor[a]);"undefined"!==typeof c.anchors[a]&&(d(this).attr("data-anchor",c.anchors[a]),d(this).hasClass("active")&&J(c.anchors[a],a));if(1<f){a=100*f;var h=100/f;e.wrapAll('<div class="fp-slidesContainer" />');e.parent().wrap('<div class="fp-slides" />');d(this).find(".fp-slidesContainer").css("width",a+"%");c.controlArrows&&Da(d(this));c.slidesNavigation&&Ma(d(this),f);e.each(function(a){d(this).css("width",
|
||||
h+"%");c.verticalCentered&&wa(d(this))});b=b.find(".fp-slide.active");b.length?X(b):e.eq(0).addClass("active")}else c.verticalCentered&&wa(d(this))}).promise().done(function(){e.setAutoScrolling(c.autoScrolling,"internal");var a=d(".fp-section.active").find(".fp-slide.active");a.length&&(0!==d(".fp-section.active").index(".fp-section")||0===d(".fp-section.active").index(".fp-section")&&0!==a.index())&&X(a);c.fixedElements&&c.css3&&d(c.fixedElements).appendTo(p);c.navigation&&(y.css("margin-top","-"+
|
||||
y.height()/2+"px"),y.find("li").eq(d(".fp-section.active").index(".fp-section")).find("a").addClass("active"));c.menu&&c.css3&&d(c.menu).closest(".fullpage-wrapper").length&&d(c.menu).appendTo(p);c.scrollOverflow?("complete"===k.readyState&&ba(),l.on("load",ba)):d.isFunction(c.afterRender)&&c.afterRender.call(f);ta();if(!c.animateAnchor&&(a=h.location.hash.replace("#","").split("/")[0],a.length)){var b=d('[data-anchor="'+a+'"]');b.length&&(c.autoScrolling?x(b.position().top):(x(0),w.scrollTop(b.position().top)),
|
||||
J(a,null),d.isFunction(c.afterLoad)&&c.afterLoad.call(b,a,b.index(".fp-section")+1),b.addClass("active").siblings().removeClass("active"))}Aa();l.on("load",function(){var a=h.location.hash.replace("#","").split("/"),b=a[0],a=a[1];b&&Z(b,a)})});var da,ea,T=!1;l.on("scroll",ca);var E=0,M=0,D=0,L=0,ja=(new Date).getTime();l.on("hashchange",oa);n.keydown(function(a){clearTimeout(Ca);var b=d(k.activeElement);b.is("textarea")||b.is("input")||b.is("select")||!c.keyboardScrolling||!c.autoScrolling||(-1<d.inArray(a.which,
|
||||
[40,38,32,33,34])&&a.preventDefault(),Ca=setTimeout(function(){var b=a.shiftKey;switch(a.which){case 38:case 33:e.moveSectionUp();break;case 32:if(b){e.moveSectionUp();break}case 40:case 34:e.moveSectionDown();break;case 36:e.moveTo(1);break;case 35:e.moveTo(d(".fp-section").length);break;case 37:e.moveSlideLeft();break;case 39:e.moveSlideRight()}},150))});var Ca;f.mousedown(function(a){2==a.which&&(N=a.pageY,f.on("mousemove",Ka))});f.mouseup(function(a){2==a.which&&f.off("mousemove")});var N=0;n.on("click touchstart",
|
||||
"#fp-nav a",function(a){a.preventDefault();a=d(this).parent().index();r(d(".fp-section").eq(a))});n.on("click touchstart",".fp-slidesNav a",function(a){a.preventDefault();a=d(this).closest(".fp-section").find(".fp-slides");var b=a.find(".fp-slide").eq(d(this).closest("li").index());F(a,b)});c.normalScrollElements&&(n.on("mouseenter",c.normalScrollElements,function(){e.setMouseWheelScrolling(!1)}),n.on("mouseleave",c.normalScrollElements,function(){e.setMouseWheelScrolling(!0)}));d(".fp-section").on("click touchstart",
|
||||
".fp-controlArrow",function(){d(this).hasClass("fp-prev")?e.moveSlideLeft():e.moveSlideRight()});l.resize(sa);var aa=t,ua;e.destroy=function(a){e.setAutoScrolling(!1,"internal");e.setAllowScrolling(!1);e.setKeyboardScrolling(!1);f.addClass("fp-destroyed");l.off("scroll",ca).off("hashchange",oa).off("resize",sa);n.off("click","#fp-nav a").off("mouseenter","#fp-nav li").off("mouseleave","#fp-nav li").off("click",".fp-slidesNav a").off("mouseover",c.normalScrollElements).off("mouseout",c.normalScrollElements);
|
||||
d(".fp-section").off("click",".fp-controlArrow");a&&Qa()}}})(jQuery,window,document,Math);
|
||||
@@ -0,0 +1,16 @@
|
||||
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version: 1.3.2 (modified for fullpage.js)
|
||||
*
|
||||
*/
|
||||
(function(f){jQuery.fn.extend({slimScroll:function(g){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function s(d){d=d||window.event;
|
||||
var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}function m(d,f,g){k=!1;var e=d,h=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),h),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());
|
||||
e=l*(b[0].scrollHeight-b.outerHeight());g&&(e=d,d=e/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),h),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);u();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",s,!1),this.addEventListener("mousewheel",s,!1)):document.attachEvent("onmousewheel",s)}function v(){r=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),D);c.css({height:r+"px"});var a=r==b.outerHeight()?"none":"block";c.css({display:a})}
|
||||
function u(){v();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;r>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&w||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var w,x,y,A,z,r,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+
|
||||
a.railClass);v();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("<div></div>").addClass(a.wrapperClass).css({position:"relative",
|
||||
overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
|
||||
"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
|
||||
b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){u()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){w=!0;u();p()},function(){w=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
|
||||
(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});v();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
|
||||