Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

no .svn, blah

  • Loading branch information...
commit 19c5724f45a0c66a05571341889fae10e3183e39 1 parent 4be923b
@defunkt authored
Showing with 0 additions and 8,461 deletions.
  1. +0 −58 lib/.svn/entries
  2. +0 −1  lib/.svn/format
  3. +0 −319 lib/.svn/text-base/microformat.rb.svn-base
  4. +0 −3  lib/.svn/text-base/mofo.rb.svn-base
  5. +0 −76 lib/microformat/.svn/entries
  6. +0 −1  lib/microformat/.svn/format
  7. +0 −5 lib/microformat/.svn/text-base/array.rb.svn-base
  8. +0 −30 lib/microformat/.svn/text-base/simple.rb.svn-base
  9. +0 −24 lib/microformat/.svn/text-base/string.rb.svn-base
  10. +0 −11 lib/microformat/.svn/text-base/time.rb.svn-base
  11. +0 −172 lib/mofo/.svn/entries
  12. +0 −1  lib/mofo/.svn/format
  13. +0 −10 lib/mofo/.svn/text-base/adr.rb.svn-base
  14. +0 −6 lib/mofo/.svn/text-base/geo.rb.svn-base
  15. +0 −15 lib/mofo/.svn/text-base/hcalendar.rb.svn-base
  16. +0 −35 lib/mofo/.svn/text-base/hcard.rb.svn-base
  17. +0 −15 lib/mofo/.svn/text-base/hentry.rb.svn-base
  18. +0 −6 lib/mofo/.svn/text-base/hfeed.rb.svn-base
  19. +0 −17 lib/mofo/.svn/text-base/hresume.rb.svn-base
  20. +0 −14 lib/mofo/.svn/text-base/hreview.rb.svn-base
  21. +0 −6 lib/mofo/.svn/text-base/rel_bookmark.rb.svn-base
  22. +0 −6 lib/mofo/.svn/text-base/rel_tag.rb.svn-base
  23. +0 −92 lib/mofo/.svn/text-base/xfn.rb.svn-base
  24. +0 −54 lib/mofo/.svn/text-base/xoxo.rb.svn-base
  25. +0 −130 site/.svn/entries
  26. +0 −1  site/.svn/format
  27. +0 −5 site/.svn/prop-base/favicon.ico.svn-base
  28. +0 −5 site/.svn/prop-base/mofo-logo.png.svn-base
  29. +0 −5 site/.svn/prop-base/spinner.gif.svn-base
  30. BIN  site/.svn/text-base/favicon.ico.svn-base
  31. +0 −384 site/.svn/text-base/index.html.svn-base
  32. BIN  site/.svn/text-base/mofo-logo.png.svn-base
  33. +0 −2  site/.svn/text-base/mootools.v1.00.js.svn-base
  34. +0 −181 site/.svn/text-base/p.js.svn-base
  35. BIN  site/.svn/text-base/spinner.gif.svn-base
  36. +0 −159 site/.svn/text-base/style.css.svn-base
  37. +0 −6 site/.svn/text-base/try.html.svn-base
  38. +0 −89 site/try/.svn/entries
  39. +0 −1  site/try/.svn/format
  40. +0 −5 site/try/.svn/prop-base/spinner.gif.svn-base
  41. +0 −6 site/try/.svn/text-base/index.html.svn-base
  42. +0 −181 site/try/.svn/text-base/p.js.svn-base
  43. BIN  site/try/.svn/text-base/spinner.gif.svn-base
  44. +0 −86 site/try/.svn/text-base/template.html.svn-base
  45. +0 −66 site/try/.svn/text-base/trymofo.rb.svn-base
  46. +0 −187 test/.svn/entries
  47. +0 −1  test/.svn/format
  48. +0 −22 test/.svn/text-base/base_url_test.rb.svn-base
  49. +0 −80 test/.svn/text-base/ext_test.rb.svn-base
  50. +0 −38 test/.svn/text-base/hatom_test.rb.svn-base
  51. +0 −33 test/.svn/text-base/hcalendar_test.rb.svn-base
  52. +0 −152 test/.svn/text-base/hcard_test.rb.svn-base
  53. +0 −23 test/.svn/text-base/hresume_test.rb.svn-base
  54. +0 −37 test/.svn/text-base/hreview_test.rb.svn-base
  55. +0 −27 test/.svn/text-base/include_pattern_test.rb.svn-base
  56. +0 −40 test/.svn/text-base/reltag_test.rb.svn-base
  57. +0 −34 test/.svn/text-base/subclass_test.rb.svn-base
  58. +0 −24 test/.svn/text-base/test_helper.rb.svn-base
  59. +0 −81 test/.svn/text-base/xfn_test.rb.svn-base
  60. +0 −49 test/.svn/text-base/xoxo_test.rb.svn-base
  61. +0 −208 test/fixtures/.svn/entries
  62. +0 −1  test/fixtures/.svn/format
  63. +0 −72 test/fixtures/.svn/text-base/bob.html.svn-base
  64. +0 −1,052 test/fixtures/.svn/text-base/chowhound.html.svn-base
  65. +0 −403 test/fixtures/.svn/text-base/corkd.html.svn-base
  66. +0 −26 test/fixtures/.svn/text-base/event_addr.html.svn-base
  67. +0 −39 test/fixtures/.svn/text-base/events.html.svn-base
  68. +0 −1  test/fixtures/.svn/text-base/fake.html.svn-base
  69. +0 −535 test/fixtures/.svn/text-base/fauxtank.html.svn-base
  70. +0 −1,101 test/fixtures/.svn/text-base/hatom.html.svn-base
  71. +0 −409 test/fixtures/.svn/text-base/hresume.html.svn-base
  72. +0 −246 test/fixtures/.svn/text-base/include_pattern_single_attribute.html.svn-base
  73. +0 −5 test/fixtures/.svn/text-base/simple.html.svn-base
  74. +0 −225 test/fixtures/.svn/text-base/stoneship.html.svn-base
  75. +0 −335 test/fixtures/.svn/text-base/upcoming.html.svn-base
  76. +0 −479 test/fixtures/.svn/text-base/upcoming_single.html.svn-base
  77. +0 −207 test/fixtures/.svn/text-base/xfn.html.svn-base
