gimp-web r1923 - in trunk: about/splash includes includes/fancybox screenshots



Author: jimmac
Date: Fri Feb 27 21:58:06 2009
New Revision: 1923
URL: http://svn.gnome.org/viewvc/gimp-web?rev=1923&view=rev

Log:
use jquery 1.3.2 offsite. Replace imagebox with fancybox that has better cross browser support and scales images based on viewport size.

Added:
   trunk/includes/fancybox/
   trunk/includes/fancybox/fancy.css
   trunk/includes/fancybox/fancy_closebox.png
   trunk/includes/fancybox/fancy_left.gif
   trunk/includes/fancybox/fancy_progress.png
   trunk/includes/fancybox/fancy_right.gif
   trunk/includes/fancybox/fancy_shadow_e.png
   trunk/includes/fancybox/fancy_shadow_n.png
   trunk/includes/fancybox/fancy_shadow_ne.png
   trunk/includes/fancybox/fancy_shadow_nw.png
   trunk/includes/fancybox/fancy_shadow_s.png
   trunk/includes/fancybox/fancy_shadow_se.png
   trunk/includes/fancybox/fancy_shadow_sw.png
   trunk/includes/fancybox/fancy_shadow_w.png
   trunk/includes/fancybox/fancy_title_left.png
   trunk/includes/fancybox/fancy_title_main.png
   trunk/includes/fancybox/fancy_title_right.png
   trunk/includes/fancybox/jquery.fancybox.js
   trunk/includes/fancybox/jquery.pngFix.pack.js
Removed:
   trunk/includes/imagebox.js
   trunk/includes/iutil.js
   trunk/includes/jquery.js
Modified:
   trunk/about/splash/stable.html
   trunk/includes/imagebox.xhtml
   trunk/includes/wgo-scripts.xhtml
   trunk/screenshots/index.htrw

Modified: trunk/about/splash/stable.html
==============================================================================
--- trunk/about/splash/stable.html	(original)
+++ trunk/about/splash/stable.html	Fri Feb 27 21:58:06 2009
@@ -1,19 +1,12 @@
 <!--#include virtual="/includes/wgo-xhtml-init.xhtml" -->
 <title>GIMP - Splash History</title>
 <!--#include virtual="/includes/wgo-look-feel.xhtml" -->
