summaryrefslogtreecommitdiffstats
path: root/webroot/js
diff options
context:
space:
mode:
authorraylu <raylu@mixpanel.com>2011-07-03 04:32:10 -0700
committerraylu <raylu@mixpanel.com>2011-07-03 04:32:10 -0700
commit6d182e241055bffa3bf04adcc1aef5db530fe4cd (patch)
tree3660b922f4188a57ed6e91dc6cdf6c927f2037cc /webroot/js
parentb9aa2a0396aa5f7db439bc362952f7710c7c24e9 (diff)
downloadotakuhub-6d182e241055bffa3bf04adcc1aef5db530fe4cd.tar.xz
run fromdos on all the php, css, and js files
Diffstat (limited to 'webroot/js')
-rw-r--r--webroot/js/dd_belatedpng.js654
-rw-r--r--webroot/js/functions.js92
-rw-r--r--webroot/js/jquery.anchor.js76
-rw-r--r--webroot/js/jquery.form.js72
-rw-r--r--webroot/js/jquery.lightbox-0.5.min.js82
5 files changed, 488 insertions, 488 deletions
diff --git a/webroot/js/dd_belatedpng.js b/webroot/js/dd_belatedpng.js
index 7e38cc3..58ae134 100644
--- a/webroot/js/dd_belatedpng.js
+++ b/webroot/js/dd_belatedpng.js
@@ -1,328 +1,328 @@
-/**
-* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
-* Author: Drew Diller
-* Email: drew.diller@gmail.com
-* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
-* Version: 0.0.8a
-* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
-*
-* Example usage:
-* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
-* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
-**/
-
-/*
-PLEASE READ:
-Absolutely everything in this script is SILLY. I know this. IE's rendering of certain pixels doesn't make sense, so neither does this code!
-*/
-
-var DD_belatedPNG = {
- ns: 'DD_belatedPNG',
- imgSize: {},
- delay: 10,
- nodesFixed: 0,
- createVmlNameSpace: function () { /* enable VML */
- if (document.namespaces && !document.namespaces[this.ns]) {
- document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
- }
- },
- createVmlStyleSheet: function () { /* style VML, enable behaviors */
- /*
- Just in case lots of other developers have added
- lots of other stylesheets using document.createStyleSheet
- and hit the 31-limit mark, let's not use that method!
- further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
- */
- var screenStyleSheet, printStyleSheet;
- screenStyleSheet = document.createElement('style');
- screenStyleSheet.setAttribute('media', 'screen');
- document.documentElement.firstChild.insertBefore(screenStyleSheet, document.documentElement.firstChild.firstChild);
- if (screenStyleSheet.styleSheet) {
- screenStyleSheet = screenStyleSheet.styleSheet;
- screenStyleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
- screenStyleSheet.addRule(this.ns + '\\:shape', 'position:absolute;');
- screenStyleSheet.addRule('img.' + this.ns + '_sizeFinder', 'behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;'); /* large negative top value for avoiding vertical scrollbars for large images, suggested by James O'Brien, http://www.thanatopsic.org/hendrik/ */
- this.screenStyleSheet = screenStyleSheet;
-
- /* Add a print-media stylesheet, for preventing VML artifacts from showing up in print (including preview). */
- /* Thanks to Rémi Prévost for automating this! */
- printStyleSheet = document.createElement('style');
- printStyleSheet.setAttribute('media', 'print');
- document.documentElement.firstChild.insertBefore(printStyleSheet, document.documentElement.firstChild.firstChild);
- printStyleSheet = printStyleSheet.styleSheet;
- printStyleSheet.addRule(this.ns + '\\:*', '{display: none !important;}');
- printStyleSheet.addRule('img.' + this.ns + '_sizeFinder', '{display: none !important;}');
- }
- },
- readPropertyChange: function () {
- var el, display, v;
- el = event.srcElement;
- if (!el.vmlInitiated) {
- return;
- }
- if (event.propertyName.search('background') != -1 || event.propertyName.search('border') != -1) {
- DD_belatedPNG.applyVML(el);
- }
- if (event.propertyName == 'style.display') {
- display = (el.currentStyle.display == 'none') ? 'none' : 'block';
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.display = display;
- }
- }
- }
- if (event.propertyName.search('filter') != -1) {
- DD_belatedPNG.vmlOpacity(el);
- }
- },
- vmlOpacity: function (el) {
- if (el.currentStyle.filter.search('lpha') != -1) {
- var trans = el.currentStyle.filter;
- trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
- el.vml.color.shape.style.filter = el.currentStyle.filter; /* complete guesswork */
- el.vml.image.fill.opacity = trans; /* complete guesswork */
- }
- },
- handlePseudoHover: function (el) {
- setTimeout(function () { /* wouldn't work as intended without setTimeout */
- DD_belatedPNG.applyVML(el);
- }, 1);
- },
- /**
- * This is the method to use in a document.
- * @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
- **/
- fix: function (selector) {
- if (this.screenStyleSheet) {
- var selectors, i;
- selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
- for (i=0; i<selectors.length; i++) {
- this.screenStyleSheet.addRule(selectors[i], 'behavior:expression(DD_belatedPNG.fixPng(this))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
- }
- }
- },
- applyVML: function (el) {
- el.runtimeStyle.cssText = '';
- this.vmlFill(el);
- this.vmlOffsets(el);
- this.vmlOpacity(el);
- if (el.isImg) {
- this.copyImageBorders(el);
- }
- },
- attachHandlers: function (el) {
- var self, handlers, handler, moreForAs, a, h;
- self = this;
- handlers = {resize: 'vmlOffsets', move: 'vmlOffsets'};
- if (el.nodeName == 'A') {
- moreForAs = {mouseleave: 'handlePseudoHover', mouseenter: 'handlePseudoHover', focus: 'handlePseudoHover', blur: 'handlePseudoHover'};
- for (a in moreForAs) {
- if (moreForAs.hasOwnProperty(a)) {
- handlers[a] = moreForAs[a];
- }
- }
- }
- for (h in handlers) {
- if (handlers.hasOwnProperty(h)) {
- handler = function () {
- self[handlers[h]](el);
- };
- el.attachEvent('on' + h, handler);
- }
- }
- el.attachEvent('onpropertychange', this.readPropertyChange);
- },
- giveLayout: function (el) {
- el.style.zoom = 1;
- if (el.currentStyle.position == 'static') {
- el.style.position = 'relative';
- }
- },
- copyImageBorders: function (el) {
- var styles, s;
- styles = {'borderStyle':true, 'borderWidth':true, 'borderColor':true};
- for (s in styles) {
- if (styles.hasOwnProperty(s)) {
- el.vml.color.shape.style[s] = el.currentStyle[s];
- }
- }
- },
- vmlFill: function (el) {
- if (!el.currentStyle) {
- return;
- } else {
- var elStyle, noImg, lib, v, img, imgLoaded;
- elStyle = el.currentStyle;
- }
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.zIndex = elStyle.zIndex;
- }
- }
- el.runtimeStyle.backgroundColor = '';
- el.runtimeStyle.backgroundImage = '';
- noImg = true;
- if (elStyle.backgroundImage != 'none' || el.isImg) {
- if (!el.isImg) {
- el.vmlBg = elStyle.backgroundImage;
- el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
- }
- else {
- el.vmlBg = el.src;
- }
- lib = this;
- if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
- img = document.createElement('img');
- lib.imgSize[el.vmlBg] = img;
- img.className = lib.ns + '_sizeFinder';
- img.runtimeStyle.cssText = 'behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
- imgLoaded = function () {
- this.width = this.offsetWidth; /* weird cache-busting requirement! */
- this.height = this.offsetHeight;
- lib.vmlOffsets(el);
- };
- img.attachEvent('onload', imgLoaded);
- img.src = el.vmlBg;
- img.removeAttribute('width');
- img.removeAttribute('height');
- document.body.insertBefore(img, document.body.firstChild);
- }
- el.vml.image.fill.src = el.vmlBg;
- noImg = false;
- }
- el.vml.image.fill.on = !noImg;
- el.vml.image.fill.color = 'none';
- el.vml.color.shape.style.backgroundColor = elStyle.backgroundColor;
- el.runtimeStyle.backgroundImage = 'none';
- el.runtimeStyle.backgroundColor = 'transparent';
- },
- /* IE can't figure out what do when the offsetLeft and the clientLeft add up to 1, and the VML ends up getting fuzzy... so we have to push/enlarge things by 1 pixel and then clip off the excess */
- vmlOffsets: function (el) {
- var thisStyle, size, fudge, makeVisible, bg, bgR, dC, altC, b, c, v;
- thisStyle = el.currentStyle;
- size = {'W':el.clientWidth+1, 'H':el.clientHeight+1, 'w':this.imgSize[el.vmlBg].width, 'h':this.imgSize[el.vmlBg].height, 'L':el.offsetLeft, 'T':el.offsetTop, 'bLW':el.clientLeft, 'bTW':el.clientTop};
- fudge = (size.L + size.bLW == 1) ? 1 : 0;
- /* vml shape, left, top, width, height, origin */
- makeVisible = function (vml, l, t, w, h, o) {
- vml.coordsize = w+','+h;
- vml.coordorigin = o+','+o;
- vml.path = 'm0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';
- vml.style.width = w + 'px';
- vml.style.height = h + 'px';
- vml.style.left = l + 'px';
- vml.style.top = t + 'px';
- };
- makeVisible(el.vml.color.shape, (size.L + (el.isImg ? 0 : size.bLW)), (size.T + (el.isImg ? 0 : size.bTW)), (size.W-1), (size.H-1), 0);
- makeVisible(el.vml.image.shape, (size.L + size.bLW), (size.T + size.bTW), (size.W), (size.H), 1 );
- bg = {'X':0, 'Y':0};
- if (el.isImg) {
- bg.X = parseInt(thisStyle.paddingLeft, 10) + 1;
- bg.Y = parseInt(thisStyle.paddingTop, 10) + 1;
- }
- else {
- for (b in bg) {
- if (bg.hasOwnProperty(b)) {
- this.figurePercentage(bg, size, b, thisStyle['backgroundPosition'+b]);
- }
- }
- }
- el.vml.image.fill.position = (bg.X/size.W) + ',' + (bg.Y/size.H);
- bgR = thisStyle.backgroundRepeat;
- dC = {'T':1, 'R':size.W+fudge, 'B':size.H, 'L':1+fudge}; /* these are defaults for repeat of any kind */
- altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'W'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'H'} };
- if (bgR != 'repeat' || el.isImg) {
- c = {'T':(bg.Y), 'R':(bg.X+size.w), 'B':(bg.Y+size.h), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
- if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
- v = bgR.split('repeat-')[1].toUpperCase();
- c[altC[v].b1] = 1;
- c[altC[v].b2] = size[altC[v].d];
- }
- if (c.B > size.H) {
- c.B = size.H;
- }
- el.vml.image.shape.style.clip = 'rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';
- }
- else {
- el.vml.image.shape.style.clip = 'rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';
- }
- },
- figurePercentage: function (bg, size, axis, position) {
- var horizontal, fraction;
- fraction = true;
- horizontal = (axis == 'X');
- switch(position) {
- case 'left':
- case 'top':
- bg[axis] = 0;
- break;
- case 'center':
- bg[axis] = 0.5;
- break;
- case 'right':
- case 'bottom':
- bg[axis] = 1;
- break;
- default:
- if (position.search('%') != -1) {
- bg[axis] = parseInt(position, 10) / 100;
- }
- else {
- fraction = false;
- }
- }
- bg[axis] = Math.ceil( fraction ? ( (size[horizontal?'W': 'H'] * bg[axis]) - (size[horizontal?'w': 'h'] * bg[axis]) ) : parseInt(position, 10) );
- if (bg[axis] % 2 === 0) {
- bg[axis]++;
- }
- return bg[axis];
- },
- fixPng: function (el) {
- el.style.behavior = 'none';
- var lib, els, nodeStr, v, e;
- if (el.nodeName == 'BODY' || el.nodeName == 'TD' || el.nodeName == 'TR') { /* elements not supported yet */
- return;
- }
- el.isImg = false;
- if (el.nodeName == 'IMG') {
- if(el.src.toLowerCase().search(/\.png$/) != -1) {
- el.isImg = true;
- el.style.visibility = 'hidden';
- }
- else {
- return;
- }
- }
- else if (el.currentStyle.backgroundImage.toLowerCase().search('.png') == -1) {
- return;
- }
- lib = DD_belatedPNG;
- el.vml = {color: {}, image: {}};
- els = {shape: {}, fill: {}};
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- for (e in els) {
- if (els.hasOwnProperty(e)) {
- nodeStr = lib.ns + ':' + e;
- el.vml[v][e] = document.createElement(nodeStr);
- }
- }
- el.vml[v].shape.stroked = false;
- el.vml[v].shape.appendChild(el.vml[v].fill);
- el.parentNode.insertBefore(el.vml[v].shape, el);
- }
- }
- el.vml.image.shape.fillcolor = 'none'; /* Don't show blank white shapeangle when waiting for image to load. */
- el.vml.image.fill.type = 'tile'; /* Makes image show up. */
- el.vml.color.fill.on = false; /* Actually going to apply vml element's style.backgroundColor, so hide the whiteness. */
- lib.attachHandlers(el);
- lib.giveLayout(el);
- lib.giveLayout(el.offsetParent);
- el.vmlInitiated = true;
- lib.applyVML(el); /* Render! */
- }
-};
-try {
- document.execCommand("BackgroundImageCache", false, true); /* TredoSoft Multiple IE doesn't like this, so try{} it */
-} catch(r) {}
-DD_belatedPNG.createVmlNameSpace();
+/**
+* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
+* Author: Drew Diller
+* Email: drew.diller@gmail.com
+* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
+* Version: 0.0.8a
+* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
+*
+* Example usage:
+* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
+* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
+**/
+
+/*
+PLEASE READ:
+Absolutely everything in this script is SILLY. I know this. IE's rendering of certain pixels doesn't make sense, so neither does this code!
+*/
+
+var DD_belatedPNG = {
+ ns: 'DD_belatedPNG',
+ imgSize: {},
+ delay: 10,
+ nodesFixed: 0,
+ createVmlNameSpace: function () { /* enable VML */
+ if (document.namespaces && !document.namespaces[this.ns]) {
+ document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
+ }
+ },
+ createVmlStyleSheet: function () { /* style VML, enable behaviors */
+ /*
+ Just in case lots of other developers have added
+ lots of other stylesheets using document.createStyleSheet
+ and hit the 31-limit mark, let's not use that method!
+ further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
+ */
+ var screenStyleSheet, printStyleSheet;
+ screenStyleSheet = document.createElement('style');
+ screenStyleSheet.setAttribute('media', 'screen');
+ document.documentElement.firstChild.insertBefore(screenStyleSheet, document.documentElement.firstChild.firstChild);
+ if (screenStyleSheet.styleSheet) {
+ screenStyleSheet = screenStyleSheet.styleSheet;
+ screenStyleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
+ screenStyleSheet.addRule(this.ns + '\\:shape', 'position:absolute;');
+ screenStyleSheet.addRule('img.' + this.ns + '_sizeFinder', 'behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;'); /* large negative top value for avoiding vertical scrollbars for large images, suggested by James O'Brien, http://www.thanatopsic.org/hendrik/ */
+ this.screenStyleSheet = screenStyleSheet;
+
+ /* Add a print-media stylesheet, for preventing VML artifacts from showing up in print (including preview). */
+ /* Thanks to Rémi Prévost for automating this! */
+ printStyleSheet = document.createElement('style');
+ printStyleSheet.setAttribute('media', 'print');
+ document.documentElement.firstChild.insertBefore(printStyleSheet, document.documentElement.firstChild.firstChild);
+ printStyleSheet = printStyleSheet.styleSheet;
+ printStyleSheet.addRule(this.ns + '\\:*', '{display: none !important;}');
+ printStyleSheet.addRule('img.' + this.ns + '_sizeFinder', '{display: none !important;}');
+ }
+ },
+ readPropertyChange: function () {
+ var el, display, v;
+ el = event.srcElement;
+ if (!el.vmlInitiated) {
+ return;
+ }
+ if (event.propertyName.search('background') != -1 || event.propertyName.search('border') != -1) {
+ DD_belatedPNG.applyVML(el);
+ }
+ if (event.propertyName == 'style.display') {
+ display = (el.currentStyle.display == 'none') ? 'none' : 'block';
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ el.vml[v].shape.style.display = display;
+ }
+ }
+ }
+ if (event.propertyName.search('filter') != -1) {
+ DD_belatedPNG.vmlOpacity(el);
+ }
+ },
+ vmlOpacity: function (el) {
+ if (el.currentStyle.filter.search('lpha') != -1) {
+ var trans = el.currentStyle.filter;
+ trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
+ el.vml.color.shape.style.filter = el.currentStyle.filter; /* complete guesswork */
+ el.vml.image.fill.opacity = trans; /* complete guesswork */
+ }
+ },
+ handlePseudoHover: function (el) {
+ setTimeout(function () { /* wouldn't work as intended without setTimeout */
+ DD_belatedPNG.applyVML(el);
+ }, 1);
+ },
+ /**
+ * This is the method to use in a document.
+ * @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
+ **/
+ fix: function (selector) {
+ if (this.screenStyleSheet) {
+ var selectors, i;
+ selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
+ for (i=0; i<selectors.length; i++) {
+ this.screenStyleSheet.addRule(selectors[i], 'behavior:expression(DD_belatedPNG.fixPng(this))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
+ }
+ }
+ },
+ applyVML: function (el) {
+ el.runtimeStyle.cssText = '';
+ this.vmlFill(el);
+ this.vmlOffsets(el);
+ this.vmlOpacity(el);
+ if (el.isImg) {
+ this.copyImageBorders(el);
+ }
+ },
+ attachHandlers: function (el) {
+ var self, handlers, handler, moreForAs, a, h;
+ self = this;
+ handlers = {resize: 'vmlOffsets', move: 'vmlOffsets'};
+ if (el.nodeName == 'A') {
+ moreForAs = {mouseleave: 'handlePseudoHover', mouseenter: 'handlePseudoHover', focus: 'handlePseudoHover', blur: 'handlePseudoHover'};
+ for (a in moreForAs) {
+ if (moreForAs.hasOwnProperty(a)) {
+ handlers[a] = moreForAs[a];
+ }
+ }
+ }
+ for (h in handlers) {
+ if (handlers.hasOwnProperty(h)) {
+ handler = function () {
+ self[handlers[h]](el);
+ };
+ el.attachEvent('on' + h, handler);
+ }
+ }
+ el.attachEvent('onpropertychange', this.readPropertyChange);
+ },
+ giveLayout: function (el) {
+ el.style.zoom = 1;
+ if (el.currentStyle.position == 'static') {
+ el.style.position = 'relative';
+ }
+ },
+ copyImageBorders: function (el) {
+ var styles, s;
+ styles = {'borderStyle':true, 'borderWidth':true, 'borderColor':true};
+ for (s in styles) {
+ if (styles.hasOwnProperty(s)) {
+ el.vml.color.shape.style[s] = el.currentStyle[s];
+ }
+ }
+ },
+ vmlFill: function (el) {
+ if (!el.currentStyle) {
+ return;
+ } else {
+ var elStyle, noImg, lib, v, img, imgLoaded;
+ elStyle = el.currentStyle;
+ }
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ el.vml[v].shape.style.zIndex = elStyle.zIndex;
+ }
+ }
+ el.runtimeStyle.backgroundColor = '';
+ el.runtimeStyle.backgroundImage = '';
+ noImg = true;
+ if (elStyle.backgroundImage != 'none' || el.isImg) {
+ if (!el.isImg) {
+ el.vmlBg = elStyle.backgroundImage;
+ el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
+ }
+ else {
+ el.vmlBg = el.src;
+ }
+ lib = this;
+ if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
+ img = document.createElement('img');
+ lib.imgSize[el.vmlBg] = img;
+ img.className = lib.ns + '_sizeFinder';
+ img.runtimeStyle.cssText = 'behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
+ imgLoaded = function () {
+ this.width = this.offsetWidth; /* weird cache-busting requirement! */
+ this.height = this.offsetHeight;
+ lib.vmlOffsets(el);
+ };
+ img.attachEvent('onload', imgLoaded);
+ img.src = el.vmlBg;
+ img.removeAttribute('width');
+ img.removeAttribute('height');
+ document.body.insertBefore(img, document.body.firstChild);
+ }
+ el.vml.image.fill.src = el.vmlBg;
+ noImg = false;
+ }
+ el.vml.image.fill.on = !noImg;
+ el.vml.image.fill.color = 'none';
+ el.vml.color.shape.style.backgroundColor = elStyle.backgroundColor;
+ el.runtimeStyle.backgroundImage = 'none';
+ el.runtimeStyle.backgroundColor = 'transparent';
+ },
+ /* IE can't figure out what do when the offsetLeft and the clientLeft add up to 1, and the VML ends up getting fuzzy... so we have to push/enlarge things by 1 pixel and then clip off the excess */
+ vmlOffsets: function (el) {
+ var thisStyle, size, fudge, makeVisible, bg, bgR, dC, altC, b, c, v;
+ thisStyle = el.currentStyle;
+ size = {'W':el.clientWidth+1, 'H':el.clientHeight+1, 'w':this.imgSize[el.vmlBg].width, 'h':this.imgSize[el.vmlBg].height, 'L':el.offsetLeft, 'T':el.offsetTop, 'bLW':el.clientLeft, 'bTW':el.clientTop};
+ fudge = (size.L + size.bLW == 1) ? 1 : 0;
+ /* vml shape, left, top, width, height, origin */
+ makeVisible = function (vml, l, t, w, h, o) {
+ vml.coordsize = w+','+h;
+ vml.coordorigin = o+','+o;
+ vml.path = 'm0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';
+ vml.style.width = w + 'px';
+ vml.style.height = h + 'px';
+ vml.style.left = l + 'px';
+ vml.style.top = t + 'px';
+ };
+ makeVisible(el.vml.color.shape, (size.L + (el.isImg ? 0 : size.bLW)), (size.T + (el.isImg ? 0 : size.bTW)), (size.W-1), (size.H-1), 0);
+ makeVisible(el.vml.image.shape, (size.L + size.bLW), (size.T + size.bTW), (size.W), (size.H), 1 );
+ bg = {'X':0, 'Y':0};
+ if (el.isImg) {
+ bg.X = parseInt(thisStyle.paddingLeft, 10) + 1;
+ bg.Y = parseInt(thisStyle.paddingTop, 10) + 1;
+ }
+ else {
+ for (b in bg) {
+ if (bg.hasOwnProperty(b)) {
+ this.figurePercentage(bg, size, b, thisStyle['backgroundPosition'+b]);
+ }
+ }
+ }
+ el.vml.image.fill.position = (bg.X/size.W) + ',' + (bg.Y/size.H);
+ bgR = thisStyle.backgroundRepeat;
+ dC = {'T':1, 'R':size.W+fudge, 'B':size.H, 'L':1+fudge}; /* these are defaults for repeat of any kind */
+ altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'W'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'H'} };
+ if (bgR != 'repeat' || el.isImg) {
+ c = {'T':(bg.Y), 'R':(bg.X+size.w), 'B':(bg.Y+size.h), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
+ if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
+ v = bgR.split('repeat-')[1].toUpperCase();
+ c[altC[v].b1] = 1;
+ c[altC[v].b2] = size[altC[v].d];
+ }
+ if (c.B > size.H) {
+ c.B = size.H;
+ }
+ el.vml.image.shape.style.clip = 'rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';
+ }
+ else {
+ el.vml.image.shape.style.clip = 'rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';
+ }
+ },
+ figurePercentage: function (bg, size, axis, position) {
+ var horizontal, fraction;
+ fraction = true;
+ horizontal = (axis == 'X');
+ switch(position) {
+ case 'left':
+ case 'top':
+ bg[axis] = 0;
+ break;
+ case 'center':
+ bg[axis] = 0.5;
+ break;
+ case 'right':
+ case 'bottom':
+ bg[axis] = 1;
+ break;
+ default:
+ if (position.search('%') != -1) {
+ bg[axis] = parseInt(position, 10) / 100;
+ }
+ else {
+ fraction = false;
+ }
+ }
+ bg[axis] = Math.ceil( fraction ? ( (size[horizontal?'W': 'H'] * bg[axis]) - (size[horizontal?'w': 'h'] * bg[axis]) ) : parseInt(position, 10) );
+ if (bg[axis] % 2 === 0) {
+ bg[axis]++;
+ }
+ return bg[axis];
+ },
+ fixPng: function (el) {
+ el.style.behavior = 'none';
+ var lib, els, nodeStr, v, e;
+ if (el.nodeName == 'BODY' || el.nodeName == 'TD' || el.nodeName == 'TR') { /* elements not supported yet */
+ return;
+ }
+ el.isImg = false;
+ if (el.nodeName == 'IMG') {
+ if(el.src.toLowerCase().search(/\.png$/) != -1) {
+ el.isImg = true;
+ el.style.visibility = 'hidden';
+ }
+ else {
+ return;
+ }
+ }
+ else if (el.currentStyle.backgroundImage.toLowerCase().search('.png') == -1) {
+ return;
+ }
+ lib = DD_belatedPNG;
+ el.vml = {color: {}, image: {}};
+ els = {shape: {}, fill: {}};
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ for (e in els) {
+ if (els.hasOwnProperty(e)) {
+ nodeStr = lib.ns + ':' + e;
+ el.vml[v][e] = document.createElement(nodeStr);
+ }
+ }
+ el.vml[v].shape.stroked = false;
+ el.vml[v].shape.appendChild(el.vml[v].fill);
+ el.parentNode.insertBefore(el.vml[v].shape, el);
+ }
+ }
+ el.vml.image.shape.fillcolor = 'none'; /* Don't show blank white shapeangle when waiting for image to load. */
+ el.vml.image.fill.type = 'tile'; /* Makes image show up. */
+ el.vml.color.fill.on = false; /* Actually going to apply vml element's style.backgroundColor, so hide the whiteness. */
+ lib.attachHandlers(el);
+ lib.giveLayout(el);
+ lib.giveLayout(el.offsetParent);
+ el.vmlInitiated = true;
+ lib.applyVML(el); /* Render! */
+ }
+};
+try {
+ document.execCommand("BackgroundImageCache", false, true); /* TredoSoft Multiple IE doesn't like this, so try{} it */
+} catch(r) {}
+DD_belatedPNG.createVmlNameSpace();
DD_belatedPNG.createVmlStyleSheet(); \ No newline at end of file
diff --git a/webroot/js/functions.js b/webroot/js/functions.js
index 02319d8..be9a9bb 100644
--- a/webroot/js/functions.js
+++ b/webroot/js/functions.js
@@ -1,46 +1,46 @@
-// Kameleon Template
-//Author: Chris Mooney (http://themeforest.net/user/ChrisMooney)
-
-// Cufon Setup
-jQuery(document).ready(function($) {
-Cufon.replace('h3,h4,h5,.process,#tagline ');
-
-
-//Portfolio Hover Effect
- $('.portfolio-small li img, .portfolio-list li img').hover(function() {
-
- $(this).children('a').show();
- $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: .5 }, 300);
- $(this).stop().css('opacity', 1);
-
- }, function() {
- $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: 1 }, 300);
-
- });
-
-//Homepage Screenshot Scroll
-$(".scrollable").scrollable();
-
-
-//LightBox Setup
- $('.portfolio-small a, .portfolio-list a').lightBox({
- fixedNavigation:true,
- overlayOpacity: 0.8,
- imageLoading: 'img/lightbox/lightbox-ico-loading.gif',
- imageBtnClose: 'img/lightbox/lightbox-btn-close.gif',
- imageBtnPrev: 'img/lightbox/lightbox-btn-prev.gif',
- imageBtnNext: 'img/lightbox/lightbox-btn-next.gif',
- imageBlank: 'img/lightbox/lightbox-blank.gif'
-
- });
-
-// Tipsy Tooltips
-$('.tooltip').tipsy({fade: true});
-$('.tooltip.north').tipsy({fade: true, gravity: 's'});
-$('.tooltip.east').tipsy({fade: true, gravity: 'w'});
-$('.tooltip.west').tipsy({fade: true, gravity: 'e'});
-// Form Tooltips
-$('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'});
-
-
-});
+// Kameleon Template
+//Author: Chris Mooney (http://themeforest.net/user/ChrisMooney)
+
+// Cufon Setup
+jQuery(document).ready(function($) {
+Cufon.replace('h3,h4,h5,.process,#tagline ');
+
+
+//Portfolio Hover Effect
+ $('.portfolio-small li img, .portfolio-list li img').hover(function() {
+
+ $(this).children('a').show();
+ $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: .5 }, 300);
+ $(this).stop().css('opacity', 1);
+
+ }, function() {
+ $('.portfolio-small li img, .portfolio-list li img').stop().animate({ opacity: 1 }, 300);
+
+ });
+
+//Homepage Screenshot Scroll
+$(".scrollable").scrollable();
+
+
+//LightBox Setup
+ $('.portfolio-small a, .portfolio-list a').lightBox({
+ fixedNavigation:true,
+ overlayOpacity: 0.8,
+ imageLoading: 'img/lightbox/lightbox-ico-loading.gif',
+ imageBtnClose: 'img/lightbox/lightbox-btn-close.gif',
+ imageBtnPrev: 'img/lightbox/lightbox-btn-prev.gif',
+ imageBtnNext: 'img/lightbox/lightbox-btn-next.gif',
+ imageBlank: 'img/lightbox/lightbox-blank.gif'
+
+ });
+
+// Tipsy Tooltips
+$('.tooltip').tipsy({fade: true});
+$('.tooltip.north').tipsy({fade: true, gravity: 's'});
+$('.tooltip.east').tipsy({fade: true, gravity: 'w'});
+$('.tooltip.west').tipsy({fade: true, gravity: 'e'});
+// Form Tooltips
+$('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'});
+
+
+});
diff --git a/webroot/js/jquery.anchor.js b/webroot/js/jquery.anchor.js
index d6db7ab..63bcee3 100644
--- a/webroot/js/jquery.anchor.js
+++ b/webroot/js/jquery.anchor.js
@@ -1,39 +1,39 @@
-/*******
-
- *** Anchor Slider by Cedric Dugas ***
- *** Http://www.position-absolute.com ***
-
- Never have an anchor jumping your content, slide it.
-
- Don't forget to put an id to your anchor !
- You can use and modify this script for any project you want, but please leave this comment as credit.
-
-*****/
-
-
-
-$(document).ready(function() {
- $("a.anchorLink").anchorAnimate()
-});
-
-jQuery.fn.anchorAnimate = function(settings) {
-
- settings = jQuery.extend({
- speed : 1100
- }, settings);
-
- return this.each(function(){
- var caller = this
- $(caller).click(function (event) {
- event.preventDefault()
- var locationHref = window.location.href
- var elementClick = $(caller).attr("href")
-
- var destination = $(elementClick).offset().top;
- $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
- window.location.hash = elementClick
- });
- return false;
- })
- })
+/*******
+
+ *** Anchor Slider by Cedric Dugas ***
+ *** Http://www.position-absolute.com ***
+
+ Never have an anchor jumping your content, slide it.
+
+ Don't forget to put an id to your anchor !
+ You can use and modify this script for any project you want, but please leave this comment as credit.
+
+*****/
+
+
+
+$(document).ready(function() {
+ $("a.anchorLink").anchorAnimate()
+});
+
+jQuery.fn.anchorAnimate = function(settings) {
+
+ settings = jQuery.extend({
+ speed : 1100
+ }, settings);
+
+ return this.each(function(){
+ var caller = this
+ $(caller).click(function (event) {
+ event.preventDefault()
+ var locationHref = window.location.href
+ var elementClick = $(caller).attr("href")
+
+ var destination = $(elementClick).offset().top;
+ $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
+ window.location.hash = elementClick
+ });
+ return false;
+ })
+ })
} \ No newline at end of file
diff --git a/webroot/js/jquery.form.js b/webroot/js/jquery.form.js
index e9d5df5..d0e118e 100644
--- a/webroot/js/jquery.form.js
+++ b/webroot/js/jquery.form.js
@@ -1,37 +1,37 @@
-jQuery(document).ready(function(){
-
- $('#contactform').submit(function(){
-
- var action = $(this).attr('action');
-
- $("#message").slideUp(750,function() {
- $('#message').hide();
-
- $('#submit')
- .after('<img src="./img/form/ajax-loader.gif" class="loader" />')
- .attr('disabled','disabled');
-
- $.post(action, {
- name: $('#name').val(),
- email: $('#email').val(),
- subject: $('#subject').val(),
- comments: $('#comments').val(),
- verify: $('#verify').val()
- },
- function(data){
- document.getElementById('message').innerHTML = data;
- $('#message').slideDown('slow');
- $('#contactform img.loader').fadeOut('slow',function(){$(this).remove()});
- $('#contactform #submit').attr('disabled','');
- if(data.match('success') != null) $('#contactform').slideUp('slow');
-
- }
- );
-
- });
-
- return false;
-
- });
-
+jQuery(document).ready(function(){
+
+ $('#contactform').submit(function(){
+
+ var action = $(this).attr('action');
+
+ $("#message").slideUp(750,function() {
+ $('#message').hide();
+
+ $('#submit')
+ .after('<img src="./img/form/ajax-loader.gif" class="loader" />')
+ .attr('disabled','disabled');
+
+ $.post(action, {
+ name: $('#name').val(),
+ email: $('#email').val(),
+ subject: $('#subject').val(),
+ comments: $('#comments').val(),
+ verify: $('#verify').val()
+ },
+ function(data){
+ document.getElementById('message').innerHTML = data;
+ $('#message').slideDown('slow');
+ $('#contactform img.loader').fadeOut('slow',function(){$(this).remove()});
+ $('#contactform #submit').attr('disabled','');
+ if(data.match('success') != null) $('#contactform').slideUp('slow');
+
+ }
+ );
+
+ });
+
+ return false;
+
+ });
+
}); \ No newline at end of file
diff --git a/webroot/js/jquery.lightbox-0.5.min.js b/webroot/js/jquery.lightbox-0.5.min.js
index 5f13b0b..429f0c5 100644
--- a/webroot/js/jquery.lightbox-0.5.min.js
+++ b/webroot/js/jquery.lightbox-0.5.min.js
@@ -1,42 +1,42 @@
-/**
- * jQuery lightBox plugin
- * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
- * and adapted to me for use like a plugin from jQuery.
- * @name jquery-lightbox-0.5.js
- * @author Leandro Vieira Pinho - http://leandrovieira.com
- * @version 0.5
- * @date April 11, 2008
- * @category jQuery plugin
- * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
- * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
- * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
- */
-(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'images/lightbox-ico-loading.gif',imageBtnPrev:'images/lightbox-btn-prev.gif',imageBtnNext:'images/lightbox-btn-next.gif',imageBtnClose:'images/lightbox-btn-close.gif',imageBlank:'images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
-function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
-while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
-_set_image_to_view();}
-function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
-function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
-var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
-$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
-if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
-function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
-if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
-_enable_keyboard_navigation();}
-function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
-function _disable_keyboard_navigation(){$(document).unbind();}
-function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
-key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
-if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
-if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
-function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
-if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
-function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
-function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
-var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
-windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
-if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
-if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
-arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){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;}
-arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
+/**
+ * jQuery lightBox plugin
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
+ * and adapted to me for use like a plugin from jQuery.
+ * @name jquery-lightbox-0.5.js
+ * @author Leandro Vieira Pinho - http://leandrovieira.com
+ * @version 0.5
+ * @date April 11, 2008
+ * @category jQuery plugin
+ * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
+ * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
+ * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
+ */
+(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'images/lightbox-ico-loading.gif',imageBtnPrev:'images/lightbox-btn-prev.gif',imageBtnNext:'images/lightbox-btn-next.gif',imageBtnClose:'images/lightbox-btn-close.gif',imageBlank:'images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
+function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
+while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
+_set_image_to_view();}
+function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
+function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
+var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
+$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
+if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
+function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
+if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
+_enable_keyboard_navigation();}
+function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
+function _disable_keyboard_navigation(){$(document).unbind();}
+function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
+key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
+if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
+if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
+function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
+if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
+function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
+function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
+var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
+windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
+if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
+if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
+arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){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;}
+arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery); \ No newline at end of file