mirror of
https://github.com/dawidolko/Website-Templates.git
synced 2026-02-04 09:30:05 +00:00
Website templates
This commit is contained in:
7
rocket-business-bootstrap-free-responsive-web-theme/js/bootstrap.min.js
vendored
Normal file
7
rocket-business-bootstrap-free-responsive-web-theme/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
140
rocket-business-bootstrap-free-responsive-web-theme/js/custom.js
Normal file
140
rocket-business-bootstrap-free-responsive-web-theme/js/custom.js
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
Author URI: http://webthemez.com/
|
||||
Note:
|
||||
Licence under Creative Commons Attribution 3.0
|
||||
Do not remove the back-link in this web template
|
||||
-------------------------------------------------------*/
|
||||
|
||||
$(window).load(function() {
|
||||
jQuery('#all').click();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#header_wrapper').scrollToFixed();
|
||||
$('.res-nav_click').click(function() {
|
||||
$('.main-nav').slideToggle();
|
||||
return false
|
||||
|
||||
});
|
||||
|
||||
function resizeText() {
|
||||
var preferredWidth = 767;
|
||||
var displayWidth = window.innerWidth;
|
||||
var percentage = displayWidth / preferredWidth;
|
||||
var fontsizetitle = 25;
|
||||
var newFontSizeTitle = Math.floor(fontsizetitle * percentage);
|
||||
$(".divclass").css("font-size", newFontSizeTitle)
|
||||
}
|
||||
if ($('#main-nav ul li:first-child').hasClass('active')) {
|
||||
$('#main-nav').css('background', 'none');
|
||||
}
|
||||
$('#mainNav').onePageNav({
|
||||
currentClass: 'active',
|
||||
changeHash: false,
|
||||
scrollSpeed: 950,
|
||||
scrollThreshold: 0.2,
|
||||
filter: '',
|
||||
easing: 'swing',
|
||||
begin: function() {
|
||||
},
|
||||
end: function() {
|
||||
if (!$('#main-nav ul li:first-child').hasClass('active')) {
|
||||
$('.header').addClass('addBg');
|
||||
} else {
|
||||
$('.header').removeClass('addBg');
|
||||
}
|
||||
|
||||
},
|
||||
scrollChange: function($currentListItem) {
|
||||
if (!$('#main-nav ul li:first-child').hasClass('active')) {
|
||||
$('.header').addClass('addBg');
|
||||
} else {
|
||||
$('.header').removeClass('addBg');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var container = $('#portfolio_wrapper');
|
||||
|
||||
|
||||
container.isotope({
|
||||
animationEngine: 'best-available',
|
||||
animationOptions: {
|
||||
duration: 200,
|
||||
queue: false
|
||||
},
|
||||
layoutMode: 'fitRows'
|
||||
});
|
||||
|
||||
$('#filters a').click(function() {
|
||||
$('#filters a').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
var selector = $(this).attr('data-filter');
|
||||
container.isotope({
|
||||
filter: selector
|
||||
});
|
||||
setProjects();
|
||||
return false;
|
||||
});
|
||||
|
||||
function splitColumns() {
|
||||
var winWidth = $(window).width(),
|
||||
columnNumb = 1;
|
||||
|
||||
|
||||
if (winWidth > 1024) {
|
||||
columnNumb = 4;
|
||||
} else if (winWidth > 900) {
|
||||
columnNumb = 2;
|
||||
} else if (winWidth > 479) {
|
||||
columnNumb = 2;
|
||||
} else if (winWidth < 479) {
|
||||
columnNumb = 1;
|
||||
}
|
||||
|
||||
return columnNumb;
|
||||
}
|
||||
|
||||
function setColumns() {
|
||||
var winWidth = $(window).width(),
|
||||
columnNumb = splitColumns(),
|
||||
postWidth = Math.floor(winWidth / columnNumb);
|
||||
|
||||
container.find('.portfolio-item').each(function() {
|
||||
$(this).css({
|
||||
width: postWidth + 'px'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setProjects() {
|
||||
setColumns();
|
||||
container.isotope('reLayout');
|
||||
}
|
||||
|
||||
container.imagesLoaded(function() {
|
||||
setColumns();
|
||||
});
|
||||
|
||||
|
||||
$(window).bind('resize', function() {
|
||||
setProjects();
|
||||
});
|
||||
|
||||
$(".fancybox").fancybox();
|
||||
});
|
||||
|
||||
wow = new WOW({
|
||||
animateClass: 'animated',
|
||||
offset: 100
|
||||
});
|
||||
wow.init();
|
||||
document.getElementById('').onclick = function() {
|
||||
var section = document.createElement('section');
|
||||
section.className = 'wow fadeInDown';
|
||||
section.className = 'wow shake';
|
||||
section.className = 'wow zoomIn';
|
||||
section.className = 'wow lightSpeedIn';
|
||||
this.parentNode.insertBefore(section, this);
|
||||
};
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1003 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
322
rocket-business-bootstrap-free-responsive-web-theme/js/fancybox/jquery.fancybox.css
vendored
Normal file
322
rocket-business-bootstrap-free-responsive-web-theme/js/fancybox/jquery.fancybox.css
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||
.fancybox-wrap,
|
||||
.fancybox-skin,
|
||||
.fancybox-outer,
|
||||
.fancybox-inner,
|
||||
.fancybox-image,
|
||||
.fancybox-wrap iframe,
|
||||
.fancybox-wrap object,
|
||||
.fancybox-nav,
|
||||
.fancybox-nav span,
|
||||
.fancybox-tmp
|
||||
{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
outline: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fancybox-wrap {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 8020;
|
||||
}
|
||||
|
||||
.fancybox-skin {
|
||||
position: relative;
|
||||
background: #2F3238;
|
||||
color: #7F8289;
|
||||
text-shadow: none;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.fancybox-opened {
|
||||
z-index: 8030;
|
||||
}
|
||||
|
||||
.fancybox-opened .fancybox-skin {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.fancybox-skin{padding:0px !important;}
|
||||
.fancybox-outer, .fancybox-inner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fancybox-inner {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fancybox-type-iframe .fancybox-inner {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.fancybox-error {
|
||||
color: #444;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fancybox-image, .fancybox-iframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.fancybox-image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
||||
background-image: url('fancybox_sprite.png') !important;
|
||||
}
|
||||
|
||||
#fancybox-loading {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -22px;
|
||||
margin-left: -22px;
|
||||
background-position: 0 -108px;
|
||||
opacity: 0.8;
|
||||
cursor: pointer;
|
||||
z-index: 8060;
|
||||
}
|
||||
|
||||
#fancybox-loading div {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: url('fancybox_loading.gif') center center no-repeat;
|
||||
}
|
||||
|
||||
.fancybox-close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
cursor: pointer;
|
||||
z-index: 9000;
|
||||
opacity: 0.5;
|
||||
-webkit-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
-moz-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
-o-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
}
|
||||
|
||||
.fancybox-close i {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -11px 0 0 -11px;
|
||||
font-size: 22px;
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.fancybox-close:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fancybox-nav {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
background: transparent url('blank.gif'); /* helps IE */
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
z-index: 8040;
|
||||
}
|
||||
|
||||
.fancybox-prev,
|
||||
.fancybox-prev span {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.fancybox-next,
|
||||
.fancybox-next span {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.fancybox-nav span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-top: -25px;
|
||||
cursor: pointer;
|
||||
z-index: 8040;
|
||||
background-image: none;
|
||||
background-color: #26292E;
|
||||
|
||||
opacity: 0.5;
|
||||
|
||||
-webkit-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
-moz-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
-o-transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
transition: background 0.1s linear 0s, opacity 0.1s linear 0s;
|
||||
}
|
||||
|
||||
.fancybox-prev span i {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -15px 0 0 -17px;
|
||||
font-size: 30px;
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.fancybox-next span i {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -15px 0 0 -15px;
|
||||
font-size: 30px;
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.fancybox-nav:hover span {
|
||||
opacity: 1;
|
||||
background-color:#DE5E60;
|
||||
}
|
||||
|
||||
.fancybox-tmp {
|
||||
position: absolute;
|
||||
top: -99999px;
|
||||
left: -99999px;
|
||||
visibility: hidden;
|
||||
max-width: 99999px;
|
||||
max-height: 99999px;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
/* Overlay helper */
|
||||
|
||||
.fancybox-lock {
|
||||
margin: 0!important;
|
||||
}
|
||||
|
||||
.fancybox-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden !important;
|
||||
display: none;
|
||||
z-index: 8010;
|
||||
background: url('fancybox_overlay.png');
|
||||
}
|
||||
|
||||
.fancybox-overlay-fixed {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.fancybox-lock .fancybox-overlay {
|
||||
overflow: auto;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
/* Title helper */
|
||||
|
||||
.fancybox-title {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
text-shadow: none;
|
||||
z-index: 8050;
|
||||
}
|
||||
|
||||
.fancybox-opened .fancybox-title {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.fancybox-opened .fancybox-title h4{
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fancybox-opened .fancybox-title p{
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.fancybox-title-float-wrap {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 50%;
|
||||
margin-bottom: -35px;
|
||||
z-index: 8050;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fancybox-title-float-wrap .child {
|
||||
display: inline-block;
|
||||
margin-right: -100%;
|
||||
padding: 2px 20px;
|
||||
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
-webkit-border-radius: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
border-radius: 15px;
|
||||
text-shadow: 0 1px 2px #222;
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fancybox-title-outside-wrap {
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fancybox-title-inside-wrap {
|
||||
padding: 25px 30px 30px;
|
||||
}
|
||||
|
||||
.fancybox-title-over-wrap {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
background: #000;
|
||||
background: rgba(0, 0, 0, .8);
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.fancybox-nav span,
|
||||
.fancybox-nav:hover span,
|
||||
.fancybox-close,
|
||||
.fancybox-close:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.fancybox-close i {
|
||||
left: 70px;
|
||||
top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
.fancybox-close i {
|
||||
left: 30px;
|
||||
top: 20px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
|
||||
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
|
||||
width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
|
||||
keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
||||
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
|
||||
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
|
||||
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
|
||||
c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
|
||||
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
|
||||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
|
||||
setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
|
||||
d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
|
||||
a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
|
||||
b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
|
||||
y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
|
||||
if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
||||
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
|
||||
{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
|
||||
mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
|
||||
!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
|
||||
"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
|
||||
this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
|
||||
f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
|
||||
e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
|
||||
outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
|
||||
g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
|
||||
"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
|
||||
h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
|
||||
h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
|
||||
"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
|
||||
y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
|
||||
!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
|
||||
b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
|
||||
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
|
||||
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
|
||||
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
|
||||
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
|
||||
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
|
||||
f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
|
||||
b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
|
||||
p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
|
||||
f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
|
||||
b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
|
||||
e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
|
||||
":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
|
||||
d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
|
||||
@@ -0,0 +1,9 @@
|
||||
document.createElement("nav");
|
||||
document.createElement("section");
|
||||
document.createElement("article");
|
||||
document.createElement("aside");
|
||||
document.createElement("footer");
|
||||
document.createElement("header");
|
||||
document.createElement("figure");
|
||||
document.createElement("figcaption");
|
||||
document.createElement("source");
|
||||
8
rocket-business-bootstrap-free-responsive-web-theme/js/html5shiv.js
vendored
Normal file
8
rocket-business-bootstrap-free-responsive-web-theme/js/html5shiv.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
|
||||
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
4
rocket-business-bootstrap-free-responsive-web-theme/js/jquery-1.11.0.min.js
vendored
Normal file
4
rocket-business-bootstrap-free-responsive-web-theme/js/jquery-1.11.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
558
rocket-business-bootstrap-free-responsive-web-theme/js/jquery-scrolltofixed.js
vendored
Normal file
558
rocket-business-bootstrap-free-responsive-web-theme/js/jquery-scrolltofixed.js
vendored
Normal file
@@ -0,0 +1,558 @@
|
||||
/*
|
||||
* ScrollToFixed
|
||||
* https://github.com/bigspotteddog/ScrollToFixed
|
||||
*
|
||||
* Copyright (c) 2011 Joseph Cava-Lynch
|
||||
* MIT license
|
||||
*/
|
||||
(function($) {
|
||||
$.isScrollToFixed = function(el) {
|
||||
return !!$(el).data('ScrollToFixed');
|
||||
};
|
||||
|
||||
$.ScrollToFixed = function(el, options) {
|
||||
// To avoid scope issues, use 'base' instead of 'this' to reference this
|
||||
// class from internal events and functions.
|
||||
var base = this;
|
||||
|
||||
// Access to jQuery and DOM versions of element.
|
||||
base.$el = $(el);
|
||||
base.el = el;
|
||||
|
||||
// Add a reverse reference to the DOM object.
|
||||
base.$el.data('ScrollToFixed', base);
|
||||
|
||||
// A flag so we know if the scroll has been reset.
|
||||
var isReset = false;
|
||||
|
||||
// The element that was given to us to fix if scrolled above the top of
|
||||
// the page.
|
||||
var target = base.$el;
|
||||
|
||||
var position;
|
||||
var originalPosition;
|
||||
var originalOffsetTop;
|
||||
var originalZIndex;
|
||||
|
||||
// The offset top of the element when resetScroll was called. This is
|
||||
// used to determine if we have scrolled past the top of the element.
|
||||
var offsetTop = 0;
|
||||
|
||||
// The offset left of the element when resetScroll was called. This is
|
||||
// used to move the element left or right relative to the horizontal
|
||||
// scroll.
|
||||
var offsetLeft = 0;
|
||||
var originalOffsetLeft = -1;
|
||||
|
||||
// This last offset used to move the element horizontally. This is used
|
||||
// to determine if we need to move the element because we would not want
|
||||
// to do that for no reason.
|
||||
var lastOffsetLeft = -1;
|
||||
|
||||
// This is the element used to fill the void left by the target element
|
||||
// when it goes fixed; otherwise, everything below it moves up the page.
|
||||
var spacer = null;
|
||||
|
||||
var spacerClass;
|
||||
|
||||
var className;
|
||||
|
||||
// Capture the original offsets for the target element. This needs to be
|
||||
// called whenever the page size changes or when the page is first
|
||||
// scrolled. For some reason, calling this before the page is first
|
||||
// scrolled causes the element to become fixed too late.
|
||||
function resetScroll() {
|
||||
// Set the element to it original positioning.
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
|
||||
// Reset the last offset used to determine if the page has moved
|
||||
// horizontally.
|
||||
lastOffsetLeft = -1;
|
||||
|
||||
// Capture the offset top of the target element.
|
||||
offsetTop = target.offset().top;
|
||||
|
||||
// Capture the offset left of the target element.
|
||||
offsetLeft = target.offset().left;
|
||||
|
||||
// If the offsets option is on, alter the left offset.
|
||||
if (base.options.offsets) {
|
||||
offsetLeft += (target.offset().left - target.position().left);
|
||||
}
|
||||
|
||||
if (originalOffsetLeft == -1) {
|
||||
originalOffsetLeft = offsetLeft;
|
||||
}
|
||||
|
||||
position = target.css('position');
|
||||
|
||||
// Set that this has been called at least once.
|
||||
isReset = true;
|
||||
|
||||
if (base.options.bottom != -1) {
|
||||
target.trigger('preFixed.ScrollToFixed');
|
||||
setFixed();
|
||||
target.trigger('fixed.ScrollToFixed');
|
||||
}
|
||||
}
|
||||
|
||||
function getLimit() {
|
||||
var limit = base.options.limit;
|
||||
if (!limit) return 0;
|
||||
|
||||
if (typeof(limit) === 'function') {
|
||||
return limit.apply(target);
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
// Returns whether the target element is fixed or not.
|
||||
function isFixed() {
|
||||
return position === 'fixed';
|
||||
}
|
||||
|
||||
// Returns whether the target element is absolute or not.
|
||||
function isAbsolute() {
|
||||
return position === 'absolute';
|
||||
}
|
||||
|
||||
function isUnfixed() {
|
||||
return !(isFixed() || isAbsolute());
|
||||
}
|
||||
|
||||
// Sets the target element to fixed. Also, sets the spacer to fill the
|
||||
// void left by the target element.
|
||||
function setFixed() {
|
||||
// Only fix the target element and the spacer if we need to.
|
||||
if (!isFixed()) {
|
||||
// Set the spacer to fill the height and width of the target
|
||||
// element, then display it.
|
||||
spacer.css({
|
||||
'display' : target.css('display'),
|
||||
'width' : target.outerWidth(true),
|
||||
'height' : target.outerHeight(true),
|
||||
'float' : target.css('float')
|
||||
});
|
||||
|
||||
// Set the target element to fixed and set its width so it does
|
||||
// not fill the rest of the page horizontally. Also, set its top
|
||||
// to the margin top specified in the options.
|
||||
|
||||
cssOptions={
|
||||
'z-index' : base.options.zIndex,
|
||||
'position' : 'fixed',
|
||||
'top' : base.options.bottom == -1?getMarginTop():'',
|
||||
'bottom' : base.options.bottom == -1?'':base.options.bottom,
|
||||
'margin-left' : '0px'
|
||||
}
|
||||
if (!base.options.dontSetWidth){ cssOptions['width']=target.width(); };
|
||||
|
||||
target.css(cssOptions);
|
||||
|
||||
target.addClass(base.options.baseClassName);
|
||||
|
||||
if (base.options.className) {
|
||||
target.addClass(base.options.className);
|
||||
}
|
||||
|
||||
position = 'fixed';
|
||||
}
|
||||
}
|
||||
|
||||
function setAbsolute() {
|
||||
|
||||
var top = getLimit();
|
||||
var left = offsetLeft;
|
||||
|
||||
if (base.options.removeOffsets) {
|
||||
left = '';
|
||||
top = top - offsetTop;
|
||||
}
|
||||
|
||||
cssOptions={
|
||||
'position' : 'absolute',
|
||||
'top' : top,
|
||||
'left' : left,
|
||||
'margin-left' : '0px',
|
||||
'bottom' : ''
|
||||
}
|
||||
if (!base.options.dontSetWidth){ cssOptions['width']=target.width(); };
|
||||
|
||||
target.css(cssOptions);
|
||||
|
||||
position = 'absolute';
|
||||
}
|
||||
|
||||
// Sets the target element back to unfixed. Also, hides the spacer.
|
||||
function setUnfixed() {
|
||||
// Only unfix the target element and the spacer if we need to.
|
||||
if (!isUnfixed()) {
|
||||
lastOffsetLeft = -1;
|
||||
|
||||
// Hide the spacer now that the target element will fill the
|
||||
// space.
|
||||
spacer.css('display', 'none');
|
||||
|
||||
// Remove the style attributes that were added to the target.
|
||||
// This will reverse the target back to the its original style.
|
||||
target.css({
|
||||
'z-index' : originalZIndex,
|
||||
'width' : '',
|
||||
'position' : originalPosition,
|
||||
'left' : '',
|
||||
'top' : originalOffsetTop,
|
||||
'margin-left' : ''
|
||||
});
|
||||
|
||||
target.removeClass('scroll-to-fixed-fixed');
|
||||
|
||||
if (base.options.className) {
|
||||
target.removeClass(base.options.className);
|
||||
}
|
||||
|
||||
position = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Moves the target element left or right relative to the horizontal
|
||||
// scroll position.
|
||||
function setLeft(x) {
|
||||
// Only if the scroll is not what it was last time we did this.
|
||||
if (x != lastOffsetLeft) {
|
||||
// Move the target element horizontally relative to its original
|
||||
// horizontal position.
|
||||
target.css('left', offsetLeft - x);
|
||||
|
||||
// Hold the last horizontal position set.
|
||||
lastOffsetLeft = x;
|
||||
}
|
||||
}
|
||||
|
||||
function getMarginTop() {
|
||||
var marginTop = base.options.marginTop;
|
||||
if (!marginTop) return 0;
|
||||
|
||||
if (typeof(marginTop) === 'function') {
|
||||
return marginTop.apply(target);
|
||||
}
|
||||
return marginTop;
|
||||
}
|
||||
|
||||
// Checks to see if we need to do something based on new scroll position
|
||||
// of the page.
|
||||
function checkScroll() {
|
||||
if (!$.isScrollToFixed(target)) return;
|
||||
var wasReset = isReset;
|
||||
|
||||
// If resetScroll has not yet been called, call it. This only
|
||||
// happens once.
|
||||
if (!isReset) {
|
||||
resetScroll();
|
||||
} else if (isUnfixed()) {
|
||||
// if the offset has changed since the last scroll,
|
||||
// we need to get it again.
|
||||
|
||||
// Capture the offset top of the target element.
|
||||
offsetTop = target.offset().top;
|
||||
|
||||
// Capture the offset left of the target element.
|
||||
offsetLeft = target.offset().left;
|
||||
}
|
||||
|
||||
// Grab the current horizontal scroll position.
|
||||
var x = $(window).scrollLeft();
|
||||
|
||||
// Grab the current vertical scroll position.
|
||||
var y = $(window).scrollTop();
|
||||
|
||||
// Get the limit, if there is one.
|
||||
var limit = getLimit();
|
||||
|
||||
// If the vertical scroll position, plus the optional margin, would
|
||||
// put the target element at the specified limit, set the target
|
||||
// element to absolute.
|
||||
if (base.options.minWidth && $(window).width() < base.options.minWidth) {
|
||||
if (!isUnfixed() || !wasReset) {
|
||||
postPosition();
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
}
|
||||
} else if (base.options.maxWidth && $(window).width() > base.options.maxWidth) {
|
||||
if (!isUnfixed() || !wasReset) {
|
||||
postPosition();
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
}
|
||||
} else if (base.options.bottom == -1) {
|
||||
// If the vertical scroll position, plus the optional margin, would
|
||||
// put the target element at the specified limit, set the target
|
||||
// element to absolute.
|
||||
if (limit > 0 && y >= limit - getMarginTop()) {
|
||||
if (!isAbsolute() || !wasReset) {
|
||||
postPosition();
|
||||
target.trigger('preAbsolute.ScrollToFixed');
|
||||
setAbsolute();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
}
|
||||
// If the vertical scroll position, plus the optional margin, would
|
||||
// put the target element above the top of the page, set the target
|
||||
// element to fixed.
|
||||
} else if (y >= offsetTop - getMarginTop()) {
|
||||
if (!isFixed() || !wasReset) {
|
||||
postPosition();
|
||||
target.trigger('preFixed.ScrollToFixed');
|
||||
|
||||
// Set the target element to fixed.
|
||||
setFixed();
|
||||
|
||||
// Reset the last offset left because we just went fixed.
|
||||
lastOffsetLeft = -1;
|
||||
|
||||
target.trigger('fixed.ScrollToFixed');
|
||||
}
|
||||
// If the page has been scrolled horizontally as well, move the
|
||||
// target element accordingly.
|
||||
setLeft(x);
|
||||
} else {
|
||||
// Set the target element to unfixed, placing it where it was
|
||||
// before.
|
||||
if (!isUnfixed() || !wasReset) {
|
||||
postPosition();
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (limit > 0) {
|
||||
if (y + $(window).height() - target.outerHeight(true) >= limit - (getMarginTop() || -getBottom())) {
|
||||
if (isFixed()) {
|
||||
postPosition();
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
|
||||
if (originalPosition === 'absolute') {
|
||||
setAbsolute();
|
||||
} else {
|
||||
setUnfixed();
|
||||
}
|
||||
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
}
|
||||
} else {
|
||||
if (!isFixed()) {
|
||||
postPosition();
|
||||
target.trigger('preFixed.ScrollToFixed');
|
||||
setFixed();
|
||||
}
|
||||
setLeft(x);
|
||||
target.trigger('fixed.ScrollToFixed');
|
||||
}
|
||||
} else {
|
||||
setLeft(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBottom() {
|
||||
if (!base.options.bottom) return 0;
|
||||
return base.options.bottom;
|
||||
}
|
||||
|
||||
function postPosition() {
|
||||
var position = target.css('position');
|
||||
|
||||
if (position == 'absolute') {
|
||||
target.trigger('postAbsolute.ScrollToFixed');
|
||||
} else if (position == 'fixed') {
|
||||
target.trigger('postFixed.ScrollToFixed');
|
||||
} else {
|
||||
target.trigger('postUnfixed.ScrollToFixed');
|
||||
}
|
||||
}
|
||||
|
||||
var windowResize = function(event) {
|
||||
// Check if the element is visible before updating it's position, which
|
||||
// improves behavior with responsive designs where this element is hidden.
|
||||
if(target.is(':visible')) {
|
||||
isReset = false;
|
||||
checkScroll();
|
||||
}
|
||||
}
|
||||
|
||||
var windowScroll = function(event) {
|
||||
(!!window.requestAnimationFrame) ? requestAnimationFrame(checkScroll) : checkScroll();
|
||||
}
|
||||
|
||||
// From: http://kangax.github.com/cft/#IS_POSITION_FIXED_SUPPORTED
|
||||
var isPositionFixedSupported = function() {
|
||||
var container = document.body;
|
||||
|
||||
if (document.createElement && container && container.appendChild && container.removeChild) {
|
||||
var el = document.createElement('div');
|
||||
|
||||
if (!el.getBoundingClientRect) return null;
|
||||
|
||||
el.innerHTML = 'x';
|
||||
el.style.cssText = 'position:fixed;top:100px;';
|
||||
container.appendChild(el);
|
||||
|
||||
var originalHeight = container.style.height,
|
||||
originalScrollTop = container.scrollTop;
|
||||
|
||||
container.style.height = '3000px';
|
||||
container.scrollTop = 500;
|
||||
|
||||
var elementTop = el.getBoundingClientRect().top;
|
||||
container.style.height = originalHeight;
|
||||
|
||||
var isSupported = (elementTop === 100);
|
||||
container.removeChild(el);
|
||||
container.scrollTop = originalScrollTop;
|
||||
|
||||
return isSupported;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var preventDefault = function(e) {
|
||||
e = e || window.event;
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
e.returnValue = false;
|
||||
}
|
||||
|
||||
// Initializes this plugin. Captures the options passed in, turns this
|
||||
// off for devices that do not support fixed position, adds the spacer,
|
||||
// and binds to the window scroll and resize events.
|
||||
base.init = function() {
|
||||
// Capture the options for this plugin.
|
||||
base.options = $.extend({}, $.ScrollToFixed.defaultOptions, options);
|
||||
|
||||
originalZIndex = target.css('z-index')
|
||||
|
||||
// Turn off this functionality for devices that do not support it.
|
||||
// if (!(base.options && base.options.dontCheckForPositionFixedSupport)) {
|
||||
// var fixedSupported = isPositionFixedSupported();
|
||||
// if (!fixedSupported) return;
|
||||
// }
|
||||
|
||||
// Put the target element on top of everything that could be below
|
||||
// it. This reduces flicker when the target element is transitioning
|
||||
// to fixed.
|
||||
base.$el.css('z-index', base.options.zIndex);
|
||||
|
||||
// Create a spacer element to fill the void left by the target
|
||||
// element when it goes fixed.
|
||||
spacer = $('<div />');
|
||||
|
||||
position = target.css('position');
|
||||
originalPosition = target.css('position');
|
||||
|
||||
originalOffsetTop = target.css('top');
|
||||
|
||||
// Place the spacer right after the target element.
|
||||
if (isUnfixed()) base.$el.after(spacer);
|
||||
|
||||
// Reset the target element offsets when the window is resized, then
|
||||
// check to see if we need to fix or unfix the target element.
|
||||
$(window).bind('resize.ScrollToFixed', windowResize);
|
||||
|
||||
// When the window scrolls, check to see if we need to fix or unfix
|
||||
// the target element.
|
||||
$(window).bind('scroll.ScrollToFixed', windowScroll);
|
||||
|
||||
// For touch devices, call checkScroll directlly rather than
|
||||
// rAF wrapped windowScroll to animate the element
|
||||
if ('ontouchmove' in window) {
|
||||
$(window).bind('touchmove.ScrollToFixed', checkScroll);
|
||||
}
|
||||
|
||||
if (base.options.preFixed) {
|
||||
target.bind('preFixed.ScrollToFixed', base.options.preFixed);
|
||||
}
|
||||
if (base.options.postFixed) {
|
||||
target.bind('postFixed.ScrollToFixed', base.options.postFixed);
|
||||
}
|
||||
if (base.options.preUnfixed) {
|
||||
target.bind('preUnfixed.ScrollToFixed', base.options.preUnfixed);
|
||||
}
|
||||
if (base.options.postUnfixed) {
|
||||
target.bind('postUnfixed.ScrollToFixed', base.options.postUnfixed);
|
||||
}
|
||||
if (base.options.preAbsolute) {
|
||||
target.bind('preAbsolute.ScrollToFixed', base.options.preAbsolute);
|
||||
}
|
||||
if (base.options.postAbsolute) {
|
||||
target.bind('postAbsolute.ScrollToFixed', base.options.postAbsolute);
|
||||
}
|
||||
if (base.options.fixed) {
|
||||
target.bind('fixed.ScrollToFixed', base.options.fixed);
|
||||
}
|
||||
if (base.options.unfixed) {
|
||||
target.bind('unfixed.ScrollToFixed', base.options.unfixed);
|
||||
}
|
||||
|
||||
if (base.options.spacerClass) {
|
||||
spacer.addClass(base.options.spacerClass);
|
||||
}
|
||||
|
||||
target.bind('resize.ScrollToFixed', function() {
|
||||
spacer.height(target.height());
|
||||
});
|
||||
|
||||
target.bind('scroll.ScrollToFixed', function() {
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
checkScroll();
|
||||
});
|
||||
|
||||
target.bind('detach.ScrollToFixed', function(ev) {
|
||||
preventDefault(ev);
|
||||
|
||||
target.trigger('preUnfixed.ScrollToFixed');
|
||||
setUnfixed();
|
||||
target.trigger('unfixed.ScrollToFixed');
|
||||
|
||||
$(window).unbind('resize.ScrollToFixed', windowResize);
|
||||
$(window).unbind('scroll.ScrollToFixed', windowScroll);
|
||||
|
||||
target.unbind('.ScrollToFixed');
|
||||
|
||||
//remove spacer from dom
|
||||
spacer.remove();
|
||||
|
||||
base.$el.removeData('ScrollToFixed');
|
||||
});
|
||||
|
||||
// Reset everything.
|
||||
windowResize();
|
||||
};
|
||||
|
||||
// Initialize the plugin.
|
||||
base.init();
|
||||
};
|
||||
|
||||
// Sets the option defaults.
|
||||
$.ScrollToFixed.defaultOptions = {
|
||||
marginTop : 0,
|
||||
limit : 0,
|
||||
bottom : -1,
|
||||
zIndex : 1000,
|
||||
baseClassName: 'scroll-to-fixed-fixed'
|
||||
};
|
||||
|
||||
// Returns enhanced elements that will fix to the top of the page when the
|
||||
// page is scrolled.
|
||||
$.fn.scrollToFixed = function(options) {
|
||||
return this.each(function() {
|
||||
(new $.ScrollToFixed(this, options));
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,226 @@
|
||||
/*
|
||||
* jQuery One Page Nav Plugin
|
||||
* http://github.com/davist11/jQuery-One-Page-Nav
|
||||
*
|
||||
* Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* Uses the same license as jQuery, see:
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* @version 3.0.0
|
||||
*
|
||||
* Example usage:
|
||||
* $('#nav').onePageNav({
|
||||
* currentClass: 'current',
|
||||
* changeHash: false,
|
||||
* scrollSpeed: 750
|
||||
* });
|
||||
*/
|
||||
|
||||
; (function ($, window, document, undefined) {
|
||||
|
||||
// our plugin constructor
|
||||
var OnePageNav = function (elem, options) {
|
||||
this.elem = elem;
|
||||
this.$elem = $(elem);
|
||||
this.options = options;
|
||||
this.metadata = this.$elem.data('plugin-options');
|
||||
this.$win = $(window);
|
||||
this.sections = {};
|
||||
this.didScroll = false;
|
||||
this.$doc = $(document);
|
||||
this.docHeight = this.$doc.height();
|
||||
};
|
||||
|
||||
// the plugin prototype
|
||||
OnePageNav.prototype = {
|
||||
defaults: {
|
||||
navItems: 'a',
|
||||
currentClass: 'current',
|
||||
changeHash: false,
|
||||
easing: 'swing',
|
||||
filter: '',
|
||||
navHeight: 70,
|
||||
scrollSpeed: 750,
|
||||
scrollThreshold: 0.5,
|
||||
begin: false,
|
||||
end: false,
|
||||
scrollChange: false
|
||||
},
|
||||
|
||||
init: function () {
|
||||
// Introduce defaults that can be extended either
|
||||
// globally or using an object literal.
|
||||
this.config = $.extend({}, this.defaults, this.options, this.metadata);
|
||||
|
||||
this.$nav = this.$elem.find(this.config.navItems);
|
||||
|
||||
//Filter any links out of the nav
|
||||
if (this.config.filter !== '') {
|
||||
this.$nav = this.$nav.filter(this.config.filter);
|
||||
}
|
||||
|
||||
//Handle clicks on the nav
|
||||
this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
|
||||
|
||||
//Get the section positions
|
||||
this.getPositions();
|
||||
|
||||
//Handle scroll changes
|
||||
this.bindInterval();
|
||||
|
||||
//Update the positions on resize too
|
||||
this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
adjustNav: function (self, $parent) {
|
||||
self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
|
||||
$parent.addClass(self.config.currentClass);
|
||||
},
|
||||
|
||||
bindInterval: function () {
|
||||
var self = this;
|
||||
var docHeight;
|
||||
|
||||
self.$win.on('scroll.onePageNav', function () {
|
||||
self.didScroll = true;
|
||||
});
|
||||
|
||||
self.t = setInterval(function () {
|
||||
docHeight = self.$doc.height();
|
||||
|
||||
//If it was scrolled
|
||||
if (self.didScroll) {
|
||||
self.didScroll = false;
|
||||
self.scrollChange();
|
||||
}
|
||||
|
||||
//If the document height changes
|
||||
if (docHeight !== self.docHeight) {
|
||||
self.docHeight = docHeight;
|
||||
self.getPositions();
|
||||
}
|
||||
}, 250);
|
||||
},
|
||||
|
||||
getHash: function ($link) {
|
||||
return $link.attr('href').split('#')[1];
|
||||
},
|
||||
|
||||
getPositions: function () {
|
||||
var self = this;
|
||||
var linkHref;
|
||||
var topPos;
|
||||
var $target;
|
||||
|
||||
self.$nav.each(function () {
|
||||
linkHref = self.getHash($(this));
|
||||
$target = $('#' + linkHref);
|
||||
|
||||
if ($target.length) {
|
||||
topPos = $target.offset().top;
|
||||
|
||||
self.sections[linkHref] = Math.round(topPos);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getSection: function (windowPos) {
|
||||
var returnValue = null;
|
||||
var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
|
||||
|
||||
|
||||
for (var section in this.sections) {
|
||||
if ((this.sections[section] - windowHeight) < windowPos) {
|
||||
returnValue = section;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
},
|
||||
|
||||
handleClick: function (e) {
|
||||
var self = this;
|
||||
var $link = $(e.currentTarget);
|
||||
var $parent = $link.parent();
|
||||
var newLoc = '#' + self.getHash($link);
|
||||
|
||||
if (!$parent.hasClass(self.config.currentClass)) {
|
||||
//Start callback
|
||||
if (self.config.begin) {
|
||||
self.config.begin();
|
||||
}
|
||||
|
||||
//Change the highlighted nav item
|
||||
self.adjustNav(self, $parent);
|
||||
|
||||
//Removing the auto-adjust on scroll
|
||||
self.unbindInterval();
|
||||
|
||||
//Scroll to the correct position
|
||||
self.scrollTo(newLoc, function () {
|
||||
//Do we need to change the hash?
|
||||
if (self.config.changeHash) {
|
||||
window.location.hash = newLoc;
|
||||
}
|
||||
// $('#aboutUs').offset({'top':'60'});
|
||||
//Add the auto-adjust on scroll back in
|
||||
self.bindInterval();
|
||||
|
||||
//End callback
|
||||
if (self.config.end) {
|
||||
self.config.end();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
},
|
||||
|
||||
scrollChange: function () {
|
||||
var windowTop = this.$win.scrollTop();
|
||||
var position = this.getSection(windowTop);
|
||||
var $parent;
|
||||
|
||||
//If the position is set
|
||||
if (position !== null) {
|
||||
$parent = this.$elem.find('a[href$="#' + position + '"]').parent();
|
||||
|
||||
//If it's not already the current section
|
||||
if (!$parent.hasClass(this.config.currentClass)) {
|
||||
//Change the highlighted nav item
|
||||
this.adjustNav(this, $parent);
|
||||
|
||||
//If there is a scrollChange callback
|
||||
if (this.config.scrollChange) {
|
||||
this.config.scrollChange($parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
scrollTo: function (target, callback) {
|
||||
var offset = $(target).offset().top - this.config.navHeight;
|
||||
$('html, body').animate({
|
||||
scrollTop: offset
|
||||
}, this.config.scrollSpeed, this.config.easing, callback);
|
||||
},
|
||||
|
||||
unbindInterval: function () {
|
||||
clearInterval(this.t);
|
||||
this.$win.unbind('scroll.onePageNav');
|
||||
}
|
||||
};
|
||||
|
||||
OnePageNav.defaults = OnePageNav.prototype.defaults;
|
||||
|
||||
$.fn.onePageNav = function (options) {
|
||||
return this.each(function () {
|
||||
new OnePageNav(this, options).init();
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
||||
12
rocket-business-bootstrap-free-responsive-web-theme/js/respond-1.1.0.min.js
vendored
Normal file
12
rocket-business-bootstrap-free-responsive-web-theme/js/respond-1.1.0.min.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
|
||||
|
||||
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
|
||||
402
rocket-business-bootstrap-free-responsive-web-theme/js/wow.js
Normal file
402
rocket-business-bootstrap-free-responsive-web-theme/js/wow.js
Normal file
@@ -0,0 +1,402 @@
|
||||
(function() {
|
||||
var MutationObserver, Util, WeakMap,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
|
||||
Util = (function() {
|
||||
function Util() {}
|
||||
|
||||
Util.prototype.extend = function(custom, defaults) {
|
||||
var key, value;
|
||||
for (key in defaults) {
|
||||
value = defaults[key];
|
||||
if (custom[key] == null) {
|
||||
custom[key] = value;
|
||||
}
|
||||
}
|
||||
return custom;
|
||||
};
|
||||
|
||||
Util.prototype.isMobile = function(agent) {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent);
|
||||
};
|
||||
|
||||
return Util;
|
||||
|
||||
})();
|
||||
|
||||
WeakMap = this.WeakMap || this.MozWeakMap || (WeakMap = (function() {
|
||||
function WeakMap() {
|
||||
this.keys = [];
|
||||
this.values = [];
|
||||
}
|
||||
|
||||
WeakMap.prototype.get = function(key) {
|
||||
var i, item, _i, _len, _ref;
|
||||
_ref = this.keys;
|
||||
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
||||
item = _ref[i];
|
||||
if (item === key) {
|
||||
return this.values[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
WeakMap.prototype.set = function(key, value) {
|
||||
var i, item, _i, _len, _ref;
|
||||
_ref = this.keys;
|
||||
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
||||
item = _ref[i];
|
||||
if (item === key) {
|
||||
this.values[i] = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.keys.push(key);
|
||||
return this.values.push(value);
|
||||
};
|
||||
|
||||
return WeakMap;
|
||||
|
||||
})());
|
||||
|
||||
MutationObserver = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (MutationObserver = (function() {
|
||||
function MutationObserver() {
|
||||
console.warn('MutationObserver is not supported by your browser.');
|
||||
console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.');
|
||||
}
|
||||
|
||||
MutationObserver.notSupported = true;
|
||||
|
||||
MutationObserver.prototype.observe = function() {};
|
||||
|
||||
return MutationObserver;
|
||||
|
||||
})());
|
||||
|
||||
this.WOW = (function() {
|
||||
WOW.prototype.defaults = {
|
||||
boxClass: 'wow',
|
||||
animateClass: 'animated',
|
||||
offset: 0,
|
||||
mobile: true,
|
||||
live: true
|
||||
};
|
||||
|
||||
function WOW(options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
this.scrollCallback = __bind(this.scrollCallback, this);
|
||||
this.scrollHandler = __bind(this.scrollHandler, this);
|
||||
this.start = __bind(this.start, this);
|
||||
this.scrolled = true;
|
||||
this.config = this.util().extend(options, this.defaults);
|
||||
this.animationNameCache = new WeakMap();
|
||||
}
|
||||
|
||||
WOW.prototype.init = function() {
|
||||
var _ref;
|
||||
this.element = window.document.documentElement;
|
||||
if ((_ref = document.readyState) === "interactive" || _ref === "complete") {
|
||||
this.start();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', this.start);
|
||||
}
|
||||
return this.finished = [];
|
||||
};
|
||||
|
||||
WOW.prototype.start = function() {
|
||||
var box, _i, _len, _ref;
|
||||
this.stopped = false;
|
||||
this.boxes = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = this.element.getElementsByClassName(this.config.boxClass);
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
_results.push(box);
|
||||
}
|
||||
return _results;
|
||||
}).call(this);
|
||||
this.all = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = this.boxes;
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
_results.push(box);
|
||||
}
|
||||
return _results;
|
||||
}).call(this);
|
||||
if (this.boxes.length) {
|
||||
if (this.disabled()) {
|
||||
this.resetStyle();
|
||||
} else {
|
||||
_ref = this.boxes;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
this.applyStyle(box, true);
|
||||
}
|
||||
window.addEventListener('scroll', this.scrollHandler, false);
|
||||
window.addEventListener('resize', this.scrollHandler, false);
|
||||
this.interval = setInterval(this.scrollCallback, 50);
|
||||
}
|
||||
}
|
||||
if (this.config.live) {
|
||||
return new MutationObserver((function(_this) {
|
||||
return function(records) {
|
||||
var node, record, _j, _len1, _results;
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = records.length; _j < _len1; _j++) {
|
||||
record = records[_j];
|
||||
_results.push((function() {
|
||||
var _k, _len2, _ref1, _results1;
|
||||
_ref1 = record.addedNodes || [];
|
||||
_results1 = [];
|
||||
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
|
||||
node = _ref1[_k];
|
||||
_results1.push(this.doSync(node));
|
||||
}
|
||||
return _results1;
|
||||
}).call(_this));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
})(this)).observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.stop = function() {
|
||||
this.stopped = true;
|
||||
window.removeEventListener('scroll', this.scrollHandler, false);
|
||||
window.removeEventListener('resize', this.scrollHandler, false);
|
||||
if (this.interval != null) {
|
||||
return clearInterval(this.interval);
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.sync = function(element) {
|
||||
if (MutationObserver.notSupported) {
|
||||
return this.doSync(this.element);
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.doSync = function(element) {
|
||||
var box, _i, _len, _ref, _results;
|
||||
if (!this.stopped) {
|
||||
if (element == null) {
|
||||
element = this.element;
|
||||
}
|
||||
if (element.nodeType !== 1) {
|
||||
return;
|
||||
}
|
||||
element = element.parentNode || element;
|
||||
_ref = element.getElementsByClassName(this.config.boxClass);
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
if (__indexOf.call(this.all, box) < 0) {
|
||||
this.applyStyle(box, true);
|
||||
this.boxes.push(box);
|
||||
this.all.push(box);
|
||||
_results.push(this.scrolled = true);
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.show = function(box) {
|
||||
this.applyStyle(box);
|
||||
return box.className = "" + box.className + " " + this.config.animateClass;
|
||||
};
|
||||
|
||||
WOW.prototype.applyStyle = function(box, hidden) {
|
||||
var delay, duration, iteration;
|
||||
duration = box.getAttribute('data-wow-duration');
|
||||
delay = box.getAttribute('data-wow-delay');
|
||||
iteration = box.getAttribute('data-wow-iteration');
|
||||
return this.animate((function(_this) {
|
||||
return function() {
|
||||
return _this.customStyle(box, hidden, duration, delay, iteration);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
WOW.prototype.animate = (function() {
|
||||
if ('requestAnimationFrame' in window) {
|
||||
return function(callback) {
|
||||
return window.requestAnimationFrame(callback);
|
||||
};
|
||||
} else {
|
||||
return function(callback) {
|
||||
return callback();
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
WOW.prototype.resetStyle = function() {
|
||||
var box, _i, _len, _ref, _results;
|
||||
_ref = this.boxes;
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
_results.push(box.setAttribute('style', 'visibility: visible;'));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
WOW.prototype.customStyle = function(box, hidden, duration, delay, iteration) {
|
||||
if (hidden) {
|
||||
this.cacheAnimationName(box);
|
||||
}
|
||||
box.style.visibility = hidden ? 'hidden' : 'visible';
|
||||
if (duration) {
|
||||
this.vendorSet(box.style, {
|
||||
animationDuration: duration
|
||||
});
|
||||
}
|
||||
if (delay) {
|
||||
this.vendorSet(box.style, {
|
||||
animationDelay: delay
|
||||
});
|
||||
}
|
||||
if (iteration) {
|
||||
this.vendorSet(box.style, {
|
||||
animationIterationCount: iteration
|
||||
});
|
||||
}
|
||||
this.vendorSet(box.style, {
|
||||
animationName: hidden ? 'none' : this.cachedAnimationName(box)
|
||||
});
|
||||
return box;
|
||||
};
|
||||
|
||||
WOW.prototype.vendors = ["moz", "webkit"];
|
||||
|
||||
WOW.prototype.vendorSet = function(elem, properties) {
|
||||
var name, value, vendor, _results;
|
||||
_results = [];
|
||||
for (name in properties) {
|
||||
value = properties[name];
|
||||
elem["" + name] = value;
|
||||
_results.push((function() {
|
||||
var _i, _len, _ref, _results1;
|
||||
_ref = this.vendors;
|
||||
_results1 = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
vendor = _ref[_i];
|
||||
_results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))] = value);
|
||||
}
|
||||
return _results1;
|
||||
}).call(this));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
WOW.prototype.vendorCSS = function(elem, property) {
|
||||
var result, style, vendor, _i, _len, _ref;
|
||||
style = window.getComputedStyle(elem);
|
||||
result = style.getPropertyCSSValue(property);
|
||||
_ref = this.vendors;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
vendor = _ref[_i];
|
||||
result = result || style.getPropertyCSSValue("-" + vendor + "-" + property);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
WOW.prototype.animationName = function(box) {
|
||||
var animationName;
|
||||
try {
|
||||
animationName = this.vendorCSS(box, 'animation-name').cssText;
|
||||
} catch (_error) {
|
||||
animationName = window.getComputedStyle(box).getPropertyValue('animation-name');
|
||||
}
|
||||
if (animationName === 'none') {
|
||||
return '';
|
||||
} else {
|
||||
return animationName;
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.cacheAnimationName = function(box) {
|
||||
return this.animationNameCache.set(box, this.animationName(box));
|
||||
};
|
||||
|
||||
WOW.prototype.cachedAnimationName = function(box) {
|
||||
return this.animationNameCache.get(box);
|
||||
};
|
||||
|
||||
WOW.prototype.scrollHandler = function() {
|
||||
return this.scrolled = true;
|
||||
};
|
||||
|
||||
WOW.prototype.scrollCallback = function() {
|
||||
var box;
|
||||
if (this.scrolled) {
|
||||
this.scrolled = false;
|
||||
this.boxes = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = this.boxes;
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
box = _ref[_i];
|
||||
if (!(box)) {
|
||||
continue;
|
||||
}
|
||||
if (this.isVisible(box)) {
|
||||
this.show(box);
|
||||
continue;
|
||||
}
|
||||
_results.push(box);
|
||||
}
|
||||
return _results;
|
||||
}).call(this);
|
||||
if (!(this.boxes.length || this.config.live)) {
|
||||
return this.stop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
WOW.prototype.offsetTop = function(element) {
|
||||
var top;
|
||||
while (element.offsetTop === void 0) {
|
||||
element = element.parentNode;
|
||||
}
|
||||
top = element.offsetTop;
|
||||
while (element = element.offsetParent) {
|
||||
top += element.offsetTop;
|
||||
}
|
||||
return top;
|
||||
};
|
||||
|
||||
WOW.prototype.isVisible = function(box) {
|
||||
var bottom, offset, top, viewBottom, viewTop;
|
||||
offset = box.getAttribute('data-wow-offset') || this.config.offset;
|
||||
viewTop = window.pageYOffset;
|
||||
viewBottom = viewTop + Math.min(this.element.clientHeight, innerHeight) - offset;
|
||||
top = this.offsetTop(box);
|
||||
bottom = top + box.clientHeight;
|
||||
return top <= viewBottom && bottom >= viewTop;
|
||||
};
|
||||
|
||||
WOW.prototype.util = function() {
|
||||
return this._util != null ? this._util : this._util = new Util();
|
||||
};
|
||||
|
||||
WOW.prototype.disabled = function() {
|
||||
return !this.config.mobile && this.util().isMobile(navigator.userAgent);
|
||||
};
|
||||
|
||||
return WOW;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
Reference in New Issue
Block a user