View
58 lib/.svn/entries
@@ -1,58 +0,0 @@
-8
-
-dir
-354
-svn+ssh://chris@errtheblog.com/svn/projects/mofo/lib
-svn+ssh://chris@errtheblog.com/svn/projects
-
-
-
-2007-08-18T02:43:33.265118Z
-273
-chris
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-cf301c5b-d72e-0410-996c-ed4829982077
-
-mofo
-dir
-
-microformat
-dir
-
-mofo.rb
-file
-
-
-
-
-2007-11-19T21:58:51.000000Z
-a8fef6b4c5a5e110bd4b81063a044cdd
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-microformat.rb
-file
-
-
-
-
-2007-11-19T21:58:51.000000Z
-9a66d9c6d1cb561a4c4c9b085dfef599
-2007-08-04T03:11:23.094019Z
-270
-chris
-
View
1  lib/.svn/format
@@ -1 +0,0 @@
-8
View
319 lib/.svn/text-base/microformat.rb.svn-base
@@ -1,319 +0,0 @@
-%w(rubygems set hpricot microformat/string microformat/array open-uri ostruct timeout).each { |f| require f }
-gem 'hpricot', '>=0.4.59'
-
-class Microformat
- module Base
- @@subclasses = Set.new
- @@timeout = 5
-
- ##
- # The Gateway
- #
- def find(*args)
- return find_in_children(*args) if self == Microformat
-
- target, @options = args
- @options ||= target.is_a?(Hash) ? target : {}
- [:first, :all].each { |key| target = @options[key] if @options[key] }
-
- extract_base_url! target
-
- @doc = build_doc(@options[:text] ? @options : target)
-
- microformats = find_occurences(@doc)
- raise MicroformatNotFound if @options[:strict] && microformats.empty?
- return @options[:first] ? nil : [] if microformats.empty?
-
- if @options[:first] || @options[:all]
- return @options[:first] ? find_first(microformats) : find_every(microformats)
- end
-
- object = find_every(microformats)
- case object.size
- when 1 then object.first
- when 0 then nil
- else object
- end
- end
-
- def find_in_children(*args)
- @@subclasses.map do |klass|
- klass.find(*args)
- end.flatten
- end
-
- # i have no idea what the hell this is doing
- names_and_keys = proc do |attributes|
- attributes.map do |att|
- att.respond_to?(:keys) ? att.keys.first : att
- end
- end
-
- define_method :attributes do
- names_and_keys[@attributes[:many] + @attributes[:one]]
- end
-
- %w(many one).each do |type|
- define_method("#{type}s") do
- names_and_keys[@attributes[type.intern]]
- end
- end
-
- def timeout=(timeout)
- @@timeout = timeout
- end
-
- protected
- ##
- # DSL Related
- #
- def after_find(&block)
- @after_find_procs ||= Hash.new { |h,k| h[k] = [] }
- @after_find_procs[name] << block if block_given?
- @after_find_procs[name]
- end
- alias :after_finds :after_find
-
- def inherited(klass)
- @@subclasses << klass
- define_cute_class_name(klass)
- current_container = @container
- klass.class_eval do
- @container = current_container || name.downcase
- @attributes = Hash.new { |h,k| h[k] = [] }
- end
- end
-
- def define_cute_class_name(klass)
- return unless (name = klass.name) =~ /^H/
- Object.send(:define_method, name.sub(/^H/, 'h')) { klass }
- end
-
- def collector
- collector = Hash.new([])
- def collector.method_missing(method, *classes)
- super unless %w(one many).include? method.to_s
- self[method] += Microformat.send(:break_out_hashes, classes)
- end
- collector
- end
-
- def container(container)
- @container = container.to_s
- end
-
- def method_missing(method, *args, &block)
- super unless %w(one many).include? method.to_s
- (collected = collector).instance_eval(&block) if block_given?
- classes = block_given? ? [args.first => collected] : break_out_hashes(args)
- @attributes[method] += classes
- end
-
- def break_out_hashes(array)
- array.inject([]) do |memo, element|
- memo + (element.is_a?(Hash) ? [element.map { |k,v| { k => v } }].flatten : [element])
- end
- end
-
- def aliases(hash)
- define_method(hash.keys.first) do
- send(hash[hash.keys.first])
- end
- end
-
- ##
- # The Functionality
- #
- def find_first(doc)
- build_class(doc.first)
- end
-
- def find_every(doc)
- doc.inject([]) do |array, entry|
- array + [build_class(entry)]
- end
- end
-
- def build_doc(source)
- case source
- when String, File, StringIO
- result = ''
- Timeout.timeout(@@timeout) { result = open(source) }
- Hpricot(result)
- when Hpricot, Hpricot::Elements
- source
- when Hash
- Hpricot(source[:text]) if source[:text]
- end
- end
-
- def find_occurences(doc)
- doc/".#{@container}"
- end
-
- def build_class(microformat)
- hash = build_hash(microformat)
- class_eval { attr_reader *(hash.keys << :properties) }
-
- klass = new
- klass.instance_variable_set(:@properties, hash.keys.map { |i| i.to_s } )
-
- hash.each do |key, value|
- klass.instance_variable_set("@#{key}", prepare_value(value) )
- end
-
- after_find_callbacks! klass
-
- klass
- end
-
- def after_find_callbacks!(object)
- original_ivars = object.instance_variables.dup
-
- after_finds.each do |block|
- object.instance_eval &block
- end
-
- Array(object.instance_variables - original_ivars).each do |ivar|
- object.properties << ivar.gsub('@','')
- end
- end
-
- def build_hash(doc, attributes = @attributes)
- hash = {}
-
- # rel="bookmark" pattern
- if bookmark = extract_bookmark(doc)
- hash[:bookmark] = bookmark
- end
-
- # rel="license" pattern
- if license = extract_license(doc)
- hash[:license] = license
- end
-
- # rel="tag" pattern
- if tags = extract_tags(doc)
- hash[:tags] = tags
- end
-
- [:one, :many].each do |name|
- attributes[name].each do |attribute|
- is_hash = attribute.is_a? Hash
- key = is_hash ? attribute.keys.first : attribute
-
- found = doc/".#{key.no_bang.to_s.gsub('_','-')}"
- raise InvalidMicroformat if found.empty? && key.to_s =~ /!/
- next if found.empty?
-
- if is_hash && attribute[key].is_a?(Hash)
- built_hash = build_hash(found, attribute[key])
- key = key.no_bang
- if built_hash.size.zero? && found.size.nonzero?
- hash[key] = found.map { |f| parse_element(f) }
- hash[key] = hash[key].first if name == :one
- else
- hash[key] = built_hash
- end
- else
- target = is_hash ? attribute[key] : nil
- key = key.no_bang
- if name == :many
- hash[key] ||= []
- hash[key] += found.map { |f| parse_element(f, target) }
- else
- hash[key] = parse_element(found.first, target)
- end
- end
- hash[key] = hash[key].first if hash[key].is_a?(Array) && hash[key].size == 1
- end
- end
-
- hash.merge extract_includes(doc)
- end
-
- def extract_includes(doc)
- @includes ||= {}
-
- doc.search(".include").inject({}) do |hash, element|
- target = element.attributes['data'] || element.attributes['href']
-
- return @includes[target] if @includes[target]
-
- unless (includes = @doc/target).empty?
- hash.merge @includes[target] = build_hash(includes)
- else
- hash
- end
- end
- end
-
- def extract_bookmark(doc)
- bookmark = (doc.at("[@rel=bookmark]") || doc.at("[@rel='self bookmark']")) rescue nil
- bookmark.attributes['href'] if bookmark.respond_to? :attributes
- end
-
- def extract_license(doc)
- license = doc.at("[@rel=license]") rescue nil
- license.attributes['href'] if license.respond_to? :attributes
- end
-
- def extract_tags(doc)
- return unless (tags = doc.search("[@rel=tag]")).size.nonzero?
- tags.inject([]) { |array, tag| array + [tag.innerText] }
- end
-
- def parse_element(element, target = nil)
- if target == :url
- url = case element.name
- when 'img' then element['src']
- when 'a' then element['href']
- when 'object' then element['value']
- end
- url[/^http/] ? url : @options[:base_url].to_s + url if url.respond_to?(:[])
- elsif target.is_a? Array
- target.inject(nil) do |found, klass|
- klass = klass.respond_to?(:find) ? klass : nil
-
- found || parse_element(element, klass)
- end
- elsif target.is_a? Class
- target.find(@options.merge(:first => element))
- else
- value = case element.name
- when 'abbr' then element['title']
- when 'img' then element['alt']
- end || ''
-
- (value.empty? ? element.innerHTML : value).strip.strip_html.coerce
- end
- end
-
- def prepare_value(value)
- value.is_a?(Hash) ? OpenStruct.new(value) : value
- end
-
- def extract_base_url!(target)
- @options[:base_url] ||= @options[:base] || @options[:url]
- @options[:base_url] ||= target[/^(http:\/\/[^\/]+)/] if target.respond_to?(:scan)
- end
- end
-
- def method_missing(method, *args, &block)
- return super unless method == :properties || @properties.include?(method.to_s)
- self.class.class_eval { define_method(method) { instance_variable_get("@#{method}") } }
- instance_variable_get("@#{method}")
- end
-
- extend Base
-end
-
-class InvalidMicroformat < Exception; end
-class MicroformatNotFound < Exception; end
-
-# oh what the hell, let's do it
-Mofo = Microformat
-
-# type & id are used a lot in uformats and deprecated in ruby. no loss.
-OpenStruct.class_eval { undef :type, :id }
-Symbol.class_eval { def no_bang() to_s.sub('!','').to_sym end }
View
3  lib/.svn/text-base/mofo.rb.svn-base
@@ -1,3 +0,0 @@
-$:.unshift File.dirname(__FILE__)
-
-Dir["#{File.dirname(__FILE__)}/mofo/*.rb"].each { |format| require "mofo/#{File.basename format}" }
View
76 lib/microformat/.svn/entries
@@ -1,76 +0,0 @@
-8
-
-dir
-354
-svn+ssh://chris@errtheblog.com/svn/projects/mofo/lib/microformat
-svn+ssh://chris@errtheblog.com/svn/projects
-
-
-
-2007-08-04T03:11:23.094019Z
-270
-chris
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-cf301c5b-d72e-0410-996c-ed4829982077
-
-array.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-2d722e0aa32a155f70c91f01be235657
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-time.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-c5992fd2907267a391c2ea5005d1acc4
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-string.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-2cd8d4c5fbe550db2a3c7804fa64b112
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-simple.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-2298d45fa6603f83f35e6c7e452637f3
-2007-08-04T03:11:23.094019Z
-270
-chris
-
View
1  lib/microformat/.svn/format
@@ -1 +0,0 @@
-8
View
5 lib/microformat/.svn/text-base/array.rb.svn-base
@@ -1,5 +0,0 @@
-class Array
- def first_or_self
- size > 1 ? self : first
- end
-end
View
30 lib/microformat/.svn/text-base/simple.rb.svn-base
@@ -1,30 +0,0 @@
-require 'microformat'
-
-class Microformat
- class Simple < String
- extend Microformat::Base
-
- def self.find_first(doc)
- find_every(doc).first
- end
-
- def self.find_occurences(doc)
- @from ? doc/from_as_xpath : super
- end
-
- def self.build_class(tag)
- new(tag.innerText || '')
- end
-
- def self.from(options)
- @from ||= []
- options.each do |tag, value|
- @from << "@#{tag}=#{value}"
- end
- end
-
- def self.from_as_xpath
- "[#{@from.to_a * "|"}]"
- end
- end
-end
View
24 lib/microformat/.svn/text-base/string.rb.svn-base
@@ -1,24 +0,0 @@
-require File.dirname(__FILE__) + '/time'
-
-class String
- def coerce
- return true if self == 'true'
- return false if self == 'false'
- coerce_try { return Time.iso8601(self) }
- coerce_try { return Integer(self) }
- coerce_try { return Float(self) }
- self
- end
-
- def strip_html
- gsub(/<(?:[^>'"]*|(['"]).*?\1)*>/,'')
- end
-
-private
-
- def coerce_try
- yield
- rescue
- nil
- end
-end
View
11 lib/microformat/.svn/text-base/time.rb.svn-base
@@ -1,11 +0,0 @@
-require 'time'
-
-class Time
- ISO8601_REGEX = /^\d{4}-?\d{2}-?\d{2}(T\d{2}(:?\d{2}(:?\d{2}(\.?\d{2})?)?)?(Z|[+-]\d{2}(:?\d{2})?)?)?$/
-
- def self.iso8601(a_string)
- raise ArgumentError unless a_string =~ ISO8601_REGEX
-
- Time.xmlschema(a_string) rescue Time.parse(a_string)
- end
-end
View
172 lib/mofo/.svn/entries
@@ -1,172 +0,0 @@
-8
-
-dir
-354
-svn+ssh://chris@errtheblog.com/svn/projects/mofo/lib/mofo
-svn+ssh://chris@errtheblog.com/svn/projects
-
-
-
-2007-08-18T02:43:33.265118Z
-273
-chris
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-cf301c5b-d72e-0410-996c-ed4829982077
-
-rel_tag.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-7ff6450cf03807fe826f8a0a3e77e348
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-xoxo.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-5bed3d30f34e808b7d6d9c27ff481474
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-hcalendar.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-7d8a07e1211ec944a06abb757f22ad96
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-hcard.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-1b67358f5d7ae58c873cbcf18f468b6a
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-adr.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-6bb179b28a5b58edad10e84e2055fd25
-2007-08-04T03:11:23.094019Z
-270
-chris
-
-rel_bookmark.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-74c85fa07cb84bacc74e369f9efe0860
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-hresume.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-882352ac789207022049db97d51a30b8
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-hentry.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-7c48a73e186846f3d2afeffea1b6d1fe
-2007-05-08T16:58:43.848132Z
-63
-chris
-
-hreview.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-9a6acb4ffaf4462a44bdb0a238f537dc
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-geo.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-f29ccf10278683bb1f02b46cd2e0c157
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-hfeed.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-f41ee6edafda59ac41ef20b8432d7743
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-xfn.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-71f56837596570e807bd4249d580b38b
-2007-08-18T02:43:33.265118Z
-273
-chris
-
View
1  lib/mofo/.svn/format
@@ -1 +0,0 @@
-8
View
10 lib/mofo/.svn/text-base/adr.rb.svn-base
@@ -1,10 +0,0 @@
-# => http://microformats.org/wiki/adr
-require 'microformat'
-require 'microformat/simple'
-
-class Adr < Microformat
- one :post_office_box, :extended_address, :street_address,
- :locality, :region, :country_name, :value, :postal_code => Simple
-
- many :type
-end
View
6 lib/mofo/.svn/text-base/geo.rb.svn-base
@@ -1,6 +0,0 @@
-# => http://microformats.org/wiki/geo
-require 'microformat'
-
-class Geo < Microformat
- one :latitude, :longitude
-end
View
15 lib/mofo/.svn/text-base/hcalendar.rb.svn-base
@@ -1,15 +0,0 @@
-# => http://microformats.org/wiki/hcalendar
-require 'microformat'
-require 'mofo/hcard'
-require 'mofo/adr'
-require 'mofo/geo'
-
-class HCalendar < Microformat
- container :vevent
-
- one :class, :description, :dtend, :dtstamp, :dtstart,
- :duration, :status, :summary, :uid, :last_modified,
- :url => :url, :location => [ HCard, Adr, Geo, String ]
-
- many :category
-end
View
35 lib/mofo/.svn/text-base/hcard.rb.svn-base
@@ -1,35 +0,0 @@
-# => http://microformats.org/wiki/hcard
-require 'microformat'
-require 'mofo/geo'
-require 'mofo/adr'
-
-class HCard < Microformat
- container :vcard
-
- one :fn, :bday, :tz, :sort_string, :uid, :class,
- :geo => Geo
-
- many :label, :sound, :title, :role, :key,
- :mailer, :rev, :nickname, :category, :note,
- :logo => :url, :url => :url, :photo => :url,
- :adr => Adr
-
- one :n do
- one :family_name, :given_name, :additional_name
- many :honorific_prefix, :honorific_suffix
- end
-
- many :email do
- many :type
- many :value
- end
-
- many :tel do
- many :type
- many :value
- end
-
- many :org do
- one :organization_name, :organization_unit
- end
-end
View
15 lib/mofo/.svn/text-base/hentry.rb.svn-base
@@ -1,15 +0,0 @@
-# => http://microformats.org/wiki/hatom
-require 'microformat'
-require 'mofo/hcard'
-require 'mofo/rel_tag'
-
-class HEntry < Microformat
- one :entry_title, :entry_summary, :updated, :published,
- :author => HCard
-
- many :entry_content, :tags => RelTag
-
- after_find do
- @updated = @published unless @updated if @published
- end
-end
View
6 lib/mofo/.svn/text-base/hfeed.rb.svn-base
@@ -1,6 +0,0 @@
-# => http://microformats.org/wiki/hatom
-require 'mofo/hentry'
-
-class HFeed < Microformat
- many :hentry => HEntry
-end
View
17 lib/mofo/.svn/text-base/hresume.rb.svn-base
@@ -1,17 +0,0 @@
-# => http://microformats.org/wiki/hresume
-require 'microformat'
-require 'mofo/hcard'
-require 'mofo/hcalendar'
-require 'mofo/rel_tag'
-
-class HResume < Microformat
- container :hresume
-
- one :summary, :contact => HCard
-
- # TODO: linkedin uses a comma delimited skills list rather than the rel tags in the spec
- many :skills
-
- many :affiliation => HCard, :education => HCalendar,
- :experience => HCalendar
-end
View
14 lib/mofo/.svn/text-base/hreview.rb.svn-base
@@ -1,14 +0,0 @@
-# => http://microformats.org/wiki/hreview
-require 'microformat'
-require 'mofo/hcard'
-require 'mofo/rel_tag'
-
-class HReview < Microformat
- one :version, :summary, :type, :dtreviewed, :rating, :description
-
- one :reviewer => HCard
-
- one :item! do
- one :fn
- end
-end
View
6 lib/mofo/.svn/text-base/rel_bookmark.rb.svn-base
@@ -1,6 +0,0 @@
-# => http://microformats.org/wiki/rel-design-pattern
-require 'microformat/simple'
-
-class RelBookmark < Microformat::Simple
- from :rel => :bookmark
-end
View
6 lib/mofo/.svn/text-base/rel_tag.rb.svn-base
@@ -1,6 +0,0 @@
-# => http://microformats.org/wiki/rel-design-pattern
-require 'microformat/simple'
-
-class RelTag < Microformat::Simple
- from :rel => :tag
-end
View
92 lib/mofo/.svn/text-base/xfn.rb.svn-base
@@ -1,92 +0,0 @@
-$:.unshift 'lib'
-require 'microformat'
-
-class XFN < Microformat
- @@valid_relations = %w(
- contact
- acquaintance
- friend
- met
- co-worker
- colleague
- co-resident
- neighbor
- child
- parent
- sibling
- spouse
- kin
- muse
- crush
- date
- sweetheart
- me
- )
-
- class Link < OpenStruct
- def initialize(*args)
- super
- def relation.has?(value)
- is_a?(Array) ? include?(value) : self == value
- end
- end
-
- def to_html
- %[<a href="#{link}" rel="#{Array(relation) * ' '}">#{name}</a>]
- end
-
- def to_s
- link
- end
- end
-
- attr_accessor :links
-
- def self.find_occurences(doc)
- case doc
- when Hpricot::Doc then @occurences = XFN.new(doc)
- else @occurences
- end
- end
-
- class << self
- alias :find_first :find_occurences
- alias :find_every :find_occurences
- end
-
- def initialize(doc)
- @links = doc.search("a[@rel]").map do |rl|
- relation = rl[:rel].split(' ')
-
- # prune invalid relations
- relation.each { |r| relation.delete(r) unless @@valid_relations.include? r }
- relation = relation.first if relation.size == 1
- next if relation.empty?
-
- Link.new(:name => rl.innerHTML, :link => rl[:href], :relation => relation)
- end.compact
- end
-
- def relations
- @relations ||= @links.map { |l| l.relation }
- end
-
- def [](*rels)
- @links.select do |link|
- relation = link.relation
- relation.respond_to?(:all?) && rels.all? { |rel| relation.include? rel }
- end.first_or_self
- end
-
- def method_missing(method, *args, &block)
- method = method.to_s
- if (rels = method.split(/_and_/)).size > 1
- self[*rels]
- elsif @links.class.public_instance_methods.include? method
- @links.send(method, *args, &block)
- else
- check = args.first == true ? :== : :has?
- @links.select { |link| link.relation.send(check, method) }.first_or_self
- end
- end
-end
View
54 lib/mofo/.svn/text-base/xoxo.rb.svn-base
@@ -1,54 +0,0 @@
-$:.unshift 'lib'
-require 'microformat'
-
-class XOXO < Microformat
- @@parents = %w[ol ul]
- @@children = %w[li]
-
- xpath_build = proc { |element| element.map { |e| "/#{e}" } * ' | ' }
- @@children_xpath = xpath_build[@@children]
- @@parents_xpath = xpath_build[@@parents]
-
- def self.find_first(doc)
- find_every(doc).first
- end
-
- def self.find_every(doc)
- doc.map { |child| build_tree(child) }
- end
-
- def self.find_occurences(doc)
- @options[:class] ? doc/".xoxo" : doc.search(@@parents_xpath)
- end
-
- def self.build_tree(child)
- tree = []
- child.search(@@children_xpath) do |element|
- label, branch = nil, nil
- element.children.each do |inner|
- label ||= build_label(inner) unless container?(inner)
- branch ||= build_tree(inner) if container?(inner)
- end
- tree << (branch ? { label => branch } : label)
- end
- tree
- end
-
- def self.container?(el)
- el.elem? && @@parents.include?(el.name)
- end
-
- def self.build_label(node)
- if node.elem?
- label = Label.new(node.innerHTML.strip)
- label.url = node['href'] if node.name == 'a'
- label
- elsif node.text? && !node.to_s.strip.empty?
- node.to_s.strip
- end
- end
-
- class Label < String
- attr_accessor :url
- end
-end
View
130 site/.svn/entries
@@ -1,130 +0,0 @@
-8
-
-dir
-354
-svn+ssh://chris@errtheblog.com/svn/projects/mofo/site
-svn+ssh://chris@errtheblog.com/svn/projects
-
-
-
-2007-06-15T02:35:16.102198Z
-146
-chris
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-cf301c5b-d72e-0410-996c-ed4829982077
-
-mofo-logo.png
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-484b66d422236a9ab0c600e9ab13643f
-2007-04-24T08:22:53.936924Z
-4
-chris
-has-props
-
-try.html
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-c0f298781f473acc7b31533ef8d9cff0
-2007-05-09T20:01:47.560615Z
-77
-chris
-
-spinner.gif
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-3eeda6663cf508817f5c3648a5cbf57e
-2007-05-09T20:01:47.560615Z
-77
-chris
-has-props
-
-style.css
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-aa7c123dd9d2ffae65b789dfbd316a09
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-mootools.v1.00.js
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-2662bb7709e33cf43638d20e2ab73775
-2007-04-24T08:22:53.936924Z
-4
-chris
-
-index.html
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-749a603bba9f4e3b56effb0028592050
-2007-05-25T08:17:49.743225Z
-116
-chris
-
-p.js
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-df2bce95b93614a2ed12fb49d69020c1
-2007-05-09T20:01:47.560615Z
-77
-chris
-
-try
-dir
-
-favicon.ico
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-95fa07bc50044a057129f9b4d6e7f11a
-2007-05-05T23:50:35.456908Z
-59
-chris
-has-props
-
View
1  site/.svn/format
@@ -1 +0,0 @@
-8
View
5 site/.svn/prop-base/favicon.ico.svn-base
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
View
5 site/.svn/prop-base/mofo-logo.png.svn-base
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
View
5 site/.svn/prop-base/spinner.gif.svn-base
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
View
BIN  site/.svn/text-base/favicon.ico.svn-base
Binary file not shown
View
384 site/.svn/text-base/index.html.svn-base
@@ -1,384 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
- <title>mofo - a ruby microformat parser</title>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="mootools.v1.00.js"></script>
- <script type="text/javascript">function sc(el) { new Fx.Scroll(window).toElement(el); }</script>
-</head>
-
-<body>
- <div id="container">
- <div id="header">
- <img src="mofo-logo.png" alt="mofo!" />
- <br /><hr />
- </div>
-
- <div id="left">
- <h3>mofo</h3>
-
- <ul class="xoxo">
- <!-- <li><a href="/try">Try It!</a></li> -->
- <li><a href="#" onclick="sc('get_started')">Get Started</a></li>
- <li><a href="#" onclick="sc('microwhozit')">Microwhozit?</a></li>
- <li><a href="#" onclick="sc('find')">Mofo#find</a></li>
- <li><a href="#" onclick="sc('supported')">Supported Microformats</a></li>
- <li><a href="#" onclick="sc('rails')">Ruby on Rails</a></li>
- <li><a href="#" onclick="sc('touch')">Get in Touch</a></li>
- </ul>
-
- <h3>Points of Interest</h3>
-
- <ul class="xoxo">
- <li><a href="http://errtheblog.com/post/37">Me and uFormats</a></li>
- <li><a href="http://microformats.org">Microformats HQ</a></li>
- <li><a href="http://microformatique.com">Microformatique</a></li>
- <li><a href="http://labnotes.org">Assaf Arkin</a></li>
- <li><a href="http://allinthehead.com">Drew McClellan</a></li>
- <li><a href="http://tantek.com">Tantek Çelik</a></li>
- <li><a href="http://theryanking.com/blog">Ryan King</a></li>
- </ul>
-
- <h3>Other Parsers</h3>
-
- <ul class="xoxo">
- <li><a href="http://rubyforge.org/projects/scrapi">Scrapi</a> [ruby]</li>
- <li><a href="http://rubyforge.org/projects/uformats">uFormats</a> [ruby]</li>
- <li><a href="http://allinthehead.com/hkit">hKit</a> [php]</li>
- <li><a href="http://www.danwebb.net/2007/2/9/sumo-a-generic-microformats-parser-for-javascript">Sumo</a> [js]</li>
- <li><a href="https://addons.mozilla.org/en-US/firefox/addon/4106">Operator</a> [firefox]</li>
- </ul>
- </div>
-
- <div id="main">
-<h3 id="get_started">Get Started Immediately</h3>
-<br/>
-<pre>
-$ sudo gem install mofo -y
-... install mofo and hpricot dependency ...
-$ irb -rubygems
-&gt;&gt; require 'mofo'
-=&gt; true
-&gt;&gt; fireball = hCard.find 'http://flickr.com/people/gruber/'
-=&gt; #&lt;HCard:0x6db898 ...&gt;
-&gt;&gt; fireball.properties
-=&gt; ["fn", "logo", "url", "n", "adr", "title", "nickname"]
-&gt;&gt; fireball.nickname
-=&gt; "gruber"
-&gt;&gt; fireball.url
-=&gt; "http://daringfireball.net/"
-&gt;&gt; fireball.n.family_name
-=&gt; "Gruber"
-&gt;&gt; fireball.title
-=&gt; "Raconteur"
-&gt;&gt; fireball.adr.locality
-=&gt; "Philadelphia"
-&gt;&gt; fireball.logo
-=&gt; "http://static.flickr.com/9/buddyicons/44621776@N00.jpg?1117572751"
-</pre>
-
-<h3 id="microwhozit">Microwhozit?</h3>
-
-<p>
-Microformats are tiny little markup definitions built on top of, usually,
-HTML or XHTML.
-</p>
-<p>
-You have a blog. You have recent posts on your blog's index page. You have
-an Atom feed. You have recent posts on your blog's Atom feed. See where I'm
-going with this?
-</p>
-<p>
-The hAtom microformat (or uformat) can be embedded in your existing HTML by
-setting CSS classes with semantic meaning inside of your posts. A class to signify
-a post is contained within this div, a class to signify the contents of this
-h3 are the post's title, a class to signify the contents of this span is the
-blog post's author, etc.
-</p>
-<p>
-You can then use a microformat parser (like, say, mofo) to extract this information
-as you would from an Atom feed. Hell, you can even convert hAtom to Atom. It's an
-insta-feed! No extra code required!
-</p>
-<p>
-You're already doing the work, you see. Microformats are everywhere. We just need
-to set them free.
-</p>
-<p>
-Check it:</p>
-
-<pre>
-&lt;div class="post"&gt;
-&lt;h3&gt;Megadeth Show Last Night&lt;/h3&gt;
-&lt;span class="subtitle"&gt;Posted by Chris on June 4th&lt;/span&gt;
-&lt;div class="content"&gt;Went to a show last night. Megadeth. It was alright.&lt;/div&gt;
-&lt;/div&gt;
-</pre>
-
-<p>Right? Normal. Here's the same post marked up with hAtom:</p>
-
-<pre>
-&lt;div class="post <strong>hentry</strong>"&gt;
-&lt;h3 class="<strong>entry-title</strong>"&gt;Megadeth Show Last Night&lt;/h3&gt;
-&lt;span class="subtitle"&gt;Posted by &lt;span class="<strong>author vcard fn</strong>"&gt;Chris&lt;/span&gt; on
-&lt;abbr class="<strong>updated</strong>" title="2006-06-04T10:32:10Z"&gt;June 4th&lt;/abbr&gt;&lt;/span&gt;
-&lt;div class="content <strong>entry-content</strong>"&gt;
-Went to a show last night. Megadeth. It was alright.
-&lt;/div&gt;
-&lt;/div&gt;
-</pre>
-
-<p>
-All I did was add the hentry, entry-title, and entry-content classes to existing containers. Then I
-went ahead and wrapped the date in an &lt;abbr&gt; tag giving it a title in the microformat-standard way. Finally
-I put a div around Chris signifying it as the author field of the hEntry and making it a valid hCard by
-including the vcard and fn classes. It's really not all that hard. Did I mess it up? Maybe, but I'm sure I got
-close. And I didn't even use a reference. Practice.
-</p>
-
-<p>
-How'd we parse this, tho?
-</p>
-
-<pre>
-$ irb -rubygems
-&gt;&gt; require 'mofo'
-=&gt; true
-&gt;&gt; post = hEntry.find 'http://milesofstyle.org/posts/351-megadeth-show-last-night'
-=&gt; #&lt;HEntry:0x6db898 ... &gt;
-&gt;&gt; post.entry_title
-=&gt; "Megadeth Show Last Night"
-&gt;&gt; post.properties
-=&gt; ["entry_content", "updated", "author", "entry_title"]
-&gt;&gt; post.updated
-=&gt; Sun Jun 04 10:32:10 UTC 2006
-&gt;&gt; post.updated.class
-=&gt; Time
-&gt;&gt; post.author
-=&gt; #&lt;HCard:0x6e7b98 @properties=["fn"], @fn="Chris"&gt;
-&gt;&gt; post.author.fn
-=&gt; "Chris"
-&gt;&gt; post.entry_content
-=&gt; "Went to a show last night. Megadeth. It was alright."
-</pre>
-<p>
-That's, like, stupid easy. If hEntry.find gets back more than one hEntry, you'll get an array.
-</p>
-
-<h3 id="find">Mofo#find</h3>
-
-<p>Everything revolves around the #find method. Sound familiar? Yeah.</p>
-
-<pre>
-&gt;&gt; Microformat.find "http://valid-url.com"
-&gt;&gt; Microformat.find "/path/to/existing/file"
-&gt;&gt; Microformat.find :text =&gt; "microformat text"
-</pre>
-
-<p>
-Also, #find can be told explicitly to find all (returning an array on failure) or only find
-the first (returning nil on failure).
-</p>
-
-<pre>
-&gt;&gt; Microformat.find :all =&gt; "/existing/file"
-=&gt; [ array of microformat objects ]
-&gt;&gt; Microformat.find :first =&gt; "/existing/file"
-=&gt; microformat object
-&gt;&gt; Microformat.find "/existing/file"
-=&gt; either an array of objects or just one object
-</pre>
-
-<p>When parsing a string, use :all and :first go outside of :text.</p>
-
-<pre>
-&gt;&gt; Microformat.find :all =&gt; { :text =&gt; 'mfin text' }
-</pre>
-
-<p>
-That's it.
-</p>
-
-<h3 id="supported">Supported Microformats</h3>
-
-<p><strong>hCard</strong> - <a href="http://microformats.org/wiki/hcard">http://microformats.org/wiki/hcard</a></p>
-<pre>
-&gt;&gt; messina = hCard.find 'http://www.flickr.com/people/factoryjoe/'
-=&gt; #&lt;HCard:0x125eb5c ...&gt;
-&gt;&gt; messina.properties
-=&gt; ["fn", "note", "logo", "url", "n", "adr", "title", "nickname"]
-&gt;&gt; messina.title
-=&gt; "Citizen Provocateur, Open Source Ambassador"
-&gt;&gt; messina.logo
-=&gt; "http://farm1.static.flickr.com/1/buddyicons/25419820@N00.jpg?1167346106"
-&gt;&gt; messina.n
-=&gt; #&lt;OpenStruct given_name="Chris", family_name="Messina"&gt;
-&gt;&gt; messina.fn
-=&gt; "Chris Messina"
-&gt;&gt; messina.url
-=&gt; "http://factoryjoe.com/blog"
-&gt;&gt; messina.nickname
-=&gt; "factoryjoe"
-</pre>
-
-<p><strong>hCalendar</strong> - <a href="http://microformats.org/wiki/hcalendar">http://microformats.org/wiki/hcalendar</a></p>
-<pre>
-&gt;&gt; events = hCalendar.find 'http://upcoming.org'
-=&gt; [#&lt;HCalendar:0x131d304 ...&gt; ... ]
-&gt;&gt; events.size
-=&gt; 17
-&gt;&gt; events.first.properties
-=&gt; ["summary", "url", "location"]
-&gt;&gt; events.first.location
-=&gt; "Neumo&amp;#39;s, Seattle, WA"
-&gt;&gt; events.first.summary
-=&gt; "Ratatat + 120 Days"
-</pre>
-
-<p><strong>hReview</strong> - <a href="http://microformats.org/wiki/hreview">http://microformats.org/wiki/hreview</a></p>
-<pre>
-&gt;&gt; wine = hReview.find 'http://corkd.com/wine/view/1772'
-=&gt; [#&lt;HReview:0x156c3f8 ...&gt; ...]
-&gt;&gt; wine.size
-=&gt; 7
-&gt;&gt; wine.first.properties
-=&gt; ["rating", "description", "item", "reviewer", "tags", "dtreviewed"]
-&gt;&gt; wine.first.rating
-=&gt; 3
-&gt;&gt; wine.first.tags
-=&gt; ["fresh", "lime", "pear"]
-&gt;&gt; wine.first.dtreviewed
-=&gt; Fri Jun 02 00:00:00 -0700 2006
-</pre>
-
-<p><strong>hEntry</strong> - <a href="http://microformats.org/wiki/hatom">http://microformats.org/wiki/hatom</a></p>
-<pre>
-&gt;&gt; post = hEntry.find 'http://errtheblog.com'
-=&gt; #&lt;HEntry:0x169309c ...&gt;
-&gt;&gt; post.properties
-=&gt; ["published", "entry_title", "author", "entry_content", "bookmark", "tags"]
-&gt;&gt; post.author.class
-=&gt; HCard
-&gt;&gt; post.author.fn
-=&gt; "Chris"
-&gt;&gt; post.published
-=&gt; Mon Mar 26 09:21:00 UTC 2007
-&gt;&gt; post.entry_content.length
-=&gt; 4737
-</pre>
-
-<p><strong>hResume</strong> - <a href="http://microformats.org/wiki/hresume">http://microformats.org/wiki/hresume</a></p>
-<pre>
-&gt;&gt; crunch = hResume.find 'http://www.linkedin.com/in/michaelarrington'
-=&gt; #&lt;HResume:0x129d370 ...&gt;
-&gt;&gt; crunch.properties
-=&gt; ["summary", "education", "experience", "contact"]
-&gt;&gt; crunch.experience.first.class
-=&gt; HCalendar
-&gt;&gt; crunch.contact
-=&gt; #&lt;HCard:0x36614 ...&gt;
-&gt;&gt; crunch.contact.title
-=&gt; "Editor - TechCrunch"
-</pre>
-
-<p><strong>XOXO</strong> - <a href="http://microformats.org/wiki/xoxo">http://microformats.org/wiki/xoxo</a></p>
-<pre>
-&gt;&gt; mofo = XOXO.find 'http://mofo.rubyforge.org', :class =&gt; true
-=&gt; [["Get Started", "Microwhozit?", "Mofo#find", ...]
-&gt;&gt; mofo.first
-=&gt; ["Get Started", "Microwhozit?", "Mofo#find", "Supported Microformats", ...]
-&gt;&gt; mofo[1]
-=&gt; ["Me and uFormats", "Microformats HQ", "Microformatique", "Assaf Arkin", ...]
-&gt;&gt; mofo[1].first
-=&gt; "Me and uFormats"
-&gt;&gt; mofo[1].first.class
-=&gt; XOXO::Label
-&gt;&gt; mofo[1].first.url
-=&gt; "http://errtheblog.com/post/37"
-</pre>
-
-<p><strong>Geo</strong> - <a href="http://microformats.org/wiki/geo">http://microformats.org/wiki/geo</a></p>
-<pre>
-&gt;&gt; somewhere = Geo.find 'http://www.geograph.org.uk/photo/1234'
-=&gt; #&lt;Geo:0x12337a4 ...&gt;
-&gt;&gt; somewhere.latitude
-=&gt; 54.05836
-&gt;&gt; somewhere.longitude
-=&gt; -2.14662
-</pre>
-
-<p><strong>Adr</strong> - <a href="http://microformats.org/wiki/adr">http://microformats.org/wiki/adr</a></p>
-<pre>
-...coming soon...
-</pre>
-
-<p><strong>XFN</strong> - <a href="http://microformats.org/wiki/xfn">http://microformats.org/wiki/xfn</a></p>
-<pre>
-&gt;&gt; tons = XFN.find 'http://deliciouslymeta.com/projects/xfn/test_data.html'
-=&gt; #&lt;XFN:0x157f200 ...&gt;
-&gt;&gt; tons.first
-=&gt; #&lt;XFN::Link name="friend - contact", relation="contact", link="#contact"&gt;
-&gt;&gt; tons.me_and_parent
-=&gt; #&lt;XFN::Link name="me + parent", relation=["me", "parent"], link="#parent"&gt;
-&gt;&gt; tons.me_and_parent.name
-=&gt; "me + parent
-&gt;&gt; tons.neighbor
-=&gt; [#&lt;XFN::Link ...&gt; ...]
-&gt;&gt; tons.neighbor.size
-=&gt; 5
-&gt;&gt; tons.parent_and_kin.link
-=&gt; "#parent"
-</pre>
-
-
-<h3 id="rails">Ruby on Rails</h3>
-
-<p>
-mofo doubles as a Rails plugin. Just drop it into vendor/plugins and you are good to go, with all the
-available microformat parsers loaded into your application.
-
-mofo classes are YAML and Marshal approved, meaning you can cache them with memcached (or DRb) or store
-them in a session.
-</p>
-
-<p>
-Install with <a href="http://www.rubyinside.com/advent2006/12-piston.html">Piston</a>:
-</p>
-
-<pre>
-$ piston import svn://errtheblog.com/svn/projects/mofo vendor/plugins/mofo
-</pre>
-
-<p>
-Install with SVN:
-</p>
-
-<pre>
-$ ./script/plugin install -x svn://errtheblog.com/svn/projects/mofo
-</pre>
-
-<h3 id="touch">Get in Touch</h3>
-
-<ul>
- <li><strong>Google Group:</strong> <a href="http://groups.google.com/group/mofo-rb">http://groups.google.com/group/mofo-rb</a></li>
- <li><strong>Me:</strong> chris[at]ozmm[dot]org (chris wanstrath)</li>
- <li><strong>Trac:</strong> <a href="http://require.errtheblog.com/projects/browser/mofo">http://require.errtheblog.com/projects/browser/mofo</a></li>
- <li><strong>SVN:</strong> svn://errtheblog.com/svn/projects/mofo</li>
-</ul>
- </div>
-
- <div id="footer">
- <hr />
- <p class="left">| <a href="http://jigsaw.w3.org/css-validator/">CSS</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> |</p>
- <p class="right">Designed by <a href="mailto:support@syndicateme.net">syndicateme.net</a>. Logo'd by <a href="http://seaofclouds.com/">seaofclouds</a>. Hosted by <a href="http://rubyforge.org">Rubyforge</a>. Birthed by <a href="http://errtheblog.com">Err</a>.</p>
- <p>&nbsp;</p>
- </div>
- </div>
-<script src="http://static.getclicky.com/4581.js" type="text/javascript"></script>
-<noscript><p><img alt="Clicky" src="http://static.getclicky.com/4581ns.gif" /></p></noscript>
-</body>
-</html>
View
BIN  site/.svn/text-base/mofo-logo.png.svn-base
Binary file not shown
View
2  site/.svn/text-base/mootools.v1.00.js.svn-base
@@ -1,2 +0,0 @@
-//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('h P=6(19){h 2I=6(){7(4.1r&&B[0]!=\'4i\')5 4.1r.1L(4,B);M 5 4};H(h k 14 4)2I[k]=4[k];2I.E=19;5 2I};P.1N=6(){};P.E={I:6(19){h 2v=J 4(\'4i\');h 4b=6(1x,1g){7(!1x.1L||!1g.1L)5 v;5 6(){4.3A=1x;5 1g.1L(4,B)}};H(h k 14 19){h 1x=2v[k];h 1g=19[k];7(1x&&1x!=1g)1g=4b(1x,1g)||1g;2v[k]=1g}5 J P(2v)},2i:6(19){H(h k 14 19)4.E[k]=19[k]}};1s.I=6(){h r=B;r=(r[1])?[r[0],r[1]]:[4,r[0]];H(h k 14 r[1])r[0][k]=r[1][k];5 r[0]};1s.3j=6(){H(h i=0;i<B.C;i++)B[i].I=P.E.2i};J 1s.3j(3p,R,2P,4I,P);7(2R 26==\'3F\'){h 26=P.1N;26.E={}}M{26.E.3i=U}G.I=u.I=1s.I;h 5s=G;6 $f(F){7(F===1i||F===3F)5 v;h f=2R F;7(f==\'2V\'){7(F.3i)5\'L\';7(F.V)5\'15\';7(F.5r){1t(F.4Q){Q 1:5\'L\';Q 3:5 F.5q.O(/\\S/)?\'5p\':\'2D\'}}}5 f};6 $2e(F){5!!(F||F===0)};6 $5t(F,4V){5($f(F))?F:4V};6 $4L(2g,1o){5 1c.5u(1c.4L()*(1o-2g+1)+2g)};6 $4X(1p){5x(1p);5w(1p);5 1i};7(G.5v)G.1Z=G[G.5o?\'5n\':\'36\']=U;M 7(u.42&&!u.5h&&!5g.5f)G.1X=U;M 7(u.5e!=1i)G.3h=U;7(G.36)4N{u.5i("5j",v,U)}4M(e){};R.E.2x=R.E.2x||6(n,m){H(h i=0;i<4.C;i++)n.1k(m,4[i],i,4)};R.E.3g=R.E.3g||6(n,m){h 1U=[];H(h i=0;i<4.C;i++){7(n.1k(m,4[i],i,4))1U.V(4[i])}5 1U};R.E.4H=R.E.4H||6(n,m){h 1U=[];H(h i=0;i<4.C;i++)1U[i]=n.1k(m,4[i],i,4);5 1U};R.E.29=R.E.29||6(n,m){H(h i=0;i<4.C;i++){7(!n.1k(m,4[i],i,4))5 v}5 U};R.E.4D=R.E.4D||6(n,m){H(h i=0;i<4.C;i++){7(n.1k(m,4[i],i,4))5 U}5 v};R.E.2o=R.E.2o||6(1P,K){K=K||0;7(K<0)K=1c.1o(0,4.C+K);1R(K<4.C){7(4[K]===1P)5 K;K++}5-1};R.I({W:R.E.2x,4S:6(12,C){12=12||0;7(12<0)12=4.C+12;C=C||(4.C-12);h 1K=[];H(h i=0;i<C;i++)1K[i]=4[12++];5 1K},3u:6(1P){h i=0;1R(i<4.C){7(4[i]===1P)4.3f(i,1);M i++}5 4},O:6(1P,K){5 4.2o(1P,K)!=-1},I:6(1K){H(h i=0;i<1K.C;i++)4.V(1K[i]);5 4},5m:6(X){h F={},C=1c.2g(4.C,X.C);H(h i=0;i<C;i++)F[X[i]]=4[i];5 F}});6 $A(15,12,C){5 R.E.4S.1k(15,12,C)};6 $W(4B,n,m){5 R.E.2x.1k(4B,n,m)};2P.I({O:6(2H,4z){5((2R 2H==\'24\')?J 4g(2H,4z):2H).O(4)},4Z:6(){5 2Q(4)},51:6(){5 3o(4)},3s:6(){5 4.1Q(/-\\D/g,6(1n){5 1n.2W(1).4G()})},4v:6(){5 4.1Q(/\\w[A-Z]/g,6(1n){5(1n.2W(0)+\'-\'+1n.2W(1).22())})},4o:6(){5 4.22().1Q(/\\b[a-z]/g,6(1n){5 1n.4G()})},4x:6(){5 4.1Q(/^\\s+|\\s+$/g,\'\')},3b:6(){5 4.1Q(/\\s{2,}/g,\' \').4x()},2n:6(15){h 1h=4.1n(/\\d{1,3}/g);5(1h)?1h.2n(15):v},2T:6(15){h 1I=4.1n(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);5(1I)?1I.5l(1).2T(15):v}});R.I({2n:6(15){7(4.C<3)5 v;7(4[3]&&(4[3]==0)&&!15)5\'5k\';h 1I=[];H(h i=0;i<3;i++){h 2w=(4[i]-0).5y(16);1I.V((2w.C==1)?\'0\'+2w:2w)}5 15?1I:\'#\'+1I.28(\'\')},2T:6(15){7(4.C!=3)5 v;h 1h=[];H(h i=0;i<3;i++){1h.V(2Q((4[i].C==1)?4[i]+4[i]:4[i],16))}5 15?1h:\'1h(\'+1h.28(\',\')+\')\'}});4I.I({4Z:6(){5 2Q(4)},51:6(){5 3o(4)}});3p.I({1m:6(q){h n=4;q=1s.I({\'m\':n,\'l\':v,\'B\':1i,\'1l\':v,\'1W\':v,\'2s\':v},q||{});7($2e(q.B)&&$f(q.B)!=\'15\')q.B=[q.B];5 6(l){h r;7(q.l){l=l||G.l;r=[(q.l===U)?l:J q.l(l)];7(q.B)r=r.5N(q.B)}M r=q.B||B;h 1w=6(){5 n.1L(q.m,r)};7(q.1l)5 5d(1w,q.1l);7(q.1W)5 5M(1w,q.1W);7(q.2s){4N{5 1w()}4M(4K){5 4K}}5 1w()}},5L:6(r,m){5 4.1m({\'B\':r,\'m\':m})},2s:6(r,m){5 4.1m({\'B\':r,\'m\':m,\'2s\':U})()},m:6(m,r){5 4.1m({\'m\':m,\'B\':r})},5O:6(m,r){5 4.1m({\'m\':m,\'l\':U,\'B\':r})},1l:6(2t,m,r){5 4.1m({\'1l\':2t,\'m\':m,\'B\':r})()},1W:6(2t,m,r){5 4.1m({\'1W\':2t,\'m\':m,\'B\':r})()}});h 18=J P({1r:6(9){7($f(9)==\'24\')9=u.41(9);5 $(9)}});6 $(9){7(!9)5 v;7(9.4k||[G,u].O(9))5 9;7($f(9)==\'24\')9=u.5P(9);7($f(9)!=\'L\')5 v;7([\'2V\',\'5S\'].O(9.4d.22())||9.I)5 9;9.4k=U;1G.2p(9);9.I=1s.I;7(!(9.3i))9.I(18.E);5 9};h 1S=J P({});J 1s.3j(1S);u.3K=u.5R;6 $$(){7(!B)5 v;7(B.C==1){7(!B[0])5 v;7(B[0].3H)5 B[0]}h 1d=[];$W(B,6(1D){1t($f(1D)){Q\'L\':1d.V($(1D));1j;Q\'24\':1D=u.3K(1D);3W:7(1D.C){$W(1D,6(9){7($(9))1d.V(9)})}}});1d.3H=U;5 1s.I(1d,J 1S)};1S.3D=6(k){5 6(){h r=B;h 2b=[];h 1d=U;$W(4,6(9){h 1w=9[k].1L(9,r);7($f(1w)!=\'L\')1d=v;2b.V(1w)});7(1d)2b=$$(2b);5 2b}};18.I=6(19){H(h k 14 19){26.E[k]=19[k];18.E[k]=19[k];1S.E[k]=1S.3D(k)}};18.I({2J:6(9,3G){9=$(9)||J 18(9);1t(3G){Q"3O":$(9.1A).3z(4,9);1j;Q"4c":7(!9.31())$(9.1A).2G(4);M $(9.1A).3z(4,9.31());1j;Q"4e":9.2G(4)}5 4},5D:6(9){5 4.2J(9,\'3O\')},5C:6(9){5 4.2J(9,\'4c\')},5B:6(9){5 4.2J(9,\'4e\')},5A:6(9){4.2G($(9)||J 18(9));5 4},3u:6(){4.1A.5E(4);5 4},5F:6(48){h 9=4.5I(48!==v);5 $(9)},3U:6(9){9=$(9)||J 18(9);4.1A.5H(9,4);5 9},5G:6(1F){7(G.1Z){1t(4.2K()){Q\'N\':4.5T.4r=1F;5 4;Q\'5a\':4.2C(\'1F\',1F);5 4}}4.2G(u.5b(1F));5 4},2Y:6(T){5 4.T.O(\'(?:^|\\\\s)\'+T+\'(?:\\\\s|$)\')},4O:6(T){7(!4.2Y(T))4.T=(4.T+\' \'+T).3b();5 4},3I:6(T){4.T=4.T.1Q(J 4g(\'(^|\\\\s)\'+T+\'(?:\\\\s|$)\'),\'$1\').3b();5 4},58:6(T){5 4.2Y(T)?4.3I(T):4.4O(T)},4E:6(k,Y){7(k==\'1e\')4.4t(3o(Y));M 4.N[k.3s()]=(Y.V)?\'1h(\'+Y.28(\',\')+\')\':Y;5 4},44:6(1a){1t($f(1a)){Q\'2V\':H(h k 14 1a)4.4E(k,1a[k]);1j;Q\'24\':4.N.4r=1a}5 4},4t:6(1e){7(1e==0){7(4.N.2u!="30")4.N.2u="30"}M{7(4.N.2u!="4R")4.N.2u="4R"}7(!4.2m||!4.2m.57)4.N.5c=1;7(G.1Z)4.N.3g="6g(1e="+1e*79+")";4.N.1e=4.1e=1e;5 4},25:6(k){k=k.3s();h N=4.N[k]||v;7(!$2e(N)){7(k==\'1e\')5 $2e(4.1e)?4.1e:1;7([\'7a\',\'78\'].O(k)){5[4.25(k+\'-1H\')||0,4.25(k+\'-3x\')||0,4.25(k+\'-3N\')||0,4.25(k+\'-1v\')||0].28(\' \')}7(u.54)N=u.54.75(4,1i).7l(k.4v());M 7(4.2m)N=4.2m[k]}7(N==\'6H\'&&[\'2X\',\'3m\'].O(k))5 4[\'6J\'+k.4o()]+\'3B\';5(N&&k.O(/6K/i)&&N.O(/1h/))?N.2n():N},11:6(f,n){4.o=4.o||{};4.o[f]=4.o[f]||{\'X\':[],\'1f\':[]};7(!4.o[f].X.O(n)){4.o[f].X.V(n);7(4.4A){4.4A((f==\'2l\'&&G.3h)?\'3n\':f,n,v)}M{n=n.m(4);4.6Y(\'3w\'+f,n);4.o[f].1f.V(n)}}5 4},70:6(1a){7(1a){H(h f 14 1a)4.11(f,1a[f])}5 4},1u:6(f,n){7(4.o&&4.o[f]){h 2r=4.o[f].X.2o(n);7(2r==-1)5 4;h 1V=4.o[f].X.3f(2r,1)[0];7(4.55){4.55((f==\'2l\'&&G.3h)?\'3n\':f,1V,v)}M{4.6S(\'3w\'+f,4.o[f].1f.3f(2r,1)[0])}}5 4},1O:6(f){7(4.o){7(f){7(4.o[f]){4.o[f].X.W(6(n){4.1u(f,n)},4);4.o[f]=1i}}M{H(h 4T 14 4.o)4.1O(4T);4.o=1i}}5 4},2k:6(f,r){7(4.o&&4.o[f]){4.o[f].X.W(6(n){n.m(4,r)()},4)}},2Z:6(3e){h 9=4[3e+\'3L\'];1R($f(9)==\'2D\')9=9[3e+\'3L\'];5 $(9)},6U:6(){5 4.2Z(\'1x\')},31:6(){5 4.2Z(\'7c\')},6P:6(){h 9=4.76;1R($f(9)==\'2D\')9=9.71;5 $(9)},6V:6(){h 9=4.6T;1R($f(9)==\'2D\')9=9.6W;5 $(9)},6X:6(){5 $(4.1A)},6Z:6(){5 $$(4.42)},2C:6(k,Y){1t(k){Q\'4h\':4.T=Y;1j;Q\'N\':4.44(Y);1j;Q\'1y\':7(G.36){h 9=$(u.41(\'<\'+4.2K()+\' 1y="\'+Y+\'" />\'));$W(4.5U,6(2F){7(2F.1y!=\'1y\')9.2C(2F.1y,2F.Y)});7(4.1A)4.3U(9);5 9}3W:4.6R(k,Y)}5 4},6Q:6(1a){H(h k 14 1a)4.2C(k,1a[k]);5 4},6I:6(){4.6L=$A(B).28(\'\');5 4},6M:6(k){5(k==\'4h\')?4.T:4.6O(k)},2K:6(){5 4.4d.22()},1z:6(x,y){4.1Y=x;4.23=y},6N:6(){1t(4.2K()){Q\'72\':7(4.3T!=-1){h 33=4.q[4.3T];5 33.Y||33.1F}1j;Q\'7h\':7(!(4.7g&&[\'7f\',\'7e\'].O(4.f))&&![\'30\',\'1F\',\'7i\'].O(4.f))1j;Q\'7j\':5 4.Y}5 v},3c:6(){5{\'2j\':{\'x\':4.1Y,\'y\':4.23},\'2q\':{\'x\':4.3r,\'y\':4.3t},\'3q\':{\'x\':4.2N,\'y\':4.2z}}},2f:6(1T){1T=1T||[];h 9=4,1v=0,1H=0;7k{1v+=9.7d||0;1H+=9.74||0;9=9.73}1R(9);1T.W(6(L){1v-=L.1Y||0;1H-=L.23||0});5{\'x\':1v,\'y\':1H}},4C:6(){5 4.2f().y},4w:6(){5 4.2f().x},77:6(1T){h 3l=4.2f(1T);h F={\'3m\':4.3r,\'2X\':4.3t,\'1v\':3l.x,\'1H\':3l.y};F.3x=F.1v+F.3m;F.3N=F.1H+F.2X;5 F}});G.11=u.11=18.E.11;G.1u=u.1u=18.E.1u;G.1O=u.1O=18.E.1O;h 1G={1d:[],2p:6(L){1G.1d.V(L)},4U:6(){1G.2p(G);1G.2p(u);1G.1d.W(6(9){9.1O();H(h p 14 18.E)9[p]=1i;9.I=1i})}};G.11(\'6a\',1G.4U);h 21=J P({1r:6(l){4.l=l||G.l;4.f=4.l.f;4.2d=4.l.2d||4.l.68;7(4.2d.4Q==3)4.2d=4.2d.1A;4.4s=4.l.67;4.6b=4.l.6c;4.6G=4.l.6f;4.6e=4.l.6d;7([\'3n\',\'2l\'].O(4.f)){4.66=4.l.53?(4.l.53/(G.3y?-4Y:4Y)):-(4.l.65||0)/ 3} M 7 (4.f.O(/1V/)){4.2O=4.l.4l||4.l.5Y;H(h 1y 14 21.X){7(21.X[1y]==4.2O){4.1V=1y;1j}}4.1V=4.1V||2P.5W(4.2O).22()}M 7(4.f.O(/5V/)||(4.f==\'5Z\')){4.60={\'x\':4.l.2S||4.l.4q+u.17.1Y,\'y\':4.l.2U||4.l.4m+u.17.23};4.64={\'x\':4.l.2S?4.l.2S-G.4f:4.l.4q,\'y\':4.l.2U?4.l.2U-G.47:4.l.4m};4.63=(4.l.4l==3)||(4.l.62==2);1t(4.f){Q\'61\':4.2y=4.l.2y||4.l.6h;1j;Q\'6i\':4.2y=4.l.2y||4.l.4n}}},1E:6(){4.2B();4.2L();5 4},2B:6(){7(4.l.2B)4.l.2B();M 4.l.6y=U;5 4},2L:6(){7(4.l.2L)4.l.2L();M 4.l.6x=v;5 4}});21.X={\'6w\':13,\'6v\':38,\'6z\':40,\'1v\':37,\'3x\':39,\'6A\':27,\'6E\':32,\'6D\':8,\'6C\':46};3p.I({6B:6(m,r){5 4.1m({\'m\':m,\'B\':r,\'l\':21})}});h 4y=J P({6t:6(n){4.1C=4.1C||[];4.1C.V(n);5 4},3S:6(){7(4.1C&&4.1C.C)4.1C.4s().1l(10,4)},6l:6(){4.1C=[]}});h 4F=J P({11:6(f,n){7(n!=P.1N){4.o=4.o||{};4.o[f]=4.o[f]||[];7(!4.o[f].O(n))4.o[f].V(n)}5 4},2k:6(f,r,1l){7(4.o&&4.o[f]){4.o[f].W(6(n){n.1m({\'m\':4,\'1l\':1l,\'B\':r})()},4)}5 4},1u:6(f,n){7(4.o&&4.o[f])4.o[f].3u(n);5 4}});h 4p=J P({3E:6(4P,q){4.q=1s.I(4P,q);7(4.11){H(h 2a 14 4.q){7(($f(4.q[2a])==\'6\')&&2a.O(/^3w[A-Z]/))4.11(2a,4.q[2a])}}5 4}});h 6n=J P({1r:6(){4.2c=$A(B);4.o={};4.1J={}},11:6(f,n){4.1J[f]=4.1J[f]||{};4.o[f]=4.o[f]||[];7(4.o[f].O(n))5 v;M 4.o[f].V(n);4.2c.W(6(20,i){20.11(f,4.3R.m(4,[f,20,i]))},4);5 4},3R:6(f,20,i){4.1J[f][i]=U;h 29=4.2c.29(6(1g,j){5 4.1J[f][j]||v},4);7(!29)5;4.2c.W(6(1g,j){4.1J[f][j]=v},4);4.o[f].W(6(l){l.1k(4,4.2c,20)},4)}});G.I({45:6(){7(4.1X)5 4.6s;7(4.3y)5 u.2A.4j;5 u.17.4j},43:6(){7(4.1X)5 4.6r;7(4.3y)5 u.2A.49;5 u.17.49},3Z:6(){7(4.1Z)5 1c.1o(u.17.3r,u.17.2N);7(4.1X)5 u.2A.2N;5 u.17.2N},3V:6(){7(4.1Z)5 1c.1o(u.17.3t,u.17.2z);7(4.1X)5 u.2A.2z;5 u.17.2z},3X:6(){5 4.4f||u.17.1Y},3Y:6(){5 4.47||u.17.23},3c:6(){5{\'2q\':{\'x\':4.45(),\'y\':4.43()},\'3q\':{\'x\':4.3Z(),\'y\':4.3V()},\'2j\':{\'x\':4.3X(),\'y\':4.3Y()}}},2f:6(){5{\'x\':0,\'y\':0}}});h 1q={};1q.2h=J P({3C:6(){5{3k:P.1N,3d:P.1N,56:P.1N,3P:1q.4J.52,3v:6p,6q:\'3B\',35:U,4W:50}},1r:6(q){4.L=4.L||1i;4.3E(4.3C(),q);7(4.q.1r)4.q.1r.1k(4)},4a:6(){h 1M=J 3M().3J();7(1M<4.1M+4.q.3v){4.3Q=1M-4.1M;4.34();4.2M()}M{4.1E(U);4.1B=4.1b;4.2M();4.2k(\'3d\',4.L,10);4.3S()}},6o:6(1b){4.1B=1b;4.2M();5 4},34:6(){4.1B=4.3a(4.K,4.1b)},3a:6(K,1b){5 4.q.3P(4.3Q,K,(1b-K),4.q.3v)},12:6(K,1b){7(!4.q.35)4.1E();M 7(4.1p)5 4;4.K=K;4.1b=1b;4.1M=J 3M().3J();4.1p=4.4a.1W(1c.6j(6k/4.q.4W),4);4.2k(\'3k\',4.L);5 4},1E:6(2E){7(!4.1p)5 4;4.1p=$4X(4.1p);7(!2E)4.2k(\'56\',4.L);5 4},6m:6(K,1b){5 4.12(K,1b)},6u:6(2E){5 4.1E(2E)}});1q.2h.2i(J 4y);1q.2h.2i(J 4F);1q.2h.2i(J 4p);1q.4J={5X:6(t,b,c,d){5 c*t/d+b},52:6(t,b,c,d){5-c/2*(1c.69(1c.6F*t/d)-1)+b}};1q.7b=1q.2h.I({1r:6(L,q){4.1B=[];4.L=$(L);4.11(\'3k\',6(){4.L.11(\'2l\',4.1E.m(4,v))}.m(4));4.1u(\'3d\',6(){4.L.1u(\'2l\',4.1E.m(4,v))}.m(4));4.3A(q)},34:6(){H(h i=0;i<2;i++)4.1B[i]=4.3a(4.K[i],4.1b[i])},1z:6(x,y){7(4.1p&&4.q.35)5 4;h 9=4.L.3c();h 1f={\'x\':x,\'y\':y};H(h z 14 9.2q){h 1o=9.3q[z]-9.2q[z];7($2e(1f[z]))1f[z]=($f(1f[z])==\'59\')?1c.1o(1c.2g(1f[z],1o),0):1o;M 1f[z]=9.2j[z]}5 4.12([9.2j.x,9.2j.y],[1f.x,1f.y])},5J:6(){5 4.1z(v,0)},5K:6(){5 4.1z(v,\'4u\')},5Q:6(){5 4.1z(0,v)},5z:6(){5 4.1z(\'4u\',v)},4n:6(9){5 4.1z($(9).4w(),$(9).4C())},2M:6(){4.L.1z(4.1B[0],4.1B[1])}});',62,456,'||||this|return|function|if||el||||||type||var|||property|event|bind|fn|events||options|args|||document|false||||||arguments|length||prototype|obj|window|for|extend|new|from|element|else|style|test|Class|case|Array||className|true|push|each|keys|value|||addEvent|start||in|array||documentElement|Element|properties|source|to|Math|elements|opacity|values|current|rgb|null|break|call|delay|create|match|max|timer|Fx|initialize|Object|switch|removeEvent|left|returns|previous|name|scrollTo|parentNode|now|chains|selector|stop|text|Garbage|top|hex|checker|newArray|apply|time|empty|removeEvents|item|replace|while|Elements|overflown|results|key|periodical|khtml|scrollLeft|ie|instance|Event|toLowerCase|scrollTop|string|getStyle|HTMLElement||join|every|option|items|instances|target|chk|getPosition|min|Base|implement|scroll|fireEvent|mousewheel|currentStyle|rgbToHex|indexOf|collect|size|pos|attempt|ms|visibility|pr0t0typ3|bit|forEach|relatedTarget|scrollHeight|body|stopPropagation|setProperty|whitespace|end|attribute|appendChild|regex|klass|inject|getTag|preventDefault|increase|scrollWidth|code|String|parseInt|typeof|pageX|hexToRgb|pageY|object|charAt|height|hasClass|getBrother|hidden|getNext||opt|setNow|wait|ie6||||compute|clean|getSize|onComplete|what|splice|filter|gecko|htmlElement|Native|onStart|position|width|DOMMouseScroll|parseFloat|Function|scrollSize|offsetWidth|camelCase|offsetHeight|remove|duration|on|right|opera|insertBefore|parent|px|getOptions|Multi|setOptions|undefined|where|_elements_extended_|removeClass|getTime|getElementsBySelector|Sibling|Date|bottom|before|transition|cTime|check|callChain|selectedIndex|replaceWith|getScrollHeight|default|getScrollLeft|getScrollTop|getScrollWidth||createElement|childNodes|getHeight|setStyles|getWidth||pageYOffset|contents|clientHeight|step|parentize|after|tagName|inside|pageXOffset|RegExp|class|noinit|clientWidth|_element_extended_|which|clientY|toElement|capitalize|Options|clientX|cssText|shift|setOpacity|full|hyphenate|getLeft|trim|Chain|params|addEventListener|iterable|getTop|some|setStyle|Events|toUpperCase|map|Number|Transitions|err|random|catch|try|addClass|defaults|nodeType|visible|copy|evType|trash|picked|fps|clear|120|toInt||toFloat|sineInOut|wheelDelta|defaultView|removeEventListener|onCancel|hasLayout|toggleClass|number|script|createTextNode|zoom|setTimeout|getBoxObjectFor|taintEnabled|navigator|all|execCommand|BackgroundImageCache|transparent|slice|associate|ie7|XMLHttpRequest|textnode|nodeValue|nodeName|Window|pick|floor|ActiveXObject|clearInterval|clearTimeout|toString|toRight|adopt|injectInside|injectAfter|injectBefore|removeChild|clone|appendText|replaceChild|cloneNode|toTop|toBottom|pass|setInterval|concat|bindAsEventListener|getElementById|toLeft|getElementsByTagName|embed|styleSheet|attributes|mouse|fromCharCode|linear|keyCode|click|page|mouseover|button|rightClick|client|detail|wheel|shiftKey|srcElement|cos|unload|control|ctrlKey|metaKey|meta|altKey|alpha|fromElement|mouseout|round|1000|clearChain|custom|Group|set|500|unit|innerHeight|innerWidth|chain|clearTimer|up|enter|returnValue|cancelBubble|down|esc|bindWithEvent|delete|backspace|space|PI|alt|auto|setHTML|offset|color|innerHTML|getProperty|getValue|getAttribute|getFirst|setProperties|setAttribute|detachEvent|lastChild|getPrevious|getLast|previousSibling|getParent|attachEvent|getChildren|addEvents|nextSibling|select|offsetParent|offsetTop|getComputedStyle|firstChild|getCoordinates|padding|100|margin|Scroll|next|offsetLeft|radio|checkbox|checked|input|password|textarea|do|getPropertyValue'.split('|'),0,{}))
View
181 site/.svn/text-base/p.js.svn-base
@@ -1,181 +0,0 @@
-
-var Prototype={Version:'1.5.0_rc2',BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:'(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}}
-var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
-var Abstract=new Object();Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];}
-return destination;}
-Object.extend(Object,{inspect:function(object){try{if(object===undefined)return'undefined';if(object===null)return'null';return object.inspect?object.inspect():object.toString();}catch(e){if(e instanceof RangeError)return'...';throw e;}},keys:function(object){var keys=[];for(var property in object)
-keys.push(property);return keys;},values:function(object){var values=[];for(var property in object)
-values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);}});Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}}
-Function.prototype.bindAsEventListener=function(object){var __method=this,args=$A(arguments),object=args.shift();return function(event){return __method.apply(object,[(event||window.event)].concat(args).concat($A(arguments)));}}
-Object.extend(Number.prototype,{toColorPart:function(){var digits=this.toString(16);if(this<16)return'0'+digits;return digits;},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;}});var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
-return returnValue;}}
-var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this);}finally{this.currentlyExecuting=false;}}}}
-Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||'').toString();source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
-return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return this;},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var name=decodeURIComponent(pair[0]);var value=pair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!==undefined){if(hash[name].constructor!=Array)
-hash[name]=[hash[name]];if(value)hash[name].push(value);}
-else hash[name]=value;}
-return hash;});},toArray:function(){return this.split('');},camelize:function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,length=oStringList.length;i<length;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
-return camelizedString;},underscore:function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();},dasherize:function(){return this.gsub(/_/,'-');},inspect:function(useDoubleQuotes){var escapedString=this.replace(/\\/g,'\\\\');if(useDoubleQuotes)
-return'"'+escapedString.replace(/"/g,'\\"')+'"';else
-return"'"+escapedString.replace(/'/g,'\\\'')+"'";}});String.prototype.gsub.prepareReplacement=function(replacement){if(typeof replacement=='function')return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};}
-String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){return this.template.gsub(this.pattern,function(match){var before=match[1];if(before=='\\')return match[2];return before+(object[match[3]]||'').toString();});}}
-var $break=new Object();var $continue=new Object();var Enumerable={each:function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=$continue)throw e;}});}catch(e){if(e!=$break)throw e;}
-return this;},eachSlice:function(number,iterator){var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length)
-slices.push(array.slice(index,index+number));return slices.collect(iterator||Prototype.K);},all:function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||Prototype.K)(value,index);if(!result)throw $break;});return result;},any:function(iterator){var result=false;this.each(function(value,index){if(result=!!(iterator||Prototype.K)(value,index))
-throw $break;});return result;},collect:function(iterator){var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator){var results=[];this.each(function(value,index){if(iterator(value,index))
-results.push(value);});return results;},grep:function(pattern,iterator){var results=[];this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))
-results.push((iterator||Prototype.K)(value,index));})
-return results;},include:function(object){var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inGroupsOf:function(number,fillWith){fillWith=fillWith||null;var results=this.eachSlice(number);if(results.length>0)(number-results.last().length).times(function(){results.last().push(fillWith)});return results;},inject:function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.collect(function(value){return value[method].apply(value,args);});},max:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value>=result)
-result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value<result)
-result=value;});return result;},partition:function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||Prototype.K)(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;},reject:function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))
-results.push(value);});return results;},sortBy:function(iterator){return this.collect(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.collect(Prototype.K);},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(typeof args.last()=='function')
-iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}}
-Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0,length=iterable.length;i<length;i++)
-results.push(iterable[i]);return results;}}
-Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)
-Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++)
-iterator(this[i]);},clear:function(){this.length=0;return this;},first:function(){return this[0];},last:function(){return this[this.length-1];},compact:function(){return this.select(function(value){return value!=undefined||value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(value&&value.constructor==Array?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},indexOf:function(object){for(var i=0,length=this.length;i<length;i++)
-if(this[i]==object)return i;return-1;},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(){return this.inject([],function(array,value){return array.include(value)?array:array.concat([value]);});},clone:function(){return[].concat(this);},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';}});Array.prototype.toArray=Array.prototype.clone;if(window.opera){Array.prototype.concat=function(){var array=[];for(var i=0,length=this.length;i<length;i++)array.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(arguments[i].constructor==Array){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++)
-array.push(arguments[i][j]);}else{array.push(arguments[i]);}}
-return array;}}
-var Hash={_each:function(iterator){for(var key in this){var value=this[key];if(typeof value=='function')continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},merge:function(hash){return $H(hash).inject(this,function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});},toQueryString:function(){return this.map(function(pair){if(!pair.key)return null;if(pair.value&&pair.value.constructor==Array){pair.value=pair.value.compact();if(pair.value.length<2){pair.value=pair.value.reduce();}else{var key=encodeURIComponent(pair.key);return pair.value.map(function(value){return key+'='+encodeURIComponent(value);}).join('&');}}
-if(pair.value==undefined)pair[1]='';return pair.map(encodeURIComponent).join('=');}).join('&');},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';}}
-function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;}
-ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}},include:function(value){if(value<this.start)
-return false;if(this.exclusive)
-return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
-var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0}
-Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
-this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:''}
-Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();this.options.parameters=$H(typeof this.options.parameters=='string'?this.options.parameters.toQueryParams():this.options.parameters);}}
-Ajax.Request=Class.create();Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var params=this.options.parameters;if(params.any())params['_']='';if(!['get','post'].include(this.options.method)){params['_method']=this.options.method;this.options.method='post';}
-this.url=url;if(this.options.method=='get'&&params.any())
-this.url+=(this.url.indexOf('?')>=0?'&':'?')+
-params.toQueryString();try{Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method.toUpperCase(),this.url,this.options.asynchronous,this.options.username,this.options.password);if(this.options.asynchronous)
-setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var body=this.options.method=='post'?(this.options.postBody||params.toQueryString()):null;this.transport.send(body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
-this.onStateChange();}
-catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
-this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.options.method=='post'){headers['Content-type']=this.options.contentType+
-(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
-headers['Connection']='close';}
-if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(typeof extras.push=='function')
-for(var i=0,length=extras.length;i<length;i+=2)
-headers[extras[i]]=extras[i+1];else
-$H(extras).each(function(pair){headers[pair.key]=pair.value});}
-for(var name in headers)
-this.transport.setRequestHeader(name,headers[name]);},success:function(){return!this.transport.status||(this.transport.status>=200&&this.transport.status<300);},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(state=='Complete'){try{this._complete=true;(this.options['on'+this.transport.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);}}
-try{(this.options['on'+state]||Prototype.emptyFunction)(transport,json);Ajax.Responders.dispatch('on'+state,this,transport,json);}catch(e){this.dispatchException(e);}
-if(state=='Complete'){if((this.getHeader('Content-type')||'').strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
-this.evalResponse();this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},evalJSON:function(){try{var json=this.getHeader('X-JSON');return json?eval('('+json+')'):null;}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))}
-this.transport=Ajax.getTransport();this.setOptions(options);var onComplete=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(transport,param){this.updateContent();onComplete(transport,param);}).bind(this);this.request(url);},updateContent:function(){var receiver=this.container[this.success()?'success':'failure'];var response=this.transport.responseText;if(!this.options.evalScripts)response=response.stripScripts();if(receiver=$(receiver)){if(this.options.insertion)
-new this.options.insertion(receiver,response);else
-receiver.update(response);}
-if(this.success()){if(this.onComplete)
-setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(container,url,options){this.setOptions(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(request){if(this.options.decay){this.decay=(request.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=request.responseText;}
-this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
-elements.push($(arguments[i]));return elements;}
-if(typeof element=='string')
-element=document.getElementById(element);return Element.extend(element);}
-if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
-results.push(query.snapshotItem(i));return results;}}
-document.getElementsByClassName=function(className,parentElement){if(Prototype.BrowserFeatures.XPath){var q=".//*[contains(concat(' ', @class, ' '), ' "+className+" ')]";return document._getElementsByXPath(q,parentElement);}else{var children=($(parentElement)||document.body).getElementsByTagName('*');var elements=[],child;for(var i=0,length=children.length;i<length;i++){child=children[i];if(Element.hasClassName(child,className))
-elements.push(Element.extend(child));}
-return elements;}}
-if(!window.Element)
-var Element=new Object();Element.extend=function(element){if(!element)return;if(_nativeExtensions||element.nodeType==3)return element;if(!element._extended&&element.tagName&&element!=window){var methods=Object.clone(Element.Methods),cache=Element.extend.cache;if(element.tagName=='FORM')
-Object.extend(methods,Form.Methods);if(['INPUT','TEXTAREA','SELECT'].include(element.tagName))
-Object.extend(methods,Form.Element.Methods);Object.extend(methods,Element.Methods.Simulated);for(var property in methods){var value=methods[property];if(typeof value=='function'&&!(property in element))
-element[property]=cache.findOrStore(value);}}
-element._extended=true;return element;}
-Element.extend.cache={findOrStore:function(value){return this[value]=this[value]||function(){return value.apply(null,[this].concat($A(arguments)));}}}
-Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,html){html=typeof html=='undefined'?'':html.toString();$(element).innerHTML=html.stripScripts();setTimeout(function(){html.evalScripts()},10);return element;},replace:function(element,html){element=$(element);if(element.outerHTML){element.outerHTML=html.stripScripts();}else{var range=element.ownerDocument.createRange();range.selectNodeContents(element);element.parentNode.replaceChild(range.createContextualFragment(html.stripScripts()),element);}
-setTimeout(function(){html.evalScripts()},10);return element;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property])
-if(element.nodeType==1)
-elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){element=$(element);return $A(element.getElementsByTagName('*'));},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){element=$(element);if(typeof selector=='string')
-selector=new Selector(selector);return selector.match(element);},up:function(element,expression,index){return Selector.findElement($(element).ancestors(),expression,index);},down:function(element,expression,index){return Selector.findElement($(element).descendants(),expression,index);},previous:function(element,expression,index){return Selector.findElement($(element).previousSiblings(),expression,index);},next:function(element,expression,index){return Selector.findElement($(element).nextSiblings(),expression,index);},getElementsBySelector:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},getElementsByClassName:function(element,className){element=$(element);return document.getElementsByClassName(className,element);},readAttribute:function(element,name){return $(element).getAttribute(name);},getHeight:function(element){element=$(element);return element.offsetHeight;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;if(elementClassName.length==0)return false;if(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))
-return true;return false;},addClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).add(className);return element;},removeClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).remove(className);return element;},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first();},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
-element.removeChild(node);node=nextNode;}
-return element;},empty:function(element){return $(element).innerHTML.match(/^\s*$/);},childOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);while(element=element.parentNode)
-if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);return element;},getStyle:function(element,style){element=$(element);var inline=(style=='float'?(typeof element.style.styleFloat!='undefined'?'styleFloat':'cssFloat'):style);var value=element.style[inline.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[inline.camelize()];}}
-if((value=='auto')&&['width','height'].include(style)&&(element.getStyle('display')!='none'))
-value=element['offset'+style.charAt(0).toUpperCase()+style.substring(1)]+'px';if(window.opera&&['left','top','right','bottom'].include(style))
-if(Element.getStyle(element,'position')=='static')value='auto';return value=='auto'?null:value;},setStyle:function(element,style){element=$(element);for(var name in style)
-element.style[(name=='float'?((typeof element.style.styleFloat!='undefined')?'styleFloat':'cssFloat'):name).camelize()]=style[name];return element;},getDimensions:function(element){element=$(element);if(Element.getStyle(element,'display')!='none')
-return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display='none';els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}}
-return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
-return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=element.style.overflow||'auto';if((Element.getStyle(element,'overflow')||'visible')!='hidden')
-element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;}}
-Element.Methods.Simulated={hasAttribute:function(element,attribute){return $(element).getAttributeNode(attribute).specified;}}
-if(document.all){Element.Methods.update=function(element,html){element=$(element);html=typeof html=='undefined'?'':html.toString();var tagName=element.tagName.toUpperCase();if(['THEAD','TBODY','TR','TD'].include(tagName)){var div=document.createElement('div');switch(tagName){case'THEAD':case'TBODY':div.innerHTML='<table><tbody>'+html.stripScripts()+'</tbody></table>';depth=2;break;case'TR':div.innerHTML='<table><tbody><tr>'+html.stripScripts()+'</tr></tbody></table>';depth=3;break;case'TD':div.innerHTML='<table><tbody><tr><td>'+html.stripScripts()+'</td></tr></tbody></table>';depth=4;}
-$A(element.childNodes).each(function(node){element.removeChild(node)});depth.times(function(){div=div.firstChild});$A(div.childNodes).each(function(node){element.appendChild(node)});}else{element.innerHTML=html.stripScripts();}
-setTimeout(function(){html.evalScripts()},10);return element;}}
-Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
-['','Form','Input','TextArea','Select'].each(function(tag){var className='HTML'+tag+'Element';if(window[className])return;var klass=window[className]={};klass.prototype=document.createElement(tag?tag.toLowerCase():'div').__proto__;});Element.addMethods=function(methods){Object.extend(Element.Methods,methods||{});function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;var cache=Element.extend.cache;for(var property in methods){var value=methods[property];if(!onlyIfAbsent||!(property in destination))
-destination[property]=cache.findOrStore(value);}}
-if(typeof HTMLElement!='undefined'){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(klass){copy(Form.Element.Methods,klass.prototype);});_nativeExtensions=true;}}
-var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(adjacency){this.adjacency=adjacency;}
-Abstract.Insertion.prototype={initialize:function(element,content){this.element=$(element);this.content=content.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(e){var tagName=this.element.tagName.toUpperCase();if(['TBODY','TR'].include(tagName)){this.insertContent(this.contentFromAnonymousTable());}else{throw e;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange)this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)]);}
-setTimeout(function(){content.evalScripts()},10);},contentFromAnonymousTable:function(){var div=document.createElement('div');div.innerHTML='<table><tbody>'+this.content+'</tbody></table>';return $A(div.childNodes[0].childNodes[0].childNodes);}}
-var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.setStartBefore(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element);}).bind(this));}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true);},insertContent:function(fragments){fragments.reverse(false).each((function(fragment){this.element.insertBefore(fragment,this.element.firstChild);}).bind(this));}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.appendChild(fragment);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}}
-Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(expression){this.params={classNames:[]};this.expression=expression.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function abort(message){throw'Parse error in selector: '+message;}
-if(this.expression=='')abort('empty expression');var params=this.params,expr=this.expression,match,modifier,clause,rest;while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){params.attributes=params.attributes||[];params.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||''});expr=match[1];}
-if(expr=='*')return this.params.wildcard=true;while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){modifier=match[1],clause=match[2],rest=match[3];switch(modifier){case'#':params.id=clause;break;case'.':params.classNames.push(clause);break;case'':case undefined:params.tagName=clause.toUpperCase();break;default:abort(expr.inspect());}
-expr=rest;}
-if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){var params=this.params,conditions=[],clause;if(params.wildcard)
-conditions.push('true');if(clause=params.id)
-conditions.push('element.id == '+clause.inspect());if(clause=params.tagName)
-conditions.push('element.tagName.toUpperCase() == '+clause.inspect());if((clause=params.classNames).length>0)
-for(var i=0,length=clause.length;i<length;i++)
-conditions.push('Element.hasClassName(element, '+clause[i].inspect()+')');if(clause=params.attributes){clause.each(function(attribute){var value='element.getAttribute('+attribute.name.inspect()+')';var splitValueBy=function(delimiter){return value+' && '+value+'.split('+delimiter.inspect()+')';}
-switch(attribute.operator){case'=':conditions.push(value+' == '+attribute.value.inspect());break;case'~=':conditions.push(splitValueBy(' ')+'.include('+attribute.value.inspect()+')');break;case'|=':conditions.push(splitValueBy('-')+'.first().toUpperCase() == '+attribute.value.toUpperCase().inspect());break;case'!=':conditions.push(value+' != '+attribute.value.inspect());break;case'':case undefined:conditions.push(value+' != null');break;default:throw'Unknown operator '+attribute.operator+' in selector';}});}
-return conditions.join(' && ');},compileMatcher:function(){this.match=new Function('element','if (!element.tagName) return false; \
- return '+this.buildMatchExpression());},findElements:function(scope){var element;if(element=$(this.params.id))
-if(this.match(element))
-if(!scope||Element.childOf(element,scope))
-return[element];scope=(scope||document).getElementsByTagName(this.params.tagName||'*');var results=[];for(var i=0,length=scope.length;i<length;i++)
-if(this.match(element=scope[i]))
-results.push(Element.extend(element));return results;},toString:function(){return this.expression;}}
-Object.extend(Selector,{matchElements:function(elements,expression){var selector=new Selector(expression);return elements.select(selector.match.bind(selector)).collect(Element.extend);},findElement:function(elements,expression,index){if(typeof expression=='number')index=expression,expression=false;return Selector.matchElements(elements,expression||'*')[index||0];},findChildElements:function(element,expressions){return expressions.map(function(expression){return expression.strip().split(/\s+/).inject([null],function(results,expr){var selector=new Selector(expr);return results.inject([],function(elements,result){return elements.concat(selector.findElements(result||element));});});}).flatten();}});function $$(){return Selector.findChildElements(document,$A(arguments));}
-var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(elements){return elements.inject([],function(queryComponents,element){var queryComponent=Form.Element.serialize(element);if(queryComponent)queryComponents.push(queryComponent);return queryComponents;}).join('&');}};Form.Methods={serialize:function(form){return Form.serializeElements($(form).getElements());},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()])
-elements.push(Element.extend(child));return elements;});},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)
-return inputs;var matchingInputs=new Array();for(var i=0,length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
-continue;matchingInputs.push(Element.extend(input));}
-return matchingInputs;},disable:function(form){form=$(form);form.getElements().each(function(element){element.blur();element.disabled='true';});return form;},enable:function(form){form=$(form);form.getElements().each(function(element){element.disabled='';});return form;},findFirstElement:function(form){return $(form).getElements().find(function(element){return element.type!='hidden'&&!element.disabled&&['input','select','textarea'].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;}}
-Object.extend(Form,Form.Methods);Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}}
-Form.Element.Methods={serialize:function(element){element=$(element);if(element.disabled)return'';var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter){var key=encodeURIComponent(parameter[0]);if(key.length==0)return;if(parameter[1].constructor!=Array)
-parameter[1]=[parameter[1]];return parameter[1].map(function(value){return key+'='+encodeURIComponent(value);}).join('&');}},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter)
-return parameter[1];},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type)))
-element.select();return element;},disable:function(element){element=$(element);element.disabled=true;return element;},enable:function(element){element=$(element);element.blur();element.disabled=false;return element;}}
-Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element;Form.Element.Serializers={input:function(element){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element);default:return Form.Element.Serializers.textarea(element);}
-return false;},inputSelector:function(element){if(element.checked)
-return[element.name,element.value];},textarea:function(element){return[element.name,element.value];},select:function(element){return Form.Element.Serializers[element.type=='select-one'?'selectOne':'selectMany'](element);},selectOne:function(element){var value='',opt,index=element.selectedIndex;if(index>=0){opt=Element.extend(element.options[index]);value=opt.hasAttribute('value')?opt.value:opt.text;}
-return[element.name,value];},selectMany:function(element){var value=[];for(var i=0,length=element.length;i<length;i++){var opt=Element.extend(element.options[i]);if(opt.selected)
-value.push(opt.hasAttribute('value')?opt.value:opt.text);}
-return[element.name,value];}}
-var $F=Form.Element.getValue;Abstract.TimedObserver=function(){}
-Abstract.TimedObserver.prototype={initialize:function(element,frequency,callback){this.frequency=frequency;this.element=$(element);this.callback=callback;this.lastValue=this.getValue();this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}}}
-Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=function(){}
-Abstract.EventObserver.prototype={initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
-this.registerFormCallbacks();else
-this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this));},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}}
-Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element);}});if(!window.Event){var Event=new Object();}
-Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},pointerX:function(event){return event.pageX||(event.clientX+
-(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(event){return event.pageY||(event.clientY+
-(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))
-element=element.parentNode;return element;},observers:false,_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer);}},unloadCache:function(){if(!Event.observers)return;for(var i=0,length=Event.observers.length;i<length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}
-Event.observers=false;},observe:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))
-name='keydown';Event._observeAndCache(element,name,observer,useCapture);},stopObserving:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))
-name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){try{element.detachEvent('on'+name,observer);}catch(e){}}}});if(navigator.appVersion.match(/\bMSIE\b/))
-Event.observe(window,'unload',Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},realOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return[valueL,valueT];},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName=='BODY')break;var p=Element.getStyle(element,'position');if(p=='relative'||p=='absolute')break;}}while(element);return[valueL,valueT];},offsetParent:function(element){if(element.offsetParent)return element.offsetParent;if(element==document.body)return element;while((element=element.parentNode)&&element!=document.body)
-if(Element.getStyle(element,'position')!='static')
-return element;return document.body;},within:function(element,x,y){if(this.includeScrollOffsets)
-return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=this.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=this.realOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=this.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
-return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
-return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},page:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
-if(Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!window.opera||element.tagName=='BODY'){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return[valueL,valueT];},clone:function(source,target){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{})
-source=$(source);var p=Position.page(source);target=$(target);var delta=[0,0];var parent=null;if(Element.getStyle(target,'position')=='absolute'){parent=Position.offsetParent(target);delta=Position.page(parent);}
-if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
-if(options.setLeft)target.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)target.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)target.style.width=source.offsetWidth+'px';if(options.setHeight)target.style.height=source.offsetHeight+'px';},absolutize:function(element){element=$(element);if(element.style.position=='absolute')return;Position.prepare();var offsets=Position.positionedOffset(element);var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';;element.style.left=left+'px';;element.style.width=width+'px';;element.style.height=height+'px';;},relativize:function(element){element=$(element);if(element.style.position=='relative')return;Position.prepare();element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;}}
-if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
-if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return[valueL,valueT];}}
-Element.addMethods();
View
BIN  site/.svn/text-base/spinner.gif.svn-base
Binary file not shown
View
159 site/.svn/text-base/style.css.svn-base
@@ -1,159 +0,0 @@
-body {
- font-family:verdana, arial, helvetica, sans-serif;
- background-color:#FFFFFF;
- font-weight: normal;
- font-size: 8pt;
- line-height: 125%;
- color: gray;
-}
-* {
- margin: 0px;
- padding: 0px;
-}
-html {
- height:100%;
- margin-bottom:1px;
-}
-#container {
- width: 80%;
- margin-right: auto;
- margin-left: auto;
- text-align: left;
- background-color: #FFFFFF;
-}
-#header {
- width:100%;
- padding-top:15px;
-}
-#header img {
- padding-bottom:10px;
-}
-.spacer {
- width:100%;
- height:15px;
-}
-hr {
- border:0px;
- color:#CCCCCC;
- background-color:#CDCDCD;
- height: 1px;
- width: 100%;
- text-align: left;
-}
-h1 {
- font-size:28px;
- color:#cc0000;
- background-color:#FFFFFF;
- font-family:Arial, Verdana, Helvetica, sans-serif;
- font-weight:300;
-}
-h2 {
- font-size:15px;
- color:gray;
- font-family:Arial, Verdana, Helvetica, sans-serif;
- font-weight:300;
- background-color:#FFFFFF;
-}
-h3 {
- color:#8cc110;
- font-size:15px;
- text-align:left;
- font-weight:300;
- padding:5px;
- margin-top:5px;
-}
-
-#left {
- float:left;
- width:200px;
- background-color:#FFFFFF;
-}
-
-#main {
- margin: 0 5px 5px 210px;
- padding: 0 15px;
- border-left: 1px solid silver;
-}
-p {
- background-color:#FFFFFF;
- line-height:20px;
- padding:5px;
-}
-a {
- color:#689a0d;
- background-color:#FFFFFF;
- text-decoration: none;
-}
-a:hover {
- color:#FF0066;
- background-color:#FFFFFF;
- text-decoration: underline;
-}
-#footer {
- clear:both;
- font-size:12px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
-}
-.right {
- color:gray;
- background-color:#FFFFFF;
- float:right;
- font-size:100%;
- margin-top:5px;
-}
-.left {
- color:gray;
- background-color:#FFFFFF;
- float:left;
- font-size:100%;
- margin-top:5px;
-}
-#left a:link, #left a:visited {
- color: gray;
-}
-#left a:hover {
- color:#FF0066;
- text-decoration: underline;
-}
-ul {
- list-style-type: none;
- padding-bottom: 10px;
-}
-li {
- padding: 5px 0 0 10px;
-}
-
-span.code {
- font-family: courier;
- padding: 1px;
- background: #e9e9e9;
- color: #2d2d2d;
-}
-
-pre {
- border: 1px solid #e1e1e1;
- margin-bottom: 15px;
- color: #000;
- background: #f9f9f9;
- overflow: auto;
- padding: 5px;
-}
-
-.normal {}
-.comment { color: #005; font-style: italic; }
-.keyword { color: #C71585; font-weight: bold; }
-.method { color: #077; }
-.class { color: #074; }
-.module { color: #050; }
-.punct { color: #447; font-weight: bold; }
-.symbol { color: #099; }
-.string { color: #6600CC; background: #FFE; }
-.char { color: #F07; }
-.ident { color: #004; }
-.constant { color: #07F; }
-.regex { color: #B66; background: #FEF; }
-.number { color: #F99; }
-.attribute { color: #7BB; }
-.global { color: #7FB; }
-.expr { color: #227; }
-.escape { color: #277; }
View
6 site/.svn/text-base/try.html.svn-base
@@ -1,6 +0,0 @@
-<html>
- <head><title>try mofo! (in your browser)</title></head>
- <frameset cols="*">
- <frame src="http://errtheblog.com/trymofo" />
- </frameset>
-</html>
View
89 site/try/.svn/entries
@@ -1,89 +0,0 @@
-8
-
-dir
-354
-svn+ssh://chris@errtheblog.com/svn/projects/mofo/site/try
-svn+ssh://chris@errtheblog.com/svn/projects
-
-
-
-2007-06-15T02:35:16.102198Z
-146
-chris
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-cf301c5b-d72e-0410-996c-ed4829982077
-
-trymofo.rb
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-786af52a2e25ded521993e39fbc02b49
-2007-06-15T02:35:16.102198Z
-146
-chris
-
-spinner.gif
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-3eeda6663cf508817f5c3648a5cbf57e
-2007-05-09T11:35:55.712272Z
-66
-chris
-has-props
-
-index.html
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-c0f298781f473acc7b31533ef8d9cff0
-2007-05-09T20:01:47.560615Z
-77
-chris
-
-p.js
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-df2bce95b93614a2ed12fb49d69020c1
-2007-05-09T11:26:55.564366Z
-65
-chris
-
-template.html
-file
-
-
-
-
-2007-11-19T21:58:50.000000Z
-cfc260e3471b8d8224de4a66442db0bc
-2007-05-09T20:05:14.707752Z
-78
-chris
-
View
1  site/try/.svn/format
@@ -1 +0,0 @@
-8
View
5 site/try/.svn/prop-base/spinner.gif.svn-base
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
View
6 site/try/.svn/text-base/index.html.svn-base
@@ -1,6 +0,0 @@
-<html>
- <head><title>try mofo! (in your browser)</title></head>
- <frameset cols="*">
- <frame src="http://errtheblog.com/trymofo" />
- </frameset>
-</html>
View
181 site/try/.svn/text-base/p.js.svn-base
@@ -1,181 +0,0 @@
-
-var Prototype={Version:'1.5.0_rc2',BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:'(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',emptyFunction:function(){},K:function(x){return x}}
-var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
-var Abstract=new Object();Object.extend=function(destination,source){for(var property in source){destination[property]=source[property];}
-return destination;}
-Object.extend(Object,{inspect:function(object){try{if(object===undefined)return'undefined';if(object===null)return'null';return object.inspect?object.inspect():object.toString();}catch(e){if(e instanceof RangeError)return'...';throw e;}},keys:function(object){var keys=[];for(var property in object)
-keys.push(property);return keys;},values:function(object){var values=[];for(var property in object)
-values.push(object[property]);return values;},clone:function(object){return Object.extend({},object);}});Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)));}}
-Function.prototype.bindAsEventListener=function(object){var __method=this,args=$A(arguments),object=args.shift();return function(event){return __method.apply(object,[(event||window.event)].concat(args).concat($A(arguments)));}}
-Object.extend(Number.prototype,{toColorPart:function(){var digits=this.toString(16);if(this<16)return'0'+digits;return digits;},succ:function(){return this+1;},times:function(iterator){$R(0,this,true).each(iterator);return this;}});var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
-return returnValue;}}
-var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this);}finally{this.currentlyExecuting=false;}}}}
-Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||'').toString();source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
-return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return this;},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject('',function(memo,node){return memo+node.nodeValue}):div.childNodes[0].nodeValue):'';},toQueryParams:function(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var name=decodeURIComponent(pair[0]);var value=pair[1]?decodeURIComponent(pair[1]):undefined;if(hash[name]!==undefined){if(hash[name].constructor!=Array)
-hash[name]=[hash[name]];if(value)hash[name].push(value);}
-else hash[name]=value;}
-return hash;});},toArray:function(){return this.split('');},camelize:function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,length=oStringList.length;i<length;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
-return camelizedString;},underscore:function(){return this.gsub(/::/,'/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();},dasherize:function(){return this.gsub(/_/,'-');},inspect:function(useDoubleQuotes){var escapedString=this.replace(/\\/g,'\\\\');if(useDoubleQuotes)
-return'"'+escapedString.replace(/"/g,'\\"')+'"';else
-return"'"+escapedString.replace(/'/g,'\\\'')+"'";}});String.prototype.gsub.prepareReplacement=function(replacement){if(typeof replacement=='function')return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};}
-String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){return this.template.gsub(this.pattern,function(match){var before=match[1];if(before=='\\')return match[2];return before+(object[match[3]]||'').toString();});}}
-var $break=new Object();var $continue=new Object();var Enumerable={each:function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=$continue)throw e;}});}catch(e){if(e!=$break)throw e;}
-return this;},eachSlice:function(number,iterator){var index=-number,slices=[],array=this.toArray();while((index+=number)<array.length)
-slices.push(array.slice(index,index+number));return slices.collect(iterator||Prototype.K);},all:function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||Prototype.K)(value,index);if(!result)throw $break;});return result;},any:function(iterator){var result=false;this.each(function(value,index){if(result=!!(iterator||Prototype.K)(value,index))
-throw $break;});return result;},collect:function(iterator){var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator){var results=[];this.each(function(value,index){if(iterator(value,index))
-results.push(value);});return results;},grep:function(pattern,iterator){var results=[];this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))
-results.push((iterator||Prototype.K)(value,index));})
-return results;},include:function(object){var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inGroupsOf:function(number,fillWith){fillWith=fillWith||null;var results=this.eachSlice(number);if(results.length>0)(number-results.last().length).times(function(){results.last().push(fillWith)});return results;},inject:function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.collect(function(value){return value[method].apply(value,args);});},max:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value>=result)
-result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(result==undefined||value<result)
-result=value;});return result;},partition:function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||Prototype.K)(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;},reject:function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))
-results.push(value);});return results;},sortBy:function(iterator){return this.collect(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.collect(Prototype.K);},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(typeof args.last()=='function')
-iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}}
-Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(iterable){if(!iterable)return[];if(iterable.toArray){return iterable.toArray();}else{var results=[];for(var i=0,length=iterable.length;i<length;i++)
-results.push(iterable[i]);return results;}}
-Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)
-Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0,length=this.length;i<length;i++)
-iterator(this[i]);},clear:function(){this.length=0;return this;},first:function(){return this[0];},last:function(){return this[this.length-1];},compact:function(){return this.select(function(value){return value!=undefined||value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(value&&value.constructor==Array?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},indexOf:function(object){for(var i=0,length=this.length;i<length;i++)
-if(this[i]==object)return i;return-1;},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},reduce:function(){return this.length>1?this:this[0];},uniq:function(){return this.inject([],function(array,value){return array.include(value)?array:array.concat([value]);});},clone:function(){return[].concat(this);},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';}});Array.prototype.toArray=Array.prototype.clone;if(window.opera){Array.prototype.concat=function(){var array=[];for(var i=0,length=this.length;i<length;i++)array.push(this[i]);for(var i=0,length=arguments.length;i<length;i++){if(arguments[i].constructor==Array){for(var j=0,arrayLength=arguments[i].length;j<arrayLength;j++)
-array.push(arguments[i][j]);}else{array.push(arguments[i]);}}
-return array;}}
-var Hash={_each:function(iterator){for(var key in this){var value=this[key];if(typeof value=='function')continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},merge:function(hash){return $H(hash).inject(this,function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});},toQueryString:function(){return this.map(function(pair){if(!pair.key)return null;if(pair.value&&pair.value.constructor==Array){pair.value=pair.value.compact();if(pair.value.length<2){pair.value=pair.value.reduce();}else{var key=encodeURIComponent(pair.key);return pair.value.map(function(value){return key+'='+encodeURIComponent(value);}).join('&');}}
-if(pair.value==undefined)pair[1]='';return pair.map(encodeURIComponent).join('=');}).join('&');},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';}}
-function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;}
-ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}},include:function(value){if(value<this.start)
-return false;if(this.exclusive)
-return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
-var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0}
-Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
-this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:''}
-Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();this.options.parameters=$H(typeof this.options.parameters=='string'?this.options.parameters.toQueryParams():this.options.parameters);}}
-Ajax.Request=Class.create();Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var params=this.options.parameters;if(params.any())params['_']='';if(!['get','post'].include(this.options.method)){params['_method']=this.options.method;this.options.method='post';}
-this.url=url;if(this.options.method=='get'&&params.any())
-this.url+=(this.url.indexOf('?')>=0?'&':'?')+
-params.toQueryString();try{Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method.toUpperCase(),this.url,this.options.asynchronous,this.options.username,this.options.password);if(this.options.asynchronous)
-setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var body=this.options.method=='post'?(this.options.postBody||params.toQueryString()):null;this.transport.send(body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
-this.onStateChange();}
-catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
-this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.options.method=='post'){headers['Content-type']=this.options.contentType+
-(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
-headers['Connection']='close';}
-if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(typeof extras.push=='function')
-for(var i=0,length=extras.length;i<length;i+=2)
-headers[extras[i]]=extras[i+1];else
-$H(extras).each(function(pair){headers[pair.key]=pair.value});}
-for(var name in headers)
-this.transport.setRequestHeader(name,headers[name]);},success:function(){return!this.transport.status||(this.transport.status>=200&&this.transport.status<300);},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(state=='Complete'){try{this._complete=true;(this.options['on'+this.transport.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);}}
-try{(this.options['on'+state]||Prototype.emptyFunction)(transport,json);Ajax.Responders.dispatch('on'+state,this,transport,json);}catch(e){this.dispatchException(e);}
-if(state=='Complete'){if((this.getHeader('Content-type')||'').strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
-this.evalResponse();this.transport.onreadystatechange=Prototype.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null}},evalJSON:function(){try{var json=this.getHeader('X-JSON');return json?eval('('+json+')'):null;}catch(e){return null}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))}
-this.transport=Ajax.getTransport();this.setOptions(options);var onComplete=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(transport,param){this.updateContent();onComplete(transport,param);}).bind(this);this.request(url);},updateContent:function(){var receiver=this.container[this.success()?'success':'failure'];var response=this.transport.responseText;if(!this.options.evalScripts)response=response.stripScripts();if(receiver=$(receiver)){if(this.options.insertion)
-new this.options.insertion(receiver,response);else
-receiver.update(response);}
-if(this.success()){if(this.onComplete)
-setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(container,url,options){this.setOptions(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(request){if(this.options.decay){this.decay=(request.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=request.responseText;}
-this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
-elements.push($(arguments[i]));return elements;}
-if(typeof element=='string')
-element=document.getElementById(element);return Element.extend(element);}
-if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
-results.push(query.snapshotItem(i));return results;}}
-document.getElementsByClassName=function(className,parentElement){if(Prototype.BrowserFeatures.XPath){var q=".//*[contains(concat(' ', @class, ' '), ' "+className+" ')]";return document._getElementsByXPath(q,parentElement);}else{var children=($(parentElement)||document.body).getElementsByTagName('*');var elements=[],child;for(var i=0,length=children.length;i<length;i++){child=children[i];if(Element.hasClassName(child,className))
-elements.push(Element.extend(child));}
-return elements;}}
-if(!window.Element)
-var Element=new Object();Element.extend=function(element){if(!element)return;if(_nativeExtensions||element.nodeType==3)return element;if(!element._extended&&element.tagName&&element!=window){var methods=Object.clone(Element.Methods),cache=Element.extend.cache;if(element.tagName=='FORM')
-Object.extend(methods,Form.Methods);if(['INPUT','TEXTAREA','SELECT'].include(element.tagName))
-Object.extend(methods,Form.Element.Methods);Object.extend(methods,Element.Methods.Simulated);for(var property in methods){var value=methods[property];if(typeof value=='function'&&!(property in element))
-element[property]=cache.findOrStore(value);}}
-element._extended=true;return element;}
-Element.extend.cache={findOrStore:function(value){return this[value]=this[value]||function(){return value.apply(null,[this].concat($A(arguments)));}}}
-Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){$(element).style.display='none';return element;},show:function(element){$(element).style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:function(element,html){html=typeof html=='undefined'?'':html.toString();$(element).innerHTML=html.stripScripts();setTimeout(function(){html.evalScripts()},10);return element;},replace:function(element,html){element=$(element);if(element.outerHTML){element.outerHTML=html.stripScripts();}else{var range=element.ownerDocument.createRange();range.selectNodeContents(element);element.parentNode.replaceChild(range.createContextualFragment(html.stripScripts()),element);}
-setTimeout(function(){html.evalScripts()},10);return element;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last();var value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property){element=$(element);var elements=[];while(element=element[property])
-if(element.nodeType==1)
-elements.push(Element.extend(element));return elements;},ancestors:function(element){return $(element).recursivelyCollect('parentNode');},descendants:function(element){element=$(element);return $A(element.getElementsByTagName('*'));},immediateDescendants:function(element){if(!(element=$(element).firstChild))return[];while(element&&element.nodeType!=1)element=element.nextSibling;if(element)return[element].concat($(element).nextSiblings());return[];},previousSiblings:function(element){return $(element).recursivelyCollect('previousSibling');},nextSiblings:function(element){return $(element).recursivelyCollect('nextSibling');},siblings:function(element){element=$(element);return element.previousSiblings().reverse().concat(element.nextSiblings());},match:function(element,selector){element=$(element);if(typeof selector=='string')
-selector=new Selector(selector);return selector.match(element);},up:function(element,expression,index){return Selector.findElement($(element).ancestors(),expression,index);},down:function(element,expression,index){return Selector.findElement($(element).descendants(),expression,index);},previous:function(element,expression,index){return Selector.findElement($(element).previousSiblings(),expression,index);},next:function(element,expression,index){return Selector.findElement($(element).nextSiblings(),expression,index);},getElementsBySelector:function(){var args=$A(arguments),element=$(args.shift());return Selector.findChildElements(element,args);},getElementsByClassName:function(element,className){element=$(element);return document.getElementsByClassName(className,element);},readAttribute:function(element,name){return $(element).getAttribute(name);},getHeight:function(element){element=$(element);return element.offsetHeight;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;if(elementClassName.length==0)return false;if(elementClassName==className||elementClassName.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))
-return true;return false;},addClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).add(className);return element;},removeClassName:function(element,className){if(!(element=$(element)))return;Element.classNames(element).remove(className);return element;},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first();},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first();},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
-element.removeChild(node);node=nextNode;}
-return element;},empty:function(element){return $(element).innerHTML.match(/^\s*$/);},childOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);while(element=element.parentNode)
-if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);return element;},getStyle:function(element,style){element=$(element);var inline=(style=='float'?(typeof element.style.styleFloat!='undefined'?'styleFloat':'cssFloat'):style);var value=element.style[inline.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[inline.camelize()];}}
-if((value=='auto')&&['width','height'].include(style)&&(element.getStyle('display')!='none'))
-value=element['offset'+style.charAt(0).toUpperCase()+style.substring(1)]+'px';if(window.opera&&['left','top','right','bottom'].include(style))
-if(Element.getStyle(element,'position')=='static')value='auto';return value=='auto'?null:value;},setStyle:function(element,style){element=$(element);for(var name in style)
-element.style[(name=='float'?((typeof element.style.styleFloat!='undefined')?'styleFloat':'cssFloat'):name).camelize()]=style[name];return element;},getDimensions:function(element){element=$(element);if(Element.getStyle(element,'display')!='none')
-return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display='none';els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}}
-return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
-return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=element.style.overflow||'auto';if((Element.getStyle(element,'overflow')||'visible')!='hidden')
-element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;}}
-Element.Methods.Simulated={hasAttribute:function(element,attribute){return $(element).getAttributeNode(attribute).specified;}}
-if(document.all){Element.Methods.update=function(element,html){element=$(element);html=typeof html=='undefined'?'':html.toString();var tagName=element.tagName.toUpperCase();if(['THEAD','TBODY','TR','TD'].include(tagName)){var div=document.createElement('div');switch(tagName){case'THEAD':case'TBODY':div.innerHTML='<table><tbody>'+html.stripScripts()+'</tbody></table>';depth=2;break;case'TR':div.innerHTML='<table><tbody><tr>'+html.stripScripts()+'</tr></tbody></table>';depth=3;break;case'TD':div.innerHTML='<table><tbody><tr><td>'+html.stripScripts()+'</td></tr></tbody></table>';depth=4;}
-$A(element.childNodes).each(function(node){element.removeChild(node)});depth.times(function(){div=div.firstChild});$A(div.childNodes).each(function(node){element.appendChild(node)});}else{element.innerHTML=html.stripScripts();}
-setTimeout(function(){html.evalScripts()},10);return element;}}
-Object.extend(Element,Element.Methods);var _nativeExtensions=false;if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
-['','Form','Input','TextArea','Select'].each(function(tag){var className='HTML'+tag+'Element';if(window[className])return;var klass=window[className]={};klass.prototype=document.createElement(tag?tag.toLowerCase():'div').__proto__;});Element.addMethods=function(methods){Object.extend(Element.Methods,methods||{});function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;var cache=Element.extend.cache;for(var property in methods){var value=methods[property];if(!onlyIfAbsent||!(property in destination))
-destination[property]=cache.findOrStore(value);}}
-if(typeof HTMLElement!='undefined'){copy(Element.Methods,HTMLElement.prototype);copy(Element.Methods.Simulated,HTMLElement.prototype,true);copy(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(klass){copy(Form.Element.Methods,klass.prototype);});_nativeExtensions=true;}}
-var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(adjacency){this.adjacency=adjacency;}
-Abstract.Insertion.prototype={initialize:function(element,content){this.element=$(element);this.content=content.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(e){var tagName=this.element.tagName.toUpperCase();if(['TBODY','TR'].include(tagName)){this.insertContent(this.contentFromAnonymousTable());}else{throw e;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange)this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)]);}
-setTimeout(function(){content.evalScripts()},10);},contentFromAnonymousTable:function(){var div=document.createElement('div');div.innerHTML='<table><tbody>'+this.content+'</tbody></table>';return $A(div.childNodes[0].childNodes[0].childNodes);}}
-var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.setStartBefore(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element);}).bind(this));}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true);},insertContent:function(fragments){fragments.reverse(false).each((function(fragment){this.element.insertBefore(fragment,this.element.firstChild);}).bind(this));}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.appendChild(fragment);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}}
-Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(expression){this.params={classNames:[]};this.expression=expression.toString().strip();this.parseExpression();this.compileMatcher();},parseExpression:function(){function abort(message){throw'Parse error in selector: '+message;}
-if(this.expression=='')abort('empty expression');var params=this.params,expr=this.expression,match,modifier,clause,rest;while(match=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){params.attributes=params.attributes||[];params.attributes.push({name:match[2],operator:match[3],value:match[4]||match[5]||''});expr=match[1];}
-if(expr=='*')return this.params.wildcard=true;while(match=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)){modifier=match[1],clause=match[2],rest=match[3];switch(modifier){case'#':params.id=clause;break;case'.':params.classNames.push(clause);break;case'':case undefined:params.tagName=clause.toUpperCase();break;default:abort(expr.inspect());}
-expr=rest;}
-if(expr.length>0)abort(expr.inspect());},buildMatchExpression:function(){var params=this.params,conditions=[],clause;if(params.wildcard)
-conditions.push('true');if(clause=params.id)
-conditions.push('element.id == '+clause.inspect());if(clause=params.tagName)
-conditions.push('element.tagName.toUpperCase() == '+clause.inspect());if((clause=params.classNames).length>0)
-for(var i=0,length=clause.length;i<length;i++)
-conditions.push('Element.hasClassName(element, '+clause[i].inspect()+')');if(clause=params.attributes){clause.each(function(attribute){var value='element.getAttribute('+attribute.name.inspect()+')';var splitValueBy=function(delimiter){return value+' && '+value+'.split('+delimiter.inspect()+')';}
-switch(attribute.operator){case'=':conditions.push(value+' == '+attribute.value.inspect());break;case'~=':conditions.push(splitValueBy(' ')+'.include('+attribute.value.inspect()+')');break;case'|=':conditions.push(splitValueBy('-')+'.first().toUpperCase() == '+attribute.value.toUpperCase().inspect());break;case'!=':conditions.push(value+' != '+attribute.value.inspect());break;case'':case undefined:conditions.push(value+' != null');break;default:throw'Unknown operator '+attribute.operator+' in selector';}});}
-return conditions.join(' && ');},compileMatcher:function(){this.match=new Function('element','if (!element.tagName) return false; \
- return '+this.buildMatchExpression());},findElements:function(scope){var element;if(element=$(this.params.id))
-if(this.match(element))
-if(!scope||Element.childOf(element,scope))
-return[element];scope=(scope||document).getElementsByTagName(this.params.tagName||'*');var results=[];for(var i=0,length=scope.length;i<length;i++)
-if(this.match(element=scope[i]))
-results.push(Element.extend(element));return results;},toString:function(){return this.expression;}}
-Object.extend(Selector,{matchElements:function(elements,expression){var selector=new Selector(expression);return elements.select(selector.match.bind(selector)).collect(Element.extend);},findElement:function(elements,expression,index){if(typeof expression=='number')index=expression,expression=false;return Selector.matchElements(elements,expression||'*')[index||0];},findChildElements:function(element,expressions){return expressions.map(function(expression){return expression.strip().split(/\s+/).inject([null],function(results,expr){var selector=new Selector(expr);return results.inject([],function(elements,result){return elements.concat(selector.findElements(result||element));});});}).flatten();}});function $$(){return Selector.findChildElements(document,$A(arguments));}
-var Form={reset:function(form){$(form).reset();return form;},serializeElements:function(elements){return elements.inject([],function(queryComponents,element){var queryComponent=Form.Element.serialize(element);if(queryComponent)queryComponents.push(queryComponent);return queryComponents;}).join('&');}};Form.Methods={serialize:function(form){return Form.serializeElements($(form).getElements());},getElements:function(form){return $A($(form).getElementsByTagName('*')).inject([],function(elements,child){if(Form.Element.Serializers[child.tagName.toLowerCase()])
-elements.push(Element.extend(child));return elements;});},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)
-return inputs;var matchingInputs=new Array();for(var i=0,length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
-continue;matchingInputs.push(Element.extend(input));}
-return matchingInputs;},disable:function(form){form=$(form);form.getElements().each(function(element){element.blur();element.disabled='true';});return form;},enable:function(form){form=$(form);form.getElements().each(function(element){element.disabled='';});return form;},findFirstElement:function(form){return $(form).getElements().find(function(element){return element.type!='hidden'&&!element.disabled&&['input','select','textarea'].include(element.tagName.toLowerCase());});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;}}
-Object.extend(Form,Form.Methods);Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}}
-Form.Element.Methods={serialize:function(element){element=$(element);if(element.disabled)return'';var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter){var key=encodeURIComponent(parameter[0]);if(key.length==0)return;if(parameter[1].constructor!=Array)
-parameter[1]=[parameter[1]];return parameter[1].map(function(value){return key+'='+encodeURIComponent(value);}).join('&');}},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();var parameter=Form.Element.Serializers[method](element);if(parameter)
-return parameter[1];},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!['button','reset','submit'].include(element.type)))
-element.select();return element;},disable:function(element){element=$(element);element.disabled=true;return element;},enable:function(element){element=$(element);element.blur();element.disabled=false;return element;}}
-Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element;Form.Element.Serializers={input:function(element){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element);default:return Form.Element.Serializers.textarea(element);}
-return false;},inputSelector:function(element){if(element.checked)
-return[element.name,element.value];},textarea:function(element){return[element.name,element.value];},select:function(element){return Form.Element.Serializers[element.type=='select-one'?'selectOne':'selectMany'](element);},selectOne:function(element){var value='',opt,index=element.selectedIndex;if(index>=0){opt=Element.extend(element.options[index]);value=opt.hasAttribute('value')?opt.value:opt.text;}
-return[element.name,value];},selectMany:function(element){var value=[];for(var i=0,length=element.length;i<length;i++){var opt=Element.extend(element.options[i]);if(opt.selected)
-value.push(opt.hasAttribute('value')?opt.value:opt.text);}
-return[element.name,value];}}
-var $F=Form.Element.getValue;Abstract.TimedObserver=function(){}
-Abstract.TimedObserver.prototype={initialize:function(element,frequency,callback){this.frequency=frequency;this.element=$(element);this.callback=callback;this.lastValue=this.getValue();this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}}}
-Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=function(){}
-Abstract.EventObserver.prototype={initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
-this.registerFormCallbacks();else
-this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this));},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}}
-Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element);}});if(!window.Event){var Event=new Object();}
-Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},pointerX:function(event){return event.pageX||(event.clientX+
-(document.documentElement.scrollLeft||document.body.scrollLeft));},pointerY:function(event){return event.pageY||(event.clientY+
-(document.documentElement.scrollTop||document.body.scrollTop));},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))
-element=element.parentNode;return element;},observers:false,_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer);}},unloadCache:function(){if(!Event.observers)return;for(var i=0,length=Event.observers.length;i<length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null;}
-Event.observers=false;},observe:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))
-name='keydown';Event._observeAndCache(element,name,observer,useCapture);},stopObserving:function(element,name,observer,useCapture){element=$(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))
-name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){try{element.detachEvent('on'+name,observer);}catch(e){}}}});if(navigator.appVersion.match(/\bMSIE\b/))
-Event.observe(window,'unload',Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},realOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return[valueL,valueT];},cumulativeOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return[valueL,valueT];},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName=='BODY')break;var p=Element.getStyle(element,'position');if(p=='relative'||p=='absolute')break;}}while(element);return[valueL,valueT];},offsetParent:function(element){if(element.offsetParent)return element.offsetParent;if(element==document.body)return element;while((element=element.parentNode)&&element!=document.body)
-if(Element.getStyle(element,'position')!='static')
-return element;return document.body;},within:function(element,x,y){if(this.includeScrollOffsets)
-return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=this.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=this.realOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=this.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
-return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
-return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},page:function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
-if(Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!window.opera||element.tagName=='BODY'){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return[valueL,valueT];},clone:function(source,target){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{})
-source=$(source);var p=Position.page(source);target=$(target);var delta=[0,0];var parent=null;if(Element.getStyle(target,'position')=='absolute'){parent=Position.offsetParent(target);delta=Position.page(parent);}
-if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
-if(options.setLeft)target.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)target.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)target.style.width=source.offsetWidth+'px';if(options.setHeight)target.style.height=source.offsetHeight+'px';},absolutize:function(element){element=$(element);if(element.style.position=='absolute')return;Position.prepare();var offsets=Position.positionedOffset(element);var top=offsets[1];var left=offsets[0];var width=element.clientWidth;var height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';;element.style.left=left+'px';;element.style.width=width+'px';;element.style.height=height+'px';;},relativize:function(element){element=$(element);if(element.style.position=='relative')return;Position.prepare();element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0);var left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;}}
-if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
-if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return[valueL,valueT];}}
-Element.addMethods();
View
BIN  site/try/.svn/text-base/spinner.gif.svn-base
Binary file not shown
View
86 site/try/.svn/text-base/template.html.svn-base
@@ -1,86 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
- <title>mofo - a ruby microformat parser</title>
- <link href="http://mofo.rubyforge.org/style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="http://mofo.rubyforge.org/p.js"></script>
-</head>
-
-<body>
- <div id="container">
- <div id="header">
- <img src="http://mofo.rubyforge.org/mofo-logo.png" alt="mofo!" />
- <br /><hr />
- </div>
-
- <div id="left">
- <h3>mofo</h3>
-
- <ul class="xoxo">
- <li><a target="_top" href="http://mofo.rubyforge.org/try">Try It!</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#get_started">Get Started</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#microwhozit">Microwhozit?</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#find">Mofo#find</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#supported">Supported Microformats</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#rails">Ruby on Rails</a></li>
- <li><a target="_top" href="http://mofo.rubyforge.org/#touch">Get in Touch</a></li>
- </ul>
-
- <h3>Points of Interest</h3>