diff --git a/Makefile b/Makefile index 811513ab24d..eb983d09c5c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ BUILD=static/build ACCESS_LOG_FORMAT='%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s"' GITHUB_EDITOR_WIDTH=127 -FLAKE_EXCLUDE=./.*,scripts/20*,vendor/*,node_modules/* +FLAKE_EXCLUDE=./.*,vendor/*,node_modules/* COMPONENTS_DIR=openlibrary/components # Use python from local env if it exists or else default to python in the path. @@ -74,7 +74,7 @@ ifndef CI endif test-py: - pytest . --ignore=tests/integration --ignore=scripts/2011 --ignore=infogami --ignore=vendor --ignore=node_modules + pytest . --ignore=tests/integration --ignore=infogami --ignore=vendor --ignore=node_modules test-i18n: # Valid locale codes should be added as arguments to validate diff --git a/scripts/2009/01/dbmirror.py b/scripts/2009/01/dbmirror.py deleted file mode 100644 index 26c151d7aaa..00000000000 --- a/scripts/2009/01/dbmirror.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Script to mirror the Open Library production databse by replaying the logs. -""" - -import infogami -import web -import time - -web.config.db_parameters = dict(dbn='postgres', db="pharos_backup", user='anand', pw='') -#web.config.db_printing = True - -from infogami.infobase.logreader import LogReader, RsyncLogFile, LogPlayback -from infogami.infobase.infobase import Infobase -import datetime - -def playback(): - web.load() - reader = LogReader(RsyncLogFile("wiki-beta::pharos/log", "log")) - - # skip the log till the latest entry in the database - timestamp = web.query('SELECT last_modified FROM thing ORDER BY last_modified DESC LIMIT 1')[0].last_modified - reader.skip_till(timestamp) - - playback = LogPlayback(Infobase()) - - while True: - for entry in reader: - print reader.logfile.tell(), entry.timestamp - playback.playback(entry) - - time.sleep(60) - -if __name__ == '__main__': - playback() - diff --git a/scripts/2009/01/dump_tables.sh b/scripts/2009/01/dump_tables.sh deleted file mode 100755 index 5ac9862fbca..00000000000 --- a/scripts/2009/01/dump_tables.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash -# -# script to dump tables of production database -# -# run this script as postgres user - -db='infobase_production' -dir='/1/pharos/pgdumps' - -tables="thing datum edition_str" - -for t in $tables -do - echo `date` -- dumping $t - psql $db -c "copy $t to stdout" | gzip -c > $dir/.$t.txt.gz -done - -echo `date` -- moving files - -for t in $tables -do - mv .$t.txt.gz $t.txt.gz -done - -echo `date` -- finished - diff --git a/scripts/2009/01/dumps/Readme.md b/scripts/2009/01/dumps/Readme.md deleted file mode 100644 index ecb4940f0c0..00000000000 --- a/scripts/2009/01/dumps/Readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Scripts for generating data dumps - -* JSON dump: Dump of all pages in the system in JSON. -* Books dump: Dump of all edition with all properties expanded. Used by search engine. -* Change dump: Dump of all modified pages everyday. - - - diff --git a/scripts/2009/01/dumps/jsondump.py b/scripts/2009/01/dumps/jsondump.py deleted file mode 100644 index 0f471754c1f..00000000000 --- a/scripts/2009/01/dumps/jsondump.py +++ /dev/null @@ -1,212 +0,0 @@ -"""Script to generate json dumps. - -The script deals with 3 data formats. - -1. dump of data table in OL postgres database. -2. rawdump: tab seperated file with key, type and json of page in each row -3. bookdump: dump containing only books with each property expanded. (used for solr import) - -""" -import sys -import simplejson -import re - -commands = {} -def command(f): - commands[f.__name__] = f - return f - -@command -def rawdump(datafile): - """Generates a json dump from copy of data table from OL database. - - Usage: - - $ python jsondump.py rawdump datafile > dumpfile - """ - write_rawdump(sys.stdout, read_json(read_data_table(datafile))) - -@command -def merge(dump, idump): - """Merges a large dump with increamental dump. - - $ python jsondump.py bigdump.txt dailydump.txt > bigdump2.txt - """ - def read(path): - for line in xopen(path): - key, _ = line.split("\t", 1)[0] - yield key, line - - def do_merge(): - d = make_dict(read(idump)) - for key, line in read(dump): - yield d.pop(key, line) - - sys.stdout.writelines(do_merge()) - -@command -def json2rawdump(jsonfile): - """Converts a file containing json rows to rawdump format. - """ - write_rawdump(sys.stdout, read_json(jsonfile)) - -@command -def bookdump(rawdump): - """Generates bookdump from rawdump. - """ - pass - -@command -def modified(db, date): - """Display list of modified keys on a given day. - - $ python jsondump.py modified dbname YYYY-MM-DD - """ - import os - os.system("""psql %s -t -c "select key from thing where last_modified >= '%s' and last_modified < (date '%s' + interval '1 day')" """ % (db, date, date)) - -@command -def help(cmd=None): - """Displays this help.""" - action = cmd and get_action(cmd) - if action: - print "python jsondump.py " + cmd - print - print action.__doc__ - else: - print __doc__ - print "List of commands:" - print - - for k in sorted(commands.keys()): - doc = commands[k].__doc__ or " " - print " %-10s\t%s" % (k, doc.splitlines()[0]) - -def get_action(cmd): - if cmd in commands: - return commands[cmd] - else: - print >> sys.stderr, "No such command:", cmd - return help - -def listget(x, i, default=None): - try: - return x[i] - except IndexError: - return default - -def main(): - action = get_action(listget(sys.argv, 1, "help")) - action(*sys.argv[2:]) - -#--- -def make_sub(d): - """ - >>> f = make_sub(dict(a='aa', bb='b')) - >>> f('aabbb') - 'aaaabb' - """ - def f(a): - return d[a.group(0)] - rx = re.compile("|".join(map(re.escape, d.keys()))) - return lambda s: s and rx.sub(f, s) - -def invert_dict(d): - return dict((v, k) for (k, v) in d.items()) - -_escape_dict = {'\n': r'\n', '\r': r'\r', '\t': r'\t', '\\': r'\\'} - -escape = make_sub(_escape_dict) -unescape = make_sub(invert_dict(_escape_dict)) - -def doctest_escape(): - r""" - >>> escape("\n\t") - '\\n\\t' - >>> unescape('\\n\\t') - '\n\t' - """ - -def read_data_table(path): - r"""Read dump of postgres data table assuming that it is sorted by first column. - - >>> list(read_data_table(['1\t1\tJSON-1-1\n', '1\t2\tJSON-1-2\n', '2\t1\tJSON-2-1\n'])) - ['JSON-1-2\n', 'JSON-2-1\n'] - >>> list(read_data_table(['1\t1\tJSON\\t1-1\n'])) - ['JSON\t1-1\n'] - - """ - xthing_id = 1 # assuming that thing_id starts from 1 to simplify the code - xrev = 0 - xjson = "" - - for line in xopen(path): - thing_id, rev, json = line.split("\t") - thing_id = int(thing_id) - rev = int(rev) - if xthing_id == thing_id: - # take the json with higher rev. - if rev > xrev: - xrev = rev - xjson = json - else: - yield unescape(xjson) - xthing_id = thing_id - xrev = rev - xjson = json - - yield unescape(xjson) - -def read_rawdump(file): - r""" - >>> list(read_rawdump(["/foo\t/type/page\tfoo-json\n", "/bar\t/type/doc\tbar-json\n"])) - [['/foo', '/type/page', 'foo-json\n'], ['/bar', '/type/doc', 'bar-json\n']] - """ - return (line.split("\t", 2) for line in xopen(file)) - -def write_rawdump(file, data): - # assuming that newline is already present in json (column#3). - file.writelines("%s\t%s\t%s" % row for row in data) - -def read_json(file): - r""" - >>> list(read_json(['{"key": "/foo", "type": {"key": "/type/page"}, "title": "foo"}\n'])) - [('/foo', '/type/page', '{"key": "/foo", "type": {"key": "/type/page"}, "title": "foo"}\n')] - """ - for json in xopen(file): - d = simplejson.loads(json) - yield d['key'], d['type']['key'], json - -def xopen(file): - if isinstance(file, str): - return open(file) - else: - return file - -def make_dict(items): - return dict(items) - -def capture_stdout(f): - import StringIO - def g(*a): - stdout, sys.stdout = sys.stdout, StringIO.StringIO() - f(*a) - out, sys.stdout = sys.stdout.getvalue(), stdout - return out - return g - -@command -def test(*args): - r"""Test this module. - - >>> 1 + 1 - 2 - - - """ - sys.argv = args - import doctest - doctest.testmod() - -if __name__ == "__main__": - main() diff --git a/scripts/2009/01/index.py b/scripts/2009/01/index.py deleted file mode 100644 index c9c115fe430..00000000000 --- a/scripts/2009/01/index.py +++ /dev/null @@ -1,109 +0,0 @@ -"""Script to generate HTML index of openlibrary.org website. -""" -import gzip -import os -import itertools -import web - -def read_titles(filename): - data = [] - for line in open(filename): - id, title = line.strip().split('\t', 1) - id = int(id) - while len(data) <= id: - data.extend(itertools.repeat(None, 1000000)) - data[id] = title - return data - -def read(titles_file, keys_file): - titles = read_titles(titles_file) - - for line in open(keys_file): - id, key, _ = line.split('\t', 2) - id = int(id) - title = titles[id] or key - yield key, title - -def take(n, seq): - for i in xrange(n): - yield seq.next() - -def group(seq, n): - while True: - x = list(take(n, seq)) - if x: - yield x - else: - break - -t_sitemap = """$def with (title, items) - -$title - - -

Books

-Back | Back to index - -Back | Back to index - - -""" - -t_index = """$def with (title, files) - -$title - - -

$title

- -$if title != "index": - Back to index - - - -$if title != "index": - Back to index - - -""" - -make_sitemap = web.template.Template(t_sitemap) -make_index = web.template.Template(t_index) - -def write(filename, text): - f = open(filename, 'w') - f.write(text) - f.close() - -def write_sitemap(i, seq): - dir = 'index/%02d' % (i/1000) - filename = "%s/index_%05d.html" % (dir, i) - if not os.path.exists(dir): - os.mkdir(dir) - print filename - write(filename, make_sitemap(filename, seq)) - -def write_sitemaps(data): - for i, x in enumerate(group(data, 1000)): - write_sitemap(i, x) - -def main(): - import sys - data = read(sys.argv[1], sys.argv[2]) - write_indexes(data) - - dirs = os.listdir('index'): - write('index/index.html', make_index('index', dirs)) - - for d in dirs: - d = os.path.join('index', d) - write(d + '/index.html', make_index('index', os.listdir(d)) - -if __name__ == "__main__": - main() diff --git a/scripts/2009/01/olpc/Readme.txt b/scripts/2009/01/olpc/Readme.txt deleted file mode 100644 index 8c02150e590..00000000000 --- a/scripts/2009/01/olpc/Readme.txt +++ /dev/null @@ -1,7 +0,0 @@ -Scripts to generate OLPC actitity file. - -books.index - contains the archive ids of all books to be packaged - -To make package: - - $ python make.py diff --git a/scripts/2009/01/olpc/books.index b/scripts/2009/01/olpc/books.index deleted file mode 100644 index b6217056fcb..00000000000 --- a/scripts/2009/01/olpc/books.index +++ /dev/null @@ -1,5 +0,0 @@ -abroadcranethoma00craniala -bookofnurseryrhy00wels -heartofoakbooks01nort -sixnurseryclassi00oshe -historyofwhittin00newyiala diff --git a/scripts/2009/01/olpc/make.py b/scripts/2009/01/olpc/make.py deleted file mode 100644 index ecab7462b02..00000000000 --- a/scripts/2009/01/olpc/make.py +++ /dev/null @@ -1,47 +0,0 @@ -import os - -def system(cmd): - print cmd - os.system(cmd) - -def copy_src(): - system('cp -r src/* dist/openlibrary') - -def copy_gnubook(): - if os.path.exists('dist/bookreader'): - system('cd dist/bookreader && git pull') - else: - system('git clone http://github.com/anandology/bookreader.git dist/bookreader > /dev/null') - - system('cp -r dist/bookreader/GnuBook dist/openlibrary/') - -def copy_books(): - def copy(id): - system('cd dist/downloads && wget -nv http://www.archive.org/download/%s/%s_flippy.zip' % (id, id)) - system('mkdir -p dist/openlibrary/books/' + id) - system('unzip -u dist/downloads/%s_flippy.zip -d dist/openlibrary/books/%s > /dev/null' % (id, id)) - - for id in open('books.index').read().split(): - copy(id) - -def make_books_js(): - books = open('books.index').read().split() - print 'creating dist/openlibrary/js/books.js' - f = open('dist/openlibrary/js/books.js', 'w') - f.write('var books = ') - f.write(repr(books)); - f.write(';\n'); - f.close() - -def main(): - system('mkdir -p dist/openlibrary dist/downloads') - copy_src() - copy_gnubook() - copy_books() - make_books_js() - system('cd dist && zip -r openlibrary.xol openlibrary > /dev/null') - print - print "Activity file generated at: dist/openlibrary.xol" - -if __name__ == "__main__": - main() diff --git a/scripts/2009/01/olpc/src/embed.html b/scripts/2009/01/olpc/src/embed.html deleted file mode 100644 index fe5b8daf19c..00000000000 --- a/scripts/2009/01/olpc/src/embed.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - bookreader demo - - - - - - - - - -
x
- - diff --git a/scripts/2009/01/olpc/src/images/down-enabled.gif b/scripts/2009/01/olpc/src/images/down-enabled.gif deleted file mode 100644 index 2d89c38f803..00000000000 Binary files a/scripts/2009/01/olpc/src/images/down-enabled.gif and /dev/null differ diff --git a/scripts/2009/01/olpc/src/images/up-disabled.gif b/scripts/2009/01/olpc/src/images/up-disabled.gif deleted file mode 100644 index dde3d72bb97..00000000000 Binary files a/scripts/2009/01/olpc/src/images/up-disabled.gif and /dev/null differ diff --git a/scripts/2009/01/olpc/src/images/up-enabled.gif b/scripts/2009/01/olpc/src/images/up-enabled.gif deleted file mode 100644 index a8a9b742c39..00000000000 Binary files a/scripts/2009/01/olpc/src/images/up-enabled.gif and /dev/null differ diff --git a/scripts/2009/01/olpc/src/index.html b/scripts/2009/01/olpc/src/index.html deleted file mode 100644 index 61c9ea8b714..00000000000 --- a/scripts/2009/01/olpc/src/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - OLPC Bookreader Demo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Previous Button -
- - - -
- Next Button -
- -
Hide This Collection
-
- - - - - diff --git a/scripts/2009/01/olpc/src/js/carousel.css b/scripts/2009/01/olpc/src/js/carousel.css deleted file mode 100644 index 6e9fd4a3469..00000000000 --- a/scripts/2009/01/olpc/src/js/carousel.css +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) 2006-2007, Bill W. Scott - * All rights reserved. - * - * This work is licensed under the Creative Commons Attribution 2.5 License. To view a copy - * of this license, visit http://creativecommons.org/licenses/by/2.5/ or send a letter to - * Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. - * - * This work was created by Bill Scott (billwscott.com, looksgoodworkswell.com). - * - * The only attribution I require is to keep this notice of copyright & license - * in this original source file. - * - * Version 1.0 - 10.21.2008 - */ - -/** - * Standard Configuration. It is advised that this section NOT be modified as the - * carousel.js expects the behavior outlined below. - **/ -.carousel-component { - position:relative; - overflow:hidden; /* causes the clipping */ - display:none; /* component turns it on when first item is rendered */ - -} - -.carousel-component ul.carousel-list { - width:10000000px; - position:relative; - z-index:1; -} - -.carousel-component .carousel-list li { - float:left; - list-style:none; - overflow:hidden; - - -} - -/** - * VERTICAL CAROUSEL DEFAULTS - **/ -.carousel-component .carousel-vertical li { - margin-bottom:0px; - - /* Fix for extra spacing in IE */ - float:left; - clear:left; - - /* Force the LI to respect the HEIGHT specified */ - overflow:hidden; - display:block; -} - -/* For vertical carousel, not set, width defaults to auto */ -/* Note if you explicitly set width to auto, this might cause */ -/* problems with Safari... as in up/down button not working in some examples. */ -.carousel-component ul.carousel-vertical { -/* width:auto;*/ -} - -.carousel-component .carousel-clip-region { - overflow:hidden; /* Secret to the clipping */ - margin:0px auto; - position:relative; -} - -/** - * ============================================================================== - * Safe to override. It is safe to override background, padding, margin, color, - * text alignment, fonts, etc. Define a separate CSS file and override your style - * preferences. - **/ - -.carousel-component { - background:#e2edfa; - padding:0px; - -moz-border-radius:6px; - color:#618cbe; -} -.carousel-component ul.carousel-list { - margin:0px; - padding:0px; - line-height:0px; -} -.carousel-component .carousel-list li { - text-align:center; - margin:0px; - padding:0px; - font:10px verdana,arial,sans-serif; - color:#666; -} -.carousel-component .carousel-vertical li { -} -.carousel-component ul.carousel-vertical { -} \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/carousel.js b/scripts/2009/01/olpc/src/js/carousel.js deleted file mode 100644 index 8abc2a18f08..00000000000 --- a/scripts/2009/01/olpc/src/js/carousel.js +++ /dev/null @@ -1,1698 +0,0 @@ -/** - * Copyright (c) 2006-2007, Bill W. Scott - * All rights reserved. - * - * This work is licensed under the Creative Commons Attribution 2.5 License. To view a copy - * of this license, visit http://creativecommons.org/licenses/by/2.5/ or send a letter to - * Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. - * - * This work was created by Bill Scott (billwscott.com, looksgoodworkswell.com). - * - * The only attribution I require is to keep this notice of copyright & license - * in this original source file. - * - * Version 1.0 - 10.21.2008 - * - */ -YAHOO.namespace("extension"); - -/** -* @class -* The carousel class manages a content list (a set of LI elements within an UL list) that can be displayed horizontally or vertically. The content can be scrolled back and forth with or without animation. The content can reference static HTML content or the list items can be created dynamically on-the-fly (with or without Ajax). The navigation and event handling can be externalized from the class. -* @param {object|string} carouselElementID The element ID (id name or id object) of the DIV that will become a carousel -* @param {object} carouselCfg The configuration object literal containing the configuration that should be set for this module. See configuration documentation for more details. -* @constructor -*/ -YAHOO.extension.Carousel = function(carouselElementID, carouselCfg) { - this.init(carouselElementID, carouselCfg); - }; - -YAHOO.extension.Carousel.prototype = { - - - /** - * Constant denoting that the carousel size is unbounded (no limits set on scrolling) - * @type number - */ - UNBOUNDED_SIZE: 1000000, - - /** - * Initializes the carousel object and all of its local members. - * @param {object|string} carouselElementID The element ID (id name or id object) - * of the DIV that will become a carousel - * @param {object} carouselCfg The configuration object literal containing the - * configuration that should be set for this module. See configuration documentation for more details. - */ - init: function(carouselElementID, carouselCfg) { - - var oThis = this; - - /** - * For deprecation. - * getItem is the replacement for getCarouselItem - */ - this.getCarouselItem = this.getItem; - - // CSS style classes - var carouselListClass = "carousel-list"; - var carouselClipRegionClass = "carousel-clip-region"; - var carouselNextClass = "carousel-next"; - var carouselPrevClass = "carousel-prev"; - - this._carouselElemID = carouselElementID; - this.carouselElem = YAHOO.util.Dom.get(carouselElementID); - - this._prevEnabled = true; - this._nextEnabled = true; - - // Create the config object - this.cfg = new YAHOO.util.Config(this); - - /** - * scrollBeforeAmount property. - * Normally, set to 0, this is how much you are allowed to - * scroll below the first item. Setting it to 2 allows you - * to scroll to the -1 position. - * However, the load handlers will not be asked to load anything - * below 1. - * - * A good example is the spotlight example which treats the middle item - * as the "selected" item. It sets scrollBeforeAmount to 2 and - * scrollAfterAmount to 2. - * - * The actual items loaded would be from 1 to 15 (size=15), - * but scrolling range would be -1 to 17. - */ - this.cfg.addProperty("scrollBeforeAmount", { - value:0, - handler: function(type, args, carouselElem) { - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * scrollAfterAmount property. - * Normally, set to 0, this is how much you are allowed to - * scroll past the size. Setting it to 2 allows you - * to scroll to the size+scrollAfterAmount position. - * However, the load handlers will not be asked to load anything - * beyond size. - * - * A good example is the spotlight example which treats the middle item - * as the "selected" item. It sets scrollBeforeAmount to 2 and - * scrollAfterAmount to 2. - * - * The actual items loaded would be from 1 to 15 (size=15), - * but scrolling range would be -1 to 17. - */ - this.cfg.addProperty("scrollAfterAmount", { - value:0, - handler: function(type, args, carouselElem) { - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * loadOnStart property. - * If true, will call loadInitHandler on startup. - * If false, will not. Useful for delaying the initialization - * of the carousel for a later time after creation. - */ - this.cfg.addProperty("loadOnStart", { - value:true, - handler: function(type, args, carouselElem) { - // no action, only affects startup - }, - validator: oThis.cfg.checkBoolean - } ); - - /** - * orientation property. - * Either "horizontal" or "vertical". Changes carousel from a - * left/right style carousel to a up/down style carousel. - */ - this.cfg.addProperty("orientation", { - value:"horizontal", - handler: function(type, args, carouselElem) { - oThis.reload(); - }, - validator: function(orientation) { - if(typeof orientation === "string") { - return ("horizontal,vertical".indexOf(orientation.toLowerCase()) !== -1); - } else { - return false; - } - } - } ); - - /** - * size property. - * The upper bound for scrolling in the 'next' set of content. - * Set to a large value by default (this means unlimited scrolling.) - */ - this.cfg.addProperty("size", { - value:this.UNBOUNDED_SIZE, - handler: function(type, args, carouselElem) { - oThis.reload(); - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * numVisible property. - * The number of items that will be visible. - */ - this.cfg.addProperty("numVisible", { - value:3, - handler: function(type, args, carouselElem) { - oThis.reload(); - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * firstVisible property. - * Sets which item should be the first visible item in the carousel. Use to set which item will - * display as the first element when the carousel is first displayed. After the carousel is created, - * you can manipulate which item is the first visible by using the moveTo() or scrollTo() convenience - * methods. Can be < 1 or greater than size if the scrollBeforeAmount or scrollAmountAfter has been set - * to non-zero values. - */ - this.cfg.addProperty("firstVisible", { - value:1, - handler: function(type, args, carouselElem) { - oThis.moveTo(args[0]); - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * scrollInc property. - * The number of items to scroll by. Think of this as the page increment. - */ - this.cfg.addProperty("scrollInc", { - value:3, - handler: function(type, args, carouselElem) { - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * animationSpeed property. - * The time (in seconds) it takes to complete the scroll animation. - * If set to 0, animated transitions are turned off and the new page of content is - * moved immdediately into place. - */ - this.cfg.addProperty("animationSpeed", { - value:0.25, - handler: function(type, args, carouselElem) { - oThis.animationSpeed = args[0]; - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * animationMethod property. - * The YAHOO.util.Easing - * method. - */ - this.cfg.addProperty("animationMethod", { - value: YAHOO.util.Easing.easeOut, - handler: function(type, args, carouselElem) { - } - } ); - - /** - * animationCompleteHandler property. - * JavaScript function that is called when the Carousel finishes animation - * after a next or previous nagivation. - * Only invoked if animationSpeed > 0. - * Two parameters are passed: type (set to 'onAnimationComplete') and - * args array (args[0] = direction [either: 'next' or 'previous']). - */ - this.cfg.addProperty("animationCompleteHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._animationCompleteEvt) { - oThis._animationCompleteEvt.unsubscribe(oThis._currAnimationCompleteHandler, oThis); - } - oThis._currAnimationCompleteHandler = args[0]; - if(oThis._currAnimationCompleteHandler) { - if(!oThis._animationCompleteEvt) { - oThis._animationCompleteEvt = new YAHOO.util.CustomEvent("onAnimationComplete", oThis); - } - oThis._animationCompleteEvt.subscribe(oThis._currAnimationCompleteHandler, oThis); - } - } - } ); - - /** - * autoPlay property. - * Specifies how many milliseconds to periodically auto scroll the content. - * If set to 0 (default) then autoPlay is turned off. - * If the user interacts by clicking left or right navigation, autoPlay is turned off. - * You can restart autoPlay by calling the startAutoPlay(). - * If you externally control navigation (with your own event handlers) - * then you may want to turn off the autoPlay by callingstopAutoPlay() - */ - this.cfg.addProperty("autoPlay", { - value:0, - handler: function(type, args, carouselElem) { - var autoPlay = args[0]; - if(autoPlay > 0) - oThis.startAutoPlay(); - else - oThis.stopAutoPlay(); - } - } ); - - /** - * wrap property. - * Specifies whether to wrap when at the end of scrolled content. When the end is reached, - * the carousel will scroll backwards to the item 1 (the animationSpeed parameter is used to - * determine how quickly it should animate back to the start.) - * Ignored if the size attribute is not explicitly set - * (i.e., value equals YAHOO.extension.Carousel.UNBOUNDED_SIZE) - */ - this.cfg.addProperty("wrap", { - value:false, - handler: function(type, args, carouselElem) { - }, - validator: oThis.cfg.checkBoolean - } ); - - /** - * navMargin property. - * The margin space for the navigation controls. This is only useful for horizontal carousels - * in which you have embedded navigation controls. - * The navMargin allocates space between the left and right margins - * (each navMargin wide) giving space for the navigation controls. - */ - this.cfg.addProperty("navMargin", { - value:0, - handler: function(type, args, carouselElem) { - oThis.calculateSize(); - }, - validator: oThis.cfg.checkNumber - } ); - - /** - * revealAmount property. - * The amount to reveal of what comes before and what comes after the firstVisible and - * the lastVisible items. Setting this will provide a slight preview that something - * exists before and after, providing an additional hint for the user. - * The revealAmount will reveal the specified number of pixels for any item - * before the firstVisible and an item after the lastVisible. Additionall, the - * loadNextHandler and loadPrevHandler methods will be passed a start or end that guarantees - * the revealed item will be loaded (if set to non-zero). - */ - this.cfg.addProperty("revealAmount", { - value:0, - handler: function(type, args, carouselElem) { - oThis.reload(); - }, - validator: oThis.cfg.checkNumber - } ); - - // For backward compatibility. Deprecated. - this.cfg.addProperty("prevElementID", { - value: null, - handler: function(type, args, carouselElem) { - if(oThis._carouselPrev) { - YAHOO.util.Event.removeListener(oThis._carouselPrev, "click", oThis._scrollPrev); - } - oThis._prevElementID = args[0]; - if(oThis._prevElementID === null) { - oThis._carouselPrev = YAHOO.util.Dom.getElementsByClassName(carouselPrevClass, - "div", oThis.carouselElem)[0]; - } else { - oThis._carouselPrev = YAHOO.util.Dom.get(oThis._prevElementID); - } - YAHOO.util.Event.addListener(oThis._carouselPrev, "click", oThis._scrollPrev, oThis); - } - }); - - /** - * prevElement property. - * An element or elements that will provide the previous navigation control. - * prevElement may be a single element or an array of elements. The values may be strings denoting - * the ID of the element or the object itself. - * If supplied, then events are wired to this control to fire scroll events to move the carousel to - * the previous content. - * You may want to provide your own interaction for controlling the carousel. If - * so leave this unset and provide your own event handling mechanism. - */ - this.cfg.addProperty("prevElement", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._carouselPrev) { - YAHOO.util.Event.removeListener(oThis._carouselPrev, "click", oThis._scrollPrev); - } - oThis._prevElementID = args[0]; - if(oThis._prevElementID === null) { - oThis._carouselPrev = YAHOO.util.Dom.getElementsByClassName(carouselPrevClass, - "div", oThis.carouselElem)[0]; - } else { - oThis._carouselPrev = YAHOO.util.Dom.get(oThis._prevElementID); - } - YAHOO.util.Event.addListener(oThis._carouselPrev, "click", oThis._scrollPrev, oThis); - } - } ); - - // For backward compatibility. Deprecated. - this.cfg.addProperty("nextElementID", { - value: null, - handler: function(type, args, carouselElem) { - if(oThis._carouselNext) { - YAHOO.util.Event.removeListener(oThis._carouselNext, "click", oThis._scrollNext); - } - oThis._nextElementID = args[0]; - if(oThis._nextElementID === null) { - oThis._carouselNext = YAHOO.util.Dom.getElementsByClassName(carouselNextClass, - "div", oThis.carouselElem); - } else { - oThis._carouselNext = YAHOO.util.Dom.get(oThis._nextElementID); - } - if(oThis._carouselNext) { - YAHOO.util.Event.addListener(oThis._carouselNext, "click", oThis._scrollNext, oThis); - } - } - }); - - /** - * nextElement property. - * An element or elements that will provide the next navigation control. - * nextElement may be a single element or an array of elements. The values may be strings denoting - * the ID of the element or the object itself. - * If supplied, then events are wired to this control to fire scroll events to move the carousel to - * the next content. - * You may want to provide your own interaction for controlling the carousel. If - * so leave this unset and provide your own event handling mechanism. - */ - this.cfg.addProperty("nextElement", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._carouselNext) { - YAHOO.util.Event.removeListener(oThis._carouselNext, "click", oThis._scrollNext); - } - oThis._nextElementID = args[0]; - if(oThis._nextElementID === null) { - oThis._carouselNext = YAHOO.util.Dom.getElementsByClassName(carouselNextClass, - "div", oThis.carouselElem); - } else { - oThis._carouselNext = YAHOO.util.Dom.get(oThis._nextElementID); - } - if(oThis._carouselNext) { - YAHOO.util.Event.addListener(oThis._carouselNext, "click", oThis._scrollNext, oThis); - } - } - } ); - - /** - * disableSelection property. - * Suggestion by Jenny Mok. - * Specifies whether to turn off browser text selection within the carousel. Default is true. - * If true, nothing inside the browser may be text selected. This prevents the ugly effect of - * the user accidentally clicking and starting a text selection for the elements in the carousel. - * If false, selection is allowed. You might want to turn this on if you want the items within - * a carousel to be selectable by the browser. - */ - this.cfg.addProperty("disableSelection", { - value:true, - handler: function(type, args, carouselElem) { - }, - validator: oThis.cfg.checkBoolean - } ); - - - /** - * loadInitHandler property. - * JavaScript function that is called when the Carousel needs to load - * the initial set of visible items. Two parameters are passed: - * type (set to 'onLoadInit') and an argument array (args[0] = start index, args[1] = last index). - */ - this.cfg.addProperty("loadInitHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._loadInitHandlerEvt) { - oThis._loadInitHandlerEvt.unsubscribe(oThis._currLoadInitHandler, oThis); - } - oThis._currLoadInitHandler = args[0]; - if(oThis._currLoadInitHandler) { - if(!oThis._loadInitHandlerEvt) { - oThis._loadInitHandlerEvt = new YAHOO.util.CustomEvent("onLoadInit", oThis); - } - oThis._loadInitHandlerEvt.subscribe(oThis._currLoadInitHandler, oThis); - } - } - } ); - - /** - * loadNextHandler property. - * JavaScript function that is called when the Carousel needs to load - * the next set of items (in response to the user navigating to the next set.) - * Two parameters are passed: type (set to 'onLoadNext') and - * args array (args[0] = start index, args[1] = last index). - */ - this.cfg.addProperty("loadNextHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._loadNextHandlerEvt) { - oThis._loadNextHandlerEvt.unsubscribe(oThis._currLoadNextHandler, oThis); - } - oThis._currLoadNextHandler = args[0]; - if(oThis._currLoadNextHandler) { - if(!oThis._loadNextHandlerEvt) { - oThis._loadNextHandlerEvt = new YAHOO.util.CustomEvent("onLoadNext", oThis); - } - oThis._loadNextHandlerEvt.subscribe(oThis._currLoadNextHandler, oThis); - } - } - } ); - - /** - * loadPrevHandler property. - * JavaScript function that is called when the Carousel needs to load - * the previous set of items (in response to the user navigating to the previous set.) - * Two parameters are passed: type (set to 'onLoadPrev') and args array - * (args[0] = start index, args[1] = last index). - */ - this.cfg.addProperty("loadPrevHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._loadPrevHandlerEvt) { - oThis._loadPrevHandlerEvt.unsubscribe(oThis._currLoadPrevHandler, oThis); - } - oThis._currLoadPrevHandler = args[0]; - if(oThis._currLoadPrevHandler) { - if(!oThis._loadPrevHandlerEvt) { - oThis._loadPrevHandlerEvt = new YAHOO.util.CustomEvent("onLoadPrev", oThis); - } - oThis._loadPrevHandlerEvt.subscribe(oThis._currLoadPrevHandler, oThis); - } - } - } ); - - /** - * prevButtonStateHandler property. - * JavaScript function that is called when the enabled state of the - * 'previous' control is changing. The responsibility of - * this method is to enable or disable the 'previous' control. - * Two parameters are passed to this method: type - * (which is set to "onPrevButtonStateChange") and args, - * an array that contains two values. - * The parameter args[0] is a flag denoting whether the 'previous' control - * is being enabled or disabled. The parameter args[1] is the element object - * derived from the prevElement parameter. - * If you do not supply a prevElement then you will need to track - * the elements that you would want to enable/disable while handling the state change. - */ - this.cfg.addProperty("prevButtonStateHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._currPrevButtonStateHandler) { - oThis._prevButtonStateHandlerEvt.unsubscribe(oThis._currPrevButtonStateHandler, oThis); - } - - oThis._currPrevButtonStateHandler = args[0]; - - if(oThis._currPrevButtonStateHandler) { - if(!oThis._prevButtonStateHandlerEvt) { - oThis._prevButtonStateHandlerEvt = new YAHOO.util.CustomEvent("onPrevButtonStateChange", oThis); - } - oThis._prevButtonStateHandlerEvt.subscribe(oThis._currPrevButtonStateHandler, oThis); - } - } - } ); - - /** - * nextButtonStateHandler property. - * JavaScript function that is called when the enabled state of the - * 'next' control is changing. The responsibility of - * this method is to enable or disable the 'next' control. - * Two parameters are passed to this method: type - * (which is set to "onNextButtonStateChange") and args, - * an array that contains two values. - * The parameter args[0] is a flag denoting whether the 'next' control - * is being enabled or disabled. The parameter args[1] is the element object - * derived from the nextElement parameter. - * If you do not supply a nextElement then you will need to track - * the elements that you would want to enable/disable while handling the state change. - */ - this.cfg.addProperty("nextButtonStateHandler", { - value:null, - handler: function(type, args, carouselElem) { - if(oThis._currNextButtonStateHandler) { - oThis._nextButtonStateHandlerEvt.unsubscribe(oThis._currNextButtonStateHandler, oThis); - } - oThis._currNextButtonStateHandler = args[0]; - - if(oThis._currNextButtonStateHandler) { - if(!oThis._nextButtonStateHandlerEvt) { - oThis._nextButtonStateHandlerEvt = new YAHOO.util.CustomEvent("onNextButtonStateChange", oThis); - } - oThis._nextButtonStateHandlerEvt.subscribe(oThis._currNextButtonStateHandler, oThis); - } - } - } ); - - - if(carouselCfg) { - this.cfg.applyConfig(carouselCfg); - } - YAHOO.util.Event.addListener(this.carouselElem, 'mousedown', this._handleMouseDownForSelection, this, true); - - this._origFirstVisible = this.cfg.getProperty("firstVisible"); - - // keep a copy of curr handler so it can be removed when a new handler is set - this._currLoadInitHandler = this.cfg.getProperty("loadInitHandler"); - this._currLoadNextHandler = this.cfg.getProperty("loadNextHandler"); - this._currLoadPrevHandler = this.cfg.getProperty("loadPrevHandler"); - this._currPrevButtonStateHandler = this.cfg.getProperty("prevButtonStateHandler"); - this._currNextButtonStateHandler = this.cfg.getProperty("nextButtonStateHandler"); - this._currAnimationCompleteHandler = this.cfg.getProperty("animationCompleteHandler"); - - this._nextElementID = this.cfg.getProperty("nextElementID"); - if(!this._nextElementID) - this._nextElementID = this.cfg.getProperty("nextElement"); - - this._prevElementID = this.cfg.getProperty("prevElementID"); - if(!this._prevElementID) - this._prevElementID = this.cfg.getProperty("prevElement"); - - this._autoPlayTimer = null; - this._priorLastVisible = this._priorFirstVisible = this.cfg.getProperty("firstVisible"); - this._lastPrebuiltIdx = 0; -// this._currSize = 0; - - // prefetch elements - this.carouselList = YAHOO.util.Dom.getElementsByClassName(carouselListClass, - "ul", this.carouselElem)[0]; - - if(this._nextElementID === null) { - this._carouselNext = YAHOO.util.Dom.getElementsByClassName(carouselNextClass, - "div", this.carouselElem)[0]; - } else { - this._carouselNext = YAHOO.util.Dom.get(this._nextElementID); - } - - if(this._prevElementID === null) { - this._carouselPrev = YAHOO.util.Dom.getElementsByClassName(carouselPrevClass, - "div", this.carouselElem)[0]; - } else { - this._carouselPrev = YAHOO.util.Dom.get(this._prevElementID); - } - - this._clipReg = YAHOO.util.Dom.getElementsByClassName(carouselClipRegionClass, - "div", this.carouselElem)[0]; - - // add a style class dynamically so that the correct styles get applied for a vertical carousel - if(this.isVertical()) { - YAHOO.util.Dom.addClass(this.carouselList, "carousel-vertical"); - } - - // initialize the animation objects for next/previous - this._scrollNextAnim = new YAHOO.util.Motion(this.carouselList, this.scrollNextParams, - this.cfg.getProperty("animationSpeed"), this.cfg.getProperty("animationMethod")); - this._scrollPrevAnim = new YAHOO.util.Motion(this.carouselList, this.scrollPrevParams, - this.cfg.getProperty("animationSpeed"), this.cfg.getProperty("animationMethod")); - - // If they supplied a nextElementID then wire an event listener for the click - if(this._carouselNext) { - YAHOO.util.Event.addListener(this._carouselNext, "click", this._scrollNext, this); - } - - // If they supplied a prevElementID then wire an event listener for the click - if(this._carouselPrev) { - YAHOO.util.Event.addListener(this._carouselPrev, "click", this._scrollPrev, this); - } - - // Wire up the various event handlers that they might have supplied - var loadInitHandler = this.cfg.getProperty("loadInitHandler"); - if(loadInitHandler) { - this._loadInitHandlerEvt = new YAHOO.util.CustomEvent("onLoadInit", this); - this._loadInitHandlerEvt.subscribe(loadInitHandler, this); - } - var loadNextHandler = this.cfg.getProperty("loadNextHandler"); - if(loadNextHandler) { - this._loadNextHandlerEvt = new YAHOO.util.CustomEvent("onLoadNext", this); - this._loadNextHandlerEvt.subscribe(loadNextHandler, this); - } - var loadPrevHandler = this.cfg.getProperty("loadPrevHandler"); - if(loadPrevHandler) { - this._loadPrevHandlerEvt = new YAHOO.util.CustomEvent("onLoadPrev", this); - this._loadPrevHandlerEvt.subscribe(loadPrevHandler, this); - } - var animationCompleteHandler = this.cfg.getProperty("animationCompleteHandler"); - if(animationCompleteHandler) { - this._animationCompleteEvt = new YAHOO.util.CustomEvent("onAnimationComplete", this); - this._animationCompleteEvt.subscribe(animationCompleteHandler, this); - } - var prevButtonStateHandler = this.cfg.getProperty("prevButtonStateHandler"); - if(prevButtonStateHandler) { - this._prevButtonStateHandlerEvt = new YAHOO.util.CustomEvent("onPrevButtonStateChange", - this); - this._prevButtonStateHandlerEvt.subscribe(prevButtonStateHandler, this); - } - var nextButtonStateHandler = this.cfg.getProperty("nextButtonStateHandler"); - if(nextButtonStateHandler) { - this._nextButtonStateHandlerEvt = new YAHOO.util.CustomEvent("onNextButtonStateChange", this); - this._nextButtonStateHandlerEvt.subscribe(nextButtonStateHandler, this); - } - - // Since loading may take some time, wire up a listener to fire when at least the first - // element actually gets loaded - var visibleExtent = this._calculateVisibleExtent(); - YAHOO.util.Event.onAvailable(this._carouselElemID + "-item-"+ - visibleExtent.start, this._calculateSize, this); - - - // Call the initial loading sequence - if(this.cfg.getProperty("loadOnStart")) - this._loadInitial(); - - }, - - // this set to carousel - _handleMouseDownForSelection: function(e) { - if(this.cfg.getProperty("disableSelection")) { - YAHOO.util.Event.preventDefault(e); - YAHOO.util.Event.stopPropagation(e); - } - }, - // /////////////////// Public API ////////////////////////////////////////// - - /** - * Clears all items from the list and resets to the carousel to its original initial state. - */ - clear: function() { - // remove all items from the carousel for dynamic content - var loadInitHandler = this.cfg.getProperty("loadInitHandler"); - if(loadInitHandler) { - this._removeChildrenFromNode(this.carouselList); - this._lastPrebuiltIdx = 0; - } - // turn off autoplay - this.stopAutoPlay(); // should we only turn this off for dynamic during reload? - - this._priorLastVisible = this._priorFirstVisible = this._origFirstVisible; - - // is this redundant since moveTo will set this? - this.cfg.setProperty("firstVisible", this._origFirstVisible, true); - this.moveTo(this._origFirstVisible); - }, - - /** - * Clears all items from the list and calls the loadInitHandler to load new items into the list. - * The carousel size is reset to the original size set during creation. - * @param {number} numVisible Optional parameter: numVisible. - * If set, the carousel will resize on the reload to show numVisible items. - */ - reload: function(numVisible) { - // this should be deprecated, not needed since can be set via property change - if(this._isValidObj(numVisible)) { - this.cfg.setProperty("numVisible", numVisible); - } - this.clear(); - - // clear resets back to start - var visibleExtent = this._calculateVisibleExtent(); - YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start, - this._calculateSize, this); - this._loadInitial(); - - }, - - load: function() { - var visibleExtent = this._calculateVisibleExtent(); - - YAHOO.util.Event.onAvailable(this._carouselElemID + "-item-"+visibleExtent.start, - this._calculateSize, this); - this._loadInitial(); - }, - - /** - * With patch from Dan Hobbs for handling unordered loading. - * @param {number} idx which item in the list to potentially create. - * If item already exists it will not create a new item. - * @param {string} innerHTML The innerHTML string to use to create the contents of an LI element. - * @param {string} itemClass A class optionally supplied to add to the LI item created - */ - addItem: function(idx, innerHTMLOrElem, itemClass) { - - if(idx > this.cfg.getProperty("size")) { - return null; - } - - var liElem = this.getItem(idx); - - // Need to create the li - if(!this._isValidObj(liElem)) { - liElem = this._createItem(idx, innerHTMLOrElem); - this.carouselList.appendChild(liElem); - - } else if(this._isValidObj(liElem.placeholder)) { - var newLiElem = this._createItem(idx, innerHTMLOrElem); - this.carouselList.replaceChild(newLiElem, liElem); - liElem = newLiElem; - } - - // if they supplied an item class add it to the element - if(this._isValidObj(itemClass)){ - YAHOO.util.Dom.addClass(liElem, itemClass); - } - - /** - * Not real comfortable with this line of code. It exists for vertical - * carousels for IE6. For some reason LI elements are not displaying - * unless you after the fact set the display to block. (Even though - * the CSS sets vertical LIs to display:block) - */ - if(this.isVertical()) - setTimeout( function() { liElem.style.display="block"; }, 1 ); - - return liElem; - - }, - - /** - * Inserts a new LI item before the index specified. Uses the innerHTML to create the contents of the new LI item - * @param {number} refIdx which item in the list to insert this item before. - * @param {string} innerHTML The innerHTML string to use to create the contents of an LI element. - */ - insertBefore: function(refIdx, innerHTML) { - // don't allow insertion beyond the size - if(refIdx >= this.cfg.getProperty("size")) { - return null; - } - - if(refIdx < 1) { - refIdx = 1; - } - - var insertionIdx = refIdx - 1; - - if(insertionIdx > this._lastPrebuiltIdx) { - this._prebuildItems(this._lastPrebuiltIdx, refIdx); // is this right? - } - - var liElem = this._insertBeforeItem(refIdx, innerHTML); - - this._enableDisableControls(); - - return liElem; - }, - - /** - * Inserts a new LI item after the index specified. Uses the innerHTML to create the contents of the new LI item - * @param {number} refIdx which item in the list to insert this item after. - * @param {string} innerHTML The innerHTML string to use to create the contents of an LI element. - */ - insertAfter: function(refIdx, innerHTML) { - - if(refIdx > this.cfg.getProperty("size")) { - refIdx = this.cfg.getProperty("size"); - } - - var insertionIdx = refIdx + 1; - - // if we are inserting this item past where we have prebuilt items, then - // prebuild up to this point. - if(insertionIdx > this._lastPrebuiltIdx) { - this._prebuildItems(this._lastPrebuiltIdx, insertionIdx+1); - } - - var liElem = this._insertAfterItem(refIdx, innerHTML); - - if(insertionIdx > this.cfg.getProperty("size")) { - this.cfg.setProperty("size", insertionIdx, true); - } - - this._enableDisableControls(); - - return liElem; - }, - - /** - * Simulates a next button event. Causes the carousel to scroll the next set of content into view. - */ - scrollNext: function() { - this._scrollNext(null, this); - - // we know the timer has expired. - //if(this._autoPlayTimer) clearTimeout(this._autoPlayTimer); - this._autoPlayTimer = null; - if(this.cfg.getProperty("autoPlay") !== 0) { - this._autoPlayTimer = this.startAutoPlay(); - } - }, - - /** - * Simulates a prev button event. Causes the carousel to scroll the previous set of content into view. - */ - scrollPrev: function() { - this._scrollPrev(null, this); - }, - - /** - * Scrolls the content to place itemNum as the start item in the view - * (if size is specified, the last element will not scroll past the end.). - * Uses current animation speed & method. - * @param {number} newStart The item to scroll to. - */ - scrollTo: function(newStart) { - this._position(newStart, true); - }, - - /** - * Moves the content to place itemNum as the start item in the view - * (if size is specified, the last element will not scroll past the end.) - * Ignores animation speed & method; moves directly to the item. - * Note that you can also set the firstVisible property upon initialization - * to get the carousel to start at a position different than 1. - * @param {number} newStart The item to move directly to. - */ - moveTo: function(newStart) { - this._position(newStart, false); - }, - - /** - * Starts up autoplay. If autoPlay has been stopped (by calling stopAutoPlay or by user interaction), - * you can start it back up by using this method. - * @param {number} interval optional parameter that sets the interval - * for auto play the next time that autoplay fires. - */ - startAutoPlay: function(interval) { - // if interval is passed as arg, then set autoPlay to this interval. - if(this._isValidObj(interval)) { - this.cfg.setProperty("autoPlay", interval, true); - } - - // if we already are playing, then do nothing. - if(this._autoPlayTimer !== null) { - return this._autoPlayTimer; - } - - var oThis = this; - var autoScroll = function() { oThis.scrollNext(); }; - this._autoPlayTimer = setTimeout( autoScroll, this.cfg.getProperty("autoPlay") ); - - return this._autoPlayTimer; - }, - - /** - * Stops autoplay. Useful for when you want to control what events will stop the autoplay feature. - * Call startAutoPlay() to restart autoplay. - */ - stopAutoPlay: function() { - if (this._autoPlayTimer !== null) { - clearTimeout(this._autoPlayTimer); - this._autoPlayTimer = null; - } - }, - - /** - * Returns whether the carousel's orientation is set to vertical. - */ - isVertical: function() { - return (this.cfg.getProperty("orientation") !== "horizontal"); - }, - - - /** - * Check to see if an element (by index) has been loaded or not. If the item is simply pre-built, but not - * loaded this will return false. If the item has not been pre-built it will also return false. - * @param {number} idx Index of the element to check load status for. - */ - isItemLoaded: function(idx) { - var liElem = this.getItem(idx); - - // if item exists and is not a placeholder, then it is already loaded. - if(this._isValidObj(liElem) && !this._isValidObj(liElem.placeholder)) { - return true; - } - - return false; - }, - - /** - * Lookup the element object for a carousel list item by index. - * @param {number} idx Index of the element to lookup. - */ - getItem: function(idx) { - var elemName = this._carouselElemID + "-item-" + idx; - var liElem = YAHOO.util.Dom.get(elemName); - return liElem; - }, - - show: function() { - YAHOO.util.Dom.setStyle(this.carouselElem, "display", "block"); - this.calculateSize(); - }, - - hide: function() { - YAHOO.util.Dom.setStyle(this.carouselElem, "display", "none"); - }, - - calculateSize: function() { - var ulKids = this.carouselList.childNodes; - var li = null; - for(var i=0; i 1 then this will adjust the scrolled location - var currY = YAHOO.util.Dom.getY(this.carouselList); - YAHOO.util.Dom.setY(this.carouselList, currY - this.scrollAmountPerInc*(firstVisible-1)); - - // --- HORIZONTAL - } else { - YAHOO.util.Dom.addClass(this.carouselList, "carousel-horizontal"); - - var upl = this._getStyleVal(this.carouselList, "paddingLeft"); - var upr = this._getStyleVal(this.carouselList, "paddingRight"); - var uml = this._getStyleVal(this.carouselList, "marginLeft") - var umr = this._getStyleVal(this.carouselList, "marginRight") - var ulPaddingWidth = upl + upr + uml + umr; - - var liMarginWidth = ml + mr; - var liPaddingMarginWidth = liMarginWidth + pr + pl; - - // try to reveal the amount taking into consideration the margin & padding. - // This guarantees that this.revealAmount of pixels will be shown on both sides - var revealAmt = (this._isExtraRevealed()) ? - (this.cfg.getProperty("revealAmount")+(liPaddingMarginWidth)/2) : 0; - - var liWidth = li.offsetWidth; - this.scrollAmountPerInc = liWidth + liMarginWidth; - - this._clipReg.style.width = - (this.scrollAmountPerInc*numVisible + revealAmt*2) + "px"; - this.carouselElem.style.width = - (this.scrollAmountPerInc*numVisible + navMargin*2 + revealAmt*2 + - ulPaddingWidth) + "px"; - - var revealLeft = (this._isExtraRevealed()) ? - (revealAmt - (Math.abs(mr-ml)+Math.abs(pr-pl))/2 - (uml+upl) - ) : - 0; - YAHOO.util.Dom.setStyle(this.carouselList, "position", "relative"); - YAHOO.util.Dom.setStyle(this.carouselList, "left", "" + revealLeft + "px"); - - // if we set the initial start > 1 then this will adjust the scrolled location - var currX = YAHOO.util.Dom.getX(this.carouselList); - YAHOO.util.Dom.setX(this.carouselList, currX - this.scrollAmountPerInc*(firstVisible-1)); - } - }, - - // Hides the cfg object - setProperty: function(property, value, silent) { - this.cfg.setProperty(property, value, silent); - }, - - getProperty: function(property) { - return this.cfg.getProperty(property); - }, - - getFirstItemRevealed: function() { - return this._firstItemRevealed; - }, - getLastItemRevealed: function() { - return this._lastItemRevealed; - }, - - // Just for convenience and to be symmetrical with getFirstVisible - getFirstVisible: function() { - return this.cfg.getProperty("firstVisible"); - }, - - getLastVisible: function() { - var firstVisible = this.cfg.getProperty("firstVisible"); - var numVisible = this.cfg.getProperty("numVisible"); - - return firstVisible + numVisible - 1; - }, - - // /////////////////// PRIVATE API ////////////////////////////////////////// - _getStyleVal : function(li, style, returnFloat) { - var styleValStr = YAHOO.util.Dom.getStyle(li, style); - - var styleVal = returnFloat ? parseFloat(styleValStr) : parseInt(styleValStr, 10); - if(style=="height" && isNaN(styleVal)) { - styleVal = li.offsetHeight; - } else if(isNaN(styleVal)) { - styleVal = 0; - } - return styleVal; - }, - - _calculateSize: function(me) { - me.calculateSize(); - me.show(); - //YAHOO.util.Dom.setStyle(me.carouselElem, "visibility", "visible"); - }, - - // From Mike Chambers: http://weblogs.macromedia.com/mesh/archives/2006/01/removing_html_e.html - _removeChildrenFromNode: function(node) - { - if(!this._isValidObj(node)) - { - return; - } - - var len = node.childNodes.length; - - while (node.hasChildNodes()) - { - node.removeChild(node.firstChild); - } - }, - - _prebuildLiElem: function(idx) { - if(idx < 1) return; - - - var liElem = document.createElement("li"); - liElem.id = this._carouselElemID + "-item-" + idx; - // this is default flag to know that we're not really loaded yet. - liElem.placeholder = true; - this.carouselList.appendChild(liElem); - - this._lastPrebuiltIdx = (idx > this._lastPrebuiltIdx) ? idx : this._lastPrebuiltIdx; - }, - - _createItem: function(idx, innerHTMLOrElem) { - if(idx < 1) return; - - - var liElem = document.createElement("li"); - liElem.id = this._carouselElemID + "-item-" + idx; - - // if String then assume innerHTML, else an elem object - if(typeof(innerHTMLOrElem) === "string") { - liElem.innerHTML = innerHTMLOrElem; - } else { - liElem.appendChild(innerHTMLOrElem); - } - - return liElem; - }, - - // idx is the location to insert after - _insertAfterItem: function(refIdx, innerHTMLOrElem) { - return this._insertBeforeItem(refIdx+1, innerHTMLOrElem); - }, - - - _insertBeforeItem: function(refIdx, innerHTMLOrElem) { - - var refItem = this.getItem(refIdx); - var size = this.cfg.getProperty("size"); - if(size !== this.UNBOUNDED_SIZE) { - this.cfg.setProperty("size", size + 1, true); - } - - for(var i=this._lastPrebuiltIdx; i>=refIdx; i--) { - var anItem = this.getItem(i); - if(this._isValidObj(anItem)) { - anItem.id = this._carouselElemID + "-item-" + (i+1); - } - } - - var liElem = this._createItem(refIdx, innerHTMLOrElem); - - var insertedItem = this.carouselList.insertBefore(liElem, refItem); - this._lastPrebuiltIdx += 1; - - return liElem; - }, - - // TEST THIS... think it has to do with prebuild - insertAfterEnd: function(innerHTMLOrElem) { - return this.insertAfter(this.cfg.getProperty("size"), innerHTMLOrElem); - }, - - _position: function(newStart, showAnimation) { - // do we bypass the isAnimated check? - var currStart = this._priorFirstVisible; - if(newStart > currStart) { - var inc = newStart - currStart; - this._scrollNextInc(inc, showAnimation); - } else { - var dec = currStart - newStart; - this._scrollPrevInc(dec, showAnimation); - } - }, - - _scrollPrev: function(e, carousel) { - if(e !== null) { // event fired this so disable autoplay - carousel.stopAutoPlay(); - } - carousel._scrollPrevInc(carousel.cfg.getProperty("scrollInc"), - (carousel.cfg.getProperty("animationSpeed") !== 0)); - }, - - // event handler - _scrollNext: function(e, carousel) { - if(e !== null) { // event fired this so disable autoplay - carousel.stopAutoPlay(); - } - - carousel._scrollNextInc(carousel.cfg.getProperty("scrollInc"), - (carousel.cfg.getProperty("animationSpeed") !== 0)); - }, - - - _handleAnimationComplete: function(type, args, argList) { - var carousel = argList[0]; - var direction = argList[1]; - - carousel._animationCompleteEvt.fire(direction); - - - }, - - // If EVERY item is already loaded in the range then return true - // Also prebuild whatever is not already created. - _areAllItemsLoaded: function(first, last) { - var itemsLoaded = true; - for(var i=first; i<=last; i++) { - var liElem = this.getItem(i); - - // If the li elem does not exist, then prebuild it in the correct order - // but still flag as not loaded (just prebuilt the li item. - if(!this._isValidObj(liElem)) { - this._prebuildLiElem(i); - itemsLoaded = false; - // but if the item exists and is a placeholder, then - // note that this item is not loaded (only a placeholder) - } else if(this._isValidObj(liElem.placeholder)) { - itemsLoaded = false; - } - } - return itemsLoaded; - }, - - _prebuildItems: function(first, last) { - for(var i=first; i<=last; i++) { - var liElem = this.getItem(i); - - // If the li elem does not exist, then prebuild it in the correct order - // but still flag as not loaded (just prebuilt the li item. - if(!this._isValidObj(liElem)) { - this._prebuildLiElem(i); - } - } - }, - - _isExtraRevealed: function() { - return (this.cfg.getProperty("revealAmount") > 0); - }, - - // probably no longer need carousel passed in, this should be correct now. - _scrollNextInc: function(inc, showAnimation) { - - if(this._scrollNextAnim.isAnimated() || this._scrollPrevAnim.isAnimated()) { - return false; - } - - var numVisible = this.cfg.getProperty("numVisible"); - var currStart = this._priorFirstVisible; - var currEnd = this._priorLastVisible; - var size = this.cfg.getProperty("size"); - - var scrollExtent = this._calculateAllowableScrollExtent(); - - if(this.cfg.getProperty("wrap") && currEnd === scrollExtent.end) { - this.scrollTo(scrollExtent.start); // might need to check animation is on or not - return; - } - - // increment start by inc - var newStart = currStart + inc; - var newEnd = newStart + numVisible - 1; - - // If we are past the end, adjust or wrap - if(newEnd > scrollExtent.end) { - newEnd = scrollExtent.end; - newStart = newEnd - numVisible + 1; - } - - inc = newStart - currStart; - - // at this point the following variables are set - // inc... amount to increment by - // newStart... the firstVisible item after the scroll - // newEnd... the last item visible after the scroll - - this.cfg.setProperty("firstVisible", newStart, true); - - - if(inc > 0) { - if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))) { - var visibleExtent = this._calculateVisibleExtent(newStart, newEnd); - var cacheStart = (currEnd+1) < visibleExtent.start ? (currEnd+1) : visibleExtent.start; - var alreadyCached = this._areAllItemsLoaded(cacheStart, visibleExtent.end); - this._loadNextHandlerEvt.fire(visibleExtent.start, visibleExtent.end, alreadyCached); - } - - if(showAnimation) { - var nextParams = { points: { by: [-this.scrollAmountPerInc*inc, 0] } }; - if(this.isVertical()) { - nextParams = { points: { by: [0, -this.scrollAmountPerInc*inc] } }; - } - - this._scrollNextAnim = new YAHOO.util.Motion(this.carouselList, - nextParams, - this.cfg.getProperty("animationSpeed"), - this.cfg.getProperty("animationMethod")); - -// is this getting added multiple times? - if(this.cfg.getProperty("animationCompleteHandler")) { - this._scrollNextAnim.onComplete.subscribe(this._handleAnimationComplete, [this, "next"]); - } - this._scrollNextAnim.animate(); - } else { - if(this.isVertical()) { - var currY = YAHOO.util.Dom.getY(this.carouselList); - - YAHOO.util.Dom.setY(this.carouselList, - currY - this.scrollAmountPerInc*inc); - } else { - var currX = YAHOO.util.Dom.getX(this.carouselList); - YAHOO.util.Dom.setX(this.carouselList, - currX - this.scrollAmountPerInc*inc); - } - } - - } - this._priorFirstVisible = newStart; - this._priorLastVisible = newEnd; - - this._enableDisableControls(); - return false; - }, - - // firstVisible is already set - _scrollPrevInc: function(dec, showAnimation) { - - if(this._scrollNextAnim.isAnimated() || this._scrollPrevAnim.isAnimated()) { - return false; - } - - var numVisible = this.cfg.getProperty("numVisible"); - var currStart = this._priorFirstVisible; - var currEnd = this._priorLastVisible; - var size = this.cfg.getProperty("size"); - - // decrement start by dec - var newStart = currStart - dec; - - var scrollExtent = this._calculateAllowableScrollExtent(); - - // How to decide whether to stop at 1 or not - newStart = (newStart < scrollExtent.start) ? scrollExtent.start : newStart; - - // if we are going to extend past the end, then we need to correct the start - var newEnd = newStart + numVisible - 1; - if(newEnd > scrollExtent.end) { - newEnd = scrollExtent.end; - newStart = newEnd - numVisible + 1; - } - - dec = currStart - newStart; - - // at this point the following variables are set - // dec... amount to decrement by - // newStart... the firstVisible item after the scroll - // newEnd... the last item visible after the scroll - this.cfg.setProperty("firstVisible", newStart, true); - - // if we are decrementing - if(dec > 0) { - if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))) { - var visibleExtent = this._calculateVisibleExtent(newStart, newEnd); - var cacheEnd = (currStart-1) > visibleExtent.end ? (currStart-1) : visibleExtent.end; - var alreadyCached = this._areAllItemsLoaded(visibleExtent.start, cacheEnd); - - this._loadPrevHandlerEvt.fire(visibleExtent.start, visibleExtent.end, alreadyCached); - } - - if(showAnimation) { - var prevParams = { points: { by: [this.scrollAmountPerInc*dec, 0] } }; - if(this.isVertical()) { - prevParams = { points: { by: [0, this.scrollAmountPerInc*dec] } }; - } - - this._scrollPrevAnim = new YAHOO.util.Motion(this.carouselList, - prevParams, - this.cfg.getProperty("animationSpeed"), this.cfg.getProperty("animationMethod")); - if(this.cfg.getProperty("animationCompleteHandler")) { - this._scrollPrevAnim.onComplete.subscribe(this._handleAnimationComplete, [this, "prev"]); - } - this._scrollPrevAnim.animate(); - } else { - if(this.isVertical()) { - var currY = YAHOO.util.Dom.getY(this.carouselList); - YAHOO.util.Dom.setY(this.carouselList, currY + - this.scrollAmountPerInc*dec); - } else { - var currX = YAHOO.util.Dom.getX(this.carouselList); - YAHOO.util.Dom.setX(this.carouselList, currX + - this.scrollAmountPerInc*dec); - } - } - } - this._priorFirstVisible = newStart; - this._priorLastVisible = newEnd; - - this._enableDisableControls(); - - return false; - }, - - // Check for all cases and enable/disable controls as needed by current state - _enableDisableControls: function() { - - var firstVisible = this.cfg.getProperty("firstVisible"); - var lastVisible = this.getLastVisible(); - var scrollExtent = this._calculateAllowableScrollExtent(); - - // previous arrow is turned on. Check to see if we need to turn it off - if(this._prevEnabled) { - if(firstVisible === scrollExtent.start) { - this._disablePrev(); - } - } - - // previous arrow is turned off. Check to see if we need to turn it on - if(this._prevEnabled === false) { - if(firstVisible > scrollExtent.start) { - this._enablePrev(); - } - } - - // next arrow is turned on. Check to see if we need to turn it off - if(this._nextEnabled) { - if(lastVisible === scrollExtent.end) { - this._disableNext(); - } - } - - // next arrow is turned off. Check to see if we need to turn it on - if(this._nextEnabled === false) { - if(lastVisible < scrollExtent.end) { - this._enableNext(); - } - } - }, - - /** - * _loadInitial looks at firstItemVisible for the start (not necessarily 1) - */ - _loadInitial: function() { - var firstVisible = this.cfg.getProperty("firstVisible"); - this._priorLastVisible = this.getLastVisible(); - // Load from 1 to the last visible - // The _calculateSize method will adjust the scroll position - // for starts > 1 - if(this._loadInitHandlerEvt) { - var visibleExtent = this._calculateVisibleExtent(firstVisible, this._priorLastVisible); - // still treat the first real item as starting at 1 - var alreadyCached = this._areAllItemsLoaded(1, visibleExtent.end); - - this._loadInitHandlerEvt.fire(visibleExtent.start, visibleExtent.end, alreadyCached); - } - - if(this.cfg.getProperty("autoPlay") !== 0) { - this._autoPlayTimer = this.startAutoPlay(); - } - - this._enableDisableControls(); - }, - - _calculateAllowableScrollExtent: function() { - var scrollBeforeAmount = this.cfg.getProperty("scrollBeforeAmount"); - var scrollAfterAmount = this.cfg.getProperty("scrollAfterAmount"); - var size = this.cfg.getProperty("size"); - - var extent = {start: 1-scrollBeforeAmount, end: size+scrollAfterAmount}; - return extent; - - }, - - _calculateVisibleExtent: function(start, end) { - if(!start) { - start = this.cfg.getProperty("firstVisible"); - end = this.getLastVisible(); - } - - var size = this.cfg.getProperty("size"); - - // we ignore the firstItem property... this method is used - // for prebuilding the cache and signaling the developer - // what to render on a given scroll. - start = start<1?1:start; - end = end>size?size:end; - - var extent = {start: start, end: end}; - - // set up the indices for revealed items. If there is no item revealed, then set - // the index to -1 - this._firstItemRevealed = -1; - this._lastItemRevealed = -1; - if(this._isExtraRevealed()) { - if(start > 1) { - this._firstItemRevealed = start - 1; - extent.start = this._firstItemRevealed; - } - if(end < size) { - this._lastItemRevealed = end + 1; - extent.end = this._lastItemRevealed; - } - } - - return extent; - }, - - _disablePrev: function() { - this._prevEnabled = false; - if(this._prevButtonStateHandlerEvt) { - this._prevButtonStateHandlerEvt.fire(false, this._carouselPrev); - } - if(this._isValidObj(this._carouselPrev)) { - YAHOO.util.Event.removeListener(this._carouselPrev, "click", this._scrollPrev); - } - }, - - _enablePrev: function() { - this._prevEnabled = true; - if(this._prevButtonStateHandlerEvt) { - this._prevButtonStateHandlerEvt.fire(true, this._carouselPrev); - } - if(this._isValidObj(this._carouselPrev)) { - YAHOO.util.Event.addListener(this._carouselPrev, "click", this._scrollPrev, this); - } - }, - - _disableNext: function() { - if(this.cfg.getProperty("wrap")) { - return; - } - this._nextEnabled = false; - if(this._isValidObj(this._nextButtonStateHandlerEvt)) { - this._nextButtonStateHandlerEvt.fire(false, this._carouselNext); - } - if(this._isValidObj(this._carouselNext)) { - YAHOO.util.Event.removeListener(this._carouselNext, "click", this._scrollNext); - } - }, - - _enableNext: function() { - this._nextEnabled = true; - if(this._isValidObj(this._nextButtonStateHandlerEvt)) { - this._nextButtonStateHandlerEvt.fire(true, this._carouselNext); - } - if(this._isValidObj(this._carouselNext)) { - YAHOO.util.Event.addListener(this._carouselNext, "click", this._scrollNext, this); - } - }, - - _isValidObj: function(obj) { - - if (null === obj) { - return false; - } - if ("undefined" === typeof(obj) ) { - return false; - } - return true; - } -}; - - - - - - - - - -/** moved from bookreader demo **/ - - -/** - * Custom inital load handler. Called when the carousel loads the initial - * set of data items. Specified to the carousel as the configuration - * parameter: loadInitHandler - **/ -var loadInitialItems = function(type, args) { - - var start = args[0]; - var last = args[1]; - load(this, start, last); -}; - -/** - * Custom load next handler. Called when the carousel loads the next - * set of data items. Specified to the carousel as the configuration - * parameter: loadNextHandler - **/ -var loadNextItems = function(type, args) { - - var start = args[0]; - var last = args[1]; - var alreadyCached = args[2]; - - if(!alreadyCached) { - load(this, start, last); - } -}; - -/** - * Custom load previous handler. Called when the carousel loads the previous - * set of data items. Specified to the carousel as the configuration - * parameter: loadPrevHandler - **/ -var loadPrevItems = function(type, args) { - var start = args[0]; - var last = args[1]; - var alreadyCached = args[2]; - - if(!alreadyCached) { - load(this, start, last); - } -}; - -var load = function(carousel, start, last) { - for(var i=start;i<=last;i++) { - var randomIndex = getRandom(18, lastRan); - lastRan = randomIndex; - carousel.addItem(i, fmtItem(imageList[randomIndex], "#", "Number " + i)); - } -}; - -var getRandom = function(max, last) { - var randomIndex; - do { - randomIndex = Math.floor(Math.random()*max); - } while(randomIndex === last); - - return randomIndex; -}; - -/** - * Custom button state handler for enabling/disabling button state. - * Called when the carousel has determined that the previous button - * state should be changed. - * Specified to the carousel as the configuration - * parameter: prevButtonStateHandler - **/ -var handlePrevButtonState = function(type, args) { - - var enabling = args[0]; - var upImage = args[1]; - - if(enabling) { - upImage.src = "images/up-enabled.gif"; - } else { - upImage.src = "images/up-disabled.gif"; - } - -}; - - - - -/** my nifty little iframe resize **/ - -function ReSize(id,w){ - var obj=document.getElementById(id); - obj.style.marginRight=w+'px'; - document.getElementById.value='margin-right '+w+'px'; -} diff --git a/scripts/2009/01/olpc/src/js/jquery-1.2.6.min.js b/scripts/2009/01/olpc/src/js/jquery-1.2.6.min.js deleted file mode 100644 index d1d17c4d30f..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery-1.2.6.min.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * jQuery 1.2.6 - New Wave Javascript - * - * Copyright (c) 2008 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2008-07-16 02:11:36 $ - * $Rev: 5685 $ - */ -(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else -return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else -return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else -selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else -this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else -return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else -jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else -jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else -ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else -while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else -for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else -xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else -jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else -for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else -s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else -e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})(); \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/jquery.cluetip.css b/scripts/2009/01/olpc/src/js/jquery.cluetip.css deleted file mode 100644 index 66e5db54b99..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery.cluetip.css +++ /dev/null @@ -1,235 +0,0 @@ -/* global */ - -#cluetip-close img { - border: 0; -} -#cluetip-title { - overflow: hidden; -} -#cluetip-title #cluetip-close { - float: right; - position: relative; -} -#cluetip-waitimage { - width: 43px; - height: 11px; - position: absolute; - background-image: url(wait.gif); -} -.cluetip-arrows { - display: none; - position: absolute; - top: 0; - left: -11px; - height: 22px; - width: 11px; - background-repeat: no-repeat; - background-position: 0 0; -} -#cluetip-extra { - display: none; -} -/*************************************** - =cluetipClass: 'default' --------------------------------------- */ - -.cluetip-default { - background-color: #ffc; - font-size: 1.3em; - border: 1px solid #900; -} -.cluetip-default #cluetip-outer { - position: relative; - margin: 0; - background-color: #ffc; -} -.cluetip-default h3#cluetip-title { - margin: 0 0 5px; - padding: 8px 10px 4px; - font-size: 1.2em; - font-weight: normal; - background-color: #900; - color: #fff; - font-family: Georgia, san-serif; -} -.cluetip-default #cluetip-title a { - color: #d9d9c2; - font-size: 0.95em; -} -.cluetip-default #cluetip-inner { - padding: 0px 10px 10px 10px; - font-family: Georgia, san-serif; text-align: left; -} -.cluetip-default div#cluetip-close { - text-align: right; - margin: 0 5px 5px; - color: #900; -} - -/* default arrows */ - -.clue-right-default .cluetip-arrows { - background-image: url(images/darrowleft.gif); -} -.clue-left-default .cluetip-arrows { - background-image: url(images/darrowright.gif); - left: 100%; - margin-right: -11px; -} -.clue-top-default .cluetip-arrows { - background-image: url(images/darrowdown.gif); - top: 100%; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} -.clue-bottom-default .cluetip-arrows { - background-image: url(images/darrowup.gif); - top: -11px; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} - -/*************************************** - =cluetipClass: 'jtip' --------------------------------------- */ -.cluetip-jtip { - background-color: transparent; -} -.cluetip-jtip #cluetip-outer { - border: 2px solid #ccc; - position: relative; - background-color: #fff; -} - -.cluetip-jtip h3#cluetip-title { - margin: 0 0 5px; - padding: 2px 5px; - font-size: 16px; - font-weight: normal; - background-color: #ccc; - color: #333; -} - -.cluetip-jtip #cluetip-inner { - padding: 0 5px 5px; - display: inline-block; -} -.cluetip-jtip div#cluetip-close { - text-align: right; - margin: 0 5px 5px; - color: #900; -} - -/* jtip arrows */ - -.clue-right-jtip .cluetip-arrows { - background-image: url(images/arrowleft.gif); -} -.clue-left-jtip .cluetip-arrows { - background-image: url(images/arrowright.gif); - left: 100%; - margin-right: -11px; -} -.clue-top-jtip .cluetip-arrows { - background-image: url(images/arrowdown.gif); - top: 100%; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} -.clue-bottom-jtip .cluetip-arrows { - background-image: url(images/arrowup.gif); - top: -11px; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} - -/*************************************** - =cluetipClass: 'rounded' --------------------------------------- */ - -.cluetip-rounded { - background: transparent url(images/bl.gif) no-repeat 0 100%; - margin-top: 10px; - margin-left: 12px; -} - -.cluetip-rounded #cluetip-outer { - background: transparent url(images/tl.gif) no-repeat 0 0; - margin-top: -12px; -} - -.cluetip-rounded #cluetip-title { - background-color: transparent; - padding: 12px 12px 0; - margin: 0 -12px 0 0; - position: relative; -} -.cluetip-rounded #cluetip-extra { - position: absolute; - display: block; - background: transparent url(images/tr.gif) no-repeat 100% 0; - top: 0; - right: 0; - width: 12px; - height: 30px; - margin: -12px -12px 0 0; -} -.cluetip-rounded #cluetip-inner { - background: url(images/br.gif) no-repeat 100% 100%; - padding: 5px 12px 12px; - margin: -18px -12px 0 0; - position: relative; -} - -.cluetip-rounded div#cluetip-close { - text-align: right; - margin: 0 5px 5px; - color: #009; - background: transparent; -} -.cluetip-rounded div#cluetip-close a { - color: #777; -} - -/* rounded arrows */ - -.clue-right-rounded .cluetip-arrows { - background-image: url(images/rarrowleft.gif); -} -.clue-left-rounded .cluetip-arrows { - background-image: url(images/rarrowright.gif); - left: 100%; - margin-left: 12px; -} -.clue-top-rounded .cluetip-arrows { - background-image: url(images/rarrowdown.gif); - top: 100%; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} -.clue-bottom-rounded .cluetip-arrows { - background-image: url(images/rarrowup.gif); - top: -23px; - left: 50%; - margin-left: -11px; - height: 11px; - width: 22px; -} - - - -/* stupid IE6 HasLayout hack */ -.cluetip-rounded #cluetip-title, -.cluetip-rounded #cluetip-inner { - zoom: 1; -} \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/jquery.cluetip.js b/scripts/2009/01/olpc/src/js/jquery.cluetip.js deleted file mode 100644 index 25175a23cdb..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery.cluetip.js +++ /dev/null @@ -1,543 +0,0 @@ -/* - * jQuery clueTip plugin - * Version 0.9.8 (05/22/2008) - * @requires jQuery v1.1.4+ - * @requires Dimensions plugin (for jQuery versions < 1.2.5) - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - */ -;(function($) { -/* - * @name clueTip - * @type jQuery - * @cat Plugins/tooltip - * @return jQuery - * @author Karl Swedberg - * - * @credit Inspired by Cody Lindley's jTip (http://www.codylindley.com) - * @credit Thanks to the following people for their many and varied contributions: - Shelane Enos, Glen Lipka, Hector Santos, Torben Schreiter, Dan G. Switzer, Jörn Zaefferer - * @credit Thanks to Jonathan Chaffer, as always, for help with the hard parts. :-) - */ - - /** - * - * Displays a highly customizable tooltip when the user hovers (default) or clicks (optional) the matched element. - * By default, the clueTip plugin loads a page indicated by the "rel" attribute via ajax and displays its contents. - * If a "title" attribute is specified, its value is used as the clueTip's heading. - * The attribute to be used for both the body and the heading of the clueTip is user-configurable. - * Optionally, the clueTip's body can display content from an element on the same page. - * * Just indicate the element's id (e.g. "#some-id") in the rel attribute. - * Optionally, the clueTip's body can display content from the title attribute, when a delimiter is indicated. - * * The string before the first instance of the delimiter is set as the clueTip's heading. - * * All subsequent strings are wrapped in separate DIVs and placed in the clueTip's body. - * The clueTip plugin allows for many, many more options. Pleasee see the examples and the option descriptions below... - * - * - * @example $('#tip).cluetip(); - * @desc This is the most basic clueTip. It displays a 275px-wide clueTip on mouseover of the element with an ID of "tip." On mouseout of the element, the clueTip is hidden. - * - * - * @example $('a.clue').cluetip({ - * hoverClass: 'highlight', - * sticky: true, - * closePosition: 'bottom', - * closeText: 'close', - * truncate: 60, - * ajaxSettings: { - * type: 'POST' - * } - * }); - * @desc Displays a clueTip on mouseover of all elements with class="clue". The hovered element gets a class of "highlight" added to it (so that it can be styled appropriately. This is esp. useful for non-anchor elements.). The clueTip is "sticky," which means that it will not be hidden until the user either clicks on its "close" text/graphic or displays another clueTip. The "close" text/graphic is set to diplay at the bottom of the clueTip (default is top) and display an image rather than the default "Close" text. Moreover, the body of the clueTip is truncated to the first 60 characters, which are followed by an ellipsis (...). Finally, the clueTip retrieves the content using POST rather than the $.ajax method's default "GET." - * - * More examples can be found at http://plugins.learningjquery.com/cluetip/demo/ - * - * Full list of options/settings can be found at the bottom of this file and at http://plugins.learningjquery.com/cluetip/ - */ - - var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount; - $.fn.cluetip = function(js, options) { - if (typeof js === 'object') { - options = js; - js = null; - } - return this.each(function(index) { - var $this = $(this); - - // support metadata plugin (v1.0 and 2.0) - var opts = $.extend(false, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {}); - - // start out with no contents (for ajax activation) - var cluetipContents = false; - var cluezIndex = parseInt(opts.cluezIndex, 10)-1; - var isActive = false, closeOnDelay = 0; - - // create the cluetip divs - if (!$('#cluetip').length) { - $cluetipInner = $('
'); - $cluetipTitle = $('

'); - $cluetipOuter = $('
').append($cluetipInner).prepend($cluetipTitle); - $cluetip = $('
').css({zIndex: opts.cluezIndex}) - .append($cluetipOuter).append('
')[insertionType](insertionElement).hide(); - $('
').css({position: 'absolute', zIndex: cluezIndex-1}) - .insertBefore('#cluetip').hide(); - $cluetip.css({position: 'absolute', zIndex: cluezIndex}); - $cluetipOuter.css({position: 'relative', zIndex: cluezIndex+1}); - $cluetipArrows = $('
').css({zIndex: cluezIndex+1}).appendTo('#cluetip'); - } - var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0; - if (!$dropShadow) { - $dropShadow = $([]); - for (var i=0; i < dropShadowSteps; i++) { - $dropShadow = $dropShadow.add($('
').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i})); - }; - $dropShadow.css({position: 'absolute', backgroundColor: '#000'}) - .prependTo($cluetip); - } - var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass; - if (!tipAttribute && !opts.splitTitle && !js) return true; - // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip - if (opts.local && opts.hideLocal) { $(tipAttribute + ':first').hide(); } - var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10); - // vertical measurement variables - var tipHeight, wHeight; - var defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px'; - var sTop, linkTop, posY, tipY, mouseY, baseline; - // horizontal measurement variables - var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10); - var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'))||0) + (parseInt($cluetip.css('paddingRight'))||0) + dropShadowSteps; - var linkWidth = this.offsetWidth; - var linkLeft, posX, tipX, mouseX, winWidth; - - // parse the title - var tipParts; - var tipTitle = (opts.attribute !== 'title') ? $this.attr(opts.titleAttribute) : ''; - if (opts.splitTitle) { - if(tipTitle === undefined) {tipTitle = '';} - tipParts = tipTitle.split(opts.splitTitle); - tipTitle = tipParts.shift(); - } - var localContent; - -/*************************************** -* ACTIVATION -****************************************/ - -//activate clueTip - var activate = function(event) { - if (!opts.onActivate($this)) { - return false; - } - isActive = true; - $cluetip.removeClass().css({width: tipInnerWidth}); - if (tipAttribute === $this.attr('href')) { - $this.css('cursor', opts.cursor); - } - $this.attr('title',''); - if (opts.hoverClass) { - $this.addClass(opts.hoverClass); - } - linkTop = posY = $this.offset().top; - linkLeft = $this.offset().left; - mouseX = event.pageX; - mouseY = event.pageY; - if ($this[0].tagName.toLowerCase() !== 'area') { - sTop = $(document).scrollTop(); - winWidth = $(window).width(); - } -// position clueTip horizontally - if (opts.positionBy === 'fixed') { - posX = linkWidth + linkLeft + lOffset; - $cluetip.css({left: posX}); - } else { - posX = (linkWidth > linkLeft && linkLeft > tipWidth) - || linkLeft + linkWidth + tipWidth + lOffset > winWidth - ? linkLeft - tipWidth - lOffset - : linkWidth + linkLeft + lOffset; - if ($this[0].tagName.toLowerCase() === 'area' || opts.positionBy === 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse - if (mouseX + 20 + tipWidth > winWidth) { - $cluetip.addClass(' cluetip-' + ctClass); - posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) : mouseX - (tipWidth/2); - } else { - posX = mouseX + lOffset; - } - } - var pY = posX < 0 ? event.pageY + tOffset : event.pageY; - $cluetip.css({left: (posX > 0 && opts.positionBy !== 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0)}); - } - wHeight = $(window).height(); - -/*************************************** -* load a string from cluetip method's first argument -***************************************/ - if (js) { - $cluetipInner.html(js); - cluetipShow(pY); - } -/*************************************** -* load the title attribute only (or user-selected attribute). -* clueTip title is the string before the first delimiter -* subsequent delimiters place clueTip body text on separate lines -***************************************/ - - else if (tipParts) { - var tpl = tipParts.length; - for (var i=0; i < tpl; i++){ - if (i === 0) { - $cluetipInner.html(tipParts[i]); - } else { - $cluetipInner.append('
' + tipParts[i] + '
'); - } - }; - cluetipShow(pY); - } -/*************************************** -* load external file via ajax -***************************************/ - - else if (!opts.local && tipAttribute.indexOf('#') !== 0) { - if (cluetipContents && opts.ajaxCache) { - $cluetipInner.html(cluetipContents); - cluetipShow(pY); - } - else { - var ajaxSettings = opts.ajaxSettings; - ajaxSettings.url = tipAttribute; - ajaxSettings.beforeSend = function() { - $cluetipOuter.children().empty(); - if (opts.waitImage) { - $('#cluetip-waitimage') - .css({top: mouseY+20, left: mouseX+20}) - .show(); - } - }; - ajaxSettings.error = function() { - if (isActive) { - $cluetipInner.html('sorry, the contents could not be loaded'); - } - }; - ajaxSettings.success = function(data) { - cluetipContents = opts.ajaxProcess(data); - if (isActive) { - $cluetipInner.html(cluetipContents); - } - }; - ajaxSettings.complete = function() { - imgCount = $('#cluetip-inner img').length; - if (imgCount && !$.browser.opera) { - $('#cluetip-inner img').load(function() { - imgCount--; - if (imgCount<1) { - $('#cluetip-waitimage').hide(); - if (isActive) cluetipShow(pY); - } - }); - } else { - $('#cluetip-waitimage').hide(); - if (isActive) cluetipShow(pY); - } - }; - $.ajax(ajaxSettings); - } - -/*************************************** -* load an element from the same page -***************************************/ - } else if (opts.local){ - var $localContent = $(tipAttribute + ':first'); - var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('
').children().clone(true) : $localContent.html(); - $.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip); - cluetipShow(pY); - } - }; - -// get dimensions and options for cluetip and prepare it to be shown - var cluetipShow = function(bpY) { - $cluetip.addClass('cluetip-' + ctClass); - - if (opts.truncate) { - var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...'; - $cluetipInner.html($truncloaded); - } - function doNothing() {}; //empty function - tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html(' ') : $cluetipTitle.hide(); - if (opts.sticky) { - var $closeLink = $('
'); - (opts.closePosition === 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition === 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner); - $closeLink.on('click', function() { - cluetipClose(); - return false; - }); - if (opts.mouseOutClose) { - if ($.fn.hoverIntent && opts.hoverIntent) { - $cluetip.hoverIntent({ - over: doNothing, - timeout: opts.hoverIntent.timeout, - out: function() { $closeLink.trigger('click'); } - }); - } else { - $cluetip.hover(doNothing, - function() {$closeLink.trigger('click'); }); - } - } else { - $cluetip.unbind('mouseout'); - } - } -// now that content is loaded, finish the positioning - var direction = ''; - $cluetipOuter.css({overflow: defHeight === 'auto' ? 'visible' : 'auto', height: defHeight}); - tipHeight = defHeight === 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10); - tipY = posY; - baseline = sTop + wHeight; - if (opts.positionBy === 'fixed') { - tipY = posY - opts.dropShadowSteps + tOffset; - } else if ( (posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy === 'bottomTop') { - if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) { - tipY = mouseY - tipHeight - tOffset; - direction = 'top'; - } else { - tipY = mouseY + tOffset; - direction = 'bottom'; - } - } else if ( posY + tipHeight + tOffset > baseline ) { - tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset; - } else if ($this.css('display') === 'block' || $this[0].tagName.toLowerCase() === 'area' || opts.positionBy === "mouse") { - tipY = bpY - tOffset; - } else { - tipY = posY - opts.dropShadowSteps; - } - if (direction === '') { - posX < linkLeft ? direction = 'left' : direction = 'right'; - } - $cluetip.css({top: tipY + 'px'}).removeClass().addClass('clue-' + direction + '-' + ctClass).addClass(' cluetip-' + ctClass); - if (opts.arrows) { // set up arrow positioning to align with element - var bgY = (posY - tipY - opts.dropShadowSteps); - $cluetipArrows.css({top: (/(left|right)/.test(direction) && posX >=0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : ''}).show(); - } else { - $cluetipArrows.hide(); - } - -// (first hide, then) ***SHOW THE CLUETIP*** - $dropShadow.hide(); - $cluetip.hide()[opts.fx.open](opts.fx.open !== 'show' && opts.fx.openSpeed); - if (opts.dropShadow) $dropShadow.css({height: tipHeight, width: tipInnerWidth}).show(); - if ($.fn.bgiframe) { $cluetip.bgiframe(); } - // trigger the optional onShow function - if (opts.delayedClose > 0) { - closeOnDelay = setTimeout(cluetipClose, opts.delayedClose); - } - opts.onShow($cluetip, $cluetipInner); - - }; - -/*************************************** - =INACTIVATION --------------------------------------- */ - var inactivate = function() { - isActive = false; - $('#cluetip-waitimage').hide(); - if (!opts.sticky || (/click|toggle/).test(opts.activation) ) { - cluetipClose(); -clearTimeout(closeOnDelay); - }; - if (opts.hoverClass) { - $this.removeClass(opts.hoverClass); - } - $('.cluetip-clicked').removeClass('cluetip-clicked'); - }; -// close cluetip and reset some things - var cluetipClose = function() { - $cluetipOuter - .parent().hide().removeClass().end() - .children().empty(); - if (tipTitle) { - $this.attr(opts.titleAttribute, tipTitle); - } - $this.css('cursor',''); - if (opts.arrows) $cluetipArrows.css({top: ''}); - }; - -/*************************************** - =BIND EVENTS --------------------------------------- */ - // activate by click - if ( (/click|toggle/).test(opts.activation) ) { - $this.on('click', function(event) { - if ($cluetip.is(':hidden') || !$this.is('.cluetip-clicked')) { - activate(event); - $('.cluetip-clicked').removeClass('cluetip-clicked'); - $this.addClass('cluetip-clicked'); - - } else { - inactivate(event); - - } - this.blur(); - return false; - }); - // activate by focus; inactivate by blur - } else if (opts.activation === 'focus') { - $this.focus(function(event) { - activate(event); - }); - $this.blur(function(event) { - inactivate(event); - }); - // activate by hover - // clicking is returned false if cluetip url is same as href url - } else { - $this.on('click', function() { - if ($this.attr('href') && $this.attr('href') === tipAttribute && !opts.clickThrough) { - return false; - } - }); - //set up mouse tracking - var mouseTracks = function(evt) { - if (opts.tracking === true) { - var trackX = posX - evt.pageX; - var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY; - $this.mousemove(function(evt) { - $cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY }); - }); - } - }; - if ($.fn.hoverIntent && opts.hoverIntent) { - $this.on('mouseover', function() {$this.attr('title',''); }) - .hoverIntent({ - sensitivity: opts.hoverIntent.sensitivity, - interval: opts.hoverIntent.interval, - over: function(event) { - activate(event); - mouseTracks(event); - }, - timeout: opts.hoverIntent.timeout, - out: function(event) {inactivate(event); $this.unbind('mousemove');} - }); - } else { - $this.hover(function(event) { - activate(event); - mouseTracks(event); - }, function(event) { - inactivate(event); - $this.unbind('mousemove'); - }); - } - } - }); - }; - -/* - * options for clueTip - * - * each one can be explicitly overridden by changing its value. - * for example: $.fn.cluetip.defaults.width = 200; - * would change the default width for all clueTips to 200. - * - * each one can also be overridden by passing an options map to the cluetip method. - * for example: $('a.example').cluetip({width: 200}); - * would change the default width to 200 for clueTips invoked by a link with class of "example" - * - */ - - $.fn.cluetip.defaults = { // set up default options - width: 275, // The width of the clueTip - height: 'auto', // The height of the clueTip - cluezIndex: 97, // Sets the z-index style property of the clueTip - positionBy: 'auto', // Sets the type of positioning: 'auto', 'mouse','bottomTop', 'fixed' - topOffset: 15, // Number of px to offset clueTip from top of invoking element - leftOffset: 15, // Number of px to offset clueTip from left of invoking element - local: false, // Whether to use content from the same page for the clueTip's body - hideLocal: true, // If local option is set to true, this determines whether local content - // to be shown in clueTip should be hidden at its original location - attribute: 'rel', // the attribute to be used for fetching the clueTip's body content - titleAttribute: 'title', // the attribute to be used for fetching the clueTip's title - splitTitle: '', // A character used to split the title attribute into the clueTip title and divs - // within the clueTip body. more info below [6] - showTitle: true, // show title bar of the clueTip, even if title attribute not set - cluetipClass: 'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass. - hoverClass: '', // class applied to the invoking element onmouseover and removed onmouseout - waitImage: true, // whether to show a "loading" img, which is set in jquery.cluetip.css - cursor: 'help', - arrows: false, // if true, displays arrow on appropriate side of clueTip - dropShadow: true, // set to false if you don't want the drop-shadow effect on the clueTip - dropShadowSteps: 6, // adjusts the size of the drop shadow - sticky: false, // keep visible until manually closed - mouseOutClose: false, // close when clueTip is moused out - activation: 'hover', // set to 'click' to force user to click to show clueTip - // set to 'focus' to show on focus of a form element and hide on blur - clickThrough: false, // if true, and activation is not 'click', then clicking on link will take user to the link's href, - // even if href and tipAttribute are equal - tracking: false, // if true, clueTip will track mouse movement (experimental) - delayedClose: 0, // close clueTip on a timed delay (experimental) - closePosition: 'top', // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title' - closeText: 'Close', // text (or HTML) to to be clicked to close sticky clueTips - truncate: 0, // number of characters to truncate clueTip's contents. if 0, no truncation occurs - - // effect and speed for opening clueTips - fx: { - open: 'show', // can be 'show' or 'slideDown' or 'fadeIn' - openSpeed: '' - }, - - // settings for when hoverIntent plugin is used - hoverIntent: { - sensitivity: 3, - interval: 50, - timeout: 0 - }, - - // function to run just before clueTip is shown. - onActivate: function(e) {return true;}, - - // function to run just after clueTip is shown. - onShow: function(ct, c){}, - - // whether to cache results of ajax request to avoid unnecessary hits to server - ajaxCache: true, - - // process data retrieved via xhr before it's displayed - ajaxProcess: function(data) { - data = data.replace(//g, '').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,''); - return data; - }, - - // can pass in standard $.ajax() parameters, not including error, complete, success, and url - ajaxSettings: { - dataType: 'html' - }, - debug: false - }; - - -/* - * Global defaults for clueTips. Apply to all calls to the clueTip plugin. - * - * @example $.cluetip.setup({ - * insertionType: 'prependTo', - * insertionElement: '#container' - * }); - * - * @property - * @name $.cluetip.setup - * @type Map - * @cat Plugins/tooltip - * @option String insertionType: Default is 'appendTo'. Determines the method to be used for inserting the clueTip into the DOM. Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter' - * @option String insertionElement: Default is 'body'. Determines which element in the DOM the plugin will reference when inserting the clueTip. - * - */ - - var insertionType = 'appendTo', insertionElement = 'body'; - $.cluetip = {}; - $.cluetip.setup = function(options) { - if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) { - insertionType = options.insertionType; - } - if (options && options.insertionElement) { - insertionElement = options.insertionElement; - } - }; - -})(jQuery); diff --git a/scripts/2009/01/olpc/src/js/jquery.easing.1.3.js b/scripts/2009/01/olpc/src/js/jquery.easing.1.3.js deleted file mode 100644 index 7ed322d21a0..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery.easing.1.3.js +++ /dev/null @@ -1,205 +0,0 @@ -/* - * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ - * - * Uses the built in easing capabilities added In jQuery 1.1 - * to offer multiple easing options - * - * TERMS OF USE - jQuery Easing - * - * Open source under the BSD License. - * - * Copyright © 2008 George McGinley Smith - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * -*/ - -// t: current time, b: begInnIng value, c: change In value, d: duration -jQuery.easing['jswing'] = jQuery.easing['swing']; - -jQuery.extend( jQuery.easing, -{ - def: 'easeOutQuad', - swing: function (x, t, b, c, d) { - //alert(jQuery.easing.default); - return jQuery.easing[jQuery.easing.def](x, t, b, c, d); - }, - easeInQuad: function (x, t, b, c, d) { - return c*(t/=d)*t + b; - }, - easeOutQuad: function (x, t, b, c, d) { - return -c *(t/=d)*(t-2) + b; - }, - easeInOutQuad: function (x, t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t + b; - return -c/2 * ((--t)*(t-2) - 1) + b; - }, - easeInCubic: function (x, t, b, c, d) { - return c*(t/=d)*t*t + b; - }, - easeOutCubic: function (x, t, b, c, d) { - return c*((t=t/d-1)*t*t + 1) + b; - }, - easeInOutCubic: function (x, t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t + b; - return c/2*((t-=2)*t*t + 2) + b; - }, - easeInQuart: function (x, t, b, c, d) { - return c*(t/=d)*t*t*t + b; - }, - easeOutQuart: function (x, t, b, c, d) { - return -c * ((t=t/d-1)*t*t*t - 1) + b; - }, - easeInOutQuart: function (x, t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t*t + b; - return -c/2 * ((t-=2)*t*t*t - 2) + b; - }, - easeInQuint: function (x, t, b, c, d) { - return c*(t/=d)*t*t*t*t + b; - }, - easeOutQuint: function (x, t, b, c, d) { - return c*((t=t/d-1)*t*t*t*t + 1) + b; - }, - easeInOutQuint: function (x, t, b, c, d) { - if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; - return c/2*((t-=2)*t*t*t*t + 2) + b; - }, - easeInSine: function (x, t, b, c, d) { - return -c * Math.cos(t/d * (Math.PI/2)) + c + b; - }, - easeOutSine: function (x, t, b, c, d) { - return c * Math.sin(t/d * (Math.PI/2)) + b; - }, - easeInOutSine: function (x, t, b, c, d) { - return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; - }, - easeInExpo: function (x, t, b, c, d) { - return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; - }, - easeOutExpo: function (x, t, b, c, d) { - return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; - }, - easeInOutExpo: function (x, t, b, c, d) { - if (t==0) return b; - if (t==d) return b+c; - if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; - return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; - }, - easeInCirc: function (x, t, b, c, d) { - return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; - }, - easeOutCirc: function (x, t, b, c, d) { - return c * Math.sqrt(1 - (t=t/d-1)*t) + b; - }, - easeInOutCirc: function (x, t, b, c, d) { - if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; - return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; - }, - easeInElastic: function (x, t, b, c, d) { - var s=1.70158;var p=0;var a=c; - if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; - }, - easeOutElastic: function (x, t, b, c, d) { - var s=1.70158;var p=0;var a=c; - if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; - }, - easeInOutElastic: function (x, t, b, c, d) { - var s=1.70158;var p=0;var a=c; - if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); - if (a < Math.abs(c)) { a=c; var s=p/4; } - else var s = p/(2*Math.PI) * Math.asin (c/a); - if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; - return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; - }, - easeInBack: function (x, t, b, c, d, s) { - if (s === undefined) s = 1.70158; - return c*(t/=d)*t*((s+1)*t - s) + b; - }, - easeOutBack: function (x, t, b, c, d, s) { - if (s === undefined) s = 1.70158; - return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; - }, - easeInOutBack: function (x, t, b, c, d, s) { - if (s === undefined) s = 1.70158; - if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; - return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; - }, - easeInBounce: function (x, t, b, c, d) { - return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; - }, - easeOutBounce: function (x, t, b, c, d) { - if ((t/=d) < (1/2.75)) { - return c*(7.5625*t*t) + b; - } else if (t < (2/2.75)) { - return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; - } else if (t < (2.5/2.75)) { - return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; - } else { - return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; - } - }, - easeInOutBounce: function (x, t, b, c, d) { - if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; - return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; - } -}); - -/* - * - * TERMS OF USE - EASING EQUATIONS - * - * Open source under the BSD License. - * - * Copyright © 2001 Robert Penner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/jquery.hoverIntent.js b/scripts/2009/01/olpc/src/js/jquery.hoverIntent.js deleted file mode 100644 index c69c9eb491c..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery.hoverIntent.js +++ /dev/null @@ -1,112 +0,0 @@ -/** -* hoverIntent is similar to jQuery's built-in "hover" function except that -* instead of firing the onMouseOver event immediately, hoverIntent checks -* to see if the user's mouse has slowed down (beneath the sensitivity -* threshold) before firing the onMouseOver event. -* -* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2 -* -* -* hoverIntent is currently available for use in all personal or commercial -* projects under both MIT and GPL licenses. This means that you can choose -* the license that best suits your project, and use it accordingly. -* -* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions -* $("ul li").hoverIntent( showNav , hideNav ); -* -* // advanced usage receives configuration object only -* $("ul li").hoverIntent({ -* sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) -* interval: 50, // number = milliseconds of polling interval -* over: showNav, // function = onMouseOver callback (required) -* timeout: 100, // number = milliseconds delay before onMouseOut function call -* out: hideNav // function = onMouseOut callback (required) -* }); -* -* @param f onMouseOver function || An object with configuration options -* @param g onMouseOut function || Nothing (use configuration options object) -* @return The object (aka "this") that called hoverIntent, and the event object -* @author Brian Cherne -*/ -(function($) { - $.fn.hoverIntent = function(f,g) { - // default configuration options - var cfg = { - sensitivity: 7, - interval: 100, - timeout: 0 - }; - // override configuration options with user supplied object - cfg = $.extend(cfg, g ? { over: f, out: g } : f ); - - // instantiate variables - // cX, cY = current X and Y position of mouse, updated by mousemove event - // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval - var cX, cY, pX, pY; - - // A private function for getting mouse position - var track = function(ev) { - cX = ev.pageX; - cY = ev.pageY; - }; - - // A private function for comparing current and previous mouse position - var compare = function(ev,ob) { - ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); - // compare mouse positions to see if they've crossed the threshold - if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { - $(ob).unbind("mousemove",track); - // set hoverIntent state to true (so mouseOut can be called) - ob.hoverIntent_s = 1; - return cfg.over.apply(ob,[ev]); - } else { - // set previous coordinates for next time - pX = cX; pY = cY; - // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) - ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); - } - }; - - // A private function for delaying the mouseOut function - var delay = function(ev,ob) { - ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); - ob.hoverIntent_s = 0; - return cfg.out.apply(ob,[ev]); - }; - - // A private function for handling mouse 'hovering' - var handleHover = function(e) { - // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut - var p = (e.type === "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; - while ( p && p !== this ) { try { p = p.parentNode; } catch(e) { p = this; } } - if ( p === this ) { return false; } - - // copy objects to be passed into t (required for event object to be passed in IE) - var ev = jQuery.extend({},e); - var ob = this; - - // cancel hoverIntent timer if it exists - if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } - - // else e.type === "onmouseover" - if (e.type === "mouseover") { - // set "previous" X and Y position based on initial entry point - pX = ev.pageX; pY = ev.pageY; - // update "current" X and Y position based on mousemove - $(ob).bind("mousemove",track); - // start polling interval (self-calling timeout) to compare mouse coordinates over time - if (ob.hoverIntent_s !== 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} - - // else e.type === "onmouseout" - } else { - // unbind expensive mousemove event - $(ob).unbind("mousemove",track); - // if hoverIntent state is true, then call the mouseOut function after the specified delay - if (ob.hoverIntent_s === 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} - } - }; - - // bind the function to the two event listeners - return this.on('mouseover', handleHover).on('mouseout', handleHover); - }; -})(jQuery); \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/jquery.tiptoe.js b/scripts/2009/01/olpc/src/js/jquery.tiptoe.js deleted file mode 100644 index bd49961f6c5..00000000000 --- a/scripts/2009/01/olpc/src/js/jquery.tiptoe.js +++ /dev/null @@ -1,79 +0,0 @@ - -/* the next line is an example of how you can override default options globally (currently commented out) ... */ - // $.fn.cluetip.defaults.tracking = true; -// $.fn.cluetip.defaults.debug = true; -$(document).ready(function() { - - // $.cluetip.setup({insertionType: 'insertBefore', insertionElement: 'div:first'}); - -//default theme - $('a.title').cluetip({splitTitle: '|'}); - $('a.basic').cluetip(); - $('a.custom-width').cluetip({width: '200px', showTitle: false}); - $('h4').cluetip({attribute: 'id', hoverClass: 'highlight'}); - $('#sticky').cluetip({'sticky': true,'closePosition': 'title'}); - $('#examples a:eq(5)').cluetip({ - hoverClass: 'highlight', - sticky: true, - closePosition: 'bottom', - closeText: 'close', - truncate: 60 - }); - $('a.load-local').cluetip({local:true, hideLocal: false, arrows: true, cursor: 'pointer'}); - $('#clickme').cluetip({activation: 'click', width: 650}); - -// jTip theme - $('a.jt:eq(0)').cluetip({ - cluetipClass: 'jtip', - arrows: true, - dropShadow: false, - sticky: true, - mouseOutClose: true, - closePosition: 'title', - closeText: 'close' - }); - $('a.jt:eq(1)').cluetip({cluetipClass: 'jtip', arrows: true, dropShadow: false, hoverIntent: false}); - $('span[@title]').css({borderBottom: '1px solid #900'}).cluetip({splitTitle: '|', arrows: true, dropShadow: false, cluetipClass: 'jtip'}); - - $('a.jt:eq(2)').cluetip({ - cluetipClass: 'jtip', - arrows: true, - dropShadow: false, - height: '150px', - sticky: true, - positionBy: 'bottomTop' - }); - - $('a.jt:eq(3)').cluetip({local: true, hideLocal: false}); - - $('a.jt:eq(4)').cluetip({ - cluetipClass: 'jtip', arrows: true, - dropShadow: false, - onActivate: function(e) { - var cb = $('#cb')[0]; - return !cb || cb.checked; - } - }); -// Rounded Corner theme - $('ol.rounded a:eq(0)').cluetip({splitTitle: '|', dropShadow: false, cluetipClass: 'rounded', showtitle: false}); - $('ol.rounded a:eq(1)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'mouse'}); - $('ol.rounded a:eq(2)').cluetip({cluetipClass: 'rounded', dropShadow: false, showtitle: false, positionBy: 'bottomTop', topOffset: 70}); - $('ol.rounded a:eq(3)').cluetip({cluetipClass: 'rounded', dropShadow: false, sticky: true, ajaxCache: false, arrows: true}); - $('ol.rounded a:eq(4)').cluetip({cluetipClass: 'rounded', dropShadow: false}); -}); - -//unrelated to clueTip -- just for the demo page... - -$(document).ready(function() { - $('div.html, div.jquery').next().css('display', 'none').end().on('click', function() { - $(this).next().toggle('fast'); - }); - - $('a.false').on('click', function() { - return false; - }); -}); - - - - diff --git a/scripts/2009/01/olpc/src/js/olpcbook.js b/scripts/2009/01/olpc/src/js/olpcbook.js deleted file mode 100644 index bbdfcbc3d1e..00000000000 --- a/scripts/2009/01/olpc/src/js/olpcbook.js +++ /dev/null @@ -1,37 +0,0 @@ - -function olpcbook(id, title, info) { -gb = new GnuBook(); - -gb.getPageWidth = function(index) { - return info.pageWidth; -} - -gb.getPageHeight = function(index) { - return info.pageHeight; -} - -gb.getPageURI = function(index) { - index += 1; - var s = "0000" + index - s = s.substr(s.length-4); - return "books/" + id + "/" + s + ".jpg" -} - -gb.getPageSide = function(index) { - if (0 === (index & 0x1)) { - return 'R'; - } else { - return 'L'; - } -} - -gb.getPageNum = function(index) { - return index+1; -} - -gb.numLeafs = info.pageCount; -gb.bookTitle= title; -gb.bookUrl = 'http://openlibrary.org'; -gb.init(); -return gb; -} diff --git a/scripts/2009/01/olpc/src/js/toggle.js b/scripts/2009/01/olpc/src/js/toggle.js deleted file mode 100644 index 48b0b5b4d00..00000000000 --- a/scripts/2009/01/olpc/src/js/toggle.js +++ /dev/null @@ -1,28 +0,0 @@ -function toggleVisibility(id, NNtype, IEtype, WC3type) { - if (document.getElementById) { - eval("document.getElementById(id).style.visibility = \"" + WC3type + "\""); - } else { - if (document.layers) { - document.layers[id].visibility = NNtype; - } else { - if (document.all) { - eval("document.all." + id + ".style.visibility = \"" + IEtype + "\""); - } - } - } -} - -function ChangeZ(id) { -obj = document.getElementById("existingLayerID"); -if (typeof obj!="undefined") -{ - obj.style.zIndex=50; -} -} - -function tOn(id) { - toggleVisibility(id, "show", "visible", "visible") ; - } -function tOff(id) { - toggleVisibility(id, 'hidden', 'hidden', 'hidden') ; - } diff --git a/scripts/2009/01/olpc/src/js/yui.css b/scripts/2009/01/olpc/src/js/yui.css deleted file mode 100644 index b2848a7cfc4..00000000000 --- a/scripts/2009/01/olpc/src/js/yui.css +++ /dev/null @@ -1,328 +0,0 @@ -/*Copyright (c) 2006,Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt */ -/*reset.css*/body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;} -/*fonts.css*/body{font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;} -/*grids.css*/body{text-align:center;}#ft{clear:both;}#doc,#doc2,#doc3,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.3em;min-width:750px;}#doc2{width:73.074em;*width:71.313em;min-width:950px;}#doc3{margin:auto 10px;width:auto;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.3207em;*width:12.0106em;}.yui-t1 #yui-main .yui-b{margin-left:13.3207em;*margin-left:13.0106em;}.yui-t2 .yui-b{float:left;width:13.8456em;*width:13.512em;}.yui-t2 #yui-main .yui-b{margin-left:14.8456em;*margin-left:14.512em;}.yui-t3 .yui-b{float:left;width:23.0759em;*width:22.52em;}.yui-t3 #yui-main .yui-b{margin-left:24.0759em;*margin-left:23.52em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.512em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.512em;}.yui-t5 .yui-b{float:right;width:18.4608em;*width:18.016em;}.yui-t5 #yui-main .yui-b{margin-right:19.4608em;*margin-right:19.016em;}.yui-t6 .yui-b{float:right;width:23.0759em;*width:22.52em;}.yui-t6 #yui-main .yui-b{margin-right:24.0759em;*margin-right:23.52em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-g .yui-u,.yui-g .yui-g,.yui-gc .yui-u,.yui-gc .yui-g .yui-u,.yui-ge .yui-u,.yui-gf .yui-u{float:right;display:inline;}.yui-g div.first,.yui-gc div.first,.yui-gc div.first div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g{width:49.1%;}.yui-g .yui-g .yui-u,.yui-gc .yui-g .yui-u{width:48.1%;}.yui-gb .yui-u,.yui-gc .yui-u,.yui-gd .yui-u{float:left;margin-left:2%;*margin-left:1.895%;width:32%;}.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge .yui-u{width:24%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-gf div.first{width:24%;}.yui-ge div.first{width:74.2%;}#bd:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#bd,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;} - -/*begin YDN/YUI styles*/ -#bd {padding-top:1em;} -.yui-gb:after{clear:none;} -#doc3 {min-width:950px;} -h1, h2, h3, h4, h5, h6, p {line-height:1.2em; color:#67747f; font-size:100%; margin:1em 0 0 0;} -h1, h2, h3, h4, h5, h6 {font-weight:bold;} -h1.first-content, h2.first-content, h3.first-content {margin-top:0; padding-top:0; border:none;} /*if an h is the first thing on the page or in a section, it should be flush with the top border of its content area; otherwise, its content area should be padded to create space.*/ -p {color:#000; margin-bottom:1em } -h1 { font-size: 136%; padding:0; padding-top:18px} -.wiki h1 { font-size: 120%; padding:0; margin-bottom:1em} -h2 { font-size: 110%; margin-top:1.5em; margin-bottom:.2em; padding:1em 0 0 0; border-top:1px dashed #C3D2DC;} -h2.first { border-top:none; margin-top:0; margin-bottom:.2em;} -#doc3 h2.first { float:none; /*float specified to resolve conflict on generic float declaration for .first in grids*/} -h4 {margin-top:1em; color: #000;} -ul, ol, dl, dd {margin-left:30px;} -dt { font-weight:bold; } -ul, ol {margin-bottom:.7em;} -ul {list-style:disc;} -ol {list-style:decimal;} -strong {font-weight:bold;} -em {font-style:italic;} - -a, a code {color:#0000de;} -a:visited, a:visited code {color:#639;} -a:active, a:active code {color: #f00;} - -h1 a, h2 a, h3 a, h4 a, h5 a { color:#67747f; } -h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited {color:#67747f} - -#logo_pane { display: none; } - -#ygma { margin:.5em auto 1em auto; } - -#bd ol {} -#bd ol li p { margin-left:0} -#bd ol li ol {list-style:lower-alpha} -#bd ol li ol li {margin-bottom:1em} -#bd ol li ol li ol{list-style:lower-roman} -#bd ol li ol li ol li {margin-bottom:1em} - -#bd p.errormessage {background:url(http://us.i1.yimg.com/us.yimg.com/i/us/search/gr/alertbubble.gif) 0 0 no-repeat; padding-left:30px; margin:2em 2em 2em 1em; font-weight:bold} - - -#bd ul {margin-top:2px; } -#bd ul.topspace { margin-top:1em } -/*#bd ul li { margin:0 17px 0 7px; }*/ -#bd ul li ul { margin-top:0em } -#bd ul.plain {margin-top: 0; list-style: none;} -#bd ul.plain ul {margin-top: 0; list-style: none;} -#bd ul.jump {list-style: none; margin-top: 1em;} -#bd ul.jump li {margin-top: .5em;} - -/*#bd table { margin:10px 17px; width:720px; }*/ -#bd th { background:#B6CDE1; padding:2px; color:#fff; vertical-align:top} -#bd td { padding:2px; vertical-align:top} -#bd td.even { background:red; } - -h2.classname { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 130%; color:#000000} -h3.breadcrumb { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 80%; color:#000000} -h3.methods { border-top:none; margin-top:0; margin-bottom:.2em; font-size: 100%; color:#000000} - -.screenshot {border:thin solid #999999; margin:8px;} - -#toc {background-color:#ecf5fa; padding:0; border:1px solid #89d } -#toc ul {list-style:none; margin:0; padding:0; font-size:90%; } -#toc ul li { padding:0; margin:0; } -#toc ul li.selected { font-weight:bold; color:#fff; background:#f82; padding:0; } -#toc ul li.selected a { color:#fff; } -#toc ul li a { display:block; padding:2px 2px 2px 10px; text-decoration:none; } -#toc ul li a:hover { color:#fff; background:#e60; } -#toc ul li em { display:none; } -#toc ul li.sect { font-weight:bold; color:#fff; background:#89d; padding:2px 0; text-indent:2px; margin-top:2px;} -#toc ul li.first {margin-top:0;} - -#ft { margin-top:4em } -#ft p { padding-bottom:2em; margin:0; text-align:center; font-size:80%; line-height:1.4em} -#ft p.first { padding:1em 0 0 0; margin:0; } - -#pagetitle {background: url(http://us.i1.yimg.com/us.yimg.com/i/ydn/bg_hd.gif) 0 0 repeat-x #B6CDE1; border: 1px solid #93B2CC; position:relative;} -#pagetitle h1 {text-indent:15px; padding:4px 0 2px 0; background: url(http://us.i1.yimg.com/us.yimg.com/i/ydn/title_h_bg.gif) 0 0 no-repeat; margin:0; color:#000; font-size:120%; font-weight:bold; position:relative; left:-1px; top:-1px; margin-right:-2px;} -#pagetitle h1 em {color:#FF9933; font-size:60%; font-weight:bold; font-style:normal; position:relative; top:-6px} - -#ygunav {background:#eee; border-bottom:2px solid #ccc; padding:0 10px;font-size:78%;text-align:right;margin-bottom:6px;height:2.5em;line-height:2.5em;} -html>body #ygunav {overflow:hidden;} -#ygunav strong {font-family:verdana;} -#ygunav p {display:inline;margin:0;padding:0;} -#ygunav p em {float:left;text-align:left;font-style:normal; padding-top:.7em} -* html #ygunav p em {margin-top:1px;} -#ygunav p em i {visibility:hidden;} -#ygunav a {color:#000;} -#ygunav form {display:inline;margin:0 0 0 1em;} -#ygsp {width:8em;font-size:110%;padding:0;vertical-align:middle;} -#ygunav .ygbt {background:#dcdcdc;font:110% verdana;position:relative;top:1px;} -* html #ygunav .ygbt {top:4px;} -* html>body #ygunav .ygbt {line-height:0;top:-4px;} -#ygunav label {color:#666;font-family:tahoma;position:relative;top:1px;} - -#bd ol.getstarted { margin:0; padding:0; } -#bd ol.getstarted li { font-weight:bold; color:#668AA8; margin-bottom:1em; padding-left:20px; list-style-type:none;} -#bd ol.getstarted li p { color:#000; font-weight:normal; margin:0 0 0 20px; padding:0 } - -#bd p {margin-bottom:8px;} - -#promo {zoom:1;border: 1px solid #B6CDE1; padding:1em; position:relative; background-color:#e5f4fe;} -#promo ul {margin-bottom:0;} -#promo h1 {margin-top:0; padding-top:0} -#promo h2 {line-height:1.2em; color:#668AA8; margin-top:0; padding-top:0; border:none; font-size:100%} -#promo p {line-height:1.2em } -#promo h1 em {float:right; top:0; right:0; font-style:normal; font-size:80%} -#promo h4 { color:#67747f; } -#promo.component div {width:48%; float:left;} -#promo:after {content:'.';visibility:hidden;clear:left;height:0;display:block;} -#promo p#api {margin-top:.2em;} -#promo #download img {float:left; padding:0 0.5em 0.5em 0;} -#promo #blog {clear:left;} - -code {font-family:"Courier New"; font-size: 100%; font-weight:bolder;} - -div.apisummary {height:auto; margin:10px 0; width:auto; zoom:1;} -div.apisummary table {font-size:inherit;font:100%; border-collapse:separate; border:1px solid #666666; border-left:none;} -#doc3 div.apisummary table td, #doc3 div.apisummary table th {padding:.35em;} -div.apisummary table th { font-weight:bold;} -div.apisummary table td { border-top:1px solid #666666;} -div.apisummary table td, div.apisummary table th { border-left:1px solid #666666;} -div.apisummary table tr { background-color:#ddd;} -div.apisummary table tr.odd { background-color:#fff; } -div.apisummary table tfoot tr { background-color:#fff; } - -dl#menuwidgets dt {font-weight:bold;} -dl#menuwidgets {margin:0 0 0 1.5em;} -img.example {clear:right;margin-bottom:10px;margin-left:10px;border:0;float:right;border:1px solid #999;} - -/*YUI theater box on main page top right corner*/ -#yui-theater {width:316px; overflow:hidden;} -#yui-theater h3 {margin:0; padding:0; color:#67747f; font-size:100%; font-weight:bold; font-stretch:expanded;} -#yui-theater h2 {margin:0 0 10px 0; padding:0; border:none; color:#000; font-size:122%; font-weight:bold;} -#yui-theater p {margin:7px 0 0 0;} -#yui-theater div {float:right; font-size:85%;} - -/*rss reader styles*/ -p.loading-content {background-image:url(http://us.i1.yimg.com/us.yimg.com/i/ydn/yuiweb/img/busy_arrow.gif); background-position:top left; background-repeat:no-repeat; height:20px;padding:4px 0 0 25px; margin:0;} -#doc3 ul.yuirssreader {margin:0; padding:0;} -#doc3 ul.yuirssreader li {list-style-type:none;padding:5px 0 0 12px; margin:0;} -#doc3 ul.yuirssreader li p {margin:0; padding:0;} -ul.yuirssreader cite {color:#666666; margin:0;} -span.yuirssreader-date {font-size:77%; color:#67747f;} -img.rssbadge {display:inline;border:none !important;} - -#index-secondary {width:316px;float:right;margin-left:10px;} -#index-main {margin-right:331px;} -#index-main #promo li {list-style-type:none;font-size:92%;margin-top:2px;} -#index-main #promo ul {margin:0;} - -/*styles for right gutter on component pages*/ -#cheatsheet h3 {margin-top:0;} -#cheatsheet img, #componentvideo img {margin:.5em 0 .2em 0; border:1px solid #999;} -#cheatsheet p {margin:0; font-size:77%;} -#cheatsheet h4, #examples h4 {margin:0.2em 0 .1em 0; color:#668AA8; font-size:92%;} -#examples ul, #morereading ul, #module ul {font-size:85%; list-style:circle; margin:0 0 1em 10px;} -#examples p, #componentvideo p {font-size:85%; margin:0 0 .2em 0;} -#examples li.selected {font-weight:bold;} - -/*styles for example pages*/ -#promo.example {background-color:#000;border-color:#666666;} -#promo.example .exampleIntro, #promo.example .exampleIntro p, #promo.example .exampleIntro a {color:#fff;} -.firstContent {margin-top:0; padding-top:0;} -#logger {margin-top:1em;} -#example {background-color:#F1F6F7;} -#example .bd { padding:1em; position:relative;} -#example .hd { background: url(/yui/docs/assets/example-hd-bg.gif) 0 0 repeat-x #4E4D4C; } -#loggerGloss {margin-top:.5em; font-size:85%;} -#loggerDiv {font-size:77%;text-align:left;margin-top:.5em; visibility:hidden; height:260px; } /*gets turned on by script when loaded */ -#loggerDiv.yui-log {padding:.3em;width:96%;background-color:#FBE7D9;border:1px solid #666;font-family:monospace;z-index:9000;} -#loggerDiv.yui-log p {margin:1px;padding:.1em;} -#loggerDiv.yui-log .yui-log-hd {margin:0; padding:0; background-color:#CECCCC;} -#loggerDiv.yui-log .yui-log-hd h4 {display:none;} -#loggerDiv.yui-log .yui-log-bd {width:100%;height:15em;background-color:#FFF;border:1px solid #ECECEC;overflow:auto;} -#loggerDiv.yui-log .yui-log-bd pre {border-top:1px solid #ECECEC;} -#loggerDiv.yui-log .yui-log-bd code p {margin:1px 0;} -#loggerDiv.yui-log .yui-log-ft {margin-top:.3em;margin-bottom:.3em; font-family:verdana; zoom:1;} -#loggerDiv.yui-log .yui-log-ft:after {content:'.';visibility:hidden;clear:both;height:0;display:block;} -#loggerDiv.yui-log .yui-log-ft .yui-log-categoryfilters {margin-top:.5em;clear:right;} -#loggerDiv.yui-log .yui-log-ft .yui-log-sourcefilters {margin-top:.5em;border:none; clear:both;} -#loggerDiv.yui-log .yui-log-btns {margin-top:.2em;padding:.2em;background: url(/yui/docs/assets/logger-bg.gif) 0 0 repeat-x #CECCCC; text-align:right; float:none;} -#loggerDiv.yui-log .yui-log-filtergrp {margin-right:.3em; float:left; display:block} -#example.newWindow {text-align:center;} -p.newWindowButton {text-align:right; margin-top:0; padding:.5em;} -.bd p.newWindowButton {text-align:center;} /*when new window is required and button appears in middle of example body*/ -p.loggerButton {text-align:center;} -#loggerLink a, #newWindowLink a {font-size:115%; font-weight:bold; color:#000099;} -#newWindowLink a {font-size:107%;} -#loggerModule {padding-bottom:.2em;} - -/*right column navigation on example rosters*/ -#exampleToc {background-color:#ecf5fa; padding:0; border:1px solid #89d; margin-top:.5em;} -#exampleToc ul {list-style:none; margin:0; padding:0; font-size:90%; } -#exampleToc ul li { padding:0; margin:0; } -#exampleToc ul li.selected { font-weight:bold; color:#fff; background:#000099; padding:0; } -#exampleToc ul li.selected a { color:#fff; } -#exampleToc ul li a { display:block; padding:2px 2px 2px 10px; text-decoration:none; } -#exampleToc ul li a:hover { color:#fff; background:#e60; } - -/*theater page styles*/ -.theater h1 {border-bottom:1px dashed #CCC; margin-bottom:1em;padding-bottom:.2em;} -.theater img {border:1px solid #666;} -.theater img.last {border:1px solid #666;} -.theater p.details {font-size:77%; color:#666; margin:.2em 0 0 0; padding:0;} -.theater p.description, #doc3 .theater ul li {font-size:85%; margin:0; padding:0; color:#333;} - -#readmePanel .hd { font-weight:bold; font-size:129%; color:#fff; background:#89d; } -#readmePanel .bd {text-align:left; overflow:auto;} -#readmePanel .ft {text-align:right; background-color:#E7E7E7; font-size:85%;} -/* Browser specific (not valid) styles to make preformatted text wrap */ -#readmePanel .bd pre { - white-space: pre-wrap; /* css-3 */ - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - font-size: 100%; - color:#000033;} - -/*ed eliot's server-side delicious badge css*/ - #delicious-badge {margin-top:.6em; font: 85% Arial, sans-serif; border: 1px solid #b1b1b1; } -#delicious-badge .bookmark { background: url(http://images.del.icio.us/static/img/delicious.small.gif) no-repeat left center; padding-left: 15px; font-weight: bold; } -#delicious-badge p, #delicious-badge div { padding: 7px; margin: 0; text-align: center; } -#delicious-badge a { color: #00f; text-decoration: none; } -#delicious-badge div { background: #eee; } -#delicious-badge div span { font-weight: bold; color: #000; } -#delicious-badge ul, #delicious-badge li { display: inline; list-style: none; padding: 0; margin: 0; } -#delicious-badge li { margin-left: 5px; } -#delicious-badge li span { position: absolute; left: -999px; width: 999px; } -#delicious-badge .saved-by { color: #999; } -#delicious-badge .saved-by span { background: #00f; padding: 3px; color: #fff; } -#delicious-badge .be-first { font-size: 85%; color: #999; } -#delicious-badge .tag-size-1 { font-size: 100%; } -#delicious-badge .tag-size-2 { font-size: 107%; } -#delicious-badge .tag-size-3 { font-size: 114%; } -#delicious-badge .tag-size-4 { font-size: 122%; } -#delicious-badge .tag-size-5 { font-size: 129%; } - -/*faq page:*/ -.yui-ge .yui-g {width:98%;} -.yui-ge .yui-g .yui-u {width:48.1%;} -#questions {margin:1em 0 2em 0; padding:0.5em; border:1px solid #838383; background-color:#E6E6E6;} -#questions ul {margin:0; list-style:none;} -#yui-main #questions li {padding-bottom:.2em; font-size:85%; margin:0;} -#questions li a {display:block; padding:.6em; text-decoration:none;} -#questions li a:hover {background-color:#F6F6F6;} - -/*for notes on file includes*/ -.include-notice {border:1px solid #6F7EA1; background:#eee; font:77% verdana; padding:.7em;} -.include-notice strong {color:#990000;} - - - - - - - - - -/*customized for GnuBookCarousel*/ - - -.carousel-component { - padding:0px 2px 2px 2px; - margin:0px; - width:200px; /* seems to be needed for safari */ -} - -.carousel-component .carousel-list li { - margin:0px; - padding:2px; - width:182px; -} - -/* Applies only to vertical carousels */ -.carousel-component .carousel-vertical li { - margin-bottom:0px; - padding: 0px 0px 0px 0px; - font-family: Georgia, san-serif; - font-size: 14px; -} - -.carousel-component .carousel-list li a { - display:block; - border:1px solid #e2edfa; - outline:none; - color: #5d593f; - text-decoration: none; -} - -.carousel-component .carousel-list li a:hover { - border: 1px solid #aaaaaa; - background-color: #fff; - color: #2e2e24; - text-decoration: underline; -} - -.carousel-component .carousel-list li img { - display:block; - color: #2b4c5b; - text-decoration: none; - border: 1px solid #2e2e24; -} - -#up-arrow { - cursor:pointer; - margin-top:5px; -} - -#down-arrow { - cursor:pointer; - margin-top:0px; - margin-bottom: 5px; -} - - -/*yyou need this to make an iframe work on the XO screen rotate */ - - html, body, iframe { margin:0; padding:0; height:100%; } - iframe { display:block; width: 100%; border:none; } \ No newline at end of file diff --git a/scripts/2009/01/olpc/src/js/yui.js b/scripts/2009/01/olpc/src/js/yui.js deleted file mode 100644 index 0eb63d663e3..00000000000 --- a/scripts/2009/01/olpc/src/js/yui.js +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright (c) 2008, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.net/yui/license.txt -version: 2.6.0 -*/ -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;gthis.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return ;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.6.0",build:"1321"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.6.0/build/","base":"http://yui.yahooapis.com/2.6.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-beta-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-experimental-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-beta-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-beta-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-beta-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-beta-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-experimental.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0; -i=m.rollup);if(roll){break;}}}}}else{for(j=0;j=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;iistartLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return ;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return ;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return ;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return ;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return ;}if(mname){if(mname!==this._loading){return ;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; -/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ -if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{}; -var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C0){for(H=0;H0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.6.0",build:"1321"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;Ethis.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return ;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue; -}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id); -}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return ;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(Cthis.maxX){C=this.maxX;}}if(this.constrainY){if(Fthis.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D); -}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-D0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=('
'+'
');O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT); -this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R;}}this.element=U;if(U.id){this.id=U.id;}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true;}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true;}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true;}}}}}while((V=V.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var Q=(YAHOO.env.ua.gecko&&this.platform=="windows");if(Q){var P=this;setTimeout(function(){P._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var P,R,T;function V(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){R=F.get("_yuiResizeMonitor");var U=this._supportsCWResize();if(!R){R=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){R.src=G.RESIZE_MONITOR_SECURE_URL;}if(!U){T=["