- Completada sección "Carta" y "Pizzas". - La sección "Restaurante" es ahora la página de inicio. git-svn-id: https://192.168.0.254/svn/Proyectos.LaManoDePablo_Web/trunk@8 1f125104-cfba-1d4b-a82f-f72e3caf8177
83 lines
2.3 KiB
JavaScript
83 lines
2.3 KiB
JavaScript
(function ($, F) {
|
|
|
|
// Opening animation - fly from the top
|
|
F.transitions.dropIn = function() {
|
|
var endPos = F._getPosition(true);
|
|
|
|
endPos.top = (parseInt(endPos.top, 10) - 200) + 'px';
|
|
endPos.opacity = 0;
|
|
|
|
F.wrap.css(endPos).show().animate({
|
|
top: '+=200px',
|
|
opacity: 1
|
|
}, {
|
|
duration: F.current.openSpeed,
|
|
complete: F._afterZoomIn
|
|
});
|
|
};
|
|
|
|
// Closing animation - fly to the top
|
|
F.transitions.dropOut = function() {
|
|
F.wrap.removeClass('fancybox-opened').animate({
|
|
top: '-=200px',
|
|
opacity: 0
|
|
}, {
|
|
duration: F.current.closeSpeed,
|
|
complete: F._afterZoomOut
|
|
});
|
|
};
|
|
|
|
// Next gallery item - fly from left side to the center
|
|
F.transitions.slideIn = function() {
|
|
var endPos = F._getPosition(true);
|
|
|
|
endPos.left = (parseInt(endPos.left, 10) - 200) + 'px';
|
|
endPos.opacity = 0;
|
|
|
|
F.wrap.css(endPos).show().animate({
|
|
left: '+=200px',
|
|
opacity: 1
|
|
}, {
|
|
duration: F.current.nextSpeed,
|
|
complete: F._afterZoomIn
|
|
});
|
|
};
|
|
|
|
// Current gallery item - fly from center to the right
|
|
F.transitions.slideOut = function() {
|
|
F.wrap.removeClass('fancybox-opened').animate({
|
|
left: '+=200px',
|
|
opacity: 0
|
|
}, {
|
|
duration: F.current.prevSpeed,
|
|
complete: function () {
|
|
$(this).trigger('onReset').remove();
|
|
}
|
|
});
|
|
};
|
|
|
|
}(jQuery, jQuery.fancybox));
|
|
|
|
$(".fancybox")
|
|
.attr('rel', 'gallery')
|
|
.fancybox({
|
|
fitToView : true,
|
|
autoPlay : true,
|
|
tpl : {
|
|
closeBtn: '<div title="Cerrar" class="fancybox-item fancybox-close"></div>',
|
|
next: '<a title="Siguiente" class="fancybox-nav fancybox-next"><span></span></a>',
|
|
prev: '<a title="Anterior" class="fancybox-nav fancybox-prev"><span></span></a>'
|
|
},
|
|
|
|
openMethod : 'dropIn',
|
|
openSpeed : 250,
|
|
|
|
closeMethod : 'dropOut',
|
|
closeSpeed : 150,
|
|
|
|
nextMethod : 'slideIn',
|
|
nextSpeed : 250,
|
|
|
|
prevMethod : 'slideOut',
|
|
prevSpeed : 250
|
|
}); |