Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('ul.gallery_demo').galleria({
- history: false,
- clickNext: false,
- insert: '#main_image',
- onImage: function (image, caption, thumb) {
- image.css('display', 'none').fadeIn(300);
- caption.css('display', 'none');
- var _li = thumb.parents('li');
- _li.siblings().children('img.selected').stop(true, true).fadeTo(500, 0.2);
- thumb.fadeTo('fast', 1).addClass('selected');
- $("a#prev, a#next").css("height", "655px");
- var math = parseInt(image.width()) + ((1017 - parseInt(image.width())) / 2);
- $("#btn-holder").css("margin-left", math + "px");
- $("#info-box").css("margin-left", (math - 152) + "px").hide();
- },
- onThumb: function (thumb) {
- var _li = thumb.parent();
- var _fadeTo = _li.hasClass('.active') ? '1' : '0.2';
- thumb.fadeTo(1000, _fadeTo);
- thumb.hover(function () {
- thumb.fadeTo('fast', 1);
- }, function () {
- _li.not('.active').children('img').stop(true, true).fadeTo('fast', 0.2);
- })
- }
- });
- $("ul.thumbs li:first").addClass('active');
- $("a#prev, a#next").fadeTo(1, 0.2);
- $("a#prev, a#next").hover(function () {
- $(this).stop(true, true).fadeTo(500, 1);
- }, function () {
- $(this).fadeTo("fast", 0.2);
- });
Add Comment
Please, Sign In to add comment