-<script type="text/javascript" src="/includes/iutil.js"></script>
-
-<script type="text/javascript" src="/includes/imagebox.js"></script>
+<!--#include virtual="/includes/imagebox.xhtml" -->
 <script type="text/javascript">
 	//image preview
 	//<!--
 	$(document).ready(function() {
-			$.ImageBox.init(
-				{
-					loaderSRC: '/images/loading.gif',
-					closeHTML: '<img src=\"/images/close.png\" alt=\"x\" />'
-				}
-			);
+
 			//replace the thumbnails with a crop view
 			$(".splashes img").each(function () {
 				//console.log("mangling thumbnail for " + this.id);
@@ -32,17 +25,17 @@
 <h1>Stable Version Splash History</h1>
 
 <div class="splashes">
-<a href="images/gimp1_1_splash.png" rel="imagebox-splash" title="GIMP 1.0<br /> Author: Jens Lautenbacher"><img alt="#"  id="gimp1_1_splash" src="images/gimp1_1_splash.png" width="128" height="128" /></a>
+<a href="images/gimp1_1_splash.png" title="GIMP 1.0<br /> Author: Jens Lautenbacher"><img alt="#"  id="gimp1_1_splash" src="images/gimp1_1_splash.png" width="128" height="128" /></a>
 
-<a href="images/gimp_splash.1.11.png" rel="imagebox-splash" title="GIMP 1.2<br /> Author: Tuomas Kuosmanen"><img alt="#"  id="gimp_splash.1.11" src="images/gimp_splash.1.11.png" width="128" height="128" /></a>
+<a href="images/gimp_splash.1.11.png"  title="GIMP 1.2<br /> Author: Tuomas Kuosmanen"><img alt="#"  id="gimp_splash.1.11" src="images/gimp_splash.1.11.png" width="128" height="128" /></a>
 
-<a href="images/gimp_splashpng.1.19.png" rel="imagebox-splash" title="GIMP 2.0<br /> Author: Jakub Steiner"><img alt="#"  id="gimp_splashpng.1.19" src="images/gimp_splashpng.1.19.png" width="128" height="128" /></a>
+<a href="images/gimp_splashpng.1.19.png"  title="GIMP 2.0<br /> Author: Jakub Steiner"><img alt="#"  id="gimp_splashpng.1.19" src="images/gimp_splashpng.1.19.png" width="128" height="128" /></a>
 
-<a href="images/gimp-splash-1.6.png" rel="imagebox-splash" title="GIMP 2.2<br /> Author: Bill Luhtala"><img alt="#"  id="gimp-splash-1.6" src="images/gimp-splash-1.6.png" width="128" height="128" /></a>
+<a href="images/gimp-splash-1.6.png" title="GIMP 2.2<br /> Author: Bill Luhtala"><img alt="#"  id="gimp-splash-1.6" src="images/gimp-splash-1.6.png" width="128" height="128" /></a>
 
-<a href="images/gimp-splash-2.4.png" rel="imagebox-splash" title="GIMP 2.4<br /> Author: Paul Davey"><img alt="#"  id="gimp-splash-2.4" src="images/gimp-splash-2.4.png" width="128" height="128" /></a>
+<a href="images/gimp-splash-2.4.png" title="GIMP 2.4<br /> Author: Paul Davey"><img alt="#"  id="gimp-splash-2.4" src="images/gimp-splash-2.4.png" width="128" height="128" /></a>
 
-<a href="images/gimp-splash-2.6.png" rel="imagebox-splash" title="GIMP 2.6<br /> Author: Alexia Death"><img alt="#"  id="gimp-splash-2.6" src="images/gimp-splash-2.6.png" width="128" height="128" /></a>
+<a href="images/gimp-splash-2.6.png" title="GIMP 2.6<br /> Author: Alexia Death"><img alt="#"  id="gimp-splash-2.6" src="images/gimp-splash-2.6.png" width="128" height="128" /></a>
 
 </div>
 

Added: trunk/includes/fancybox/fancy.css
==============================================================================
--- (empty file)
+++ trunk/includes/fancybox/fancy.css	Fri Feb 27 21:58:06 2009
@@ -0,0 +1,231 @@
+div#fancy_overlay {
+	position:absolute;
+	top: 0;
+	left: 0;
+	z-index: 90;
+	width: 100%;
+	background-color: #333;
+}
+
+div#fancy_loading {
+	position: absolute;
+	height: 40px;
+	width: 40px;
+	cursor: pointer;
+	display: none;
+	overflow: hidden;
+	background: transparent;
+	z-index: 100;
+}
+
+div#fancy_loading div {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 40px;
+	height: 480px;
+	background: transparent url(fancy_progress.png) no-repeat;
+}
+
+div#fancy_close {
+	position: absolute;
+	top: -12px;
+	right: -12px;
+	height: 30px;
+	width: 30px;
+	background: transparent url(fancy_closebox.png) ;
+	cursor: pointer;
+	z-index: 100;
+	display: none;
+}
+
+div#fancy_content {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	padding: 0; 
+	margin: 0;
+	z-index: 96;
+}
+
+#fancy_frame {
+	position: relative;
+	width: 100%;
+	height: 100%;
+	display: none;
+}
+
+img#fancy_img {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	border:0; 
+	padding: 0; 
+	margin: 0;
+	z-index: 92;
+}
+
+div#fancy_title {
+	position: absolute;
+	bottom: -35px;
+	left: 0;
+	width: 100%;
+	z-index: 100;
+	display: none;
+}
+
+div#fancy_title table {
+	margin: 0 auto;
+}
+
+div#fancy_title div {
+	color: #FFF;
+	font: bold 12px Arial;
+	padding-bottom: 2px;
+}
+
+td#fancy_title_left {
+	height: 32px;
+	width: 15px;
+	background: transparent url(fancy_title_left.png) no-repeat right center;
+}
+
+td#fancy_title_main {
+	height: 32px;
+	background: transparent url(fancy_title_main.png) repeat-x center center;
+}
+
+td#fancy_title_right {
+	height: 32px;
+	width: 15px;
+	background: transparent url(fancy_title_right.png) no-repeat left center;
+}
+
+div#fancy_outer {
+	position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 90;
+    padding: 18px 18px 58px 18px;
+    margin: 0;
+    overflow: hidden;
+    background: transparent;
+    display: none;
+}
+
+div#fancy_inner {
+	position: relative;
+	width:100%;
+	height:100%;
+	border: 1px solid #444;
+	background: #FFF;
+}
+
+a#fancy_left, a#fancy_right {
+	position: absolute; 
+	bottom: 10px; 
+	height: 100%; 
+	width: 35%; 
+	cursor: pointer;
+	background-image: url(data:image/gif;base64,AAAA);
+	z-index: 100; 
+}
+
+a#fancy_left {
+	left: 0px; 
+}
+
+a#fancy_right {
+	right: 0px; 
+}
+
+a#fancy_left:hover {
+	background: transparent url(fancy_left.gif) no-repeat 0% 100%;
+}
+
+a#fancy_right:hover {
+	background: transparent url(fancy_right.gif) no-repeat 100% 100%;
+}
+
+#fancy_bigIframe, #fancy_freeIframe {
+	position:absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	z-index: 10;
+}
+
+div#fancy_bg {
+	display: none;
+}
+	
+div.fancy_bg {
+	position: absolute;
+	display: block;
+	z-index: 70;
+}
+
+div.fancy_bg_n {
+	top: -18px;
+	width: 100%;
+	height: 18px;
+	background: transparent url(fancy_shadow_n.png) repeat-x;
+}
+
+div.fancy_bg_ne {
+	top: -18px;
+	right: -13px;
+	width: 13px;
+	height: 18px;
+	background: transparent url(fancy_shadow_ne.png) no-repeat;
+}
+
+div.fancy_bg_e {
+	right: -13px;
+	height: 100%;
+	width: 13px;
+	background: transparent url(fancy_shadow_e.png) repeat-y;
+}
+
+div.fancy_bg_se {
+	bottom: -18px;
+	right: -13px;
+	width: 13px;
+	height: 18px;
+	background: transparent url(fancy_shadow_se.png) no-repeat;
+}
+
+div.fancy_bg_s {
+	bottom: -18px;
+	width: 100%;
+	height: 18px;
+	background: transparent url(fancy_shadow_s.png) repeat-x;
+}
+
+div.fancy_bg_sw {
+	bottom: -18px;
+	left: -13px;
+	width: 13px;
+	height: 18px;
+	background: transparent url(fancy_shadow_sw.png) no-repeat;
+}
+
+div.fancy_bg_w {
+	left: -13px;
+	height: 100%;
+	width: 13px;
+	background: transparent url(fancy_shadow_w.png) repeat-y;
+}
+
+div.fancy_bg_nw {
+	top: -18px;
+	left: -13px;
+	width: 13px;
+	height: 18px;
+	background: transparent url(fancy_shadow_nw.png) no-repeat;
+}

