/*jslint white: true*//*Analogue 1.12.01, Copyright (c) 2012 Analogue Web Design LLC, all rights reserved.*/var analogue = (function (document, push, root, slice, toString, window) {'use strict';if (!Array.prototype.indexOf) {Array.prototype.indexOf = function indexOf(item) {/*jslint bitwise: true*/var args = slice.call(arguments),i = args.length > 1 ? args[1] : 0,ii = this.length >>> 0;if (ii > 0) {i = isNaN(Number(i)) ? 0 : i < 0 ? Math.max(0, ii + i) : i;while (i < ii) {if (this[i] === item) {return i;}i += 1;}}return -1;};}if (!Function.prototype.bind) {Function.prototype.bind = function bind(context) {/*jslint evil: true*/if (toString.call(this) !== '[object Function]') {throw new TypeError('Function.prototype.bind called on incompatible Object');}var args = slice.call(arguments, 1),bound,length = Math.max(0, this.length - args.length),method = this,params = [];while ((length -= 1) > -1) {params[length] = 'arg' + (length + 1);}bound = new Function('args, NoOp, slice, method, context','function bound(' + params.join(', ') + ') {' +'var isConstruct = this instanceof bound,' +'result,' +'toBind = context;' +'if (isConstruct) {' +'NoOp.prototype = method.prototype;' +'toBind = new NoOp();' +'}' +'result = method.apply(toBind, args.concat(slice.call(arguments)));' +'return isConstruct && Object(result) !== result ? toBind : result;' +'}' +'bound.prototype = method.prototype;' +'return bound;')(args, function () {}, slice, method, context);bound.call = bound.apply = function () {return method.apply(context, args.concat(slice.call(arguments, 1)));};return bound;};}var build = new Date(1326783184118),cache = {events: [],guid: 1E3,regex: (function (data) {return {get: function (key) {return data[key] || null;},set: function (key, value) {data[key] = value;return value;}};}({})),wrappers: {}},chars = {combinators: '(>|\\+|~)',encoding: '\\w\\u00c0-\\uFFFF\\-',symbols: '\\/?&=:.()!,@#%<>{}$*\\^',tag: '[\\w]+'},contains = root.contains ? function (context, node) {return context.contains(node);} : root.compareDocumentPosition ? function (context, node) {/*jslint bitwise: true*/return !!(context.compareDocumentPosition(node) & 16);} : function (context, node) {do {if (node === context) {return true;}node = node.parentNode;} while (node);return false;},detect = (function () {var a,div = document.createElement('div'),id = 'id' + new Date().valueOf(),input = document.createElement('input'),isSupported = function (event, supported) {event = 'on' + event;supported = typeof div[event] !== 'undefined';if (!supported) {div.setAttribute(event, 'return;');supported = typeof div[event] === 'function';}return supported;},option = document.createElement('option');root.className = 'hasJs';div.id = 'length';div.innerHTML = '<a class="a ab" href="/a" name="' + id + '" style="color:red;float:left;opacity:.5">a</a><a class="ab a"></a><b class=""></b>';a = div.getElementsByTagName('a')[0];input.setAttribute('value', '5');option.setAttribute('selected', 'selected');root.insertBefore(div, root.firstChild);try {return {addEvent: root.addEventListener ? 'addEventListener' : 'attachEvent',bubbles: {change: isSupported('change'),reset: isSupported('reset'),select: isSupported('select'),submit: isSupported('submit')},children: typeof root.children !== 'undefined',cssFloat: !!a.style.cssFloat ? 'cssFloat' : 'styleFloat',engine: (function (engine) {/*jslint evil: true*/if (eval('/*@cc_on!@*/false')) {engine = 'Trident';} else if (typeof root.style.MozAppearance !== 'undefined') {engine = 'Gecko';} else if (window.navigator.vendor === 'KDE') {engine = 'KHTML';} else if (/opera/i.test(toString.call(window.opera || window.operamini))) {engine = 'Presto';} else if (typeof root.style.webkitAppearance !== 'undefined') {engine = 'WebKit';}return engine;}('Other')),eventPrefix: root.addEventListener ? '' : 'on',filters: typeof div.filters !== 'undefined',getAttribute: a.getAttribute('href') === '/a' && input.defaultValue !== 5,getComputedStyle: typeof window.getComputedStyle !== 'undefined',getElementById: !document.getElementById(id),getElementsByClassName: root.getElementsByClassName ? (function (results) {results = div.getElementsByClassName('a').length === 2;if (results) {a.className = 'b';results = div.getElementsByClassName('a').length === 1;}return results;}()) : false,matchesSelector: (function (prefix, suffix, i) {for (i = prefix.length - 1; i > -1; i -= 1) {if (typeof root[prefix[i] + suffix] !== 'undefined') {return prefix[i] + suffix;}}return false;}(['m', 'khtmlM', 'oM', 'mozM', 'msM', 'webkitM'], 'atchesSelector')),mousewheel: isSupported('mousewheel') ? 'mousewheel' : 'DOMMouseScroll',opacity: /^0\.5$/.test(a.style.opacity),querySelector: root.querySelector ? (function (pattern) {try {if (div.querySelectorAll('b[class*=""]').length === 1) {pattern.push('[*\\^$]=\\s(?:""|\'\')');}} catch (e) {}if (!option.hasAttribute('selected')) {pattern.push('\\[\\s*(?:checked|disabled|ismap|multiple|readonly|selected|value)');}return pattern.length ? new RegExp(pattern.join('|'), 'i') : {test: function () {return false;}};}([])) : {test: function () {return true;}},removeEvent: root.removeEventListener ? 'removeEventListener' : 'detachEvent',slice: (function () {try {return !!slice.call(div.childNodes, 0)[0].nodeType;} catch (e) {}return false;}()),style: /red/.test(a.getAttribute('style')),textContent: a.textContent === 'a' ? 'textContent' : 'innerText',traversalApi: typeof root.nextElementSibling !== 'undefined' && typeof root.lastElementChild !== 'undefined'};} finally {root.removeChild(div);a = div = input = option = null;}}()),dollar = window.$,DOMArray = function () {},domContentLoaded = false,DOMFragment = (function () {var createFragment = function (html) {var div = document.createElement('div'),fragment = document.createDocumentFragment(),i,ii;div.innerHTML = html;for (i = 0, ii = div.childNodes.length; i < ii; i += 1) {fragment.appendChild(div.childNodes[i].cloneNode(true));}try {return fragment;} finally {div = fragment = null;}};return function (html) {this[0] = createFragment(html);this.length = 1;};}()),DOMWrapper = function (element) {this[0] = element;this.length = 1;this.tagName = element.nodeName.toUpperCase();},escapeRegExp = (function (pattern) {return function (string) {return string.replace(pattern, '\\$1');};}(/([.*+?\^=!:${}()|\[\]\/\\])/g)),events = (function (pattern) {var coopt = function (type) {return (pattern.useCoopt).test(type) && !detect.bubbles[type];},cooptEvent = function (method, selector, type, listener) {if (pattern.isChangeSelect.test(type)) {return this[method](selector, 'focus', function () {analogue(this).removeEvent(type, listener).addEvent(type, listener);})[method](selector, 'blur', function () {analogue(this).removeEvent(type, listener);});}selector += ' *';return this[method](selector, 'focus', function () {analogue(this).parent('form').removeEvent(type, listener).addEvent(type, listener);})[method](selector, 'blur', function () {analogue(this).parent('form').removeEvent(type, listener);});},delegateEvent = function (listener, selector) {return function (event) {if (analogue.match(event.target, selector)) {listener.apply(event.target, arguments);}};},dispatcher = function (element, event) {/*jslint continue: true*/var queue = slice.call(element.events[event.type]),listener;while (queue.length) {listener = queue.shift();try {(listener.delegate || listener).call(element[0], event);} finally {continue;}}},fixEvent = (function () {var commonEvent = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'detail', 'eventPhase', 'shiftKey', 'type', 'view', 'which'],keyEvent = commonEvent.concat(['char', 'charCode', 'key', 'keyCode']),mouseEvent = commonEvent.concat(['button', 'buttons', 'clientX', 'clientY', 'screenX', 'screenY']);return function (element, event) {var fixed = {},i,properties = commonEvent,type = event.type;if (event.source) {return event;}fixed.currentTarget = event.currentTarget || element;fixed.metaKey = event.metaKey || event.ctrlKey;fixed.preventDefault = function () {if (event.preventDefault) {event.preventDefault();}fixed.returnValue = event.returnValue = false;return fixed;};fixed.source = event;fixed.stopPropagation = function () {if (event.stopPropagation) {event.stopPropagation();}fixed.cancelBubble = event.cancelBubble = true;return fixed;};fixed.target = event.target ? (event.target.nodeType === 3 ? event.target.parentNode : event.target) : event.srcElement || element;fixed.timeStamp = new Date().valueOf();if (pattern.isKeyEvent.test(type)) {properties = keyEvent;fixed.which = event.which || event.keyCode;} else if (pattern.isMouseEvent.test(type)) {properties = mouseEvent;fixed.detail = type === detect.mousewheel ? (event.detail ? event.detail * -1 : event.wheelDelta / 40) : void 0;fixed.pageX = event.pageX || (event.clientX + (root.scrollLeft || document.body.scrollLeft) - (root.clientLeft || 0));fixed.pageY = event.pageY || (event.clientY + (root.scrollTop || document.body.scrollTop) - (root.clientTop || 0));if (pattern.isMouseOverOut.test(type)) {fixed.relatedTarget = event.relatedTarget || type === 'mouseover' ? event.fromElement : event.toElement;}fixed.which = fixed.button = event.which || (event.button === 1 ? 1 : (event.button === 4 ? 2 : (event.button === 2 ? 3 : 0)));}for (i = properties.length - 1; i > -1; i -= 1) {if (typeof fixed[properties[i]] === 'undefined') {fixed[properties[i]] = event[properties[i]];}}return fixed;};}()),handler = function (event) {dispatcher(this, fixEvent(this[0], event));},hasKeyEvent = window.KeyEvent && typeof window.KeyEvent.prototype.initEvent === 'function',normalize = {blur: typeof root.ondeactivate !== 'undefined' ? 'deactivate' : 'blur',focus: typeof root.onactivate !== 'undefined' ? 'activate' : 'focus',mousewheel: detect.mousewheel};return {addDelegate: function (selector, type, listener) {if (this[0] === document || this[0] === window) {analogue(root).addDelegate(selector, type, listener);return this;}var i,ii,types = type.split(pattern.splitter);for (i = 0, ii = types.length; i < ii; i += 1) {type = normalize[types[i]] || types[i];if (coopt(type)) {cooptEvent.call(this, 'addDelegate', selector, type, listener);} else {listener.delegate = listener.delegate || delegateEvent(listener, selector);this.addEvent(type, listener);}}return this;},addEvent: function (type, listener) {this.events = this.events || {};var i,ii,types = type.split(pattern.splitter);for (i = 0, ii = types.length; i < ii; i += 1) {type = normalize[types[i]] || types[i];if (this.events[type] && this.events[type].indexOf(listener) === -1) {this.events[type].push(listener);} else {this.events[type] = [listener];if (!this.events.handler) {this.events.handler = handler.bind(this);}this[0][detect.addEvent](detect.eventPrefix + type, this.events.handler, pattern.useCapture.test(type));this.events[type].key = cache.events.push([this[0], type, this.events.handler]) - 1;}}return this;},removeDelegate: function (selector, type, listener) {if (this[0] === document || this[0] === window) {analogue(root).removeDelegate(selector, type, listener);return this;}if (this.events) {var i,ii,types = type.split(pattern.splitter);for (i = 0, ii = types.length; i < ii; i += 1) {type = normalize[types[i]] || types[i];if (coopt(type)) {cooptEvent.call(this, 'removeDelegate', selector, type, listener);} else {this.removeEvent(type, listener);}}}return this;},removeEvent: function (type, listener) {if (this.events) {var e,i,ii,types = type.split(pattern.splitter);for (i = 0, ii = types.length; i < ii; i += 1) {type = normalize[types[i]] || types[i];if (this.events[type]) {e = this.events[type].indexOf(listener);if (e > -1) {if (this.events[type].length === 1) {this[0][detect.removeEvent](detect.eventPrefix + type, this.events.handler, pattern.useCapture.test(type));cache.events.splice(this.events[type].key, 1);delete this.events[type];} else {this.events[type].splice(e, 1);}}}}}return this;},triggerEvent: root.dispatchEvent ? function (type, options) {var event;options = options || {};if (pattern.isKeyEvent.test(type)) {if (hasKeyEvent) {event = document.createEvent('KeyEvents');event.initKeyEvent(type, options.bubbles || true, options.cancelable || true, window,options.ctrlKey || false, options.altKey || false, options.shiftKey || false, options.metaKey || false,options.key ? options.key.charCodeAt(0) : options.keyCode || 0, options.charCode || 0);} else {event = document.createEvent('Event');event.initEvent(type, options.bubbles || true, options.cancelable || true);event.view = window;event.ctrlKey = options.ctrlKey || false;event.altKey = options.altKey || false;event.shiftKey = options.shiftKey || false;event.metaKey = options.metaKey || false;event.keyCode = options.key ? options.key.charCodeAt(0) : options.keyCode || 0;event.charCode = options.charCode || 0;}} else if (pattern.isMouseEvent.test(type)) {event = document.createEvent('MouseEvent');event.initMouseEvent(type, options.bubbles || true, options.cancelable || true, window,options.detail || 1, options.screenX || 0, options.screenY || 0, options.clientX || 0, options.clientY || 0,options.ctrlKey || false, options.altKey || false, options.shiftKey || false, options.metaKey || false,options.button || 0, options.relatedTarget || null);} else {event = document.createEvent('HTMLEvents');event.initEvent(type, options.bubbles || true, options.cancelable || true);}return this[0].dispatchEvent(event);} : function (type, options) {var event = document.createEventObject();options = options || {};event.type = type;event.bubbles = options.bubbles || true;event.cancelable = options.cancelable || true;if (pattern.isKeyEvent.test(type)) {event.view = window;event.ctrlKey = options.ctrlKey || false;event.altKey = options.altKey || false;event.shiftKey = options.shiftKey || false;event.metaKey = options.metaKey || false;event.charCode = options.key ? options.key.charCodeAt(0) : options.charCode || 0;event.keyCode = (event.charCode > 0) ? event.charCode : options.keyCode || 0;} else if (pattern.isMouseEvent.test(type)) {event.view = window;event.detail = options.detail || 1;event.screenX = options.screenX || 0;event.screenY = options.screenY || 0;event.clientX = options.clientX || 0;event.clientY = options.clientY || 0;event.ctrlKey = options.ctrlKey || false;event.altKey = options.altKey || false;event.metaKey = options.metaKey || false;event.shiftKey = options.shiftKey || false;event.button = options.button === 0 ? 1 : (options.button === 1 ? 4 : (options.button === 2 ? 2 : 0));event.relatedTarget = options.relatedTarget || null;}if (this[0][type]) {this[0][type]();}return this[0].fireEvent('on' + type, event);}};}({isChangeSelect: /^(?:change|select)$/i,isKeyEvent: /^key(?:down|press|up)$/i,isMouseEvent: /mouse|(?:click|menu)$/i,isMouseOverOut: /(?:over|out)$/i,splitter: /\s+/,useCapture: /^(?:blur|focus)$/i,useCoopt: /^(?:change|select|submit|reset)$/i})),extend = function (object, source) {var i;for (i in source) {if (source.hasOwnProperty(i) && !object[i]) {object[i] = source[i];}}return object;},expando = ('analogue_' + String(Math.random()).replace(/\D/g, '')).slice(0, 16),getElementById = detect.getElementById ? function (id) {return document.getElementById(id);} : function (id) {var element = document.getElementById(id),elements,i = 0;if (element) {if (element.id === id) {return element;}elements = document.getElementsByName(id);while (elements[i]) {if (elements[i].getAttribute('id') === id) {return elements[i];}i += 1;}}return null;},hasClass = function (element, value) {return element.className && (cache.regex.get(value) || cache.regex.set(value, new RegExp('(?:^|\\s)' + escapeRegExp(value) + '(?:\\s|$)'))).test(element.className);},isReady = function (readyState) {return (!readyState || readyState === 'loaded' || readyState === 'complete');},makeArray = function (elements) {var collection = new DOMArray(),i = 0;if (detect.slice) {push.apply(collection, slice.call(elements));} else {while (elements[i]) {collection.push(elements[i]);i += 1;}}return collection;},methods = (function () {var booleans = {checked: 1,disabled: 1,isMap: 1,multiple: 1,readOnly: 1,selected: 1},getAttributeValue = function (node) {return node && node.specified ? node.nodeValue : '';},normalize = {accesskey: 'accessKey',cellpadding: 'cellPadding',cellspacing: 'cellSpacing',colspan: 'colSpan',encoding: 'enctype',frameborder: 'frameBorder',ismap: 'isMap',maxlength: 'maxLength',readonly: 'readOnly',rowspan: 'rowSpan',tabindex: 'tabIndex',valign: 'vAlign',usemap: 'useMap'},properties = {'class': 'className','float': detect.cssFloat,'for': 'htmlFor',html: 'innerHTML',text: detect.textContent,value: 'value'},set = function (name, value) {if (this.nodeType === 1) {name = normalize[name.toLowerCase()] || name;if (value === false || value === null) {if (properties[name]) {this[properties[name]] = '';} else if (booleans[name]) {this[name] = false;} else {this.removeAttribute(name);}} else if (name === 'style' && !detect.style) {this.style.cssText = value;} else if (properties[name]) {this[properties[name]] = value;} else if (booleans[name]) {this[name] = true;} else {this.setAttribute(name, value);}} else {this[name] = value;}},uris = {action: 1,data: 1,href: 1,lowsrc: 1,src: 1,useMap: 1};return {get: function (name) {var node = this[0] || this;if (node.nodeType === 1) {name = normalize[name.toLowerCase()] || name;if (name === 'style') {return detect.style ? node.getAttribute('style') || '' : String(node.style.cssText) || '';}if (booleans[name]) {return node[name] ? name : '';}if (properties[name] || name === 'type') {return node[properties[name] || name] || '';}if (uris[name]) {return node.getAttribute(name, 2) || '';}return getAttributeValue(node.getAttributeNode(name));}return node[name] || '';},set: function (name, value) {var i;if (typeof name === 'object') {for (i in name) {if (name.hasOwnProperty(i)) {set.call(this[0], i, name[i]);}}} else {set.call(this[0], name, value);}return this;}};}()),nodes = (function (useCapture) {var purge = function (wrapper) {var i,node = wrapper[0];wrapper.children().forEach(function () {analogue(this).remove();});if (wrapper.events) {for (i in wrapper.events) {if (wrapper.events.hasOwnProperty(i) && i !== 'handler') {node[detect.removeEvent](detect.eventPrefix + i, wrapper.events.handler, useCapture.test(i));cache.events.splice(wrapper.events[i].key, 1);}}}delete cache.wrappers[node.uniqueID];node = null;},resolve = function (node) {return typeof node === 'string' ? analogue(node)[0] : node[0] || node;};return {appendTo: function (node) {resolve(node).appendChild(this[0]);},clone: function (deep) {return analogue(this[0].cloneNode(!!deep));},contains: function (node) {return contains(this[0], resolve(node));},insertAfter: function (node) {node = resolve(node);if (node.nextSibling) {node.parentNode.insertBefore(this[0], node.nextSibling);} else {node.parentNode.appendChild(this[0]);}},insertBefore: function (node) {node = resolve(node);node.parentNode.insertBefore(this[0], node);},prependTo: function (node) {node = resolve(node);if (node.firstChild) {node.insertBefore(this[0], node.firstChild);} else {node.appendChild(this[0]);}},remove: function () {this[0].parentNode.removeChild(this[0]);purge(this);},replaceWith: function (node) {this[0].parentNode.replaceChild(resolve(node), this[0]);purge(this);}};}(/^(?:blur|focus)$/i)),path = (function (location, src) {return src.replace(/(\?[\w\.]+)$/, '').replace(/((\/)*[\w\.]+)$/, '/').replace(new RegExp('^' + location.protocol + '//' + location.host), '');}(window.location, document.getElementsByTagName('script')[0].src)),properties = (function (pattern) {var camelize = function (string) {return string.replace(pattern.hyphenated, function (match) {return match.charAt(1).toUpperCase();});},direction = {firstChild: 'nextSibling',lastChild: 'previousSibling'},navigate = function (node, traverse) {node = node[traverse];traverse = direction[traverse] || traverse;while (node && node.nodeType !== 1) {node = node[traverse];}return analogue(node);},setStyle = function (property, value) {property = property === 'float' ? detect.cssFloat : camelize(property);if (property === 'opacity' && !detect.opacity && detect.filters) {this.style.filter = 'alpha(opacity=' + String(value * 100) + ')';if (this.currentStyle && !this.currentStyle.hasLayout) {this.style.zoom = 1;}} else {this.style[property] = value;}};return {addClass: function (value) {var classes = this[0].className.split(pattern.splitter);if (!this.hasClass(value)) {classes.push(value);this[0].className = classes.join(' ');}return this;},children: detect.children ? function (selector) {return selector ? makeArray(this[0].children).filter(function () {return analogue.match(this, selector);}) : makeArray(this[0].children);} : function (selector) {return makeArray(this[0].childNodes).filter(function () {return this.nodeType === 1 && (selector ? analogue.match(this, selector) : true);});},firstChild: detect.traversalApi ? function () {return analogue(this[0].firstElementChild);} : function () {return navigate(this[0], 'firstChild');},getStyle: detect.getComputedStyle ? function (property) {property = property === 'float' ? detect.cssFloat : camelize(property);return this[0].style[property] || window.getComputedStyle(this[0], '')[property];} : function (property) {property = property === 'float' ? detect.cssFloat : camelize(property);var match,value = this[0].currentStyle ? this[0].currentStyle[property] : null;if (property === 'opacity' && !detect.opacity && detect.filters) {match = (this[0].style.filter || this[0].currentStyle.filter).match(pattern.alphaOpacity);value = match ? String(match[1] / 100) : '1';} else if (isNaN(parseFloat(value))) {if (pattern.dimensions.test(property) && this[0].currentStyle.display !== 'none') {value = this[0]['offset' + property.charAt(0).toUpperCase() + property.slice(1)] + 'px';} else if (pattern.boxModel.test(property)) {value = '0px';}}return this[0].style[property] || value;},hasClass: function (value) {return hasClass(this[0], value);},lastChild: detect.traversalApi ? function () {return analogue(this[0].lastElementChild);} : function () {return navigate(this[0], 'lastChild');},nextSibling: detect.traversalApi ? function () {return analogue(this[0].nextElementSibling);} : function () {return navigate(this[0], 'nextSibling');},parent: function (selector) {var parent = this[0].parentNode;if (selector) {while (parent.nodeType !== 9 && !analogue.match(parent, selector)) {parent = parent.parentNode;}}return analogue(parent);},previousSibling: detect.traversalApi ? function () {return analogue(this[0].previousElementSibling);} : function () {return navigate(this[0], 'previousSibling');},removeClass: function (value) {var classes = this[0].className.split(pattern.splitter),i;if (this.hasClass(value)) {for (i = classes.length - 1; i > -1; i -= 1) {if (classes[i] === value) {classes.splice(i, 1);}}this[0].className = classes.join(' ');}return this;},setStyle: function (property, value) {var i;if (typeof property === 'object') {for (i in property) {if (property.hasOwnProperty(i)) {setStyle.call(this[0], i, property[i]);}}} else {setStyle.call(this[0], property, value);}return this;},toggleClass: function (value) {return this.hasClass(value) ? this.removeClass(value) : this.addClass(value);}};}({alphaOpacity: /alpha\s*\(\s*opacity\s*=\s*([\d.]+)\)/i,boxModel: /^border(?:top|right|bottom|left)?width|margin|padding/i,dimensions: /^(height|width)$/i,hyphenated: /\-\w/g,splitter: /\s+/})),query = (function (pattern) {var check = {attribute: (function () {var defaults = {checked: 'defaultChecked',selected: 'defaultSelected',value: 'defaultValue'},getAttribute = detect.getAttribute ? function (element, name) {return element.getAttribute(name) || null;} : function (element, name) {if (defaults[name]) {return element[defaults[name]] || null;}return methods.get.call(element, name);},test = function (attribute, operator, value) {if (!attribute) {return false;}switch (operator) {case '=':return attribute === value;case '~':return (cache.regex.get('~' + value) || cache.regex.set('~' + value, new RegExp('(?:^|\\s)' + escapeRegExp(value) + '(?:\\s|$)'))).test(attribute);case '^':return attribute.indexOf(value) === 0;case '$':return attribute.lastIndexOf(value) === (attribute.length - value.length);case '*':return attribute.indexOf(value) > -1;case '|':return (cache.regex.get('|' + value) || cache.regex.set('|' + value, new RegExp('^' + escapeRegExp(value) + '(?:\\-|$)'))).test(attribute);}return !operator ? true : false;};return function (element, match, selector) {if (match[2] && match[3]) {if (match[2] === '#' && getElementById(match[3]) !== element) {return false;} else if (match[2] === '.' && !hasClass(element, match[3])) {return false;}}while ((match = pattern.attribute.exec(selector)) !== null) {selector = selector.replace(match[0], '');if (!test(getAttribute(element, match[1]), match[2], match[3])) {return false;}}return true;};}()),className: function (element, classes) {var i;for (i = classes.length - 1; i > 0; i -= 1) {if (!hasClass(element, classes[i])) {return false;}}return true;},noop: function () {return true;},tagName: function (element, tag) {return tag === '*' || element.nodeName === tag.toUpperCase();}},getElements = function (context, tag, combinator, filter, criteria, token, selector) {var collection = [],element,elements,i,ii,j,jj;filter = filter || check.noop;tag = (tag || '*').toLowerCase();for (i = 0, ii = context.length; i < ii; i += 1) {switch (combinator) {case '>':case '~':element = context[i][combinator === '>' ? 'firstChild' : 'nextSibling'];while (element && element[expando] !== selector) {if (element.nodeType === 1 && check.tagName(element, tag) && filter(element, criteria, token)) {element[expando] = selector;collection.push(element);}element = element.nextSibling;}break;case '+':element = context[i].nextSibling;while (element) {if (element.nodeType === 1) {if (check.tagName(element, tag) && filter(element, criteria, token)) {collection.push(element);}break;}element = element.nextSibling;}break;default:elements = context[i].getElementsByTagName(tag);for (j = 0, jj = elements.length; j < jj; j += 1) {element = elements[j];if (element.nodeType === 1 && filter(element, criteria, token)) {collection.push(element);}}}}return collection;},parse = function (context, selector) {var combinator,match,token,tokens = selector.replace(pattern.normalize, ' $1$3').split(pattern.splitter);context = [context];while (tokens.length) {token = tokens.shift();if ((combinator = pattern.combinator.exec(token)) !== null) {combinator = combinator[1];token = token.replace(combinator, '');}if ((match = pattern.idOnly.exec(token)) !== null) {context = getElementById(match[2]);if (!context || (match[1] && context.nodeName !== match[1].toUpperCase())) {return [];}context = [context];} else if (pattern.attribute.test(token)) {match = pattern.idOrClass.exec(token);context = getElements(context, match[1], combinator, check.attribute, match, token, selector);} else if (token.indexOf('.') > -1) {match = token.split('.');context = getElements(context, match[0], combinator, check.className, match, token, selector);} else {context = getElements(context, token, combinator, null, null, token, selector);}}return context;},uniqueSort = (function () {var documentOrder = root.compareDocumentPosition ? function (a, b) {/*jslint bitwise: true*/return a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;} : root.sourceIndex ? function (a, b) {return a.sourceIndex - b.sourceIndex;} : document.createRange ? function (a, b) {var aRange = a.ownerDocument.createRange(),bRange = b.ownerDocument.createRange();aRange.setStart(a, 0);aRange.setEnd(a, 0);bRange.setStart(b, 0);bRange.setEnd(b, 0);return aRange.compareBoundaryPoints(window.Range.START_TO_END, bRange);} : null;return function (collection, context) {var i = 0,unique = new DOMArray();collection.sort(documentOrder);while (collection[i]) {if (collection[i] === collection[i - 1]) {collection.splice(i -= 1, 1);} else if (context === document || contains(context, collection[i])) {unique.push(collection[i]);if (collection[i][expando]) {collection[i][expando] = null;}}i += 1;}return unique;};}());return {match: function (element, selector) {if (detect.matchesSelector && !detect.querySelector.test(selector)) {try {return element[detect.matchesSelector](selector);} catch (e) {}}return query.select(document, selector).indexOf(element) > -1;},select: function (context, selector) {if (!detect.querySelector.test(selector)) {try {return makeArray(context.querySelectorAll(selector));} catch (e) {}}var collection = [],i,ii,groups = selector.replace(pattern.regroup, ',').split(',');for (i = 0, ii = groups.length; i < ii; i += 1) {push.apply(collection, parse(context, groups[i]));}return uniqueSort(collection, context);}};}({attribute: new RegExp('\\[([' + chars.encoding + ']+)(?:([=~|\\^$*]?)=?[\'"]?([\\s' + chars.encoding + chars.symbols + ']+)["\']?)?\\]'),combinator: new RegExp('^' + chars.combinators),idOnly: new RegExp('^(' + chars.tag + ')*#([' + chars.encoding + ']+)$'),idOrClass: new RegExp('^(' + chars.tag + ')*([#|\\.])*([' + chars.encoding + ']+)*'),normalize: new RegExp('\\s*' + chars.combinators + '(\\s)*(\\w)', 'g'),regroup: /\s*,\s*/g,splitter: /\s+/})),uniqueId = typeof root.uniqueID !== 'undefined' ? function (node) {return node.uniqueID;} : function (node) {var id = (cache.guid += 1) + '_' + node.nodeName;node.uniqueID = id;return id;},wrapper = function (element) {var wrap = new DOMWrapper(element);cache.wrappers[uniqueId(element)] = wrap;return wrap;},versioning = [1, String(build.getFullYear()).slice(2), String((build.getMonth() + 1) / 100).slice(2)],$ = (function (pattern) {var parse = function (selector, context) {var match,node;context = context ? parse(context)[0] : document;if (!selector) {return new DOMArray();}if (selector instanceof DOMWrapper || selector instanceof DOMArray) {return selector;}if (selector === window) {return cache.wrappers.window;}if (selector === document) {return cache.wrappers.document;}if (selector.nodeType) {node = selector;} else if (selector === 'body') {node = document.body;} else if (selector === 'head') {node = document.head || document.getElementsByTagName('head')[0];} else if (selector === 'html') {node = root;} else if ((match = pattern.byId.exec(selector)) !== null) {node = getElementById(match[1]);if (!node || (context !== document && !contains(context, node))) {return new DOMArray();}}if (node) {if (node.uniqueID && cache.wrappers[node.uniqueID]) {return cache.wrappers[node.uniqueID];}return wrapper(node);}if (pattern.isHtml.test(selector)) {if ((match = pattern.isElement.exec(selector)) !== null) {return wrapper(document.createElement(match[1]));}return new DOMFragment(selector);}if ((match = pattern.byClassName.exec(selector)) !== null && detect.getElementsByClassName) {return makeArray(context.getElementsByClassName(match[1]));}if (pattern.byTagName.test(selector)) {return makeArray(context.getElementsByTagName(selector));}return query.select(context, selector);};return function (selector, context) {return parse(selector, context);};}({byClassName: new RegExp('^\\.([' + chars.encoding + ']+)$'),byId: new RegExp('^#([' + chars.encoding + ']+)$'),byTagName: new RegExp('^(?:' + chars.tag + ')$'),isElement: /^<(\w+)\s*\/?>(?:<\/\1>)?$/,isHtml: new RegExp('^(?:<[\\s' + chars.encoding + chars.symbols + '\'"]+>)$')}));DOMArray.prototype = [];(function (test) {test.push(1);if (test.length !== 1) {DOMArray = Array;}}(new DOMArray()));(function (prototype) {prototype.each = prototype.forEach = function (iterator, context) {var i = 0,ii = this.length;while (i < ii) {if (this[i] && iterator.call(context || this[i], this[i], i, this) === false) {break;}i += 1;}};prototype.filter = function (iterator, context) {var i = 0,ii = this.length,result = new DOMArray();while (i < ii) {if (this[i] && iterator.call(context || this[i], this[i], i, this)) {result.push(this[i]);}i += 1;}return result;};prototype.first = function () {return analogue(this[0]);};prototype.index = function (i) {return analogue(this[i]);};prototype.last = function () {return analogue(this[this.length - 1]);};}(DOMArray.prototype));extend(DOMFragment.prototype, {appendTo: nodes.appendTo,insertAfter: nodes.insertAfter,insertBefore: nodes.insertBefore,prependTo: nodes.prependTo});extend(methods, events);(function (prototype) {extend(prototype, methods);extend(prototype, nodes);extend(prototype, properties);}(DOMWrapper.prototype));cache.wrappers.window = extend({0: window,length: 1}, methods);cache.wrappers.document = extend({0: document,getDimensions: typeof window.innerWidth === 'number' ? function () {return {height: window.innerHeight,scroll: {x: root.scrollWidth,y: root.scrollHeight},width: window.innerWidth};} : function () {var height = root.offsetHeight,width = root.offsetWidth,x = root.scrollWidth,y = root.scrollHeight;return {height: height,scroll: {x: x > width ? x : width,y: y > height ? y : height},width: width};},getScrollOffsets: function () {return {x: window.pageXOffset || root.scrollLeft || 0,y: window.pageYOffset || root.scrollTop || 0};},length: 1,loadScript: function (source, callback, timeout) {if (!document.addEventListener && !domContentLoaded && !callback) {this[0].write('<script src="' + source + '" type="text/javascript"></script>');} else {var loaded = false,script = analogue('<script/>').set({async: true,src: source,type: 'text/javascript'});if (callback && typeof callback === 'function') {script[0].onreadystatechange = script[0].onload = function () {if (!loaded && isReady(this.readyState)) {loaded = true;callback();this.onload = this.onreadystatechange = null;}};window.setTimeout(function () {if (!loaded) {loaded = true;callback();}}, timeout || 5E3);}script.insertBefore(analogue('script')[0]);}return this;},ready: function (listener) {if (!domContentLoaded) {events.addEvent.call(this, 'dataavailable', listener);} else {listener.apply(this, arguments);}return this;}}, methods);(function (setTimeout, setup, teardown) {var div = document.createElement('div'),doScroll = function () {try {div.doScroll();div = null;return true;} catch (e) {}return false;},init = function (event) {if (event.type) {if (event.type === 'readystatechange' && document.readyState !== 'complete') {return;}(event.type === 'load' ? window : document)[detect.removeEvent](detect.eventPrefix + event.type, init, false);}if (!domContentLoaded) {domContentLoaded = true;analogue(document).triggerEvent('dataavailable');}},poll = div.doScroll && !doScroll() ? function () {return doScroll() ? init('doScroll') : setTimeout(poll, 10);} : function () {return isReady(document.readyState) ? init('readyState') : setTimeout(poll, 10);};if (document.readyState === 'complete') {init('readyState');} else {setTimeout(poll, 10);'load DOMContentLoaded readystatechange'.replace(/\w+/g, function (type) {(type === 'load' ? window : document)[detect.addEvent](detect.eventPrefix + type, init, false);});}if (root.addEventListener) {if (!document.readyState) {document.readyState = 'loading';document.addEventListener('DOMContentLoaded', setup = function () {document.readyState = 'complete';document.removeEventListener('DOMContentLoaded', setup, false);}, false);}} else if (detect.engine === 'Trident') {cache.wrappers.document.loadScript(path + 'Analogue.MSIE.js.ashx', false);window.attachEvent('onunload', teardown = function (i) {for (i = cache.events.length - 1; i > -1; i -= 1) {cache.events[i][0].detachEvent('on' + cache.events[i][1], cache.events[i][2]);}window.detachEvent('onunload', teardown);});}}(window.setTimeout));return (window.$ = extend($, {detect: detect,expando: expando,extend: function (plugin) {if (typeof plugin.init === 'function' && plugin.init()) {delete plugin.init;}extend(DOMWrapper.prototype, plugin);},noConflict: function () {window.$ = dollar;return this;},match: query.match,path: path,version: versioning.join('.') + ' (' + parseInt(build.valueOf() / 1E3, 10) + ')'}));}(this.document, [].push, this.document.documentElement, [].slice, {}.toString, this));/*Analogue.Ajax 1.12.01, Copyright (c) 2012 Analogue Web Design LLC, all rights reserved.*/analogue.extend((function (clearTimeout, document, push, setTimeout, window, $) {'use strict';var build = new Date(1326496436323),cleanup = function (callback, script) {try {delete window[callback];} catch (e) {window[callback] = null;}script.remove();},guid = 1E3,hasJSON = typeof JSON === 'object' && typeof JSON.parse === 'function',inject = function (json) {var script = $('<script/>'),timeoutId = setTimeout(function () {if (typeof json.failure === 'function') {json.failure.call(json.context, new Error('Request Timeout'), 408, 'Request Timeout');}cleanup(json.callback, script);}, json.timeout || 1E4);if (json.parameters) {json.url += (json.url.indexOf('?') > -1 ? '&' : '?') + json.parameters;}window[json.callback] = function (response) {clearTimeout(timeoutId);if (typeof json.success === 'function') {json.success.call(json.context, response, 200, 'OK');}cleanup(json.callback, script);};script.set({async: true,src: json.url,type: 'text/javascript'}).insertBefore($('script')[0]);return this;},request = function (ajax) {var aborted = false,done = false,i,response = '',status,statusText = '',timeoutId = null,xhr = new window.XMLHttpRequest();if (xhr) {if (ajax.method === 'GET' && ajax.parameters !== null) {ajax.url += (ajax.url.indexOf('?') > -1 ? '&' : '?') + ajax.parameters;ajax.parameters = null;}if (ajax.username) {xhr.open(ajax.method, ajax.url, ajax.async, ajax.username, ajax.password);} else {xhr.open(ajax.method, ajax.url, ajax.async);}xhr.setRequestHeader('AJAX', 'true');xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');if (ajax.method === 'POST') {xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');xhr.setRequestHeader('Content-length', ajax.parameters ? ajax.parameters.length : 0);if (xhr.overrideMimeType) {xhr.setRequestHeader('Connection', 'close');}}if (ajax.responseType === 'json') {xhr.setRequestHeader('Accept', 'application/json, text/javascript, */*');} else {xhr.setRequestHeader('Accept', 'text/javascript, text/html, application/xml, text/xml, text/plain, */*');}for (i in ajax.headers) {if (ajax.headers.hasOwnProperty(i) && i === 'string') {xhr.setRequestHeader(i, ajax.headers[i]);}}if (typeof ajax.success === 'function') {xhr.onreadystatechange = function () {/*jslint evil: true, regexp: true*/try {if (xhr.readyState === 4 && !done) {clearTimeout(timeoutId);done = true;status = xhr.status;if (status === 1223) {status = 204;}statusText = xhr.statusText;if ((status || document.location.protocol !== 'file:') && (status < 200 || status >= 300)) {throw new Error(statusText);}response = /xml/i.test(ajax.responseType) ? xhr.responseXML : xhr.responseText;if (/json/i.test(ajax.responseType) && !!response) {if (hasJSON) {response = JSON.parse(response);} else if (/^[\],:{}\s]*$/.test(response.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {response = eval('(' + response + ')');} else {throw new Error('Invalid JSON: ' + response);}}xhr.onreadystatechange = function () {};xhr = null;ajax.success.call(ajax.context, response, status, statusText);} else {if (typeof ajax.loading === 'function') {ajax.loading.call(ajax.context, xhr.readyState);}}} catch (e) {if (!aborted) {clearTimeout(timeoutId);done = true;if (xhr) {status = xhr.status;try {statusText = xhr.statusText;} catch (ex) {}xhr.onreadystatechange = function () {};xhr = null;} else {status = 200;statusText = 'OK';}if (typeof ajax.failure === 'function') {ajax.failure.call(ajax.context, e, status, statusText);}}}};}xhr.send(ajax.parameters);if (ajax.timeout) {timeoutId = setTimeout(function () {if (!done) {aborted = true;xhr.abort();done = true;status = 408;statusText = 'Request Timeout';xhr.onreadystatechange = function () {};xhr = null;if (typeof ajax.failure === 'function') {ajax.failure.call(ajax.context, new Error(statusText), status, statusText);}}}, ajax.timeout);}}return this;},serialize = function (object) {var field,fields,i,ii,j,jj,k,parameters = [],push = function (name, value) {parameters.push(encodeURIComponent(name) + '=' + encodeURIComponent(value));};if (object.nodeType === 1) {fields = object.elements;for (i = 0, ii = fields.length; i < ii; i += 1) {field = fields[i];if (field.name && !field.disabled) {if (/^(?:checkbox|radio)$/i.test(field.type) && field.checked) {push(field.name, field.value);} else if (field.type === 'select-one' && field.selectedIndex >= 0) {push(field.name, field.options[field.selectedIndex].value);} else if (field.type === 'select-multiple') {for (j = 0, jj = field.options.length; j < jj; j += 1) {if (field.options[j].selected) {push(field.name, field.options[j].value);}}} else if (/^(?:color|date|datetime|email|hidden|month|number|password|range|search|submit|tel|text|textarea|time|url|week)$/i.test(field.type)) {push(field.name, field.value);}}}} else if (typeof object === 'object') {for (k in object) {if (object.hasOwnProperty(k)) {push(k, object[k]);}}}return parameters;},versioning = [1, String(build.getFullYear()).slice(2), String((build.getMonth() + 1) / 100).slice(2)];function init(method, url, settings, form) {var instance,parameters = [];settings = typeof settings === 'function' ? {success: settings} : settings || {};if (form) {settings.context = form;push.apply(parameters, serialize(form));}if (settings.nocache && method === 'GET') {parameters.push('nocache=' + new Date().valueOf());}if (settings.parameters) {push.apply(parameters, serialize(settings.parameters));}if (settings.responseType === 'jsonp' && settings.callbackParameter !== false) {settings.callback = settings.callback || 'jsonp' + (guid += 1);parameters.push((settings.callbackParameter || 'callback') + '=' + settings.callback);}instance = {async: settings.async || true,callback: settings.callback || null,context: settings.context ? (typeof settings.context === 'string' ? $(settings.context)[0] : settings.context[0] || settings.context) : null,failure: settings.failure || null,headers: settings.headers || {},loading: settings.loading || null,method: method,parameters: parameters.length > 0 ? parameters.join('&') : null,password: settings.password || null,responseType: settings.responseType || 'text',success: settings.success || null,timeout: settings.timeout || null,url: url,username: settings.username || null};if (settings.responseType === 'jsonp') {return inject(instance);}return request(instance);}return {init: function () {$.ajax = {get: function (url, settings) {return init('GET', url, settings);},post: function (url, settings) {return init('POST', url, settings);},version: versioning.join('.') + ' (' + parseInt(build.valueOf() / 1E3, 10) + ')'};return this;},serialize: function () {if (this.tagName !== 'FORM') {throw new Error('Invalid Element: ' + this.tagName);}return serialize(this[0]);},submit: function (settings) {if (this.tagName !== 'FORM') {throw new Error('Invalid Element: ' + this.tagName);}return init(this[0].method.toUpperCase(), this[0].action, settings, this[0]);}};}(this.clearTimeout, this.document, [].push, this.setTimeout, this, analogue)));/*Analogue.Forms 1.12.01, Copyright (c) 2012 Analogue Web Design LLC, all rights reserved.*/analogue.extend((function (document, window, $) {'use strict';var build = new Date(1326348602597),filter = function (tags) {var regex = new RegExp('^' + tags + '$', 'i');return function (element) {return regex.test(element.tagName);};},format = function (string) {var args = [].slice.call(arguments, 1);return string.replace(/\{(\d+)\}/g, function (match, i) {return typeof args[i] !== 'undefined' ? args[i] : match;});},isEmpty = function (value) {return value === null || value.length === 0 || /^\s+$/.test(value);},messages = {accept: 'You must {0}.',date: '{0} does not appear to be a valid date.',email: '{0} does not appear to be a valid email address.',group: 'Please select an option in the {0} group.',least: 'Please select at least {0} options in the {1} group.',list: 'Please select an option from the {0} list.',max: 'Please enter a value less than or equal to {0}.',min: 'Please enter a value greater than or equal to {0}.',most: 'Please select no more than {0} options in the {1} group.',number: '{0} does not appear to be a valid number.',tel: '{0} does not appear to be a valid telephone number.',required: 'The {0} field is required.',url: '{0} does not appear to be a valid URL.'},rules = (function () {var date = function (value) {var day,days,match = /^(\d{1,2})[\s\.\/\-](\d{1,2})[\s\.\/\-](\d{4})$/.exec(value),month,year;if (!match) {return false;}month = parseInt(match[1], 10);day = parseInt(match[2], 10);year = parseInt(match[3], 10);if (month < 1 || month > 12 || year < 1900 || year > 2100) {return false;}switch (month) {case 2:days = ((year % 4) === 0) ? 29 : 28;break;case 4:case 6:case 9:case 11:days = 30;break;default:days = 31;}return (day >= 1 && day <= days);},group = function (element) {var children,count = 0,i,ii,valid = null;if (element.tagName === 'INPUT') {switch (element.get('type')) {case 'checkbox':case 'radio':valid = !!element.get('checked');break;default:valid = !isEmpty(element.get('value'));}} else {valid = !isEmpty(element.get('value'));}if (valid) {count += 1;}children = element.children();for (i = 0, ii = children.length; i < ii; i += 1) {if (children[i].nodeType === 1) {count += group($(children[i]));}}return count;};return {date: {filter: filter('input'),validate: function (element) {var value = element.get('value');if (value && !date(value)) {return format(messages.date, value);}return true;}},email: {filter: filter('input'),validate: function (element) {var value = element.get('value');if (value && !/^[a-zA-Z0-9.!#$%&'*+\/=?\^_`{|}~\-]+@[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$/.test(value)) {return format(messages.email, value);}return true;}},number: {filter: filter('input'),validate: function (element) {var match,title = element.get('title'),value = element.get('value');if (value && !/^[\d\.]+$/.test(element.get('value'))) {return format(messages.number, title);}if ((match = /max=(\d+)/.exec(element[0].className)) !== null) {if (parseInt(value, 10) > parseInt(match[1], 10)) {return format(messages.max, match[1]);}}if ((match = /min=(\d+)/.exec(element[0].className)) !== null) {if (parseInt(value, 10) < parseInt(match[1], 10)) {return format(messages.min, match[1]);}}return true;}},tel: {filter: filter('input'),validate: function (element) {var value = element.get('value');if (value && !/^([1]?[\s\.\-]?\(?[2-9]\d{2}\)?)?[\s\.\-]?(\d{3}[\s\.\-]?\d{4})$/.test(value)) {return format(messages.tel, value);}return true;}},required: {filter: filter('fieldset|input|select|textarea'),validate: function (element) {var count,match,title = element.get('title'),value = element.get('value');switch (element.tagName) {case 'FIELDSET':count = group(element);if (count === 0) {return format(messages.group, title);}if ((match = /max=(\d+)/.exec(element[0].className)) !== null) {if (count > parseInt(match[1], 10)) {return format(messages.most, match[1], title);}}if ((match = /min=(\d+)/.exec(element[0].className)) !== null) {if (count < parseInt(match[1], 10)) {return format(messages.least, match[1], title);}}break;case 'INPUT':case 'TEXTAREA':switch (element.get('type')) {case 'checkbox':case 'radio':if (!element.get('checked')) {return format(messages.accept, title);}break;default:if ((element.hasClass('placeholder') && value === element.get('title')) || isEmpty(value)) {return format(messages.required, title);}}break;case 'SELECT':if (element[0].selectedIndex === 0) {return format(messages.list, title);}break;}return true;}},url: {filter: filter('input'),validate: function (element) {var value = element.get('value');if (value && !/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?\^=%&amp;:\/~\+#]*[\w\-\@?\^=%&amp;\/~\+#])?/.test(value)) {return format(messages.url, value);}return true;}}};}()),validate = function (event) {var elements = $('fieldset, input, select, textarea', this),error,errors = [],form = $(this),i,ii,message,modal = form.hasClass('confirm') || form.hasClass('alert'),stop = form.hasClass('stop');elements.forEach(function () {var e,element = $(this),test,span,valid;element.removeClass('invalid');if (!modal) {if (element.nextSibling() && element.nextSibling().tagName === 'SPAN') {element.nextSibling().remove();} else if (element.lastChild() && element.lastChild().tagName === 'SPAN') {element.lastChild().remove();}}for (test in rules) {if (rules.hasOwnProperty(test) && element.hasClass(test) && rules[test].filter(element)) {valid = rules[test].validate(element);if (valid !== true) {e = errors.push(valid);element.addClass('invalid');if (!error) {error = element[0];}if (!modal) {span = $('<span/>').set({'class': 'error',text: errors[e - 1]});if (element.tagName === 'FIELDSET') {span.appendTo(element);} else {span.insertAfter(element);}if (stop) {return false;}}break;}}}});if (errors.length === 0) {return true;}if (modal) {message = 'The following form ' + (errors.length > 1 ? 'fields were' : 'field is') + ' incomplete or incorrect:\n\n';for (i = 0, ii = errors.length; i < ii; i += 1) {message += String(i + 1) + '. ' + errors[i] + '\n';}if (form.hasClass('confirm') && window.confirm(message + '\nYour form has not been submitted.\nClick \"OK\" to continue submitting the form; or\nClick \"Cancel\" to check the information that you provided and try again.')) {return true;}if (form.hasClass('alert')) {window.alert(message + '\nYour form has not been submitted.\nPlease check the information that you provided and submit the form again.');}}if (error && error.focus) {error.focus();}event.preventDefault();return false;},versioning = [1, String(build.getFullYear()).slice(2), String((build.getMonth() + 1) / 100).slice(2)];$(document).ready(function () {var placeholder = function () {if (this.value === '') {this.value = this.title;} else if (this.value === this.title) {this.value = '';}};$('form').forEach(function () {var form = $(this);form.addEvent('submit', validate);$('input, select, textarea', form).forEach(function () {var element = $(this);if (element.hasClass('placeholder')) {element.addEvent('blur focus', placeholder);}if (element.hasClass('autofocus') && element[0].focus) {element[0].focus();}});});});return {init: function () {$.forms = {extend: function (validation) {var i,rule;for (i in validation) {if (validation.hasOwnProperty(i)) {rule = validation[i];rule.filter = typeof rule.filter === 'string' ? filter(rule.filter) : filter('input');rules[i] = rule;}}},version: versioning.join('.') + ' (' + parseInt(build.valueOf() / 1E3, 10) + ')'};return this;}};}(this.document, this, analogue)));/*Google Analytics*/(function (document, window, $) {'use strict';var gmaps = {controls: {navigation: true,mapType: true,scale: false,zoom: 13},directions: {destination: 'meta[name="geo.placename"]',div: '#google_directions',origin: '#google_origin',form: '#google_form'},div: '#google_map',geo: {position: 'meta[name="geo.position"]',placename: 'meta[name="geo.placename"]'},marker: null,title: 'Law Office of John S. Palmer'};$(document).ready(function () {/*jslint newcap: true*/if ($(gmaps.div).length === 1) {var dirRenderer = new google.maps.DirectionsRenderer(),dirService = new google.maps.DirectionsService(),geoPlace = $(gmaps.geo.placename).index(0).get('content').split(','),geoPosition = $(gmaps.geo.position).index(0).get('content').split(';'),infowindow = new google.maps.InfoWindow({content: '<span class="gmap-title">' + gmaps.title + '</span><br />' +'<span class="gmap-address">' + geoPlace[0] + '<br />' + geoPlace[1] + ' ' + geoPlace[2] + '</span>' +'<form action="http://maps.google.com/maps" target="_blank">' +'<label for="saddr">Directions (enter address and/or zip):</label><br />' +'<input class="required" id="saddr" name="saddr" title="Your Address or Zip Code" />' +'<input name="daddr" type="hidden" value="' + geoPlace.join(', ') + ' @' + geoPosition.join(',') + '" />' +'<input type="submit" value="GO" class="gmap-submit" /></form>'}),latlng = new google.maps.LatLng(Number(geoPosition[0]), Number(geoPosition[1])),map = new google.maps.Map($(gmaps.div)[0], {navigationControl: gmaps.controls.navigation,navigationControlOptions: {style: google.maps.NavigationControlStyle.ZOOM_PAN},mapTypeControl: gmaps.controls.mapType,scaleControl: gmaps.controls.scale,zoom: gmaps.controls.zoom,center: latlng,mapTypeId: google.maps.MapTypeId.ROADMAP}),handleDirections = function (dirResult, dirStatus) {if (dirStatus !== google.maps.DirectionsStatus.OK) {window.alert('Directions failed: ' + dirStatus);return;}dirRenderer.setMap(map);dirRenderer.setPanel($(gmaps.directions.div)[0]);dirRenderer.setDirections(dirResult);},getDirections = function () {dirService.route({origin: $(gmaps.directions.origin).get('value'),destination: $(gmaps.directions.destination).index(0).get('content'),travelMode: google.maps.DirectionsTravelMode.DRIVING,unitSystem: google.maps.DirectionsUnitSystem.IMPERIAL}, handleDirections);},marker = new google.maps.Marker({position: latlng,map: map,title: gmaps.title});$(gmaps.directions.form).addEvent('submit', function (event) {getDirections();event.preventDefault();return false;});marker.setMap(map);google.maps.event.addListener(marker, 'click', function () {infowindow.open(map, marker);});google.maps.event.addListener(infowindow, 'closeclick', function () {map.setCenter(latlng);});}});}(this.document, this, analogue));
