Permalink
Browse files

Added more missing content files

  • Loading branch information...
1 parent e4bbff7 commit ce7314ce8428c8cdfe74fb6cf9ab51177ee7b883 @kolber committed Dec 12, 2009
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Page not found (404)</title>
+ <meta name="description" content="">
+ <style type="text/css" media="screen">
+ body { font-family: "Times New Roman", "Times", times, sans-serif; text-align: center; }
+ h1 { margin: 35px 0px 6px 0px; text-decoration: underline; }
+ h2 { margin: 6px 0px; }
+ p { margin: 6px 0px; }
+ a { color: #000; text-decoration: none; border-bottom: 1px solid #999; }
+ </style>
+ </head>
+ <body>
+ <div id="container">
+ <h1>404</h1>
+ <h2>Page could not be found.</h2>
+ <p>Unfortunately, the page you were looking for does not exist here.</p>
+ <p><a href="/">&larr; Index</a></p>
+ </div>
+ </body>
+</html>
@@ -0,0 +1,83 @@
+Gallery = {
+ currentImage: 0,
+ imageHolders: null,
+ imageHolderWidth: null,
+ imageCountHolder: null,
+ maxCount: null,
+ nextButton: null,
+ prevButoon: null,
+ init: function(imageHolder, imageWrapperWidth, imageCountHolder, nextButton, prevButton, descriptionHolder, descriptionWidth) {
+ // set custom variables
+ this.imageHolder = imageHolder;
+ this.imageWrapperWidth = imageWrapperWidth;
+ this.imageCountHolder = imageCountHolder;
+ this.maxCount = $("img", imageHolder).length;
+ this.nextButton = nextButton;
+ this.prevButton = prevButton;
+ this.descriptionHolder = descriptionHolder;
+ this.descriptionWidth = descriptionWidth;
+
+ // check if a specific image has been specified in the URL
+ if(document.URL.match(/#[0-9]+/)) {
+ this.gotoImage(new Number(new String(document.URL.match(/#[0-9]+/)).replace("#", "")) - 1);
+ } else {
+ // write maxCount
+ this.updateCount(0);
+ }
+ //
+ this.attachEvents();
+ },
+ attachEvents: function() {
+ // write next/prev functions
+ this.nextButton.click(function() {
+ Gallery.next();
+ this.blur();
+ return false;
+ });
+ this.prevButton.click(function() {
+ Gallery.previous();
+ this.blur();
+ return false;
+ });
+ },
+ next: function() {
+ // show next image
+ this.gotoImage(this.currentImage + 1);
+ },
+ previous: function() {
+ // show previous image
+ this.gotoImage(this.currentImage - 1);
+ },
+ updateCount: function(newCount) {
+ // set current image
+ this.currentImage = newCount;
+ // update current image display
+ this.imageCountHolder.innerHTML = (newCount + 1) + "/" + this.maxCount;
+ // update url hash
+ //window.location.hash = (newCount + 1);
+ },
+ gotoImage: function(num) {
+ // if not too high
+ if(num >= this.maxCount) {
+ num = 0;
+ } else if(num < 0) {
+ num = this.maxCount - 1;
+ }
+ //animate
+ this.animateContainers(num);
+ // update count
+ this.updateCount(num);
+ },
+ animateContainers: function(num) {
+ this.imageHolder.animate({
+ marginLeft: (num * this.imageWrapperWidth) * -1 + "px"
+ }, { duration: 600, queue: false });
+
+ // skip attempt to animate description holder if it does not exist
+ if(!this.descriptionHolder) return;
+
+ this.descriptionHolder.animate({
+ marginLeft: (num * this.descriptionWidth) * -1 + "px"
+ }, { duration: 600, queue: false });
+ }
+}
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ce7314c

Please sign in to comment.