AAAAindex.html000066600000000000151373073260006542 0ustar00index.php000066600000005135151373073260006403 0ustar00loadCSS($AG->currTemplateRoot.'galleryview.css'); $AG->loadCSS($AG->currTemplateRoot.'albums/albums.css'); $AG->loadCSS($AG->currTemplateRoot.'pagination/pagination.css'); $AG->loadJS($AG->currTemplateRoot.'jquery.timers-1.2.js'); $AG->loadJS($AG->currTemplateRoot.'jquery.easing.1.3.js'); $AG->loadJS($AG->currTemplateRoot.'jquery.galleryview-2.1.1.js'); $AG->insertJSCode(' AG_jQuery(document).ready(function(){ AG_jQuery("#AG_'.$AG->getGalleryID().' #photos").galleryView({ panel_width: '.$AG->params['frameWidth'].', panel_height: '.$AG->params['frameHeight'].', frame_width: '.$AG->params['thumbWidth'].', frame_height: '.$AG->params['thumbHeight'].', nav_theme: "light", pause_on_hover: true }); AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos").css({backgroundColor:"black"}); AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos .panel-content img").css({width:"'.$AG->params['frameWidth'].'px",height:"'.$AG->params['frameHeight'].'px"}); }); '); // Form HTML code, with unique ID and Class Name $html='
'; // Support for Pagination $html.= $AG->writePagination(); // Support for Albums if(!empty($AG->folders) && $AG->params['albumUse']){ $html.= '

'.JText::_( 'Albums' ).'

