├── vectors ├── New File ├── views │ └── index.erb └── vectors.rb ├── .gitignore ├── git_fight ├── views │ ├── failed.erb │ ├── layout.erb │ ├── index.erb │ ├── fight.erb │ ├── api.erb │ └── about.erb ├── public │ ├── loading.gif │ ├── extensions │ │ ├── chrome_extension.crx │ │ └── chrome_extension.pem │ ├── app.js │ └── style.css ├── Rakefile ├── extensions │ └── chrome_extension │ │ ├── background.html │ │ ├── manifest.json │ │ ├── injection.js │ │ └── jquery.js ├── migrations │ └── 001_add_users.rb ├── user.rb └── git_fight.rb ├── lib ├── preload.rb ├── configuration.rb ├── standard_methods.rb ├── load_extensions.rb └── shared.rb ├── textops ├── views │ ├── failed.erb │ ├── layout.erb │ └── index.erb ├── public │ └── style.css └── textops.rb ├── .gitmodules ├── wedit ├── public │ ├── favicon.ico │ ├── assets │ │ ├── Inconsolata.ttf │ │ ├── skewed_print.png │ │ ├── fontawesome-webfont.ttf │ │ ├── jquery.digits.js │ │ ├── jquery.bytesize.js │ │ ├── style.css │ │ ├── autocorrect.js │ │ ├── jquery.caret.js │ │ ├── js.js │ │ ├── font-awesome.css │ │ └── autocorrect.wordlist.js │ ├── manifest.mf │ └── index.html ├── Rakefile ├── migrate.rb └── wedit.rb ├── deploy ├── htt8ball └── htt8ball.rb ├── Gemfile ├── LICENSE ├── Gemfile.lock ├── Rakefile └── .rss └── rss.rb /vectors/New File: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /sinatra_apps.conf 2 | /.redcar/ 3 | /lia/dls -------------------------------------------------------------------------------- /git_fight/views/failed.erb: -------------------------------------------------------------------------------- 1 |

There was a problem, please try again.

-------------------------------------------------------------------------------- /lib/preload.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/shared' 2 | Sites.all -------------------------------------------------------------------------------- /textops/views/failed.erb: -------------------------------------------------------------------------------- 1 |

There was a problem, please try again.

