From 12c2821caf1b3a0cefdebe67cabc9df032347b12 Mon Sep 17 00:00:00 2001 From: "spider@dev" Date: Wed, 17 Aug 2016 00:18:24 -0400 Subject: update fancybox to 2.1.5 --- javascript/jquery/plugins/fancybox/fancy_close.png | Bin 1517 -> 0 bytes .../jquery/plugins/fancybox/fancy_closebox.png | Bin 1910 -> 0 bytes javascript/jquery/plugins/fancybox/fancy_left.png | Bin 1623 -> 0 bytes .../jquery/plugins/fancybox/fancy_loading.png | Bin 10195 -> 0 bytes .../jquery/plugins/fancybox/fancy_nav_left.png | Bin 1446 -> 0 bytes .../jquery/plugins/fancybox/fancy_nav_right.png | Bin 1454 -> 0 bytes .../jquery/plugins/fancybox/fancy_progress.png | Bin 12412 -> 0 bytes javascript/jquery/plugins/fancybox/fancy_right.png | Bin 1645 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_e.png | Bin 107 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_n.png | Bin 106 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_ne.png | Bin 347 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_nw.png | Bin 324 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_s.png | Bin 111 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_se.png | Bin 352 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_sw.png | Bin 340 -> 0 bytes .../jquery/plugins/fancybox/fancy_shadow_w.png | Bin 103 -> 0 bytes .../jquery/plugins/fancybox/fancy_title_left.png | Bin 503 -> 0 bytes .../jquery/plugins/fancybox/fancy_title_main.png | Bin 96 -> 0 bytes .../jquery/plugins/fancybox/fancy_title_over.png | Bin 70 -> 0 bytes .../jquery/plugins/fancybox/fancy_title_right.png | Bin 506 -> 0 bytes javascript/jquery/plugins/fancybox/fancybox-x.png | Bin 203 -> 0 bytes javascript/jquery/plugins/fancybox/fancybox-y.png | Bin 176 -> 0 bytes javascript/jquery/plugins/fancybox/fancybox.png | Bin 15287 -> 0 bytes .../jquery/plugins/fancybox/fancybox_loading.gif | Bin 4270 -> 6567 bytes .../jquery/plugins/fancybox/fancybox_sprite.png | Bin 3633 -> 1362 bytes .../plugins/fancybox/helpers/fancybox_buttons.png | Bin 2396 -> 1080 bytes .../fancybox/helpers/jquery.fancybox-buttons.css | 36 +- .../fancybox/helpers/jquery.fancybox-buttons.js | 105 +- .../fancybox/helpers/jquery.fancybox-thumbs.css | 5 +- .../fancybox/helpers/jquery.fancybox-thumbs.js | 137 +- .../plugins/fancybox/jquery.easing-1.3.pack.js | 72 - .../jquery/plugins/fancybox/jquery.fancybox.css | 140 +- .../jquery/plugins/fancybox/jquery.fancybox.js | 2106 +++++++++++++------- .../plugins/fancybox/jquery.fancybox.pack.js | 81 +- .../fancybox/jquery.mousewheel-3.0.4.pack.js | 14 - 35 files changed, 1631 insertions(+), 1065 deletions(-) delete mode 100644 javascript/jquery/plugins/fancybox/fancy_close.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_closebox.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_left.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_loading.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_nav_left.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_nav_right.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_progress.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_right.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_e.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_n.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_ne.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_nw.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_s.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_se.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_sw.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_shadow_w.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_title_left.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_title_main.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_title_over.png delete mode 100644 javascript/jquery/plugins/fancybox/fancy_title_right.png delete mode 100644 javascript/jquery/plugins/fancybox/fancybox-x.png delete mode 100644 javascript/jquery/plugins/fancybox/fancybox-y.png delete mode 100644 javascript/jquery/plugins/fancybox/fancybox.png delete mode 100644 javascript/jquery/plugins/fancybox/jquery.easing-1.3.pack.js mode change 100644 => 100755 javascript/jquery/plugins/fancybox/jquery.fancybox.js mode change 100644 => 100755 javascript/jquery/plugins/fancybox/jquery.fancybox.pack.js delete mode 100644 javascript/jquery/plugins/fancybox/jquery.mousewheel-3.0.4.pack.js diff --git a/javascript/jquery/plugins/fancybox/fancy_close.png b/javascript/jquery/plugins/fancybox/fancy_close.png deleted file mode 100644 index 0703530..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_close.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_closebox.png b/javascript/jquery/plugins/fancybox/fancy_closebox.png deleted file mode 100644 index 4de4396..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_closebox.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_left.png b/javascript/jquery/plugins/fancybox/fancy_left.png deleted file mode 100644 index 61494e6..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_left.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_loading.png b/javascript/jquery/plugins/fancybox/fancy_loading.png deleted file mode 100644 index 2503017..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_loading.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_nav_left.png b/javascript/jquery/plugins/fancybox/fancy_nav_left.png deleted file mode 100644 index ebaa6a4..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_nav_left.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_nav_right.png b/javascript/jquery/plugins/fancybox/fancy_nav_right.png deleted file mode 100644 index 873294e..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_nav_right.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_progress.png b/javascript/jquery/plugins/fancybox/fancy_progress.png deleted file mode 100644 index 06b7c89..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_progress.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_right.png b/javascript/jquery/plugins/fancybox/fancy_right.png deleted file mode 100644 index 0a56042..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_right.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_e.png b/javascript/jquery/plugins/fancybox/fancy_shadow_e.png deleted file mode 100644 index 2eda089..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_e.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_n.png b/javascript/jquery/plugins/fancybox/fancy_shadow_n.png deleted file mode 100644 index 69aa10e..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_n.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_ne.png b/javascript/jquery/plugins/fancybox/fancy_shadow_ne.png deleted file mode 100644 index 79f6980..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_ne.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_nw.png b/javascript/jquery/plugins/fancybox/fancy_shadow_nw.png deleted file mode 100644 index 7182cd9..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_nw.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_s.png b/javascript/jquery/plugins/fancybox/fancy_shadow_s.png deleted file mode 100644 index d8858bf..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_s.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_se.png b/javascript/jquery/plugins/fancybox/fancy_shadow_se.png deleted file mode 100644 index 541e3ff..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_se.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_sw.png b/javascript/jquery/plugins/fancybox/fancy_shadow_sw.png deleted file mode 100644 index b451689..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_sw.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_shadow_w.png b/javascript/jquery/plugins/fancybox/fancy_shadow_w.png deleted file mode 100644 index 8a4e4a8..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_shadow_w.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_title_left.png b/javascript/jquery/plugins/fancybox/fancy_title_left.png deleted file mode 100644 index 6049223..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_title_left.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_title_main.png b/javascript/jquery/plugins/fancybox/fancy_title_main.png deleted file mode 100644 index 8044271..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_title_main.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_title_over.png b/javascript/jquery/plugins/fancybox/fancy_title_over.png deleted file mode 100644 index d9f458f..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_title_over.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancy_title_right.png b/javascript/jquery/plugins/fancybox/fancy_title_right.png deleted file mode 100644 index e36d9db..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancy_title_right.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancybox-x.png b/javascript/jquery/plugins/fancybox/fancybox-x.png deleted file mode 100644 index c2130f8..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancybox-x.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancybox-y.png b/javascript/jquery/plugins/fancybox/fancybox-y.png deleted file mode 100644 index 7ef399b..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancybox-y.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancybox.png b/javascript/jquery/plugins/fancybox/fancybox.png deleted file mode 100644 index 65e14f6..0000000 Binary files a/javascript/jquery/plugins/fancybox/fancybox.png and /dev/null differ diff --git a/javascript/jquery/plugins/fancybox/fancybox_loading.gif b/javascript/jquery/plugins/fancybox/fancybox_loading.gif index 742131f..a03a40c 100644 Binary files a/javascript/jquery/plugins/fancybox/fancybox_loading.gif and b/javascript/jquery/plugins/fancybox/fancybox_loading.gif differ diff --git a/javascript/jquery/plugins/fancybox/fancybox_sprite.png b/javascript/jquery/plugins/fancybox/fancybox_sprite.png index 753021b..fd8d5ca 100644 Binary files a/javascript/jquery/plugins/fancybox/fancybox_sprite.png and b/javascript/jquery/plugins/fancybox/fancybox_sprite.png differ diff --git a/javascript/jquery/plugins/fancybox/helpers/fancybox_buttons.png b/javascript/jquery/plugins/fancybox/helpers/fancybox_buttons.png index e0e1ea8..0787207 100644 Binary files a/javascript/jquery/plugins/fancybox/helpers/fancybox_buttons.png and b/javascript/jquery/plugins/fancybox/helpers/fancybox_buttons.png differ diff --git a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css index 1e83200..a26273a 100644 --- a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css +++ b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.css @@ -2,7 +2,7 @@ position: fixed; left: 0; width: 100%; - z-index: 1005; + z-index: 8050; } #fancybox-buttons.top { @@ -15,17 +15,24 @@ #fancybox-buttons ul { display: block; - width: 170px; + width: 166px; height: 30px; margin: 0 auto; padding: 0; list-style: none; - background: #111; - -webkit-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05); - -moz-box-shadow: 0 1px 3px #000,0 0 0 1px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05); - background: #111 -webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,.2)),color-stop(.5,rgba(255,255,255,.15)),color-stop(.5,rgba(255,255,255,.1)),to(rgba(255,255,255,.15))); - background: #111 -moz-linear-gradient(top,rgba(255,255,255,.2) 0%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.15) 100%); + border: 1px solid #111; border-radius: 3px; + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + background: rgb(50,50,50); + background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); + background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); } #fancybox-buttons ul li { @@ -39,14 +46,19 @@ width: 30px; height: 30px; text-indent: -9999px; + background-color: transparent; background-image: url('fancybox_buttons.png'); background-repeat: no-repeat; outline: none; + opacity: 0.8; +} + +#fancybox-buttons a:hover { + opacity: 1; } #fancybox-buttons a.btnPrev { - width: 32px; - background-position: 6px 0; + background-position: 5px 0; } #fancybox-buttons a.btnNext { @@ -75,11 +87,11 @@ #fancybox-buttons a.btnClose { border-left: 1px solid #111; - width: 38px; - background-position: -57px 0px; + width: 35px; + background-position: -56px 0px; } #fancybox-buttons a.btnDisabled { - opacity : 0.5; + opacity : 0.4; cursor: default; } \ No newline at end of file diff --git a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js index e116e38..fd8b955 100644 --- a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js +++ b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-buttons.js @@ -1,19 +1,17 @@ /*! * Buttons helper for fancyBox - * version: 1.0.2 + * version: 1.0.5 (Mon, 15 Oct 2012) * @requires fancyBox v2.0 or later * - * Usage: + * Usage: * $(".fancybox").fancybox({ - * buttons: { - * position : 'top' + * helpers : { + * buttons: { + * position : 'top' + * } * } * }); - * - * Options: - * tpl - HTML template - * position - 'top' or 'bottom' - * + * */ (function ($) { //Shortcut for fancyBox object @@ -21,72 +19,65 @@ //Add helper object F.helpers.buttons = { - tpl: '
', - list: null, - buttons: {}, - - update: function () { - var toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); - - //Size toggle button - if (F.current.canShrink) { - toggle.addClass('btnToggleOn'); - - } else if (!F.current.canExpand) { - toggle.addClass('btnDisabled'); - } + defaults : { + skipSingle : false, // disables if gallery contains single image + position : 'top', // 'top' or 'bottom' + tpl : '
' }, - beforeLoad: function (opts) { + list : null, + buttons: null, + + beforeLoad: function (opts, obj) { //Remove self if gallery do not have at least two items - if (F.group.length < 2) { - F.coming.helpers.buttons = false; - F.coming.closeBtn = true; + + if (opts.skipSingle && obj.group.length < 2) { + obj.helpers.buttons = false; + obj.closeBtn = true; return; } //Increase top margin to give space for buttons - F.coming.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; + obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; }, onPlayStart: function () { - if (this.list) { + if (this.buttons) { this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); } }, onPlayEnd: function () { - if (this.list) { + if (this.buttons) { this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); } }, - afterShow: function (opts) { - var buttons; + afterShow: function (opts, obj) { + var buttons = this.buttons; - if (!this.list) { - this.list = $(opts.tpl || this.tpl).addClass(opts.position || 'top').appendTo('body'); + if (!buttons) { + this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); - this.buttons = { - prev : this.list.find('.btnPrev').click( F.prev ), - next : this.list.find('.btnNext').click( F.next ), - play : this.list.find('.btnPlay').click( F.play ), - toggle : this.list.find('.btnToggle').click( F.toggle ) + buttons = { + prev : this.list.find('.btnPrev').click( F.prev ), + next : this.list.find('.btnNext').click( F.next ), + play : this.list.find('.btnPlay').click( F.play ), + toggle : this.list.find('.btnToggle').click( F.toggle ), + close : this.list.find('.btnClose').click( F.close ) } } - buttons = this.buttons; - //Prev - if (F.current.index > 0 || F.current.loop) { + if (obj.index > 0 || obj.loop) { buttons.prev.removeClass('btnDisabled'); } else { buttons.prev.addClass('btnDisabled'); } //Next / Play - if (F.current.loop || F.current.index < F.group.length - 1) { + if (obj.loop || obj.index < obj.group.length - 1) { buttons.next.removeClass('btnDisabled'); buttons.play.removeClass('btnDisabled'); @@ -95,11 +86,27 @@ buttons.play.addClass('btnDisabled'); } - this.update(); + this.buttons = buttons; + + this.onUpdate(opts, obj); }, - onUpdate: function () { - this.update(); + onUpdate: function (opts, obj) { + var toggle; + + if (!this.buttons) { + return; + } + + toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); + + //Size toggle button + if (obj.canShrink) { + toggle.addClass('btnToggleOn'); + + } else if (!obj.canExpand) { + toggle.addClass('btnDisabled'); + } }, beforeClose: function () { @@ -107,9 +114,9 @@ this.list.remove(); } - this.list = null; - this.buttons = {}; + this.list = null; + this.buttons = null; } }; -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css index aadfb73..63d2943 100644 --- a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +++ b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.css @@ -1,9 +1,9 @@ #fancybox-thumbs { position: fixed; - left: 0px; + left: 0; width: 100%; overflow: hidden; - z-index: 1005; + z-index: 8050; } #fancybox-thumbs.bottom { @@ -51,4 +51,5 @@ position: relative; border: 0; padding: 0; + max-width: none; } \ No newline at end of file diff --git a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js index 04a97db..5db3d4a 100644 --- a/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +++ b/javascript/jquery/plugins/fancybox/helpers/jquery.fancybox-thumbs.js @@ -1,22 +1,18 @@ /*! * Thumbnail helper for fancyBox - * version: 1.0.3 + * version: 1.0.7 (Mon, 01 Oct 2012) * @requires fancyBox v2.0 or later * - * Usage: + * Usage: * $(".fancybox").fancybox({ - * thumbs: { - * width : 50, - * height : 50 + * helpers : { + * thumbs: { + * width : 50, + * height : 50 + * } * } * }); - * - * Options: - * width - thumbnail width - * height - thumbnail height - * source - function to obtain the URL of the thumbnail image - * position - 'top' or 'bottom' - * + * */ (function ($) { //Shortcut for fancyBox object @@ -24,44 +20,56 @@ //Add helper object F.helpers.thumbs = { - wrap: null, - list: null, - width: 0, - - //Default function to obtain the URL of the thumbnail image - source: function (el) { - var img; - - if ($.type(el) === 'string') { - return el; + defaults : { + width : 50, // thumbnail width + height : 50, // thumbnail height + position : 'bottom', // 'top' or 'bottom' + source : function ( item ) { // function to obtain the URL of the thumbnail image + var href; + + if (item.element) { + href = $(item.element).find('img').attr('src'); + } + + if (!href && item.type === 'image' && item.href) { + href = item.href; + } + + return href; } - - img = $(el).find('img'); - - return img.length ? img.attr('src') : el.href; }, - init: function (opts) { + wrap : null, + list : null, + width : 0, + + init: function (opts, obj) { var that = this, list, - thumbWidth = opts.width || 50, - thumbHeight = opts.height || 50, - thumbSource = opts.source || this.source; + thumbWidth = opts.width, + thumbHeight = opts.height, + thumbSource = opts.source; //Build list structure list = ''; - for (var n = 0; n < F.group.length; n++) { + for (var n = 0; n < obj.group.length; n++) { list += '
  • '; } - this.wrap = $('
    ').addClass(opts.position || 'bottom').appendTo('body'); + this.wrap = $('
    ').addClass(opts.position).appendTo('body'); this.list = $('').appendTo(this.wrap); //Load each thumbnail - $.each(F.group, function (i) { + $.each(obj.group, function (i) { + var href = thumbSource( obj.group[ i ] ); + + if (!href) { + return; + } + $("").load(function () { - var width = this.width, + var width = this.width, height = this.height, widthRatio, heightRatio, parent; @@ -70,77 +78,74 @@ } //Calculate thumbnail width/height and center it - widthRatio = width / thumbWidth; + widthRatio = width / thumbWidth; heightRatio = height / thumbHeight; + parent = that.list.children().eq(i).find('a'); if (widthRatio >= 1 && heightRatio >= 1) { if (widthRatio > heightRatio) { - width = Math.floor(width / heightRatio); + width = Math.floor(width / heightRatio); height = thumbHeight; } else { - width = thumbWidth; + width = thumbWidth; height = Math.floor(height / widthRatio); } } $(this).css({ - width: width, - height: height, - top: Math.floor(thumbHeight / 2 - height / 2), - left: Math.floor(thumbWidth / 2 - width / 2) + width : width, + height : height, + top : Math.floor(thumbHeight / 2 - height / 2), + left : Math.floor(thumbWidth / 2 - width / 2) }); parent.width(thumbWidth).height(thumbHeight); $(this).hide().appendTo(parent).fadeIn(300); - }).attr('src', thumbSource( F.group[ i ] )); + }).attr('src', href); }); //Set initial width - this.width = this.list.children().eq(0).outerWidth(); + this.width = this.list.children().eq(0).outerWidth(true); - this.list.width(this.width * (F.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5))); + this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); }, - //Center list - update: function (opts) { - if (this.list) { - this.list.stop(true).animate({ - 'left': Math.floor($(window).width() * 0.5 - (F.current.index * this.width + this.width * 0.5)) - }, 150); - } - }, - - beforeLoad: function (opts) { - //Remove self if gallery do not have at least two items - if (F.group.length < 2) { - F.coming.helpers.thumbs = false; + beforeLoad: function (opts, obj) { + //Remove self if gallery do not have at least two items + if (obj.group.length < 2) { + obj.helpers.thumbs = false; return; } //Increase bottom margin to give space for thumbs - F.coming.margin[ opts.position === 'top' ? 0 : 2 ] = opts.height + 30; + obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); }, - afterShow: function (opts) { + afterShow: function (opts, obj) { //Check if exists and create or update list if (this.list) { - this.update(opts); + this.onUpdate(opts, obj); } else { - this.init(opts); + this.init(opts, obj); } //Set active element - this.list.children().removeClass('active').eq(F.current.index).addClass('active'); + this.list.children().removeClass('active').eq(obj.index).addClass('active'); }, - onUpdate: function () { - this.update(); + //Center list + onUpdate: function (opts, obj) { + if (this.list) { + this.list.stop(true).animate({ + 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) + }, 150); + } }, beforeClose: function () { @@ -148,8 +153,8 @@ this.wrap.remove(); } - this.wrap = null; - this.list = null; + this.wrap = null; + this.list = null; this.width = 0; } } diff --git a/javascript/jquery/plugins/fancybox/jquery.easing-1.3.pack.js b/javascript/jquery/plugins/fancybox/jquery.easing-1.3.pack.js deleted file mode 100644 index 9028179..0000000 --- a/javascript/jquery/plugins/fancybox/jquery.easing-1.3.pack.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2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