Added: trunk/includes/fancybox/fancy_closebox.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_closebox.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_left.gif
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_left.gif	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_progress.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_progress.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_right.gif
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_right.gif	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_e.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_e.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_n.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_n.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_ne.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_ne.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_nw.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_nw.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_s.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_s.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_se.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_se.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_sw.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_sw.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_shadow_w.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_shadow_w.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_title_left.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_title_left.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_title_main.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_title_main.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/fancy_title_right.png
==============================================================================
Binary files (empty file) and trunk/includes/fancybox/fancy_title_right.png	Fri Feb 27 21:58:06 2009 differ

Added: trunk/includes/fancybox/jquery.fancybox.js
==============================================================================
--- (empty file)
+++ trunk/includes/fancybox/jquery.fancybox.js	Fri Feb 27 21:58:06 2009
@@ -0,0 +1,384 @@
+/*
+ * FancyBox - simple jQuery plugin for fancy image zooming
+ * Examples and documentation at: http://fancy.klade.lv/
+ * Version: 1.0.0 (29/04/2008)
+ * Copyright (c) 2008 Janis Skarnelis
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
+ * Requires: jQuery v1.2.1 or later
+*/
+(function($) {
+	var opts = {}, 
+		imgPreloader = new Image, imgTypes = ['png', 'jpg', 'jpeg', 'gif'], 
+		loadingTimer, loadingFrame = 1;
+
+   $.fn.fancybox = function(settings) {
+		opts.settings = $.extend({}, $.fn.fancybox.defaults, settings);
+
+		$.fn.fancybox.init();
+
+		return this.each(function() {
+			var $this = $(this);
+			var o = $.metadata ? $.extend({}, opts.settings, $this.metadata()) : opts.settings;
+
+			$this.unbind('click').click(function() {
+				$.fn.fancybox.start(this, o); return false;
+			});
+		});
+	};
+
+	$.fn.fancybox.start = function(el, o) {
+		if (opts.animating) return false;
+
+		if (o.overlayShow) {
+			$("#fancy_wrap").prepend('<div id="fancy_overlay"></div>');
+			$("#fancy_overlay").css({'width': $(window).width(), 'height': $(document).height(), 'opacity': o.overlayOpacity});
+
+			if ($.browser.msie) {
+				$("#fancy_wrap").prepend('<iframe id="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');
+				$("#fancy_bigIframe").css({'width': $(window).width(), 'height': $(document).height(), 'opacity': 0});
+			}
+
+			$("#fancy_overlay").click($.fn.fancybox.close);
+		}
+
+		opts.itemArray	= [];
+		opts.itemNum	= 0;
+
+		if (jQuery.isFunction(o.itemLoadCallback)) {
+		   o.itemLoadCallback.apply(this, [opts]);
+
+			var c	= $(el).children("img:first").length ? $(el).children("img:first") : $(el);
+			var tmp	= {'width': c.width(), 'height': c.height(), 'pos': $.fn.fancybox.getPosition(c)}
+
+		   for (var i = 0; i < opts.itemArray.length; i++) {
+				opts.itemArray[i].o = $.extend({}, o, opts.itemArray[i].o);
+				
+				if (o.zoomSpeedIn > 0 || o.zoomSpeedOut > 0) {
+					opts.itemArray[i].orig = tmp;
+				}
+		   }
+
+		} else {
+			if (!el.rel || el.rel == '') {
+				var item = {url: el.href, title: el.title, o: o};
+
+				if (o.zoomSpeedIn > 0 || o.zoomSpeedOut > 0) {
+					var c = $(el).children("img:first").length ? $(el).children("img:first") : $(el);
+					item.orig = {'width': c.width(), 'height': c.height(), 'pos': $.fn.fancybox.getPosition(c)}
+				}
+
+				opts.itemArray.push(item);
+
+			} else {
+				var arr	= $("a[ rel=" + el.rel + "]").get();
+
+				for (var i = 0; i < arr.length; i++) {
+					var tmp		= $.metadata ? $.extend({}, o, $(arr[i]).metadata()) : o;
+   					var item	= {url: arr[i].href, title: arr[i].title, o: tmp};
+
+   					if (o.zoomSpeedIn > 0 || o.zoomSpeedOut > 0) {
+						var c = $(arr[i]).children("img:first").length ? $(arr[i]).children("img:first") : $(el);
+
+						item.orig = {'width': c.width(), 'height': c.height(), 'pos': $.fn.fancybox.getPosition(c)}
+					}
+
+					if (arr[i].href == el.href) opts.itemNum = i;
+
+					opts.itemArray.push(item);
+				}
+			}
+		}
+
+		$.fn.fancybox.changeItem(opts.itemNum);
+	};
+
+	$.fn.fancybox.changeItem = function(n) {
+		$.fn.fancybox.showLoading();
+
+		opts.itemNum = n;
+
+		$("#fancy_nav").empty();
+		$("#fancy_outer").stop();
+		$("#fancy_title").hide();
+		$(document).unbind("keydown");
+
+		imgRegExp = imgTypes.join('|');
+    	imgRegExp = new RegExp('\.' + imgRegExp + '$', 'i');
+
+		var url = opts.itemArray[n].url;
+
+		if (url.match(/#/)) {
+			var target = window.location.href.split('#')[0]; target = url.replace(target,'');
+
+	        $.fn.fancybox.showItem('<div id="fancy_div">' + $(target).html() + '</div>');
+
+	        $("#fancy_loading").hide();
+
+		} else if (url.match(imgRegExp)) {
+			$(imgPreloader).unbind('load').bind('load', function() {
+				$("#fancy_loading").hide();
+
+				opts.itemArray[n].o.frameWidth	= imgPreloader.width;
+				opts.itemArray[n].o.frameHeight	= imgPreloader.height;
+
+				$.fn.fancybox.showItem('<img id="fancy_img" src="' + imgPreloader.src + '" />');
+
+			}).attr('src', url + '?rand=' + Math.floor(Math.random() * 999999999) );
+
+		} else {
+			$.fn.fancybox.showItem('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe' + Math.round(Math.random()*1000) + '" frameborder="0" hspace="0" src="' + url + '"></iframe>');
+		}
+	};
+
+	$.fn.fancybox.showIframe = function() {
+		$("#fancy_loading").hide();
+		$("#fancy_frame").show();
+	};
+
+	$.fn.fancybox.showItem = function(val) {
+		$.fn.fancybox.preloadNeighborImages();
+
+		var viewportPos	= $.fn.fancybox.getViewport();
+		var itemSize	= $.fn.fancybox.getMaxSize(viewportPos[0] - 50, viewportPos[1] - 100, opts.itemArray[opts.itemNum].o.frameWidth, opts.itemArray[opts.itemNum].o.frameHeight);
+
+		var itemLeft	= viewportPos[2] + Math.round((viewportPos[0] - itemSize[0]) / 2) - 20;
+		var itemTop		= viewportPos[3] + Math.round((viewportPos[1] - itemSize[1]) / 2) - 40;
+
+		var itemOpts = {
+			'left':		itemLeft, 
+			'top':		itemTop, 
+			'width':	itemSize[0] + 'px', 
+			'height':	itemSize[1] + 'px'	
+		}
+
+		if (opts.active) {
+			$('#fancy_content').fadeOut("normal", function() {
+				$("#fancy_content").empty();
+				
+				$("#fancy_outer").animate(itemOpts, "normal", function() {
+					$("#fancy_content").append($(val)).fadeIn("normal");
+					$.fn.fancybox.updateDetails();
+				});
+			});
+
+		} else {
+			opts.active = true;
+
+			$("#fancy_content").empty();
+
+			if ($("#fancy_content").is(":animated")) {
+				console.info('animated!');
+			}
+
+			if (opts.itemArray[opts.itemNum].o.zoomSpeedIn > 0) {
+				opts.animating		= true;
+				itemOpts.opacity	= "show";
+
+				$("#fancy_outer").css({
+					'top':		opts.itemArray[opts.itemNum].orig.pos.top - 18,
+					'left':		opts.itemArray[opts.itemNum].orig.pos.left - 18,
+					'height':	opts.itemArray[opts.itemNum].orig.height,
+					'width':	opts.itemArray[opts.itemNum].orig.width
+				});
+
+				$("#fancy_content").append($(val)).show();
+
+				$("#fancy_outer").animate(itemOpts, opts.itemArray[opts.itemNum].o.zoomSpeedIn, function() {
+					opts.animating = false;
+					$.fn.fancybox.updateDetails();
+				});
+
+			} else {
+				$("#fancy_content").append($(val)).show();
+				$("#fancy_outer").css(itemOpts).show();
+				$.fn.fancybox.updateDetails();
+			}
+		 }
+	};
+
+	$.fn.fancybox.updateDetails = function() {
+		$("#fancy_bg,#fancy_close").show();
+
+		if (opts.itemArray[opts.itemNum].title !== undefined && opts.itemArray[opts.itemNum].title !== '') {
+			$('#fancy_title div').html(opts.itemArray[opts.itemNum].title);
+			$('#fancy_title').show();
+		}
+
+		if (opts.itemArray[opts.itemNum].o.hideOnContentClick) {
+			$("#fancy_content").click($.fn.fancybox.close);
+		} else {
+			$("#fancy_content").unbind('click');
+		}
+
+		if (opts.itemNum != 0) {
+			$("#fancy_nav").append('<a id="fancy_left" href="javascript:;"></a>');
+
+			$('#fancy_left').click(function() {
+				$.fn.fancybox.changeItem(opts.itemNum - 1); return false;
+			});
+		}
+
+		if (opts.itemNum != (opts.itemArray.length - 1)) {
+			$("#fancy_nav").append('<a id="fancy_right" href="javascript:;"></a>');
+			
+			$('#fancy_right').click(function(){
+				$.fn.fancybox.changeItem(opts.itemNum + 1); return false;
+			});
+		}
+
+		$(document).keydown(function(event) {
+			if (event.keyCode == 27) {
+            	$.fn.fancybox.close();
+
+			} else if(event.keyCode == 37 && opts.itemNum != 0) {
+            	$.fn.fancybox.changeItem(opts.itemNum - 1);
+
+			} else if(event.keyCode == 39 && opts.itemNum != (opts.itemArray.length - 1)) {
+            	$.fn.fancybox.changeItem(opts.itemNum + 1);
+			}
+		});
+	};
+
+	$.fn.fancybox.preloadNeighborImages = function() {
+		if ((opts.itemArray.length - 1) > opts.itemNum) {
+			preloadNextImage = new Image();
+			preloadNextImage.src = opts.itemArray[opts.itemNum + 1].url;
+		}
+
+		if (opts.itemNum > 0) {
+			preloadPrevImage = new Image();
+			preloadPrevImage.src = opts.itemArray[opts.itemNum - 1].url;
+		}
+	};
+
+	$.fn.fancybox.close = function() {
+		if (opts.animating) return false;
+
+		$(imgPreloader).unbind('load');
+		$(document).unbind("keydown");
+
+		$("#fancy_loading,#fancy_title,#fancy_close,#fancy_bg").hide();
+
+		$("#fancy_nav").empty();
+
+		opts.active	= false;
+
+		if (opts.itemArray[opts.itemNum].o.zoomSpeedOut > 0) {
+			var itemOpts = {
+				'top':		opts.itemArray[opts.itemNum].orig.pos.top - 18,
+				'left':		opts.itemArray[opts.itemNum].orig.pos.left - 18,
+				'height':	opts.itemArray[opts.itemNum].orig.height,
+				'width':	opts.itemArray[opts.itemNum].orig.width,
+				'opacity':	'hide'
+			};
+
+			opts.animating = true;
+
+			$("#fancy_outer").animate(itemOpts, opts.itemArray[opts.itemNum].o.zoomSpeedOut, function() {
+				$("#fancy_content").hide().empty();
+				$("#fancy_overlay,#fancy_bigIframe").remove();
+				opts.animating = false;
+			});
+
+		} else {
+			$("#fancy_outer").hide();
+			$("#fancy_content").hide().empty();
+			$("#fancy_overlay,#fancy_bigIframe").fadeOut("fast").remove();
+		}
+	};
+
+	$.fn.fancybox.showLoading = function() {
+		clearInterval(loadingTimer);
+
+		var pos = $.fn.fancybox.getViewport();
+
+		$("#fancy_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show();
+		$("#fancy_loading").bind('click', $.fn.fancybox.close);
+		
+		loadingTimer = setInterval($.fn.fancybox.animateLoading, 66);
+	};
+
+	$.fn.fancybox.animateLoading = function(el, o) {
+		if (!$("#fancy_loading").is(':visible')){
+			clearInterval(loadingTimer);
+			return;
+		}
+
+		$("#fancy_loading > div").css('top', (loadingFrame * -40) + 'px');
+
+		loadingFrame = (loadingFrame + 1) % 12;
+	};
+
+	$.fn.fancybox.init = function() {
+		if (!$('#fancy_wrap').length) {
+			$('<div id="fancy_wrap"><div id="fancy_loading"><div></div></div><div id="fancy_outer"><div id="fancy_inner"><div id="fancy_nav"></div><div id="fancy_close"></div><div id="fancy_content"></div><div id="fancy_title"></div></div></div></div>').appendTo("body");
+			$('<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>').prependTo("#fancy_inner");
+			
+			$('<table cellspacing="0" cellpadding="0" border="0"><tr><td id="fancy_title_left"></td><td id="fancy_title_main"><div></div></td><td id="fancy_title_right"></td></tr></table>').appendTo('#fancy_title');
+		}
+
+		if ($.browser.msie) {
+			$("#fancy_inner").prepend('<iframe id="fancy_freeIframe" scrolling="no" frameborder="0"></iframe>');
+		}
+
+		if (jQuery.fn.pngFix) $(document).pngFix();
+
+    	$("#fancy_close").click($.fn.fancybox.close);
+	};
+
+	$.fn.fancybox.getPosition = function(el) {
+		var pos = el.offset();
+
+		pos.top	+= $.fn.fancybox.num(el, 'paddingTop');
+		pos.top	+= $.fn.fancybox.num(el, 'borderTopWidth');
+
+ 		pos.left += $.fn.fancybox.num(el, 'paddingLeft');
+		pos.left += $.fn.fancybox.num(el, 'borderLeftWidth');
+
+		return pos;
+	};
+
+	$.fn.fancybox.num = function (el, prop) {
+		return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
+	};
+
+	$.fn.fancybox.getPageScroll = function() {
+		var xScroll, yScroll;
+
+		if (self.pageYOffset) {
+			yScroll = self.pageYOffset;
+			xScroll = self.pageXOffset;
+		} else if (document.documentElement && document.documentElement.scrollTop) {
+			yScroll = document.documentElement.scrollTop;
+			xScroll = document.documentElement.scrollLeft;
+		} else if (document.body) {
+			yScroll = document.body.scrollTop;
+			xScroll = document.body.scrollLeft;	
+		}
+
+		return [xScroll, yScroll]; 
+	};
+
+	$.fn.fancybox.getViewport = function() {
+		var scroll = $.fn.fancybox.getPageScroll();
+
+		return [$(window).width(), $(window).height(), scroll[0], scroll[1]];
+	};
+
+	$.fn.fancybox.getMaxSize = function(maxWidth, maxHeight, imageWidth, imageHeight) {
+		var r = Math.min(Math.min(maxWidth, imageWidth) / imageWidth, Math.min(maxHeight, imageHeight) / imageHeight);
+
+		return [Math.round(r * imageWidth), Math.round(r * imageHeight)];
+	};
+
+	$.fn.fancybox.defaults = {
+		hideOnContentClick:	false,
+		zoomSpeedIn:		500,
+		zoomSpeedOut:		500,
+		frameWidth:			600,
+		frameHeight:		400,
+		overlayShow:		false,
+		overlayOpacity:		0.4,
+		itemLoadCallback:	null
+	};
+})(jQuery);
\ No newline at end of file

Added: trunk/includes/fancybox/jquery.pngFix.pack.js
==============================================================================
--- (empty file)
+++ trunk/includes/fancybox/jquery.pngFix.pack.js	Fri Feb 27 21:58:06 2009
@@ -0,0 +1,11 @@
+/**
+ * --------------------------------------------------------------------
+ * jQuery-Plugin "pngFix"
+ * Version: 1.1, 11.09.2007
+ * by Andreas Eberhard, andreas eberhard gmail com
+ *                      http://jquery.andreaseberhard.de/
+ *
+ * Copyright (c) 2007 Andreas Eberhard
+ * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
+ */
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('(s($){3.1s.1k=s(j){j=3.1a({12:\'1m.1j\'},j);8 k=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 5.5")!=-1);8 l=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 6.0")!=-1);o(3.17.16&&(k||l)){3(2).L("1r[ m$= M]").z(s(){3(2).7(\'q\',3(2).q());3(2).7(\'p\',3(2).p());8 a=\'\';8 b=\'\';8 c=(3(2).7(\'K\'))?\'K="\'+3(2).7(\'K\')+\'" \':\'\';8 d=(3(2).7(\'A\'))?\'A="\'+3(2).7(\'A\')+\'" \':\'\';8 e=(3(2).7(\'C\'))?\'C="\'+3(2).7(\'C\')+\'" \':\'\';8 f=(3(2).7(\'B\'))?\'B="\'+3(2).7(\'B\')+\'" \':\'\';8 g=(3(2).7(\'R\'))?\'1d:\'+3(2).7(\'R\')+\';\':\'\';8 h=(3(2).1c().7(\'1b\'))?\'19:18;\':\'\';o(2.9.y){a+=\'y:\'+2.9.y+\';\';2.9.y=\'\'}o(2.9.t){a+=\'t:\'+2.9.t+\';\';2.9.t=\'\'}o(2.9.w){a
 +=\'w:\'+2.9.w+\';\';2.9.w=\'\'}8 i=(2.9.15);b+=\'<x \'+c+d+e+f;b+=\'9="13:11;1q-1p:1o-1n;O:W-V;N:1l;\'+g+h;b+=\'q:\'+3(2).q()+\'u;\'+\'p:\'+3(2).p()+\'u;\';b+=\'J:I:H.r.G\'+\'(m=\\\'\'+3(2).7(\'m\')+\'\\\', D=\\\'F\\\');\';b+=i+\'"></x>\';o(a!=\'\'){b=\'<x 9="13:11;O:W-V;\'+a+h+\'q:\'+3(2).q()+\'u;\'+\'p:\'+3(2).p()+\'u;\'+\'">\'+b+\'</x>\'}3(2).1i();3(2).1h(b)});3(2).L("*").z(s(){8 a=3(2).T(\'N-S\');o(a.E(".M")!=-1){8 b=a.X(\'1g("\')[1].X(\'")\')[0];3(2).T(\'N-S\',\'1f\');3(2).Q(0).Y.J="I:H.r.G(m=\'"+b+"\',D=\'F\')"}});3(2).L("1e[ m$= M]").z(s(){8 a=3(2).7(\'m\');3(2).Q(0).Y.J=\'I:H.r.G\'+\'(m=\\\'\'+a+\'\\\', D=\\\'F\\\');\';3(2).7(\'m\',j.12)})}1t 3}})(3);',62,92,'||this|jQuery||||attr|var|style|||||||||||||src|navigator|if|height|width|Microsoft|function|padding|px|appVersion|margin|span|border|each|class|alt|title|sizingMethod|indexOf|scale|AlphaImageLoader|DXImageTransform|progid|filter|id|find|png|background|display|appName|get|align|image|css|parseInt|block|inline|s
 plit|runtimeStyle|Explorer|Internet|relative|blankgif|position|MSIE|cssText|msie|browser|hand|cursor|extend|href|parent|float|input|none|url|after|hide|gif|pngFix|transparent|blank|line|pre|space|white|img|fn|return'.split('|'),0,{}))
\ No newline at end of file

Modified: trunk/includes/imagebox.xhtml
==============================================================================
--- trunk/includes/imagebox.xhtml	(original)
+++ trunk/includes/imagebox.xhtml	Fri Feb 27 21:58:06 2009
@@ -1,15 +1,11 @@
-<script type="text/javascript" src="/includes/iutil.js"></script>
-<script type="text/javascript" src="/includes/imagebox.js"></script>
+<link rel="stylesheet" type="text/css" href="/includes/fancybox/fancy.css" />
+<script type="text/javascript" src="/includes/fancybox/jquery.fancybox.js"></script>
+<script type="text/javascript" src="/includes/fancybox/jquery.pngFix.pack.js"></script>
 <script type="text/javascript">
+	<!--
 	//image preview
-	//<!--
 	$(document).ready(function() {
-				$.ImageBox.init(
-					{
-						loaderSRC: '/images/loading.gif',
-						closeHTML: '<img src="/images/close.png" alt="x" />'
-					}
-				);
+    $(".splashes>a, .screenshots>a").fancybox();
 	});
-	//-->
+	-->
 </script>

Modified: trunk/includes/wgo-scripts.xhtml
==============================================================================
--- trunk/includes/wgo-scripts.xhtml	(original)
+++ trunk/includes/wgo-scripts.xhtml	Fri Feb 27 21:58:06 2009
@@ -1,5 +1,6 @@
 <!-- $Id: wgo-scripts.xhtml 795 2007-07-04 11:01:43Z jimmac $ -->
-<script type="text/javascript" src="/includes/jquery.js"></script>
+
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";></script>
 <!--[if lt IE 8]>
 <script type="text/javascript" src="/includes/excanvas.pack.js"></script>
 <![endif]-->

Modified: trunk/screenshots/index.htrw
==============================================================================
--- trunk/screenshots/index.htrw	(original)
+++ trunk/screenshots/index.htrw	Fri Feb 27 21:58:06 2009
@@ -14,15 +14,15 @@
   <!-- TODO: Make it easy to add new screenshots and add the rest of
   the screenshots that are in this directory. -->
 
-  <a href="linux_fullscreen.jpg" rel="imagebox-screenshots" title="GIMP running fullscreen, side by side with <a href='http://f-spot.org'>F-Spot</a>.">
+  <a href="linux_fullscreen.jpg" title="GIMP running fullscreen, side by side with <a href='http://f-spot.org'>F-Spot</a>.">
     <img src="linux_fullscreen_thumb.jpg" alt="Grid, Fullscreen Screenshot" />
   </a>
 
-  <a href="linux_mixer.jpg" rel="imagebox-screenshots" title="Full control over B/W process using the channel mixer..">
+  <a href="linux_mixer.jpg" title="Full control over B/W process using the channel mixer..">
     <img src="linux_mixer_thumb.jpg" alt="Channel Mixer" />
   </a>
 
-  <a href="linux_dualscreen_griatch_art.jpg" rel="imagebox-screenshots" title="Digital artwork from scratch in GIMP.">
+  <a href="linux_dualscreen_griatch_art.jpg" title="Digital artwork from scratch in GIMP.">
     <img src="linux_dualscreen_griatch_art_thumb.jpg" alt="Digital artwork" />
   </a>
 </div>
@@ -30,7 +30,7 @@
 <h2>Microsoft Windows Screenshots</h2>
 
 <div class="screenshots">
-  <a href="windows_crop.jpg" rel="imagebox-screenshots" title="GIMP running on Microsoft Windows features a widget theme mimicking the native environment.">
+  <a href="windows_crop.jpg" title="GIMP running on Microsoft Windows features a widget theme mimicking the native environment.">
     <img src="windows_crop_thumb.jpg" alt="GIMP on Microsoft Windows" />
   </a>
 </div>
@@ -38,7 +38,7 @@
 <h2>Mac OS X Screenshots</h2>
 
 <div class="screenshots">
-  <a href="osx_aperture.jpg" rel="imagebox-screenshots" title="GIMP side by side with Apple Aperture on Mac OS X.">
+  <a href="osx_aperture.jpg" title="GIMP side by side with Apple Aperture on Mac OS X.">
     <img src="osx_aperture_thumb.jpg" alt="GIMP on the Mac" />
   </a>
 </div>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]