$(document).ready(function () { $('.tooltipById').each(function () { tooltip_id = '#'+$(this).attr('id')+"_tooltip"; $(this).tooltip({effect: 'slide', tip: tooltip_id, position: 'center right', offset: [0, -5], direction: 'right'}); }); if($('.scroll-pane').length > 0) { if($('.scroll-pane').parent().hasClass('vertical-scrollable-photos-container')) { $('.scroll-pane').jScrollPane({showArrows:true, scrollbarMargin: 15}); } else { $('.scroll-pane').jScrollHorizontalPane({showArrows: true,dragMaxWidth: 90, arrowSize: 11, scrollbarHeight: 11, scrollbarMargin: 11}); } $(document).oneTime(10, function () { $('.scroll-pane')[0].scrollTo('.scroll-pane .current'); }); } }); function gallery_scroll_to_current_image(){ scroll_to = null; if($('.scroll-pane').find('.current').length > 0) { scroll_to = $('.scroll-pane').find('.current').position(); } $('.scroll-pane')[0].scrollTo(); } function show_full_photo(thumb_obj, url, name, notes) { full_obj = $('#gallery-full-image'); orig_src = full_obj.attr('src'); preloader = $('.preloader') if(preloader.length <= 0) { preloader = $('
').appendTo('BODY').css('visibility', 'hidden'); } $('').attr('src', url).appendTo(preloader); if(orig_src == url) { return true; } $(full_obj).fadeOut('slow', function() { $(thumb_obj).parent().find('.current').each( function() { $(this).removeClass('current'); }); $(thumb_obj).addClass('current'); //gallery_scroll_to_current_image(); $(this).attr('src', url); $('.full-image-container .image-name').html(name); $('.full-image-container .image-notes').html(notes); $(this).fadeIn('slow'); }); return true; }