-------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "visage"] 2 | path = visage 3 | url = git://github.com/bloopletech/visage.git 4 | -------------------------------------------------------------------------------- /wedit/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/wedit/public/favicon.ico -------------------------------------------------------------------------------- /git_fight/public/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/git_fight/public/loading.gif -------------------------------------------------------------------------------- /vectors/views/index.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
-------------------------------------------------------------------------------- /wedit/public/assets/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/wedit/public/assets/Inconsolata.ttf -------------------------------------------------------------------------------- /wedit/public/assets/skewed_print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/wedit/public/assets/skewed_print.png -------------------------------------------------------------------------------- /wedit/public/assets/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/wedit/public/assets/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /git_fight/public/extensions/chrome_extension.crx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloopletech/sinatra_apps/master/git_fight/public/extensions/chrome_extension.crx -------------------------------------------------------------------------------- /wedit/public/assets/jquery.digits.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.digits = function(text) { 3 | return text.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); 4 | }; 5 | })(jQuery); 6 | -------------------------------------------------------------------------------- /git_fight/Rakefile: -------------------------------------------------------------------------------- 1 | namespace :git_fight do 2 | namespace :db do 3 | desc "Migrate database" 4 | task :migrate do 5 | ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + "/migrations/") 6 | end 7 | end 8 | end -------------------------------------------------------------------------------- /lib/configuration.rb: -------------------------------------------------------------------------------- 1 | DB_CONFIG = { :adapter => 'postgresql', 2 | :database => 'sinatra_apps', 3 | :username => 'postgres', 4 | :password => 'postgres', 5 | :host => 'localhost', 6 | :pool => 50, 7 | :async_query => true } -------------------------------------------------------------------------------- /textops/views/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Textops 5 | 6 | 7 | 8 | <%= yield %> 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/standard_methods.rb: -------------------------------------------------------------------------------- 1 | module Kernel 2 | def h(str) 3 | Rack::Utils.escape_html(str) 4 | end 5 | end 6 | 7 | class File 8 | def self.escape_name(filename) 9 | filename.gsub(/([ \[\]\(\)'"&!\\])/) { |r| "\\#{$1}" } 10 | end 11 | end -------------------------------------------------------------------------------- /deploy: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | lnode " 3 | rvm use 1.9.2; 4 | cd ~/www/sinatra_apps/current; 5 | git pull; 6 | ln -nfs ~/www/sinatra_apps/shared/lib/configuration.rb ~/www/sinatra_apps/current/lib/configuration.rb; 7 | rake generate_nginx_config; 8 | sudo -S monit restart rake; 9 | " 10 | -------------------------------------------------------------------------------- /git_fight/extensions/chrome_extension/background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | -------------------------------------------------------------------------------- /lib/load_extensions.rb: -------------------------------------------------------------------------------- 1 | module Kernel 2 | def __DIRNAME__ 3 | File.dirname(File.expand_path(caller.first.match(/^(.*?):/)[1])) 4 | end 5 | 6 | #require_relative 7 | 8 | alias_method :rrequire, :require_relative 9 | end 10 | 11 | class String 12 | def /(name) 13 | self + "/" + name 14 | end 15 | end -------------------------------------------------------------------------------- /wedit/Rakefile: -------------------------------------------------------------------------------- 1 | namespace :wedit do 2 | namespace :db do 3 | desc "Backup database" 4 | task :backup do 5 | Time.zone = "Canberra" 6 | system("cp /var/lib/memcachedb/default.db '/backups/wedit-#{Time.zone.now.strftime("%d-%m-%Y_%H_%M_%S")}.db'") 7 | system("s3cmd sync /backups s3://bloople_backups") 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /textops/views/index.erb: -------------------------------------------------------------------------------- 1 |

Textops

2 | 3 |

blah

4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /git_fight/extensions/chrome_extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GitFight GitHub integration", 3 | "version": "1.0", 4 | "description": "Adds the GitFight score to GitHub profile pages", 5 | "permissions": ["http://github.com/*", "https://github.com/*"], 6 | "content_scripts": [ 7 | { 8 | "matches": ["http://github.com/*", "https://github.com/*"], 9 | "js": ["jquery.js", "injection.js"], 10 | "run_at": "document_end" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /git_fight/extensions/chrome_extension/injection.js: -------------------------------------------------------------------------------- 1 | if($("body").hasClass("page-profile")) 2 | { 3 | $("body").append('\ 9 | '); 11 | } -------------------------------------------------------------------------------- /git_fight/public/app.js: -------------------------------------------------------------------------------- 1 | $(function() 2 | { 3 | $("#fight").live('submit', function(event) 4 | { 5 | event.preventDefault(); 6 | $("#replaceable").html("
May take up to 10 seconds"); 7 | $('#replaceable').load('/fight', $(this).serialize()); 8 | }); 9 | 10 | $("#new_fight").live('click', function(event) 11 | { 12 | event.preventDefault(); 13 | $("#replaceable").html(''); 14 | $("#user_1").focus(); 15 | }); 16 | }); -------------------------------------------------------------------------------- /wedit/public/manifest.mf: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | # 90 3 | /index.html 4 | /assets/skewed_print.png 5 | /assets/Inconsolata.ttf 6 | /assets/fontawesome-webfont.ttf 7 | /assets/font-awesome.css 8 | /assets/style.css 9 | http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js 10 | /assets/jquery.bytesize.js 11 | /assets/jquery.digits.js 12 | /assets/js.js 13 | /assets/jquery.caret.js 14 | /assets/autocorrect.js 15 | /assets/autocorrect.wordlist.js 16 | 17 | NETWORK: 18 | * 19 | -------------------------------------------------------------------------------- /htt8ball/htt8ball.rb: -------------------------------------------------------------------------------- 1 | module Htt8ball 2 | end 3 | 4 | class Htt8ball::Htt8ball < Sinatra::Base 5 | get '/' do 6 | codes = Rack::Utils::HTTP_STATUS_CODES 7 | code = codes.keys[rand(codes.length)] 8 | full_status = "#{code} #{codes[code]}" 9 | halt [code, %Q{ 10 | 11 | 12 | 13 | #{full_status} 14 | 15 | 16 |

The htt8ball's answer to your question is:

17 |

#{full_status}

18 | 19 | }] 20 | end 21 | end -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | 3 | gem 'mongrel', '1.2.0.pre2' 4 | gem 'pg', '0.9.0' 5 | gem 'sinatra', '1.3.3', :require => 'sinatra/base' 6 | gem 'activerecord', '3.0.0', :require => 'active_record' 7 | gem 'nokogiri', '1.4.3.1' 8 | gem 'haml', '3.0.17' 9 | #gem 'errand', '0.7.2' 10 | gem 'yajl-ruby', '0.7.7' 11 | #gem 'levenshtein19', :require => 'levenshtein' 12 | gem 'amatch', '0.2.10' 13 | gem 'rmagick', :require => 'RMagick' 14 | gem 'rugged', '0.16.0' 15 | gem 'memcache-client', '1.8.5', :require => 'memcache' 16 | gem 'rack-throttle', '0.3.0', :require => 'rack/throttle' 17 | -------------------------------------------------------------------------------- /wedit/migrate.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'nokogiri' 3 | require 'memcache' 4 | 5 | doc = Nokogiri::XML.parse(File.read("temp.xml")) 6 | mem = MemCache.new('localhost:21201', :check_size => false) 7 | 8 | doc.css("row").each do |row| 9 | key = row.css("field[name=key]").text 10 | mem.set("wedit-document-#{key}", row.css("field[name=text]").text) 11 | mem.set("wedit-document-#{key}-last-modified", row.css("field[name=last_modified]").text) 12 | end 13 | =begin 14 | resiults.each do |row| 15 | mem.set("wedit-document-#{row["key"]}", row["text"]) 16 | mem.set("wedit-document-#{row["key"]}-last-modified", row["last_modified"]) 17 | end 18 | =end 19 | -------------------------------------------------------------------------------- /git_fight/migrations/001_add_users.rb: -------------------------------------------------------------------------------- 1 | class AddUsers < ActiveRecord::Migration 2 | def self.up 3 | create_table :git_fight_users do |t| 4 | t.string :username 5 | t.string :gravatar_id 6 | t.string :name 7 | t.integer :repo_count 8 | t.integer :repo_original_watchers_count 9 | t.integer :repo_fork_watchers_count 10 | t.integer :repo_forks_count 11 | t.integer :following_count 12 | t.integer :followers_count 13 | t.integer :gist_count 14 | t.integer :score 15 | t.date :user_created_at 16 | 17 | t.timestamps 18 | end 19 | end 20 | 21 | def self.down 22 | drop_table :git_fight_users 23 | end 24 | end -------------------------------------------------------------------------------- /wedit/wedit.rb: -------------------------------------------------------------------------------- 1 | module Wedit 2 | end 3 | 4 | class Wedit::Wedit < Sinatra::Base 5 | get '/' do 6 | redirect '/index.html' 7 | end 8 | 9 | get '/s/:key' do 10 | mc.get("wedit-" + params[:key]) 11 | end 12 | 13 | put '/s/:key' do 14 | request.body.rewind 15 | mc.set("wedit-" + params[:key], request.body.read) 16 | 200 17 | end 18 | 19 | private 20 | def mc 21 | # @mc ||= MemCache.new('localhost:21201', :value_max_bytes => (1024 * 1024 * 5)) 22 | @mc ||= MemCache.new('localhost:21201', :check_size => false) 23 | end 24 | 25 | public 26 | configure :production do 27 | error do 28 | response.status = 500 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /textops/public/style.css: -------------------------------------------------------------------------------- 1 | * { margin: 0; padding: 0; } 2 | body { padding: 15px; background-color: #ffffff; color: #121212; width: 500px; margin-left: auto; margin-right: auto; } 3 | body, input, select, textarea, table, tr, td, h1, h2, h3, h4, h5, h6 { font: 100%/1.4em Helvetica, serif; } 4 | h1 { font-size: 200%; font-weight: bold; text-align: center; margin: 0 0 0 0; } 5 | h2 { font-size: 140%; font-weight: bold; margin: 1.5em 0 0.0em 0; } 6 | p, ul, blockquote { margin-bottom: 1.4em; } 7 | ul { margin-left: 3em; } 8 | 9 | input { 10 | display: block; 11 | -moz-box-sizing: border-box; 12 | -webkit-box-sizing: border-box; 13 | box-sizing: border-box; 14 | width: 100%; 15 | margin: 10px 0; 16 | } 17 | input[type='submit'] { font-size: 150%; } 18 | -------------------------------------------------------------------------------- /git_fight/views/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Git Fight! 5 | 6 | 7 | 8 | 9 | 10 | <%= yield %> 11 | 12 |

Git Fight! is not associated with GitHub. These figures are only a proxy for a user's actual contribution levels. User data is cached for a week at a time. Copyright © 2010 Brenton Fletcher. Source on GitHub.

14 | 15 | 16 | -------------------------------------------------------------------------------- /wedit/public/assets/jquery.bytesize.js: -------------------------------------------------------------------------------- 1 | // Tweak of code by Lea Verou, see http://bytesizematters.com/bytesize.js 2 | (function($) { 3 | $.bytesize = function(text) { 4 | var crlf = /(\r?\n|\r)/g; 5 | 6 | var length = text.length, nonAscii = length - text.replace(/[\u0100-\uFFFF]/g, '').length, 7 | lineBreaks = length - text.replace(crlf, '').length; 8 | 9 | return length + nonAscii + Math.max(0, lineBreaks - 1); 10 | }; 11 | 12 | $.format_bytes = function(count) { 13 | var level = 0; 14 | 15 | while(count > 1024) { 16 | count /= 1024; 17 | level++; 18 | } 19 | 20 | //Round to 2 decimals 21 | count = Math.round(count * 10) / 10; 22 | level = ['', 'k', 'm', 'g', 't'][level]; 23 | 24 | return count + ' ' + level + 'b'; 25 | }; 26 | })(jQuery); 27 | -------------------------------------------------------------------------------- /wedit/public/assets/style.css: -------------------------------------------------------------------------------- 1 | @font-face { font-family: Inconsolata; src: url("/assets/Inconsolata.ttf"); } 2 | 3 | * { margin: 0; padding: 0; font: 16px/22px Inconsolata, monospace; } 4 | body { background-image: url("/assets/skewed_print.png"); } 5 | .clear { clear: both; } 6 | #wrapper { max-width: 1000px; margin: 0 auto; padding: 0 5px; background-color: #ffffff; } 7 | textarea { display: block; width: 100%; border: 0; padding: 0; resize: none; } 8 | textarea:focus { outline: none; } 9 | #toolbar { height: 20px; color: #808080; position: relative; } 10 | #toolbar * { color: #808080; } 11 | #toolbar a { text-decoration: none; } 12 | #sync-wrapper { float: right; } 13 | #key-wrapper { width: 172px; height: 20px; position: absolute; left: 50%; top: 0; margin-left: -86px; } 14 | #key { width: 120px; height: 20px; border: 0; text-align: center; } 15 | -------------------------------------------------------------------------------- /vectors/vectors.rb: -------------------------------------------------------------------------------- 1 | module Vectors 2 | end 3 | 4 | class Vectors::Vectors < Sinatra::Base 5 | get '/' do 6 | erb :index 7 | end 8 | 9 | post '/' do 10 | doc = Nokogiri::XML.parse(params[:file].read) 11 | 12 | svg = doc.css("svg").first 13 | 14 | width = svg['width'].to_i 15 | height = svg['height'].to_i 16 | 17 | #scale 18 | 19 | svg['width'] = "#{new_width}px" 20 | svg['height'] = "#{new_height}px" 21 | 22 | 23 | unique = SecureRandom.hex(10) 24 | in_filename = "#{Dir.tmpdir}/#{unique}.svg" 25 | out_filename = "#{Dir.tmpdir}/#{unique}.png" 26 | File.open(in_filename, "w") { |f| f << doc.to_s } 27 | 28 | system("rsvg #{in_filename} #{out_filename}") 29 | 30 | response.body = File.read(out_filename) 31 | 32 | File.delete(in_filename) 33 | File.delete(out_filename) 34 | end 35 | end -------------------------------------------------------------------------------- /git_fight/views/index.erb: -------------------------------------------------------------------------------- 1 |

Git Fight!

2 | 3 |

Enter two GitHub usernames into the boxes below, and my algorithm will work out who is the better contributor by analyzing their GitHub stats.

4 | 5 |
6 | vs. 7 | 8 | 9 |
10 | 11 |
<%= @inside_content %>
12 | 13 | -------------------------------------------------------------------------------- /wedit/public/assets/autocorrect.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | function scan_back_for_word() { 3 | var text = $("#editor").val(); 4 | var original_position = $("#editor").caret(); 5 | 6 | var i, j; 7 | for(i = original_position - 1, j = 0; i >= 0 && j < 20; i--, j++) { 8 | if(text[i].match(/[^A-Za-z]/)) break; 9 | } 10 | if(j == 20) return; 11 | 12 | var match_text = text.substring(i + 1, original_position); 13 | if(match_text == "") return; 14 | 15 | var fix = word_list[match_text]; 16 | if(fix) { 17 | var before = text.substring(0, i + 1); 18 | var after = text.substring(original_position); 19 | $("#editor").val(before + fix + after); 20 | $("#editor").caret(original_position + (fix.length - match_text.length)); 21 | } 22 | }; 23 | 24 | $("#editor").keydown(function(event) { 25 | if(event.which == 32) scan_back_for_word(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /textops/textops.rb: -------------------------------------------------------------------------------- 1 | #require 'open-uri' 2 | 3 | module Textops 4 | end 5 | 6 | class Textops::Textops < Sinatra::Base 7 | get '/' do 8 | erb :index 9 | end 10 | 11 | post '/download' do 12 | text = params[:text].gsub(/([ '"])/) { |s| "\\#{$1}" }.gsub("%", "%%") 13 | foreground_colour = params[:foreground] 14 | background_colour = params[:background] 15 | return unless params[:foreground] =~ /^[A-z]+$/ && params[:background] =~ /^[A-z]+$/ 16 | 17 | o = Magick::Image.new(2560, 1600) { self.background_color = background_colour } 18 | 19 | draw = Magick::Draw.new 20 | draw.font_family = 'Helvetica' 21 | draw.font_style = Magick::NormalStyle 22 | draw.font_weight = Magick::BoldWeight 23 | draw.pointsize = 140 24 | draw.gravity = Magick::CenterGravity 25 | draw.fill = foreground_colour 26 | draw.annotate(o, 0, 0, 0, 0, text) 27 | 28 | attachment "desktop-#{Time.now.to_i}.png" 29 | o.to_blob { self.format = 'png' } 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /git_fight/public/extensions/chrome_extension.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAL0P24UYvHCXv04JE 3 | 799RHXvKQkz6K08vC+fP0KzoFfn1Z1SfsjYYRHyJh1zBgHpzRmDomMVIr2l5waQTU 4 | /2+3cBYDoxP7NC5DpiirG2GC1glBFJGRt+h3ba3f6Qg/sjyx3ue+HwzCLu5WxjrAU 5 | yoJ6KtLkvkz8LMOX6LWh0JpPZAgMBAAECgYBlIsB5eHwFdwedRPnNa8NdmyxGggAr 6 | +9tnVjbPBav2mkwJNoIgCrASm4iMJGXITDutNF9/xWSqMr9dIYBaEHL/jx6QF8oSC 7 | +kz8nw+vdTsbgh5qKJNnWbikZ/AfuUBUhhMCegwAzTUdmAPo83sriery7DHUGZ2MW 8 | UvDYN7vNYVCQJBAPhkda2NnLo7brAm+e1hga1E9pckXUoBLIFJnwwUP7DWTTsNqWt 9 | Tm2Dc8UHixYmkPEQ7xxrBjuRufHhqkVZV/msCQQDC2jZpTer4GJ9UvrG1Q1LPrb4r 10 | GXxbMXuqR+7XA2F+IaZRSZu0PhIVRAmZPQsN+PeB5Lfyg9tpHJOEwEaAbL/LAkEA7 11 | K5Uz0WjtHSTGPhap02E0gRnb0cwOSb7MEplaY4Vzju1JXL0Hxdwc5CzthMOJQRAhM 12 | ftBVqv/IwmwFrTF9Ai9wJBAJAvyXPDJMzR65VaR0ZKu0zS1JYwFcWlqE0pTaPt7Ib 13 | Zf6lHPuDxzY/O+QtcEIIWaZDFHxlmWUY+zyq83W7LCmECQEvrGvf+18FuaHw6KuoK 14 | jVLN+6uXu86wYH2u1mKnHTP5JnVWHUkA9f9mO8hfNHN4bYK1ClOqiety2QODjruHB 15 | Ec= 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /lib/shared.rb: -------------------------------------------------------------------------------- 1 | require_relative 'load_extensions' 2 | require 'rubygems' 3 | require 'bundler' 4 | Bundler.require 5 | require 'erb' 6 | require 'yajl/json_gem' 7 | require_relative "standard_methods" 8 | 9 | require_relative "configuration" 10 | 11 | ActiveRecord::Base.establish_connection(DB_CONFIG) 12 | 13 | class Sites 14 | def self.all 15 | port = 8999 16 | Dir.entries(__DIRNAME__ / '..').reject { |d| d[0, 1] == '.' || !File.directory?(d) || d == 'lib' || d == 'tmp' }.sort.map do |app_name| 17 | require_path = __DIRNAME__ / "../#{app_name}/#{app_name}" 18 | 19 | require require_path 20 | 21 | mod = Object.const_get(Object.constants.grep(/^#{app_name.gsub(/_/, '')}$/i)[0]) 22 | klass = mod.const_get(mod.name) 23 | 24 | klass.instance_eval do 25 | set :app_file, require_path 26 | 27 | set :environment, ENV["ENV"] == "development" ? :development : :production 28 | set :logging, ENV["ENV"] == "development" 29 | end 30 | 31 | port += 1 #port starts at 9000 32 | { :name => app_name, :port => port, :class => klass } 33 | end 34 | end 35 | end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Brenton Fletcher (http://blog.bloople.net i@bloople.net) 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: http://rubygems.org/ 3 | specs: 4 | activemodel (3.0.0) 5 | activesupport (= 3.0.0) 6 | builder (~> 2.1.2) 7 | i18n (~> 0.4.1) 8 | activerecord (3.0.0) 9 | activemodel (= 3.0.0) 10 | activesupport (= 3.0.0) 11 | arel (~> 1.0.0) 12 | tzinfo (~> 0.3.23) 13 | activesupport (3.0.0) 14 | amatch (0.2.10) 15 | tins (~> 0.3) 16 | arel (1.0.1) 17 | activesupport (~> 3.0.0) 18 | builder (2.1.2) 19 | daemons (1.0.10) 20 | gem_plugin (0.2.3) 21 | haml (3.0.17) 22 | i18n (0.4.2) 23 | memcache-client (1.8.5) 24 | mongrel (1.2.0.pre2) 25 | daemons (~> 1.0.10) 26 | gem_plugin (~> 0.2.3) 27 | nokogiri (1.4.3.1) 28 | pg (0.9.0) 29 | rack (1.4.1) 30 | rack-protection (1.2.0) 31 | rack 32 | rack-throttle (0.3.0) 33 | rack (>= 1.0.0) 34 | rmagick (2.16.0) 35 | rugged (0.16.0) 36 | sinatra (1.3.3) 37 | rack (~> 1.3, >= 1.3.6) 38 | rack-protection (~> 1.2) 39 | tilt (~> 1.3, >= 1.3.3) 40 | tilt (1.3.3) 41 | tins (0.6.0) 42 | tzinfo (0.3.35) 43 | yajl-ruby (0.7.7) 44 | 45 | PLATFORMS 46 | ruby 47 | 48 | DEPENDENCIES 49 | activerecord (= 3.0.0) 50 | amatch (= 0.2.10) 51 | haml (= 3.0.17) 52 | memcache-client (= 1.8.5) 53 | mongrel (= 1.2.0.pre2) 54 | nokogiri (= 1.4.3.1) 55 | pg (= 0.9.0) 56 | rack-throttle (= 0.3.0) 57 | rmagick 58 | rugged (= 0.16.0) 59 | sinatra (= 1.3.3) 60 | yajl-ruby (= 0.7.7) 61 | 62 | BUNDLED WITH 63 | 1.14.6 64 | -------------------------------------------------------------------------------- /git_fight/views/fight.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | 16 | <% GitFight::STATS_ATTRS.each_pair do |method, description| 17 | %> 18 | 19 | 26 | 27 | 34 | 35 | <% end %> 36 |
4 | 5 |
<%= h @user_1.username %>
6 |
<%= h @user_1.name %>
7 |
10 | 11 |
<%= h @user_2.username %>
12 |
<%= h @user_2.name %>
13 |
20 |
<%= number @user_1.send(method) %>
21 | <%= description %> 22 | <% if method == :score && @user_1_winner_overall %> 23 |
WINNER
24 | <% end %> 25 |
28 |
<%= number @user_2.send(method) %>
29 | <%= description %> 30 | <% if method == :score && @user_2_winner_overall %> 31 |
WINNER
32 | <% end %> 33 |
37 | 38 |

New Fight!

39 |

Link to this result: <%= h request_url %>

40 | -------------------------------------------------------------------------------- /git_fight/views/api.erb: -------------------------------------------------------------------------------- 1 |
2 |

GitFight! API

3 | 4 |

You can get the data for a GitHub user, including their GitFight! score, by requesting:

5 |
6 | http://gitfight.bloople.net/user/<username> 7 |
8 |

You will get a response like this:

9 |
10 |
11 | {
12 |   "score": 19380,
13 |   "followers_count": 1538,
14 |   "following_count": 191,
15 |   "repo_count": 97,
16 |   "gist_count": 272,
17 |   "repo_original_watchers_count": 9013,
18 |   "repo_fork_watchers_count": 109,
19 |   "repo_forks_count": 986,
20 |   "username": "defunkt"
21 | }
22 |     
23 |
24 |

You can optionally add any of these parameters to the query string:

25 | 29 |

Here's an example of a response for the URL http://gitfight.bloople.net/user/defunkt?commas=true&callback=got_gitfight:

30 |
31 |
32 | got_gitfight(
33 | {
34 |   score: '19,392',
35 |   followers_count: '1,538',
36 |   following_count: '191',
37 |   repo_count: '97',
38 |   gist_count: '272',
39 |   repo_original_watchers_count: '9,015',
40 |   repo_fork_watchers_count: '109',
41 |   repo_forks_count: '987',
42 |   username: 'defunkt'
43 | }
44 | );
45 |     
46 |
47 |

There are currently no limits on using the GitFight! API.

48 |
-------------------------------------------------------------------------------- /git_fight/views/about.erb: -------------------------------------------------------------------------------- 1 |
2 |

About Git Fight!

3 | 4 |

When you're browsing GitHub, you often come across new and interesting projects and the people behind them - visiting their profile page shows you plenty of information about their projects. But what the profile doesn't tell you is how popular they, and their projects are as a whole - how known, trusted, and interesting they are.

5 | 6 |

But how to determine this? Gauging trust and quality is difficult for a computer to do.

7 | 8 |

GitHub users don't live in vacuums - they are linked to other users through followers and repo watchers, and of course repo forks. This social data can be used to estimate a user's quality and trustworthiness, and also their volume of output.

9 | 10 |

Enter Git Fight!

11 |

Git Fight! combines a user's:

12 | 13 | 19 | 20 |

into a single number, the Git Fight! score. The actual algorithm weights these numbers so that original repos are rated more than forks, and gists are worth far less than repos, among other things.

21 | 22 |

Details, details

23 |

This works off of the assumption that a user who creates high-quality, interesting projects will gain more watchers, forks, and followers than other users. Larger projects will also tend to garner more watchers than smaller projects.

24 | 25 |

The Git Fight! score should be taken with a grain of salt, of course. It assumes that everyone participates in the social aspects of GitHub. This is a great reason to promote your projects within the community.

26 |
-------------------------------------------------------------------------------- /wedit/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | wedit 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /git_fight/public/style.css: -------------------------------------------------------------------------------- 1 | * { margin: 0; padding: 0; } 2 | body { padding: 15px; background-color: #f5f5dc; color: #009000; width: 600px; } 3 | body, input, select, textarea, table, tr, td, h1, h2, h3, h4, h5, h6 { font: 100%/1.4em "Georgia", serif; } 4 | h1 { font-size: 200%; font-weight: bold; font-style: italic; text-align: center; margin: 0 0 0 0; } 5 | h2 { font-size: 140%; font-weight: bold; margin: 1.5em 0 0.0em 0; } 6 | img { border: none; } 7 | /*li { margin-left: 30px; }*/ 8 | p, ul, blockquote { margin-bottom: 1.4em; } 9 | ul { margin-left: 3em; } 10 | form { text-align: center; } 11 | blockquote { margin-left: 3em; margin-right: 3em; font-size: 130%; } 12 | 13 | body, #replaceable, p.info, #results, #informative-links { margin-left: auto; margin-right: auto; } 14 | #replaceable { text-align: center; margin-top: 1.4em; } 15 | 16 | h1 + p { margin-top: 1.4em; } 17 | p.info, #informative-links { width: 400px; } 18 | #informative-links { margin-top: 5em; } 19 | p.disclaimer { font-size: 80%; line-height: 1.4em; color: #808080; margin-top: 5em; margin-bottom: 0; } 20 | span.vs { font-style: italic; } 21 | 22 | 23 | #fight input { font: 90%/1.4em "Georgia", serif; } 24 | #fight input[type='text'] { width: 175px; border: 1px solid #009000; padding: 2px; color: #000000; } 25 | #fight input[type='submit'] { padding: 3px; } 26 | 27 | #results { margin-bottom: 2.5em; border-collapse: collapse; } 28 | #results td { padding: 10px; border-bottom: 1px solid #dddddd; vertical-align: top; } 29 | #results td:first-child { text-align: right; padding-right: 10px; } 30 | #results td.vertical-separator { padding: 0; width: 1px; background-color: #dddddd; } 31 | #results td:last-child { text-align: left; padding-left: 10px; } 32 | 33 | #results td.local-winner .number { font-weight: bold; } 34 | #results tr.score td.local-winner .number { font-weight: normal; } 35 | 36 | #results tr.score td:first-child, #results tr.score td:last-child { background-color: #28d728; color: #f3f3da; } 37 | #results tr:last-child td { border-bottom: none; } 38 | 39 | #results img { max-width: 250px; max-height: 250px; } 40 | 41 | div.username, div.number { font-size: 160%; line-height: 1.4em; } 42 | div.winner { font-size: 230%; margin-top: 0.5em; } -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | unless RUBY_VERSION >= '1.9.2' 2 | puts "Re-run under ruby 1.9.2. Exiting." 3 | exit 4 | end 5 | 6 | require_relative 'lib/shared' 7 | 8 | Dir.glob("*/Rakefile").each { |f| import f } 9 | 10 | pidfile = 'tmp/pids/server.pid' 11 | 12 | desc "Starts the server" 13 | task :start do 14 | #Process management - only needed in production 15 | unless ENV['ENV'] == 'development' 16 | Process.daemon(true) 17 | 18 | File.open(pidfile, 'w') { |f| f.write("#{Process.pid}") } 19 | at_exit { File.delete(pidfile) if File.exist?(pidfile) } 20 | end 21 | 22 | #For each app, run it in an instance of Rack::Server 23 | threads = [] 24 | 25 | Sites.all.each do |site| 26 | rb = Rack::Builder.app do 27 | use Rack::Throttle::Hourly, :max => 300 28 | run site[:class] 29 | end 30 | 31 | rs = Rack::Server.new(:Port => site[:port], :server => 'mongrel') 32 | rs.instance_variable_set(:@app, rb) 33 | threads << Thread.new { rs.start } 34 | 35 | puts "#{site[:name]} running on #{site[:port]}"# if $DEBUG 36 | end 37 | 38 | #Make sure we wait for all servers to die before exiting 39 | threads.each{ |t| t.join } 40 | end 41 | 42 | task :stop do 43 | system("kill -9 `cat #{pidfile}`") if File.exists?(pidfile) 44 | end 45 | 46 | task :console do 47 | system("irb -r ./lib/preload.rb") 48 | end 49 | 50 | desc "Generate nginx configuration" 51 | task :generate_nginx_config do 52 | f = File.open("/home/bloople/www/sinatra_apps/shared/lib/sinatra_apps.conf", "w") 53 | 54 | f << "# DO NOT EDIT this file; it was generated by #{__FILE__} at #{DateTime.now.strftime("%d/%m/%Y %I:%M%p")}\n\n" 55 | 56 | Sites.all.each do |site| 57 | name = site[:name].gsub('_', '') 58 | 59 | f << <<-EOF 60 | # Configuration for #{site[:name]} 61 | server { 62 | listen 80; 63 | server_name www.#{name}.bloople.net; 64 | rewrite ^/(.*) http://#{name}.bloople.net/$1 permanent; 65 | } 66 | 67 | server { 68 | listen 80; 69 | server_name #{name}.bloople.net; 70 | 71 | location / { 72 | root /home/bloople/www/sinatra_apps/current/#{site[:name]}/public/; 73 | index /; 74 | if (!-f $request_filename) { 75 | proxy_pass http://127.0.0.1:#{site[:port]}; 76 | } 77 | include /etc/nginx/proxy.conf; 78 | } 79 | } 80 | 81 | EOF 82 | end 83 | 84 | f.close 85 | end 86 | 87 | =begin 88 | desc "Clear caches" 89 | task :clear_caches do 90 | Dir.glob("./*/public/cache/*").each { |dir| FileUtils.rm(dir) } 91 | end 92 | =end 93 | -------------------------------------------------------------------------------- /wedit/public/assets/jquery.caret.js: -------------------------------------------------------------------------------- 1 | // Set caret position easily in jQuery 2 | // Written by and Copyright of Luke Morton, 2011 3 | // Licensed under MIT 4 | (function ($) { 5 | // Behind the scenes method deals with browser 6 | // idiosyncrasies and such 7 | $.caretTo = function (el, index) { 8 | if (el.createTextRange) { 9 | var range = el.createTextRange(); 10 | range.move("character", index); 11 | range.select(); 12 | } else if (el.selectionStart != null) { 13 | el.focus(); 14 | el.setSelectionRange(index, index); 15 | } 16 | }; 17 | 18 | // Another behind the scenes that collects the 19 | // current caret position for an element 20 | 21 | // TODO: Get working with Opera 22 | $.caretPos = function (el) { 23 | if ("selection" in document) { 24 | var range = el.createTextRange(); 25 | try { 26 | range.setEndPoint("EndToStart", document.selection.createRange()); 27 | } catch (e) { 28 | // Catch IE failure here, return 0 like 29 | // other browsers 30 | return 0; 31 | } 32 | return range.text.length; 33 | } else if (el.selectionStart != null) { 34 | return el.selectionStart; 35 | } 36 | }; 37 | 38 | // The following methods are queued under fx for more 39 | // flexibility when combining with $.fn.delay() and 40 | // jQuery effects. 41 | 42 | // Set caret to a particular index 43 | $.fn.caret = function (index, offset) { 44 | if (typeof(index) === "undefined") { 45 | return $.caretPos(this.get(0)); 46 | } 47 | 48 | return this.queue(function (next) { 49 | if (isNaN(index)) { 50 | var i = $(this).val().indexOf(index); 51 | 52 | if (offset === true) { 53 | i += index.length; 54 | } else if (typeof(offset) !== "undefined") { 55 | i += offset; 56 | } 57 | 58 | $.caretTo(this, i); 59 | } else { 60 | $.caretTo(this, index); 61 | } 62 | 63 | next(); 64 | }); 65 | }; 66 | 67 | // Set caret to beginning of an element 68 | $.fn.caretToStart = function () { 69 | return this.caret(0); 70 | }; 71 | 72 | // Set caret to the end of an element 73 | $.fn.caretToEnd = function () { 74 | return this.queue(function (next) { 75 | $.caretTo(this, $(this).val().length); 76 | next(); 77 | }); 78 | }; 79 | }(jQuery)); -------------------------------------------------------------------------------- /git_fight/user.rb: -------------------------------------------------------------------------------- 1 | class GitFight::User < ActiveRecord::Base 2 | set_table_name :git_fight_users 3 | 4 | after_find :check_details! 5 | 6 | validates_presence_of :username 7 | 8 | before_create :get_details 9 | 10 | def self.pick_winner(user_1, user_2, method = :score) 11 | winner = user_1.send(method) > user_2.send(method) ? user_1 : user_2 12 | loser = user_1 == winner ? user_2 : user_1 13 | if winner == loser 14 | winner = user_1.user_created_at < user_2.user_created_at ? user_1.user_created_at : user_2.user_created_at 15 | loser = user_1.user_created_at > user_2.user_created_at ? user_1.user_created_at : user_2.user_created_at 16 | end 17 | 18 | return winner, loser 19 | end 20 | 21 | def self.is_user_winner?(user_in_question, other_user, method = :score) 22 | pick_winner(user_in_question, other_user, method).first == user_in_question 23 | end 24 | 25 | private 26 | def get_github_data(path) 27 | open("https://api.github.com/#{path}").read 28 | end 29 | 30 | def get_user_details(username) 31 | JSON.parse(get_github_data("users/#{username}")) 32 | end 33 | 34 | def get_repo_details(username) 35 | JSON.parse(get_github_data("users/#{username}/repos")) 36 | end 37 | 38 | def get_details 39 | begin 40 | user_details = get_user_details(username) 41 | sleep 1 42 | repo_details = get_repo_details(username) 43 | sleep 1 44 | rescue OpenURI::HTTPError => e 45 | self.errors.add(:username, "does not exist in GitHub") #if it's a 404 46 | return false 47 | rescue Exception => e 48 | return false 49 | end 50 | 51 | self.username = user_details['login'] 52 | self.gravatar_id = user_details['avatar_url'] 53 | self.name = user_details['name'] 54 | self.repo_count = user_details['public_repos'] 55 | self.repo_original_watchers_count = repo_details.reject { |repo| repo["fork"] }.sum { |repo| [repo["watchers"], 1].max } 56 | self.repo_fork_watchers_count = repo_details.select { |repo| repo["fork"] }.sum { |repo| [repo["watchers"], 1].max } 57 | self.repo_forks_count = repo_details.reject { |repo| repo["fork"] }.sum { |repo| repo["forks"] } 58 | self.following_count = user_details['following'] 59 | self.followers_count = user_details['followers'] 60 | self.gist_count = user_details['public_gists'] 61 | self.user_created_at = user_details['created_at'] 62 | 63 | # a user with 100 followers, following 100 people 64 | # with a 100 repos, each repo with 100 watchers and 10 forks 65 | # 60 of the repos are original and 40 are forks 66 | 67 | self.score = (0.25 * ((0.6 * following_count) + followers_count) + 68 | repo_original_watchers_count + (0.8 * repo_fork_watchers_count) + 69 | (10 * repo_forks_count) + (0.025 * gist_count)).round 70 | 71 | true 72 | end 73 | 74 | def check_details! 75 | if updated_at < 1.week.ago 76 | get_details 77 | save! 78 | end 79 | end 80 | end -------------------------------------------------------------------------------- /git_fight/git_fight.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | class RequestQueue 3 | @queue = [] 4 | 5 | def initialize 6 | Thread.new do 7 | while true 8 | item = nil 9 | @queue.synchronize do 10 | item = @queue.shift 11 | end 12 | 13 | 14 | 15 | #do work 16 | 17 | 18 | end 19 | =end 20 | 21 | require 'open-uri' 22 | 23 | module GitFight 24 | STATS_ATTRS = { 25 | :score => 'Analyzed Score', 26 | :followers_count => 'Number of followers', 27 | :following_count => 'Number of users following', 28 | :repo_count => 'Number of repos', 29 | :gist_count => 'Number of gists', 30 | :repo_original_watchers_count => 'Watcher count for original repos', 31 | :repo_fork_watchers_count => 'Watcher count for forks', 32 | :repo_forks_count => 'Fork count for original repos', 33 | :repo_forks_count => 'Fork count for original repos' 34 | } 35 | end 36 | 37 | require_relative 'user' 38 | 39 | class GitFight::GitFight < Sinatra::Base 40 | get '/' do 41 | @inside_content = '' 42 | erb :index 43 | end 44 | 45 | get '/fight' do 46 | @user_1 = get_user(params[:user_1]) 47 | @user_2 = get_user(params[:user_2]) 48 | 49 | return render_with_possible_xhr :failed if !@user_1.errors.empty? || !@user_2.errors.empty? 50 | 51 | @winner, @loser = GitFight::User.pick_winner(@user_1, @user_2) 52 | 53 | @user_1_winner_overall = @winner == @user_1 54 | @user_2_winner_overall = @winner == @user_2 55 | 56 | return render_with_possible_xhr :fight 57 | end 58 | 59 | get '/user/:user' do 60 | @user = get_user(params[:user]) 61 | 62 | out = {} 63 | (GitFight::STATS_ATTRS.keys + [:username]).each do |attr| 64 | val = @user.send(attr) 65 | out[attr] = params[:commas] == 'true' ? number(val) : val 66 | end 67 | 68 | response.headers["Content-type"] = "application/json" 69 | (callback = params[:jsonp] || params[:callback]) ? "#{callback}(#{out.to_json});" : out.to_json 70 | end 71 | 72 | get '/about' do 73 | erb :about 74 | end 75 | 76 | get '/api' do 77 | erb :api 78 | end 79 | 80 | mime_type 'crx', 'application/x-chrome-extension' 81 | 82 | helpers do 83 | #Ripped from rails 84 | def number(n) 85 | parts = n.to_s.split('.') 86 | parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,") 87 | parts.join(".") 88 | end 89 | 90 | def request_url 91 | request.url 92 | end 93 | end 94 | 95 | private 96 | def render_layout? 97 | !request.xhr? 98 | end 99 | 100 | def get_user(username) 101 | user = GitFight::User.find(:first, :conditions => ['username = ?', username]) 102 | user = GitFight::User.create(:username => username) unless user 103 | user 104 | end 105 | 106 | def render_with_possible_xhr(view_name) 107 | @inside_content = erb view_name, :layout => false 108 | render_layout? ? erb(:index) : @inside_content 109 | end 110 | 111 | public 112 | configure :production do 113 | error do 114 | response.status = 500 115 | content_type 'text/html' 116 | erb :failed, :layout => render_layout? 117 | end 118 | end 119 | end -------------------------------------------------------------------------------- /.rss/rss.rb: -------------------------------------------------------------------------------- 1 | require 'open-uri' 2 | 3 | module RSS 4 | end 5 | 6 | 7 | class RSS::RSS < Sinatra::Base 8 | get '/' do 9 | return failed("Invalid URL") unless params[:url] =~ /^http:/ 10 | 11 | response.headers['Content-Type'] = "text/html; charset=utf-8" 12 | 13 | xml = Nokogiri::XML.parse(open(params[:url]).read) 14 | puts xml.inspect 15 | # 16 | 17 | url = params[:url] 18 | detail = params[:detail] ? params[:detail].to_i : 2147483647 19 | limit = params[:limit] ? params[:limit].to_i : 2147483647 20 | striphtml = params[:striphtml] && params[:striphtml] == "true" 21 | showtitle = params[:showtitle] ? (params[:showtitle] == "true") : true 22 | showtitledesc = params[:showtitledesc] && params[:showtitledesc] == "true" 23 | titleprefix = (params[:titleprefix]) ? params[:titleprefix] : "" 24 | #titlereplacement = (params[:titlereplacement]) ? params[:titlereplacement] : "" 25 | #titledescprefix = (params[:titledescprefix]) ? params[:titledescprefix] : "" 26 | #itemtitleprefix = (params[:itemtitleprefix]) ? params[:itemtitleprefix] : "" 27 | itemdescprefix = (params[:itemdescprefix]) ? params[:itemdescprefix] : "" 28 | showicon = (params[:showicon]) ? (params[:showicon] == "true") : false 29 | showempty = (params[:showempty]) ? (params[:showempty] == "true") : false 30 | type = (params[:type]) ? params[:type] : "php" 31 | id = (params[:id]) ? ereg_replace("[^0-9]*", "", params[:id]) : "" 32 | fixbugs = (params[:fixbugs]) ? (params[:fixbugs] == "true") : false 33 | forceutf8 = (_GET["forceutf8"]) ? (_GET["forceutf8"] == "true") : false 34 | cache = !(params[:nocache]) ? (params[:nocache] == "true") : false 35 | 36 | 37 | if show_title 38 | @feed_title = ... 39 | @feed_link 40 | @feed_description 41 | @feed_image 42 | 43 | 44 | if($showtitle == true) 45 | { 46 | $channel = $doc->get_elements_by_tagname("channel"); 47 | $channel = $channel[0]; 48 | 49 | $title = $channel->get_elements_by_tagname("title"); 50 | $title = eschtml((count($title) > 0 ? $titleprefix.$title[0]->get_content() : "(No feed title)")); 51 | if($titlereplacement) $title = $titlereplacement; 52 | if($striphtml) $title = remtags($title); 53 | 54 | 55 | $link = $channel->get_elements_by_tagname("link"); 56 | $link = (count($link) > 0 ? ($eschtml ? eschtml($link[0]->get_content()) : $link[0]->get_content()) : ""); 57 | if($link != "") $title = "$title"; 58 | if($striphtml) $link = remtags($link); 59 | 60 | 61 | $desc = $channel->get_elements_by_tagname("description"); 62 | $desc = eschtml(count($desc) > 0 ? $desc[0]->get_content() : ""); 63 | if($striphtml) $desc = remtags($desc); 64 | 65 | 66 | $image = $channel->get_elements_by_tagname("image"); 67 | if(count($image) > 0) 68 | { 69 | $image = $image[0]; 70 | $image = $image ->get_elements_by_tagname("url"); 71 | $image = (count($image) > 0 ? $image[0]->get_content() : ""); 72 | } 73 | 74 | 75 | if($showicon && $image != "") $title = "$title"; 76 | 77 | if($showempty || (!$showempty && $title != "")) echo "

$title

\n"; 78 | if($showtitledesc && ($showempty || (!$showempty && $desc != ""))) echo "

$titledescprefix$desc

\n"; 79 | } 80 | 81 | 82 | 83 | end 84 | 85 | def failed(reason) 86 | puts "FAILED: #{reason}" 87 | end 88 | end -------------------------------------------------------------------------------- /wedit/public/assets/js.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | function get_key_local(key) { 3 | return localStorage.getItem(key); 4 | } 5 | 6 | function set_key_local(key, value) { 7 | localStorage.setItem(key, value); 8 | } 9 | 10 | function get_key_remote(key, callback) { 11 | $.ajax({ 12 | url: "/s/" + encodeURIComponent(key), 13 | failure: function() { 14 | $("#sync-status").html("Sync Failed "); 15 | }, 16 | success: callback 17 | }); 18 | } 19 | 20 | function set_key_remote(key, value, callback) { 21 | $.ajax({ 22 | url: "/s/" + encodeURIComponent(key), 23 | data: value, 24 | type: "PUT", 25 | failure: function() { 26 | $("#sync-status").html("Sync Failed "); 27 | }, 28 | success: callback 29 | }); 30 | } 31 | 32 | function generate_key() { 33 | var out = ""; 34 | var rand_chars = "ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz0123456789"; 35 | for(var i = 0; i < 7; i++) out += rand_chars.charAt(Math.floor(Math.random() * rand_chars.length + 1) - 1); 36 | return out; 37 | } 38 | 39 | function document_id() { 40 | return "document-" + $("#key").val(); 41 | } 42 | 43 | var document_last_text = null; 44 | var currently_saving = false; 45 | 46 | function sync() { 47 | if($("#key").val() == "") return; 48 | 49 | if($("#editor").val() == document_last_text) load_document_online(); 50 | else save_document_online(); 51 | } 52 | 53 | function edit_document(text) { 54 | $("#editor").val(text).focus().caretToEnd().scrollTop(214748364); 55 | set_key_local(document_id(), text); 56 | document_last_text = text; 57 | } 58 | 59 | function load_document_locally() { 60 | var text = get_key_local(document_id()); 61 | if(text == null) { 62 | load_document_online(); 63 | } 64 | else { 65 | edit_document(text); 66 | $("#sync-status").html("Loaded "); 67 | } 68 | } 69 | 70 | function load_document_online() { 71 | var text = get_key_local(document_id()) || ""; 72 | 73 | $("#sync-status").html("Syncing... "); 74 | get_key_remote(document_id() + "-last-modified", function(text) { 75 | var llm = parseFloat(get_key_local(document_id() + "-last-modified")); 76 | if(isNaN(llm) || (llm > parseFloat(text))) { 77 | get_key_remote(document_id(), function(text) { 78 | edit_document(text); 79 | }); 80 | } 81 | $("#sync-status").html("Loaded "); 82 | }); 83 | } 84 | 85 | function finish_edit_document() { 86 | var text = $("#editor").val(); 87 | set_key_local(document_id(), text); 88 | set_key_local(document_id() + "-last-modified", (new Date().getTime())); 89 | } 90 | 91 | function save_document_locally() { 92 | if($("#editor").val() == document_last_text) return; 93 | finish_edit_document(); 94 | } 95 | 96 | window.setInterval(save_document_locally, 5000); 97 | 98 | function save_document_online() { 99 | currently_saving = true; 100 | save_document_locally(); 101 | var text = $("#editor").val(); 102 | if(text == document_last_text) return; 103 | 104 | $("#sync-status").html("Syncing... "); 105 | set_key_remote(document_id(), text, function() { 106 | set_key_remote(document_id() + "-last-modified", get_key_local(document_id() + "-last-modified"), function() { 107 | $("#sync-status").html("Saved "); 108 | document_last_text = text; 109 | currently_saving = false; 110 | }); 111 | }); 112 | } 113 | 114 | $(document).keydown(function(e) { 115 | if(!(String.fromCharCode(e.which).toLowerCase() == 's' && e.ctrlKey) && !(e.which == 19)) return; 116 | sync(); 117 | e.preventDefault(); 118 | }); 119 | 120 | function check_save_document() { 121 | if(!currently_saving && $("#editor").val() != document_last_text) $("#sync-status").html("Editing "); 122 | } 123 | 124 | window.setInterval(check_save_document, 1000); 125 | 126 | window.onbeforeunload = function() { 127 | return ($("#editor").val() != document_last_text) ? "Your document is unsaved, please save it before leaving this page." : null; 128 | }; 129 | 130 | function statistics() { 131 | var s = $("#editor").val(); 132 | var wc = !s ? 0 : (s.split(/^\s+$/).length === 2 ? 0 : 2 + s.split(/\s+/).length - s.split(/^\s+/).length - s.split(/\s+$/).length); 133 | $("#statistics").text(($.digits(wc) + (wc == 1 ? " word" : " words")) + " / " + $.format_bytes($.bytesize(s))); 134 | } 135 | 136 | window.setInterval(statistics, 1000); 137 | statistics(); 138 | 139 | $(window).resize(function() { 140 | $("#editor").css("height", $(window).height() - 20); 141 | }).resize(); 142 | 143 | $("#key").change(function() { 144 | var key = $("#key").val(); 145 | if(key.length < 7) { 146 | alert("Please enter a key of at least 7 characters (letters and numbers); please make it hard to guess.\n" + 147 | "Your document key is like a password; with this, anyone can access and edit your document."); 148 | return; 149 | } 150 | $("#key-export").attr("href", "/s/document-" + encodeURIComponent(key)); 151 | set_key_local("key", key); 152 | load_document_locally(); 153 | }); 154 | 155 | $("#key-new").click(function(e) { 156 | $("#key").val(generate_key()).change(); 157 | e.preventDefault(); 158 | }); 159 | 160 | $("#sync").click(function(e) { 161 | sync(); 162 | e.preventDefault(); 163 | }); 164 | 165 | $("#key").val(get_key_local("key") || generate_key()).change(); 166 | }); 167 | -------------------------------------------------------------------------------- /wedit/public/assets/font-awesome.css: -------------------------------------------------------------------------------- 1 | /* Font Awesome 2 | the iconic font designed for use with Twitter Bootstrap 3 | ------------------------------------------------------- 4 | The full suite of pictographic icons, examples, and documentation 5 | can be found at: http://fortawesome.github.com/Font-Awesome/ 6 | 7 | License 8 | ------------------------------------------------------- 9 | The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: 10 | http://creativecommons.org/licenses/by/3.0/ A mention of 11 | 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable 12 | source code is considered acceptable attribution (most common on the web). 13 | If human readable source code is not available to the end user, a mention in 14 | an 'About' or 'Credits' screen is considered acceptable (most common in desktop 15 | or mobile software). 16 | 17 | Contact 18 | ------------------------------------------------------- 19 | Email: dave@davegandy.com 20 | Twitter: http://twitter.com/fortaweso_me 21 | Work: http://lemonwi.se co-founder 22 | 23 | */ 24 | /* Modified for wedit */ 25 | 26 | @font-face { 27 | font-family: "FontAwesome"; 28 | src: url('/assets/fontawesome-webfont.ttf'); 29 | font-weight: normal; 30 | font-style: normal; 31 | } 32 | 33 | /* Font Awesome styles 34 | ------------------------------------------------------- */ 35 | [class^="icon-"], [class*=" icon-"] { 36 | vertical-align: middle; 37 | } 38 | 39 | [class^="icon-"]:before, [class*=" icon-"]:before { 40 | font-family: FontAwesome; 41 | font-weight: normal; 42 | font-style: normal; 43 | display: inline-block; 44 | text-decoration: inherit; 45 | } 46 | a [class^="icon-"], a [class*=" icon-"] { 47 | display: inline-block; 48 | text-decoration: inherit; 49 | } 50 | /* makes the font 33% larger relative to the icon container */ 51 | .icon-large:before { 52 | vertical-align: top; 53 | font-size: 1.3333333333333333em; 54 | } 55 | .btn [class^="icon-"], .btn [class*=" icon-"] { 56 | /* keeps button heights with and without icons the same */ 57 | 58 | line-height: .9em; 59 | } 60 | li [class^="icon-"], li [class*=" icon-"] { 61 | display: inline-block; 62 | width: 1.25em; 63 | text-align: center; 64 | } 65 | li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] { 66 | /* 1.5 increased font size for icon-large * 1.25 width */ 67 | 68 | width: 1.875em; 69 | } 70 | li[class^="icon-"], li[class*=" icon-"] { 71 | margin-left: 0; 72 | list-style-type: none; 73 | } 74 | li[class^="icon-"]:before, li[class*=" icon-"]:before { 75 | text-indent: -2em; 76 | text-align: center; 77 | } 78 | li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before { 79 | text-indent: -1.3333333333333333em; 80 | } 81 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen 82 | readers do not read off random characters that represent icons */ 83 | .icon-glass:before { content: "\f000"; } 84 | .icon-music:before { content: "\f001"; } 85 | .icon-search:before { content: "\f002"; } 86 | .icon-envelope:before { content: "\f003"; } 87 | .icon-heart:before { content: "\f004"; } 88 | .icon-star:before { content: "\f005"; } 89 | .icon-star-empty:before { content: "\f006"; } 90 | .icon-user:before { content: "\f007"; } 91 | .icon-film:before { content: "\f008"; } 92 | .icon-th-large:before { content: "\f009"; } 93 | .icon-th:before { content: "\f00a"; } 94 | .icon-th-list:before { content: "\f00b"; } 95 | .icon-ok:before { content: "\f00c"; } 96 | .icon-remove:before { content: "\f00d"; } 97 | .icon-zoom-in:before { content: "\f00e"; } 98 | 99 | .icon-zoom-out:before { content: "\f010"; } 100 | .icon-off:before { content: "\f011"; } 101 | .icon-signal:before { content: "\f012"; } 102 | .icon-cog:before { content: "\f013"; } 103 | .icon-trash:before { content: "\f014"; } 104 | .icon-home:before { content: "\f015"; } 105 | .icon-file:before { content: "\f016"; } 106 | .icon-time:before { content: "\f017"; } 107 | .icon-road:before { content: "\f018"; } 108 | .icon-download-alt:before { content: "\f019"; } 109 | .icon-download:before { content: "\f01a"; } 110 | .icon-upload:before { content: "\f01b"; } 111 | .icon-inbox:before { content: "\f01c"; } 112 | .icon-play-circle:before { content: "\f01d"; } 113 | .icon-repeat:before { content: "\f01e"; } 114 | 115 | /* \f020 doesn't work in Safari. all shifted one down */ 116 | .icon-refresh:before { content: "\f021"; } 117 | .icon-list-alt:before { content: "\f022"; } 118 | .icon-lock:before { content: "\f023"; } 119 | .icon-flag:before { content: "\f024"; } 120 | .icon-headphones:before { content: "\f025"; } 121 | .icon-volume-off:before { content: "\f026"; } 122 | .icon-volume-down:before { content: "\f027"; } 123 | .icon-volume-up:before { content: "\f028"; } 124 | .icon-qrcode:before { content: "\f029"; } 125 | .icon-barcode:before { content: "\f02a"; } 126 | .icon-tag:before { content: "\f02b"; } 127 | .icon-tags:before { content: "\f02c"; } 128 | .icon-book:before { content: "\f02d"; } 129 | .icon-bookmark:before { content: "\f02e"; } 130 | .icon-print:before { content: "\f02f"; } 131 | 132 | .icon-camera:before { content: "\f030"; } 133 | .icon-font:before { content: "\f031"; } 134 | .icon-bold:before { content: "\f032"; } 135 | .icon-italic:before { content: "\f033"; } 136 | .icon-text-height:before { content: "\f034"; } 137 | .icon-text-width:before { content: "\f035"; } 138 | .icon-align-left:before { content: "\f036"; } 139 | .icon-align-center:before { content: "\f037"; } 140 | .icon-align-right:before { content: "\f038"; } 141 | .icon-align-justify:before { content: "\f039"; } 142 | .icon-list:before { content: "\f03a"; } 143 | .icon-indent-left:before { content: "\f03b"; } 144 | .icon-indent-right:before { content: "\f03c"; } 145 | .icon-facetime-video:before { content: "\f03d"; } 146 | .icon-picture:before { content: "\f03e"; } 147 | 148 | .icon-pencil:before { content: "\f040"; } 149 | .icon-map-marker:before { content: "\f041"; } 150 | .icon-adjust:before { content: "\f042"; } 151 | .icon-tint:before { content: "\f043"; } 152 | .icon-edit:before { content: "\f044"; } 153 | .icon-share:before { content: "\f045"; } 154 | .icon-check:before { content: "\f046"; } 155 | .icon-move:before { content: "\f047"; } 156 | .icon-step-backward:before { content: "\f048"; } 157 | .icon-fast-backward:before { content: "\f049"; } 158 | .icon-backward:before { content: "\f04a"; } 159 | .icon-play:before { content: "\f04b"; } 160 | .icon-pause:before { content: "\f04c"; } 161 | .icon-stop:before { content: "\f04d"; } 162 | .icon-forward:before { content: "\f04e"; } 163 | 164 | .icon-fast-forward:before { content: "\f050"; } 165 | .icon-step-forward:before { content: "\f051"; } 166 | .icon-eject:before { content: "\f052"; } 167 | .icon-chevron-left:before { content: "\f053"; } 168 | .icon-chevron-right:before { content: "\f054"; } 169 | .icon-plus-sign:before { content: "\f055"; } 170 | .icon-minus-sign:before { content: "\f056"; } 171 | .icon-remove-sign:before { content: "\f057"; } 172 | .icon-ok-sign:before { content: "\f058"; } 173 | .icon-question-sign:before { content: "\f059"; } 174 | .icon-info-sign:before { content: "\f05a"; } 175 | .icon-screenshot:before { content: "\f05b"; } 176 | .icon-remove-circle:before { content: "\f05c"; } 177 | .icon-ok-circle:before { content: "\f05d"; } 178 | .icon-ban-circle:before { content: "\f05e"; } 179 | 180 | .icon-arrow-left:before { content: "\f060"; } 181 | .icon-arrow-right:before { content: "\f061"; } 182 | .icon-arrow-up:before { content: "\f062"; } 183 | .icon-arrow-down:before { content: "\f063"; } 184 | .icon-share-alt:before { content: "\f064"; } 185 | .icon-resize-full:before { content: "\f065"; } 186 | .icon-resize-small:before { content: "\f066"; } 187 | .icon-plus:before { content: "\f067"; } 188 | .icon-minus:before { content: "\f068"; } 189 | .icon-asterisk:before { content: "\f069"; } 190 | .icon-exclamation-sign:before { content: "\f06a"; } 191 | .icon-gift:before { content: "\f06b"; } 192 | .icon-leaf:before { content: "\f06c"; } 193 | .icon-fire:before { content: "\f06d"; } 194 | .icon-eye-open:before { content: "\f06e"; } 195 | 196 | .icon-eye-close:before { content: "\f070"; } 197 | .icon-warning-sign:before { content: "\f071"; } 198 | .icon-plane:before { content: "\f072"; } 199 | .icon-calendar:before { content: "\f073"; } 200 | .icon-random:before { content: "\f074"; } 201 | .icon-comment:before { content: "\f075"; } 202 | .icon-magnet:before { content: "\f076"; } 203 | .icon-chevron-up:before { content: "\f077"; } 204 | .icon-chevron-down:before { content: "\f078"; } 205 | .icon-retweet:before { content: "\f079"; } 206 | .icon-shopping-cart:before { content: "\f07a"; } 207 | .icon-folder-close:before { content: "\f07b"; } 208 | .icon-folder-open:before { content: "\f07c"; } 209 | .icon-resize-vertical:before { content: "\f07d"; } 210 | .icon-resize-horizontal:before { content: "\f07e"; } 211 | 212 | .icon-bar-chart:before { content: "\f080"; } 213 | .icon-twitter-sign:before { content: "\f081"; } 214 | .icon-facebook-sign:before { content: "\f082"; } 215 | .icon-camera-retro:before { content: "\f083"; } 216 | .icon-key:before { content: "\f084"; } 217 | .icon-cogs:before { content: "\f085"; } 218 | .icon-comments:before { content: "\f086"; } 219 | .icon-thumbs-up:before { content: "\f087"; } 220 | .icon-thumbs-down:before { content: "\f088"; } 221 | .icon-star-half:before { content: "\f089"; } 222 | .icon-heart-empty:before { content: "\f08a"; } 223 | .icon-signout:before { content: "\f08b"; } 224 | .icon-linkedin-sign:before { content: "\f08c"; } 225 | .icon-pushpin:before { content: "\f08d"; } 226 | .icon-external-link:before { content: "\f08e"; } 227 | 228 | .icon-signin:before { content: "\f090"; } 229 | .icon-trophy:before { content: "\f091"; } 230 | .icon-github-sign:before { content: "\f092"; } 231 | .icon-upload-alt:before { content: "\f093"; } 232 | .icon-lemon:before { content: "\f094"; } 233 | .icon-phone:before { content: "\f095"; } 234 | .icon-check-empty:before { content: "\f096"; } 235 | .icon-bookmark-empty:before { content: "\f097"; } 236 | .icon-phone-sign:before { content: "\f098"; } 237 | .icon-twitter:before { content: "\f099"; } 238 | .icon-facebook:before { content: "\f09a"; } 239 | .icon-github:before { content: "\f09b"; } 240 | .icon-unlock:before { content: "\f09c"; } 241 | .icon-credit-card:before { content: "\f09d"; } 242 | .icon-rss:before { content: "\f09e"; } 243 | 244 | .icon-hdd:before { content: "\f0a0"; } 245 | .icon-bullhorn:before { content: "\f0a1"; } 246 | .icon-bell:before { content: "\f0a2"; } 247 | .icon-certificate:before { content: "\f0a3"; } 248 | .icon-hand-right:before { content: "\f0a4"; } 249 | .icon-hand-left:before { content: "\f0a5"; } 250 | .icon-hand-up:before { content: "\f0a6"; } 251 | .icon-hand-down:before { content: "\f0a7"; } 252 | .icon-circle-arrow-left:before { content: "\f0a8"; } 253 | .icon-circle-arrow-right:before { content: "\f0a9"; } 254 | .icon-circle-arrow-up:before { content: "\f0aa"; } 255 | .icon-circle-arrow-down:before { content: "\f0ab"; } 256 | .icon-globe:before { content: "\f0ac"; } 257 | .icon-wrench:before { content: "\f0ad"; } 258 | .icon-tasks:before { content: "\f0ae"; } 259 | 260 | .icon-filter:before { content: "\f0b0"; } 261 | .icon-briefcase:before { content: "\f0b1"; } 262 | .icon-fullscreen:before { content: "\f0b2"; } 263 | 264 | .icon-group:before { content: "\f0c0"; } 265 | .icon-link:before { content: "\f0c1"; } 266 | .icon-cloud:before { content: "\f0c2"; } 267 | .icon-beaker:before { content: "\f0c3"; } 268 | .icon-cut:before { content: "\f0c4"; } 269 | .icon-copy:before { content: "\f0c5"; } 270 | .icon-paper-clip:before { content: "\f0c6"; } 271 | .icon-save:before { content: "\f0c7"; } 272 | .icon-sign-blank:before { content: "\f0c8"; } 273 | .icon-reorder:before { content: "\f0c9"; } 274 | .icon-list-ul:before { content: "\f0ca"; } 275 | .icon-list-ol:before { content: "\f0cb"; } 276 | .icon-strikethrough:before { content: "\f0cc"; } 277 | .icon-underline:before { content: "\f0cd"; } 278 | .icon-table:before { content: "\f0ce"; } 279 | 280 | .icon-magic:before { content: "\f0d0"; } 281 | .icon-truck:before { content: "\f0d1"; } 282 | .icon-pinterest:before { content: "\f0d2"; } 283 | .icon-pinterest-sign:before { content: "\f0d3"; } 284 | .icon-google-plus-sign:before { content: "\f0d4"; } 285 | .icon-google-plus:before { content: "\f0d5"; } 286 | .icon-money:before { content: "\f0d6"; } 287 | .icon-caret-down:before { content: "\f0d7"; } 288 | .icon-caret-up:before { content: "\f0d8"; } 289 | .icon-caret-left:before { content: "\f0d9"; } 290 | .icon-caret-right:before { content: "\f0da"; } 291 | .icon-columns:before { content: "\f0db"; } 292 | .icon-sort:before { content: "\f0dc"; } 293 | .icon-sort-down:before { content: "\f0dd"; } 294 | .icon-sort-up:before { content: "\f0de"; } 295 | 296 | .icon-envelope-alt:before { content: "\f0e0"; } 297 | .icon-linkedin:before { content: "\f0e1"; } 298 | .icon-undo:before { content: "\f0e2"; } 299 | .icon-legal:before { content: "\f0e3"; } 300 | .icon-dashboard:before { content: "\f0e4"; } 301 | .icon-comment-alt:before { content: "\f0e5"; } 302 | .icon-comments-alt:before { content: "\f0e6"; } 303 | .icon-bolt:before { content: "\f0e7"; } 304 | .icon-sitemap:before { content: "\f0e8"; } 305 | .icon-umbrella:before { content: "\f0e9"; } 306 | .icon-paste:before { content: "\f0ea"; } 307 | 308 | .icon-user-md:before { content: "\f200"; } 309 | -------------------------------------------------------------------------------- /wedit/public/assets/autocorrect.wordlist.js: -------------------------------------------------------------------------------- 1 | //Word list from: http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=129&start=0 2 | //According to http://www.openoffice.org/license.html, this file is under the LGPL. 3 | //The LGPL only applies to this file. 4 | 5 | var word_list = { 6 | "abotu": "about", 7 | "abouta": "about a", 8 | "aboutit": "about it", 9 | "abscence": "absence", 10 | "accesories": "accessories", 11 | "accidant": "accident", 12 | "accomodate": "accommodate", 13 | "accordingto": "according to", 14 | "accross": "across", 15 | "acheive": "achieve", 16 | "acheived": "achieved", 17 | "acheiving": "achieving", 18 | "acn": "can", 19 | "acommodate": "accommodate", 20 | "acomodate": "accommodate", 21 | "actualyl": "actually", 22 | "additinal": "additional", 23 | "addtional": "additional", 24 | "adequit": "adequate", 25 | "adequite": "adequate", 26 | "adn": "and", 27 | "advanage": "advantage", 28 | "affraid": "afraid", 29 | "afterthe": "after the", 30 | "aggresive": "aggressive", 31 | "agian": "again", 32 | "agreemeent": "agreement", 33 | "agreemeents": "agreements", 34 | "agreemnet": "agreement", 35 | "agreemnets": "agreements", 36 | "agressive": "aggressive", 37 | "ahppen": "happen", 38 | "ahve": "have", 39 | "allready": "already", 40 | "allwasy": "always", 41 | "allwyas": "always", 42 | "almots": "almost", 43 | "almsot": "almost", 44 | "alomst": "almost", 45 | "alot": "a lot", 46 | "alraedy": "already", 47 | "alreayd": "already", 48 | "alreday": "already", 49 | "alwasy": "always", 50 | "alwats": "always", 51 | "alway": "always", 52 | "alwyas": "always", 53 | "amde": "made", 54 | "Ameria": "America", 55 | "amke": "make", 56 | "amkes": "makes", 57 | "anbd": "and", 58 | "andone": "and one", 59 | "andteh": "and the", 60 | "andthe": "and the", 61 | "anothe": "another", 62 | "anual": "annual", 63 | "apparant": "apparent", 64 | "apparrent": "apparent", 65 | "appearence": "appearance", 66 | "appeares": "appears", 67 | "applicaiton": "application", 68 | "applicaitons": "applications", 69 | "applyed": "applied", 70 | "appointiment": "appointment", 71 | "approrpiate": "appropriate", 72 | "approrpriate": "appropriate", 73 | "aquisition": "acquisition", 74 | "aquisitions": "acquisitions", 75 | "arguement": "argument", 76 | "arguements": "arguments", 77 | "arond": "around", 78 | "artical": "article", 79 | "articel": "article", 80 | "asdvertising": "advertising", 81 | "atention": "attention", 82 | "atmospher": "atmosphere", 83 | "attentioin": "attention", 84 | "atthe": "at the", 85 | "audeince": "audience", 86 | "audiance": "audience", 87 | "availalbe": "available", 88 | "awya": "away", 89 | "aywa": "away", 90 | "bakc": "back", 91 | "balence": "balance", 92 | "ballance": "balance", 93 | "baout": "about", 94 | "bcak": "back", 95 | "beacuse": "because", 96 | "becasue": "because", 97 | "becaus": "because", 98 | "becausea": "because a", 99 | "becauseof": "because of", 100 | "becausethe": "because the", 101 | "becauseyou": "because you", 102 | "becomeing": "becoming", 103 | "becomming": "becoming", 104 | "becuase": "because", 105 | "becuse": "because", 106 | "befoer": "before", 107 | "beggining": "beginning", 108 | "begining": "beginning", 109 | "beginining": "beginning", 110 | "beleiev": "believe", 111 | "beleieve": "believe", 112 | "beleif": "belief", 113 | "beleive": "believe", 114 | "beleived": "believed", 115 | "beleives": "believes", 116 | "benifit": "benefit", 117 | "benifits": "benefits", 118 | "betwen": "between", 119 | "beutiful": "beautiful", 120 | "blase": "blasé", 121 | "boxs": "boxes", 122 | "brodcast": "broadcast", 123 | "butthe": "but the", 124 | "bve": "be", 125 | "caharcter": "character", 126 | "calcullated": "calculated", 127 | "calulated": "calculated", 128 | "candidtae": "candidate", 129 | "candidtaes": "candidates", 130 | "catagory": "category", 131 | "categiory": "category", 132 | "certian": "certain", 133 | "challange": "challenge", 134 | "challanges": "challenges", 135 | "chaneg": "change", 136 | "chanegs": "changes", 137 | "changable": "changeable", 138 | "changeing": "changing", 139 | "changng": "changing", 140 | "charachter": "character", 141 | "charachters": "characters", 142 | "charactor": "character", 143 | "charecter": "character", 144 | "charector": "character", 145 | "cheif": "chief", 146 | "chekc": "check", 147 | "chnage": "change", 148 | "cieling": "ceiling", 149 | "circut": "circuit", 150 | "claer": "clear", 151 | "claered": "cleared", 152 | "claerly": "clearly", 153 | "cliant": "client", 154 | "cliche": "cliché", 155 | "cna": "can", 156 | "colection": "collection", 157 | "comanies": "companies", 158 | "comany": "company", 159 | "comapnies": "companies", 160 | "comapny": "company", 161 | "combintation": "combination", 162 | "comited": "committed", 163 | "comittee": "committee", 164 | "commadn": "command", 165 | "comming": "coming", 166 | "commitee": "committee", 167 | "committe": "committee", 168 | "committment": "commitment", 169 | "committments": "commitments", 170 | "committy": "committee", 171 | "comntain": "contain", 172 | "comntains": "contains", 173 | "compair": "compare", 174 | "compleated": "completed", 175 | "compleatly": "completely", 176 | "compleatness": "completeness", 177 | "completly": "completely", 178 | "completness": "completeness", 179 | "composate": "composite", 180 | "comtain": "contain", 181 | "comtains": "contains", 182 | "comunicate": "communicate", 183 | "comunity": "community", 184 | "condolances": "condolences", 185 | "conected": "connected", 186 | "conferance": "conference", 187 | "confirmmation": "confirmation", 188 | "considerit": "considerate", 189 | "considerite": "considerate", 190 | "consonent": "consonant", 191 | "conspiricy": "conspiracy", 192 | "consultent": "consultant", 193 | "convertable": "convertible", 194 | "cooparate": "cooperate", 195 | "cooporate": "cooperate", 196 | "corproation": "corporation", 197 | "corproations": "corporations", 198 | "corruptable": "corruptible", 199 | "cotten": "cotton", 200 | "coudl": "could", 201 | "couldthe": "could the", 202 | "cpoy": "copy", 203 | "creme": "crème", 204 | "ctaegory": "category", 205 | "cusotmer": "customer", 206 | "cusotmers": "customers", 207 | "cutsomer": "customer", 208 | "cutsomers": "customer", 209 | "cxan": "can", 210 | "danceing": "dancing", 211 | "dcument": "document", 212 | "deatils": "details", 213 | "decison": "decision", 214 | "decisons": "decisions", 215 | "decor": "décor", 216 | "defendent": "defendant", 217 | "definately": "definitely", 218 | "deptartment": "department", 219 | "desicion": "decision", 220 | "desicions": "decisions", 221 | "desision": "decision", 222 | "desisions": "decisions", 223 | "develeoprs": "developers", 224 | "devellop": "develop", 225 | "develloped": "developed", 226 | "develloper": "developer", 227 | "devellopers": "developers", 228 | "develloping": "developing", 229 | "devellopment": "development", 230 | "devellopments": "developments", 231 | "devellops": "develop", 232 | "develope": "develop", 233 | "developement": "development", 234 | "developements": "developments", 235 | "developor": "developer", 236 | "developors": "developers", 237 | "develpment": "development", 238 | "diaplay": "display", 239 | "didnot": "did not", 240 | "difefrent": "different", 241 | "diferences": "differences", 242 | "differance": "difference", 243 | "differances": "differences", 244 | "differant": "different", 245 | "differemt": "different", 246 | "differnt": "different", 247 | "diffrent": "different", 248 | "directer": "director", 249 | "directers": "directors", 250 | "directiosn": "direction", 251 | "disatisfied": "dissatisfied", 252 | "discoverd": "discovered", 253 | "disign": "design", 254 | "dispaly": "display", 255 | "dissonent": "dissonant", 256 | "distribusion": "distribution", 257 | "divsion": "division", 258 | "docuement": "documents", 259 | "docuemnt": "document", 260 | "documetn": "document", 261 | "documnet": "document", 262 | "documnets": "documents", 263 | "doese": "does", 264 | "doign": "doing", 265 | "doimg": "doing", 266 | "doind": "doing", 267 | "dollers": "dollars", 268 | "donig": "doing", 269 | "driveing": "driving", 270 | "drnik": "drink", 271 | "efel": "feel", 272 | "effecient": "efficient", 273 | "efort": "effort", 274 | "eforts": "efforts", 275 | "ehr": "her", 276 | "eligable": "eligible", 277 | "embarass": "embarrass", 278 | "enought": "enough", 279 | "equippment": "equipment", 280 | "equivalant": "equivalent", 281 | "esle": "else", 282 | "especally": "especially", 283 | "especialyl": "especially", 284 | "espesially": "especially", 285 | "excellant": "excellent", 286 | "excercise": "exercise", 287 | "exchagne": "exchange", 288 | "exchagnes": "exchanges", 289 | "excitment": "excitement", 290 | "exhcange": "exchange", 291 | "exhcanges": "exchanges", 292 | "experiance": "experience", 293 | "experienc": "experience", 294 | "exprience": "experience", 295 | "exprienced": "experienced", 296 | "eyt": "yet", 297 | "faeture": "feature", 298 | "faetures": "feature", 299 | "familair": "familiar", 300 | "familar": "familiar", 301 | "familliar": "familiar", 302 | "fammiliar": "familiar", 303 | "feild": "field", 304 | "feilds": "fields", 305 | "fianlly": "finally", 306 | "fidn": "find", 307 | "finalyl": "finally", 308 | "firends": "friends", 309 | "firts": "first", 310 | "follwo": "follow", 311 | "follwoing": "following", 312 | "fora": "for a", 313 | "foriegn": "foreign", 314 | "forthe": "for the", 315 | "forwrd": "forward", 316 | "forwrds": "forwards", 317 | "foudn": "found", 318 | "foward": "forward", 319 | "fowards": "forwards", 320 | "freind": "friend", 321 | "freindly": "friendly", 322 | "freinds": "friends", 323 | "frmo": "from", 324 | "fromthe": "from the", 325 | "furneral": "funeral", 326 | "fwe": "few", 327 | "garantee": "guarantee", 328 | "gaurd": "guard", 329 | "gemeral": "general", 330 | "gerat": "great", 331 | "geting": "getting", 332 | "gettin": "getting", 333 | "gievn": "given", 334 | "giveing": "giving", 335 | "gloabl": "global", 336 | "goign": "going", 337 | "gonig": "going", 338 | "govenment": "government", 339 | "goverment": "government", 340 | "gruop": "group", 341 | "gruops": "groups", 342 | "grwo": "grow", 343 | "guidlines": "guidelines", 344 | "hadbeen": "had been", 345 | "haev": "have", 346 | "hapen": "happen", 347 | "hapened": "happened", 348 | "hapening": "happening", 349 | "hapens": "happens", 350 | "happend": "happened", 351 | "hasbeen": "has been", 352 | "havebeen": "have been", 353 | "haveing": "having", 354 | "hearign": "hearing", 355 | "helpfull": "helpful", 356 | "herat": "heart", 357 | "hesaid": "he said", 358 | "hewas": "he was", 359 | "hge": "he", 360 | "hismelf": "himself", 361 | "hlep": "help", 362 | "hsa": "has", 363 | "hsi": "his", 364 | "hte": "the", 365 | "htere": "there", 366 | "htese": "these", 367 | "htey": "they", 368 | "hting": "thing", 369 | "htink": "think", 370 | "htis": "this", 371 | "hvae": "have", 372 | "hvaing": "having", 373 | "hwich": "which", 374 | "i": "I", 375 | "idae": "idea", 376 | "idaes": "ideas", 377 | "identofy": "identify", 378 | "ihs": "his", 379 | "imediate": "immediate", 380 | "imediatly": "immediately", 381 | "immediatly": "immediately", 382 | "importent": "important", 383 | "importnat": "important", 384 | "impossable": "impossible", 385 | "improvemnt": "improvement", 386 | "improvment": "improvement", 387 | "includ": "include", 388 | "indecate": "indicate", 389 | "indenpendence": "independence", 390 | "indenpendent": "independent", 391 | "indepedent": "independent", 392 | "independance": "independence", 393 | "independant": "independent", 394 | "influance": "influence", 395 | "infomation": "information", 396 | "informatoin": "information", 397 | "inital": "initial", 398 | "instaleld": "installed", 399 | "insted": "instead", 400 | "insurence": "insurance", 401 | "inteh": "in the", 402 | "interum": "interim", 403 | "inthe": "in the", 404 | "inwhich": "in which", 405 | "isthe": "is the", 406 | "itis": "it is", 407 | "ititial": "initial", 408 | "itnerest": "interest", 409 | "itnerested": "interested", 410 | "itneresting": "interesting", 411 | "itnerests": "interests", 412 | "iwll": "will", 413 | "iwth": "with", 414 | "jsut": "just", 415 | "jugment": "judgment", 416 | "knowldge": "knowledge", 417 | "knowlege": "knowledge", 418 | "knwo": "know", 419 | "knwon": "known", 420 | "knwos": "knows", 421 | "konwn": "known", 422 | "konws": "knows", 423 | "labratory": "laboratory", 424 | "lastyear": "last year", 425 | "learnign": "learning", 426 | "lenght": "length", 427 | "levle": "level", 428 | "libary": "library", 429 | "librarry": "library", 430 | "librery": "library", 431 | "liek": "like", 432 | "liekd": "liked", 433 | "lieutenent": "lieutenant", 434 | "liev": "live", 435 | "likly": "likely", 436 | "lisense": "licence", 437 | "littel": "little", 438 | "litttle": "little", 439 | "liuke": "like", 440 | "liveing": "living", 441 | "loev": "love", 442 | "lonly": "lonely", 443 | "lookign": "looking", 444 | "maintenence": "maintenance", 445 | "makeing": "making", 446 | "managment": "management", 447 | "mantain": "maintain", 448 | "marraige": "marriage", 449 | "memeber": "member", 450 | "merchent": "merchant", 451 | "mesage": "message", 452 | "mesages": "messages", 453 | "mispell": "misspell", 454 | "mispelling": "misspelling", 455 | "mispellings": "misspellings", 456 | "mkae": "make", 457 | "mkaes": "makes", 458 | "mkaing": "making", 459 | "moeny": "money", 460 | "morgage": "mortgage", 461 | "mroe": "more", 462 | "mysefl": "myself", 463 | "myu": "my", 464 | "naive": "naïve", 465 | "necassarily": "necessarily", 466 | "necassary": "necessary", 467 | "neccessarily": "necessarily", 468 | "neccessary": "necessary", 469 | "necesarily": "necessarily", 470 | "necesary": "necessary", 471 | "negotiaing": "negotiating", 472 | "nkow": "know", 473 | "nothign": "nothing", 474 | "nver": "never", 475 | "nwe": "new", 476 | "nwo": "now", 477 | "obediant": "obedient", 478 | "ocasion": "occasion", 479 | "occassion": "occasion", 480 | "occured": "occurred", 481 | "occurence": "occurrence", 482 | "occurrance": "occurrence", 483 | "ocur": "occur", 484 | "oeprator": "operator", 485 | "ofits": "of its", 486 | "ofthe": "of the", 487 | "oging": "going", 488 | "ohter": "other", 489 | "omre": "more", 490 | "oneof": "one of", 491 | "onepoint": "one point", 492 | "onthe": "on the", 493 | "onyl": "only", 494 | "oppasite": "opposite", 495 | "opperation": "operation", 496 | "oppertunity": "opportunity", 497 | "opposate": "opposite", 498 | "opposible": "opposable", 499 | "opposit": "opposite", 500 | "oppotunities": "opportunities", 501 | "oppotunity": "opportunity", 502 | "orginization": "organisation", 503 | "orginized": "organised", 504 | "otehr": "other", 505 | "otu": "out", 506 | "outof": "out of", 507 | "overthe": "over the", 508 | "owrk": "work", 509 | "owuld": "would", 510 | "oxident": "oxidant", 511 | "papaer": "paper", 512 | "parliment": "parliament", 513 | "partof": "part of", 514 | "paymetn": "payment", 515 | "paymetns": "payments", 516 | "pciture": "picture", 517 | "peice": "piece", 518 | "peices": "pieces", 519 | "peolpe": "people", 520 | "peopel": "people", 521 | "percentof": "percent of", 522 | "percentto": "percent to", 523 | "performence": "performance", 524 | "perhasp": "perhaps", 525 | "perhpas": "perhaps", 526 | "permanant": "permanent", 527 | "perminent": "permanent", 528 | "personalyl": "personally", 529 | "pleasent": "pleasant", 530 | "poeple": "people", 531 | "porblem": "problem", 532 | "porblems": "problems", 533 | "porvide": "provide", 534 | "possable": "possible", 535 | "postition": "position", 536 | "potentialy": "potentially", 537 | "pregnent": "pregnant", 538 | "presance": "presence", 539 | "probelm": "problem", 540 | "probelms": "problems", 541 | "prominant": "prominent", 542 | "psoition": "position", 543 | "ptogress": "progress", 544 | "puting": "putting", 545 | "pwoer": "power", 546 | "quater": "quarter", 547 | "quaters": "quarters", 548 | "quesion": "question", 549 | "quesions": "questions", 550 | "questioms": "questions", 551 | "questiosn": "questions", 552 | "questoin": "question", 553 | "quetion": "question", 554 | "quetions": "questions", 555 | "realyl": "really", 556 | "reccomend": "recommend", 557 | "reccommend": "recommend", 558 | "receieve": "receive", 559 | "recieve": "receive", 560 | "recieved": "received", 561 | "recieving": "receiving", 562 | "recomend": "recommend", 563 | "recomendation": "recommendation", 564 | "recomendations": "recommendations", 565 | "recomended": "recommended", 566 | "reconize": "recognise", 567 | "recrod": "record", 568 | "religous": "religious", 569 | "reluctent": "reluctant", 570 | "remeber": "remember", 571 | "reommend": "recommend", 572 | "representativs": "representatives", 573 | "representives": "representatives", 574 | "represetned": "represented", 575 | "represnt": "represent", 576 | "reserach": "research", 577 | "resollution": "resolution", 578 | "resorces": "resources", 579 | "respomd": "respond", 580 | "respomse": "response", 581 | "responce": "response", 582 | "responsability": "responsibility", 583 | "responsable": "responsible", 584 | "responsibile": "responsible", 585 | "responsiblity": "responsibility", 586 | "restaraunt": "restaurant", 587 | "restuarant": "restaurant", 588 | "reult": "result", 589 | "reveiw": "review", 590 | "reveiwing": "reviewing", 591 | "rumers": "rumors", 592 | "rwite": "write", 593 | "rythm": "rhythm", 594 | "saidhe": "said he", 595 | "saidit": "said it", 596 | "saidthat": "said that", 597 | "saidthe": "said the", 598 | "scedule": "schedule", 599 | "sceduled": "scheduled", 600 | "seance": "séance", 601 | "secratary": "secretary", 602 | "sectino": "section", 603 | "seh": "she", 604 | "selectoin": "selection", 605 | "sentance": "sentence", 606 | "separeate": "separate", 607 | "sercumstances": "circumstances", 608 | "shcool": "school", 609 | "shesaid": "she said", 610 | "shineing": "shining", 611 | "shiped": "shipped", 612 | "shoudl": "should", 613 | "showinf": "showing", 614 | "sidewalk": "pavement", 615 | "signifacnt": "significant", 616 | "simalar": "similar", 617 | "similiar": "similar", 618 | "simpyl": "simply", 619 | "sincerly": "sincerely", 620 | "sitll": "still", 621 | "smae": "same", 622 | "smoe": "some", 623 | "soem": "some", 624 | "sohw": "show", 625 | "soical": "social", 626 | "somethign": "something", 627 | "someting": "something", 628 | "somewaht": "somewhat", 629 | "somthing": "something", 630 | "somtimes": "sometimes", 631 | "soudn": "sound", 632 | "soudns": "sounds", 633 | "speach": "speech", 634 | "specificaly": "specifically", 635 | "specificalyl": "specifically", 636 | "statment": "statement", 637 | "statments": "statements", 638 | "stnad": "stand", 639 | "stopry": "story", 640 | "stoyr": "story", 641 | "stpo": "stop", 642 | "strentgh": "strength", 643 | "stroy": "story", 644 | "struggel": "struggle", 645 | "strugle": "struggle", 646 | "studnet": "student", 647 | "successfull": "successful", 648 | "successfuly": "successfully", 649 | "successfulyl": "successfully", 650 | "sucess": "success", 651 | "sucessfull": "successful", 652 | "sufficiant": "sufficient", 653 | "suposed": "supposed", 654 | "suppossed": "supposed", 655 | "suprised": "surprised", 656 | "swiming": "swimming", 657 | "tahn": "than", 658 | "taht": "that", 659 | "talekd": "talked", 660 | "talkign": "talking", 661 | "tath": "that", 662 | "tecnical": "technical", 663 | "teh": "the", 664 | "tehy": "they", 665 | "termoil": "turmoil", 666 | "tets": "test", 667 | "tghe": "the", 668 | "tghis": "this", 669 | "thansk": "thanks", 670 | "thatthe": "that the", 671 | "thecompany": "the company", 672 | "thefirst": "the first", 673 | "thegovernment": "the government", 674 | "themself": "themselves", 675 | "themselfs": "themselves", 676 | "thenew": "the new", 677 | "theri": "their", 678 | "thesame": "the same", 679 | "thetwo": "the two", 680 | "thgat": "that", 681 | "thge": "the", 682 | "thier": "their", 683 | "thigsn": "things", 684 | "thisyear": "this year", 685 | "thme": "them", 686 | "thna": "than", 687 | "thne": "then", 688 | "thnig": "thing", 689 | "thnigs": "things", 690 | "threatend": "threatened", 691 | "thsi": "this", 692 | "thsoe": "those", 693 | "thta": "that", 694 | "tihs": "this", 695 | "timne": "time", 696 | "tiogether": "together", 697 | "tje": "the", 698 | "tjhe": "the", 699 | "tkae": "take", 700 | "tkaes": "takes", 701 | "tkaing": "taking", 702 | "tlaking": "talking", 703 | "todya": "today", 704 | "togehter": "together", 705 | "tomorow": "tomorrow", 706 | "tongiht": "tonight", 707 | "tonihgt": "tonight", 708 | "totaly": "totally", 709 | "totalyl": "totally", 710 | "tothe": "to the", 711 | "towrad": "toward", 712 | "traditionalyl": "traditionally", 713 | "transfered": "transferred", 714 | "truely": "truly", 715 | "truley": "truly", 716 | "tryed": "tried", 717 | "tthe": "the", 718 | "tyhat": "that", 719 | "tyhe": "the", 720 | "udnerstand": "understand", 721 | "understnad": "understand", 722 | "UnitedStates": "United States", 723 | "unliek": "unlike", 724 | "unpleasently": "unpleasantly", 725 | "untill": "until", 726 | "untilll": "until", 727 | "useing": "using", 728 | "usualyl": "usually", 729 | "veyr": "very", 730 | "virtualyl": "virtually", 731 | "vrey": "very", 732 | "vulnerible": "vulnerable", 733 | "waht": "what", 734 | "warrent": "warrant", 735 | "watn": "want", 736 | "wehn": "when", 737 | "werre": "were", 738 | "whcih": "which", 739 | "wherre": "where", 740 | "whic": "which", 741 | "whihc": "which", 742 | "whta": "what", 743 | "wief": "wife", 744 | "wierd": "weird", 745 | "wihch": "which", 746 | "wiht": "with", 747 | "willbe": "will be", 748 | "windoes": "windows", 749 | "witha": "with a", 750 | "withe": "with", 751 | "withthe": "with the", 752 | "wiull": "will", 753 | "wnat": "want", 754 | "wnated": "wanted", 755 | "wnats": "wants", 756 | "woh": "who", 757 | "wohle": "whole", 758 | "wokr": "work", 759 | "woudl": "would", 760 | "wouldbe": "would be", 761 | "wriet": "write", 762 | "writting": "writing", 763 | "wrod": "word", 764 | "wroet": "wrote", 765 | "wroking": "working", 766 | "wtih": "with", 767 | "wuould": "would", 768 | "wya": "way", 769 | "yera": "year", 770 | "yeras": "years", 771 | "yersa": "years", 772 | "yoiu": "you", 773 | "youare": "you are", 774 | "ytou": "you", 775 | "yuo": "you", 776 | "yuor": "your" 777 | }; 778 | -------------------------------------------------------------------------------- /git_fight/extensions/chrome_extension/jquery.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery JavaScript Library v1.4.2 3 | * http://jquery.com/ 4 | * 5 | * Copyright 2010, John Resig 6 | * Dual licensed under the MIT or GPL Version 2 licenses. 7 | * http://jquery.org/license 8 | * 9 | * Includes Sizzle.js 10 | * http://sizzlejs.com/ 11 | * Copyright 2010, The Dojo Foundation 12 | * Released under the MIT, BSD, and GPL Licenses. 13 | * 14 | * Date: Sat Feb 13 22:33:48 2010 -0500 15 | */ 16 | (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, 21 | Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& 22 | (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, 23 | a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== 24 | "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, 25 | function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; 34 | var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, 35 | parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= 36 | false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= 37 | s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, 38 | applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; 39 | else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, 40 | a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== 41 | w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, 42 | cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= 47 | c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); 48 | a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, 49 | function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); 50 | k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), 51 | C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= 53 | e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& 54 | f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; 55 | if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", 63 | e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, 64 | "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, 65 | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, 71 | e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); 72 | t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| 73 | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, 80 | CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, 81 | g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, 82 | text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, 83 | setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= 84 | h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== 86 | "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, 87 | h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& 90 | q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; 91 | if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); 92 | (function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: 93 | function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= 96 | {},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== 97 | "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", 98 | d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? 99 | a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== 100 | 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= 102 | c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, 103 | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, 104 | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, 105 | this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); 106 | return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, 107 | ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); 111 | return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", 112 | ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= 113 | c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? 114 | c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= 115 | function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= 116 | Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, 117 | "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= 118 | a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= 119 | a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== 120 | "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, 121 | serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), 122 | function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, 123 | global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& 124 | e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? 125 | "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== 126 | false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= 127 | false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", 128 | c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| 129 | d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); 130 | g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== 131 | 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== 132 | "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; 133 | if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== 139 | "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| 140 | c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; 141 | this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= 142 | this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, 143 | e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; 149 | a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); 150 | c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, 151 | d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- 152 | f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": 153 | "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in 154 | e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); --------------------------------------------------------------------------------