'."\n"; $html.= $AG->writeFolderThumb("albums/album.png",$AG->params['thumbHeight']); } ?> jquery.timers-1.2.js000066600000006507151373073260010244 0ustar00/** * AG_jQuery.timers - Timer abstractions for AG_jQuery * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). * Date: 2009/10/16 * * @author Blair Mitchelmore * @version 1.2 * **/ AG_jQuery.fn.extend({ everyTime: function(interval, label, fn, times) { return this.each(function() { AG_jQuery.timer.add(this, interval, label, fn, times); }); }, oneTime: function(interval, label, fn) { return this.each(function() { AG_jQuery.timer.add(this, interval, label, fn, 1); }); }, stopTime: function(label, fn) { return this.each(function() { AG_jQuery.timer.remove(this, label, fn); }); } }); AG_jQuery.extend({ timer: { global: [], guid: 1, dataKey: "AG_jQuery.timer", regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/, powers: { // Yeah this is major overkill... 'ms': 1, 'cs': 10, 'ds': 100, 's': 1000, 'das': 10000, 'hs': 100000, 'ks': 1000000 }, timeParse: function(value) { if (value == undefined || value == null) return null; var result = this.regex.exec(AG_jQuery.trim(value.toString())); if (result[2]) { var num = parseFloat(result[1]); var mult = this.powers[result[2]] || 1; return num * mult; } else { return value; } }, add: function(element, interval, label, fn, times) { var counter = 0; if (AG_jQuery.isFunction(label)) { if (!times) times = fn; fn = label; label = interval; } interval = AG_jQuery.timer.timeParse(interval); if (typeof interval != 'number' || isNaN(interval) || interval < 0) return; if (typeof times != 'number' || isNaN(times) || times < 0) times = 0; times = times || 0; var timers = AG_jQuery.data(element, this.dataKey) || AG_jQuery.data(element, this.dataKey, {}); if (!timers[label]) timers[label] = {}; fn.timerID = fn.timerID || this.guid++; var handler = function() { if ((++counter > times && times !== 0) || fn.call(element, counter) === false) AG_jQuery.timer.remove(element, label, fn); }; handler.timerID = fn.timerID; if (!timers[label][fn.timerID]) timers[label][fn.timerID] = window.setInterval(handler,interval); this.global.push( element ); }, remove: function(element, label, fn) { var timers = AG_jQuery.data(element, this.dataKey), ret; if ( timers ) { if (!label) { for ( label in timers ) this.remove(element, label, fn); } else if ( timers[label] ) { if ( fn ) { if ( fn.timerID ) { window.clearInterval(timers[label][fn.timerID]); delete timers[label][fn.timerID]; } } else { for ( var fn in timers[label] ) { window.clearInterval(timers[label][fn]); delete timers[label][fn]; } } for ( ret in timers[label] ) break; if ( !ret ) { ret = null; delete timers[label]; } } for ( ret in timers ) break; if ( !ret ) AG_jQuery.removeData(element, this.dataKey); } } } }); AG_jQuery(window).bind("unload", function() { AG_jQuery.each(AG_jQuery.timer.global, function(index, item) { AG_jQuery.timer.remove(item); }); }); jquery.easing.1.3.js000066600000020230151373073260010176 0ustar00/* * AG_jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/AG_jQuery/easing/ * * Uses the built in easing capabilities added In AG_jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - AG_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 AG_jQuery.easing['jswing'] = AG_jQuery.easing['swing']; AG_jQuery.extend( AG_jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(AG_jQuery.easing.default); return AG_jQuery.easing[AG_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 - AG_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 AG_jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return AG_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. * */ galleryview.css000066600000004671151373073260007633 0ustar00/* GalleryView Stylesheet Use the CSS rules below to modify the look of your gallery. To create additional rules, use the markup below as a guide to GalleryView's architecture. NOTE - The markup below represents the DOM generated by the GalleryView plugin, NOT the markup you would include in your HTML file. Refer to README.txt to review markup requirements. */ /* GALLERY LIST */ /* IMPORTANT - Change '#photos' to the ID of your gallery list to prevent a flash of unstyled content */ #photos { visibility: hidden; } /* GALLERY CONTAINER */ .gallery { background: #ddd; border: 1px solid #aaa; padding: 5px;} /* LOADING BOX */ .loader { background: url(loader.gif) center center no-repeat #ddd; } /* GALLERY PANELS */ .panel {} /* DEFINE HEIGHT OF PANEL OVERLAY */ /* NOTE - It is best to define padding here as well so overlay and background retain identical dimensions */ .panel .panel-overlay, .panel .overlay-background { height: 40px; padding: 4px 10px; } /* PANEL OVERLAY BACKGROUND */ .panel .overlay-background { background: #222; } /* PANEL OVERLAY CONTENT */ .panel .panel-overlay { color: white; font-size: 10px; } .panel .panel-overlay a { color: white; text-decoration: underline; font-weight: bold; } /* FILMSTRIP */ /* 'margin' will define top/bottom margin in completed gallery */ .filmstrip { margin: 5px; } /* FILMSTRIP FRAMES (contains both images and captions) */ .frame {} /* WRAPPER FOR FILMSTRIP IMAGES */ .frame .img_wrap { border: 3px solid #000; } /* WRAPPER FOR CURRENT FILMSTRIP IMAGE */ .frame.current .img_wrap { border-color: white; } /* FRAME IMAGES */ .frame img { border: none; } /* FRAME CAPTION */ .frame .caption { font-size: 11px; text-align: center; color: #888; } /* CURRENT FRAME CAPTION */ .frame.current .caption { color: #000; } /* POINTER FOR CURRENT FRAME */ .pointer { border-color: #000; color:#fff; } /* TRANSPARENT BORDER FIX FOR IE6 */ /* NOTE - DO NOT CHANGE THIS RULE */ *html .pointer { filter: chroma(color=pink); }pagination/index.html000066600000000000151373073260010673 0ustar00pagination/pagination.css000066600000000742151373073260011556 0ustar00div.AG_pagin_wrap { margin-bottom:20px; text-align:center; display:block; } span.AG_pagin_current, a.AG_pagin_link, a.AG_pagin_prev, a.AG_pagin_next { display:inline-block; line-height:24px; margin:4px; padding:0 5px; float:left; text-decoration:none; } a.AG_pagin_link, a.AG_pagin_prev, a.AG_pagin_next { border:1px solid silver; margin:3px; } a.AG_pagin_link, a.AG_pagin_link:hover, a.AG_pagin_prev:hover, a.AG_pagin_next:hover { text-decoration:none; }pagination/.htaccess000066600000000177151373073260010513 0ustar00 Order allow,deny Deny from all themes/dark/.htaccess000066600000000177151373073260010570 0ustar00 Order allow,deny Deny from all themes/dark/prev.gif000066600000000120151373073260010421 0ustar00GIF89a!,'>81n \;Fk0[#;themes/dark/panel-nav-next.gif000066600000000122151373073260012304 0ustar00GIF89a**!,**)ڋ޼H扦ʶ L~^;themes/dark/index.html000066600000000000151373073260010750 0ustar00themes/dark/panel-nav-prev.gif000066600000000122151373073260012302 0ustar00GIF89a**!,**)ڋ޼H扦ʶ L~^;themes/dark/next.gif000066600000000117151373073260010431 0ustar00GIF89a!,&&xu1Hy6j;themes/.htaccess000066600000000177151373073260007647 0ustar00 Order allow,deny Deny from all themes/light/index.html000066600000000000151373073260011136 0ustar00themes/light/prev.gif000066600000000120151373073260010607 0ustar00GIF89a!,'>81n \;Fk0[#;themes/light/panel-nav-next.gif000066600000000122151373073260012472 0ustar00GIF89a**!,**)ڋ޼H扦ʶ L~^;themes/light/next.gif000066600000000117151373073260010617 0ustar00GIF89a!,&&xu1Hy6j;themes/light/.htaccess000066600000000177151373073260010756 0ustar00 Order allow,deny Deny from all themes/light/panel-nav-prev.gif000066600000000122151373073260012470 0ustar00GIF89a**!,**)ڋ޼H扦ʶ L~^;themes/index.html000066600000000000151373073260010027 0ustar00albums/albums.css000066600000001422151373073260010036 0ustar00div.AG_album_wrap { display:block; margin-bottom:20px; padding-bottom:5px; } div.AG_album_wrap a { text-decoration:none; } a.AG_album_thumb { display:block; float:left; margin:0 10px 10px; padding:4px; border:1px solid silver; } span.AG_album_thumb_img { display:block; } span.AG_album_thumb_label { display:block; text-align:center; text-decoration:none; font-size:10px; line-height:16px; } a.AG_album_parent { display:block; width:24px; } a.AG_album_parent span { display:block; width:24px; line-height:24px; width:100%; text-align:left; padding-left:20px; background-image:url("back.png"); background-repeat:no-repeat; white-space:nowrap; } albums/index.html000066600000000000151373073260010025 0ustar00albums/.htaccess000066600000000177151373073260007645 0ustar00 Order allow,deny Deny from all albums/back.png000066600000001041151373073260007444 0ustar00PNG  IHDRw=sRGBbKGD pHYs  tIME &GIDATH픱KBQ*j|"BZZZ]nH4o(7B3-ګDKt˽߹߹߁{}f+O@V$(\FJ^Wb摪E?x<>+J#&gbgTU-q(>~)u=iZat]Y N5 _f])uuC ض}5Ϧe\,\G?p8fd29_  ~߫-0 y1jL&J~nkU`v}mc8^Fqe4s4@YHz) [Wa'>Q X xIZ\[h%$IENDB`details.xml000066600000000776151373073260006740 0ustar00
Gallery View Oct, 18th 2010. Vasiljevski & Kekeljevic 4.0 template Gallery which displays big image and thumb images (as filmstrip) at the same time. For more information visit <a href="http://www.vasiljevski.com/forum/viewtopic.php?f=35&t=642" target="_blank">Gallery View Template Forum Topic</a>.
jquery.galleryview-2.1.1.js000066600000121160151373073260011423 0ustar00/* ** ** GalleryView - jQuery Content Gallery Plugin ** Author: Jack Anderson ** Version: 2.1 (March 14, 2010) ** ** Please use this development script if you intend to make changes to the ** plugin code. For production sites, please use jquery.galleryview-2.1-pack.js. ** ** See README.txt for instructions on how to markup your HTML ** ** See CHANGELOG.txt for a review of changes and LICENSE.txt for the applicable ** licensing information. ** */ //Global variable to check if window is already loaded //Used for calling GalleryView after page has loaded var window_loaded = false; (function($){ $.fn.galleryView = function(options) { var opts = $.extend($.fn.galleryView.defaults,options); var id; var iterator = 0; // INT - Currently visible panel/frame var item_count = 0; // INT - Total number of panels/frames var slide_method; // STRING - indicator to slide entire filmstrip or just the pointer ('strip','pointer') var theme_path; // STRING - relative path to theme directory var paused = false; // BOOLEAN - flag to indicate whether automated transitions are active // Element dimensions var gallery_width; var gallery_height; var pointer_height; var pointer_width; var strip_width; var strip_height; var wrapper_width; var f_frame_width; var f_frame_height; var frame_caption_size = 20; var gallery_padding; var filmstrip_margin; var filmstrip_orientation; // Arrays used to scale frames and panels var frame_img_scale = {}; var panel_img_scale = {}; var img_h = {}; var img_w = {}; // Flag indicating whether to scale panel images var scale_panel_images = true; var panel_nav_displayed = false; // Define jQuery objects for reuse var j_gallery; var j_filmstrip; var j_frames; var j_frame_img_wrappers; var j_panels; var j_pointer; /* ** Plugin Functions */ /* ** showItem(int) ** Transition from current frame to frame i (1-based index) */ function showItem(i) { // Disable next/prev buttons until transition is complete // This prevents overlapping of animations $('.nav-next-overlay',j_gallery).unbind('click'); $('.nav-prev-overlay',j_gallery).unbind('click'); $('.nav-next',j_gallery).unbind('click'); $('.nav-prev',j_gallery).unbind('click'); j_frames.unbind('click'); if(opts.show_filmstrip) { // Fade out all frames j_frames.removeClass('current').find('img').stop().animate({ 'opacity':opts.frame_opacity },opts.transition_speed); // Fade in target frame j_frames.eq(i).addClass('current').find('img').stop().animate({ 'opacity':1.0 },opts.transition_speed); } //If necessary, fade out all panels while fading in target panel if(opts.show_panels && opts.fade_panels) { j_panels.fadeOut(opts.transition_speed).eq(i%item_count).fadeIn(opts.transition_speed,function(){ //If no filmstrip exists, re-bind click events to navigation buttons if(!opts.show_filmstrip) { $('.nav-prev-overlay',j_gallery).click(showPrevItem); $('.nav-next-overlay',j_gallery).click(showNextItem); $('.nav-prev',j_gallery).click(showPrevItem); $('.nav-next',j_gallery).click(showNextItem); } }); } // If gallery has a filmstrip, handle animation of frames if(opts.show_filmstrip) { // Slide either pointer or filmstrip, depending on transition method if(slide_method=='strip') { // Stop filmstrip if it's currently in motion j_filmstrip.stop(); var distance; var diststr; if(filmstrip_orientation=='horizontal') { // Determine distance between pointer (eventual destination) and target frame distance = getPos(j_frames[i]).left - (getPos(j_pointer[0]).left+(pointer_width/2)-(f_frame_width/2)); diststr = (distance>=0?'-=':'+=')+Math.abs(distance)+'px'; // Animate filmstrip and slide target frame under pointer j_filmstrip.animate({ 'left':diststr },opts.transition_speed,opts.easing,function(){ var old_i = i; // After transition is complete, shift filmstrip so that a sufficient number of frames // remain on either side of the visible filmstrip if(i>item_count) { i = i%item_count; iterator = i; j_filmstrip.css('left','-'+((f_frame_width+opts.frame_gap)*i)+'px'); } else if (i<=(item_count-strip_size)) { i = (i%item_count)+item_count; iterator = i; j_filmstrip.css('left','-'+((f_frame_width+opts.frame_gap)*i)+'px'); } // If the target frame has changed due to filmstrip shifting, // make sure new target frame has 'current' class and correct size/opacity settings if(old_i != i) { j_frames.eq(old_i).removeClass('current').find('img').css({ 'opacity':opts.frame_opacity }); j_frames.eq(i).addClass('current').find('img').css({ 'opacity':1.0 }); } // If panels are not set to fade in/out, simply hide all panels and show the target panel if(!opts.fade_panels) { j_panels.hide().eq(i%item_count).show(); } // Once animation is complete, re-bind click events to navigation buttons $('.nav-prev-overlay',j_gallery).click(showPrevItem); $('.nav-next-overlay',j_gallery).click(showNextItem); $('.nav-prev',j_gallery).click(showPrevItem); $('.nav-next',j_gallery).click(showNextItem); enableFrameClicking(); }); } else { // filmstrip_orientation == 'vertical' //Determine distance between pointer (eventual destination) and target frame distance = getPos(j_frames[i]).top - (getPos(j_pointer[0]).top+(pointer_height)-(f_frame_height/2)); diststr = (distance>=0?'-=':'+=')+Math.abs(distance)+'px'; // Animate filmstrip and slide target frame under pointer j_filmstrip.animate({ 'top':diststr },opts.transition_speed,opts.easing,function(){ // After transition is complete, shift filmstrip so that a sufficient number of frames // remain on either side of the visible filmstrip var old_i = i; if(i>item_count) { i = i%item_count; iterator = i; j_filmstrip.css('top','-'+((f_frame_height+opts.frame_gap)*i)+'px'); } else if (i<=(item_count-strip_size)) { i = (i%item_count)+item_count; iterator = i; j_filmstrip.css('top','-'+((f_frame_height+opts.frame_gap)*i)+'px'); } //If the target frame has changed due to filmstrip shifting, //Make sure new target frame has 'current' class and correct size/opacity settings if(old_i != i) { j_frames.eq(old_i).removeClass('current').find('img').css({ 'opacity':opts.frame_opacity }); j_frames.eq(i).addClass('current').find('img').css({ 'opacity':1.0 }); } // If panels are not set to fade in/out, simply hide all panels and show the target panel if(!opts.fade_panels) { j_panels.hide().eq(i%item_count).show(); } // Once animation is complete, re-bind click events to navigation buttons $('.nav-prev-overlay',j_gallery).click(showPrevItem); $('.nav-next-overlay',j_gallery).click(showNextItem); $('.nav-prev',j_gallery).click(showPrevItem); $('.nav-next',j_gallery).click(showNextItem); enableFrameClicking(); }); } } else if(slide_method=='pointer') { // Stop pointer if it's currently in motion j_pointer.stop(); // Get screen position of target frame var pos = getPos(j_frames[i]); if(filmstrip_orientation=='horizontal') { // Slide the pointer over the target frame j_pointer.animate({ 'left':(pos.left+(f_frame_width/2)-(pointer_width/2)+'px') },opts.transition_speed,opts.easing,function(){ if(!opts.fade_panels) { j_panels.hide().eq(i%item_count).show(); } $('.nav-prev-overlay',j_gallery).click(showPrevItem); $('.nav-next-overlay',j_gallery).click(showNextItem); $('.nav-prev',j_gallery).click(showPrevItem); $('.nav-next',j_gallery).click(showNextItem); enableFrameClicking(); }); } else { // Slide the pointer over the target frame j_pointer.animate({ 'top':(pos.top+(f_frame_height/2)-(pointer_height)+'px') },opts.transition_speed,opts.easing,function(){ if(!opts.fade_panels) { j_panels.hide().eq(i%item_count).show(); } $('.nav-prev-overlay',j_gallery).click(showPrevItem); $('.nav-next-overlay',j_gallery).click(showNextItem); $('.nav-prev',j_gallery).click(showPrevItem); $('.nav-next',j_gallery).click(showNextItem); enableFrameClicking(); }); } } } }; /* ** extraWidth(jQuery element) ** Return the combined width of the border and padding to the elements left and right. ** If the border is non-numerical, assume zero (not ideal, will fix later) ** RETURNS - int */ function extraWidth(el) { if(!el) { return 0; } if(el.length==0) { return 0; } el = el.eq(0); var ew = 0; ew += getInt(el.css('paddingLeft')); ew += getInt(el.css('paddingRight')); ew += getInt(el.css('borderLeftWidth')); ew += getInt(el.css('borderRightWidth')); return ew; }; /* ** extraHeight(jQuery element) ** Return the combined height of the border and padding above and below the element ** If the border is non-numerical, assume zero (not ideal, will fix later) ** RETURN - int */ function extraHeight(el) { if(!el) { return 0; } if(el.length==0) { return 0; } el = el.eq(0); var eh = 0; eh += getInt(el.css('paddingTop')); eh += getInt(el.css('paddingBottom')); eh += getInt(el.css('borderTopWidth')); eh += getInt(el.css('borderBottomWidth')); return eh; }; /* ** showNextItem() ** Transition from current frame to next frame */ function showNextItem() { // Cancel any transition timers until we have completed this function $(document).stopTime("transition"); if(++iterator==j_frames.length) {iterator=0;} // We've already written the code to transition to an arbitrary panel/frame, so use it showItem(iterator); // If automated transitions haven't been cancelled by an option or paused on hover, re-enable them if(!paused) { $(document).everyTime(opts.transition_interval,"transition",function(){ showNextItem(); }); } }; /* ** showPrevItem() ** Transition from current frame to previous frame */ function showPrevItem() { // Cancel any transition timers until we have completed this function $(document).stopTime("transition"); if(--iterator<0) {iterator = item_count-1;} // We've already written the code to transition to an arbitrary panel/frame, so use it showItem(iterator); // If automated transitions haven't been cancelled by an option or paused on hover, re-enable them if(!paused) { $(document).everyTime(opts.transition_interval,"transition",function(){ showNextItem(); }); } }; /* ** getPos(jQuery element ** Calculate position of an element relative to top/left corner of gallery ** If the gallery bounding box itself is passed to the function, calculate position of gallery relative to top/left corner of browser window ** RETURNS - JSON {left: int, top: int} */ function getPos(el) { var left = 0, top = 0; var el_id = el.id; if(el.offsetParent) { do { left += el.offsetLeft; top += el.offsetTop; } while(el = el.offsetParent); } //If we want the position of the gallery itself, return it if(el_id == id) {return {'left':left,'top':top};} //Otherwise, get position of element relative to gallery else { var gPos = getPos(j_gallery[0]); var gLeft = gPos.left; var gTop = gPos.top; return {'left':left-gLeft,'top':top-gTop}; } }; /* ** enableFrameClicking() ** Add an onclick event handler to each frame ** Exception: if a frame has an anchor tag, do not add an onlick handler */ function enableFrameClicking() { j_frames.each(function(i){ if($('a',this).length==0) { $(this).click(function(){ // Prevent transitioning to the current frame (unnecessary) if(iterator!=i) { $(document).stopTime("transition"); showItem(i); iterator = i; if(!paused) { $(document).everyTime(opts.transition_interval,"transition",function(){ showNextItem(); }); } } }); } }); }; /* ** buildPanels() ** Construct gallery panels from
elements ** NOTE - These DIVs are generated automatically from the content of the UL passed to the plugin */ function buildPanels() { // If panel overlay content exists, add the necessary overlay background DIV // The overlay content and background are separate elements so the background's opacity isn't inherited by the content j_panels.each(function(i){ if($('.panel-overlay',this).length>0) { $(this).append('
'); } }); // If there is no filmstrip in this gallery, add navigation buttons to the panel itself if(!opts.show_filmstrip) { $('').addClass('nav-next').attr('src',theme_path+opts.nav_theme+'/next.gif').appendTo(j_gallery).css({ 'position':'absolute', 'zIndex':'1100', 'cursor':'pointer', 'top':((opts.panel_height-22)/2)+gallery_padding+'px', 'right':'10px', 'display':'none' }).click(showNextItem); $('').addClass('nav-prev').attr('src',theme_path+opts.nav_theme+'/prev.gif').appendTo(j_gallery).css({ 'position':'absolute', 'zIndex':'1100', 'cursor':'pointer', 'top':((opts.panel_height-22)/2)+gallery_padding+'px', 'left':'10px', 'display':'none' }).click(showPrevItem); $('').addClass('nav-next-overlay').attr('src',theme_path+opts.nav_theme+'/panel-nav-next.gif').appendTo(j_gallery).css({ 'position':'absolute', 'zIndex':'1099', 'top':((opts.panel_height-22)/2)+gallery_padding-10+'px', 'right':'0', 'display':'none', 'cursor':'pointer', 'opacity':0.75 }).click(showNextItem); $('').addClass('nav-prev-overlay').attr('src',theme_path+opts.nav_theme+'/panel-nav-prev.gif').appendTo(j_gallery).css({ 'position':'absolute', 'zIndex':'1099', 'top':((opts.panel_height-22)/2)+gallery_padding-10+'px', 'left':'0', 'display':'none', 'cursor':'pointer', 'opacity':0.75 }).click(showPrevItem); } // Set the height and width of each panel, and position it appropriately within the gallery j_panels.each(function(i){ $(this).css({ 'width':(opts.panel_width-extraWidth(j_panels))+'px', 'height':(opts.panel_height-extraHeight(j_panels))+'px', 'position':'absolute', 'overflow':'hidden', 'display':'none' }); switch(opts.filmstrip_position) { case 'top': $(this).css({ 'top':strip_height+Math.max(gallery_padding,filmstrip_margin)+'px', 'left':gallery_padding+'px' }); break; case 'left': $(this).css({ 'top':gallery_padding+'px', 'left':strip_width+Math.max(gallery_padding,filmstrip_margin)+'px' }); break; default: $(this).css({'top':gallery_padding+'px','left':gallery_padding+'px'}); break; } }); // Position each panel overlay within panel $('.panel-overlay',j_panels).css({ 'position':'absolute', 'zIndex':'999', 'width':(opts.panel_width-extraWidth($('.panel-overlay',j_panels)))+'px', 'left':'0' }); $('.overlay-background',j_panels).css({ 'position':'absolute', 'zIndex':'998', 'width':opts.panel_width+'px', 'left':'0', 'opacity':opts.overlay_opacity }); if(opts.overlay_position=='top') { $('.panel-overlay',j_panels).css('top',0); $('.overlay-background',j_panels).css('top',0); } else { $('.panel-overlay',j_panels).css('bottom',0); $('.overlay-background',j_panels).css('bottom',0); } $('.panel iframe',j_panels).css({ 'width':opts.panel_width+'px', 'height':opts.panel_height+'px', 'border':'0' }); // If panel images have to be scaled to fit within frame, do so and position them accordingly if(scale_panel_images) { $('img',j_panels).each(function(i){ $(this).css({ 'height':panel_img_scale[i%item_count]*img_h[i%item_count], 'width':panel_img_scale[i%item_count]*img_w[i%item_count], 'position':'relative', 'top':(opts.panel_height-(panel_img_scale[i%item_count]*img_h[i%item_count]))/2+'px', 'left':(opts.panel_width-(panel_img_scale[i%item_count]*img_w[i%item_count]))/2+'px' }); }); } }; /* ** buildFilmstrip() ** Construct filmstrip from